From bf280726d5d22f33d33e4f9e771220c725249407 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:50:52 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kregexpeditor/Comments | 2 +- kregexpeditor/KMultiFormListBox/ccp.cpp | 6 +- kregexpeditor/KMultiFormListBox/indexWindow.cpp | 4 +- .../kmultiformlistbox-multivisible.cpp | 6 +- .../kmultiformlistbox-windowed.cpp | 2 +- .../KMultiFormListBox/kmultiformlistbox.cpp | 4 +- .../KMultiFormListBox/kmultiformlistbox.h | 2 +- .../KMultiFormListBox/kmultiformlistboxentry.h | 2 +- kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp | 86 +++++++++--------- kregexpeditor/altnregexp.cpp | 2 +- kregexpeditor/altnregexp.h | 2 +- kregexpeditor/altnwidget.cpp | 68 +++++++------- kregexpeditor/altnwidget.h | 6 +- kregexpeditor/auxbuttons.cpp | 32 +++---- kregexpeditor/characterswidget.cpp | 28 +++--- kregexpeditor/characterswidget.h | 2 +- kregexpeditor/charselector.cpp | 28 +++--- kregexpeditor/compoundwidget.cpp | 26 +++--- kregexpeditor/compoundwidget.h | 2 +- kregexpeditor/concregexp.cpp | 2 +- kregexpeditor/concregexp.h | 2 +- kregexpeditor/concwidget.cpp | 100 ++++++++++----------- kregexpeditor/concwidget.h | 4 +- kregexpeditor/drag.cpp | 4 +- kregexpeditor/drag.h | 2 +- kregexpeditor/dragaccepter.cpp | 6 +- kregexpeditor/dragaccepter.h | 2 +- kregexpeditor/editorwindow.cpp | 24 ++--- kregexpeditor/editorwindow.h | 4 +- kregexpeditor/emacsregexpconverter.cpp | 46 +++++----- kregexpeditor/errormap.cpp | 6 +- kregexpeditor/gen_qregexpparser.cc | 12 +-- kregexpeditor/infopage.cpp | 6 +- kregexpeditor/infopage.h | 2 +- kregexpeditor/kregexpeditorgui.cpp | 20 ++--- kregexpeditor/kregexpeditorprivate.cpp | 18 ++-- kregexpeditor/limitedcharlineedit.cpp | 2 +- kregexpeditor/lookaheadwidget.cpp | 8 +- kregexpeditor/lookaheadwidget.h | 2 +- kregexpeditor/main.cpp | 4 +- kregexpeditor/multicontainerwidget.cpp | 76 ++++++++-------- kregexpeditor/multicontainerwidget.h | 4 +- kregexpeditor/myfontmetrics.cpp | 2 +- kregexpeditor/qregexpparser.y | 12 +-- kregexpeditor/qt-only/compat.h | 2 +- kregexpeditor/qtregexpconverter.cpp | 62 ++++++------- kregexpeditor/qtregexphighlighter.h | 2 +- kregexpeditor/regexp.cpp | 8 +- kregexpeditor/regexp.h | 2 +- kregexpeditor/regexpbuttons.cpp | 38 ++++---- kregexpeditor/regexpconverter.cpp | 4 +- kregexpeditor/regexpwidget.cpp | 14 +-- kregexpeditor/regexpwidget.h | 8 +- kregexpeditor/repeatregexp.cpp | 4 +- kregexpeditor/repeatwidget.cpp | 18 ++-- kregexpeditor/repeatwidget.h | 2 +- kregexpeditor/scrollededitorwindow.cpp | 2 +- kregexpeditor/selectablelineedit.cpp | 10 +-- kregexpeditor/selectablelineedit.h | 2 +- kregexpeditor/singlecontainerwidget.cpp | 4 +- kregexpeditor/test-without-dl/main.cpp | 4 +- kregexpeditor/textrangeregexp.cpp | 2 +- kregexpeditor/textregexp.cpp | 2 +- kregexpeditor/textwidget.cpp | 12 +-- kregexpeditor/textwidget.h | 2 +- kregexpeditor/userdefinedregexps.cpp | 14 +-- kregexpeditor/util.cpp | 2 +- kregexpeditor/verifier.cpp | 2 +- kregexpeditor/verifier.h | 2 +- kregexpeditor/verifybuttons.cpp | 38 ++++---- kregexpeditor/widgetfactory.cpp | 6 +- kregexpeditor/zerowidgets.cpp | 6 +- kregexpeditor/zerowidgets.h | 2 +- 73 files changed, 478 insertions(+), 478 deletions(-) (limited to 'kregexpeditor') diff --git a/kregexpeditor/Comments b/kregexpeditor/Comments index 97cd98e..71f4470 100644 --- a/kregexpeditor/Comments +++ b/kregexpeditor/Comments @@ -1,4 +1,4 @@ (1) If I do not resize the widget to be reparented then it will take up all the size of its new parent, and the parent will never receive a - tqrepaint event, and will thus never get a chance to resize its new child + repaint event, and will thus never get a chance to resize its new child to a proper size (This is namely done in repaintEvent() ). diff --git a/kregexpeditor/KMultiFormListBox/ccp.cpp b/kregexpeditor/KMultiFormListBox/ccp.cpp index ff2d6c3..be65d35 100644 --- a/kregexpeditor/KMultiFormListBox/ccp.cpp +++ b/kregexpeditor/KMultiFormListBox/ccp.cpp @@ -38,9 +38,9 @@ CCP::CCP(KMultiFormListBoxMultiVisible *ee_, KMultiFormListBoxEntry *eee_) : TQO void CCP::install(TQObject *elm) { elm->installEventFilter(this); - const TQObjectList tqchildren = elm->childrenListObject(); - if (!tqchildren.isEmpty()) { - TQObjectListIt it = TQObjectListIt(tqchildren); + const TQObjectList children = elm->childrenListObject(); + if (!children.isEmpty()) { + TQObjectListIt it = TQObjectListIt(children); while (TQObject *child=it.current()) { if (child->inherits("KMultiFormListBoxMultiVisible")) { diff --git a/kregexpeditor/KMultiFormListBox/indexWindow.cpp b/kregexpeditor/KMultiFormListBox/indexWindow.cpp index f81ea07..ccbd636 100644 --- a/kregexpeditor/KMultiFormListBox/indexWindow.cpp +++ b/kregexpeditor/KMultiFormListBox/indexWindow.cpp @@ -24,7 +24,7 @@ #include "indexWindow.h" #include -#include +#include indexWindow::indexWindow() : TQWidget(0,"", WStyle_Customize | WType_Popup) { @@ -71,7 +71,7 @@ int indexWindow::exec(const TQPoint & /*start*/, int /*width*/) // 23 Feb. 2003 11:28 -- Jesper K. Pedersen /* // calculate the height of all the elements together. - // I need to do it this way, as tqsizeHint doesn't report the correct size + // I need to do it this way, as sizeHint doesn't report the correct size // and itemHeight doesn't neither. int elm_h = lb->item(0)->height(lb) * lb->count(); elm_h += 2*lb->frameWidth(); diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp index 6e82e85..3dcab67 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp @@ -94,9 +94,9 @@ void KMultiFormListBoxMultiVisible::updateClipperContent() // calculate the required size. for (TQWidget *child = elms->first(); child; child=elms->next()) { - maxWidth = TQMAX(maxWidth, child->tqsizeHint().width()); + maxWidth = TQMAX(maxWidth, child->sizeHint().width()); if (strcmp(child->name(), "seperator") != 0) { - totalHeight += child->tqsizeHint().height(); + totalHeight += child->sizeHint().height(); count++; } else { @@ -116,7 +116,7 @@ void KMultiFormListBoxMultiVisible::updateClipperContent() for (TQWidget *child2 = elms->first(); child2; child2=elms->next()) { int h; if ( strcmp(child2->name(),"seperator") != 0) { - h = child2->tqsizeHint().height(); + h = child2->sizeHint().height(); h += extra; } else { diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp index 905634c..8d3ffe3 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp @@ -150,7 +150,7 @@ void KMultiFormListBoxWindowed::slotDeleteEntry() WindowListboxItem *item = selected(); if (item) { int answer = - KMessageBox::warningContinueCancel(0, i18n("Delete item \"%1\"?").tqarg(item->text()),i18n("Delete Item"),KStdGuiItem::del()); + KMessageBox::warningContinueCancel(0, i18n("Delete item \"%1\"?").arg(item->text()),i18n("Delete Item"),KStdGuiItem::del()); if (answer == KMessageBox::Continue) { delete item; slotUpdateButtonState(); diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp index a455bae..58b82da 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp @@ -40,9 +40,9 @@ KMultiFormListBox::KMultiFormListBox( KMultiFormListBoxFactory *factory, KMultiF TQWidget *widget = theWidget->qWidget(); - TQHBoxLayout *tqlayout = new TQHBoxLayout( this ); + TQHBoxLayout *layout = new TQHBoxLayout( this ); _factory = factory; - tqlayout->addWidget( widget ); + layout->addWidget( widget ); } void KMultiFormListBox::append( KMultiFormListBoxEntry *element ) diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h index ba9b8a8..e432c59 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h @@ -22,7 +22,7 @@ #include "kmultiformlistbox-shower.h" #include "kmultiformlistboxentry.h" #include -#include +#include #include #ifdef TQT_ONLY diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h b/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h index b4bf36c..90d4e35 100644 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h +++ b/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h @@ -60,7 +60,7 @@ public: // This function must return a string representing the KMultiFormListBox. This is // used when showing the fast-search menu available from the `Idx' button. - virtual TQString idxString() { return TQString::tqfromLatin1(""); } + virtual TQString idxString() { return TQString::fromLatin1(""); } public slots: void acceptIndexButton(); diff --git a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp index 42d411b..9015aaa 100644 --- a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp +++ b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp @@ -48,11 +48,11 @@ void KWidgetStreamer::propertyToStream( const TQObject* from, TQDataStream& stre if ( ! from->inherits(TQWIDGET_OBJECT_NAME_STRING) ) return; - // Serializing all the tqchildren (if any). - const TQObjectList tqchildren = from->childrenListObject(); - if ( !tqchildren.isEmpty() ) { - stream << tqchildren.count(); - for ( TQObjectListIt it = TQObjectListIt(tqchildren); *it; ++it ) { + // Serializing all the children (if any). + const TQObjectList children = from->childrenListObject(); + if ( !children.isEmpty() ) { + stream << children.count(); + for ( TQObjectListIt it = TQObjectListIt(children); *it; ++it ) { toStream( *it, stream ); } } @@ -83,14 +83,14 @@ void KWidgetStreamer::propertyFromStream( TQDataStream& stream, TQObject* to ) if ( ! to->inherits(TQWIDGET_OBJECT_NAME_STRING) ) return; - // Stream in all the tqchildren (if any) - const TQObjectList tqchildren = to->childrenListObject(); + // Stream in all the children (if any) + const TQObjectList children = to->childrenListObject(); unsigned int count; stream >> count; - if ( !tqchildren.isEmpty() ) { - Q_ASSERT( count == tqchildren.count() ); - for ( TQObjectListIt it = TQObjectListIt(tqchildren); *it; ++it ) + if ( !children.isEmpty() ) { + Q_ASSERT( count == children.count() ); + for ( TQObjectListIt it = TQObjectListIt(children); *it; ++it ) fromStream( stream, *it ); } else { @@ -117,61 +117,61 @@ KWidgetStreamer::KWidgetStreamer () // TQCheckBox l.clear(); - l << TQString::tqfromLatin1("enabled") - << TQString::tqfromLatin1("checked") << TQString::tqfromLatin1("tristate"); - _map.insert(TQString::tqfromLatin1(TQCHECKBOX_OBJECT_NAME_STRING), l); + l << TQString::fromLatin1("enabled") + << TQString::fromLatin1("checked") << TQString::fromLatin1("tristate"); + _map.insert(TQString::fromLatin1(TQCHECKBOX_OBJECT_NAME_STRING), l); // TQComboBox l.clear(); - l << TQString::tqfromLatin1("enabled") - << TQString::tqfromLatin1("editable") << TQString::tqfromLatin1("currentItem") - << TQString::tqfromLatin1("maxCount") << TQString::tqfromLatin1("insertionPolicy") - << TQString::tqfromLatin1("autoCompletion"); - _map.insert(TQString::tqfromLatin1(TQCOMBOBOX_OBJECT_NAME_STRING), l); + l << TQString::fromLatin1("enabled") + << TQString::fromLatin1("editable") << TQString::fromLatin1("currentItem") + << TQString::fromLatin1("maxCount") << TQString::fromLatin1("insertionPolicy") + << TQString::fromLatin1("autoCompletion"); + _map.insert(TQString::fromLatin1(TQCOMBOBOX_OBJECT_NAME_STRING), l); // TQDial l.clear(); - l << TQString::tqfromLatin1("enabled") - << TQString::tqfromLatin1("tracking") << TQString::tqfromLatin1("wrapping") - << TQString::tqfromLatin1("value"); - _map.insert(TQString::tqfromLatin1(TQDIAL_OBJECT_NAME_STRING), l); + l << TQString::fromLatin1("enabled") + << TQString::fromLatin1("tracking") << TQString::fromLatin1("wrapping") + << TQString::fromLatin1("value"); + _map.insert(TQString::fromLatin1(TQDIAL_OBJECT_NAME_STRING), l); // TQLCDNumber l.clear(); - l << TQString::tqfromLatin1("enabled") - << TQString::tqfromLatin1("numDigits") << TQString::tqfromLatin1("mode") - << TQString::tqfromLatin1("segmentStyle") << TQString::tqfromLatin1("value"); - _map.insert(TQString::tqfromLatin1(TQLCDNUMBER_OBJECT_NAME_STRING), l); + l << TQString::fromLatin1("enabled") + << TQString::fromLatin1("numDigits") << TQString::fromLatin1("mode") + << TQString::fromLatin1("segmentStyle") << TQString::fromLatin1("value"); + _map.insert(TQString::fromLatin1(TQLCDNUMBER_OBJECT_NAME_STRING), l); // TQLineEdit l.clear(); - l << TQString::tqfromLatin1("enabled") - << TQString::tqfromLatin1("text") << TQString::tqfromLatin1("maxLength") - << TQString::tqfromLatin1("echoMode") << TQString::tqfromLatin1("tqalignment"); - _map.insert(TQString::tqfromLatin1(TQLINEEDIT_OBJECT_NAME_STRING), l); + l << TQString::fromLatin1("enabled") + << TQString::fromLatin1("text") << TQString::fromLatin1("maxLength") + << TQString::fromLatin1("echoMode") << TQString::fromLatin1("alignment"); + _map.insert(TQString::fromLatin1(TQLINEEDIT_OBJECT_NAME_STRING), l); // TQMultiLineEdit l.clear(); - l << TQString::tqfromLatin1("enabled") - << TQString::tqfromLatin1("text") - << TQString::tqfromLatin1("tqalignment"); - _map.insert(TQString::tqfromLatin1(TQTEXTEDIT_OBJECT_NAME_STRING), l); + l << TQString::fromLatin1("enabled") + << TQString::fromLatin1("text") + << TQString::fromLatin1("alignment"); + _map.insert(TQString::fromLatin1(TQTEXTEDIT_OBJECT_NAME_STRING), l); // TQRadioButton l.clear(); - l << TQString::tqfromLatin1("enabled") - << TQString::tqfromLatin1("checked"); - _map.insert(TQString::tqfromLatin1(TQRADIOBUTTON_OBJECT_NAME_STRING), l); + l << TQString::fromLatin1("enabled") + << TQString::fromLatin1("checked"); + _map.insert(TQString::fromLatin1(TQRADIOBUTTON_OBJECT_NAME_STRING), l); // TQSlider l.clear(); - l << TQString::tqfromLatin1("enabled") - << TQString::tqfromLatin1("value"); - _map.insert(TQString::tqfromLatin1(TQSLIDER_OBJECT_NAME_STRING), l); + l << TQString::fromLatin1("enabled") + << TQString::fromLatin1("value"); + _map.insert(TQString::fromLatin1(TQSLIDER_OBJECT_NAME_STRING), l); // TQSpinBox l.clear(); - l << TQString::tqfromLatin1("enabled") - << TQString::tqfromLatin1("value"); - _map.insert(TQString::tqfromLatin1(TQSPINBOX_OBJECT_NAME_STRING), l); + l << TQString::fromLatin1("enabled") + << TQString::fromLatin1("value"); + _map.insert(TQString::fromLatin1(TQSPINBOX_OBJECT_NAME_STRING), l); } diff --git a/kregexpeditor/altnregexp.cpp b/kregexpeditor/altnregexp.cpp index b9b01ec..ef8b8de 100644 --- a/kregexpeditor/altnregexp.cpp +++ b/kregexpeditor/altnregexp.cpp @@ -29,7 +29,7 @@ void AltnRegExp::addRegExp( RegExp *elm ) addChild( elm ); } -RegExpList AltnRegExp::tqchildren() const +RegExpList AltnRegExp::children() const { return list; } diff --git a/kregexpeditor/altnregexp.h b/kregexpeditor/altnregexp.h index 37614f1..c126c5f 100644 --- a/kregexpeditor/altnregexp.h +++ b/kregexpeditor/altnregexp.h @@ -30,7 +30,7 @@ public: AltnRegExp( bool selected ); void addRegExp( RegExp * ); - RegExpList tqchildren() const; + RegExpList children() const; virtual bool check( ErrorMap&, bool first, bool last ); virtual int precedence() const { return 1;} 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(_tqchildren.at(0)), child ); + addNewConcChild( dynamic_cast(_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 it(_tqchildren); + TQPtrListIterator 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(_tqchildren.at(0)) ); + Q_ASSERT( dynamic_cast(_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(_tqchildren.at(_tqchildren.count()-1)) ) ); + Q_ASSERT( _children.count() == 1 || + ( _children.count() >=3 && + dynamic_cast(_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 it(_tqchildren); + TQPtrListIterator 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 it(_tqchildren); + TQPtrListIterator 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 it(_tqchildren); + TQPtrListIterator 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(_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(_children.at(i)); if (accepter) accepter->setDrawLine( line ); } diff --git a/kregexpeditor/altnwidget.h b/kregexpeditor/altnwidget.h index 519eba5..589726d 100644 --- a/kregexpeditor/altnwidget.h +++ b/kregexpeditor/altnwidget.h @@ -34,7 +34,7 @@ public: AltnWidget( AltnRegExp* regexp, RegExpEditorWindow* editorWindow, TQWidget* parent, const char* name = 0); virtual void addNewChild(DragAccepter *accepter, RegExpWidget *child); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; virtual RegExp* regExp() const; virtual void applyRegExpToSelection( RegExpType type ); virtual RegExpType type() const { return ALTN; } @@ -58,8 +58,8 @@ private: mutable TQSize _textSize; mutable int _maxSelectedWidth; - mutable int _tqchildrenWidth; - mutable int _tqchildrenHeight; + mutable int _childrenWidth; + mutable int _childrenHeight; }; #endif // altnwidget diff --git a/kregexpeditor/auxbuttons.cpp b/kregexpeditor/auxbuttons.cpp index 855f6d1..b56b49b 100644 --- a/kregexpeditor/auxbuttons.cpp +++ b/kregexpeditor/auxbuttons.cpp @@ -26,7 +26,7 @@ #endif #include "auxbuttons.h" -#include +#include #include #include #include @@ -35,48 +35,48 @@ AuxButtons::AuxButtons( TQWidget* parent, const char* name = 0) :TQDockWindow( TQDockWindow::InDock, parent, name) { - TQBoxLayout* tqlayout = boxLayout(); + TQBoxLayout* layout = boxLayout(); _undo = new TQToolButton( this ); - _undo->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("undo") ) ); - tqlayout->addWidget( _undo ); + _undo->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("undo") ) ); + layout->addWidget( _undo ); connect( _undo, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(undo()) ); TQToolTip::add( _undo, i18n( "Undo" ) ); _redo = new TQToolButton( this ); - _redo->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("redo") ) ); - tqlayout->addWidget( _redo ); + _redo->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("redo") ) ); + layout->addWidget( _redo ); connect( _redo, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(redo()) ); TQToolTip::add( _redo, i18n( "Redo" ) ); _cut = new TQToolButton( this ); - _cut->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("editcut") ) ); - tqlayout->addWidget( _cut ); + _cut->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("editcut") ) ); + layout->addWidget( _cut ); connect( _cut, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(cut()) ); TQToolTip::add( _cut, i18n( "Cut" ) ); _copy = new TQToolButton( this ); - _copy->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("editcopy") ) ); - tqlayout->addWidget( _copy ); + _copy->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("editcopy") ) ); + layout->addWidget( _copy ); connect( _copy, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(copy()) ); TQToolTip::add( _copy, i18n( "Copy" ) ); _paste = new TQToolButton( this ); - _paste->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("editpaste")) ); - tqlayout->addWidget( _paste ); + _paste->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("editpaste")) ); + layout->addWidget( _paste ); connect( _paste, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(paste()) ); TQToolTip::add( _paste, i18n( "Paste" ) ); _save = new TQToolButton( this ); - _save->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("filesave")) ); - tqlayout->addWidget( _save ); + _save->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("filesave")) ); + layout->addWidget( _save ); connect( _save, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(save()) ); TQToolTip::add( _save, i18n( "Save" ) ); TQToolButton* button = new TQToolButton(this); - button->setPixmap( Util::getSystemIcon( TQString::tqfromLatin1("contexthelp") ) ); - tqlayout->addWidget( button ); + button->setPixmap( Util::getSystemIcon( TQString::fromLatin1("contexthelp") ) ); + layout->addWidget( button ); connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEnterWhatsThis())); _undo->setEnabled( false ); diff --git a/kregexpeditor/characterswidget.cpp b/kregexpeditor/characterswidget.cpp index 227f605..3926260 100644 --- a/kregexpeditor/characterswidget.cpp +++ b/kregexpeditor/characterswidget.cpp @@ -60,7 +60,7 @@ CharactersWidget::~CharactersWidget() } -TQSize CharactersWidget::tqsizeHint() const +TQSize CharactersWidget::sizeHint() const { TQFontMetrics metrics = fontMetrics(); _textSize = HackCalculateFontSize(metrics, title()); @@ -78,7 +78,7 @@ TQSize CharactersWidget::tqsizeHint() const void CharactersWidget::paintEvent(TQPaintEvent *e) { - TQSize mySize = tqsizeHint(); + TQSize mySize = sizeHint(); TQPainter painter(this); drawPossibleSelection( painter, mySize ); @@ -118,7 +118,7 @@ RegExp* CharactersWidget::regExp() const TQString CharactersWidget::text() const { - TQString res = TQString::tqfromLatin1(""); + TQString res = TQString::fromLatin1(""); if (_regexp->wordChar()) res += i18n("- A word character\n"); @@ -186,8 +186,8 @@ int CharactersWidget::edit() TQApplication::restoreOverrideCursor(); } - _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->tqsizeHint().width()/2, - _configWindow->tqsizeHint().height()/2)); + _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->sizeHint().width()/2, + _configWindow->sizeHint().height()/2)); int ret = _configWindow->exec(_regexp ); if ( ret == TQDialog::Accepted ) { _editorWindow->updateContent( 0 ); @@ -380,10 +380,10 @@ void CharacterEdits::slotOK() SingleEntry::SingleEntry(TQWidget* parent, const char* name ) :KMultiFormListBoxEntry( parent, name ) { - TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 3, 6 ); + TQHBoxLayout* layout = new TQHBoxLayout( this, 3, 6 ); _selector = new CharSelector( this ); - tqlayout->addWidget( _selector ); - tqlayout->addStretch(1); + layout->addWidget( _selector ); + layout->addStretch(1); } TQString SingleEntry::text() const @@ -405,19 +405,19 @@ bool SingleEntry::isEmpty() const RangeEntry::RangeEntry(TQWidget* parent, const char* name ) :KMultiFormListBoxEntry( parent, name ) { - TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 3, 6 ); + TQHBoxLayout* layout = new TQHBoxLayout( this, 3, 6 ); TQLabel* label = new TQLabel(i18n("From:"), this ); _from = new CharSelector( this ); - tqlayout->addWidget( label ); - tqlayout->addWidget( _from ); + layout->addWidget( label ); + layout->addWidget( _from ); - tqlayout->addStretch(1); + layout->addStretch(1); label = new TQLabel(i18n("end of range","To:"), this ); _to = new CharSelector( this ); - tqlayout->addWidget( label ); - tqlayout->addWidget( _to ); + layout->addWidget( label ); + layout->addWidget( _to ); } TQString RangeEntry::fromText() const diff --git a/kregexpeditor/characterswidget.h b/kregexpeditor/characterswidget.h index ccc8852..576e6f1 100644 --- a/kregexpeditor/characterswidget.h +++ b/kregexpeditor/characterswidget.h @@ -46,7 +46,7 @@ public: CharactersWidget( TextRangeRegExp* regexp, RegExpEditorWindow* editorWindow, TQWidget* parent, const char* name = 0 ); ~CharactersWidget(); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; virtual RegExp* regExp() const; virtual RegExpType type() const { return CHARSET; } virtual RegExpWidget* findWidgetToEdit( TQPoint globalPos ); diff --git a/kregexpeditor/charselector.cpp b/kregexpeditor/charselector.cpp index 5f60475..0434281 100644 --- a/kregexpeditor/charselector.cpp +++ b/kregexpeditor/charselector.cpp @@ -26,7 +26,7 @@ #include "charselector.h" #include "limitedcharlineedit.h" #include "regexpconverter.h" -#include +#include #include #include @@ -43,10 +43,10 @@ class StackContainer :public TQWidget public: StackContainer( TQWidget* child, TQWidget* parent ) : TQWidget( parent ) { - TQHBoxLayout* tqlayout = new TQHBoxLayout( this ); + TQHBoxLayout* layout = new TQHBoxLayout( this ); child->reparent( this, TQPoint(0,0), false ); - tqlayout->addWidget( child ); - tqlayout->addStretch( 1 ); + layout->addWidget( child ); + layout->addStretch( 1 ); } }; @@ -54,13 +54,13 @@ CharSelector::CharSelector( TQWidget* parent, const char* name ) :TQWidget( parent, name ), _oldIndex(0) { TQStringList items; - TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 0, 6 ); + TQHBoxLayout* layout = new TQHBoxLayout( this, 0, 6 ); _type = new TQComboBox( this, "_type" ); items << i18n("Normal Character") << i18n("Unicode Char in Hex.") << i18n("Unicode Char in Oct.") - << TQString::tqfromLatin1("----") + << TQString::fromLatin1("----") << i18n("The Bell Character (\\a)") << i18n("The Form Feed Character (\\f)") << i18n("The Line Feed Character (\\n)") @@ -68,10 +68,10 @@ CharSelector::CharSelector( TQWidget* parent, const char* name ) << i18n("TheQt::Horizontal Tab Character (\\t)") << i18n("TheQt::Vertical Tab Character (\\v)"); _type->insertStringList( items ); - tqlayout->addWidget( _type ); + layout->addWidget( _type ); _stack = new TQWidgetStack( this, "_stack" ); - tqlayout->addWidget( _stack ); + layout->addWidget( _stack ); _normal = new LimitedCharLineEdit( LimitedCharLineEdit::NORMAL, 0, "_normal" ); _stack->addWidget( new StackContainer( _normal, _stack ), 0 ); @@ -169,17 +169,17 @@ TQString CharSelector::text() const case 3: // The seperator break; case 4: - return TQString::tqfromLatin1("\\a"); + return TQString::fromLatin1("\\a"); case 5: - return TQString::tqfromLatin1("\\f"); + return TQString::fromLatin1("\\f"); case 6: - return TQString::tqfromLatin1("\\n"); + return TQString::fromLatin1("\\n"); case 7: - return TQString::tqfromLatin1("\\r"); + return TQString::fromLatin1("\\r"); case 8: - return TQString::tqfromLatin1("\\t"); + return TQString::fromLatin1("\\t"); case 9: - return TQString::tqfromLatin1("\\v"); + return TQString::fromLatin1("\\v"); } return TQString(); } diff --git a/kregexpeditor/compoundwidget.cpp b/kregexpeditor/compoundwidget.cpp index c43dcbb..cb60152 100644 --- a/kregexpeditor/compoundwidget.cpp +++ b/kregexpeditor/compoundwidget.cpp @@ -26,7 +26,7 @@ #endif #include "compoundwidget.h" -#include +#include #include #include #include @@ -40,8 +40,8 @@ CompoundDetailWindow::CompoundDetailWindow( TQWidget* parent, const char* name ) :TQWidget( parent, name ) { - TQVBoxLayout* tqlayout = new TQVBoxLayout( this ); - tqlayout->setAutoAdd( true ); + TQVBoxLayout* layout = new TQVBoxLayout( this ); + layout->setAutoAdd( true ); TQLabel* label = new TQLabel( i18n("&Title:"), this); _title = new TQLineEdit( this ); @@ -135,10 +135,10 @@ void CompoundWidget::init( ) _backRefId = -1; } -TQSize CompoundWidget::tqsizeHint() const +TQSize CompoundWidget::sizeHint() const { TQFontMetrics metrics = fontMetrics(); - _childSize = _child->tqsizeHint(); + _childSize = _child->sizeHint(); _textSize = metrics.size( 0, _content->title() ); int width, height; @@ -164,7 +164,7 @@ TQSize CompoundWidget::tqsizeHint() const void CompoundWidget::paintEvent( TQPaintEvent *e ) { - TQSize mySize = tqsizeHint(); + TQSize mySize = sizeHint(); TQPainter painter(this); drawPossibleSelection( painter, mySize); @@ -220,8 +220,8 @@ void CompoundWidget::paintEvent( TQPaintEvent *e ) } else { TQSize curSize = _child->size(); - TQSize newSize = TQSize( TQMAX( _child->tqsizeHint().width(), mySize.width()-2*pw), - _child->tqsizeHint().height()); + TQSize newSize = TQSize( TQMAX( _child->sizeHint().width(), mySize.width()-2*pw), + _child->sizeHint().height()); _child->move( pw, childY ); if ( curSize != newSize ) { @@ -247,7 +247,7 @@ void CompoundWidget::slotConfigCanceled() TQDataStream stream( _backup, IO_ReadOnly ); KWidgetStreamer streamer; streamer.fromStream( stream, TQT_TQOBJECT(_content) ); - tqrepaint(); + repaint(); } RegExp* CompoundWidget::regExp() const @@ -273,7 +273,7 @@ void CompoundWidget::mouseReleaseEvent( TQMouseEvent* event) TQRect( _pixmapPos, _pixmapSize ).contains( event->pos() ) ) { _hidden = !_hidden; _editorWindow->updateContent( 0 ); - tqrepaint(); // is this necesary? + repaint(); // is this necesary? _editorWindow->emitChange(); } else @@ -286,7 +286,7 @@ bool CompoundWidget::updateSelection( bool parentSelected ) bool changed = RegExpWidget::updateSelection( parentSelected ); _child->selectWidget( _isSelected ); if (changed) - tqrepaint(); + repaint(); return changed; } else { @@ -296,8 +296,8 @@ bool CompoundWidget::updateSelection( bool parentSelected ) int CompoundWidget::edit() { - _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->tqsizeHint().width()/2, - _configWindow->tqsizeHint().height()/2) ); + _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->sizeHint().width()/2, + _configWindow->sizeHint().height()/2) ); TQDataStream stream( _backup, IO_WriteOnly ); KWidgetStreamer streamer; streamer.toStream( TQT_TQOBJECT(_content), stream ); diff --git a/kregexpeditor/compoundwidget.h b/kregexpeditor/compoundwidget.h index 047f942..ad16de8 100644 --- a/kregexpeditor/compoundwidget.h +++ b/kregexpeditor/compoundwidget.h @@ -69,7 +69,7 @@ public: TQWidget* parent, const char* name = 0); virtual bool updateSelection( bool parentSelected ); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; virtual RegExp* regExp() const; virtual RegExpType type() const { return COMPOUND; } virtual int edit(); diff --git a/kregexpeditor/concregexp.cpp b/kregexpeditor/concregexp.cpp index 1c8421d..cefbac4 100644 --- a/kregexpeditor/concregexp.cpp +++ b/kregexpeditor/concregexp.cpp @@ -29,7 +29,7 @@ void ConcRegExp::addRegExp( RegExp *regExp ) addChild( regExp ); } -RegExpList ConcRegExp::tqchildren() +RegExpList ConcRegExp::children() { return list; } diff --git a/kregexpeditor/concregexp.h b/kregexpeditor/concregexp.h index 15a0a66..47e3b26 100644 --- a/kregexpeditor/concregexp.h +++ b/kregexpeditor/concregexp.h @@ -31,7 +31,7 @@ public: ConcRegExp( bool selected ); void addRegExp( RegExp *); - RegExpList tqchildren(); + RegExpList children(); RegExp* lastRegExp(); virtual bool check( ErrorMap&, bool first, bool last ); diff --git a/kregexpeditor/concwidget.cpp b/kregexpeditor/concwidget.cpp index 16690be..8cbff9e 100644 --- a/kregexpeditor/concwidget.cpp +++ b/kregexpeditor/concwidget.cpp @@ -28,7 +28,7 @@ ConcWidget::ConcWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, init(); DragAccepter *accepter = new DragAccepter(editorWindow, this); accepter->show(); - _tqchildren.append(accepter); + _children.append(accepter); } @@ -38,7 +38,7 @@ ConcWidget::ConcWidget(RegExpEditorWindow* editorWindow, RegExpWidget *child, { init(); DragAccepter *accepter = new DragAccepter(editorWindow, this); - _tqchildren.append(accepter); + _children.append(accepter); child->reparent(this, TQPoint(0,0), false); addNewChild(accepter, child); } @@ -48,13 +48,13 @@ ConcWidget::ConcWidget( RegExpEditorWindow* editorWindow, ConcWidget* origConc, :MultiContainerWidget(editorWindow, 0, "Splitted ConcWidget") { init(); - _tqchildren.prepend( new DragAccepter(editorWindow, this) ); + _children.prepend( new DragAccepter(editorWindow, this) ); for (unsigned int i = end; i >= start; i--) { - RegExpWidget* child = origConc->_tqchildren.take( i ); - _tqchildren.prepend( child ); + RegExpWidget* child = origConc->_children.take( i ); + _children.prepend( child ); child->reparent( this, TQPoint(0,0), false); } - _tqchildren.prepend( new DragAccepter(editorWindow, this) ); + _children.prepend( new DragAccepter(editorWindow, this) ); } ConcWidget::ConcWidget( ConcRegExp* regexp, RegExpEditorWindow* editorWindow, @@ -63,9 +63,9 @@ ConcWidget::ConcWidget( ConcRegExp* regexp, RegExpEditorWindow* editorWindow, { init(); DragAccepter *accepter = new DragAccepter(editorWindow, this); - _tqchildren.append(accepter); + _children.append(accepter); - RegExpList list = regexp->tqchildren(); + RegExpList list = regexp->children(); for ( RegExpListIt it(list); *it; ++it ) { RegExpWidget* child = WidgetFactory::createWidget( *it, editorWindow, this ); append( child ); @@ -78,35 +78,35 @@ void ConcWidget::init() } -TQSize ConcWidget::tqsizeHint() const +TQSize ConcWidget::sizeHint() const { - int tqchildrenWidth = 0; - int tqchildrenHeight = 0; - TQPtrListIterator it(_tqchildren); + int childrenWidth = 0; + int childrenHeight = 0; + TQPtrListIterator it(_children); for ( ; *it; ++it) { - TQSize thisChildSize = (*it)->tqsizeHint(); - tqchildrenWidth += thisChildSize.width(); - tqchildrenHeight = TQMAX(tqchildrenHeight, thisChildSize.height()); + TQSize thisChildSize = (*it)->sizeHint(); + childrenWidth += thisChildSize.width(); + childrenHeight = TQMAX(childrenHeight, thisChildSize.height()); } - return TQSize(tqchildrenWidth, tqchildrenHeight); + return TQSize(childrenWidth, childrenHeight); } void ConcWidget::paintEvent( TQPaintEvent *e) { - Q_ASSERT( dynamic_cast(_tqchildren.at(0)) ); + Q_ASSERT( dynamic_cast(_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(_tqchildren.at(_tqchildren.count()-1)) ) ); + Q_ASSERT( _children.count() == 1 || + ( _children.count() >=3 && + dynamic_cast(_children.at(_children.count()-1)) ) ); - if ( _tqchildren.count() == 1) { + if ( _children.count() == 1) { // There is only an accepter, lets give it all the space. - _tqchildren.at(0)->setGeometry( 0, 0, size().width(), size().height() ); + _children.at(0)->setGeometry( 0, 0, size().width(), size().height() ); } else { - TQSize myReqSize = tqsizeHint(); + TQSize myReqSize = sizeHint(); TQSize mySize(TQMAX(myReqSize.width(), size().width()), TQMAX(myReqSize.height(), size().height())); @@ -125,18 +125,18 @@ void ConcWidget::paintEvent( TQPaintEvent *e) int lastHeight = 0; int offset = 0; - for (unsigned int i = 1; i < _tqchildren.count(); i += 2 ) { - DragAccepter* accepter = dynamic_cast(_tqchildren.at(i-1)); + for (unsigned int i = 1; i < _children.count(); i += 2 ) { + DragAccepter* accepter = dynamic_cast(_children.at(i-1)); if (!accepter) continue; - RegExpWidget* child = _tqchildren.at(i); + RegExpWidget* child = _children.at(i); - TQSize childSize = child->tqsizeHint(); + TQSize childSize = child->sizeHint(); TQSize curChildSize = child->size(); //----------------------------- first place the accepter int x = offset; - int w = accepter->tqsizeHint().width(); + int w = accepter->sizeHint().width(); if ( i == 1 ) w+= extra; int h = TQMAX( lastHeight, childSize.height() ); int y = (mySize.height() - h)/2; @@ -176,11 +176,11 @@ void ConcWidget::paintEvent( TQPaintEvent *e) //---------------------- Finally place the last accepter. DragAccepter* accepter = - dynamic_cast(_tqchildren.at(_tqchildren.count()-1)); + dynamic_cast(_children.at(_children.count()-1)); // dynamic_cast is ASSERTed at top int x = offset; int h = lastHeight; - int w = accepter->tqsizeHint().width() + extra; + int w = accepter->sizeHint().width() + extra; int y = (mySize.height()-h)/2; accepter->setGeometry( x, y, w, h ); } @@ -212,10 +212,10 @@ void ConcWidget::sizeAccepter( DragAccepter* accepter, int height, int totHeight RegExp* ConcWidget::regExp() const { - TQPtrListIterator it( _tqchildren ); + TQPtrListIterator it( _children ); ++it; // start with the second element. - if ( _tqchildren.count() == 3 ) { + if ( _children.count() == 3 ) { // Exactly one child (and two drag accepters) return (*it)->regExp(); } @@ -236,17 +236,17 @@ bool ConcWidget::updateSelection(bool parentSelected) _maxSelectedHeight = 0; - TQPtrListIterator it(_tqchildren); + TQPtrListIterator it(_children); ++it; // Skip past the first DragAccepter for ( ; *it; it +=2 ) { if ( (*it)->isSelected() ) { - _maxSelectedHeight = TQMAX( _maxSelectedHeight, (*it)->tqsizeHint().height() ); + _maxSelectedHeight = TQMAX( _maxSelectedHeight, (*it)->sizeHint().height() ); } } changed = changed || isSel != _isSelected; if ( changed ) { - tqrepaint(); + repaint(); } return changed; @@ -259,8 +259,8 @@ void ConcWidget::getSelectionIndexes( int* start, int* end ) // Start with element at index 1, and skip every second element, as we // know they are dragAccepters. - for ( unsigned int index = 1; index< _tqchildren.count(); index += 2 ) { - RegExpWidget* child = _tqchildren.at(index); + for ( unsigned int index = 1; index< _children.count(); index += 2 ) { + RegExpWidget* child = _children.at(index); if ( child->isSelected() ) { // The child is selected at topmost level. @@ -276,7 +276,7 @@ void ConcWidget::getSelectionIndexes( int* start, int* end ) } if ( *start != -1 && *end == -1 ) - *end = _tqchildren.count() -2; + *end = _children.count() -2; } void ConcWidget::applyRegExpToSelection( RegExpType type ) @@ -287,7 +287,7 @@ void ConcWidget::applyRegExpToSelection( RegExpType type ) if ( start == -1 ) { // No item selected at top level - TQPtrListIterator it(_tqchildren); + TQPtrListIterator it(_children); ++it; // Skip past the first DragAccepter for ( ; *it ; it += 2 ) { if ( (*it)->hasSelection() ) { @@ -307,7 +307,7 @@ void ConcWidget::applyRegExpToSelection( RegExpType type ) subSequence->resize(0,0); // see note (1) subSequence->reparent( newElm, TQPoint(0,0), false); - _tqchildren.insert( start, newElm ); + _children.insert( start, newElm ); newElm->show(); } } @@ -318,7 +318,7 @@ bool ConcWidget::isSelected() const // A ConcWidget should be considered selected when all its elements has been selected // otherwise empty ConcWidgets may be left behind when for example selection is deleted. bool allSelected = true; - TQPtrListIterator it(_tqchildren); + TQPtrListIterator it(_children); ++it; // Skip past first DragAccepter. for ( ; *it && allSelected; it += 2 ) { allSelected = allSelected && (*it)->isSelected(); @@ -336,7 +336,7 @@ RegExp* ConcWidget::selection() const bool foundMoreThanOne = false; RegExp* regexp = 0; - TQPtrListIterator it(_tqchildren); + TQPtrListIterator it(_children); ++it; // Skip past the first DragAccepter for ( ; (*it) ; it += 2 ) { if ( (*it)->hasSelection() ) { @@ -363,21 +363,21 @@ RegExp* ConcWidget::selection() const void ConcWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *other) { - for ( unsigned int i=0; i<_tqchildren.count(); i+= 2 ) { - RegExpWidget *ch = _tqchildren.at( i ); + for ( unsigned int i=0; i<_children.count(); i+= 2 ) { + RegExpWidget *ch = _children.at( i ); if ( ch == accepter ) { // Move all the element from the `child' ConcWidget to this one. // Do not copy the first one as this is a dragAccepter, and we place the widgets // after this drag accepter. // We must take them in pairs to avoid breaking the invariant for paintEvent, // namely that every second element is a dragAccepter - for ( unsigned int j = other->_tqchildren.count()-1; j > 0 ; j-=2 ) { - RegExpWidget* newChildA = other->_tqchildren.take(j); + for ( unsigned int j = other->_children.count()-1; j > 0 ; j-=2 ) { + RegExpWidget* newChildA = other->_children.take(j); newChildA->reparent( this, TQPoint(0,0), false); - _tqchildren.insert( i+1, newChildA ); - RegExpWidget* newChildB = other->_tqchildren.take(j-1); + _children.insert( i+1, newChildA ); + RegExpWidget* newChildB = other->_children.take(j-1); newChildB->reparent( this, TQPoint(0,0), false); - _tqchildren.insert( i+1, newChildB ); + _children.insert( i+1, newChildB ); newChildA->show(); newChildB->show(); } @@ -391,7 +391,7 @@ void ConcWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *other) bool ConcWidget::validateSelection() const { bool cont = true; - TQPtrListIterator it(_tqchildren); + TQPtrListIterator it(_children); ++it; // skip past the DragAccepter. for ( ; *it && cont; it += 2 ) { cont = (*it)->validateSelection(); diff --git a/kregexpeditor/concwidget.h b/kregexpeditor/concwidget.h index bff85a7..9a4820c 100644 --- a/kregexpeditor/concwidget.h +++ b/kregexpeditor/concwidget.h @@ -40,7 +40,7 @@ public: TQWidget* parent, const char* name = 0); void init(); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; virtual RegExp* regExp() const; virtual bool updateSelection(bool parentSelected); virtual bool isSelected() const; @@ -52,7 +52,7 @@ public: virtual bool validateSelection() const; virtual bool acceptWidgetInsert( RegExpType ) const { return false; } virtual bool acceptWidgetPaste() const { return false; } - bool hasAnyChildren() { return _tqchildren.count() > 1; } + bool hasAnyChildren() { return _children.count() > 1; } protected: virtual void paintEvent( TQPaintEvent *e ); diff --git a/kregexpeditor/drag.cpp b/kregexpeditor/drag.cpp index 9c2b1ca..e17973c 100644 --- a/kregexpeditor/drag.cpp +++ b/kregexpeditor/drag.cpp @@ -39,7 +39,7 @@ bool RegExpWidgetDrag::canDecode( TQDragMoveEvent* event ) RegExpWidget* RegExpWidgetDrag::decode(TQDropEvent* event, RegExpEditorWindow* window, TQWidget* parent) { - TQByteArray payload = event->tqencodedData("KRegExpEditor/widgetdrag" ); + TQByteArray payload = event->encodedData("KRegExpEditor/widgetdrag" ); TQTextStream stream( payload, IO_ReadOnly ); TQString str = stream.read(); RegExp* regexp = WidgetFactory::createRegExp( str ); @@ -58,7 +58,7 @@ const char * RegExpWidgetDrag::format ( int i ) const return 0; } -TQByteArray RegExpWidgetDrag::tqencodedData ( const char* format ) const +TQByteArray RegExpWidgetDrag::encodedData ( const char* format ) const { TQByteArray data; TQTextStream stream( data, IO_WriteOnly ); diff --git a/kregexpeditor/drag.h b/kregexpeditor/drag.h index 699d1e8..e32b02e 100644 --- a/kregexpeditor/drag.h +++ b/kregexpeditor/drag.h @@ -34,7 +34,7 @@ public: RegExpWidgetDrag( RegExp* regexp , TQWidget* dragSource); ~RegExpWidgetDrag(); virtual const char * format ( int i = 0 ) const; - virtual TQByteArray tqencodedData ( const char * ) const; + virtual TQByteArray encodedData ( const char * ) const; static bool canDecode(TQDragMoveEvent* event); static RegExpWidget* decode(TQDropEvent* event, RegExpEditorWindow* window, TQWidget* parent); diff --git a/kregexpeditor/dragaccepter.cpp b/kregexpeditor/dragaccepter.cpp index 6bd049e..f336dbd 100644 --- a/kregexpeditor/dragaccepter.cpp +++ b/kregexpeditor/dragaccepter.cpp @@ -28,7 +28,7 @@ DragAccepter::DragAccepter(RegExpEditorWindow* editorWindow, RegExpWidget *paren setAcceptDrops(TRUE); } -TQSize DragAccepter::tqsizeHint() const +TQSize DragAccepter::sizeHint() const { return TQSize(10,10); } @@ -100,7 +100,7 @@ void DragAccepter::mouseReleaseEvent( TQMouseEvent* event ) void DragAccepter::dragEnterEvent(TQDragEnterEvent *event) { - bool selfDrag = ( event->source() && event->source()->tqtopLevelWidget() == tqtopLevelWidget() && _isSelected ); + bool selfDrag = ( event->source() && event->source()->topLevelWidget() == topLevelWidget() && _isSelected ); event->accept(RegExpWidgetDrag::canDecode( event ) && !selfDrag ); } @@ -124,7 +124,7 @@ void DragAccepter::dropEvent(TQDropEvent *event) w->update(); _editorWindow->updateContent( this ); - bool selfDrag = ( event->source() && event->source()->tqtopLevelWidget() == tqtopLevelWidget() ); + bool selfDrag = ( event->source() && event->source()->topLevelWidget() == topLevelWidget() ); if ( ! selfDrag ) _editorWindow->clearSelection( true ); else { diff --git a/kregexpeditor/dragaccepter.h b/kregexpeditor/dragaccepter.h index a3737d9..c9c6fd8 100644 --- a/kregexpeditor/dragaccepter.h +++ b/kregexpeditor/dragaccepter.h @@ -32,7 +32,7 @@ class DragAccepter :public RegExpWidget public: DragAccepter(RegExpEditorWindow* editorWindow, RegExpWidget *parent, const char *name = 0); - TQSize tqsizeHint() const; + TQSize sizeHint() const; virtual RegExp* regExp() const; virtual RegExpType type() const { return DRAGACCEPTER; } void setDrawLine( bool drawLine ) { _drawLine = drawLine; } diff --git a/kregexpeditor/editorwindow.cpp b/kregexpeditor/editorwindow.cpp index 8e3cc20..0ba9367 100644 --- a/kregexpeditor/editorwindow.cpp +++ b/kregexpeditor/editorwindow.cpp @@ -31,11 +31,11 @@ #include "editorwindow.h" #include "concwidget.h" -#include +#include #include #include #include -#include +#include #include #include "regexp.h" #include "userdefinedregexps.h" @@ -209,8 +209,8 @@ void RegExpEditorWindow::slotDoSelect() _pasteInAction = false; _insertInAction = false; - // I need to update the cursor recursively, as a tqrepaint may not have been issued yet - // when this method is invoked. This means that when the tqrepaint comes, the cursor may + // I need to update the cursor recursively, as a repaint may not have been issued yet + // when this method is invoked. This means that when the repaint comes, the cursor may // move to an other widget. _top->updateCursorRecursively(); } @@ -236,9 +236,9 @@ void RegExpEditorWindow::updateContent( TQWidget* focusChild) emit contentChanged( p ); } -TQSize RegExpEditorWindow::tqsizeHint() const +TQSize RegExpEditorWindow::sizeHint() const { - return _top->tqsizeHint(); + return _top->sizeHint(); } void RegExpEditorWindow::paintEvent( TQPaintEvent* event ) @@ -289,7 +289,7 @@ void RegExpEditorWindow::cutCopyAux( TQPoint pos ) RegExpWidgetDrag *clipboardData = new RegExpWidgetDrag( regexp, this ); delete regexp; - TQClipboard* clipboard = tqApp->tqclipboard(); + TQClipboard* clipboard = tqApp->clipboard(); clipboard->setData( clipboardData ); emit anythingOnClipboard( true ); emit canSave( _top->hasAnyChildren() ); @@ -298,7 +298,7 @@ void RegExpEditorWindow::cutCopyAux( TQPoint pos ) void RegExpEditorWindow::slotStartPasteAction() { - TQByteArray data = tqApp->tqclipboard()->data()->tqencodedData( "KRegExpEditor/widgetdrag" ); + TQByteArray data = tqApp->clipboard()->data()->encodedData( "KRegExpEditor/widgetdrag" ); TQTextStream stream( data, IO_ReadOnly ); TQString str = stream.read(); @@ -335,7 +335,7 @@ void RegExpEditorWindow::showRMBMenu( bool enableCutCopy ) _menu->setItemEnabled( CUT, enableCutCopy ); _menu->setItemEnabled( COPY, enableCutCopy ); - if ( ! tqApp->tqclipboard()->data()->provides( "KRegExpEditor/widgetdrag" ) ) + if ( ! tqApp->clipboard()->data()->provides( "KRegExpEditor/widgetdrag" ) ) _menu->setItemEnabled( PASTE, false ); else _menu->setItemEnabled( PASTE, true ); @@ -383,14 +383,14 @@ void RegExpEditorWindow::slotSave() TQString fileName = dir + TQString::fromLocal8Bit("/") + txt + TQString::fromLocal8Bit(".regexp"); TQFileInfo finfo( fileName ); if ( finfo.exists() ) { - int answer = KMessageBox::warningContinueCancel( this, i18n("

Overwrite named regular expression %1

").tqarg(txt), TQString(), i18n("Overwrite")); + int answer = KMessageBox::warningContinueCancel( this, i18n("

Overwrite named regular expression %1

").arg(txt), TQString(), i18n("Overwrite")); if ( answer != KMessageBox::Continue ) return; } TQFile file( fileName ); if ( ! file.open(IO_WriteOnly) ) { - KMessageBox::sorry( this, i18n("Could not open file for writing: %1").tqarg(fileName) ); + KMessageBox::sorry( this, i18n("Could not open file for writing: %1").arg(fileName) ); return; } @@ -431,7 +431,7 @@ void RegExpEditorWindow::updateCursorUnderPoint() { RegExpWidget* widget = _top->widgetUnderPoint( TQCursor::pos(), false ); if ( widget ) - widget->updatetqCursorShape(); + widget->updateCursorShape(); } void RegExpEditorWindow::emitVerifyRegExp() diff --git a/kregexpeditor/editorwindow.h b/kregexpeditor/editorwindow.h index 58377c6..0d20597 100644 --- a/kregexpeditor/editorwindow.h +++ b/kregexpeditor/editorwindow.h @@ -110,7 +110,7 @@ public: */ void showRMBMenu( bool enableCutCopy ); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; public slots: @@ -232,7 +232,7 @@ private: /** This points to the top @ref RegExpWidget in the editor window. */ ConcWidget *_top; - /** This points to the tqlayout manager for the editor window */ + /** This points to the layout manager for the editor window */ TQHBoxLayout* _layout; /** Start point and last point draw. Used when doing rubber band selection */ diff --git a/kregexpeditor/emacsregexpconverter.cpp b/kregexpeditor/emacsregexpconverter.cpp index 0d0f6d4..491e989 100644 --- a/kregexpeditor/emacsregexpconverter.cpp +++ b/kregexpeditor/emacsregexpconverter.cpp @@ -40,10 +40,10 @@ TQString EmacsRegExpConverter::toString( AltnRegExp* regexp, bool markSelection TQString res; bool first = true; - RegExpList list = regexp->tqchildren(); + RegExpList list = regexp->children(); for ( RegExpListIt it(list); *it; ++it ) { if ( !first ) { - res += TQString::tqfromLatin1("\\|"); + res += TQString::fromLatin1("\\|"); } first = false; res += toStr( *it, markSelection ); @@ -56,13 +56,13 @@ TQString EmacsRegExpConverter::toString( ConcRegExp* regexp, bool markSelection { TQString res; - RegExpList list = regexp->tqchildren(); + RegExpList list = regexp->children(); for ( RegExpListIt it(list); *it; ++it ) { TQString startPar = TQString::fromLocal8Bit(""); TQString endPar = TQString::fromLocal8Bit(""); if ( (*it)->precedence() < regexp->precedence() ) { - startPar = TQString::tqfromLatin1( "\\(" ); - endPar = TQString::tqfromLatin1( "\\)" ); + startPar = TQString::fromLatin1( "\\(" ); + endPar = TQString::fromLatin1( "\\)" ); } res += startPar + toStr( *it, markSelection ) + endPar; @@ -112,7 +112,7 @@ TQString EmacsRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSel // Now insert the ranges. TQPtrList ranges = regexp->range(); for ( TQPtrListIterator it(ranges); *it; ++it ) { - txt.append((*it)->first()+ TQString::tqfromLatin1("-")+ (*it)->second()); + txt.append((*it)->first()+ TQString::fromLatin1("-")+ (*it)->second()); } // Ok, its time to build each part of the regexp, here comes the rule: @@ -122,20 +122,20 @@ TQString EmacsRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSel // finally if '^' is one of the characters, then it must not be the first // one! - TQString res = TQString::tqfromLatin1("["); + TQString res = TQString::fromLatin1("["); if ( regexp->negate() ) - res.append(TQString::tqfromLatin1("^")); + res.append(TQString::fromLatin1("^")); // a ']' must be the first character in teh range. if ( foundParenthesis ) { - res.append(TQString::tqfromLatin1("]")); + res.append(TQString::fromLatin1("]")); } // a '-' must be the first character ( only coming after a ']') if ( foundDash ) { - res.append(TQString::tqfromLatin1("-")); + res.append(TQString::fromLatin1("-")); } res += txt; @@ -153,7 +153,7 @@ TQString EmacsRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSel res.append( TQChar( '^' ) ); } - res.append(TQString::tqfromLatin1("]")); + res.append(TQString::fromLatin1("]")); return res; } @@ -165,7 +165,7 @@ TQString EmacsRegExpConverter::toString( CompoundRegExp* regexp, bool markSelect TQString EmacsRegExpConverter::toString( DotRegExp* /*regexp*/, bool /*markSelection*/ ) { - return TQString::tqfromLatin1( "." ); + return TQString::fromLatin1( "." ); } TQString EmacsRegExpConverter::toString( PositionRegExp* regexp, bool /*markSelection*/ ) @@ -173,18 +173,18 @@ TQString EmacsRegExpConverter::toString( PositionRegExp* regexp, bool /*markSele static bool haveWarned = false; switch ( regexp->position()) { case PositionRegExp::BEGLINE: - return TQString::tqfromLatin1("^"); + return TQString::fromLatin1("^"); case PositionRegExp::ENDLINE: - return TQString::tqfromLatin1("$"); + return TQString::fromLatin1("$"); case PositionRegExp::WORDBOUNDARY: case PositionRegExp::NONWORDBOUNDARY: if ( ! haveWarned ) { KMessageBox::sorry( 0, i18n( "Word boundary and non word boundary is not supported in Emacs syntax" ) ); haveWarned = true; - return TQString::tqfromLatin1(""); + return TQString::fromLatin1(""); } } - return TQString::tqfromLatin1(""); + return TQString::fromLatin1(""); } TQString EmacsRegExpConverter::toString( RepeatRegExp* regexp, bool markSelection ) @@ -195,8 +195,8 @@ TQString EmacsRegExpConverter::toString( RepeatRegExp* regexp, bool markSelectio TQString endPar; if ( child->precedence() < regexp->precedence() ) { - startPar = TQString::tqfromLatin1( "\\(" ); - endPar = TQString::tqfromLatin1( "\\)" ); + startPar = TQString::fromLatin1( "\\(" ); + endPar = TQString::fromLatin1( "\\)" ); } if (regexp->min() == 0 && regexp->max() == -1) { @@ -209,17 +209,17 @@ TQString EmacsRegExpConverter::toString( RepeatRegExp* regexp, bool markSelectio return startPar + cText + endPar + TQString::fromLocal8Bit("+"); } else { - TQString res = TQString::tqfromLatin1(""); + TQString res = TQString::fromLatin1(""); for ( int i = 0; i < regexp->min(); ++i ) { - res += TQString::tqfromLatin1( "\\(" ) + cText + TQString::tqfromLatin1( "\\)" ); + res += TQString::fromLatin1( "\\(" ) + cText + TQString::fromLatin1( "\\)" ); } if ( regexp->max() != -1 ) { for ( int i = regexp->min(); i < regexp->max(); ++i ) { - res += TQString::tqfromLatin1("\\(") + cText + TQString::tqfromLatin1("\\)?"); + res += TQString::fromLatin1("\\(") + cText + TQString::fromLatin1("\\)?"); } } else - res += TQString::tqfromLatin1("+"); + res += TQString::fromLatin1("+"); return res; } @@ -244,7 +244,7 @@ TQString EmacsRegExpConverter::toString( TextRegExp* regexp, bool /*markSelectio TQString EmacsRegExpConverter::name() { - return TQString::tqfromLatin1( "Emacs" ); + return TQString::fromLatin1( "Emacs" ); } int EmacsRegExpConverter::features() diff --git a/kregexpeditor/errormap.cpp b/kregexpeditor/errormap.cpp index 41a8c00..65ca557 100644 --- a/kregexpeditor/errormap.cpp +++ b/kregexpeditor/errormap.cpp @@ -47,7 +47,7 @@ void ErrorMap::lineStartError() { if ( ! _prevLineStartError ) { KMessageBox::information( 0, i18n("Your regular expression is invalid, due to something preceding a 'line start'."), - i18n("Regular Expression Error"), TQString::tqfromLatin1("KRegExpEditorLineStartError") ); + i18n("Regular Expression Error"), TQString::fromLatin1("KRegExpEditorLineStartError") ); } _lineStartError = true; } @@ -56,7 +56,7 @@ void ErrorMap::lineEndError() { if ( !_prevLineEndError ) { KMessageBox::information( 0, i18n("Your regular expression is invalid, due to something following a 'line end'."), - i18n("Regular Expression Error"), TQString::tqfromLatin1("KRegExpEditorLineEndError") ); + i18n("Regular Expression Error"), TQString::fromLatin1("KRegExpEditorLineEndError") ); } _lineEndError = true; } @@ -66,7 +66,7 @@ void ErrorMap::lookAheadError() { if ( !_prevLookAHeadError ) { KMessageBox::information( 0, i18n("Your regular expression is invalid. 'Look Ahead' regular expression must be the last sub expression."), - i18n("Regular Expression Error"), TQString::tqfromLatin1("KRegExpEditorLookAHeadError") ); + i18n("Regular Expression Error"), TQString::fromLatin1("KRegExpEditorLookAHeadError") ); } _lookAHeadError = true; } diff --git a/kregexpeditor/gen_qregexpparser.cc b/kregexpeditor/gen_qregexpparser.cc index 8a7b5bf..f2ac58a 100644 --- a/kregexpeditor/gen_qregexpparser.cc +++ b/kregexpeditor/gen_qregexpparser.cc @@ -1049,7 +1049,7 @@ yyreduce: yyval.regexp = new AltnRegExp( false ); dynamic_cast( yyval.regexp )->addRegExp( yyvsp[-1].regexp ); } - dynamic_cast( yyval.regexp )->addRegExp( new TextRegExp( false, TQString::tqfromLatin1("") ) ); + dynamic_cast( yyval.regexp )->addRegExp( new TextRegExp( false, TQString::fromLatin1("") ) ); } break; @@ -1057,7 +1057,7 @@ yyreduce: #line 107 "qregexpparser.y" { yyval.regexp = new AltnRegExp( false ); - dynamic_cast( yyval.regexp )->addRegExp( new TextRegExp( false, TQString::tqfromLatin1("") ) ); + dynamic_cast( yyval.regexp )->addRegExp( new TextRegExp( false, TQString::fromLatin1("") ) ); dynamic_cast( yyval.regexp )->addRegExp( yyvsp[0].regexp ); } break; @@ -1160,7 +1160,7 @@ yyreduce: case 23: #line 157 "qregexpparser.y" { - TQString match = TQString(TQString::fromLocal8Bit("\\%1")).tqarg( yyvsp[0].backRef ); + TQString match = TQString(TQString::fromLocal8Bit("\\%1")).arg( yyvsp[0].backRef ); yyval.regexp = new TextRegExp( false, match ); KMessageBox::information(0,i18n("Back reference regular expressions are not supported.

" "\\1, \\2, ... are back references, meaning they refer to " @@ -1170,7 +1170,7 @@ yyreduce: "just a workaround to ensure that the application handles the regexp at all. " "Therefore, as soon as you edit the regular expression in the graphical area, " "the back reference will be replaced by matching the text %2 literally.") - .tqarg( match ).tqarg( match ), + .arg( match ).arg( match ), i18n("Back reference regular expressions not supported"), TQString::fromLocal8Bit("backReferenceNotSupported") ); } @@ -1192,13 +1192,13 @@ yyreduce: if ( yyvsp[0].ch == '{' || yyvsp[0].ch == '}' || yyvsp[0].ch == '[' || yyvsp[0].ch == ']' || yyvsp[0].ch == '\\' ) { yyerror( "illigal character - needs escaping" ); } - yyval.regexp = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg(yyvsp[0].ch)); + yyval.regexp = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).arg(yyvsp[0].ch)); } break; case 27: #line 182 "qregexpparser.y" - { yyval.regexp = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg(yyvsp[0].ch)); } + { yyval.regexp = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).arg(yyvsp[0].ch)); } break; diff --git a/kregexpeditor/infopage.cpp b/kregexpeditor/infopage.cpp index 42d473e..bd192e2 100644 --- a/kregexpeditor/infopage.cpp +++ b/kregexpeditor/infopage.cpp @@ -28,7 +28,7 @@ InfoPage::InfoPage( TQWidget* parent, const char* name ) :KTextBrowser( parent, name ) { TQString txt = - TQString::tqfromLatin1( "" ) + + TQString::fromLatin1( "" ) + i18n( "Translators, feel free to add yourself in the text below, asking for a postcard ;-), " "also feel free to add a section saying

Translators

. " "Kind regards, and thanks for your work - Jesper.", @@ -58,14 +58,14 @@ InfoPage::InfoPage( TQWidget* parent, const char* name ) "

Author

" "Jesper K. Pedersen <blackie@kde.org>") - + TQString::tqfromLatin1( "
" ); + + TQString::fromLatin1( "" ); setText( txt ); } void InfoPage::setSource ( const TQString& name ) { #ifdef TQT_ONLY - mimeSourceFactory()->setFilePath( TQStringList() << TQString::tqfromLatin1("manual/")); + mimeSourceFactory()->setFilePath( TQStringList() << TQString::fromLatin1("manual/")); TQString nm = name; if ( nm.endsWith("/") ) nm = nm.left( nm.length()-1); diff --git a/kregexpeditor/infopage.h b/kregexpeditor/infopage.h index 24796d2..f73e284 100644 --- a/kregexpeditor/infopage.h +++ b/kregexpeditor/infopage.h @@ -20,7 +20,7 @@ #ifdef TQT_ONLY #include "compat.h" - #include + #include #else # include #endif diff --git a/kregexpeditor/kregexpeditorgui.cpp b/kregexpeditor/kregexpeditorgui.cpp index 95c0f25..5260140 100644 --- a/kregexpeditor/kregexpeditorgui.cpp +++ b/kregexpeditor/kregexpeditorgui.cpp @@ -29,7 +29,7 @@ // #include // DO I need this? #include #include "kregexpeditorprivate.h" -#include +#include const TQString KRegExpEditorGUI::version = TQString::fromLocal8Bit("1.0"); @@ -38,9 +38,9 @@ KRegExpEditorGUI::KRegExpEditorGUI(TQWidget *parent, const char *name, const TQStringList & ) : TQWidget( parent, name) { - TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 6 ); + TQHBoxLayout* layout = new TQHBoxLayout( this, 6 ); _editor = new KRegExpEditorPrivate( this, "_editor" ); - tqlayout->addWidget( _editor ); + layout->addWidget( _editor ); connect( _editor, TQT_SIGNAL( canUndo(bool) ), this, TQT_SIGNAL( canUndo(bool) ) ); connect( _editor, TQT_SIGNAL( canRedo(bool) ), this, TQT_SIGNAL( canRedo(bool) ) ); connect( _editor, TQT_SIGNAL( changes(bool) ), this, TQT_SIGNAL( changes(bool) ) ); @@ -74,8 +74,8 @@ KRegExpEditorGUIDialog::KRegExpEditorGUIDialog( TQWidget *parent, parent, name ? name : "KRegExpDialog" ) { TQFrame* frame = plainPage(); - TQVBoxLayout* tqlayout = new TQVBoxLayout( frame, 6 ); - tqlayout->setAutoAdd( true ); + TQVBoxLayout* layout = new TQVBoxLayout( frame, 6 ); + layout->setAutoAdd( true ); _editor = new KRegExpEditorGUI( frame ); connect( _editor, TQT_SIGNAL( canUndo(bool) ), this, TQT_SIGNAL( canUndo(bool) ) ); @@ -117,20 +117,20 @@ void KRegExpEditorGUIDialog::doSomething( TQString method, void* arguments ) void KRegExpEditorGUI::doSomething( TQString method, void* arguments ) { - if ( method == TQString::tqfromLatin1( "setCaseSensitive" ) ) { + if ( method == TQString::fromLatin1( "setCaseSensitive" ) ) { _editor->setCaseSensitive( (bool) arguments ); } - else if ( method == TQString::tqfromLatin1("setMinimal") ) { + else if ( method == TQString::fromLatin1("setMinimal") ) { _editor->setMinimal( (bool) arguments ); } - else if ( method == TQString::tqfromLatin1("setSyntax") ) { + else if ( method == TQString::fromLatin1("setSyntax") ) { _editor->setSyntax( *((TQString*) arguments) ); } - else if ( method == TQString::tqfromLatin1("setAllowNonTQtSyntax") ) { + else if ( method == TQString::fromLatin1("setAllowNonTQtSyntax") ) { _editor->setAllowNonTQtSyntax( (bool) arguments ); } else { - qFatal( "%s", tqtr("Method '%1' is not valid!").tqarg(method).latin1() ); + qFatal( "%s", tqtr("Method '%1' is not valid!").arg(method).latin1() ); } } diff --git a/kregexpeditor/kregexpeditorprivate.cpp b/kregexpeditor/kregexpeditorprivate.cpp index 5d9df7a..08e661e 100644 --- a/kregexpeditor/kregexpeditorprivate.cpp +++ b/kregexpeditor/kregexpeditorprivate.cpp @@ -154,17 +154,17 @@ KRegExpEditorPrivate::KRegExpEditorPrivate(TQWidget *parent, const char *name) // Line Edit - TQHBoxLayout* tqlayout = new TQHBoxLayout( topLayout, 6 ); + TQHBoxLayout* layout = new TQHBoxLayout( topLayout, 6 ); TQLabel* label = new TQLabel( i18n("ASCII syntax:"), this ); - tqlayout->addWidget( label ); + layout->addWidget( label ); clearButton = new TQToolButton( this ); - const TQString icon( TQString::tqfromLatin1( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) ); + const TQString icon( TQString::fromLatin1( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) ); TQIconSet clearIcon = SmallIconSet( icon ); clearButton->setIconSet( clearIcon ); - tqlayout->addWidget( clearButton ); + layout->addWidget( clearButton ); TQToolTip::add( clearButton, i18n("Clear expression") ); _regexpEdit = new TQLineEdit( this ); - tqlayout->addWidget( _regexpEdit ); + layout->addWidget( _regexpEdit ); TQWhatsThis::add( _regexpEdit, i18n( "This is the regular expression in ASCII syntax. You are likely only " "to be interested in this if you are a programmer, and need to " "develop a regular expression using TQRegExp.

" @@ -174,11 +174,11 @@ KRegExpEditorPrivate::KRegExpEditorPrivate(TQWidget *parent, const char *name) #ifdef TQT_ONLY TQPixmap pix( "icons/error.png" ); #else - TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::tqfromLatin1("kregexpeditor/pics/error.png") ), KIcon::Toolbar ); + TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::fromLatin1("kregexpeditor/pics/error.png") ), KIcon::Toolbar ); #endif _error = new TQLabel( this ); _error->setPixmap( pix ); - tqlayout->addWidget( _error ); + layout->addWidget( _error ); _error->hide(); _timer = new TQTimer(this); @@ -196,7 +196,7 @@ KRegExpEditorPrivate::KRegExpEditorPrivate(TQWidget *parent, const char *name) accel->connectItem( accel->insertItem( CTRL+Key_Z ), this, TQT_SLOT( slotUndo() ) ); accel->connectItem( accel->insertItem( CTRL+Key_R ), this, TQT_SLOT( slotRedo() ) ); - setSyntax( TQString::tqfromLatin1( "TQt" ) ); + setSyntax( TQString::fromLatin1( "TQt" ) ); } TQString KRegExpEditorPrivate::regexp() @@ -371,7 +371,7 @@ void KRegExpEditorPrivate::setVerifyText( const TQString& fileName ) _autoVerify = false; TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) { - KMessageBox::sorry(0, i18n("Could not open file '%1' for reading").tqarg( fileName ) ); + KMessageBox::sorry(0, i18n("Could not open file '%1' for reading").arg( fileName ) ); } else { TQTextStream s( &file ); diff --git a/kregexpeditor/limitedcharlineedit.cpp b/kregexpeditor/limitedcharlineedit.cpp index 59a6309..5e494d8 100644 --- a/kregexpeditor/limitedcharlineedit.cpp +++ b/kregexpeditor/limitedcharlineedit.cpp @@ -67,7 +67,7 @@ LimitedCharLineEdit::LimitedCharLineEdit( Mode mode, TQWidget* parent, const cha _count = 4; setMaxLength( _count ); - setFixedSize( fontMetrics().width('A')*5+5, tqsizeHint().height()); + setFixedSize( fontMetrics().width('A')*5+5, sizeHint().height()); setValidator( new Validator( mode, this ) ); } diff --git a/kregexpeditor/lookaheadwidget.cpp b/kregexpeditor/lookaheadwidget.cpp index c5dc700..5ae0b9d 100644 --- a/kregexpeditor/lookaheadwidget.cpp +++ b/kregexpeditor/lookaheadwidget.cpp @@ -60,13 +60,13 @@ RegExp* LookAheadWidget::regExp() const _child->regExp() ); } -TQSize LookAheadWidget::tqsizeHint() const +TQSize LookAheadWidget::sizeHint() const { - // TODO: Merge with RepeatWidget::tqsizeHint + // TODO: Merge with RepeatWidget::sizeHint TQFontMetrics metrics = fontMetrics(); _textSize = metrics.size( 0, _text ); - _childSize = _child->tqsizeHint(); + _childSize = _child->sizeHint(); int height = _textSize.height() + bdSize + _childSize.height() + bdSize + 2*pw; int width = 2 * pw + TQMAX(_childSize.width(), 4*bdSize + _textSize.width()); @@ -76,7 +76,7 @@ TQSize LookAheadWidget::tqsizeHint() const void LookAheadWidget::paintEvent( TQPaintEvent *e ) { // TODO: Merge with RepeatWidget::paintEvent - TQSize mySize = tqsizeHint(); + TQSize mySize = sizeHint(); TQPainter painter(this); drawPossibleSelection( painter, mySize ); diff --git a/kregexpeditor/lookaheadwidget.h b/kregexpeditor/lookaheadwidget.h index 302090a..36c4e42 100644 --- a/kregexpeditor/lookaheadwidget.h +++ b/kregexpeditor/lookaheadwidget.h @@ -32,7 +32,7 @@ public: virtual RegExp* regExp() const; virtual RegExpType type() const { return _tp; } - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; virtual RegExpWidget* findWidgetToEdit( TQPoint globalPos ); diff --git a/kregexpeditor/main.cpp b/kregexpeditor/main.cpp index 58c569d..4df14ca 100644 --- a/kregexpeditor/main.cpp +++ b/kregexpeditor/main.cpp @@ -28,7 +28,7 @@ #endif #include "kregexpeditorgui.h" -#include +#include int main( int argc, char* argv[] ) { @@ -47,7 +47,7 @@ int main( int argc, char* argv[] ) TQVBoxLayout* lay = new TQVBoxLayout( top, 6 ); KRegExpEditorGUI* iface = new KRegExpEditorGUI( top, "_editor", TQStringList() ); - iface->doSomething( TQString::tqfromLatin1("setAllowNonTQtSyntax"), (bool*) true ); + iface->doSomething( TQString::fromLatin1("setAllowNonTQtSyntax"), (bool*) true ); lay->addWidget( iface ); TQHBoxLayout* lay2 = new TQHBoxLayout( lay, 6 ); diff --git a/kregexpeditor/multicontainerwidget.cpp b/kregexpeditor/multicontainerwidget.cpp index d8bef97..bd578d2 100644 --- a/kregexpeditor/multicontainerwidget.cpp +++ b/kregexpeditor/multicontainerwidget.cpp @@ -27,8 +27,8 @@ MultiContainerWidget::MultiContainerWidget( RegExpEditorWindow* editorWindow, void MultiContainerWidget::append( RegExpWidget* child ) { child->reparent( this, TQPoint(0,0), false ); - _tqchildren.append( child ); - _tqchildren.append( new DragAccepter( _editorWindow, this ) ); + _children.append( child ); + _children.append( new DragAccepter( _editorWindow, this ) ); } bool MultiContainerWidget::hasSelection() const @@ -36,7 +36,7 @@ bool MultiContainerWidget::hasSelection() const if ( _isSelected ) return true; - TQPtrListIterator it(_tqchildren); + TQPtrListIterator it(_children); ++it; // Move past the first dragAccepter for ( ; *it; it += 2 ) { if ( (*it)->hasSelection() ) { @@ -49,8 +49,8 @@ bool MultiContainerWidget::hasSelection() const void MultiContainerWidget::clearSelection() { _isSelected = false; - for ( unsigned int i = 0; i< _tqchildren.count(); i++ ) { - _tqchildren.at(i)->clearSelection(); + for ( unsigned int i = 0; i< _children.count(); i++ ) { + _children.at(i)->clearSelection(); } } @@ -58,15 +58,15 @@ void MultiContainerWidget::clearSelection() void MultiContainerWidget::deleteSelection() { // run from the back to the front (which we do since we delete items on the run) - // When deleting tqchildren, delete the drag accepter to its right. - for ( int i = (int) _tqchildren.count()-2; i > 0; i -=2 ) { + // When deleting children, delete the drag accepter to its right. + for ( int i = (int) _children.count()-2; i > 0; i -=2 ) { - RegExpWidget* child = _tqchildren.at( i ); + RegExpWidget* child = _children.at( i ); if ( child->isSelected() ) { - delete _tqchildren.at( i+1 ); - _tqchildren.remove( i+1 ); + delete _children.at( i+1 ); + _children.remove( i+1 ); delete child; - _tqchildren.remove(i); + _children.remove(i); } else if ( child->hasSelection() ) { child->deleteSelection(); @@ -78,16 +78,16 @@ void MultiContainerWidget::deleteSelection() void MultiContainerWidget::addNewChild(DragAccepter *accepter, RegExpWidget *child) { - for ( unsigned int i=0; i<_tqchildren.count(); i+= 2 ) { - RegExpWidget *ch = _tqchildren.at( i ); + for ( unsigned int i=0; i<_children.count(); i+= 2 ) { + RegExpWidget *ch = _children.at( i ); if ( ch == accepter ) { // Insert the new child - _tqchildren.insert( i+1, child ); + _children.insert( i+1, child ); // Insert an accepter as the next element. DragAccepter *accepter = new DragAccepter( _editorWindow, this ); - _tqchildren.insert( i+2, accepter ); + _children.insert( i+2, accepter ); // These two show's must come here otherwise a paintevent // will be invoked, where the invariant, that a accepter is located at @@ -107,11 +107,11 @@ bool MultiContainerWidget::updateSelection(bool parentSelected) { bool changed = false; bool isSel = _isSelected; - TQMemArray oldState(_tqchildren.count()); - TQMemArray newState(_tqchildren.count()); + TQMemArray oldState(_children.count()); + TQMemArray newState(_children.count()); - for (int i = 0; i< (int)_tqchildren.count();i++) { - oldState[i] = _tqchildren.at(i)->isSelected(); + for (int i = 0; i< (int)_children.count();i++) { + oldState[i] = _children.at(i)->isSelected(); } RegExpWidget::updateSelection( parentSelected ); @@ -120,8 +120,8 @@ bool MultiContainerWidget::updateSelection(bool parentSelected) int last; // scan for the first selected item. - for (first = 1; first < (int) _tqchildren.count(); first+= 2 ) { - RegExpWidget* child = _tqchildren.at(first); + for (first = 1; first < (int) _children.count(); first+= 2 ) { + RegExpWidget* child = _children.at(first); changed = child->updateSelection( _isSelected ) || changed; newState[first] = child->isSelected(); if ( child->isSelected() ) @@ -129,8 +129,8 @@ bool MultiContainerWidget::updateSelection(bool parentSelected) } // scan for the last selected item - for (last = _tqchildren.count()-2; last>first; last -= 2) { - RegExpWidget* child = _tqchildren.at(last); + for (last = _children.count()-2; last>first; last -= 2) { + RegExpWidget* child = _children.at(last); changed = child->updateSelection( _isSelected ) || changed; newState[last] = child->isSelected(); if ( child->isSelected() ) @@ -139,17 +139,17 @@ bool MultiContainerWidget::updateSelection(bool parentSelected) // everything between first and last must be selected. for (int j = first+2; jupdateSelection( true ) || changed; newState[j] = true; } // update drag accepters. - for (int k = 0; k< (int) _tqchildren.count(); k+=2) { - RegExpWidget* child = _tqchildren.at(k); + for (int k = 0; k< (int) _children.count(); k+=2) { + RegExpWidget* child = _children.at(k); bool select; - if ( k == 0 || k == (int)_tqchildren.count()-1) { + if ( k == 0 || k == (int)_children.count()-1) { // The elements at the border is only selected if the parent is selected. select = _isSelected; } @@ -164,12 +164,12 @@ bool MultiContainerWidget::updateSelection(bool parentSelected) if (accepter) accepter->_isSelected = select; if ( select != isChildSel ) - child->tqrepaint(); + child->repaint(); } changed = changed || isSel != _isSelected; if ( changed ) { - tqrepaint(); + repaint(); } return changed; @@ -183,7 +183,7 @@ TQRect MultiContainerWidget::selectionRect() const return TQRect( mapToGlobal( TQPoint(0,0) ), size() ); else { TQRect res; - TQPtrListIterator it(_tqchildren); + TQPtrListIterator it(_children); ++it; // Move past the first dragAccepter for ( ; *it; it +=2 ) { if ( (*it)->hasSelection() ) { @@ -216,8 +216,8 @@ RegExpWidget* MultiContainerWidget::widgetUnderPoint( TQPoint globalPos, bool ju incr = 1; } - for ( unsigned int i = start; i < _tqchildren.count(); i+=incr ) { - RegExpWidget* wid = _tqchildren.at(i)->widgetUnderPoint( globalPos, justVisibleWidgets ); + for ( unsigned int i = start; i < _children.count(); i+=incr ) { + RegExpWidget* wid = _children.at(i)->widgetUnderPoint( globalPos, justVisibleWidgets ); if ( wid ) return wid; } @@ -230,8 +230,8 @@ RegExpWidget* MultiContainerWidget::widgetUnderPoint( TQPoint globalPos, bool ju RegExpWidget* MultiContainerWidget::findWidgetToEdit( TQPoint globalPos ) { - for ( unsigned int i = 1; i < _tqchildren.count(); i+=2 ) { - RegExpWidget* wid = _tqchildren.at(i)->findWidgetToEdit( globalPos ); + for ( unsigned int i = 1; i < _children.count(); i+=2 ) { + RegExpWidget* wid = _children.at(i)->findWidgetToEdit( globalPos ); if ( wid ) return wid; } @@ -241,7 +241,7 @@ RegExpWidget* MultiContainerWidget::findWidgetToEdit( TQPoint globalPos ) void MultiContainerWidget::selectWidget( bool sel ) { RegExpWidget::selectWidget( sel ); - TQPtrListIterator it(_tqchildren); + TQPtrListIterator it(_children); for ( ; *it ; ++it ) { (*it)->selectWidget( sel ); } @@ -250,7 +250,7 @@ void MultiContainerWidget::selectWidget( bool sel ) void MultiContainerWidget::updateAll() { - for ( TQPtrListIterator it(_tqchildren); *it ; ++it ) { + for ( TQPtrListIterator it(_children); *it ; ++it ) { (*it)->updateAll(); } RegExpWidget::updateAll(); @@ -258,8 +258,8 @@ void MultiContainerWidget::updateAll() void MultiContainerWidget::updateCursorRecursively() { - for ( TQPtrListIterator it(_tqchildren); *it ; ++it ) { + for ( TQPtrListIterator it(_children); *it ; ++it ) { (*it)->updateCursorRecursively(); } - updatetqCursorShape(); + updateCursorShape(); } diff --git a/kregexpeditor/multicontainerwidget.h b/kregexpeditor/multicontainerwidget.h index 560baa0..4dd6a58 100644 --- a/kregexpeditor/multicontainerwidget.h +++ b/kregexpeditor/multicontainerwidget.h @@ -21,7 +21,7 @@ #include "regexpwidget.h" /** - Abstract RegExp widget class representing widgets having multible tqchildren. + Abstract RegExp widget class representing widgets having multible children. @internal */ class MultiContainerWidget :public RegExpWidget @@ -43,7 +43,7 @@ public: protected: void append( RegExpWidget* child ); - TQPtrList _tqchildren; + TQPtrList _children; }; diff --git a/kregexpeditor/myfontmetrics.cpp b/kregexpeditor/myfontmetrics.cpp index 38eb7dd..05b4ef3 100644 --- a/kregexpeditor/myfontmetrics.cpp +++ b/kregexpeditor/myfontmetrics.cpp @@ -19,7 +19,7 @@ TQSize HackCalculateFontSize(TQFontMetrics fm, TQString str ) { - TQStringList list = TQStringList::split( TQString::tqfromLatin1("\n"), str ); + TQStringList list = TQStringList::split( TQString::fromLatin1("\n"), str ); int maxWidth = 0; int height = 0; for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { diff --git a/kregexpeditor/qregexpparser.y b/kregexpeditor/qregexpparser.y index 6e9dc5e..080dc2c 100644 --- a/kregexpeditor/qregexpparser.y +++ b/kregexpeditor/qregexpparser.y @@ -102,11 +102,11 @@ expression : expression TOK_Bar term { $$ = new AltnRegExp( false ); dynamic_cast( $$ )->addRegExp( $1 ); } - dynamic_cast( $$ )->addRegExp( new TextRegExp( false, QString::tqfromLatin1("") ) ); + dynamic_cast( $$ )->addRegExp( new TextRegExp( false, QString::fromLatin1("") ) ); } | TOK_Bar term { $$ = new AltnRegExp( false ); - dynamic_cast( $$ )->addRegExp( new TextRegExp( false, QString::tqfromLatin1("") ) ); + dynamic_cast( $$ )->addRegExp( new TextRegExp( false, QString::fromLatin1("") ) ); dynamic_cast( $$ )->addRegExp( $2 ); } | TOK_Bar { $$ = new AltnRegExp( false ); } @@ -155,7 +155,7 @@ atom : TOK_LeftParen expression TOK_RightParent { | TOK_Carat { $$ = new PositionRegExp( false, PositionRegExp::BEGLINE ); } | TOK_Dot { $$ = new DotRegExp( false ); } | TOK_BackRef { - QString match = TQString(TQString::fromLocal8Bit("\\%1")).tqarg( $1 ); + QString match = TQString(TQString::fromLocal8Bit("\\%1")).arg( $1 ); $$ = new TextRegExp( false, match ); KMessageBox::information(0,i18n("Back reference regular expressions are not supported.

" "\\1, \\2, ... are back references, meaning they refer to " @@ -165,7 +165,7 @@ atom : TOK_LeftParen expression TOK_RightParent { "just a workaround to ensure that the application handles the regexp at all. " "Therefore, as soon as you edit the regular expression in the graphical area, " "the back reference will be replaced by matching the text %2 literally.") - .tqarg( match ).tqarg( match ), + .arg( match ).arg( match ), i18n("Back reference regular expressions not supported"), QString::fromLocal8Bit("backReferenceNotSupported") ); } @@ -177,9 +177,9 @@ char : TOK_Char { if ( $1 == '{' || $1 == '}' || $1 == '[' || $1 == ']' || $1 == '\\' ) { yyerror( "illigal character - needs escaping" ); } - $$ = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg($1)); + $$ = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).arg($1)); } - | TOK_EscapeChar { $$ = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg($1)); } + | TOK_EscapeChar { $$ = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).arg($1)); } ; %% diff --git a/kregexpeditor/qt-only/compat.h b/kregexpeditor/qt-only/compat.h index cd3d10f..6e8c09f 100644 --- a/kregexpeditor/qt-only/compat.h +++ b/kregexpeditor/qt-only/compat.h @@ -20,7 +20,7 @@ #define COMPAT_H #include #include -#include +#include #include #include #include diff --git a/kregexpeditor/qtregexpconverter.cpp b/kregexpeditor/qtregexpconverter.cpp index 72f9290..c63550b 100644 --- a/kregexpeditor/qtregexpconverter.cpp +++ b/kregexpeditor/qtregexpconverter.cpp @@ -48,14 +48,14 @@ TQString TQtRegExpConverter::toString( AltnRegExp* regexp, bool markSelection ) TQString res; bool first = true; - RegExpList list = regexp->tqchildren(); + RegExpList list = regexp->children(); for ( RegExpListIt it(list); *it; ++it ) { if ( !first ) { - res += TQString::tqfromLatin1( "|" ); + res += TQString::fromLatin1( "|" ); } first = false; if ( markSelection && !regexp->isSelected() && (*it)->isSelected() ) { - res += TQString::tqfromLatin1("(") + toStr( *it, markSelection ) + TQString::tqfromLatin1(")"); + res += TQString::fromLatin1("(") + toStr( *it, markSelection ) + TQString::fromLatin1(")"); } else { res += toStr( *it, markSelection ); @@ -69,7 +69,7 @@ TQString TQtRegExpConverter::toString( ConcRegExp* regexp, bool markSelection ) TQString res; bool childSelected = false; - RegExpList list = regexp->tqchildren(); + RegExpList list = regexp->children(); for ( RegExpListIt it(list); *it; ++it ) { TQString startPar = TQString::fromLocal8Bit(""); TQString endPar = TQString::fromLocal8Bit(""); @@ -77,25 +77,25 @@ TQString TQtRegExpConverter::toString( ConcRegExp* regexp, bool markSelection ) if ( markSelection ) startPar = TQString::fromLocal8Bit("(?:"); else - startPar = TQString::tqfromLatin1( "(" ); - endPar = TQString::tqfromLatin1( ")" ); + startPar = TQString::fromLatin1( "(" ); + endPar = TQString::fromLatin1( ")" ); } // Note these two have different tests! They are activated in each their iteration of the loop. if ( markSelection && !childSelected && !regexp->isSelected() && (*it)->isSelected() ) { - res += TQString::tqfromLatin1("("); + res += TQString::fromLatin1("("); childSelected = true; } if ( markSelection && childSelected && !regexp->isSelected() && !(*it)->isSelected() ) { - res += TQString::tqfromLatin1(")"); + res += TQString::fromLatin1(")"); childSelected= false; } res += startPar + toStr( *it, markSelection ) + endPar; } if ( markSelection && childSelected && !regexp->isSelected() ) { - res += TQString::tqfromLatin1(")"); + res += TQString::fromLatin1(")"); } return res; } @@ -103,9 +103,9 @@ TQString TQtRegExpConverter::toString( ConcRegExp* regexp, bool markSelection ) TQString TQtRegExpConverter::toString( LookAheadRegExp* regexp, bool markSelection ) { if ( regexp->lookAheadType() == LookAheadRegExp::POSITIVE ) - return TQString::tqfromLatin1( "(?=" ) + toStr( regexp->child(), markSelection ) + TQString::fromLocal8Bit( ")" ); + return TQString::fromLatin1( "(?=" ) + toStr( regexp->child(), markSelection ) + TQString::fromLocal8Bit( ")" ); else - return TQString::tqfromLatin1( "(?!" ) + toStr( regexp->child(), markSelection ) + TQString::fromLocal8Bit( ")" ); + return TQString::fromLatin1( "(?!" ) + toStr( regexp->child(), markSelection ) + TQString::fromLocal8Bit( ")" ); } TQString TQtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelection*/ ) @@ -137,7 +137,7 @@ TQString TQtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelec // Now insert the ranges. TQPtrList ranges = regexp->range(); for ( TQPtrListIterator it(ranges); *it; ++it ) { - txt.append((*it)->first()+ TQString::tqfromLatin1("-")+ (*it)->second()); + txt.append((*it)->first()+ TQString::fromLatin1("-")+ (*it)->second()); } // Ok, its time to build each part of the regexp, here comes the rule: @@ -147,20 +147,20 @@ TQString TQtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelec // finally if '^' is one of the characters, then it must not be the first // one! - TQString res = TQString::tqfromLatin1("["); + TQString res = TQString::fromLatin1("["); if ( regexp->negate() ) - res.append(TQString::tqfromLatin1("^")); + res.append(TQString::fromLatin1("^")); // a ']' must be the first character in teh range. if ( foundParenthesis ) { - res.append(TQString::tqfromLatin1("]")); + res.append(TQString::fromLatin1("]")); } // a '-' must be the first character ( only coming after a ']') if ( foundDash ) { - res.append(TQString::tqfromLatin1("-")); + res.append(TQString::fromLatin1("-")); } res += txt; @@ -184,7 +184,7 @@ TQString TQtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelec res.append( TQChar( '^' ) ); } - res.append(TQString::tqfromLatin1("]")); + res.append(TQString::fromLatin1("]")); return res; } @@ -192,30 +192,30 @@ TQString TQtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelec TQString TQtRegExpConverter::toString( CompoundRegExp* regexp, bool markSelection ) { if ( markSelection && !regexp->isSelected() && regexp->child()->isSelected() ) - return TQString::tqfromLatin1( "(" ) + toStr( regexp->child(), markSelection ) + TQString::tqfromLatin1( ")" ); + return TQString::fromLatin1( "(" ) + toStr( regexp->child(), markSelection ) + TQString::fromLatin1( ")" ); else return toStr( regexp->child(), markSelection ); } TQString TQtRegExpConverter::toString( DotRegExp* /*regexp*/, bool /*markSelection*/ ) { - return TQString::tqfromLatin1( "." ); + return TQString::fromLatin1( "." ); } TQString TQtRegExpConverter::toString( PositionRegExp* regexp, bool /*markSelection*/ ) { switch (regexp->position()) { case PositionRegExp::BEGLINE: - return TQString::tqfromLatin1("^"); + return TQString::fromLatin1("^"); case PositionRegExp::ENDLINE: - return TQString::tqfromLatin1("$"); + return TQString::fromLatin1("$"); case PositionRegExp::WORDBOUNDARY: - return TQString::tqfromLatin1("\\b"); + return TQString::fromLatin1("\\b"); case PositionRegExp::NONWORDBOUNDARY: - return TQString::tqfromLatin1("\\B"); + return TQString::fromLatin1("\\B"); } Q_ASSERT( false ); - return TQString::tqfromLatin1(""); + return TQString::fromLatin1(""); } TQString TQtRegExpConverter::toString( RepeatRegExp* regexp, bool markSelection ) @@ -227,17 +227,17 @@ TQString TQtRegExpConverter::toString( RepeatRegExp* regexp, bool markSelection if ( markSelection ) { if ( !regexp->isSelected() && child->isSelected()) { - startPar = TQString::tqfromLatin1( "(" ); - endPar = TQString::tqfromLatin1( ")" ); + startPar = TQString::fromLatin1( "(" ); + endPar = TQString::fromLatin1( ")" ); } else if ( child->precedence() < regexp->precedence() ) { - startPar = TQString::tqfromLatin1( "(?:" ); - endPar = TQString::tqfromLatin1( ")" ); + startPar = TQString::fromLatin1( "(?:" ); + endPar = TQString::fromLatin1( ")" ); } } else if ( child->precedence() < regexp->precedence() ) { - startPar = TQString::tqfromLatin1( "(" ); - endPar = TQString::tqfromLatin1( ")" ); + startPar = TQString::fromLatin1( "(" ); + endPar = TQString::fromLatin1( ")" ); } if ( regexp->min() == 0 && regexp->max() == -1) { @@ -285,7 +285,7 @@ TQString TQtRegExpConverter::toString( TextRegExp* regexp, bool /*markSelection* TQString TQtRegExpConverter::name() { - return TQString::tqfromLatin1( "TQt" ); + return TQString::fromLatin1( "TQt" ); } int TQtRegExpConverter::features() diff --git a/kregexpeditor/qtregexphighlighter.h b/kregexpeditor/qtregexphighlighter.h index 8bf1c55..70ae5f0 100644 --- a/kregexpeditor/qtregexphighlighter.h +++ b/kregexpeditor/qtregexphighlighter.h @@ -18,7 +18,7 @@ #ifndef TQTREGEXPHIGHLIGHTER_H #define TQTREGEXPHIGHLIGHTER_H #include "regexphighlighter.h" -#include +#include class QtRegexpHighlighter :public RegexpHighlighter { diff --git a/kregexpeditor/regexp.cpp b/kregexpeditor/regexp.cpp index cb94e84..0b583d7 100644 --- a/kregexpeditor/regexp.cpp +++ b/kregexpeditor/regexp.cpp @@ -28,7 +28,7 @@ RegExp::RegExp( bool selected ) : _parent(0), _destructing( false ), _selected( RegExp::~RegExp() { _destructing = true; - for ( TQPtrListIterator it(_tqchildren); *it; ++it ) { + for ( TQPtrListIterator it(_children); *it; ++it ) { delete *it; } if ( _parent ) @@ -38,14 +38,14 @@ RegExp::~RegExp() void RegExp::addChild( RegExp* child ) { - _tqchildren.append( child ); + _children.append( child ); child->setParent( this ); } void RegExp::removeChild( RegExp* child ) { if ( ! _destructing ) { - _tqchildren.remove( child ); + _children.remove( child ); } } @@ -68,7 +68,7 @@ RegExp* RegExp::readRegExp( TQDomElement top, const TQString& version ) TQString RegExp::toXmlString() const { TQDomDocument doc; - doc.setContent( TQString::tqfromLatin1( "" ) ); + doc.setContent( TQString::fromLatin1( "" ) ); TQDomNode top = doc.documentElement(); top.toElement().setAttribute(TQString::fromLocal8Bit("version"), KRegExpEditorGUI::version); diff --git a/kregexpeditor/regexp.h b/kregexpeditor/regexp.h index 9e0b384..5b2bcae 100644 --- a/kregexpeditor/regexp.h +++ b/kregexpeditor/regexp.h @@ -59,7 +59,7 @@ protected: private: RegExp() {} // disable - TQPtrList _tqchildren; + TQPtrList _children; RegExp* _parent; bool _destructing; bool _selected; diff --git a/kregexpeditor/regexpbuttons.cpp b/kregexpeditor/regexpbuttons.cpp index abbfb38..cb8b7ae 100644 --- a/kregexpeditor/regexpbuttons.cpp +++ b/kregexpeditor/regexpbuttons.cpp @@ -30,14 +30,14 @@ #include #include #include -#include +#include #include #include "regexpconverter.h" RegExpButtons::RegExpButtons( TQWidget *parent, const char *name ) : TQDockWindow( TQDockWindow::InDock, parent, name), _keepMode(false) { - TQBoxLayout *tqlayout = boxLayout(); + TQBoxLayout *layout = boxLayout(); _grp = new TQButtonGroup(this); _grp->hide(); @@ -53,11 +53,11 @@ RegExpButtons::RegExpButtons( TQWidget *parent, const char *name ) TQPixmap pix; pix.convertFromImage( qembed_findImage( "select" ) ); #else - TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::tqfromLatin1("kregexpeditor/pics/select.png") ), KIcon::Toolbar ); + TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::fromLatin1("kregexpeditor/pics/select.png") ), KIcon::Toolbar ); #endif _selectBut->setPixmap( pix ); - tqlayout->addWidget( _selectBut ); + layout->addWidget( _selectBut ); _grp->insert(_selectBut); _selectBut->setToggleButton( true ); connect( _selectBut, TQT_SIGNAL(clicked()), TQT_SIGNAL(doSelect())); @@ -76,19 +76,19 @@ RegExpButtons::RegExpButtons( TQWidget *parent, const char *name ) but = insert(TEXT, "text", i18n("Text"), i18n( "This will insert a text field, where you may write text. The text you write will " "be matched literally. (i.e. you do not need to escape any characters)" ) ); - tqlayout->addWidget( but ); + layout->addWidget( but ); but = insert(CHARSET, "characters", i18n("A single character specified in a range"), i18n("This will match a single character from a predefined range.

