summaryrefslogtreecommitdiffstats
path: root/kregexpeditor/altnwidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
commit5f5ee2367157176ed223b86343eb0a9e4022e020 (patch)
tree6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /kregexpeditor/altnwidget.cpp
parent4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff)
downloadtdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz
tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kregexpeditor/altnwidget.cpp')
-rw-r--r--kregexpeditor/altnwidget.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/kregexpeditor/altnwidget.cpp b/kregexpeditor/altnwidget.cpp
index 22937ac..d1855d4 100644
--- a/kregexpeditor/altnwidget.cpp
+++ b/kregexpeditor/altnwidget.cpp
@@ -26,9 +26,9 @@
#include "dragaccepter.h"
#include "concwidget.h"
#include "altnregexp.h"
-#include <qpainter.h>
+#include <tqpainter.h>
-AltnWidget::AltnWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+AltnWidget::AltnWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name)
:MultiContainerWidget(editorWindow, parent, name == 0 ? "AltnWidget" : name)
{
@@ -39,7 +39,7 @@ AltnWidget::AltnWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
}
AltnWidget::AltnWidget( AltnRegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name)
+ TQWidget* parent, const char* name)
:MultiContainerWidget( editorWindow, parent, name )
{
DragAccepter *accepter = new DragAccepter(editorWindow, this);
@@ -75,15 +75,15 @@ void AltnWidget::setConcChild(ConcWidget *child)
void AltnWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *child)
{
- child->reparent(this, QPoint(0,0), false);
+ child->reparent(this, TQPoint(0,0), false);
MultiContainerWidget::addNewChild( accepter, child );
updateDrawLineInfo();
}
-QSize AltnWidget::sizeHint() const
+TQSize AltnWidget::sizeHint() const
{
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
// Skip the first child, as we only need half of the size of the first and the
// last drag accepter. Does, however, not apply when there only is onw child.
if ( _children.count() != 1 )
@@ -93,23 +93,23 @@ QSize AltnWidget::sizeHint() const
_childrenHeight = 0;
for ( ; *it ; ++it) {
- QSize thisChildSize = (*it)->sizeHint();
+ TQSize thisChildSize = (*it)->sizeHint();
_childrenWidth = QMAX(_childrenWidth, thisChildSize.width());
_childrenHeight += thisChildSize.height();
}
// Now add the size of the header
- QFontMetrics metrics = fontMetrics();
+ TQFontMetrics metrics = fontMetrics();
_textSize = metrics.size(0,_text);
int headerWidth = _textSize.width() + 2 * bdSize + 2;
_childrenWidth = QMAX(_childrenWidth, headerWidth);
- return QSize(_childrenWidth + 2*pw, _childrenHeight + _textSize.height() + 1*pw );
+ return TQSize(_childrenWidth + 2*pw, _childrenHeight + _textSize.height() + 1*pw );
}
-void AltnWidget::paintEvent( QPaintEvent *e)
+void AltnWidget::paintEvent( TQPaintEvent *e)
{
Q_ASSERT( dynamic_cast<DragAccepter*>(_children.at(0)) );
// if this fails, then I should check the location of the show()
@@ -118,9 +118,9 @@ void AltnWidget::paintEvent( QPaintEvent *e)
dynamic_cast<DragAccepter*>(_children.at(_children.count()-1)) ) );
int offset = 0;
- QSize mySize = sizeHint();
+ TQSize mySize = sizeHint();
- QPainter painter(this);
+ TQPainter painter(this);
drawPossibleSelection( painter, mySize );
//-------------------------------------- First draw the border and text
@@ -144,8 +144,8 @@ void AltnWidget::paintEvent( QPaintEvent *e)
RegExpWidget* child = _children.at(i);
- QSize childSize = child->sizeHint();
- QSize curChildSize = child->size();
+ TQSize childSize = child->sizeHint();
+ TQSize curChildSize = child->size();
//-------------------------------------- place the child
int x = xOffset;
@@ -172,7 +172,7 @@ RegExp* AltnWidget::regExp() const
{
AltnRegExp *regexp = new AltnRegExp( isSelected() );
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // start with the second element
for ( ; *it; it+=2 ) {
regexp->addRegExp( (*it)->regExp() );
@@ -197,7 +197,7 @@ RegExp* AltnWidget::selection() const
if ( isSelected() )
return regExp();
else {
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past DragAccepter
for ( ; *it; it+=2 ) {
if ( (*it)->hasSelection() ) {
@@ -216,7 +216,7 @@ bool AltnWidget::validateSelection() const
}
bool foundASelection = false;
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past DragAccepter
for ( ; *it; it+=2 ) {
if ( (*it)->hasSelection() ) {