From 955e20356d63ed405198c8143617a8a0ca8bfc02 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 10:00:17 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit bf280726d5d22f33d33e4f9e771220c725249407. --- 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 71f4470..97cd98e 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 - repaint event, and will thus never get a chance to resize its new child + tqrepaint 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 be65d35..ff2d6c3 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 children = elm->childrenListObject(); - if (!children.isEmpty()) { - TQObjectListIt it = TQObjectListIt(children); + const TQObjectList tqchildren = elm->childrenListObject(); + if (!tqchildren.isEmpty()) { + TQObjectListIt it = TQObjectListIt(tqchildren); while (TQObject *child=it.current()) { if (child->inherits("KMultiFormListBoxMultiVisible")) { diff --git a/kregexpeditor/KMultiFormListBox/indexWindow.cpp b/kregexpeditor/KMultiFormListBox/indexWindow.cpp index ccbd636..f81ea07 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 sizeHint doesn't report the correct size + // I need to do it this way, as tqsizeHint 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 3dcab67..6e82e85 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->sizeHint().width()); + maxWidth = TQMAX(maxWidth, child->tqsizeHint().width()); if (strcmp(child->name(), "seperator") != 0) { - totalHeight += child->sizeHint().height(); + totalHeight += child->tqsizeHint().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->sizeHint().height(); + h = child2->tqsizeHint().height(); h += extra; } else { diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp index 8d3ffe3..905634c 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\"?").arg(item->text()),i18n("Delete Item"),KStdGuiItem::del()); + KMessageBox::warningContinueCancel(0, i18n("Delete item \"%1\"?").tqarg(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 58b82da..a455bae 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 *layout = new TQHBoxLayout( this ); + TQHBoxLayout *tqlayout = new TQHBoxLayout( this ); _factory = factory; - layout->addWidget( widget ); + tqlayout->addWidget( widget ); } void KMultiFormListBox::append( KMultiFormListBoxEntry *element ) diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h index e432c59..ba9b8a8 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 90d4e35..b4bf36c 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::fromLatin1(""); } + virtual TQString idxString() { return TQString::tqfromLatin1(""); } public slots: void acceptIndexButton(); diff --git a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp index 9015aaa..42d411b 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 children (if any). - const TQObjectList children = from->childrenListObject(); - if ( !children.isEmpty() ) { - stream << children.count(); - for ( TQObjectListIt it = TQObjectListIt(children); *it; ++it ) { + // Serializing all the tqchildren (if any). + const TQObjectList tqchildren = from->childrenListObject(); + if ( !tqchildren.isEmpty() ) { + stream << tqchildren.count(); + for ( TQObjectListIt it = TQObjectListIt(tqchildren); *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 children (if any) - const TQObjectList children = to->childrenListObject(); + // Stream in all the tqchildren (if any) + const TQObjectList tqchildren = to->childrenListObject(); unsigned int count; stream >> count; - if ( !children.isEmpty() ) { - Q_ASSERT( count == children.count() ); - for ( TQObjectListIt it = TQObjectListIt(children); *it; ++it ) + if ( !tqchildren.isEmpty() ) { + Q_ASSERT( count == tqchildren.count() ); + for ( TQObjectListIt it = TQObjectListIt(tqchildren); *it; ++it ) fromStream( stream, *it ); } else { @@ -117,61 +117,61 @@ KWidgetStreamer::KWidgetStreamer () // TQCheckBox l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("checked") << TQString::fromLatin1("tristate"); - _map.insert(TQString::fromLatin1(TQCHECKBOX_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("checked") << TQString::tqfromLatin1("tristate"); + _map.insert(TQString::tqfromLatin1(TQCHECKBOX_OBJECT_NAME_STRING), l); // TQComboBox l.clear(); - 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); + 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); // TQDial l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("tracking") << TQString::fromLatin1("wrapping") - << TQString::fromLatin1("value"); - _map.insert(TQString::fromLatin1(TQDIAL_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("tracking") << TQString::tqfromLatin1("wrapping") + << TQString::tqfromLatin1("value"); + _map.insert(TQString::tqfromLatin1(TQDIAL_OBJECT_NAME_STRING), l); // TQLCDNumber l.clear(); - 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); + 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); // TQLineEdit l.clear(); - 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); + 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); // TQMultiLineEdit l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("text") - << TQString::fromLatin1("alignment"); - _map.insert(TQString::fromLatin1(TQTEXTEDIT_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("text") + << TQString::tqfromLatin1("tqalignment"); + _map.insert(TQString::tqfromLatin1(TQTEXTEDIT_OBJECT_NAME_STRING), l); // TQRadioButton l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("checked"); - _map.insert(TQString::fromLatin1(TQRADIOBUTTON_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("checked"); + _map.insert(TQString::tqfromLatin1(TQRADIOBUTTON_OBJECT_NAME_STRING), l); // TQSlider l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("value"); - _map.insert(TQString::fromLatin1(TQSLIDER_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("value"); + _map.insert(TQString::tqfromLatin1(TQSLIDER_OBJECT_NAME_STRING), l); // TQSpinBox l.clear(); - l << TQString::fromLatin1("enabled") - << TQString::fromLatin1("value"); - _map.insert(TQString::fromLatin1(TQSPINBOX_OBJECT_NAME_STRING), l); + l << TQString::tqfromLatin1("enabled") + << TQString::tqfromLatin1("value"); + _map.insert(TQString::tqfromLatin1(TQSPINBOX_OBJECT_NAME_STRING), l); } diff --git a/kregexpeditor/altnregexp.cpp b/kregexpeditor/altnregexp.cpp index ef8b8de..b9b01ec 100644 --- a/kregexpeditor/altnregexp.cpp +++ b/kregexpeditor/altnregexp.cpp @@ -29,7 +29,7 @@ void AltnRegExp::addRegExp( RegExp *elm ) addChild( elm ); } -RegExpList AltnRegExp::children() const +RegExpList AltnRegExp::tqchildren() const { return list; } diff --git a/kregexpeditor/altnregexp.h b/kregexpeditor/altnregexp.h index c126c5f..37614f1 100644 --- a/kregexpeditor/altnregexp.h +++ b/kregexpeditor/altnregexp.h @@ -30,7 +30,7 @@ public: AltnRegExp( bool selected ); void addRegExp( RegExp * ); - RegExpList children() const; + RegExpList tqchildren() 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 3a29135..25befe5 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 - _children.append(accepter); + _tqchildren.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 - _children.append(accepter); + _tqchildren.append(accepter); _text = i18n("Alternatives"); - RegExpList list = regexp->children(); + RegExpList list = regexp->tqchildren(); 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(); - repaint(); + tqrepaint(); } void AltnWidget::setConcChild(ConcWidget *child) { - addNewConcChild( dynamic_cast(_children.at(0)), child ); + addNewConcChild( dynamic_cast(_tqchildren.at(0)), child ); } void AltnWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *child) @@ -81,21 +81,21 @@ void AltnWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *child) } -TQSize AltnWidget::sizeHint() const +TQSize AltnWidget::tqsizeHint() const { - TQPtrListIterator it(_children); + TQPtrListIterator it(_tqchildren); // Skip the first child, as we only need half of the size of the first and the // last drag accepter. Does, however, not apply when there only is onw child. - if ( _children.count() != 1 ) + if ( _tqchildren.count() != 1 ) ++it; - _childrenWidth = 0; - _childrenHeight = 0; + _tqchildrenWidth = 0; + _tqchildrenHeight = 0; for ( ; *it ; ++it) { - TQSize thisChildSize = (*it)->sizeHint(); - _childrenWidth = TQMAX(_childrenWidth, thisChildSize.width()); - _childrenHeight += thisChildSize.height(); + TQSize thisChildSize = (*it)->tqsizeHint(); + _tqchildrenWidth = TQMAX(_tqchildrenWidth, thisChildSize.width()); + _tqchildrenHeight += thisChildSize.height(); } // Now add the size of the header @@ -104,21 +104,21 @@ TQSize AltnWidget::sizeHint() const int headerWidth = _textSize.width() + 2 * bdSize + 2; - _childrenWidth = TQMAX(_childrenWidth, headerWidth); + _tqchildrenWidth = TQMAX(_tqchildrenWidth, headerWidth); - return TQSize(_childrenWidth + 2*pw, _childrenHeight + _textSize.height() + 1*pw ); + return TQSize(_tqchildrenWidth + 2*pw, _tqchildrenHeight + _textSize.height() + 1*pw ); } void AltnWidget::paintEvent( TQPaintEvent *e) { - Q_ASSERT( dynamic_cast(_children.at(0)) ); + Q_ASSERT( dynamic_cast(_tqchildren.at(0)) ); // if this fails, then I should check the location of the show() - Q_ASSERT( _children.count() == 1 || - ( _children.count() >=3 && - dynamic_cast(_children.at(_children.count()-1)) ) ); + Q_ASSERT( _tqchildren.count() == 1 || + ( _tqchildren.count() >=3 && + dynamic_cast(_tqchildren.at(_tqchildren.count()-1)) ) ); int offset = 0; - TQSize mySize = sizeHint(); + TQSize mySize = tqsizeHint(); 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 children and place them at the correct location. + //---- Run through all the tqchildren and place them at the correct location. offset = _textSize.height(); xOffset = pw; - for (unsigned int i = 0; i < _children.count(); i++ ) { + for (unsigned int i = 0; i < _tqchildren.count(); i++ ) { - RegExpWidget* child = _children.at(i); + RegExpWidget* child = _tqchildren.at(i); - TQSize childSize = child->sizeHint(); + TQSize childSize = child->tqsizeHint(); TQSize curChildSize = child->size(); //-------------------------------------- place the child int x = xOffset; int y = offset; int h = childSize.height(); - if ( ( _children.count() != 1 ) && ( i == 0 || i == _children.count() -1 ) ) { + if ( ( _tqchildren.count() != 1 ) && ( i == 0 || i == _tqchildren.count() -1 ) ) { // first and last DragAccepter should only be half size. h /= 2; } - int w = _childrenWidth; + int w = _tqchildrenWidth; 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(_children); + TQPtrListIterator it(_tqchildren); ++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 < _children.count(); i += 2 ) { - RegExpWidget* child = _children.at( i ); + for ( unsigned int i=1; i < _tqchildren.count(); i += 2 ) { + RegExpWidget* child = _tqchildren.at( i ); if ( child->hasSelection() ) { child->applyRegExpToSelection( type ); } @@ -197,7 +197,7 @@ RegExp* AltnWidget::selection() const if ( isSelected() ) return regExp(); else { - TQPtrListIterator it(_children); + TQPtrListIterator it(_tqchildren); ++it; // Skip past DragAccepter for ( ; *it; it+=2 ) { if ( (*it)->hasSelection() ) { @@ -216,7 +216,7 @@ bool AltnWidget::validateSelection() const } bool foundASelection = false; - TQPtrListIterator it(_children); + TQPtrListIterator it(_tqchildren); ++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 < _children.count(); i+=2 ) { - bool line = ( i != 0 && i!= _children.count()-1 ); - DragAccepter *accepter = dynamic_cast(_children.at(i)); + 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)); if (accepter) accepter->setDrawLine( line ); } diff --git a/kregexpeditor/altnwidget.h b/kregexpeditor/altnwidget.h index 589726d..519eba5 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 sizeHint() const; + virtual TQSize tqsizeHint() 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 _childrenWidth; - mutable int _childrenHeight; + mutable int _tqchildrenWidth; + mutable int _tqchildrenHeight; }; #endif // altnwidget diff --git a/kregexpeditor/auxbuttons.cpp b/kregexpeditor/auxbuttons.cpp index b56b49b..855f6d1 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* layout = boxLayout(); + TQBoxLayout* tqlayout = boxLayout(); _undo = new TQToolButton( this ); - _undo->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("undo") ) ); - layout->addWidget( _undo ); + _undo->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("undo") ) ); + tqlayout->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::fromLatin1("redo") ) ); - layout->addWidget( _redo ); + _redo->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("redo") ) ); + tqlayout->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::fromLatin1("editcut") ) ); - layout->addWidget( _cut ); + _cut->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("editcut") ) ); + tqlayout->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::fromLatin1("editcopy") ) ); - layout->addWidget( _copy ); + _copy->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("editcopy") ) ); + tqlayout->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::fromLatin1("editpaste")) ); - layout->addWidget( _paste ); + _paste->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("editpaste")) ); + tqlayout->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::fromLatin1("filesave")) ); - layout->addWidget( _save ); + _save->setIconSet( Util::getSystemIconSet(TQString::tqfromLatin1("filesave")) ); + tqlayout->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::fromLatin1("contexthelp") ) ); - layout->addWidget( button ); + button->setPixmap( Util::getSystemIcon( TQString::tqfromLatin1("contexthelp") ) ); + tqlayout->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 3926260..227f605 100644 --- a/kregexpeditor/characterswidget.cpp +++ b/kregexpeditor/characterswidget.cpp @@ -60,7 +60,7 @@ CharactersWidget::~CharactersWidget() } -TQSize CharactersWidget::sizeHint() const +TQSize CharactersWidget::tqsizeHint() const { TQFontMetrics metrics = fontMetrics(); _textSize = HackCalculateFontSize(metrics, title()); @@ -78,7 +78,7 @@ TQSize CharactersWidget::sizeHint() const void CharactersWidget::paintEvent(TQPaintEvent *e) { - TQSize mySize = sizeHint(); + TQSize mySize = tqsizeHint(); TQPainter painter(this); drawPossibleSelection( painter, mySize ); @@ -118,7 +118,7 @@ RegExp* CharactersWidget::regExp() const TQString CharactersWidget::text() const { - TQString res = TQString::fromLatin1(""); + TQString res = TQString::tqfromLatin1(""); if (_regexp->wordChar()) res += i18n("- A word character\n"); @@ -186,8 +186,8 @@ int CharactersWidget::edit() TQApplication::restoreOverrideCursor(); } - _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->sizeHint().width()/2, - _configWindow->sizeHint().height()/2)); + _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->tqsizeHint().width()/2, + _configWindow->tqsizeHint().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* layout = new TQHBoxLayout( this, 3, 6 ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 3, 6 ); _selector = new CharSelector( this ); - layout->addWidget( _selector ); - layout->addStretch(1); + tqlayout->addWidget( _selector ); + tqlayout->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* layout = new TQHBoxLayout( this, 3, 6 ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 3, 6 ); TQLabel* label = new TQLabel(i18n("From:"), this ); _from = new CharSelector( this ); - layout->addWidget( label ); - layout->addWidget( _from ); + tqlayout->addWidget( label ); + tqlayout->addWidget( _from ); - layout->addStretch(1); + tqlayout->addStretch(1); label = new TQLabel(i18n("end of range","To:"), this ); _to = new CharSelector( this ); - layout->addWidget( label ); - layout->addWidget( _to ); + tqlayout->addWidget( label ); + tqlayout->addWidget( _to ); } TQString RangeEntry::fromText() const diff --git a/kregexpeditor/characterswidget.h b/kregexpeditor/characterswidget.h index 576e6f1..ccc8852 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 sizeHint() const; + virtual TQSize tqsizeHint() 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 0434281..5f60475 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* layout = new TQHBoxLayout( this ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( this ); child->reparent( this, TQPoint(0,0), false ); - layout->addWidget( child ); - layout->addStretch( 1 ); + tqlayout->addWidget( child ); + tqlayout->addStretch( 1 ); } }; @@ -54,13 +54,13 @@ CharSelector::CharSelector( TQWidget* parent, const char* name ) :TQWidget( parent, name ), _oldIndex(0) { TQStringList items; - TQHBoxLayout* layout = new TQHBoxLayout( this, 0, 6 ); + TQHBoxLayout* tqlayout = 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::fromLatin1("----") + << TQString::tqfromLatin1("----") << 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 ); - layout->addWidget( _type ); + tqlayout->addWidget( _type ); _stack = new TQWidgetStack( this, "_stack" ); - layout->addWidget( _stack ); + tqlayout->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::fromLatin1("\\a"); + return TQString::tqfromLatin1("\\a"); case 5: - return TQString::fromLatin1("\\f"); + return TQString::tqfromLatin1("\\f"); case 6: - return TQString::fromLatin1("\\n"); + return TQString::tqfromLatin1("\\n"); case 7: - return TQString::fromLatin1("\\r"); + return TQString::tqfromLatin1("\\r"); case 8: - return TQString::fromLatin1("\\t"); + return TQString::tqfromLatin1("\\t"); case 9: - return TQString::fromLatin1("\\v"); + return TQString::tqfromLatin1("\\v"); } return TQString(); } diff --git a/kregexpeditor/compoundwidget.cpp b/kregexpeditor/compoundwidget.cpp index cb60152..c43dcbb 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* layout = new TQVBoxLayout( this ); - layout->setAutoAdd( true ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( this ); + tqlayout->setAutoAdd( true ); TQLabel* label = new TQLabel( i18n("&Title:"), this); _title = new TQLineEdit( this ); @@ -135,10 +135,10 @@ void CompoundWidget::init( ) _backRefId = -1; } -TQSize CompoundWidget::sizeHint() const +TQSize CompoundWidget::tqsizeHint() const { TQFontMetrics metrics = fontMetrics(); - _childSize = _child->sizeHint(); + _childSize = _child->tqsizeHint(); _textSize = metrics.size( 0, _content->title() ); int width, height; @@ -164,7 +164,7 @@ TQSize CompoundWidget::sizeHint() const void CompoundWidget::paintEvent( TQPaintEvent *e ) { - TQSize mySize = sizeHint(); + TQSize mySize = tqsizeHint(); 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->sizeHint().width(), mySize.width()-2*pw), - _child->sizeHint().height()); + TQSize newSize = TQSize( TQMAX( _child->tqsizeHint().width(), mySize.width()-2*pw), + _child->tqsizeHint().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) ); - repaint(); + tqrepaint(); } RegExp* CompoundWidget::regExp() const @@ -273,7 +273,7 @@ void CompoundWidget::mouseReleaseEvent( TQMouseEvent* event) TQRect( _pixmapPos, _pixmapSize ).contains( event->pos() ) ) { _hidden = !_hidden; _editorWindow->updateContent( 0 ); - repaint(); // is this necesary? + tqrepaint(); // 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) - repaint(); + tqrepaint(); return changed; } else { @@ -296,8 +296,8 @@ bool CompoundWidget::updateSelection( bool parentSelected ) int CompoundWidget::edit() { - _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->sizeHint().width()/2, - _configWindow->sizeHint().height()/2) ); + _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->tqsizeHint().width()/2, + _configWindow->tqsizeHint().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 ad16de8..047f942 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 sizeHint() const; + virtual TQSize tqsizeHint() 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 cefbac4..1c8421d 100644 --- a/kregexpeditor/concregexp.cpp +++ b/kregexpeditor/concregexp.cpp @@ -29,7 +29,7 @@ void ConcRegExp::addRegExp( RegExp *regExp ) addChild( regExp ); } -RegExpList ConcRegExp::children() +RegExpList ConcRegExp::tqchildren() { return list; } diff --git a/kregexpeditor/concregexp.h b/kregexpeditor/concregexp.h index 47e3b26..15a0a66 100644 --- a/kregexpeditor/concregexp.h +++ b/kregexpeditor/concregexp.h @@ -31,7 +31,7 @@ public: ConcRegExp( bool selected ); void addRegExp( RegExp *); - RegExpList children(); + RegExpList tqchildren(); RegExp* lastRegExp(); virtual bool check( ErrorMap&, bool first, bool last ); diff --git a/kregexpeditor/concwidget.cpp b/kregexpeditor/concwidget.cpp index 8cbff9e..16690be 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(); - _children.append(accepter); + _tqchildren.append(accepter); } @@ -38,7 +38,7 @@ ConcWidget::ConcWidget(RegExpEditorWindow* editorWindow, RegExpWidget *child, { init(); DragAccepter *accepter = new DragAccepter(editorWindow, this); - _children.append(accepter); + _tqchildren.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(); - _children.prepend( new DragAccepter(editorWindow, this) ); + _tqchildren.prepend( new DragAccepter(editorWindow, this) ); for (unsigned int i = end; i >= start; i--) { - RegExpWidget* child = origConc->_children.take( i ); - _children.prepend( child ); + RegExpWidget* child = origConc->_tqchildren.take( i ); + _tqchildren.prepend( child ); child->reparent( this, TQPoint(0,0), false); } - _children.prepend( new DragAccepter(editorWindow, this) ); + _tqchildren.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); - _children.append(accepter); + _tqchildren.append(accepter); - RegExpList list = regexp->children(); + RegExpList list = regexp->tqchildren(); for ( RegExpListIt it(list); *it; ++it ) { RegExpWidget* child = WidgetFactory::createWidget( *it, editorWindow, this ); append( child ); @@ -78,35 +78,35 @@ void ConcWidget::init() } -TQSize ConcWidget::sizeHint() const +TQSize ConcWidget::tqsizeHint() const { - int childrenWidth = 0; - int childrenHeight = 0; - TQPtrListIterator it(_children); + int tqchildrenWidth = 0; + int tqchildrenHeight = 0; + TQPtrListIterator it(_tqchildren); for ( ; *it; ++it) { - TQSize thisChildSize = (*it)->sizeHint(); - childrenWidth += thisChildSize.width(); - childrenHeight = TQMAX(childrenHeight, thisChildSize.height()); + TQSize thisChildSize = (*it)->tqsizeHint(); + tqchildrenWidth += thisChildSize.width(); + tqchildrenHeight = TQMAX(tqchildrenHeight, thisChildSize.height()); } - return TQSize(childrenWidth, childrenHeight); + return TQSize(tqchildrenWidth, tqchildrenHeight); } void ConcWidget::paintEvent( TQPaintEvent *e) { - Q_ASSERT( dynamic_cast(_children.at(0)) ); + Q_ASSERT( dynamic_cast(_tqchildren.at(0)) ); // if this fails, then I should check the location of the show() - Q_ASSERT( _children.count() == 1 || - ( _children.count() >=3 && - dynamic_cast(_children.at(_children.count()-1)) ) ); + Q_ASSERT( _tqchildren.count() == 1 || + ( _tqchildren.count() >=3 && + dynamic_cast(_tqchildren.at(_tqchildren.count()-1)) ) ); - if ( _children.count() == 1) { + if ( _tqchildren.count() == 1) { // There is only an accepter, lets give it all the space. - _children.at(0)->setGeometry( 0, 0, size().width(), size().height() ); + _tqchildren.at(0)->setGeometry( 0, 0, size().width(), size().height() ); } else { - TQSize myReqSize = sizeHint(); + TQSize myReqSize = tqsizeHint(); 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 < _children.count(); i += 2 ) { - DragAccepter* accepter = dynamic_cast(_children.at(i-1)); + for (unsigned int i = 1; i < _tqchildren.count(); i += 2 ) { + DragAccepter* accepter = dynamic_cast(_tqchildren.at(i-1)); if (!accepter) continue; - RegExpWidget* child = _children.at(i); + RegExpWidget* child = _tqchildren.at(i); - TQSize childSize = child->sizeHint(); + TQSize childSize = child->tqsizeHint(); TQSize curChildSize = child->size(); //----------------------------- first place the accepter int x = offset; - int w = accepter->sizeHint().width(); + int w = accepter->tqsizeHint().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(_children.at(_children.count()-1)); + dynamic_cast(_tqchildren.at(_tqchildren.count()-1)); // dynamic_cast is ASSERTed at top int x = offset; int h = lastHeight; - int w = accepter->sizeHint().width() + extra; + int w = accepter->tqsizeHint().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( _children ); + TQPtrListIterator it( _tqchildren ); ++it; // start with the second element. - if ( _children.count() == 3 ) { + if ( _tqchildren.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(_children); + TQPtrListIterator it(_tqchildren); ++it; // Skip past the first DragAccepter for ( ; *it; it +=2 ) { if ( (*it)->isSelected() ) { - _maxSelectedHeight = TQMAX( _maxSelectedHeight, (*it)->sizeHint().height() ); + _maxSelectedHeight = TQMAX( _maxSelectedHeight, (*it)->tqsizeHint().height() ); } } changed = changed || isSel != _isSelected; if ( changed ) { - repaint(); + tqrepaint(); } 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< _children.count(); index += 2 ) { - RegExpWidget* child = _children.at(index); + for ( unsigned int index = 1; index< _tqchildren.count(); index += 2 ) { + RegExpWidget* child = _tqchildren.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 = _children.count() -2; + *end = _tqchildren.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(_children); + TQPtrListIterator it(_tqchildren); ++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); - _children.insert( start, newElm ); + _tqchildren.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(_children); + TQPtrListIterator it(_tqchildren); ++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(_children); + TQPtrListIterator it(_tqchildren); ++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<_children.count(); i+= 2 ) { - RegExpWidget *ch = _children.at( i ); + for ( unsigned int i=0; i<_tqchildren.count(); i+= 2 ) { + RegExpWidget *ch = _tqchildren.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->_children.count()-1; j > 0 ; j-=2 ) { - RegExpWidget* newChildA = other->_children.take(j); + for ( unsigned int j = other->_tqchildren.count()-1; j > 0 ; j-=2 ) { + RegExpWidget* newChildA = other->_tqchildren.take(j); newChildA->reparent( this, TQPoint(0,0), false); - _children.insert( i+1, newChildA ); - RegExpWidget* newChildB = other->_children.take(j-1); + _tqchildren.insert( i+1, newChildA ); + RegExpWidget* newChildB = other->_tqchildren.take(j-1); newChildB->reparent( this, TQPoint(0,0), false); - _children.insert( i+1, newChildB ); + _tqchildren.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(_children); + TQPtrListIterator it(_tqchildren); ++it; // skip past the DragAccepter. for ( ; *it && cont; it += 2 ) { cont = (*it)->validateSelection(); diff --git a/kregexpeditor/concwidget.h b/kregexpeditor/concwidget.h index 9a4820c..bff85a7 100644 --- a/kregexpeditor/concwidget.h +++ b/kregexpeditor/concwidget.h @@ -40,7 +40,7 @@ public: TQWidget* parent, const char* name = 0); void init(); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() 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 _children.count() > 1; } + bool hasAnyChildren() { return _tqchildren.count() > 1; } protected: virtual void paintEvent( TQPaintEvent *e ); diff --git a/kregexpeditor/drag.cpp b/kregexpeditor/drag.cpp index e17973c..9c2b1ca 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->encodedData("KRegExpEditor/widgetdrag" ); + TQByteArray payload = event->tqencodedData("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::encodedData ( const char* format ) const +TQByteArray RegExpWidgetDrag::tqencodedData ( const char* format ) const { TQByteArray data; TQTextStream stream( data, IO_WriteOnly ); diff --git a/kregexpeditor/drag.h b/kregexpeditor/drag.h index e32b02e..699d1e8 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 encodedData ( const char * ) const; + virtual TQByteArray tqencodedData ( 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 f336dbd..6bd049e 100644 --- a/kregexpeditor/dragaccepter.cpp +++ b/kregexpeditor/dragaccepter.cpp @@ -28,7 +28,7 @@ DragAccepter::DragAccepter(RegExpEditorWindow* editorWindow, RegExpWidget *paren setAcceptDrops(TRUE); } -TQSize DragAccepter::sizeHint() const +TQSize DragAccepter::tqsizeHint() 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()->topLevelWidget() == topLevelWidget() && _isSelected ); + bool selfDrag = ( event->source() && event->source()->tqtopLevelWidget() == tqtopLevelWidget() && _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()->topLevelWidget() == topLevelWidget() ); + bool selfDrag = ( event->source() && event->source()->tqtopLevelWidget() == tqtopLevelWidget() ); if ( ! selfDrag ) _editorWindow->clearSelection( true ); else { diff --git a/kregexpeditor/dragaccepter.h b/kregexpeditor/dragaccepter.h index c9c6fd8..a3737d9 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 sizeHint() const; + TQSize tqsizeHint() 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 0ba9367..8e3cc20 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 repaint may not have been issued yet - // when this method is invoked. This means that when the repaint comes, the cursor may + // 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 // move to an other widget. _top->updateCursorRecursively(); } @@ -236,9 +236,9 @@ void RegExpEditorWindow::updateContent( TQWidget* focusChild) emit contentChanged( p ); } -TQSize RegExpEditorWindow::sizeHint() const +TQSize RegExpEditorWindow::tqsizeHint() const { - return _top->sizeHint(); + return _top->tqsizeHint(); } 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->clipboard(); + TQClipboard* clipboard = tqApp->tqclipboard(); 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->clipboard()->data()->encodedData( "KRegExpEditor/widgetdrag" ); + TQByteArray data = tqApp->tqclipboard()->data()->tqencodedData( "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->clipboard()->data()->provides( "KRegExpEditor/widgetdrag" ) ) + if ( ! tqApp->tqclipboard()->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

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

Overwrite named regular expression %1

").tqarg(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").arg(fileName) ); + KMessageBox::sorry( this, i18n("Could not open file for writing: %1").tqarg(fileName) ); return; } @@ -431,7 +431,7 @@ void RegExpEditorWindow::updateCursorUnderPoint() { RegExpWidget* widget = _top->widgetUnderPoint( TQCursor::pos(), false ); if ( widget ) - widget->updateCursorShape(); + widget->updatetqCursorShape(); } void RegExpEditorWindow::emitVerifyRegExp() diff --git a/kregexpeditor/editorwindow.h b/kregexpeditor/editorwindow.h index 0d20597..58377c6 100644 --- a/kregexpeditor/editorwindow.h +++ b/kregexpeditor/editorwindow.h @@ -110,7 +110,7 @@ public: */ void showRMBMenu( bool enableCutCopy ); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() 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 layout manager for the editor window */ + /** This points to the tqlayout 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 491e989..0d0f6d4 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->children(); + RegExpList list = regexp->tqchildren(); for ( RegExpListIt it(list); *it; ++it ) { if ( !first ) { - res += TQString::fromLatin1("\\|"); + res += TQString::tqfromLatin1("\\|"); } first = false; res += toStr( *it, markSelection ); @@ -56,13 +56,13 @@ TQString EmacsRegExpConverter::toString( ConcRegExp* regexp, bool markSelection { TQString res; - RegExpList list = regexp->children(); + RegExpList list = regexp->tqchildren(); for ( RegExpListIt it(list); *it; ++it ) { TQString startPar = TQString::fromLocal8Bit(""); TQString endPar = TQString::fromLocal8Bit(""); if ( (*it)->precedence() < regexp->precedence() ) { - startPar = TQString::fromLatin1( "\\(" ); - endPar = TQString::fromLatin1( "\\)" ); + startPar = TQString::tqfromLatin1( "\\(" ); + endPar = TQString::tqfromLatin1( "\\)" ); } 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::fromLatin1("-")+ (*it)->second()); + txt.append((*it)->first()+ TQString::tqfromLatin1("-")+ (*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::fromLatin1("["); + TQString res = TQString::tqfromLatin1("["); if ( regexp->negate() ) - res.append(TQString::fromLatin1("^")); + res.append(TQString::tqfromLatin1("^")); // a ']' must be the first character in teh range. if ( foundParenthesis ) { - res.append(TQString::fromLatin1("]")); + res.append(TQString::tqfromLatin1("]")); } // a '-' must be the first character ( only coming after a ']') if ( foundDash ) { - res.append(TQString::fromLatin1("-")); + res.append(TQString::tqfromLatin1("-")); } res += txt; @@ -153,7 +153,7 @@ TQString EmacsRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSel res.append( TQChar( '^' ) ); } - res.append(TQString::fromLatin1("]")); + res.append(TQString::tqfromLatin1("]")); return res; } @@ -165,7 +165,7 @@ TQString EmacsRegExpConverter::toString( CompoundRegExp* regexp, bool markSelect TQString EmacsRegExpConverter::toString( DotRegExp* /*regexp*/, bool /*markSelection*/ ) { - return TQString::fromLatin1( "." ); + return TQString::tqfromLatin1( "." ); } 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::fromLatin1("^"); + return TQString::tqfromLatin1("^"); case PositionRegExp::ENDLINE: - return TQString::fromLatin1("$"); + return TQString::tqfromLatin1("$"); 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::fromLatin1(""); + return TQString::tqfromLatin1(""); } } - return TQString::fromLatin1(""); + return TQString::tqfromLatin1(""); } 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::fromLatin1( "\\(" ); - endPar = TQString::fromLatin1( "\\)" ); + startPar = TQString::tqfromLatin1( "\\(" ); + endPar = TQString::tqfromLatin1( "\\)" ); } 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::fromLatin1(""); + TQString res = TQString::tqfromLatin1(""); for ( int i = 0; i < regexp->min(); ++i ) { - res += TQString::fromLatin1( "\\(" ) + cText + TQString::fromLatin1( "\\)" ); + res += TQString::tqfromLatin1( "\\(" ) + cText + TQString::tqfromLatin1( "\\)" ); } if ( regexp->max() != -1 ) { for ( int i = regexp->min(); i < regexp->max(); ++i ) { - res += TQString::fromLatin1("\\(") + cText + TQString::fromLatin1("\\)?"); + res += TQString::tqfromLatin1("\\(") + cText + TQString::tqfromLatin1("\\)?"); } } else - res += TQString::fromLatin1("+"); + res += TQString::tqfromLatin1("+"); return res; } @@ -244,7 +244,7 @@ TQString EmacsRegExpConverter::toString( TextRegExp* regexp, bool /*markSelectio TQString EmacsRegExpConverter::name() { - return TQString::fromLatin1( "Emacs" ); + return TQString::tqfromLatin1( "Emacs" ); } int EmacsRegExpConverter::features() diff --git a/kregexpeditor/errormap.cpp b/kregexpeditor/errormap.cpp index 65ca557..41a8c00 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::fromLatin1("KRegExpEditorLineStartError") ); + i18n("Regular Expression Error"), TQString::tqfromLatin1("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::fromLatin1("KRegExpEditorLineEndError") ); + i18n("Regular Expression Error"), TQString::tqfromLatin1("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::fromLatin1("KRegExpEditorLookAHeadError") ); + i18n("Regular Expression Error"), TQString::tqfromLatin1("KRegExpEditorLookAHeadError") ); } _lookAHeadError = true; } diff --git a/kregexpeditor/gen_qregexpparser.cc b/kregexpeditor/gen_qregexpparser.cc index f2ac58a..8a7b5bf 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::fromLatin1("") ) ); + dynamic_cast( yyval.regexp )->addRegExp( new TextRegExp( false, TQString::tqfromLatin1("") ) ); } break; @@ -1057,7 +1057,7 @@ yyreduce: #line 107 "qregexpparser.y" { yyval.regexp = new AltnRegExp( false ); - dynamic_cast( yyval.regexp )->addRegExp( new TextRegExp( false, TQString::fromLatin1("") ) ); + dynamic_cast( yyval.regexp )->addRegExp( new TextRegExp( false, TQString::tqfromLatin1("") ) ); 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")).arg( yyvsp[0].backRef ); + TQString match = TQString(TQString::fromLocal8Bit("\\%1")).tqarg( 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.") - .arg( match ).arg( match ), + .tqarg( match ).tqarg( 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")).arg(yyvsp[0].ch)); + yyval.regexp = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg(yyvsp[0].ch)); } break; case 27: #line 182 "qregexpparser.y" - { yyval.regexp = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).arg(yyvsp[0].ch)); } + { yyval.regexp = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg(yyvsp[0].ch)); } break; diff --git a/kregexpeditor/infopage.cpp b/kregexpeditor/infopage.cpp index bd192e2..42d473e 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::fromLatin1( "" ) + + TQString::tqfromLatin1( "" ) + 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::fromLatin1( "
" ); + + TQString::tqfromLatin1( "" ); setText( txt ); } void InfoPage::setSource ( const TQString& name ) { #ifdef TQT_ONLY - mimeSourceFactory()->setFilePath( TQStringList() << TQString::fromLatin1("manual/")); + mimeSourceFactory()->setFilePath( TQStringList() << TQString::tqfromLatin1("manual/")); TQString nm = name; if ( nm.endsWith("/") ) nm = nm.left( nm.length()-1); diff --git a/kregexpeditor/infopage.h b/kregexpeditor/infopage.h index f73e284..24796d2 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 5260140..95c0f25 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* layout = new TQHBoxLayout( this, 6 ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 6 ); _editor = new KRegExpEditorPrivate( this, "_editor" ); - layout->addWidget( _editor ); + tqlayout->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* layout = new TQVBoxLayout( frame, 6 ); - layout->setAutoAdd( true ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( frame, 6 ); + tqlayout->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::fromLatin1( "setCaseSensitive" ) ) { + if ( method == TQString::tqfromLatin1( "setCaseSensitive" ) ) { _editor->setCaseSensitive( (bool) arguments ); } - else if ( method == TQString::fromLatin1("setMinimal") ) { + else if ( method == TQString::tqfromLatin1("setMinimal") ) { _editor->setMinimal( (bool) arguments ); } - else if ( method == TQString::fromLatin1("setSyntax") ) { + else if ( method == TQString::tqfromLatin1("setSyntax") ) { _editor->setSyntax( *((TQString*) arguments) ); } - else if ( method == TQString::fromLatin1("setAllowNonTQtSyntax") ) { + else if ( method == TQString::tqfromLatin1("setAllowNonTQtSyntax") ) { _editor->setAllowNonTQtSyntax( (bool) arguments ); } else { - qFatal( "%s", tqtr("Method '%1' is not valid!").arg(method).latin1() ); + qFatal( "%s", tqtr("Method '%1' is not valid!").tqarg(method).latin1() ); } } diff --git a/kregexpeditor/kregexpeditorprivate.cpp b/kregexpeditor/kregexpeditorprivate.cpp index 08e661e..5d9df7a 100644 --- a/kregexpeditor/kregexpeditorprivate.cpp +++ b/kregexpeditor/kregexpeditorprivate.cpp @@ -154,17 +154,17 @@ KRegExpEditorPrivate::KRegExpEditorPrivate(TQWidget *parent, const char *name) // Line Edit - TQHBoxLayout* layout = new TQHBoxLayout( topLayout, 6 ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( topLayout, 6 ); TQLabel* label = new TQLabel( i18n("ASCII syntax:"), this ); - layout->addWidget( label ); + tqlayout->addWidget( label ); clearButton = new TQToolButton( this ); - const TQString icon( TQString::fromLatin1( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) ); + const TQString icon( TQString::tqfromLatin1( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) ); TQIconSet clearIcon = SmallIconSet( icon ); clearButton->setIconSet( clearIcon ); - layout->addWidget( clearButton ); + tqlayout->addWidget( clearButton ); TQToolTip::add( clearButton, i18n("Clear expression") ); _regexpEdit = new TQLineEdit( this ); - layout->addWidget( _regexpEdit ); + tqlayout->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::fromLatin1("kregexpeditor/pics/error.png") ), KIcon::Toolbar ); + TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::tqfromLatin1("kregexpeditor/pics/error.png") ), KIcon::Toolbar ); #endif _error = new TQLabel( this ); _error->setPixmap( pix ); - layout->addWidget( _error ); + tqlayout->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::fromLatin1( "TQt" ) ); + setSyntax( TQString::tqfromLatin1( "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").arg( fileName ) ); + KMessageBox::sorry(0, i18n("Could not open file '%1' for reading").tqarg( fileName ) ); } else { TQTextStream s( &file ); diff --git a/kregexpeditor/limitedcharlineedit.cpp b/kregexpeditor/limitedcharlineedit.cpp index 5e494d8..59a6309 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, sizeHint().height()); + setFixedSize( fontMetrics().width('A')*5+5, tqsizeHint().height()); setValidator( new Validator( mode, this ) ); } diff --git a/kregexpeditor/lookaheadwidget.cpp b/kregexpeditor/lookaheadwidget.cpp index 5ae0b9d..c5dc700 100644 --- a/kregexpeditor/lookaheadwidget.cpp +++ b/kregexpeditor/lookaheadwidget.cpp @@ -60,13 +60,13 @@ RegExp* LookAheadWidget::regExp() const _child->regExp() ); } -TQSize LookAheadWidget::sizeHint() const +TQSize LookAheadWidget::tqsizeHint() const { - // TODO: Merge with RepeatWidget::sizeHint + // TODO: Merge with RepeatWidget::tqsizeHint TQFontMetrics metrics = fontMetrics(); _textSize = metrics.size( 0, _text ); - _childSize = _child->sizeHint(); + _childSize = _child->tqsizeHint(); 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::sizeHint() const void LookAheadWidget::paintEvent( TQPaintEvent *e ) { // TODO: Merge with RepeatWidget::paintEvent - TQSize mySize = sizeHint(); + TQSize mySize = tqsizeHint(); TQPainter painter(this); drawPossibleSelection( painter, mySize ); diff --git a/kregexpeditor/lookaheadwidget.h b/kregexpeditor/lookaheadwidget.h index 36c4e42..302090a 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 sizeHint() const; + virtual TQSize tqsizeHint() const; virtual RegExpWidget* findWidgetToEdit( TQPoint globalPos ); diff --git a/kregexpeditor/main.cpp b/kregexpeditor/main.cpp index 4df14ca..58c569d 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::fromLatin1("setAllowNonTQtSyntax"), (bool*) true ); + iface->doSomething( TQString::tqfromLatin1("setAllowNonTQtSyntax"), (bool*) true ); lay->addWidget( iface ); TQHBoxLayout* lay2 = new TQHBoxLayout( lay, 6 ); diff --git a/kregexpeditor/multicontainerwidget.cpp b/kregexpeditor/multicontainerwidget.cpp index bd578d2..d8bef97 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 ); - _children.append( child ); - _children.append( new DragAccepter( _editorWindow, this ) ); + _tqchildren.append( child ); + _tqchildren.append( new DragAccepter( _editorWindow, this ) ); } bool MultiContainerWidget::hasSelection() const @@ -36,7 +36,7 @@ bool MultiContainerWidget::hasSelection() const if ( _isSelected ) return true; - TQPtrListIterator it(_children); + TQPtrListIterator it(_tqchildren); ++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< _children.count(); i++ ) { - _children.at(i)->clearSelection(); + for ( unsigned int i = 0; i< _tqchildren.count(); i++ ) { + _tqchildren.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 children, delete the drag accepter to its right. - for ( int i = (int) _children.count()-2; i > 0; i -=2 ) { + // When deleting tqchildren, delete the drag accepter to its right. + for ( int i = (int) _tqchildren.count()-2; i > 0; i -=2 ) { - RegExpWidget* child = _children.at( i ); + RegExpWidget* child = _tqchildren.at( i ); if ( child->isSelected() ) { - delete _children.at( i+1 ); - _children.remove( i+1 ); + delete _tqchildren.at( i+1 ); + _tqchildren.remove( i+1 ); delete child; - _children.remove(i); + _tqchildren.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<_children.count(); i+= 2 ) { - RegExpWidget *ch = _children.at( i ); + for ( unsigned int i=0; i<_tqchildren.count(); i+= 2 ) { + RegExpWidget *ch = _tqchildren.at( i ); if ( ch == accepter ) { // Insert the new child - _children.insert( i+1, child ); + _tqchildren.insert( i+1, child ); // Insert an accepter as the next element. DragAccepter *accepter = new DragAccepter( _editorWindow, this ); - _children.insert( i+2, accepter ); + _tqchildren.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(_children.count()); - TQMemArray newState(_children.count()); + TQMemArray oldState(_tqchildren.count()); + TQMemArray newState(_tqchildren.count()); - for (int i = 0; i< (int)_children.count();i++) { - oldState[i] = _children.at(i)->isSelected(); + for (int i = 0; i< (int)_tqchildren.count();i++) { + oldState[i] = _tqchildren.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) _children.count(); first+= 2 ) { - RegExpWidget* child = _children.at(first); + for (first = 1; first < (int) _tqchildren.count(); first+= 2 ) { + RegExpWidget* child = _tqchildren.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 = _children.count()-2; last>first; last -= 2) { - RegExpWidget* child = _children.at(last); + for (last = _tqchildren.count()-2; last>first; last -= 2) { + RegExpWidget* child = _tqchildren.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) _children.count(); k+=2) { - RegExpWidget* child = _children.at(k); + for (int k = 0; k< (int) _tqchildren.count(); k+=2) { + RegExpWidget* child = _tqchildren.at(k); bool select; - if ( k == 0 || k == (int)_children.count()-1) { + if ( k == 0 || k == (int)_tqchildren.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->repaint(); + child->tqrepaint(); } changed = changed || isSel != _isSelected; if ( changed ) { - repaint(); + tqrepaint(); } return changed; @@ -183,7 +183,7 @@ TQRect MultiContainerWidget::selectionRect() const return TQRect( mapToGlobal( TQPoint(0,0) ), size() ); else { TQRect res; - TQPtrListIterator it(_children); + TQPtrListIterator it(_tqchildren); ++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 < _children.count(); i+=incr ) { - RegExpWidget* wid = _children.at(i)->widgetUnderPoint( globalPos, justVisibleWidgets ); + for ( unsigned int i = start; i < _tqchildren.count(); i+=incr ) { + RegExpWidget* wid = _tqchildren.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 < _children.count(); i+=2 ) { - RegExpWidget* wid = _children.at(i)->findWidgetToEdit( globalPos ); + for ( unsigned int i = 1; i < _tqchildren.count(); i+=2 ) { + RegExpWidget* wid = _tqchildren.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(_children); + TQPtrListIterator it(_tqchildren); for ( ; *it ; ++it ) { (*it)->selectWidget( sel ); } @@ -250,7 +250,7 @@ void MultiContainerWidget::selectWidget( bool sel ) void MultiContainerWidget::updateAll() { - for ( TQPtrListIterator it(_children); *it ; ++it ) { + for ( TQPtrListIterator it(_tqchildren); *it ; ++it ) { (*it)->updateAll(); } RegExpWidget::updateAll(); @@ -258,8 +258,8 @@ void MultiContainerWidget::updateAll() void MultiContainerWidget::updateCursorRecursively() { - for ( TQPtrListIterator it(_children); *it ; ++it ) { + for ( TQPtrListIterator it(_tqchildren); *it ; ++it ) { (*it)->updateCursorRecursively(); } - updateCursorShape(); + updatetqCursorShape(); } diff --git a/kregexpeditor/multicontainerwidget.h b/kregexpeditor/multicontainerwidget.h index 4dd6a58..560baa0 100644 --- a/kregexpeditor/multicontainerwidget.h +++ b/kregexpeditor/multicontainerwidget.h @@ -21,7 +21,7 @@ #include "regexpwidget.h" /** - Abstract RegExp widget class representing widgets having multible children. + Abstract RegExp widget class representing widgets having multible tqchildren. @internal */ class MultiContainerWidget :public RegExpWidget @@ -43,7 +43,7 @@ public: protected: void append( RegExpWidget* child ); - TQPtrList _children; + TQPtrList _tqchildren; }; diff --git a/kregexpeditor/myfontmetrics.cpp b/kregexpeditor/myfontmetrics.cpp index 05b4ef3..38eb7dd 100644 --- a/kregexpeditor/myfontmetrics.cpp +++ b/kregexpeditor/myfontmetrics.cpp @@ -19,7 +19,7 @@ TQSize HackCalculateFontSize(TQFontMetrics fm, TQString str ) { - TQStringList list = TQStringList::split( TQString::fromLatin1("\n"), str ); + TQStringList list = TQStringList::split( TQString::tqfromLatin1("\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 080dc2c..6e9dc5e 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::fromLatin1("") ) ); + dynamic_cast( $$ )->addRegExp( new TextRegExp( false, QString::tqfromLatin1("") ) ); } | TOK_Bar term { $$ = new AltnRegExp( false ); - dynamic_cast( $$ )->addRegExp( new TextRegExp( false, QString::fromLatin1("") ) ); + dynamic_cast( $$ )->addRegExp( new TextRegExp( false, QString::tqfromLatin1("") ) ); 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")).arg( $1 ); + QString match = TQString(TQString::fromLocal8Bit("\\%1")).tqarg( $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.") - .arg( match ).arg( match ), + .tqarg( match ).tqarg( 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")).arg($1)); + $$ = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg($1)); } - | TOK_EscapeChar { $$ = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).arg($1)); } + | TOK_EscapeChar { $$ = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg($1)); } ; %% diff --git a/kregexpeditor/qt-only/compat.h b/kregexpeditor/qt-only/compat.h index 6e8c09f..cd3d10f 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 c63550b..72f9290 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->children(); + RegExpList list = regexp->tqchildren(); for ( RegExpListIt it(list); *it; ++it ) { if ( !first ) { - res += TQString::fromLatin1( "|" ); + res += TQString::tqfromLatin1( "|" ); } first = false; if ( markSelection && !regexp->isSelected() && (*it)->isSelected() ) { - res += TQString::fromLatin1("(") + toStr( *it, markSelection ) + TQString::fromLatin1(")"); + res += TQString::tqfromLatin1("(") + toStr( *it, markSelection ) + TQString::tqfromLatin1(")"); } else { res += toStr( *it, markSelection ); @@ -69,7 +69,7 @@ TQString TQtRegExpConverter::toString( ConcRegExp* regexp, bool markSelection ) TQString res; bool childSelected = false; - RegExpList list = regexp->children(); + RegExpList list = regexp->tqchildren(); 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::fromLatin1( "(" ); - endPar = TQString::fromLatin1( ")" ); + startPar = TQString::tqfromLatin1( "(" ); + endPar = TQString::tqfromLatin1( ")" ); } // 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::fromLatin1("("); + res += TQString::tqfromLatin1("("); childSelected = true; } if ( markSelection && childSelected && !regexp->isSelected() && !(*it)->isSelected() ) { - res += TQString::fromLatin1(")"); + res += TQString::tqfromLatin1(")"); childSelected= false; } res += startPar + toStr( *it, markSelection ) + endPar; } if ( markSelection && childSelected && !regexp->isSelected() ) { - res += TQString::fromLatin1(")"); + res += TQString::tqfromLatin1(")"); } 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::fromLatin1( "(?=" ) + toStr( regexp->child(), markSelection ) + TQString::fromLocal8Bit( ")" ); + return TQString::tqfromLatin1( "(?=" ) + toStr( regexp->child(), markSelection ) + TQString::fromLocal8Bit( ")" ); else - return TQString::fromLatin1( "(?!" ) + toStr( regexp->child(), markSelection ) + TQString::fromLocal8Bit( ")" ); + return TQString::tqfromLatin1( "(?!" ) + 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::fromLatin1("-")+ (*it)->second()); + txt.append((*it)->first()+ TQString::tqfromLatin1("-")+ (*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::fromLatin1("["); + TQString res = TQString::tqfromLatin1("["); if ( regexp->negate() ) - res.append(TQString::fromLatin1("^")); + res.append(TQString::tqfromLatin1("^")); // a ']' must be the first character in teh range. if ( foundParenthesis ) { - res.append(TQString::fromLatin1("]")); + res.append(TQString::tqfromLatin1("]")); } // a '-' must be the first character ( only coming after a ']') if ( foundDash ) { - res.append(TQString::fromLatin1("-")); + res.append(TQString::tqfromLatin1("-")); } res += txt; @@ -184,7 +184,7 @@ TQString TQtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelec res.append( TQChar( '^' ) ); } - res.append(TQString::fromLatin1("]")); + res.append(TQString::tqfromLatin1("]")); 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::fromLatin1( "(" ) + toStr( regexp->child(), markSelection ) + TQString::fromLatin1( ")" ); + return TQString::tqfromLatin1( "(" ) + toStr( regexp->child(), markSelection ) + TQString::tqfromLatin1( ")" ); else return toStr( regexp->child(), markSelection ); } TQString TQtRegExpConverter::toString( DotRegExp* /*regexp*/, bool /*markSelection*/ ) { - return TQString::fromLatin1( "." ); + return TQString::tqfromLatin1( "." ); } TQString TQtRegExpConverter::toString( PositionRegExp* regexp, bool /*markSelection*/ ) { switch (regexp->position()) { case PositionRegExp::BEGLINE: - return TQString::fromLatin1("^"); + return TQString::tqfromLatin1("^"); case PositionRegExp::ENDLINE: - return TQString::fromLatin1("$"); + return TQString::tqfromLatin1("$"); case PositionRegExp::WORDBOUNDARY: - return TQString::fromLatin1("\\b"); + return TQString::tqfromLatin1("\\b"); case PositionRegExp::NONWORDBOUNDARY: - return TQString::fromLatin1("\\B"); + return TQString::tqfromLatin1("\\B"); } Q_ASSERT( false ); - return TQString::fromLatin1(""); + return TQString::tqfromLatin1(""); } 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::fromLatin1( "(" ); - endPar = TQString::fromLatin1( ")" ); + startPar = TQString::tqfromLatin1( "(" ); + endPar = TQString::tqfromLatin1( ")" ); } else if ( child->precedence() < regexp->precedence() ) { - startPar = TQString::fromLatin1( "(?:" ); - endPar = TQString::fromLatin1( ")" ); + startPar = TQString::tqfromLatin1( "(?:" ); + endPar = TQString::tqfromLatin1( ")" ); } } else if ( child->precedence() < regexp->precedence() ) { - startPar = TQString::fromLatin1( "(" ); - endPar = TQString::fromLatin1( ")" ); + startPar = TQString::tqfromLatin1( "(" ); + endPar = TQString::tqfromLatin1( ")" ); } if ( regexp->min() == 0 && regexp->max() == -1) { @@ -285,7 +285,7 @@ TQString TQtRegExpConverter::toString( TextRegExp* regexp, bool /*markSelection* TQString TQtRegExpConverter::name() { - return TQString::fromLatin1( "TQt" ); + return TQString::tqfromLatin1( "TQt" ); } int TQtRegExpConverter::features() diff --git a/kregexpeditor/qtregexphighlighter.h b/kregexpeditor/qtregexphighlighter.h index 70ae5f0..8bf1c55 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 0b583d7..cb94e84 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(_children); *it; ++it ) { + for ( TQPtrListIterator it(_tqchildren); *it; ++it ) { delete *it; } if ( _parent ) @@ -38,14 +38,14 @@ RegExp::~RegExp() void RegExp::addChild( RegExp* child ) { - _children.append( child ); + _tqchildren.append( child ); child->setParent( this ); } void RegExp::removeChild( RegExp* child ) { if ( ! _destructing ) { - _children.remove( child ); + _tqchildren.remove( child ); } } @@ -68,7 +68,7 @@ RegExp* RegExp::readRegExp( TQDomElement top, const TQString& version ) TQString RegExp::toXmlString() const { TQDomDocument doc; - doc.setContent( TQString::fromLatin1( "" ) ); + doc.setContent( TQString::tqfromLatin1( "" ) ); TQDomNode top = doc.documentElement(); top.toElement().setAttribute(TQString::fromLocal8Bit("version"), KRegExpEditorGUI::version); diff --git a/kregexpeditor/regexp.h b/kregexpeditor/regexp.h index 5b2bcae..9e0b384 100644 --- a/kregexpeditor/regexp.h +++ b/kregexpeditor/regexp.h @@ -59,7 +59,7 @@ protected: private: RegExp() {} // disable - TQPtrList _children; + TQPtrList _tqchildren; RegExp* _parent; bool _destructing; bool _selected; diff --git a/kregexpeditor/regexpbuttons.cpp b/kregexpeditor/regexpbuttons.cpp index cb8b7ae..abbfb38 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 *layout = boxLayout(); + TQBoxLayout *tqlayout = 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::fromLatin1("kregexpeditor/pics/select.png") ), KIcon::Toolbar ); + TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::tqfromLatin1("kregexpeditor/pics/select.png") ), KIcon::Toolbar ); #endif _selectBut->setPixmap( pix ); - layout->addWidget( _selectBut ); + tqlayout->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)" ) ); - layout->addWidget( but ); + tqlayout->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.") ); - layout->addWidget( but ); + tqlayout->addWidget( but ); but = insert(DOT, "anychar", i18n("Any character"), i18n("This will match any single character") ); - layout->addWidget( but ); + tqlayout->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.") ); - layout->addWidget( but ); + tqlayout->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.") ); - layout->addWidget( but ); + tqlayout->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.") ); - layout->addWidget( but ); + tqlayout->addWidget( but ); but = insert(BEGLINE, "begline", i18n("Beginning of line"), i18n("This will match the beginning of a line.") ); - layout->addWidget( but ); + tqlayout->addWidget( but ); but = insert(ENDLINE, "endline", i18n("End of line"), i18n("This will match the end of a line.") ); - layout->addWidget( but ); + tqlayout->addWidget( but ); _wordBoundary = insert(WORDBOUNDARY, "wordboundary", i18n("Word boundary"), i18n("This asserts a word boundary (This part does not actually match any characters)") ); - layout->addWidget( _wordBoundary ); + tqlayout->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)") ); - layout->addWidget( _nonWordBoundary ); + tqlayout->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.") ); - layout->addWidget( _posLookAhead ); + tqlayout->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.") ); - layout->addWidget( _negLookAhead ); + tqlayout->addWidget( _negLookAhead ); } DoubleClickButton* RegExpButtons::insert(RegExpType tp, const char* name, TQString tooltip, TQString whatsthis) { #ifdef TQT_ONLY TQPixmap pix; - pix.convertFromImage( qembed_findImage( TQString::fromLatin1( name ) ) ); + pix.convertFromImage( qembed_findImage( TQString::tqfromLatin1( name ) ) ); #else - TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::fromLatin1("kregexpeditor/pics/")+TQString::fromLatin1(name) + - TQString::fromLatin1(".png") ), KIcon::Toolbar ); + TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::tqfromLatin1("kregexpeditor/pics/")+TQString::tqfromLatin1(name) + + TQString::tqfromLatin1(".png") ), KIcon::Toolbar ); #endif DoubleClickButton* but = new DoubleClickButton( pix, this, "RegExpButtons::but"); diff --git a/kregexpeditor/regexpconverter.cpp b/kregexpeditor/regexpconverter.cpp index 22373ce..951f0d7 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::fromLatin1( "" ); + return TQString::tqfromLatin1( "" ); } diff --git a/kregexpeditor/regexpwidget.cpp b/kregexpeditor/regexpwidget.cpp index 231848f..c164c51 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 children"); + qFatal("This widget should not expect any tqchildren"); } void RegExpWidget::addNewConcChild(DragAccepter *, ConcWidget *) { - qFatal("This widget should not expect any children"); + qFatal("This widget should not expect any tqchildren"); } void RegExpWidget::setConcChild(ConcWidget *) { - qFatal("This widget should not expect any children"); + qFatal("This widget should not expect any tqchildren"); } bool RegExpWidget::updateSelection(bool parentSelected) @@ -65,7 +65,7 @@ bool RegExpWidget::updateSelection(bool parentSelected) if ( _isSelected != selected ) { // Selection state changed _isSelected = selected; - repaint(); + tqrepaint(); return true; } return false; @@ -164,10 +164,10 @@ TQRect RegExpWidget::selectionRect() const void RegExpWidget::enterEvent( TQEvent * ) { - updateCursorShape(); + updatetqCursorShape(); } -void RegExpWidget::updateCursorShape() +void RegExpWidget::updatetqCursorShape() { TQCursor cursor; @@ -191,7 +191,7 @@ void RegExpWidget::updateCursorShape() void RegExpWidget::updateCursorRecursively() { - updateCursorShape(); + updatetqCursorShape(); } diff --git a/kregexpeditor/regexpwidget.h b/kregexpeditor/regexpwidget.h index d9480e9..2fd455a 100644 --- a/kregexpeditor/regexpwidget.h +++ b/kregexpeditor/regexpwidget.h @@ -49,7 +49,7 @@ public: virtual void addNewChild(DragAccepter *accepter, RegExpWidget *child); /** - Inserts all the children of `child' into this widget in place of + Inserts all the tqchildren 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 children is selected. + Returns true if this widget or one of its tqchildren 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. `repaint' is invoked on the widget if + the last time the widget was painted. `tqrepaint' 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 updateCursorShape(); + void updatetqCursorShape(); virtual void updateCursorRecursively(); diff --git a/kregexpeditor/repeatregexp.cpp b/kregexpeditor/repeatregexp.cpp index 92b5ac8..3a03e90 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

") - .arg(TQString::fromLatin1("lower")).arg(TQString::fromLatin1("Repeat")).arg(lower), + .tqarg(TQString::tqfromLatin1("lower")).tqarg(TQString::tqfromLatin1("Repeat")).tqarg(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

") - .arg(TQString::fromLatin1("upper")).arg(TQString::fromLatin1("Repeat")).arg(upper), + .tqarg(TQString::tqfromLatin1("upper")).tqarg(TQString::tqfromLatin1("Repeat")).tqarg(upper), i18n("Error While Loading From XML File") ) ; _upper = -1; } diff --git a/kregexpeditor/repeatwidget.cpp b/kregexpeditor/repeatwidget.cpp index aca3dc7..86f87f9 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::sizeHint() const +TQSize RepeatWidget::tqsizeHint() const { - // TODO: Merge with LookAheadWidget::sizeHint + // TODO: Merge with LookAheadWidget::tqsizeHint TQFontMetrics metrics = fontMetrics(); _textSize = metrics.size( 0, _content->text() ); - _childSize = _child->sizeHint(); + _childSize = _child->tqsizeHint(); 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::sizeHint() const void RepeatWidget::paintEvent( TQPaintEvent *e ) { // TODO: Merge with LookAheadWidget::paintEvent - TQSize mySize = sizeHint(); + TQSize mySize = tqsizeHint(); 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) ); - repaint(); + tqrepaint(); } int RepeatWidget::edit() { - _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->sizeHint().width()/2, - _configWindow->sizeHint().height()/2) ); + _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->tqsizeHint().width()/2, + _configWindow->tqsizeHint().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") - .arg( _rangeFrom->value() ).arg( _rangeTo->value() ); + .tqarg( _rangeFrom->value() ).tqarg( _rangeTo->value() ); } qFatal("Fall through!"); return TQString::fromLocal8Bit(""); diff --git a/kregexpeditor/repeatwidget.h b/kregexpeditor/repeatwidget.h index 98ea6ee..8911461 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 sizeHint() const; + virtual TQSize tqsizeHint() 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 07e8bf0..b14261c 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->sizeHint(); + TQSize childSize = _editorWindow->tqsizeHint(); TQSize vpSize = _scrollView->viewportSize(10,10); bool change = false; diff --git a/kregexpeditor/selectablelineedit.cpp b/kregexpeditor/selectablelineedit.cpp index 0e085d5..ac42c83 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(palette()); + TQPalette pal = TQPalette(tqpalette()); pal.setBrush( TQColorGroup::Base, gray ); setPalette( pal ); } else { unsetPalette(); } - repaint(); + tqrepaint(); } -TQSize SelectableLineEdit::sizeHint() const +TQSize SelectableLineEdit::tqsizeHint() const { int frameWidth = frame() ? 8 : 4; // from TQLineEdit source TQFontMetrics metrics = fontMetrics(); int actualSize = metrics.width( text() ); int charWidth = metrics.maxWidth(); - int height = TQLineEdit::sizeHint().height(); + int height = TQLineEdit::tqsizeHint().height(); int width; if ( hasFocus() ) @@ -67,7 +67,7 @@ void SelectableLineEdit::slotKeyPressed() int actualSize = metrics.width( text() ); if ( actualSize > size().width()-frameWidth ) { - repaint(); + tqrepaint(); emit parentPleaseUpdate(); } } diff --git a/kregexpeditor/selectablelineedit.h b/kregexpeditor/selectablelineedit.h index 79522b3..7fb7ad7 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 sizeHint() const; + virtual TQSize tqsizeHint() const; protected slots: void slotKeyPressed(); diff --git a/kregexpeditor/singlecontainerwidget.cpp b/kregexpeditor/singlecontainerwidget.cpp index 52ee1fe..2413236 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) - repaint(); + tqrepaint(); return changed; } @@ -126,7 +126,7 @@ void SingleContainerWidget::updateAll() void SingleContainerWidget::updateCursorRecursively() { _child->updateCursorRecursively(); - updateCursorShape(); + updatetqCursorShape(); } diff --git a/kregexpeditor/test-without-dl/main.cpp b/kregexpeditor/test-without-dl/main.cpp index 0094b4a..76e2fbe 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::fromLatin1( "#include" ) ); + iface->setRegExp( TQString::tqfromLatin1( "#include" ) ); iface->doSomething( "setMinimal", (void*) false ); - iface->doSomething( "setSyntax", (void*) new TQString( TQString::fromLatin1( "Emacs" ) ) ); + iface->doSomething( "setSyntax", (void*) new TQString( TQString::tqfromLatin1( "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 0a92073..78c2696 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

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

Invalid sub element to element TextRange. Tag was %1

").tqarg(child.tagName()), i18n("Error While Loading From XML File") ) ; return false; } diff --git a/kregexpeditor/textregexp.cpp b/kregexpeditor/textregexp.cpp index c31f9ac..d53d916 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::fromLatin1( "" ); + _text = TQString::tqfromLatin1( "" ); } return true; diff --git a/kregexpeditor/textwidget.cpp b/kregexpeditor/textwidget.cpp index d2f7549..99a77e1 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 repaint, as the size change of this + // I need to force the parent to tqrepaint, 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 repaint, and the text widget would not be + // case the parent would not tqrepaint, and the text widget would not be // resized. TQWidget *p = TQT_TQWIDGET(parent()); if (p) - p->repaint(); + p->tqrepaint(); _editorWindow->updateContent( this ); } -TQSize TextWidget::sizeHint() const +TQSize TextWidget::tqsizeHint() const { - return _edit->sizeHint(); + return _edit->tqsizeHint(); } void TextWidget::paintEvent( TQPaintEvent *e) diff --git a/kregexpeditor/textwidget.h b/kregexpeditor/textwidget.h index ac1c069..71ccf9b 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 sizeHint() const; + virtual TQSize tqsizeHint() 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 d1c63ee..85dc96e 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::fromLatin1( "predefined" ); + dirs << TQString::tqfromLatin1( "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::fromLatin1("general")) + if (_title == TQString::tqfromLatin1("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").arg(fileName) ); + KMessageBox::sorry( this, i18n("Could not open file for reading: %1").tqarg(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").arg( fileName ) ); + KMessageBox::sorry( this, i18n("File %1 containing user defined regular expression contained an error").tqarg( 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?

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

Overwrite named regular expression %1?

").tqarg(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::fromLatin1( "predefined" ); + return TQString::tqfromLatin1( "predefined" ); #else return locateLocal("data", TQString::fromLocal8Bit("KRegExpEditor/")); #endif diff --git a/kregexpeditor/util.cpp b/kregexpeditor/util.cpp index a57f99c..b6cf4c6 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::fromLatin1("kregexpeditor/pics/") +name ), + return KGlobal::iconLoader()->loadIcon(locate("data", TQString::tqfromLatin1("kregexpeditor/pics/") +name ), KIcon::Toolbar ); #endif } diff --git a/kregexpeditor/verifier.cpp b/kregexpeditor/verifier.cpp index 23198be..18e1be3 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::fromLatin1("match%1").arg(which); +// TQString anchor = TQString::tqfromLatin1("match%1").tqarg(which); // scrollToAnchor( anchor ); // _current = which; // emit currentChanged( _current ); diff --git a/kregexpeditor/verifier.h b/kregexpeditor/verifier.h index 951c217..d1999d6 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 366130c..675d3e6 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* layout = boxLayout(); + TQBoxLayout* tqlayout = boxLayout(); _verify = new TQToolButton(this); - TQIconSet icon = Util::getSystemIconSet( TQString::fromLatin1("spellcheck")); + TQIconSet icon = Util::getSystemIconSet( TQString::tqfromLatin1("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).")); - layout->addWidget( _verify ); + tqlayout->addWidget( _verify ); connect( _verify, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( verify() ) ); TQToolButton* button = new TQToolButton(this); - button->setPixmap( Util::getSystemIcon( TQString::fromLatin1("fileopen")) ); - layout->addWidget( button ); + button->setPixmap( Util::getSystemIcon( TQString::tqfromLatin1("fileopen")) ); + tqlayout->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::fromLatin1("package_settings")) ); - layout->addWidget( button ); + button->setPixmap( Util::getSystemIcon( TQString::tqfromLatin1("package_settings")) ); + tqlayout->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::fromLatin1("<<"), this); - // layout->addWidget( _first ); + // _first = new TQToolButton( TQString::tqfromLatin1("<<"), this); + // tqlayout->addWidget( _first ); // connect(_first, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoFirst())); // _first->setFixedWidth( 25 ); // - // _prev = new TQToolButton(TQString::fromLatin1("<"), this); - // layout->addWidget( _prev ); + // _prev = new TQToolButton(TQString::tqfromLatin1("<"), this); + // tqlayout->addWidget( _prev ); // connect(_prev, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoPrev())); // _prev->setFixedWidth( 20 ); // - // _next = new TQToolButton(TQString::fromLatin1(">"), this); - // layout->addWidget( _next ); + // _next = new TQToolButton(TQString::tqfromLatin1(">"), this); + // tqlayout->addWidget( _next ); // connect(_next, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoNext())); // _next->setFixedWidth( 20 ); // - // _last = new TQToolButton(TQString::fromLatin1(">>"), this); - // layout->addWidget( _last ); + // _last = new TQToolButton(TQString::tqfromLatin1(">>"), this); + // tqlayout->addWidget( _last ); // connect(_last, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoLast())); // _last->setFixedWidth( 25 ); // Same as above // TQLabel* label = new TQLabel( i18n("Matches: "), this ); -// layout->addWidget( label ); +// tqlayout->addWidget( label ); // _matches = new TQLabel(i18n("-"), this ); -// layout->addWidget( _matches ); +// tqlayout->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::fromLatin1("-") ); + _matches->setText( TQString::tqfromLatin1("-") ); else _matches->setText( TQString::number( count ) ); */ diff --git a/kregexpeditor/widgetfactory.cpp b/kregexpeditor/widgetfactory.cpp index 1ab5d24..9f167b2 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

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

Unknown tag while reading XML. Tag was %1

").tqarg(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.

").arg(TQString::fromLatin1("RegularExpression")), + KMessageBox::sorry( 0, i18n("

XML file did not contain a %1 tag.

").tqarg(TQString::tqfromLatin1("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.

").arg(TQString::fromLatin1("RegularExpression")), + "%1 was not an element.

").tqarg(TQString::tqfromLatin1("RegularExpression")), i18n("Error While Loading From XML File") ) ; } diff --git a/kregexpeditor/zerowidgets.cpp b/kregexpeditor/zerowidgets.cpp index 7c1f6c6..eaf1aaf 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 children should be added to this widget!"); + qFatal("No tqchildren should be added to this widget!"); } -TQSize ZeroWidget::sizeHint() const +TQSize ZeroWidget::tqsizeHint() const { TQFontMetrics metrics = fontMetrics(); _textSize = HackCalculateFontSize( metrics, _text ); @@ -54,7 +54,7 @@ TQSize ZeroWidget::sizeHint() const void ZeroWidget::paintEvent( TQPaintEvent *e) { // So what is my Size? - TQSize mySize = sizeHint(); + TQSize mySize = tqsizeHint(); TQPainter painter(this); drawPossibleSelection( painter, mySize); diff --git a/kregexpeditor/zerowidgets.h b/kregexpeditor/zerowidgets.h index 04dd5c7..780f426 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 sizeHint() const; + virtual TQSize tqsizeHint() const; protected: virtual void paintEvent( TQPaintEvent *e ); -- cgit v1.2.1