" "When you insert this widget a dialog box will appear, which lets you specify " "which characters this regexp item will match.") ); - tqlayout->addWidget( but ); + layout->addWidget( but ); but = insert(DOT, "anychar", i18n("Any character"), i18n("This will match any single character") ); - tqlayout->addWidget( but ); + layout->addWidget( but ); but = insert(REPEAT, "repeat", i18n("Repeated content"), @@ -102,14 +102,14 @@ RegExpButtons::RegExpButtons( TQWidget *parent, const char *name ) "is abc, then this regexp item will match the empty string, " "the string abc, the string abcabc, the string abcabcabcabc, " "etc.") ); - tqlayout->addWidget( but ); + layout->addWidget( but ); but = insert(ALTN, "altn", i18n("Alternatives"), i18n("This regexp item will match any of its alternatives.

" "You specify alternatives by placing regexp items on top of " "each other inside this widget.") ); - tqlayout->addWidget( but ); + layout->addWidget( but ); but = insert(COMPOUND, "compound", i18n("Compound regexp"), @@ -118,48 +118,48 @@ RegExpButtons::RegExpButtons( TQWidget *parent, const char *name ) "a small box. This makes it easier for you to get an overview of large " "regexp items. This is especially useful if you load a predefined regexp item " "you perhaps don't care about the inner workings of.") ); - tqlayout->addWidget( but ); + layout->addWidget( but ); but = insert(BEGLINE, "begline", i18n("Beginning of line"), i18n("This will match the beginning of a line.") ); - tqlayout->addWidget( but ); + layout->addWidget( but ); but = insert(ENDLINE, "endline", i18n("End of line"), i18n("This will match the end of a line.") ); - tqlayout->addWidget( but ); + layout->addWidget( but ); _wordBoundary = insert(WORDBOUNDARY, "wordboundary", i18n("Word boundary"), i18n("This asserts a word boundary (This part does not actually match any characters)") ); - tqlayout->addWidget( _wordBoundary ); + layout->addWidget( _wordBoundary ); _nonWordBoundary = insert(NONWORDBOUNDARY, "nonwordboundary", i18n("Non Word boundary"), i18n("This asserts a non-word boundary " "(This part does not actually match any characters)") ); - tqlayout->addWidget( _nonWordBoundary ); + layout->addWidget( _nonWordBoundary ); _posLookAhead = insert(POSLOOKAHEAD, "poslookahead", i18n("Positive Look Ahead"), i18n("This asserts a regular expression (This part does not actually match any characters). " "You can only use this at the end of a regular expression.") ); - tqlayout->addWidget( _posLookAhead ); + layout->addWidget( _posLookAhead ); _negLookAhead = insert(NEGLOOKAHEAD, "neglookahead", i18n("Negative Look Ahead"), i18n("This asserts a regular expression that must not match " "(This part does not actually match any characters). " "You can only use this at the end of a regular expression.") ); - tqlayout->addWidget( _negLookAhead ); + layout->addWidget( _negLookAhead ); } DoubleClickButton* RegExpButtons::insert(RegExpType tp, const char* name, TQString tooltip, TQString whatsthis) { #ifdef TQT_ONLY TQPixmap pix; - pix.convertFromImage( qembed_findImage( TQString::tqfromLatin1( name ) ) ); + pix.convertFromImage( qembed_findImage( TQString::fromLatin1( name ) ) ); #else - TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::tqfromLatin1("kregexpeditor/pics/")+TQString::tqfromLatin1(name) + - TQString::tqfromLatin1(".png") ), KIcon::Toolbar ); + TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::fromLatin1("kregexpeditor/pics/")+TQString::fromLatin1(name) + + TQString::fromLatin1(".png") ), KIcon::Toolbar ); #endif DoubleClickButton* but = new DoubleClickButton( pix, this, "RegExpButtons::but"); diff --git a/kregexpeditor/regexpconverter.cpp b/kregexpeditor/regexpconverter.cpp index 951f0d7..22373ce 100644 --- a/kregexpeditor/regexpconverter.cpp +++ b/kregexpeditor/regexpconverter.cpp @@ -27,7 +27,7 @@ #include "positionregexp.h" #include "repeatregexp.h" #include "textregexp.h" -#include +#include #include "regexphighlighter.h" RegExpConverter* RegExpConverter::_current = 0; @@ -53,7 +53,7 @@ TQString RegExpConverter::toStr( RegExp* regexp, bool markSelection ) case RegExp::TEXTRANGE: return toString( static_cast( regexp ), markSelection ); } qWarning("We shouldn't get here!"); - return TQString::tqfromLatin1( "" ); + return TQString::fromLatin1( "" ); } diff --git a/kregexpeditor/regexpwidget.cpp b/kregexpeditor/regexpwidget.cpp index c164c51..231848f 100644 --- a/kregexpeditor/regexpwidget.cpp +++ b/kregexpeditor/regexpwidget.cpp @@ -43,17 +43,17 @@ RegExpWidget::RegExpWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, void RegExpWidget::addNewChild(DragAccepter *, RegExpWidget *) { - qFatal("This widget should not expect any tqchildren"); + qFatal("This widget should not expect any children"); } void RegExpWidget::addNewConcChild(DragAccepter *, ConcWidget *) { - qFatal("This widget should not expect any tqchildren"); + qFatal("This widget should not expect any children"); } void RegExpWidget::setConcChild(ConcWidget *) { - qFatal("This widget should not expect any tqchildren"); + qFatal("This widget should not expect any children"); } bool RegExpWidget::updateSelection(bool parentSelected) @@ -65,7 +65,7 @@ bool RegExpWidget::updateSelection(bool parentSelected) if ( _isSelected != selected ) { // Selection state changed _isSelected = selected; - tqrepaint(); + repaint(); return true; } return false; @@ -164,10 +164,10 @@ TQRect RegExpWidget::selectionRect() const void RegExpWidget::enterEvent( TQEvent * ) { - updatetqCursorShape(); + updateCursorShape(); } -void RegExpWidget::updatetqCursorShape() +void RegExpWidget::updateCursorShape() { TQCursor cursor; @@ -191,7 +191,7 @@ void RegExpWidget::updatetqCursorShape() void RegExpWidget::updateCursorRecursively() { - updatetqCursorShape(); + updateCursorShape(); } diff --git a/kregexpeditor/regexpwidget.h b/kregexpeditor/regexpwidget.h index 2fd455a..d9480e9 100644 --- a/kregexpeditor/regexpwidget.h +++ b/kregexpeditor/regexpwidget.h @@ -49,7 +49,7 @@ public: virtual void addNewChild(DragAccepter *accepter, RegExpWidget *child); /** - Inserts all the tqchildren of `child' into this widget in place of + Inserts all the children of `child' into this widget in place of `accepter'. This method only applies to container widgets (see @ref SingleContainerWidget, and @ref MultiContainerWidget). @@ -83,7 +83,7 @@ public: virtual bool isSelected() const; /** - Returns true if this widget or one of its tqchildren is selected. + Returns true if this widget or one of its children is selected. */ virtual bool hasSelection() const; @@ -93,7 +93,7 @@ public: Update selection information for this widget. @param parentSelected indicates whether the parent is selected. @return true if the selection state has changed for the widget since - the last time the widget was painted. `tqrepaint' is invoked on the widget if + the last time the widget was painted. `repaint' is invoked on the widget if selection state is changed, to ensure that selection is visible. */ virtual bool updateSelection(bool parentSelected); @@ -148,7 +148,7 @@ public: @li accept cursor for insert/paste @li reject cursor for insert/paste */ - void updatetqCursorShape(); + void updateCursorShape(); virtual void updateCursorRecursively(); diff --git a/kregexpeditor/repeatregexp.cpp b/kregexpeditor/repeatregexp.cpp index 3a03e90..92b5ac8 100644 --- a/kregexpeditor/repeatregexp.cpp +++ b/kregexpeditor/repeatregexp.cpp @@ -58,7 +58,7 @@ bool RepeatRegExp::load( TQDomElement top, const TQString& version ) if ( !ok ) { KMessageBox::sorry( 0, i18n("

