summaryrefslogtreecommitdiffstats
path: root/kregexpeditor/altnwidget.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:52 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:52 -0600
commitbf280726d5d22f33d33e4f9e771220c725249407 (patch)
tree48b7496821910eb85179d543acee981cf5d16dd8 /kregexpeditor/altnwidget.cpp
parentc78266617c282543427d2c000b3b68fe2b6b6722 (diff)
downloadtdeutils-bf280726d5d22f33d33e4f9e771220c725249407.tar.gz
tdeutils-bf280726d5d22f33d33e4f9e771220c725249407.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kregexpeditor/altnwidget.cpp')
-rw-r--r--kregexpeditor/altnwidget.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/kregexpeditor/altnwidget.cpp b/kregexpeditor/altnwidget.cpp
index 25befe5..3a29135 100644
--- a/kregexpeditor/altnwidget.cpp
+++ b/kregexpeditor/altnwidget.cpp
@@ -34,7 +34,7 @@ AltnWidget::AltnWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
{
DragAccepter *accepter = new DragAccepter(editorWindow, this);
accepter->resize(0,0); // See note (1) in Comments
- _tqchildren.append(accepter);
+ _children.append(accepter);
_text = i18n("Alternatives");
}
@@ -44,10 +44,10 @@ AltnWidget::AltnWidget( AltnRegExp* regexp, RegExpEditorWindow* editorWindow,
{
DragAccepter *accepter = new DragAccepter(editorWindow, this);
accepter->resize(0,0); // See note (1) in Comments
- _tqchildren.append(accepter);
+ _children.append(accepter);
_text = i18n("Alternatives");
- RegExpList list = regexp->tqchildren();
+ RegExpList list = regexp->children();
for ( RegExpListIt it(list); *it; ++it ) {
RegExpWidget* child = WidgetFactory::createWidget( *it, editorWindow, this );
ConcWidget* conc;
@@ -65,12 +65,12 @@ void AltnWidget::addNewChild(DragAccepter *accepter, RegExpWidget *child)
ConcWidget *conc = new ConcWidget(_editorWindow, child,this);
MultiContainerWidget::addNewChild( accepter, conc );
updateDrawLineInfo();
- tqrepaint();
+ repaint();
}
void AltnWidget::setConcChild(ConcWidget *child)
{
- addNewConcChild( dynamic_cast<DragAccepter*>(_tqchildren.at(0)), child );
+ addNewConcChild( dynamic_cast<DragAccepter*>(_children.at(0)), child );
}
void AltnWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *child)
@@ -81,21 +81,21 @@ void AltnWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *child)
}
-TQSize AltnWidget::tqsizeHint() const
+TQSize AltnWidget::sizeHint() const
{
- TQPtrListIterator<RegExpWidget> it(_tqchildren);
+ 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 ( _tqchildren.count() != 1 )
+ if ( _children.count() != 1 )
++it;
- _tqchildrenWidth = 0;
- _tqchildrenHeight = 0;
+ _childrenWidth = 0;
+ _childrenHeight = 0;
for ( ; *it ; ++it) {
- TQSize thisChildSize = (*it)->tqsizeHint();
- _tqchildrenWidth = TQMAX(_tqchildrenWidth, thisChildSize.width());
- _tqchildrenHeight += thisChildSize.height();
+ TQSize thisChildSize = (*it)->sizeHint();
+ _childrenWidth = TQMAX(_childrenWidth, thisChildSize.width());
+ _childrenHeight += thisChildSize.height();
}
// Now add the size of the header
@@ -104,21 +104,21 @@ TQSize AltnWidget::tqsizeHint() const
int headerWidth = _textSize.width() + 2 * bdSize + 2;
- _tqchildrenWidth = TQMAX(_tqchildrenWidth, headerWidth);
+ _childrenWidth = TQMAX(_childrenWidth, headerWidth);
- return TQSize(_tqchildrenWidth + 2*pw, _tqchildrenHeight + _textSize.height() + 1*pw );
+ return TQSize(_childrenWidth + 2*pw, _childrenHeight + _textSize.height() + 1*pw );
}
void AltnWidget::paintEvent( TQPaintEvent *e)
{
- Q_ASSERT( dynamic_cast<DragAccepter*>(_tqchildren.at(0)) );
+ Q_ASSERT( dynamic_cast<DragAccepter*>(_children.at(0)) );
// if this fails, then I should check the location of the show()
- Q_ASSERT( _tqchildren.count() == 1 ||
- ( _tqchildren.count() >=3 &&
- dynamic_cast<DragAccepter*>(_tqchildren.at(_tqchildren.count()-1)) ) );
+ Q_ASSERT( _children.count() == 1 ||
+ ( _children.count() >=3 &&
+ dynamic_cast<DragAccepter*>(_children.at(_children.count()-1)) ) );
int offset = 0;
- TQSize mySize = tqsizeHint();
+ TQSize mySize = sizeHint();
TQPainter painter(this);
drawPossibleSelection( painter, mySize );
@@ -136,27 +136,27 @@ void AltnWidget::paintEvent( TQPaintEvent *e)
painter.drawLine(mySize.width()-pw, startY, mySize.width()-pw, mySize.height());
painter.drawLine(0,mySize.height()-pw, mySize.width()-pw, mySize.height()-pw);
- //---- Run through all the tqchildren and place them at the correct location.
+ //---- Run through all the children and place them at the correct location.
offset = _textSize.height();
xOffset = pw;
- for (unsigned int i = 0; i < _tqchildren.count(); i++ ) {
+ for (unsigned int i = 0; i < _children.count(); i++ ) {
- RegExpWidget* child = _tqchildren.at(i);
+ RegExpWidget* child = _children.at(i);
- TQSize childSize = child->tqsizeHint();
+ TQSize childSize = child->sizeHint();
TQSize curChildSize = child->size();
//-------------------------------------- place the child
int x = xOffset;
int y = offset;
int h = childSize.height();
- if ( ( _tqchildren.count() != 1 ) && ( i == 0 || i == _tqchildren.count() -1 ) ) {
+ if ( ( _children.count() != 1 ) && ( i == 0 || i == _children.count() -1 ) ) {
// first and last DragAccepter should only be half size.
h /= 2;
}
- int w = _tqchildrenWidth;
+ int w = _childrenWidth;
child->setGeometry( x, y, w, h );
if ( w != curChildSize.width() || h != curChildSize.height() ) {
// I resized the child, so give it a chance to relect thus.
@@ -172,7 +172,7 @@ RegExp* AltnWidget::regExp() const
{
AltnRegExp *regexp = new AltnRegExp( isSelected() );
- TQPtrListIterator<RegExpWidget> it(_tqchildren);
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // start with the second element
for ( ; *it; it+=2 ) {
regexp->addRegExp( (*it)->regExp() );
@@ -183,8 +183,8 @@ RegExp* AltnWidget::regExp() const
void AltnWidget::applyRegExpToSelection( RegExpType type )
{
- for ( unsigned int i=1; i < _tqchildren.count(); i += 2 ) {
- RegExpWidget* child = _tqchildren.at( i );
+ for ( unsigned int i=1; i < _children.count(); i += 2 ) {
+ RegExpWidget* child = _children.at( i );
if ( child->hasSelection() ) {
child->applyRegExpToSelection( type );
}
@@ -197,7 +197,7 @@ RegExp* AltnWidget::selection() const
if ( isSelected() )
return regExp();
else {
- TQPtrListIterator<RegExpWidget> it(_tqchildren);
+ 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;
- TQPtrListIterator<RegExpWidget> it(_tqchildren);
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past DragAccepter
for ( ; *it; it+=2 ) {
if ( (*it)->hasSelection() ) {
@@ -238,9 +238,9 @@ bool AltnWidget::validateSelection() const
void AltnWidget::updateDrawLineInfo()
{
- for ( unsigned int i=0; i < _tqchildren.count(); i+=2 ) {
- bool line = ( i != 0 && i!= _tqchildren.count()-1 );
- DragAccepter *accepter = dynamic_cast<DragAccepter*>(_tqchildren.at(i));
+ for ( unsigned int i=0; i < _children.count(); i+=2 ) {
+ bool line = ( i != 0 && i!= _children.count()-1 );
+ DragAccepter *accepter = dynamic_cast<DragAccepter*>(_children.at(i));
if (accepter)
accepter->setDrawLine( line );
}