Value for attribute %1 was not an integer for element " "%2

It contained the value %3

") - .tqarg(TQString::tqfromLatin1("lower")).tqarg(TQString::tqfromLatin1("Repeat")).tqarg(lower), + .arg(TQString::fromLatin1("lower")).arg(TQString::fromLatin1("Repeat")).arg(lower), i18n("Error While Loading From XML File") ) ; _lower = 0; } @@ -66,7 +66,7 @@ bool RepeatRegExp::load( TQDomElement top, const TQString& version ) if ( !ok ) { KMessageBox::sorry( 0, i18n("

Value for attribute %1 was not an integer for element " "%2

It contained the value %3

") - .tqarg(TQString::tqfromLatin1("upper")).tqarg(TQString::tqfromLatin1("Repeat")).tqarg(upper), + .arg(TQString::fromLatin1("upper")).arg(TQString::fromLatin1("Repeat")).arg(upper), i18n("Error While Loading From XML File") ) ; _upper = -1; } diff --git a/kregexpeditor/repeatwidget.cpp b/kregexpeditor/repeatwidget.cpp index 86f87f9..aca3dc7 100644 --- a/kregexpeditor/repeatwidget.cpp +++ b/kregexpeditor/repeatwidget.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include "kwidgetstreamer.h" @@ -85,13 +85,13 @@ void RepeatWidget::init() } -TQSize RepeatWidget::tqsizeHint() const +TQSize RepeatWidget::sizeHint() const { - // TODO: Merge with LookAheadWidget::tqsizeHint + // TODO: Merge with LookAheadWidget::sizeHint TQFontMetrics metrics = fontMetrics(); _textSize = metrics.size( 0, _content->text() ); - _childSize = _child->tqsizeHint(); + _childSize = _child->sizeHint(); int height = _textSize.height() + bdSize + _childSize.height() + bdSize + 2*pw; int width = 2 * pw + TQMAX(_childSize.width(), 4*bdSize + _textSize.width()); @@ -101,7 +101,7 @@ TQSize RepeatWidget::tqsizeHint() const void RepeatWidget::paintEvent( TQPaintEvent *e ) { // TODO: Merge with LookAheadWidget::paintEvent - TQSize mySize = tqsizeHint(); + TQSize mySize = sizeHint(); TQPainter painter(this); drawPossibleSelection( painter, mySize ); @@ -152,13 +152,13 @@ void RepeatWidget::slotConfigCanceled() TQDataStream stream( _backup, IO_ReadOnly ); KWidgetStreamer streamer; streamer.fromStream( stream, TQT_TQOBJECT(_content) ); - tqrepaint(); + repaint(); } int RepeatWidget::edit() { - _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->tqsizeHint().width()/2, - _configWindow->tqsizeHint().height()/2) ); + _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->sizeHint().width()/2, + _configWindow->sizeHint().height()/2) ); TQDataStream stream( _backup, IO_WriteOnly ); KWidgetStreamer streamer; streamer.toStream( TQT_TQOBJECT(_content), stream ); @@ -271,7 +271,7 @@ TQString RepeatRangeWindow::text() case ATMOST: return i18n("Repeated at Most 1 Time", "Repeated at Most %n Times", _mostTimes->value() ); case EXACTLY: return i18n("Repeated Exactly 1 Time", "Repeated Exactly %n Times", _exactlyTimes->value() ); case MINMAX: return i18n("Repeated From %1 to %2 Times") - .tqarg( _rangeFrom->value() ).tqarg( _rangeTo->value() ); + .arg( _rangeFrom->value() ).arg( _rangeTo->value() ); } qFatal("Fall through!"); return TQString::fromLocal8Bit(""); diff --git a/kregexpeditor/repeatwidget.h b/kregexpeditor/repeatwidget.h index 8911461..98ea6ee 100644 --- a/kregexpeditor/repeatwidget.h +++ b/kregexpeditor/repeatwidget.h @@ -80,7 +80,7 @@ public: RepeatWidget( RepeatRegExp* regexp, RegExpEditorWindow* editorWindow, TQWidget* parent, const char* name = 0); void init(); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; virtual RegExp* regExp() const; virtual RegExpType type() const { return REPEAT; } virtual int edit(); diff --git a/kregexpeditor/scrollededitorwindow.cpp b/kregexpeditor/scrollededitorwindow.cpp index b14261c..07e8bf0 100644 --- a/kregexpeditor/scrollededitorwindow.cpp +++ b/kregexpeditor/scrollededitorwindow.cpp @@ -106,7 +106,7 @@ void RegExpScrolledEditorWindow::resizeEvent( TQResizeEvent *event ) void RegExpScrolledEditorWindow::slotUpdateContentSize( TQPoint focusPoint ) { - TQSize childSize = _editorWindow->tqsizeHint(); + TQSize childSize = _editorWindow->sizeHint(); TQSize vpSize = _scrollView->viewportSize(10,10); bool change = false; diff --git a/kregexpeditor/selectablelineedit.cpp b/kregexpeditor/selectablelineedit.cpp index ac42c83..0e085d5 100644 --- a/kregexpeditor/selectablelineedit.cpp +++ b/kregexpeditor/selectablelineedit.cpp @@ -33,23 +33,23 @@ SelectableLineEdit::SelectableLineEdit( RegExpWidget* owner, TQWidget* parent, c void SelectableLineEdit::setSelected( bool selected ) { if ( selected ) { - TQPalette pal = TQPalette(tqpalette()); + TQPalette pal = TQPalette(palette()); pal.setBrush( TQColorGroup::Base, gray ); setPalette( pal ); } else { unsetPalette(); } - tqrepaint(); + repaint(); } -TQSize SelectableLineEdit::tqsizeHint() const +TQSize SelectableLineEdit::sizeHint() const { int frameWidth = frame() ? 8 : 4; // from TQLineEdit source TQFontMetrics metrics = fontMetrics(); int actualSize = metrics.width( text() ); int charWidth = metrics.maxWidth(); - int height = TQLineEdit::tqsizeHint().height(); + int height = TQLineEdit::sizeHint().height(); int width; if ( hasFocus() ) @@ -67,7 +67,7 @@ void SelectableLineEdit::slotKeyPressed() int actualSize = metrics.width( text() ); if ( actualSize > size().width()-frameWidth ) { - tqrepaint(); + repaint(); emit parentPleaseUpdate(); } } diff --git a/kregexpeditor/selectablelineedit.h b/kregexpeditor/selectablelineedit.h index 7fb7ad7..79522b3 100644 --- a/kregexpeditor/selectablelineedit.h +++ b/kregexpeditor/selectablelineedit.h @@ -39,7 +39,7 @@ Q_OBJECT public: SelectableLineEdit( RegExpWidget* owner, TQWidget* parent = 0, const char* name = 0); void setSelected( bool selected ); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; protected slots: void slotKeyPressed(); diff --git a/kregexpeditor/singlecontainerwidget.cpp b/kregexpeditor/singlecontainerwidget.cpp index 2413236..52ee1fe 100644 --- a/kregexpeditor/singlecontainerwidget.cpp +++ b/kregexpeditor/singlecontainerwidget.cpp @@ -33,7 +33,7 @@ bool SingleContainerWidget::updateSelection( bool parentSelected ) bool changed = RegExpWidget::updateSelection( parentSelected ); changed = _child->updateSelection( _isSelected ) && changed; if (changed) - tqrepaint(); + repaint(); return changed; } @@ -126,7 +126,7 @@ void SingleContainerWidget::updateAll() void SingleContainerWidget::updateCursorRecursively() { _child->updateCursorRecursively(); - updatetqCursorShape(); + updateCursorShape(); } diff --git a/kregexpeditor/test-without-dl/main.cpp b/kregexpeditor/test-without-dl/main.cpp index 76e2fbe..0094b4a 100644 --- a/kregexpeditor/test-without-dl/main.cpp +++ b/kregexpeditor/test-without-dl/main.cpp @@ -50,9 +50,9 @@ int main( int argc, char* argv[] ) tqApp->installEventFilter( new ShootABug() ); KRegExpEditorGUIDialog* iface = new KRegExpEditorGUIDialog( 0, "_editor", TQStringList() ); - iface->setRegExp( TQString::tqfromLatin1( "#include" ) ); + iface->setRegExp( TQString::fromLatin1( "#include" ) ); iface->doSomething( "setMinimal", (void*) false ); - iface->doSomething( "setSyntax", (void*) new TQString( TQString::tqfromLatin1( "Emacs" ) ) ); + iface->doSomething( "setSyntax", (void*) new TQString( TQString::fromLatin1( "Emacs" ) ) ); iface->doSomething( "setShowSyntaxCombo", (bool*) true ); TQFile file("/packages/kde-src/tdeutils/kregexpeditor/test/main.cpp"); diff --git a/kregexpeditor/textrangeregexp.cpp b/kregexpeditor/textrangeregexp.cpp index 78c2696..0a92073 100644 --- a/kregexpeditor/textrangeregexp.cpp +++ b/kregexpeditor/textrangeregexp.cpp @@ -127,7 +127,7 @@ bool TextRangeRegExp::load( TQDomElement top, const TQString& /*version*/ ) addRange( from, to ); } else { - KMessageBox::sorry( 0, i18n("

Invalid sub element to element TextRange. Tag was %1

").tqarg(child.tagName()), + KMessageBox::sorry( 0, i18n("

Invalid sub element to element TextRange. Tag was %1

").arg(child.tagName()), i18n("Error While Loading From XML File") ) ; return false; } diff --git a/kregexpeditor/textregexp.cpp b/kregexpeditor/textregexp.cpp index d53d916..c31f9ac 100644 --- a/kregexpeditor/textregexp.cpp +++ b/kregexpeditor/textregexp.cpp @@ -62,7 +62,7 @@ bool TextRegExp::load( TQDomElement top, const TQString& /*version*/) _text = txtNode.data(); } else { - _text = TQString::tqfromLatin1( "" ); + _text = TQString::fromLatin1( "" ); } return true; diff --git a/kregexpeditor/textwidget.cpp b/kregexpeditor/textwidget.cpp index 99a77e1..d2f7549 100644 --- a/kregexpeditor/textwidget.cpp +++ b/kregexpeditor/textwidget.cpp @@ -22,7 +22,7 @@ #include "textwidget.h" #include "textregexp.h" #include "selectablelineedit.h" -#include +#include TextWidget::TextWidget(RegExpEditorWindow* editorWindow, TQWidget *parent, const char *name) @@ -56,19 +56,19 @@ void TextWidget::init( const TQString& txt ) void TextWidget::slotUpdate() { - // I need to force the parent to tqrepaint, as the size change of this + // I need to force the parent to repaint, as the size change of this // widget may not be enough for the parent to change size, and in that - // case the parent would not tqrepaint, and the text widget would not be + // case the parent would not repaint, and the text widget would not be // resized. TQWidget *p = TQT_TQWIDGET(parent()); if (p) - p->tqrepaint(); + p->repaint(); _editorWindow->updateContent( this ); } -TQSize TextWidget::tqsizeHint() const +TQSize TextWidget::sizeHint() const { - return _edit->tqsizeHint(); + return _edit->sizeHint(); } void TextWidget::paintEvent( TQPaintEvent *e) diff --git a/kregexpeditor/textwidget.h b/kregexpeditor/textwidget.h index 71ccf9b..ac1c069 100644 --- a/kregexpeditor/textwidget.h +++ b/kregexpeditor/textwidget.h @@ -37,7 +37,7 @@ public: const char *name = 0); TextWidget( TextRegExp* regexp, RegExpEditorWindow* editorWindow, TQWidget* parent, const char* name = 0); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; virtual RegExp* regExp() const; virtual RegExpType type() const { return TEXT; } virtual void updateAll(); diff --git a/kregexpeditor/userdefinedregexps.cpp b/kregexpeditor/userdefinedregexps.cpp index 85dc96e..d1c63ee 100644 --- a/kregexpeditor/userdefinedregexps.cpp +++ b/kregexpeditor/userdefinedregexps.cpp @@ -32,7 +32,7 @@ #include #include "widgetfactory.h" #include "compoundregexp.h" -#include +#include #include UserDefinedRegExps::UserDefinedRegExps( TQWidget *parent, const char *name ) @@ -68,7 +68,7 @@ void UserDefinedRegExps::slotPopulateUserRegexps() #ifdef TQT_ONLY TQStringList dirs; - dirs << TQString::tqfromLatin1( "predefined" ); + dirs << TQString::fromLatin1( "predefined" ); #else TQStringList dirs = KGlobal::dirs()->findDirs( "data", TQString::fromLocal8Bit("kregexpeditor/predefined/") ); #endif @@ -88,7 +88,7 @@ void UserDefinedRegExps::slotPopulateUserRegexps() void UserDefinedRegExps::createItems( const TQString& _title, const TQString& dir, bool usersRegExp ) { TQString title = _title; - if (_title == TQString::tqfromLatin1("general")) + if (_title == TQString::fromLatin1("general")) title = i18n("General"); TQListViewItem* lvItem = new TQListViewItem( _userDefined, title ); @@ -101,7 +101,7 @@ void UserDefinedRegExps::createItems( const TQString& _title, const TQString& di TQFile file( fileName ); if ( ! file.open(IO_ReadOnly) ) { - KMessageBox::sorry( this, i18n("Could not open file for reading: %1").tqarg(fileName) ); + KMessageBox::sorry( this, i18n("Could not open file for reading: %1").arg(fileName) ); continue; } @@ -111,7 +111,7 @@ void UserDefinedRegExps::createItems( const TQString& _title, const TQString& di RegExp* regexp = WidgetFactory::createRegExp( data ); if ( ! regexp ) { - KMessageBox::sorry( this, i18n("File %1 containing user defined regular expression contained an error").tqarg( fileName ) ); + KMessageBox::sorry( this, i18n("File %1 containing user defined regular expression contained an error").arg( fileName ) ); continue; } @@ -200,7 +200,7 @@ void UserDefinedRegExps::slotEdit( TQListViewItem* item, const TQPoint& pos ) TQString fileName = WidgetWinItem::path() + TQString::fromLocal8Bit("/") + txt + TQString::fromLocal8Bit(".regexp"); TQFileInfo finfo( fileName ); if ( finfo.exists() ) { - int answer = KMessageBox::warningYesNo( this, i18n("

Overwrite named regular expression %1?

").tqarg(txt), TQString(), i18n("Overwrite"), i18n("Do Not Overwrite") ); + int answer = KMessageBox::warningYesNo( this, i18n("

Overwrite named regular expression %1?

").arg(txt), TQString(), i18n("Overwrite"), i18n("Do Not Overwrite") ); if ( answer != KMessageBox::Yes ) return; @@ -256,7 +256,7 @@ void WidgetWinItem::setName( const TQString& nm ) TQString WidgetWinItem::path() { #ifdef TQT_ONLY - return TQString::tqfromLatin1( "predefined" ); + return TQString::fromLatin1( "predefined" ); #else return locateLocal("data", TQString::fromLocal8Bit("KRegExpEditor/")); #endif diff --git a/kregexpeditor/util.cpp b/kregexpeditor/util.cpp index b6cf4c6..a57f99c 100644 --- a/kregexpeditor/util.cpp +++ b/kregexpeditor/util.cpp @@ -26,7 +26,7 @@ TQPixmap Util::getKRegExpEditorIcon( const TQString& name ) pix.convertFromImage( qembed_findImage(name) ); return pix; #else - return KGlobal::iconLoader()->loadIcon(locate("data", TQString::tqfromLatin1("kregexpeditor/pics/") +name ), + return KGlobal::iconLoader()->loadIcon(locate("data", TQString::fromLatin1("kregexpeditor/pics/") +name ), KIcon::Toolbar ); #endif } diff --git a/kregexpeditor/verifier.cpp b/kregexpeditor/verifier.cpp index 18e1be3..23198be 100644 --- a/kregexpeditor/verifier.cpp +++ b/kregexpeditor/verifier.cpp @@ -97,7 +97,7 @@ void Verifier::setMinimal( bool b ) // // void Verifier::gotoNum( int which ) // { -// TQString anchor = TQString::tqfromLatin1("match%1").tqarg(which); +// TQString anchor = TQString::fromLatin1("match%1").arg(which); // scrollToAnchor( anchor ); // _current = which; // emit currentChanged( _current ); diff --git a/kregexpeditor/verifier.h b/kregexpeditor/verifier.h index d1999d6..951c217 100644 --- a/kregexpeditor/verifier.h +++ b/kregexpeditor/verifier.h @@ -17,7 +17,7 @@ **/ #ifndef VERIFIER_H #define VERIFIER_H -#include +#include #include "regexphighlighter.h" class TQTimer; class TQProgressDialog; diff --git a/kregexpeditor/verifybuttons.cpp b/kregexpeditor/verifybuttons.cpp index 675d3e6..366130c 100644 --- a/kregexpeditor/verifybuttons.cpp +++ b/kregexpeditor/verifybuttons.cpp @@ -30,7 +30,7 @@ #include "verifybuttons.h" #include -#include +#include #include #include "qtregexpconverter.h" #include "emacsregexpconverter.h" @@ -42,56 +42,56 @@ VerifyButtons::VerifyButtons( TQWidget* parent, const char* name ) :TQDockWindow( TQDockWindow::InDock, parent, name ), _configMenu( 0 ) { - TQBoxLayout* tqlayout = boxLayout(); + TQBoxLayout* layout = boxLayout(); _verify = new TQToolButton(this); - TQIconSet icon = Util::getSystemIconSet( TQString::tqfromLatin1("spellcheck")); + TQIconSet icon = Util::getSystemIconSet( TQString::fromLatin1("spellcheck")); _verify->setIconSet( icon ); TQToolTip::add( _verify, i18n( "Verify regular expression" ) ); TQWhatsThis::add( _verify, i18n("Shows what part of the regular expression is being matched in the verifier window." "(The window below the graphical editor window).")); - tqlayout->addWidget( _verify ); + layout->addWidget( _verify ); connect( _verify, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( verify() ) ); TQToolButton* button = new TQToolButton(this); - button->setPixmap( Util::getSystemIcon( TQString::tqfromLatin1("fileopen")) ); - tqlayout->addWidget( button ); + button->setPixmap( Util::getSystemIcon( TQString::fromLatin1("fileopen")) ); + layout->addWidget( button ); connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(loadText())); TQToolTip::add( button, i18n("Load text in the verifier window") ); button = new TQToolButton(this); - button->setPixmap( Util::getSystemIcon( TQString::tqfromLatin1("package_settings")) ); - tqlayout->addWidget( button ); + button->setPixmap( Util::getSystemIcon( TQString::fromLatin1("package_settings")) ); + layout->addWidget( button ); connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(configure())); TQToolTip::add( button, i18n("Settings") ); // It is currently not possible to ask for the paragraph being highlighted, thefore scrolling to next/prev match // do not work. Enable this when they work. - // _first = new TQToolButton( TQString::tqfromLatin1("<<"), this); - // tqlayout->addWidget( _first ); + // _first = new TQToolButton( TQString::fromLatin1("<<"), this); + // layout->addWidget( _first ); // connect(_first, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoFirst())); // _first->setFixedWidth( 25 ); // - // _prev = new TQToolButton(TQString::tqfromLatin1("<"), this); - // tqlayout->addWidget( _prev ); + // _prev = new TQToolButton(TQString::fromLatin1("<"), this); + // layout->addWidget( _prev ); // connect(_prev, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoPrev())); // _prev->setFixedWidth( 20 ); // - // _next = new TQToolButton(TQString::tqfromLatin1(">"), this); - // tqlayout->addWidget( _next ); + // _next = new TQToolButton(TQString::fromLatin1(">"), this); + // layout->addWidget( _next ); // connect(_next, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoNext())); // _next->setFixedWidth( 20 ); // - // _last = new TQToolButton(TQString::tqfromLatin1(">>"), this); - // tqlayout->addWidget( _last ); + // _last = new TQToolButton(TQString::fromLatin1(">>"), this); + // layout->addWidget( _last ); // connect(_last, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoLast())); // _last->setFixedWidth( 25 ); // Same as above // TQLabel* label = new TQLabel( i18n("Matches: "), this ); -// tqlayout->addWidget( label ); +// layout->addWidget( label ); // _matches = new TQLabel(i18n("-"), this ); -// tqlayout->addWidget( _matches ); +// layout->addWidget( _matches ); // TQString txt = i18n( "Shows number of times regular expression matches the text in the verifier window"); // TQToolTip::add( label, txt ); // TQToolTip::add( _matches, txt ); @@ -179,7 +179,7 @@ void VerifyButtons::setMatchCount( int /*count*/ ) // currently this is not possible due to limitation in TQSyntaxHighlighter /* if ( count == -1 ) - _matches->setText( TQString::tqfromLatin1("-") ); + _matches->setText( TQString::fromLatin1("-") ); else _matches->setText( TQString::number( count ) ); */ diff --git a/kregexpeditor/widgetfactory.cpp b/kregexpeditor/widgetfactory.cpp index 9f167b2..1ab5d24 100644 --- a/kregexpeditor/widgetfactory.cpp +++ b/kregexpeditor/widgetfactory.cpp @@ -162,7 +162,7 @@ RegExp* WidgetFactory::createRegExp( TQDomElement node, const TQString& version else if ( tag == TQString::fromLocal8Bit( "Repeat" ) ) regexp = new RepeatRegExp( false ); else { - KMessageBox::sorry( 0, i18n("

Unknown tag while reading XML. Tag was %1

").tqarg(tag), + KMessageBox::sorry( 0, i18n("

Unknown tag while reading XML. Tag was %1

").arg(tag), i18n("Error While Loading From XML File") ) ; return 0; @@ -191,14 +191,14 @@ RegExp* WidgetFactory::createRegExp( TQString str ) // Read the RegularExpression element, and extract the version. TQDomElement top = doc.documentElement(); if (! (top.tagName() == TQString::fromLocal8Bit("RegularExpression")) ) { - KMessageBox::sorry( 0, i18n("

XML file did not contain a %1 tag.

").tqarg(TQString::tqfromLatin1("RegularExpression")), + KMessageBox::sorry( 0, i18n("

XML file did not contain a %1 tag.

").arg(TQString::fromLatin1("RegularExpression")), i18n("Error While Loading From XML File") ) ; } TQString version = top.attribute( TQString::fromLocal8Bit("version"), KRegExpEditorGUI::version ); TQDomNode child = top.firstChild(); if ( ! child.isElement() ) { KMessageBox::sorry( 0, i18n("

Error while reading XML file. The element just below the tag " - "%1 was not an element.

").tqarg(TQString::tqfromLatin1("RegularExpression")), + "%1 was not an element.

").arg(TQString::fromLatin1("RegularExpression")), i18n("Error While Loading From XML File") ) ; } diff --git a/kregexpeditor/zerowidgets.cpp b/kregexpeditor/zerowidgets.cpp index eaf1aaf..7c1f6c6 100644 --- a/kregexpeditor/zerowidgets.cpp +++ b/kregexpeditor/zerowidgets.cpp @@ -39,10 +39,10 @@ ZeroWidget::ZeroWidget(TQString txt, RegExpEditorWindow* editorWindow, void ZeroWidget::addNewChild(DragAccepter *, RegExpWidget *) { - qFatal("No tqchildren should be added to this widget!"); + qFatal("No children should be added to this widget!"); } -TQSize ZeroWidget::tqsizeHint() const +TQSize ZeroWidget::sizeHint() const { TQFontMetrics metrics = fontMetrics(); _textSize = HackCalculateFontSize( metrics, _text ); @@ -54,7 +54,7 @@ TQSize ZeroWidget::tqsizeHint() const void ZeroWidget::paintEvent( TQPaintEvent *e) { // So what is my Size? - TQSize mySize = tqsizeHint(); + TQSize mySize = sizeHint(); TQPainter painter(this); drawPossibleSelection( painter, mySize); diff --git a/kregexpeditor/zerowidgets.h b/kregexpeditor/zerowidgets.h index 780f426..04dd5c7 100644 --- a/kregexpeditor/zerowidgets.h +++ b/kregexpeditor/zerowidgets.h @@ -30,7 +30,7 @@ public: ZeroWidget(TQString text, RegExpEditorWindow* editorWindow, TQWidget *parent, const char *name = 0); virtual void addNewChild(DragAccepter *accepter, RegExpWidget *child); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; protected: virtual void paintEvent( TQPaintEvent *e ); -- cgit v1.2.3