summaryrefslogtreecommitdiffstats
path: root/kregexpeditor
diff options
context:
space:
mode:
Diffstat (limited to 'kregexpeditor')
-rw-r--r--kregexpeditor/KMultiFormListBox/ccp.cpp26
-rw-r--r--kregexpeditor/KMultiFormListBox/ccp.h6
-rw-r--r--kregexpeditor/KMultiFormListBox/indexWindow.cpp20
-rw-r--r--kregexpeditor/KMultiFormListBox/indexWindow.h18
-rw-r--r--kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp50
-rw-r--r--kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.h16
-rw-r--r--kregexpeditor/KMultiFormListBox/kmultiformlistbox-shower.h8
-rw-r--r--kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp50
-rw-r--r--kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.h18
-rw-r--r--kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp18
-rw-r--r--kregexpeditor/KMultiFormListBox/kmultiformlistbox.h20
-rw-r--r--kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.cpp6
-rw-r--r--kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h18
-rw-r--r--kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.cpp8
-rw-r--r--kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.h8
-rw-r--r--kregexpeditor/KMultiFormListBox/widgetwindow.cpp18
-rw-r--r--kregexpeditor/KMultiFormListBox/widgetwindow.h4
-rw-r--r--kregexpeditor/KMultiFormListBox/windowlistboxitem.cpp4
-rw-r--r--kregexpeditor/KMultiFormListBox/windowlistboxitem.h4
-rw-r--r--kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp100
-rw-r--r--kregexpeditor/KWidgetStreamer/kwidgetstreamer.h28
-rw-r--r--kregexpeditor/altnregexp.cpp10
-rw-r--r--kregexpeditor/altnregexp.h4
-rw-r--r--kregexpeditor/altnwidget.cpp34
-rw-r--r--kregexpeditor/altnwidget.h12
-rw-r--r--kregexpeditor/auxbuttons.cpp70
-rw-r--r--kregexpeditor/auxbuttons.h16
-rw-r--r--kregexpeditor/characterswidget.cpp166
-rw-r--r--kregexpeditor/characterswidget.h52
-rw-r--r--kregexpeditor/charselector.cpp74
-rw-r--r--kregexpeditor/charselector.h12
-rw-r--r--kregexpeditor/compoundregexp.cpp42
-rw-r--r--kregexpeditor/compoundregexp.h16
-rw-r--r--kregexpeditor/compoundwidget.cpp88
-rw-r--r--kregexpeditor/compoundwidget.h42
-rw-r--r--kregexpeditor/concregexp.cpp12
-rw-r--r--kregexpeditor/concregexp.h4
-rw-r--r--kregexpeditor/concwidget.cpp56
-rw-r--r--kregexpeditor/concwidget.h14
-rw-r--r--kregexpeditor/dcbutton.cpp6
-rw-r--r--kregexpeditor/dcbutton.h8
-rw-r--r--kregexpeditor/dotregexp.cpp6
-rw-r--r--kregexpeditor/dotregexp.h4
-rw-r--r--kregexpeditor/drag.cpp28
-rw-r--r--kregexpeditor/drag.h12
-rw-r--r--kregexpeditor/dragaccepter.cpp22
-rw-r--r--kregexpeditor/dragaccepter.h12
-rw-r--r--kregexpeditor/editorwindow.cpp144
-rw-r--r--kregexpeditor/editorwindow.h44
-rw-r--r--kregexpeditor/emacsregexpconverter.cpp130
-rw-r--r--kregexpeditor/emacsregexpconverter.h20
-rw-r--r--kregexpeditor/errormap.cpp6
-rw-r--r--kregexpeditor/gen_qregexplexer.cpp58
-rw-r--r--kregexpeditor/gen_qregexpparser.cc20
-rw-r--r--kregexpeditor/infopage.cpp24
-rw-r--r--kregexpeditor/infopage.h6
-rw-r--r--kregexpeditor/kregexpeditorgui.cpp64
-rw-r--r--kregexpeditor/kregexpeditorgui.h30
-rw-r--r--kregexpeditor/kregexpeditorprivate.cpp186
-rw-r--r--kregexpeditor/kregexpeditorprivate.h32
-rw-r--r--kregexpeditor/limitedcharlineedit.cpp24
-rw-r--r--kregexpeditor/limitedcharlineedit.h8
-rw-r--r--kregexpeditor/lookaheadregexp.cpp10
-rw-r--r--kregexpeditor/lookaheadregexp.h4
-rw-r--r--kregexpeditor/lookaheadwidget.cpp20
-rw-r--r--kregexpeditor/lookaheadwidget.h16
-rw-r--r--kregexpeditor/main.cpp22
-rw-r--r--kregexpeditor/multicontainerwidget.cpp32
-rw-r--r--kregexpeditor/multicontainerwidget.h10
-rw-r--r--kregexpeditor/myfontmetrics.cpp10
-rw-r--r--kregexpeditor/myfontmetrics.h8
-rw-r--r--kregexpeditor/positionregexp.cpp14
-rw-r--r--kregexpeditor/positionregexp.h4
-rw-r--r--kregexpeditor/qt-only/compat.cpp60
-rw-r--r--kregexpeditor/qt-only/compat.h44
-rw-r--r--kregexpeditor/qtregexpconverter.cpp180
-rw-r--r--kregexpeditor/qtregexpconverter.h24
-rw-r--r--kregexpeditor/qtregexphighlighter.cpp12
-rw-r--r--kregexpeditor/qtregexphighlighter.h8
-rw-r--r--kregexpeditor/regexp.cpp20
-rw-r--r--kregexpeditor/regexp.h18
-rw-r--r--kregexpeditor/regexpbuttons.cpp58
-rw-r--r--kregexpeditor/regexpbuttons.h20
-rw-r--r--kregexpeditor/regexpconverter.cpp16
-rw-r--r--kregexpeditor/regexpconverter.h32
-rw-r--r--kregexpeditor/regexphighlighter.cpp6
-rw-r--r--kregexpeditor/regexphighlighter.h8
-rw-r--r--kregexpeditor/regexpwidget.cpp38
-rw-r--r--kregexpeditor/regexpwidget.h16
-rw-r--r--kregexpeditor/repeatregexp.cpp20
-rw-r--r--kregexpeditor/repeatregexp.h4
-rw-r--r--kregexpeditor/repeatwidget.cpp88
-rw-r--r--kregexpeditor/repeatwidget.h36
-rw-r--r--kregexpeditor/scrollededitorwindow.cpp46
-rw-r--r--kregexpeditor/scrollededitorwindow.h12
-rw-r--r--kregexpeditor/selectablelineedit.cpp26
-rw-r--r--kregexpeditor/selectablelineedit.h8
-rw-r--r--kregexpeditor/singlecontainerwidget.cpp12
-rw-r--r--kregexpeditor/singlecontainerwidget.h8
-rw-r--r--kregexpeditor/test-without-dl/main.cpp24
-rw-r--r--kregexpeditor/textrangeregexp.cpp74
-rw-r--r--kregexpeditor/textrangeregexp.h20
-rw-r--r--kregexpeditor/textregexp.cpp20
-rw-r--r--kregexpeditor/textregexp.h12
-rw-r--r--kregexpeditor/textwidget.cpp42
-rw-r--r--kregexpeditor/textwidget.h16
-rw-r--r--kregexpeditor/userdefinedregexps.cpp114
-rw-r--r--kregexpeditor/userdefinedregexps.h30
-rw-r--r--kregexpeditor/util.cpp16
-rw-r--r--kregexpeditor/util.h10
-rw-r--r--kregexpeditor/verifier.cpp8
-rw-r--r--kregexpeditor/verifier.h6
-rw-r--r--kregexpeditor/verifybuttons.cpp114
-rw-r--r--kregexpeditor/verifybuttons.h28
-rw-r--r--kregexpeditor/widgetfactory.cpp52
-rw-r--r--kregexpeditor/widgetfactory.h10
-rw-r--r--kregexpeditor/zerowidgets.cpp28
-rw-r--r--kregexpeditor/zerowidgets.h22
118 files changed, 1841 insertions, 1841 deletions
diff --git a/kregexpeditor/KMultiFormListBox/ccp.cpp b/kregexpeditor/KMultiFormListBox/ccp.cpp
index d64a3b2..d868591 100644
--- a/kregexpeditor/KMultiFormListBox/ccp.cpp
+++ b/kregexpeditor/KMultiFormListBox/ccp.cpp
@@ -21,28 +21,28 @@
#include "kmultiformlistbox-multivisible.h"
#include "ccp.h"
-#include <qobjectlist.h>
-#include <qpopupmenu.h>
+#include <tqobjectlist.h>
+#include <tqpopupmenu.h>
#ifdef QT_ONLY
#include "compat.h"
#else
#include <klocale.h>
#endif
-CCP::CCP(KMultiFormListBoxMultiVisible *ee_, KMultiFormListBoxEntry *eee_) : QObject() {
+CCP::CCP(KMultiFormListBoxMultiVisible *ee_, KMultiFormListBoxEntry *eee_) : TQObject() {
ee = ee_;
eee = eee_;
install(eee);
}
-void CCP::install(QObject *elm)
+void CCP::install(TQObject *elm)
{
elm->installEventFilter(this);
- const QObjectList *children = elm->children();
+ const TQObjectList *children = elm->children();
if (children) {
- QObjectListIt it = QObjectListIt(*children);
+ TQObjectListIt it = TQObjectListIt(*children);
- while (QObject *child=it.current()) {
+ while (TQObject *child=it.current()) {
if (child->inherits("KMultiFormListBoxMultiVisible")) {
// Stop if the widget is an KMultiFormListBox, as this widget has its own cut/copy/paste
}
@@ -55,17 +55,17 @@ void CCP::install(QObject *elm)
}
// This function post the Cut/Copy/Paste menu
-bool CCP::eventFilter(QObject *, QEvent *event)
+bool CCP::eventFilter(TQObject *, TQEvent *event)
{
- if (event->type() != QEvent::MouseButtonPress ||
- ((QMouseEvent *) event)->button() != RightButton ||
- ((QMouseEvent *) event)->state() != QEvent::ControlButton) {
+ if (event->type() != TQEvent::MouseButtonPress ||
+ ((TQMouseEvent *) event)->button() != RightButton ||
+ ((TQMouseEvent *) event)->state() != TQEvent::ControlButton) {
return false;
}
- QPoint pos = ((QMouseEvent *) event)->globalPos();
+ TQPoint pos = ((TQMouseEvent *) event)->globalPos();
- QPopupMenu *menu = new QPopupMenu();
+ TQPopupMenu *menu = new TQPopupMenu();
menu->insertItem(i18n("Cut"),1);
menu->insertItem(i18n("Copy"),2);
menu->insertItem(i18n("Paste"),3);
diff --git a/kregexpeditor/KMultiFormListBox/ccp.h b/kregexpeditor/KMultiFormListBox/ccp.h
index 41857a5..2c249c9 100644
--- a/kregexpeditor/KMultiFormListBox/ccp.h
+++ b/kregexpeditor/KMultiFormListBox/ccp.h
@@ -38,7 +38,7 @@
@internal
**/
-class CCP :public QObject {
+class CCP :public TQObject {
private:
friend class KMultiFormListBoxMultiVisible;
@@ -48,8 +48,8 @@ private:
**/
CCP(KMultiFormListBoxMultiVisible *,KMultiFormListBoxEntry *);
- void install(QObject *);
- bool eventFilter(QObject *, QEvent *);
+ void install(TQObject *);
+ bool eventFilter(TQObject *, TQEvent *);
// Instance variables.
diff --git a/kregexpeditor/KMultiFormListBox/indexWindow.cpp b/kregexpeditor/KMultiFormListBox/indexWindow.cpp
index 362d012..dccb184 100644
--- a/kregexpeditor/KMultiFormListBox/indexWindow.cpp
+++ b/kregexpeditor/KMultiFormListBox/indexWindow.cpp
@@ -24,13 +24,13 @@
#include "indexWindow.h"
#include <iostream>
-#include <qlayout.h>
+#include <tqlayout.h>
-indexWindow::indexWindow() : QWidget(0,"", WStyle_Customize | WType_Popup)
+indexWindow::indexWindow() : TQWidget(0,"", WStyle_Customize | WType_Popup)
{
- lb = new QListBox(this);
- connect(lb,SIGNAL(selected(int)), this, SLOT(lbSelected(int)));
- QHBoxLayout *lay = new QHBoxLayout(this);
+ lb = new TQListBox(this);
+ connect(lb,TQT_SIGNAL(selected(int)), this, TQT_SLOT(lbSelected(int)));
+ TQHBoxLayout *lay = new TQHBoxLayout(this);
lay->addWidget(lb);
lbFinish = false;
}
@@ -50,20 +50,20 @@ void indexWindow::finish(int index)
}
-void indexWindow::insertItem(QString txt)
+void indexWindow::insertItem(TQString txt)
{
lb->insertItem(txt);
}
-void indexWindow::hideEvent(QHideEvent *h)
+void indexWindow::hideEvent(TQHideEvent *h)
{
- QWidget::hideEvent(h);
+ TQWidget::hideEvent(h);
if (!lbFinish)
finish(-1);
}
-int indexWindow::exec(const QPoint & /*start*/, int /*width*/)
+int indexWindow::exec(const TQPoint & /*start*/, int /*width*/)
{
// This code is not xinerama safe, on the other hand this part of the widget
// is not used in KRegExpEditor. This is part of a widget which has
@@ -76,7 +76,7 @@ int indexWindow::exec(const QPoint & /*start*/, int /*width*/)
int elm_h = lb->item(0)->height(lb) * lb->count();
elm_h += 2*lb->frameWidth();
- QWidget *desktop = QApplication::desktop();
+ TQWidget *desktop = TQApplication::desktop();
int desktop_h = desktop->height();
int rest_h = desktop_h - start.y();
int below_h = QMAX(rest_h, 200);
diff --git a/kregexpeditor/KMultiFormListBox/indexWindow.h b/kregexpeditor/KMultiFormListBox/indexWindow.h
index 3597960..ab20e73 100644
--- a/kregexpeditor/KMultiFormListBox/indexWindow.h
+++ b/kregexpeditor/KMultiFormListBox/indexWindow.h
@@ -18,7 +18,7 @@
#ifndef __indexWindow
#define __indexWindow
-#include <qlistbox.h>
+#include <tqlistbox.h>
/**
Post a toplevel listbox synchronously.
@@ -29,12 +29,12 @@
This widget takes care of posting this listbox, and ensuring that the
user can not do anything else before he has chosen an element.
- This widget resembles the behavior of @ref QPopupMenu, the difference
- is, however, that the QPopupMenu can not handle that the elements in the
+ This widget resembles the behavior of @ref TQPopupMenu, the difference
+ is, however, that the TQPopupMenu can not handle that the elements in the
menu exceed the size of the screen. This widget can.
- In the future this widget may be replaced with the QPopupMenu if the
- QPopupMenu can handle this situation. But for now - it works!
+ In the future this widget may be replaced with the TQPopupMenu if the
+ TQPopupMenu can handle this situation. But for now - it works!
@internal
**/
@@ -49,7 +49,7 @@ public:
This method inserts an element into the listbox which is shown when
the @ref exec method is invoked.
**/
- void insertItem(QString txt);
+ void insertItem(TQString txt);
/**
This function shows the index window with the elements inserted using
@@ -63,17 +63,17 @@ public:
@return The index of the element chosen, or -1 if no element has been
chosen.
**/
- int exec(const QPoint &start, int width);
+ int exec(const TQPoint &start, int width);
protected:
void finish(int retVal);
- virtual void hideEvent(QHideEvent *h);
+ virtual void hideEvent(TQHideEvent *h);
protected slots:
void lbSelected(int);
private:
- QListBox *lb;
+ TQListBox *lb;
bool lbFinish;
int itemSelected;
diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp
index 335863b..4a740c5 100644
--- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp
+++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp
@@ -18,7 +18,7 @@
#ifdef QT_ONLY
#include "compat.h"
- #include <qmessagebox.h>
+ #include <tqmessagebox.h>
#else
#include <kmessagebox.h>
#include "kmultiformlistbox-multivisible.moc"
@@ -28,7 +28,7 @@
#include "indexWindow.h"
#include "ccp.h"
-#include <qbitmap.h>
+#include <tqbitmap.h>
const int indexButtonWidth = 16;
const int indexButtonHeight = 12;
@@ -38,8 +38,8 @@ const uchar indexButtonBits[] = {
};
-KMultiFormListBoxMultiVisible::KMultiFormListBoxMultiVisible(KMultiFormListBoxFactory *fact, QWidget *parent, const char *name)
- : QScrollView(parent, name)
+KMultiFormListBoxMultiVisible::KMultiFormListBoxMultiVisible(KMultiFormListBoxFactory *fact, TQWidget *parent, const char *name)
+ : TQScrollView(parent, name)
{
factory = fact;
@@ -59,7 +59,7 @@ KMultiFormListBoxMultiVisible::KMultiFormListBoxMultiVisible(KMultiFormListBoxFa
KMultiFormListBoxEntryList KMultiFormListBoxMultiVisible::elements()
{
KMultiFormListBoxEntryList res;
- for (QWidget *child = elms->first(); child; child=elms->next()) {
+ for (TQWidget *child = elms->first(); child; child=elms->next()) {
if (strcmp(child->name(),"seperator") != 0) {
res.append((KMultiFormListBoxEntry *) child);
}
@@ -72,10 +72,10 @@ KMultiFormListBoxEntryList KMultiFormListBoxMultiVisible::elements()
// This function is called whenever the KMultiFormListBox widget is resized. It is
// necessary to ensure that the content of the clipper is resized.
//----------------------------------------------------------------------
-void KMultiFormListBoxMultiVisible::resizeEvent(QResizeEvent *e)
+void KMultiFormListBoxMultiVisible::resizeEvent(TQResizeEvent *e)
{
// The call of the super class ensures that the outer border is updated.
- QScrollView::resizeEvent(e);
+ TQScrollView::resizeEvent(e);
updateClipperContent();
}
@@ -93,7 +93,7 @@ void KMultiFormListBoxMultiVisible::updateClipperContent()
// calculate the required size.
- for (QWidget *child = elms->first(); child; child=elms->next()) {
+ for (TQWidget *child = elms->first(); child; child=elms->next()) {
maxWidth = QMAX(maxWidth, child->sizeHint().width());
if (strcmp(child->name(), "seperator") != 0) {
totalHeight += child->sizeHint().height();
@@ -113,7 +113,7 @@ void KMultiFormListBoxMultiVisible::updateClipperContent()
// Now place the elements in the clipper.
int yPos = 0;
- for (QWidget *child2 = elms->first(); child2; child2=elms->next()) {
+ for (TQWidget *child2 = elms->first(); child2; child2=elms->next()) {
int h;
if ( strcmp(child2->name(),"seperator") != 0) {
h = child2->sizeHint().height();
@@ -148,14 +148,14 @@ void KMultiFormListBoxMultiVisible::addElement(KMultiFormListBoxEntry *after)
void KMultiFormListBoxMultiVisible::append(KMultiFormListBoxEntry *elm)
{
- elm->reparent(viewport(), 0, QPoint(0,0), false);
+ elm->reparent(viewport(), 0, TQPoint(0,0), false);
insertElmIntoWidget(elm, 0);
}
-void KMultiFormListBoxMultiVisible::delElement(QWidget *elm)
+void KMultiFormListBoxMultiVisible::delElement(TQWidget *elm)
{
int index = elms->find(elm);
- QWidget *next = elms->at(index+1);
+ TQWidget *next = elms->at(index+1);
if (strcmp(next->name(),"seperator") != 0) {
elms->removeRef(next);
removeChild(next);
@@ -176,11 +176,11 @@ void KMultiFormListBoxMultiVisible::insertElmIntoWidget(KMultiFormListBoxEntry *
{
// Bind the index button if it exists.
if (elm->indexButton()) {
- elm->indexButton()->setPixmap(QBitmap(indexButtonWidth, indexButtonHeight,
+ elm->indexButton()->setPixmap(TQBitmap(indexButtonWidth, indexButtonHeight,
indexButtonBits, true));
- connect(elm->indexButton(), SIGNAL(clicked()), elm, SLOT(acceptIndexButton()));
- connect(elm, SIGNAL(gotoIndex(KMultiFormListBoxEntry *)),
- this, SLOT(showIndexList(KMultiFormListBoxEntry *)));
+ connect(elm->indexButton(), TQT_SIGNAL(clicked()), elm, TQT_SLOT(acceptIndexButton()));
+ connect(elm, TQT_SIGNAL(gotoIndex(KMultiFormListBoxEntry *)),
+ this, TQT_SLOT(showIndexList(KMultiFormListBoxEntry *)));
}
// Find the location to insert the new element.
@@ -194,7 +194,7 @@ void KMultiFormListBoxMultiVisible::insertElmIntoWidget(KMultiFormListBoxEntry *
elm->show();
addChild(elm,0,0); // updateClipperContent will place the child correctly.
- QWidget *sep = factory->separator(viewport());
+ TQWidget *sep = factory->separator(viewport());
if (sep != 0) {
sep->setName("seperator");
sep->show();
@@ -219,15 +219,15 @@ void KMultiFormListBoxMultiVisible::showIndexList(KMultiFormListBoxEntry *elm)
indexWindow *menu = new indexWindow();
// Insert the elements into the menu item.
- for (QWidget *child = elms->first(); child; child=elms->next()) {
+ for (TQWidget *child = elms->first(); child; child=elms->next()) {
if ( strcmp(child->name(), "seperator") != 0) {
- QString txt = ((KMultiFormListBoxEntry *) child)->idxString();
+ TQString txt = ((KMultiFormListBoxEntry *) child)->idxString();
menu->insertItem(txt);
}
}
// Calculate the location of the window
- QPoint start;
+ TQPoint start;
int width;
elm->indexWindowPos(&start, &width);
@@ -235,7 +235,7 @@ void KMultiFormListBoxMultiVisible::showIndexList(KMultiFormListBoxEntry *elm)
int index = menu->exec(start,width);
if (index != -1) {
- for (QWidget *child = elms->first(); child; child=elms->next()) {
+ for (TQWidget *child = elms->first(); child; child=elms->next()) {
if ( strcmp(child->name(), "seperator") != 0) {
if (index == 0) {
@@ -265,14 +265,14 @@ void KMultiFormListBoxMultiVisible::cut(KMultiFormListBoxEntry *elm)
return;
}
- QDataStream stream(clipboard, IO_WriteOnly);
+ TQDataStream stream(clipboard, IO_WriteOnly);
factory->toStream( elm, stream );
delElement(elm);
}
void KMultiFormListBoxMultiVisible::copy(KMultiFormListBoxEntry *elm)
{
- QDataStream stream(clipboard, IO_WriteOnly);
+ TQDataStream stream(clipboard, IO_WriteOnly);
factory->toStream(elm, stream);
}
@@ -284,7 +284,7 @@ void KMultiFormListBoxMultiVisible::paste(KMultiFormListBoxEntry *oldElm)
}
KMultiFormListBoxEntry *newElm = factory->create(viewport());
- QDataStream stream( clipboard, IO_ReadOnly );
+ TQDataStream stream( clipboard, IO_ReadOnly );
factory->fromStream(stream, newElm);
insertElmIntoWidget(newElm,oldElm);
}
@@ -294,7 +294,7 @@ int KMultiFormListBoxMultiVisible::countElements(WidgetList *elms)
{
int count = 0;
- for (QWidget *child = elms->first(); child; child=elms->next()) {
+ for (TQWidget *child = elms->first(); child; child=elms->next()) {
if (dynamic_cast<const KMultiFormListBoxEntry *>(child))
count++;
}
diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.h b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.h
index 87aeba4..309044a 100644
--- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.h
+++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.h
@@ -32,7 +32,7 @@
/**
@internal
*/
-class KMultiFormListBoxMultiVisible :public QScrollView, KMultiFormListBoxShower {
+class KMultiFormListBoxMultiVisible :public TQScrollView, KMultiFormListBoxShower {
Q_OBJECT
@@ -44,7 +44,7 @@ private:
class which is repeated in the KMultiFormListBox
@param parent A pointer to the parent widget
*/
- KMultiFormListBoxMultiVisible(KMultiFormListBoxFactory *factory, QWidget *parent = 0, const char *name = 0);
+ KMultiFormListBoxMultiVisible(KMultiFormListBoxFactory *factory, TQWidget *parent = 0, const char *name = 0);
/**
@return The elements in the KMultiFormListBox
@@ -52,7 +52,7 @@ private:
KMultiFormListBoxEntryList elements();
void append(KMultiFormListBoxEntry *);
- QWidget* qWidget() { return this; }
+ TQWidget* qWidget() { return this; }
public slots:
@@ -109,11 +109,11 @@ protected:
friend class CCP;
- virtual void resizeEvent(QResizeEvent *);
- void addElemBefore(KMultiFormListBoxEntry *newElm, QWidget *existing);
+ virtual void resizeEvent(TQResizeEvent *);
+ void addElemBefore(KMultiFormListBoxEntry *newElm, TQWidget *existing);
void insertElmIntoWidget(KMultiFormListBoxEntry *elm, KMultiFormListBoxEntry *after);
void showWidget(KMultiFormListBoxEntry *elm);
- void delElement(QWidget *);
+ void delElement(TQWidget *);
void delAnElement();
void addElemBefore(KMultiFormListBoxEntry *newElm, KMultiFormListBoxEntry *existing);
void updateClipperContent();
@@ -126,8 +126,8 @@ private:
KMultiFormListBoxFactory *factory;
WidgetList *elms;
- QPushButton *addBut;
- QByteArray clipboard;
+ TQPushButton *addBut;
+ TQByteArray clipboard;
};
diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-shower.h b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-shower.h
index fe786d7..15f3af5 100644
--- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-shower.h
+++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-shower.h
@@ -20,7 +20,7 @@
// -------------------------------- includes ------------------------------
//-------------------------------------------------------------------------
-typedef QPtrList<KMultiFormListBoxEntry> KMultiFormListBoxEntryList ;
+typedef TQPtrList<KMultiFormListBoxEntry> KMultiFormListBoxEntryList ;
/**
Abstract class defining the interface for widgets showing a number of @ref KMultiFormListBoxEntry.
@@ -35,14 +35,14 @@ public:
/** Appends the given argument to the list */
virtual void append(KMultiFormListBoxEntry *) = 0;
- /** Return the element as a QWidget */
- virtual QWidget* qWidget() = 0;
+ /** Return the element as a TQWidget */
+ virtual TQWidget* qWidget() = 0;
/** Adds an empty element. */
virtual void addElement() = 0;
/** Deletes an element at the given index. */
- virtual void delElement(QWidget *) = 0;
+ virtual void delElement(TQWidget *) = 0;
/** Deletes any element from the list */
virtual void delAnElement() = 0;
diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp
index 6ef14d3..c0e6090 100644
--- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp
+++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp
@@ -27,59 +27,59 @@
#include "widgetwindow.h"
#include "windowlistboxitem.h"
-KMultiFormListBoxWindowed::KMultiFormListBoxWindowed(KMultiFormListBoxFactory *factory, QWidget *parent,
+KMultiFormListBoxWindowed::KMultiFormListBoxWindowed(KMultiFormListBoxFactory *factory, TQWidget *parent,
bool showUpDownButtons, bool showHelpButton,
- QString addButtonText,const char *name)
- : QWidget( parent, name )
+ TQString addButtonText,const char *name)
+ : TQWidget( parent, name )
{
- _layout = new QVBoxLayout(this);
+ _layout = new TQVBoxLayout(this);
- QHBoxLayout *innerLayout = new QHBoxLayout();
+ TQHBoxLayout *innerLayout = new TQHBoxLayout();
_layout->addLayout(innerLayout);
_listbox = new KListBox(this,"listbox");
- _listbox->setSelectionMode(QListBox::Single);
+ _listbox->setSelectionMode(TQListBox::Single);
innerLayout->addWidget(_listbox);
- QVBoxLayout *buttons = new QVBoxLayout();
+ TQVBoxLayout *buttons = new TQVBoxLayout();
innerLayout->addLayout(buttons);
- QPushButton *but = new QPushButton(addButtonText, this,"Add Button");
+ TQPushButton *but = new TQPushButton(addButtonText, this,"Add Button");
buttons->addWidget(but,0);
- connect(but, SIGNAL(clicked()), this, SLOT(addNewElement()));
+ connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(addNewElement()));
- but = new QPushButton(i18n("Edit"), this,"Edit Button");
+ but = new TQPushButton(i18n("Edit"), this,"Edit Button");
buttons->addWidget(but,0);
- connect(but,SIGNAL(clicked()), this, SLOT(slotEditSelected()));
- connect(_listbox, SIGNAL(doubleClicked(QListBoxItem *)), this, SLOT(slotEditSelected(QListBoxItem *)));
+ connect(but,TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditSelected()));
+ connect(_listbox, TQT_SIGNAL(doubleClicked(TQListBoxItem *)), this, TQT_SLOT(slotEditSelected(TQListBoxItem *)));
_buttonList.append(but);
- but = new QPushButton(i18n("Delete"), this, "Delete Button");
+ but = new TQPushButton(i18n("Delete"), this, "Delete Button");
buttons->addWidget(but,0);
- connect(but, SIGNAL(clicked()), this, SLOT(slotDeleteEntry()));
+ connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteEntry()));
_buttonList.append(but);
- but = new QPushButton(i18n("Copy"), this, "Copy Button");
+ but = new TQPushButton(i18n("Copy"), this, "Copy Button");
buttons->addWidget(but,0);
- connect(but, SIGNAL(clicked()), this, SLOT(slotCopySelected()));
+ connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCopySelected()));
_buttonList.append(but);
if (showUpDownButtons) {
- but = new QPushButton(i18n("Up"), this, "Up Button");
+ but = new TQPushButton(i18n("Up"), this, "Up Button");
buttons->addWidget(but, 0);
- connect(but, SIGNAL(clicked()), this, SLOT(slotMoveItemUp()));
+ connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveItemUp()));
_buttonList.append(but);
- but = new QPushButton(i18n("Down"), this, "Down Button");
+ but = new TQPushButton(i18n("Down"), this, "Down Button");
buttons->addWidget(but, 0);
- connect(but, SIGNAL(clicked()), this, SLOT(slotMoveItemDown()));
+ connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveItemDown()));
_buttonList.append(but);
}
if (showHelpButton) {
but = new KPushButton(KStdGuiItem::help(), this, "Help Button");
buttons->addWidget(but, 0);
- connect(but, SIGNAL(clicked()), this, SIGNAL(showHelp()));
+ connect(but, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(showHelp()));
}
buttons->addStretch(1);
@@ -98,7 +98,7 @@ KMultiFormListBoxEntryList KMultiFormListBoxWindowed::elements()
return list;
}
-void KMultiFormListBoxWindowed::delElement(QWidget */*elm*/)
+void KMultiFormListBoxWindowed::delElement(TQWidget */*elm*/)
{
// kdDebug() << "KMultiFormListBoxWindowed::delElement NOT YET IMPLEMENTED"<<endl;
// TODO
@@ -121,9 +121,9 @@ void KMultiFormListBoxWindowed::addNewElement()
{
// kdDebug() << "addNewElement " << _factory << "," << _listbox << endl;
- QWidget *widget = new WidgetWindow(_factory, _listbox);
+ TQWidget *widget = new WidgetWindow(_factory, _listbox);
widget->show();
- connect(widget, SIGNAL(finished()), this, SLOT(slotUpdateButtonState()));
+ connect(widget, TQT_SIGNAL(finished()), this, TQT_SLOT(slotUpdateButtonState()));
}
void KMultiFormListBoxWindowed::addElement()
@@ -132,7 +132,7 @@ void KMultiFormListBoxWindowed::addElement()
slotUpdateButtonState();
}
-void KMultiFormListBoxWindowed::slotEditSelected(QListBoxItem *item)
+void KMultiFormListBoxWindowed::slotEditSelected(TQListBoxItem *item)
{
((WindowListboxItem *) item)->displayWidget();
}
diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.h b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.h
index 74d6d9f..873c406 100644
--- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.h
+++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.h
@@ -20,7 +20,7 @@
#ifdef QT_ONLY
#include "compat.h"
- #include <qlistbox.h>
+ #include <tqlistbox.h>
#else
#include <klistbox.h>
#endif
@@ -35,28 +35,28 @@ class WindowListboxItem;
@internal
*/
-class KMultiFormListBoxWindowed :public QWidget, KMultiFormListBoxShower {
+class KMultiFormListBoxWindowed :public TQWidget, KMultiFormListBoxShower {
Q_OBJECT
friend class KMultiFormListBox;
private:
- KMultiFormListBoxWindowed(KMultiFormListBoxFactory *factory, QWidget *parent,
- bool showUpDownButtons, bool showHelpButton, QString addButtonText,
+ KMultiFormListBoxWindowed(KMultiFormListBoxFactory *factory, TQWidget *parent,
+ bool showUpDownButtons, bool showHelpButton, TQString addButtonText,
const char *name);
KMultiFormListBoxEntryList elements();
const KMultiFormListBoxEntryList elements() const;
void append(KMultiFormListBoxEntry *);
WindowListboxItem *selected();
- QWidget* qWidget() { return this; }
+ TQWidget* qWidget() { return this; }
- QVBoxLayout* _layout;
+ TQVBoxLayout* _layout;
KMultiFormListBoxFactory* _factory;
- QPtrList<QPushButton> _buttonList;
+ TQPtrList<TQPushButton> _buttonList;
KListBox* _listbox;
- virtual void delElement(QWidget *); // Deletes the given element
+ virtual void delElement(TQWidget *); // Deletes the given element
virtual void delAnElement();
void addElement();
@@ -69,7 +69,7 @@ signals:
private slots:
void slotEditSelected();
- void slotEditSelected(QListBoxItem *item);
+ void slotEditSelected(TQListBoxItem *item);
void slotCopySelected();
void slotMoveItemUp();
void slotMoveItemDown();
diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp
index 57b5abb..0aa384e 100644
--- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp
+++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp
@@ -22,9 +22,9 @@
#include "kmultiformlistbox-multivisible.h"
#include "kmultiformlistbox-windowed.h"
-KMultiFormListBox::KMultiFormListBox( KMultiFormListBoxFactory *factory, KMultiFormListBoxType tp, QWidget *parent,
- bool showUpDownButtons, bool showHelpButton, QString addButtonText,
- const char *name ) : QWidget( parent, name )
+KMultiFormListBox::KMultiFormListBox( KMultiFormListBoxFactory *factory, KMultiFormListBoxType tp, TQWidget *parent,
+ bool showUpDownButtons, bool showHelpButton, TQString addButtonText,
+ const char *name ) : TQWidget( parent, name )
{
switch ( tp ) {
@@ -38,9 +38,9 @@ KMultiFormListBox::KMultiFormListBox( KMultiFormListBoxFactory *factory, KMultiF
break;
}
- QWidget *widget = theWidget->qWidget();
+ TQWidget *widget = theWidget->qWidget();
- QHBoxLayout *layout = new QHBoxLayout( this );
+ TQHBoxLayout *layout = new TQHBoxLayout( this );
_factory = factory;
layout->addWidget( widget );
}
@@ -72,15 +72,15 @@ void KMultiFormListBox::slotChangeFace( KMultiFormListBoxType /*newFace*/ )
// << "Please let me (blackie@kde.org) know that you need it, and I'll work on it" << endl;
}
-void KMultiFormListBox::toStream( QDataStream& stream ) const
+void KMultiFormListBox::toStream( TQDataStream& stream ) const
{
const KMultiFormListBoxEntryList elms = elements();
stream << elms.count();
- for ( QPtrListIterator<KMultiFormListBoxEntry> it(elms); *it; ++it)
+ for ( TQPtrListIterator<KMultiFormListBoxEntry> it(elms); *it; ++it)
_factory->toStream( *it, stream );
}
-void KMultiFormListBox::fromStream( QDataStream& stream )
+void KMultiFormListBox::fromStream( TQDataStream& stream )
{
unsigned int fromCount, toCount;
stream >> fromCount;
@@ -96,7 +96,7 @@ void KMultiFormListBox::fromStream( QDataStream& stream )
}
KMultiFormListBoxEntryList elms = elements();
- for (QPtrListIterator<KMultiFormListBoxEntry> it(elms); *it; ++it)
+ for (TQPtrListIterator<KMultiFormListBoxEntry> it(elms); *it; ++it)
_factory->fromStream( stream, *it );
}
diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h
index 8e85808..a0ef4a8 100644
--- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h
+++ b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h
@@ -21,9 +21,9 @@
#include "kmultiformlistboxfactory.h"
#include "kmultiformlistbox-shower.h"
#include "kmultiformlistboxentry.h"
-#include <qptrlist.h>
-#include <qlayout.h>
-#include <qscrollview.h>
+#include <tqptrlist.h>
+#include <tqlayout.h>
+#include <tqscrollview.h>
#ifdef QT_ONLY
#include "compat.h"
@@ -34,8 +34,8 @@
class QDataStream;
-typedef QPtrList<KMultiFormListBoxEntry> KMultiFormListBoxEntryList ;
-typedef QPtrList<QWidget> WidgetList;
+typedef TQPtrList<KMultiFormListBoxEntry> KMultiFormListBoxEntryList ;
+typedef TQPtrList<TQWidget> WidgetList;
class KMultiFormListBoxMultiVisible;
/**
@@ -60,7 +60,7 @@ class KMultiFormListBoxMultiVisible;
@author Jesper Kjær Pedersen <blackie@kde.org>
**/
-class KMultiFormListBox : public QWidget {
+class KMultiFormListBox : public TQWidget {
Q_OBJECT
@@ -75,8 +75,8 @@ public:
**/
KMultiFormListBox(KMultiFormListBoxFactory *factory,
KMultiFormListBoxType tp=Windowed,
- QWidget *parent = 0, bool showUpDownButtons = true,
- bool showHelpButton = true, QString addButtonText = i18n("Add"),
+ TQWidget *parent = 0, bool showUpDownButtons = true,
+ bool showHelpButton = true, TQString addButtonText = i18n("Add"),
const char *name = 0);
/**
@@ -91,10 +91,10 @@ public:
void append(KMultiFormListBoxEntry *);
/** write data out to stream */
- void toStream( QDataStream& stream ) const;
+ void toStream( TQDataStream& stream ) const;
/** reads data in from stream */
- void fromStream( QDataStream& stream );
+ void fromStream( TQDataStream& stream );
public slots:
diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.cpp
index e6768a3..e885c29 100644
--- a/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.cpp
+++ b/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.cpp
@@ -31,14 +31,14 @@ void KMultiFormListBoxEntry::acceptIndexButton()
}
-void KMultiFormListBoxEntry::indexWindowPos(QPoint *start, int *width)
+void KMultiFormListBoxEntry::indexWindowPos(TQPoint *start, int *width)
{
// Calculate the position of the value widgets left-buttom border
- QPoint global_point = valueWidget()->mapToGlobal(QPoint(0,0));
+ TQPoint global_point = valueWidget()->mapToGlobal(TQPoint(0,0));
start->setX(global_point.x());
start->setY(global_point.y() + valueWidget()->height());
// Calculate the width of the list.
- global_point = indexButton()->mapToGlobal(QPoint(0,0));
+ global_point = indexButton()->mapToGlobal(TQPoint(0,0));
*width = global_point.x() + indexButton()->width() - start->x();
}
diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h b/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h
index 7937fe1..313f026 100644
--- a/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h
+++ b/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h
@@ -18,9 +18,9 @@
#ifndef __kmultiformlistboxentry
#define __kmultiformlistboxentry
-#include <qpoint.h>
-#include <qwidget.h>
-#include <qpushbutton.h>
+#include <tqpoint.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
/**
This widget must be the base class for an entry widget used in the @ref
@@ -30,7 +30,7 @@
The KMultiFormListBox widget features a fast scrolling mechanism through the Idx
button. If you want to use this in you KMultiFormListBox, then you must do the
following:
- @li Create a @ref QPushButton as a sub-widget to your KMultiFormListBoxEntry.
+ @li Create a @ref TQPushButton as a sub-widget to your KMultiFormListBoxEntry.
@li Override the @ref indexButton method to return your QPushButton
@li Override the @ref idxString to return a @ref QString
with a textual representation of the content in this KMultiFormListBoxEntry. This
@@ -50,16 +50,16 @@ class KMultiFormListBoxEntry : public QWidget
Q_OBJECT
public:
- KMultiFormListBoxEntry(QWidget *parent, const char *name) : QWidget(parent,name) {}
+ KMultiFormListBoxEntry(TQWidget *parent, const char *name) : TQWidget(parent,name) {}
- virtual QPushButton *indexButton() { return 0; }
- virtual QWidget *valueWidget() { return 0; }
+ virtual TQPushButton *indexButton() { return 0; }
+ virtual TQWidget *valueWidget() { return 0; }
- virtual void indexWindowPos(QPoint *start, int *width); // both variables are return values.
+ virtual void indexWindowPos(TQPoint *start, int *width); // both variables are return values.
// This function must return a string representing the KMultiFormListBox. This is
// used when showing the fast-search menu available from the `Idx' button.
- virtual QString idxString() { return QString::fromLatin1(""); }
+ virtual TQString idxString() { return TQString::fromLatin1(""); }
public slots:
void acceptIndexButton();
diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.cpp
index 89b5d74..08a800a 100644
--- a/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.cpp
+++ b/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.cpp
@@ -16,11 +16,11 @@
* Boston, MA 02110-1301, USA.
**/
#include "kmultiformlistboxfactory.h"
-#include <qframe.h>
+#include <tqframe.h>
-QWidget *KMultiFormListBoxFactory::separator(QWidget *parent) {
- QFrame* sep = new QFrame( parent );
- sep->setFrameStyle( QFrame::HLine | QFrame::Sunken);
+TQWidget *KMultiFormListBoxFactory::separator(TQWidget *parent) {
+ TQFrame* sep = new TQFrame( parent );
+ sep->setFrameStyle( TQFrame::HLine | TQFrame::Sunken);
sep->setLineWidth(1);
return sep;
}
diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.h b/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.h
index 13f6561..dc0bcce 100644
--- a/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.h
+++ b/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.h
@@ -18,7 +18,7 @@
// -------------------------------- includes ------------------------------
#ifndef __kmultiformlistboxfactory
#define __kmultiformlistboxfactory
-#include <qobject.h>
+#include <tqobject.h>
#include "kwidgetstreamer.h"
class KMultiFormListBoxEntry;
//-------------------------------------------------------------------------
@@ -52,18 +52,18 @@ public:
@return A fresh @ref KMultiFormListBoxEntry to be used in an instance of the
@ref KMultiFormListBox class.
**/
- virtual KMultiFormListBoxEntry *create(QWidget *parent) = 0;
+ virtual KMultiFormListBoxEntry *create(TQWidget *parent) = 0;
/**
This method is used to get a separator between the elements in an @ref
KMultiFormListBox. The widget returned from this method will be owned by the
caller.
- @param parent A pointer to the parent of the QWidget returned.
+ @param parent A pointer to the parent of the TQWidget returned.
@return A widget which must be used as a separator between the @ref
KMultiFormListBoxEntry elements in an @ref KMultiFormListBox.
**/
- virtual QWidget *separator(QWidget *parent);
+ virtual TQWidget *separator(TQWidget *parent);
};
#endif /* kmultiformlistbox */
diff --git a/kregexpeditor/KMultiFormListBox/widgetwindow.cpp b/kregexpeditor/KMultiFormListBox/widgetwindow.cpp
index 022e452..e94210d 100644
--- a/kregexpeditor/KMultiFormListBox/widgetwindow.cpp
+++ b/kregexpeditor/KMultiFormListBox/widgetwindow.cpp
@@ -36,17 +36,17 @@ void WidgetWindow::init(KMultiFormListBoxFactory *factory, KListBox *lb, KMultiF
listbox = lb;
myFact = factory;
- QFrame *frame = plainPage();
- QHBoxLayout *lay = new QHBoxLayout(frame,0,-1,"WidgetWindow::init::lay");
+ TQFrame *frame = plainPage();
+ TQHBoxLayout *lay = new TQHBoxLayout(frame,0,-1,"WidgetWindow::init::lay");
if (widget != 0) {
myWidget = widget;
- widget->reparent(frame, 0, QPoint(0,0));
+ widget->reparent(frame, 0, TQPoint(0,0));
}
else {
myWidget = factory->create(frame);
}
- QDataStream stream( _backup, IO_WriteOnly );
+ TQDataStream stream( _backup, IO_WriteOnly );
myFact->toStream( myWidget, stream );
lay->addWidget(myWidget);
@@ -85,7 +85,7 @@ void WidgetWindow::slotCancel()
deleteLater();
}
else {
- QDataStream stream( _backup, IO_ReadOnly );
+ TQDataStream stream( _backup, IO_ReadOnly );
myFact->fromStream( stream, myWidget );
}
KDialogBase::slotCancel();
@@ -94,10 +94,10 @@ void WidgetWindow::slotCancel()
WidgetWindow *WidgetWindow::clone()
{
WidgetWindow *item = new WidgetWindow(myFact, listbox);
- QByteArray data;
- QDataStream ws( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ws( data, IO_WriteOnly );
myFact->toStream( myWidget, ws );
- QDataStream rs( data, IO_ReadOnly );
+ TQDataStream rs( data, IO_ReadOnly );
myFact->fromStream( rs, item->myWidget );
item->slotOk();
@@ -106,7 +106,7 @@ WidgetWindow *WidgetWindow::clone()
void WidgetWindow::display()
{
- QDataStream stream( _backup, IO_WriteOnly);
+ TQDataStream stream( _backup, IO_WriteOnly);
myFact->toStream( myWidget, stream );
show();
}
diff --git a/kregexpeditor/KMultiFormListBox/widgetwindow.h b/kregexpeditor/KMultiFormListBox/widgetwindow.h
index f81b359..647b2ef 100644
--- a/kregexpeditor/KMultiFormListBox/widgetwindow.h
+++ b/kregexpeditor/KMultiFormListBox/widgetwindow.h
@@ -20,7 +20,7 @@
#ifdef QT_ONLY
#include "compat.h"
- #include <qlistbox.h>
+ #include <tqlistbox.h>
#else
#include <kdialogbase.h>
#include <klistbox.h>
@@ -51,7 +51,7 @@ protected slots:
private:
KMultiFormListBoxFactory *myFact;
KMultiFormListBoxEntry *myWidget;
- QByteArray _backup;
+ TQByteArray _backup;
KListBox *listbox;
WindowListboxItem *myListboxItem;
bool initialShow;
diff --git a/kregexpeditor/KMultiFormListBox/windowlistboxitem.cpp b/kregexpeditor/KMultiFormListBox/windowlistboxitem.cpp
index 41f9e5b..69f2f33 100644
--- a/kregexpeditor/KMultiFormListBox/windowlistboxitem.cpp
+++ b/kregexpeditor/KMultiFormListBox/windowlistboxitem.cpp
@@ -18,8 +18,8 @@
#include "windowlistboxitem.h"
#include "widgetwindow.h"
-WindowListboxItem::WindowListboxItem(QListBox *lb, QString text, WidgetWindow *windowWidget)
- :QListBoxText(lb, text), myItem(windowWidget)
+WindowListboxItem::WindowListboxItem(TQListBox *lb, TQString text, WidgetWindow *windowWidget)
+ :TQListBoxText(lb, text), myItem(windowWidget)
{
}
diff --git a/kregexpeditor/KMultiFormListBox/windowlistboxitem.h b/kregexpeditor/KMultiFormListBox/windowlistboxitem.h
index 2505b88..5e9d0f6 100644
--- a/kregexpeditor/KMultiFormListBox/windowlistboxitem.h
+++ b/kregexpeditor/KMultiFormListBox/windowlistboxitem.h
@@ -17,7 +17,7 @@
**/
#ifndef __windowlistboxitem
#define __windowlistboxitem
-#include <qlistbox.h>
+#include <tqlistbox.h>
class WidgetWindow;
class KMultiFormListBoxWindowed;
class KMultiFormListBoxEntry;
@@ -31,7 +31,7 @@ class WindowListboxItem :public QListBoxText
friend class WidgetWindow;
friend class KMultiFormListBoxWindowed;
public:
- WindowListboxItem(QListBox *, QString, WidgetWindow *);
+ WindowListboxItem(TQListBox *, TQString, WidgetWindow *);
~WindowListboxItem();
void clone();
void displayWidget();
diff --git a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp
index e91813a..e314110 100644
--- a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp
+++ b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp
@@ -17,11 +17,11 @@
**/
#include "kwidgetstreamer.h"
#include "kmultiformlistbox.h"
-#include <qobjectlist.h>
-#include <qvariant.h>
+#include <tqobjectlist.h>
+#include <tqvariant.h>
-void KWidgetStreamer::toStream(const QObject* from, QDataStream& stream )
+void KWidgetStreamer::toStream(const TQObject* from, TQDataStream& stream )
{
if ( from->inherits("KMultiFormListBox") ) {
// Hmm, we'll trust Qt that this dynamic_cast won't fail!
@@ -31,7 +31,7 @@ void KWidgetStreamer::toStream(const QObject* from, QDataStream& stream )
propertyToStream( from, stream );
}
-void KWidgetStreamer::fromStream( QDataStream& stream, QObject* to )
+void KWidgetStreamer::fromStream( TQDataStream& stream, TQObject* to )
{
if ( to->inherits("KMultiFormListBox") ) {
// Hmm, we'll trust Qt that this dynamic_cast won't fail!
@@ -42,17 +42,17 @@ void KWidgetStreamer::fromStream( QDataStream& stream, QObject* to )
}
-void KWidgetStreamer::propertyToStream( const QObject* from, QDataStream& stream )
+void KWidgetStreamer::propertyToStream( const TQObject* from, TQDataStream& stream )
{
// Only handle widgets. Alternatives to widgets are layouts, validators, timers, etc.
- if ( ! from->inherits("QWidget") )
+ if ( ! from->inherits("TQWidget") )
return;
// Serializing all the children (if any).
- const QObjectList* children = from->children();
+ const TQObjectList* children = from->children();
if ( children ) {
stream << children->count();
- for ( QObjectListIt it = QObjectListIt(*children); *it; ++it ) {
+ for ( TQObjectListIt it = TQObjectListIt(*children); *it; ++it ) {
toStream( *it, stream );
}
}
@@ -62,11 +62,11 @@ void KWidgetStreamer::propertyToStream( const QObject* from, QDataStream& stream
// Now stream out properties
for ( PropertyMapIt mapIt = _map.begin(); mapIt != _map.end(); mapIt++ ) {
- QString tp = mapIt.key();
+ TQString tp = mapIt.key();
PropertyList list = mapIt.data();
if ( from->inherits( tp.latin1() ) ) {
for ( PropertyListIt it = list.begin(); it != list.end(); ++it ) {
- QVariant prop = from->property( (*it).latin1() );
+ TQVariant prop = from->property( (*it).latin1() );
if ( ! prop.isValid() )
qWarning("Invalid property: %s:%s", tp.latin1(), (*it).latin1() );
@@ -77,20 +77,20 @@ void KWidgetStreamer::propertyToStream( const QObject* from, QDataStream& stream
}
-void KWidgetStreamer::propertyFromStream( QDataStream& stream, QObject* to )
+void KWidgetStreamer::propertyFromStream( TQDataStream& stream, TQObject* to )
{
// Only handle widgets. Alternatives to widgets are layouts, validators, timers, etc.
- if ( ! to->inherits("QWidget") )
+ if ( ! to->inherits("TQWidget") )
return;
// Stream in all the children (if any)
- const QObjectList* children = to->children();
+ const TQObjectList* children = to->children();
unsigned int count;
stream >> count;
if ( children ) {
Q_ASSERT( count == children->count() );
- for ( QObjectListIt it = QObjectListIt(*children); *it; ++it )
+ for ( TQObjectListIt it = TQObjectListIt(*children); *it; ++it )
fromStream( stream, *it );
}
else {
@@ -99,11 +99,11 @@ void KWidgetStreamer::propertyFromStream( QDataStream& stream, QObject* to )
// Now stream in properties
for ( PropertyMapIt mapIt = _map.begin(); mapIt != _map.end(); mapIt++ ) {
- QString tp = mapIt.key();
+ TQString tp = mapIt.key();
PropertyList list = mapIt.data();
if ( to->inherits( tp.latin1() ) ) {
for ( PropertyListIt it = list.begin(); it != list.end(); ++it ) {
- QVariant value;
+ TQVariant value;
stream >> value;
to->setProperty((*it).latin1(), value);
}
@@ -113,65 +113,65 @@ void KWidgetStreamer::propertyFromStream( QDataStream& stream, QObject* to )
KWidgetStreamer::KWidgetStreamer ()
{
- QStringList l;
+ TQStringList l;
// QCheckBox
l.clear();
- l << QString::fromLatin1("enabled")
- << QString::fromLatin1("checked") << QString::fromLatin1("tristate");
- _map.insert(QString::fromLatin1("QCheckBox"), l);
+ l << TQString::fromLatin1("enabled")
+ << TQString::fromLatin1("checked") << TQString::fromLatin1("tristate");
+ _map.insert(TQString::fromLatin1("TQCheckBox"), l);
// QComboBox
l.clear();
- l << QString::fromLatin1("enabled")
- << QString::fromLatin1("editable") << QString::fromLatin1("currentItem")
- << QString::fromLatin1("maxCount") << QString::fromLatin1("insertionPolicy")
- << QString::fromLatin1("autoCompletion");
- _map.insert(QString::fromLatin1("QComboBox"), l);
+ l << TQString::fromLatin1("enabled")
+ << TQString::fromLatin1("editable") << TQString::fromLatin1("currentItem")
+ << TQString::fromLatin1("maxCount") << TQString::fromLatin1("insertionPolicy")
+ << TQString::fromLatin1("autoCompletion");
+ _map.insert(TQString::fromLatin1("TQComboBox"), l);
// QDial
l.clear();
- l << QString::fromLatin1("enabled")
- << QString::fromLatin1("tracking") << QString::fromLatin1("wrapping")
- << QString::fromLatin1("value");
- _map.insert(QString::fromLatin1("QDial"), l);
+ l << TQString::fromLatin1("enabled")
+ << TQString::fromLatin1("tracking") << TQString::fromLatin1("wrapping")
+ << TQString::fromLatin1("value");
+ _map.insert(TQString::fromLatin1("TQDial"), l);
// QLCDNumber
l.clear();
- l << QString::fromLatin1("enabled")
- << QString::fromLatin1("numDigits") << QString::fromLatin1("mode")
- << QString::fromLatin1("segmentStyle") << QString::fromLatin1("value");
- _map.insert(QString::fromLatin1("QLCDNumber"), l);
+ l << TQString::fromLatin1("enabled")
+ << TQString::fromLatin1("numDigits") << TQString::fromLatin1("mode")
+ << TQString::fromLatin1("segmentStyle") << TQString::fromLatin1("value");
+ _map.insert(TQString::fromLatin1("TQLCDNumber"), l);
// QLineEdit
l.clear();
- l << QString::fromLatin1("enabled")
- << QString::fromLatin1("text") << QString::fromLatin1("maxLength")
- << QString::fromLatin1("echoMode") << QString::fromLatin1("alignment");
- _map.insert(QString::fromLatin1("QLineEdit"), l);
+ l << TQString::fromLatin1("enabled")
+ << TQString::fromLatin1("text") << TQString::fromLatin1("maxLength")
+ << TQString::fromLatin1("echoMode") << TQString::fromLatin1("alignment");
+ _map.insert(TQString::fromLatin1("TQLineEdit"), l);
// QMultiLineEdit
l.clear();
- l << QString::fromLatin1("enabled")
- << QString::fromLatin1("text")
- << QString::fromLatin1("alignment");
- _map.insert(QString::fromLatin1("QTextEdit"), l);
+ l << TQString::fromLatin1("enabled")
+ << TQString::fromLatin1("text")
+ << TQString::fromLatin1("alignment");
+ _map.insert(TQString::fromLatin1("TQTextEdit"), l);
// QRadioButton
l.clear();
- l << QString::fromLatin1("enabled")
- << QString::fromLatin1("checked");
- _map.insert(QString::fromLatin1("QRadioButton"), l);
+ l << TQString::fromLatin1("enabled")
+ << TQString::fromLatin1("checked");
+ _map.insert(TQString::fromLatin1("TQRadioButton"), l);
// QSlider
l.clear();
- l << QString::fromLatin1("enabled")
- << QString::fromLatin1("value");
- _map.insert(QString::fromLatin1("QSlider"), l);
+ l << TQString::fromLatin1("enabled")
+ << TQString::fromLatin1("value");
+ _map.insert(TQString::fromLatin1("TQSlider"), l);
// QSpinBox
l.clear();
- l << QString::fromLatin1("enabled")
- << QString::fromLatin1("value");
- _map.insert(QString::fromLatin1("QSpinBox"), l);
+ l << TQString::fromLatin1("enabled")
+ << TQString::fromLatin1("value");
+ _map.insert(TQString::fromLatin1("TQSpinBox"), l);
}
diff --git a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.h b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.h
index 9534a92..6ac3349 100644
--- a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.h
+++ b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.h
@@ -17,10 +17,10 @@
**/
#ifndef __kwidgetstreamer
#define __kwidgetstreamer
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
/**
This class defines methods for streaming widget data.
@@ -32,12 +32,12 @@
inherit from this class and override @ref toStream and @ref fromStream.
The following example shows how you can avoid streaming
- <tt>numDigits</tt> for a QLCDNumber. The same approach applies if you
+ <tt>numDigits</tt> for a TQLCDNumber. The same approach applies if you
want to add extra properties to be streamed.
<pre>
KWidgetStreamer streamer;
KWidgetStreamer::PropertyMap& map = streamer.propertyMap();
- KWidgetStreamer::PropertyList& list = *map.find("QLCDNumber");
+ KWidgetStreamer::PropertyList& list = *map.find("TQLCDNumber");
list.remove("numDigits");
</pre>
**/
@@ -45,23 +45,23 @@ class KWidgetStreamer
{
public:
- typedef QStringList PropertyList;
- typedef QMap< QString, PropertyList > PropertyMap;
- typedef QMap< QString, PropertyList >::ConstIterator PropertyMapIt;
- typedef QStringList::Iterator PropertyListIt;
+ typedef TQStringList PropertyList;
+ typedef TQMap< TQString, PropertyList > PropertyMap;
+ typedef TQMap< TQString, PropertyList >::ConstIterator PropertyMapIt;
+ typedef TQStringList::Iterator PropertyListIt;
KWidgetStreamer();
virtual ~KWidgetStreamer() {}
- virtual void toStream(const QObject* from, QDataStream& stream );
- virtual void fromStream(QDataStream& stream, QObject* to);
+ virtual void toStream(const TQObject* from, TQDataStream& stream );
+ virtual void fromStream(TQDataStream& stream, TQObject* to);
PropertyMap& propertyMap() { return _map; }
protected:
- void propertyToStream( const QObject* from, QDataStream& stream );
- void propertyFromStream( QDataStream& stream, QObject* to );
+ void propertyToStream( const TQObject* from, TQDataStream& stream );
+ void propertyFromStream( TQDataStream& stream, TQObject* to );
private:
PropertyMap _map;
diff --git a/kregexpeditor/altnregexp.cpp b/kregexpeditor/altnregexp.cpp
index adebf1b..ef8b8de 100644
--- a/kregexpeditor/altnregexp.cpp
+++ b/kregexpeditor/altnregexp.cpp
@@ -43,20 +43,20 @@ bool AltnRegExp::check( ErrorMap& map, bool first, bool last )
return possibleEmpty;
}
-QDomNode AltnRegExp::toXml( QDomDocument* doc ) const
+TQDomNode AltnRegExp::toXml( TQDomDocument* doc ) const
{
- QDomElement top = doc->createElement( QString::fromLocal8Bit( "Alternatives" ) );
+ TQDomElement top = doc->createElement( TQString::fromLocal8Bit( "Alternatives" ) );
for ( RegExpListIt it(list); *it; ++it ) {
top.appendChild( (*it)->toXml( doc ) );
}
return top;
}
-bool AltnRegExp::load( QDomElement top, const QString& version )
+bool AltnRegExp::load( TQDomElement top, const TQString& version )
{
- Q_ASSERT( top.tagName() == QString::fromLocal8Bit( "Alternatives" ) );
+ Q_ASSERT( top.tagName() == TQString::fromLocal8Bit( "Alternatives" ) );
- for ( QDomNode child = top.firstChild(); !child.isNull(); child = child.nextSibling() ) {
+ for ( TQDomNode child = top.firstChild(); !child.isNull(); child = child.nextSibling() ) {
if ( ! child.isElement() )
continue; // User might have added a comment.
diff --git a/kregexpeditor/altnregexp.h b/kregexpeditor/altnregexp.h
index d5d9d1e..c126c5f 100644
--- a/kregexpeditor/altnregexp.h
+++ b/kregexpeditor/altnregexp.h
@@ -34,8 +34,8 @@ public:
virtual bool check( ErrorMap&, bool first, bool last );
virtual int precedence() const { return 1;}
- virtual QDomNode toXml( QDomDocument* doc ) const;
- virtual bool load( QDomElement, const QString& version );
+ virtual TQDomNode toXml( TQDomDocument* doc ) const;
+ virtual bool load( TQDomElement, const TQString& version );
virtual RegExpType type() const { return ALTN;}
virtual bool operator==( const RegExp& other ) const;
virtual void replacePart( CompoundRegExp* replacement );
diff --git a/kregexpeditor/altnwidget.cpp b/kregexpeditor/altnwidget.cpp
index 22937ac..d1855d4 100644
--- a/kregexpeditor/altnwidget.cpp
+++ b/kregexpeditor/altnwidget.cpp
@@ -26,9 +26,9 @@
#include "dragaccepter.h"
#include "concwidget.h"
#include "altnregexp.h"
-#include <qpainter.h>
+#include <tqpainter.h>
-AltnWidget::AltnWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+AltnWidget::AltnWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name)
:MultiContainerWidget(editorWindow, parent, name == 0 ? "AltnWidget" : name)
{
@@ -39,7 +39,7 @@ AltnWidget::AltnWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
}
AltnWidget::AltnWidget( AltnRegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name)
+ TQWidget* parent, const char* name)
:MultiContainerWidget( editorWindow, parent, name )
{
DragAccepter *accepter = new DragAccepter(editorWindow, this);
@@ -75,15 +75,15 @@ void AltnWidget::setConcChild(ConcWidget *child)
void AltnWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *child)
{
- child->reparent(this, QPoint(0,0), false);
+ child->reparent(this, TQPoint(0,0), false);
MultiContainerWidget::addNewChild( accepter, child );
updateDrawLineInfo();
}
-QSize AltnWidget::sizeHint() const
+TQSize AltnWidget::sizeHint() const
{
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
// Skip the first child, as we only need half of the size of the first and the
// last drag accepter. Does, however, not apply when there only is onw child.
if ( _children.count() != 1 )
@@ -93,23 +93,23 @@ QSize AltnWidget::sizeHint() const
_childrenHeight = 0;
for ( ; *it ; ++it) {
- QSize thisChildSize = (*it)->sizeHint();
+ TQSize thisChildSize = (*it)->sizeHint();
_childrenWidth = QMAX(_childrenWidth, thisChildSize.width());
_childrenHeight += thisChildSize.height();
}
// Now add the size of the header
- QFontMetrics metrics = fontMetrics();
+ TQFontMetrics metrics = fontMetrics();
_textSize = metrics.size(0,_text);
int headerWidth = _textSize.width() + 2 * bdSize + 2;
_childrenWidth = QMAX(_childrenWidth, headerWidth);
- return QSize(_childrenWidth + 2*pw, _childrenHeight + _textSize.height() + 1*pw );
+ return TQSize(_childrenWidth + 2*pw, _childrenHeight + _textSize.height() + 1*pw );
}
-void AltnWidget::paintEvent( QPaintEvent *e)
+void AltnWidget::paintEvent( TQPaintEvent *e)
{
Q_ASSERT( dynamic_cast<DragAccepter*>(_children.at(0)) );
// if this fails, then I should check the location of the show()
@@ -118,9 +118,9 @@ void AltnWidget::paintEvent( QPaintEvent *e)
dynamic_cast<DragAccepter*>(_children.at(_children.count()-1)) ) );
int offset = 0;
- QSize mySize = sizeHint();
+ TQSize mySize = sizeHint();
- QPainter painter(this);
+ TQPainter painter(this);
drawPossibleSelection( painter, mySize );
//-------------------------------------- First draw the border and text
@@ -144,8 +144,8 @@ void AltnWidget::paintEvent( QPaintEvent *e)
RegExpWidget* child = _children.at(i);
- QSize childSize = child->sizeHint();
- QSize curChildSize = child->size();
+ TQSize childSize = child->sizeHint();
+ TQSize curChildSize = child->size();
//-------------------------------------- place the child
int x = xOffset;
@@ -172,7 +172,7 @@ RegExp* AltnWidget::regExp() const
{
AltnRegExp *regexp = new AltnRegExp( isSelected() );
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // start with the second element
for ( ; *it; it+=2 ) {
regexp->addRegExp( (*it)->regExp() );
@@ -197,7 +197,7 @@ RegExp* AltnWidget::selection() const
if ( isSelected() )
return regExp();
else {
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past DragAccepter
for ( ; *it; it+=2 ) {
if ( (*it)->hasSelection() ) {
@@ -216,7 +216,7 @@ bool AltnWidget::validateSelection() const
}
bool foundASelection = false;
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past DragAccepter
for ( ; *it; it+=2 ) {
if ( (*it)->hasSelection() ) {
diff --git a/kregexpeditor/altnwidget.h b/kregexpeditor/altnwidget.h
index 9a4f26b..589726d 100644
--- a/kregexpeditor/altnwidget.h
+++ b/kregexpeditor/altnwidget.h
@@ -29,12 +29,12 @@ class AltnRegExp;
class AltnWidget :public MultiContainerWidget
{
public:
- AltnWidget( RegExpEditorWindow* editorWindow, QWidget *parent,
+ AltnWidget( RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *label = 0);
AltnWidget( AltnRegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name = 0);
+ TQWidget* parent, const char* name = 0);
virtual void addNewChild(DragAccepter *accepter, RegExpWidget *child);
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
virtual RegExp* regExp() const;
virtual void applyRegExpToSelection( RegExpType type );
virtual RegExpType type() const { return ALTN; }
@@ -45,7 +45,7 @@ public:
virtual void deleteSelection();
protected:
- virtual void paintEvent( QPaintEvent* e );
+ virtual void paintEvent( TQPaintEvent* e );
private:
/**
@@ -54,8 +54,8 @@ private:
*/
void updateDrawLineInfo();
- QString _text;
- mutable QSize _textSize;
+ TQString _text;
+ mutable TQSize _textSize;
mutable int _maxSelectedWidth;
mutable int _childrenWidth;
diff --git a/kregexpeditor/auxbuttons.cpp b/kregexpeditor/auxbuttons.cpp
index ea28953..0f30d80 100644
--- a/kregexpeditor/auxbuttons.cpp
+++ b/kregexpeditor/auxbuttons.cpp
@@ -26,58 +26,58 @@
#endif
#include "auxbuttons.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqtoolbutton.h>
#include "util.h"
-AuxButtons::AuxButtons( QWidget* parent, const char* name = 0)
- :QDockWindow( QDockWindow::InDock, parent, name)
+AuxButtons::AuxButtons( TQWidget* parent, const char* name = 0)
+ :TQDockWindow( TQDockWindow::InDock, parent, name)
{
- QBoxLayout* layout = boxLayout();
+ TQBoxLayout* layout = boxLayout();
- _undo = new QToolButton( this );
- _undo->setIconSet( Util::getSystemIconSet(QString::fromLatin1("undo") ) );
+ _undo = new TQToolButton( this );
+ _undo->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("undo") ) );
layout->addWidget( _undo );
- connect( _undo, SIGNAL(clicked()), this, SIGNAL(undo()) );
- QToolTip::add( _undo, i18n( "Undo" ) );
+ connect( _undo, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(undo()) );
+ TQToolTip::add( _undo, i18n( "Undo" ) );
- _redo = new QToolButton( this );
- _redo->setIconSet( Util::getSystemIconSet(QString::fromLatin1("redo") ) );
+ _redo = new TQToolButton( this );
+ _redo->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("redo") ) );
layout->addWidget( _redo );
- connect( _redo, SIGNAL(clicked()), this, SIGNAL(redo()) );
- QToolTip::add( _redo, i18n( "Redo" ) );
+ connect( _redo, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(redo()) );
+ TQToolTip::add( _redo, i18n( "Redo" ) );
- _cut = new QToolButton( this );
- _cut->setIconSet( Util::getSystemIconSet(QString::fromLatin1("editcut") ) );
+ _cut = new TQToolButton( this );
+ _cut->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("editcut") ) );
layout->addWidget( _cut );
- connect( _cut, SIGNAL(clicked()), this, SIGNAL(cut()) );
- QToolTip::add( _cut, i18n( "Cut" ) );
+ connect( _cut, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(cut()) );
+ TQToolTip::add( _cut, i18n( "Cut" ) );
- _copy = new QToolButton( this );
- _copy->setIconSet( Util::getSystemIconSet(QString::fromLatin1("editcopy") ) );
+ _copy = new TQToolButton( this );
+ _copy->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("editcopy") ) );
layout->addWidget( _copy );
- connect( _copy, SIGNAL(clicked()), this, SIGNAL(copy()) );
- QToolTip::add( _copy, i18n( "Copy" ) );
+ connect( _copy, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(copy()) );
+ TQToolTip::add( _copy, i18n( "Copy" ) );
- _paste = new QToolButton( this );
- _paste->setIconSet( Util::getSystemIconSet(QString::fromLatin1("editpaste")) );
+ _paste = new TQToolButton( this );
+ _paste->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("editpaste")) );
layout->addWidget( _paste );
- connect( _paste, SIGNAL(clicked()), this, SIGNAL(paste()) );
- QToolTip::add( _paste, i18n( "Paste" ) );
+ connect( _paste, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(paste()) );
+ TQToolTip::add( _paste, i18n( "Paste" ) );
- _save = new QToolButton( this );
- _save->setIconSet( Util::getSystemIconSet(QString::fromLatin1("filesave")) );
+ _save = new TQToolButton( this );
+ _save->setIconSet( Util::getSystemIconSet(TQString::fromLatin1("filesave")) );
layout->addWidget( _save );
- connect( _save, SIGNAL(clicked()), this, SIGNAL(save()) );
- QToolTip::add( _save, i18n( "Save" ) );
+ connect( _save, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(save()) );
+ TQToolTip::add( _save, i18n( "Save" ) );
- QToolButton* button = new QToolButton(this);
- button->setPixmap( Util::getSystemIcon( QString::fromLatin1("contexthelp") ) );
+ TQToolButton* button = new TQToolButton(this);
+ button->setPixmap( Util::getSystemIcon( TQString::fromLatin1("contexthelp") ) );
layout->addWidget( button );
- connect(button, SIGNAL(clicked()), this, SLOT(slotEnterWhatsThis()));
+ connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEnterWhatsThis()));
_undo->setEnabled( false );
_redo->setEnabled( false );
@@ -86,7 +86,7 @@ AuxButtons::AuxButtons( QWidget* parent, const char* name = 0)
void AuxButtons::slotEnterWhatsThis()
{
- QWhatsThis::enterWhatsThisMode ();
+ TQWhatsThis::enterWhatsThisMode ();
}
void AuxButtons::slotCanUndo( bool b )
diff --git a/kregexpeditor/auxbuttons.h b/kregexpeditor/auxbuttons.h
index 08c33ec..9a8a1fa 100644
--- a/kregexpeditor/auxbuttons.h
+++ b/kregexpeditor/auxbuttons.h
@@ -18,7 +18,7 @@
#ifndef AUXBUTTONS_H
#define AUXBUTTONS_H
-#include <qdockwindow.h>
+#include <tqdockwindow.h>
class QComboBox;
class QLabel;
class QToolButton;
@@ -28,7 +28,7 @@ class AuxButtons :public QDockWindow
Q_OBJECT
public:
- AuxButtons( QWidget* parent, const char* name );
+ AuxButtons( TQWidget* parent, const char* name );
signals:
void undo();
@@ -48,12 +48,12 @@ public slots:
void slotCanSave( bool );
private:
- QToolButton* _undo;
- QToolButton* _redo;
- QToolButton* _cut;
- QToolButton* _copy;
- QToolButton* _paste;
- QToolButton* _save;
+ TQToolButton* _undo;
+ TQToolButton* _redo;
+ TQToolButton* _cut;
+ TQToolButton* _copy;
+ TQToolButton* _paste;
+ TQToolButton* _save;
};
diff --git a/kregexpeditor/characterswidget.cpp b/kregexpeditor/characterswidget.cpp
index b219ed6..e0de760 100644
--- a/kregexpeditor/characterswidget.cpp
+++ b/kregexpeditor/characterswidget.cpp
@@ -30,16 +30,16 @@
#include "myfontmetrics.h"
#include "regexpconverter.h"
-#include <qpainter.h>
-#include <qgrid.h>
+#include <tqpainter.h>
+#include <tqgrid.h>
#include <iostream>
-#include <qhgroupbox.h>
-#include <qcursor.h>
-#include <qcheckbox.h>
+#include <tqhgroupbox.h>
+#include <tqcursor.h>
+#include <tqcheckbox.h>
CharacterEdits* CharactersWidget::_configWindow = 0;
-CharactersWidget::CharactersWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+CharactersWidget::CharactersWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name)
: RegExpWidget(editorWindow, parent, name)
{
@@ -47,7 +47,7 @@ CharactersWidget::CharactersWidget(RegExpEditorWindow* editorWindow, QWidget *pa
}
CharactersWidget::CharactersWidget( TextRangeRegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name )
+ TQWidget* parent, const char* name )
: RegExpWidget( editorWindow, parent, name )
{
_regexp = dynamic_cast<TextRangeRegExp*>( regexp->clone() );
@@ -60,27 +60,27 @@ CharactersWidget::~CharactersWidget()
}
-QSize CharactersWidget::sizeHint() const
+TQSize CharactersWidget::sizeHint() const
{
- QFontMetrics metrics = fontMetrics();
+ TQFontMetrics metrics = fontMetrics();
_textSize = HackCalculateFontSize(metrics, title());
// _textSize = metrics.size(0, title());
- QSize headerSize = QSize(_textSize.width() + 4 * bdSize,
+ TQSize headerSize = TQSize(_textSize.width() + 4 * bdSize,
_textSize.height());
_contentSize = HackCalculateFontSize(metrics,text());
// _contentSize = metrics.size(0, text());
- return QSize(QMAX(headerSize.width(), bdSize + _contentSize.width() + bdSize+ 2*pw),
+ return TQSize(QMAX(headerSize.width(), bdSize + _contentSize.width() + bdSize+ 2*pw),
headerSize.height() + bdSize + _contentSize.height() + bdSize + 2*pw);
}
-void CharactersWidget::paintEvent(QPaintEvent *e)
+void CharactersWidget::paintEvent(TQPaintEvent *e)
{
- QSize mySize = sizeHint();
+ TQSize mySize = sizeHint();
- QPainter painter(this);
+ TQPainter painter(this);
drawPossibleSelection( painter, mySize );
int center = _textSize.height()/2;
@@ -116,9 +116,9 @@ RegExp* CharactersWidget::regExp() const
return r;
}
-QString CharactersWidget::text() const
+TQString CharactersWidget::text() const
{
- QString res = QString::fromLatin1("");
+ TQString res = TQString::fromLatin1("");
if (_regexp->wordChar())
res += i18n("- A word character\n");
@@ -139,28 +139,28 @@ QString CharactersWidget::text() const
res += i18n("- A non-space character\n");
// Single characters
- QStringList chars = _regexp->chars();
+ TQStringList chars = _regexp->chars();
if ( !chars.isEmpty() ) {
- QString str = chars.join( QString::fromLocal8Bit(", ") );
- res += QString::fromLocal8Bit("- ") + str + QString::fromLocal8Bit("\n");
+ TQString str = chars.join( TQString::fromLocal8Bit(", ") );
+ res += TQString::fromLocal8Bit("- ") + str + TQString::fromLocal8Bit("\n");
}
// Ranges characters
- QPtrList<StringPair> range = _regexp->range();
- for ( QPtrListIterator<StringPair> it( range ); *it; ++it ) {
+ TQPtrList<StringPair> range = _regexp->range();
+ for ( TQPtrListIterator<StringPair> it( range ); *it; ++it ) {
StringPair* elm = static_cast<StringPair*>(*it);
if (elm) {
- QString fromText = elm->first();
- QString toText = elm->second();
+ TQString fromText = elm->first();
+ TQString toText = elm->second();
- res += QString::fromLocal8Bit("- ") + i18n("from ") + fromText + i18n(" to ") + toText + QString::fromLocal8Bit("\n");
+ res += TQString::fromLocal8Bit("- ") + i18n("from ") + fromText + i18n(" to ") + toText + TQString::fromLocal8Bit("\n");
}
}
return res.left(res.length()-1);
}
-QString CharactersWidget::title() const
+TQString CharactersWidget::title() const
{
if (_regexp->negate())
return i18n("Any Character Except");
@@ -169,9 +169,9 @@ QString CharactersWidget::title() const
}
-RegExpWidget* CharactersWidget::findWidgetToEdit( QPoint globalPos )
+RegExpWidget* CharactersWidget::findWidgetToEdit( TQPoint globalPos )
{
- if ( QRect(mapToGlobal(QPoint(0,0)), size()).contains( globalPos ) )
+ if ( TQRect(mapToGlobal(TQPoint(0,0)), size()).contains( globalPos ) )
return this;
else
return 0;
@@ -180,26 +180,26 @@ RegExpWidget* CharactersWidget::findWidgetToEdit( QPoint globalPos )
int CharactersWidget::edit()
{
if ( _configWindow == 0 ) {
- QApplication::setOverrideCursor( WaitCursor );
+ TQApplication::setOverrideCursor( WaitCursor );
// No parent here, as this window should continue to exists.
_configWindow = new CharacterEdits( 0, "CharactersWidget::_configWindow" );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
- _configWindow->move(QCursor::pos() - QPoint(_configWindow->sizeHint().width()/2,
+ _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->sizeHint().width()/2,
_configWindow->sizeHint().height()/2));
int ret = _configWindow->exec(_regexp );
- if ( ret == QDialog::Accepted ) {
+ if ( ret == TQDialog::Accepted ) {
_editorWindow->updateContent( 0 );
update();
}
return ret;
}
-void CharacterEdits::addCharacter( QString txt )
+void CharacterEdits::addCharacter( TQString txt )
{
KMultiFormListBoxEntryList list = _single->elements();
- for ( QPtrListIterator<KMultiFormListBoxEntry> it(list); *it; ++it ) {
+ for ( TQPtrListIterator<KMultiFormListBoxEntry> it(list); *it; ++it ) {
SingleEntry* entry = dynamic_cast<SingleEntry*>( *it );
if ( entry && entry->isEmpty() ) {
entry->setText( txt );
@@ -212,10 +212,10 @@ void CharacterEdits::addCharacter( QString txt )
_single->append( entry );
}
-void CharacterEdits::addRange( QString from, QString to )
+void CharacterEdits::addRange( TQString from, TQString to )
{
KMultiFormListBoxEntryList list = _range->elements();
- for ( QPtrListIterator<KMultiFormListBoxEntry> it(list); *it; ++it ) {
+ for ( TQPtrListIterator<KMultiFormListBoxEntry> it(list); *it; ++it ) {
RangeEntry* entry = dynamic_cast<RangeEntry*>( *it );
if ( entry && entry->isEmpty() ) {
entry->setFrom( from );
@@ -249,30 +249,30 @@ int CharacterEdits::exec( TextRangeRegExp* regexp )
// Characters
KMultiFormListBoxEntryList list1 = _single->elements();
- for ( QPtrListIterator<KMultiFormListBoxEntry> it(list1); *it; ++it ) {
+ for ( TQPtrListIterator<KMultiFormListBoxEntry> it(list1); *it; ++it ) {
SingleEntry* entry = dynamic_cast<SingleEntry*>( *it );
if (entry)
- entry->setText( QString::fromLocal8Bit("") );
+ entry->setText( TQString::fromLocal8Bit("") );
}
- QStringList list2 = regexp->chars();
- for ( QStringList::Iterator it2( list2.begin() ); ! (*it2).isNull(); ++it2 ) {
+ TQStringList list2 = regexp->chars();
+ for ( TQStringList::Iterator it2( list2.begin() ); ! (*it2).isNull(); ++it2 ) {
addCharacter( *it2 );
}
// Ranges
KMultiFormListBoxEntryList list3 = _range->elements();
- for ( QPtrListIterator<KMultiFormListBoxEntry> it3(list3); *it3; ++it3 ) {
+ for ( TQPtrListIterator<KMultiFormListBoxEntry> it3(list3); *it3; ++it3 ) {
RangeEntry* entry = dynamic_cast<RangeEntry*>( *it3 );
if (entry) {
- entry->setFrom( QString::fromLocal8Bit("") );
- entry->setTo( QString::fromLocal8Bit("") );
+ entry->setFrom( TQString::fromLocal8Bit("") );
+ entry->setTo( TQString::fromLocal8Bit("") );
}
}
- QPtrList<StringPair> ranges = regexp->range();
- for ( QPtrListIterator<StringPair> it4(ranges); *it4; ++it4 ) {
- QString from = (*it4)->first();
- QString to = (*it4)->second();
+ TQPtrList<StringPair> ranges = regexp->range();
+ for ( TQPtrListIterator<StringPair> it4(ranges); *it4; ++it4 ) {
+ TQString from = (*it4)->first();
+ TQString to = (*it4)->second();
addRange(from,to);
}
@@ -282,64 +282,64 @@ int CharacterEdits::exec( TextRangeRegExp* regexp )
}
-CharacterEdits::CharacterEdits( QWidget *parent, const char *name)
+CharacterEdits::CharacterEdits( TQWidget *parent, const char *name)
: KDialogBase( parent, name == 0 ? "CharacterEdits" : name, true,
i18n("Specify Characters"),
KDialogBase::Ok | KDialogBase::Cancel)
{
- QWidget* top = new QWidget( this );
- QVBoxLayout *topLayout = new QVBoxLayout(top, 6);
+ TQWidget* top = new TQWidget( this );
+ TQVBoxLayout *topLayout = new TQVBoxLayout(top, 6);
setMainWidget( top );
- negate = new QCheckBox(i18n("Do not match the characters specified here"),
+ negate = new TQCheckBox(i18n("Do not match the characters specified here"),
top);
topLayout->addWidget( negate );
// The predefined box
- QHGroupBox* predefined = new QHGroupBox(i18n("Predefined Character Ranges"),top);
+ TQHGroupBox* predefined = new TQHGroupBox(i18n("Predefined Character Ranges"),top);
topLayout->addWidget(predefined);
- QGrid* grid = new QGrid(3, predefined );
+ TQGrid* grid = new TQGrid(3, predefined );
- wordChar = new QCheckBox(i18n("A word character"),grid);
- digit = new QCheckBox(i18n("A digit character"),grid);
- space = new QCheckBox(i18n("A space character"), grid);
+ wordChar = new TQCheckBox(i18n("A word character"),grid);
+ digit = new TQCheckBox(i18n("A digit character"),grid);
+ space = new TQCheckBox(i18n("A space character"), grid);
- _nonWordChar = new QCheckBox(i18n("A non-word character"),grid);
- _nonDigit = new QCheckBox(i18n("A non-digit character"),grid);
- _nonSpace = new QCheckBox(i18n("A non-space character"), grid);
+ _nonWordChar = new TQCheckBox(i18n("A non-word character"),grid);
+ _nonDigit = new TQCheckBox(i18n("A non-digit character"),grid);
+ _nonSpace = new TQCheckBox(i18n("A non-space character"), grid);
// Single characters
- QVGroupBox* singleBox = new QVGroupBox(i18n("Single Characters"), top );
+ TQVGroupBox* singleBox = new TQVGroupBox(i18n("Single Characters"), top );
topLayout->addWidget( singleBox );
_single = new KMultiFormListBox(new SingleFactory(), KMultiFormListBox::MultiVisible,
singleBox);
_single->addElement(); _single->addElement(); _single->addElement();
- QWidget* moreW = new QWidget( singleBox );
- QHBoxLayout* moreLay = new QHBoxLayout( moreW );
- QPushButton* more = new QPushButton( i18n("More Entries"), moreW );
+ TQWidget* moreW = new TQWidget( singleBox );
+ TQHBoxLayout* moreLay = new TQHBoxLayout( moreW );
+ TQPushButton* more = new TQPushButton( i18n("More Entries"), moreW );
moreLay->addWidget( more );
moreLay->addStretch( 1 );
- connect(more,SIGNAL(clicked()), _single, SLOT(addElement()));
+ connect(more,TQT_SIGNAL(clicked()), _single, TQT_SLOT(addElement()));
// Ranges
- QVGroupBox* rangeBox = new QVGroupBox(i18n("Character Ranges"), top );
+ TQVGroupBox* rangeBox = new TQVGroupBox(i18n("Character Ranges"), top );
topLayout->addWidget( rangeBox );
_range = new KMultiFormListBox(new RangeFactory(), KMultiFormListBox::MultiVisible,
rangeBox);
_range->addElement(); _range->addElement(); _range->addElement();
- moreW = new QWidget( rangeBox );
- moreLay = new QHBoxLayout( moreW );
- more = new QPushButton( i18n("More Entries"), moreW );
+ moreW = new TQWidget( rangeBox );
+ moreLay = new TQHBoxLayout( moreW );
+ more = new TQPushButton( i18n("More Entries"), moreW );
moreLay->addWidget( more );
moreLay->addStretch( 1 );
- connect(more,SIGNAL(clicked()), _range, SLOT(addElement()));
+ connect(more,TQT_SIGNAL(clicked()), _range, TQT_SLOT(addElement()));
// Buttons
- connect(this, SIGNAL(okClicked()), this, SLOT(slotOK()));
+ connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotOK()));
}
void CharacterEdits::slotOK()
@@ -358,7 +358,7 @@ void CharacterEdits::slotOK()
// single characters
_regexp->clearChars();
KMultiFormListBoxEntryList list = _single->elements();
- for ( QPtrListIterator<KMultiFormListBoxEntry> it( list ); *it; ++it ) {
+ for ( TQPtrListIterator<KMultiFormListBoxEntry> it( list ); *it; ++it ) {
SingleEntry* entry = dynamic_cast<SingleEntry*>(*it);
if ( entry && !entry->isEmpty() ) {
_regexp->addCharacter( entry->text() );
@@ -368,7 +368,7 @@ void CharacterEdits::slotOK()
// Ranges
_regexp->clearRange();
list = _range->elements();
- for ( QPtrListIterator<KMultiFormListBoxEntry> it2( list ); *it2; ++it2 ) {
+ for ( TQPtrListIterator<KMultiFormListBoxEntry> it2( list ); *it2; ++it2 ) {
RangeEntry* entry = dynamic_cast<RangeEntry*>(*it2);
if ( entry && !entry->isEmpty() ) {
_regexp->addRange( entry->fromText(), entry->toText() );
@@ -377,21 +377,21 @@ void CharacterEdits::slotOK()
}
-SingleEntry::SingleEntry(QWidget* parent, const char* name )
+SingleEntry::SingleEntry(TQWidget* parent, const char* name )
:KMultiFormListBoxEntry( parent, name )
{
- QHBoxLayout* layout = new QHBoxLayout( this, 3, 6 );
+ TQHBoxLayout* layout = new TQHBoxLayout( this, 3, 6 );
_selector = new CharSelector( this );
layout->addWidget( _selector );
layout->addStretch(1);
}
-QString SingleEntry::text() const
+TQString SingleEntry::text() const
{
return _selector->text();
}
-void SingleEntry::setText( QString text )
+void SingleEntry::setText( TQString text )
{
_selector->setText( text );
}
@@ -402,40 +402,40 @@ bool SingleEntry::isEmpty() const
}
-RangeEntry::RangeEntry(QWidget* parent, const char* name )
+RangeEntry::RangeEntry(TQWidget* parent, const char* name )
:KMultiFormListBoxEntry( parent, name )
{
- QHBoxLayout* layout = new QHBoxLayout( this, 3, 6 );
+ TQHBoxLayout* layout = new TQHBoxLayout( this, 3, 6 );
- QLabel* label = new QLabel(i18n("From:"), this );
+ TQLabel* label = new TQLabel(i18n("From:"), this );
_from = new CharSelector( this );
layout->addWidget( label );
layout->addWidget( _from );
layout->addStretch(1);
- label = new QLabel(i18n("end of range","To:"), this );
+ label = new TQLabel(i18n("end of range","To:"), this );
_to = new CharSelector( this );
layout->addWidget( label );
layout->addWidget( _to );
}
-QString RangeEntry::fromText() const
+TQString RangeEntry::fromText() const
{
return _from->text();
}
-QString RangeEntry::toText() const
+TQString RangeEntry::toText() const
{
return _to->text();
}
-void RangeEntry::setFrom( QString text )
+void RangeEntry::setFrom( TQString text )
{
_from->setText( text );
}
-void RangeEntry::setTo( QString text )
+void RangeEntry::setTo( TQString text )
{
_to->setText( text );
}
diff --git a/kregexpeditor/characterswidget.h b/kregexpeditor/characterswidget.h
index 9df89b3..f6f2d66 100644
--- a/kregexpeditor/characterswidget.h
+++ b/kregexpeditor/characterswidget.h
@@ -26,7 +26,7 @@
#include <kmultiformlistbox.h>
#include "regexpwidget.h"
-#include <qvgroupbox.h>
+#include <tqvgroupbox.h>
class KDialogBase;
class CharacterEdits;
@@ -41,28 +41,28 @@ class QCheckBox;
class CharactersWidget :public RegExpWidget
{
public:
- CharactersWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+ CharactersWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *label = 0);
CharactersWidget( TextRangeRegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name = 0 );
+ TQWidget* parent, const char* name = 0 );
~CharactersWidget();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
virtual RegExp* regExp() const;
virtual RegExpType type() const { return CHARSET; }
- virtual RegExpWidget* findWidgetToEdit( QPoint globalPos );
+ virtual RegExpWidget* findWidgetToEdit( TQPoint globalPos );
virtual int edit();
protected:
- virtual void paintEvent(QPaintEvent *event);
- QString text() const;
- QString title() const;
+ virtual void paintEvent(TQPaintEvent *event);
+ TQString text() const;
+ TQString title() const;
private:
TextRangeRegExp *_regexp;
static CharacterEdits *_configWindow;
- mutable QSize _textSize;
- mutable QSize _contentSize;
+ mutable TQSize _textSize;
+ mutable TQSize _contentSize;
};
@@ -72,9 +72,9 @@ private:
class SingleEntry :public KMultiFormListBoxEntry
{
public:
- SingleEntry(QWidget* parent, const char* name = 0 );
- QString text() const;
- void setText( QString text );
+ SingleEntry(TQWidget* parent, const char* name = 0 );
+ TQString text() const;
+ void setText( TQString text );
bool isEmpty() const;
private:
@@ -87,11 +87,11 @@ private:
class RangeEntry :public KMultiFormListBoxEntry
{
public:
- RangeEntry(QWidget* parent, const char* name = 0 );
- QString fromText() const;
- QString toText() const;
- void setFrom( QString text );
- void setTo( QString text );
+ RangeEntry(TQWidget* parent, const char* name = 0 );
+ TQString fromText() const;
+ TQString toText() const;
+ void setFrom( TQString text );
+ void setTo( TQString text );
bool isEmpty() const;
private:
CharSelector *_from, *_to;
@@ -103,8 +103,8 @@ private:
class SingleFactory :public KMultiFormListBoxFactory
{
public:
- KMultiFormListBoxEntry *create(QWidget *parent) { return new SingleEntry( parent ); }
- QWidget *separator( QWidget* ) { return 0; }
+ KMultiFormListBoxEntry *create(TQWidget *parent) { return new SingleEntry( parent ); }
+ TQWidget *separator( TQWidget* ) { return 0; }
};
/**
@@ -113,8 +113,8 @@ public:
class RangeFactory :public KMultiFormListBoxFactory
{
public:
- KMultiFormListBoxEntry *create(QWidget *parent) { return new RangeEntry( parent ); }
- QWidget *separator( QWidget* ) { return 0; }
+ KMultiFormListBoxEntry *create(TQWidget *parent) { return new RangeEntry( parent ); }
+ TQWidget *separator( TQWidget* ) { return 0; }
};
/**
@@ -124,7 +124,7 @@ class CharacterEdits : public KDialogBase
{
Q_OBJECT
public:
- CharacterEdits(QWidget *parent = 0, const char *name = 0);
+ CharacterEdits(TQWidget *parent = 0, const char *name = 0);
public slots:
int exec( TextRangeRegExp* regexp );
@@ -133,11 +133,11 @@ protected slots:
void slotOK();
private:
- QCheckBox *negate, *wordChar, *_nonWordChar, *digit, *_nonDigit, *space, *_nonSpace;
+ TQCheckBox *negate, *wordChar, *_nonWordChar, *digit, *_nonDigit, *space, *_nonSpace;
KMultiFormListBox *_single, *_range;
- void addCharacter( QString txt );
- void addRange( QString from, QString to );
+ void addCharacter( TQString txt );
+ void addRange( TQString from, TQString to );
TextRangeRegExp* _regexp;
};
diff --git a/kregexpeditor/charselector.cpp b/kregexpeditor/charselector.cpp
index 27fd23d..a71c679 100644
--- a/kregexpeditor/charselector.cpp
+++ b/kregexpeditor/charselector.cpp
@@ -26,41 +26,41 @@
#include "charselector.h"
#include "limitedcharlineedit.h"
#include "regexpconverter.h"
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqcombobox.h>
/**
In the class CharSelector, three LimitedCharLineEdit are used.
- These widgets are all used in a QWidgetStack. The LimitedCharLineEdit
- class is basically a QLineEdit, which is limited to a certain
- number of characters. This conflicts with the QWidgetStack, as this
+ These widgets are all used in a TQWidgetStack. The LimitedCharLineEdit
+ class is basically a TQLineEdit, which is limited to a certain
+ number of characters. This conflicts with the TQWidgetStack, as this
class expects the widgets on the stack to take up all space.
StackContainer fills in this gab.
*/
class StackContainer :public QWidget
{
public:
- StackContainer( QWidget* child, QWidget* parent ) : QWidget( parent )
+ StackContainer( TQWidget* child, TQWidget* parent ) : TQWidget( parent )
{
- QHBoxLayout* layout = new QHBoxLayout( this );
- child->reparent( this, QPoint(0,0), false );
+ TQHBoxLayout* layout = new TQHBoxLayout( this );
+ child->reparent( this, TQPoint(0,0), false );
layout->addWidget( child );
layout->addStretch( 1 );
}
};
-CharSelector::CharSelector( QWidget* parent, const char* name )
- :QWidget( parent, name ), _oldIndex(0)
+CharSelector::CharSelector( TQWidget* parent, const char* name )
+ :TQWidget( parent, name ), _oldIndex(0)
{
- QStringList items;
- QHBoxLayout* layout = new QHBoxLayout( this, 0, 6 );
+ TQStringList items;
+ TQHBoxLayout* layout = new TQHBoxLayout( this, 0, 6 );
- _type = new QComboBox( this, "_type" );
+ _type = new TQComboBox( this, "_type" );
items << i18n("Normal Character")
<< i18n("Unicode Char in Hex.")
<< i18n("Unicode Char in Oct.")
- << QString::fromLatin1("----")
+ << TQString::fromLatin1("----")
<< i18n("The Bell Character (\\a)")
<< i18n("The Form Feed Character (\\f)")
<< i18n("The Line Feed Character (\\n)")
@@ -70,7 +70,7 @@ CharSelector::CharSelector( QWidget* parent, const char* name )
_type->insertStringList( items );
layout->addWidget( _type );
- _stack = new QWidgetStack( this, "_stack" );
+ _stack = new TQWidgetStack( this, "_stack" );
layout->addWidget( _stack );
_normal = new LimitedCharLineEdit( LimitedCharLineEdit::NORMAL, 0, "_normal" );
@@ -84,7 +84,7 @@ CharSelector::CharSelector( QWidget* parent, const char* name )
_stack->raiseWidget( 0 );
- connect( _type, SIGNAL( activated( int ) ), this, SLOT(slotNewItem( int ) ) );
+ connect( _type, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT(slotNewItem( int ) ) );
}
void CharSelector::slotNewItem( int which )
@@ -110,7 +110,7 @@ void CharSelector::slotNewItem( int which )
_oldIndex = which;
}
-void CharSelector::setText( QString text )
+void CharSelector::setText( TQString text )
{
// This is the best I can do about missing character range features, unless all of
// textrangeregexp is to be reworked. The problem is that textrangeregexp only allows to
@@ -119,26 +119,26 @@ void CharSelector::setText( QString text )
bool enabled = ( RegExpConverter::current()->features() & RegExpConverter::ExtRange );
_type->setEnabled( enabled );
- if ( text.at(0) == QChar('\\') ) {
- if ( text.at(1) == QChar('x') ) {
+ if ( text.at(0) == TQChar('\\') ) {
+ if ( text.at(1) == TQChar('x') ) {
_hex->setText(text.mid(2));
slotNewItem( 1 );
}
- else if ( text.at(1) == QChar('0') ) {
+ else if ( text.at(1) == TQChar('0') ) {
_oct->setText(text.mid(2));
slotNewItem( 2 );
}
- else if ( text.at(1) == QChar('a') )
+ else if ( text.at(1) == TQChar('a') )
slotNewItem(4);
- else if ( text.at(1) == QChar('f') )
+ else if ( text.at(1) == TQChar('f') )
slotNewItem(5);
- else if ( text.at(1) == QChar('n') )
+ else if ( text.at(1) == TQChar('n') )
slotNewItem(6);
- else if ( text.at(1) == QChar('r') )
+ else if ( text.at(1) == TQChar('r') )
slotNewItem(7);
- else if ( text.at(1) == QChar('t') )
+ else if ( text.at(1) == TQChar('t') )
slotNewItem(8);
- else if ( text.at(1) == QChar('v') )
+ else if ( text.at(1) == TQChar('v') )
slotNewItem(9);
else {
qWarning("Warning %s:%d Unknown escape %s", __FILE__, __LINE__, text.latin1() );
@@ -157,29 +157,29 @@ bool CharSelector::isEmpty() const
( _type->currentItem() == 2 && _oct->text().isEmpty() );
}
-QString CharSelector::text() const
+TQString CharSelector::text() const
{
switch ( _type->currentItem() ) {
case 0: // Normal Character
return _normal->text();
case 1: // Hex
- return QString::fromLocal8Bit("\\x") + _hex->text();
+ return TQString::fromLocal8Bit("\\x") + _hex->text();
case 2: // Oct
- return QString::fromLocal8Bit("\\0") + _oct->text();
+ return TQString::fromLocal8Bit("\\0") + _oct->text();
case 3: // The seperator
break;
case 4:
- return QString::fromLatin1("\\a");
+ return TQString::fromLatin1("\\a");
case 5:
- return QString::fromLatin1("\\f");
+ return TQString::fromLatin1("\\f");
case 6:
- return QString::fromLatin1("\\n");
+ return TQString::fromLatin1("\\n");
case 7:
- return QString::fromLatin1("\\r");
+ return TQString::fromLatin1("\\r");
case 8:
- return QString::fromLatin1("\\t");
+ return TQString::fromLatin1("\\t");
case 9:
- return QString::fromLatin1("\\v");
+ return TQString::fromLatin1("\\v");
}
- return QString::null;
+ return TQString::null;
}
diff --git a/kregexpeditor/charselector.h b/kregexpeditor/charselector.h
index 07aa056..4990ada 100644
--- a/kregexpeditor/charselector.h
+++ b/kregexpeditor/charselector.h
@@ -18,7 +18,7 @@
#ifndef CHARSELECTOR_H
#define CHARSELECTOR_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QComboBox;
class QWidgetStack;
@@ -29,9 +29,9 @@ class CharSelector :public QWidget
Q_OBJECT
public:
- CharSelector( QWidget* parent, const char* name = 0 );
- QString text() const;
- void setText( QString text );
+ CharSelector( TQWidget* parent, const char* name = 0 );
+ TQString text() const;
+ void setText( TQString text );
bool isEmpty() const;
protected:
@@ -41,8 +41,8 @@ private slots:
void slotNewItem( int which );
private:
- QComboBox* _type;
- QWidgetStack* _stack;
+ TQComboBox* _type;
+ TQWidgetStack* _stack;
LimitedCharLineEdit* _normal;
LimitedCharLineEdit* _hex;
LimitedCharLineEdit* _oct;
diff --git a/kregexpeditor/compoundregexp.cpp b/kregexpeditor/compoundregexp.cpp
index 2949b48..0c5e194 100644
--- a/kregexpeditor/compoundregexp.cpp
+++ b/kregexpeditor/compoundregexp.cpp
@@ -25,7 +25,7 @@
#include "compoundregexp.h"
#include "widgetfactory.h"
-CompoundRegExp::CompoundRegExp( bool selected, const QString& title, const QString& description, bool hidden,
+CompoundRegExp::CompoundRegExp( bool selected, const TQString& title, const TQString& description, bool hidden,
bool allowReplace, RegExp* child)
: RegExp( selected ), _title( title ), _description( description ), _hidden( hidden ), _allowReplace( allowReplace ), _child( child )
{
@@ -38,21 +38,21 @@ bool CompoundRegExp::check( ErrorMap& map, bool first, bool last )
return _child->check( map, first, last );
}
-QDomNode CompoundRegExp::toXml( QDomDocument* doc ) const
+TQDomNode CompoundRegExp::toXml( TQDomDocument* doc ) const
{
- QDomElement top = doc->createElement( QString::fromLocal8Bit( "Compound" ) );
+ TQDomElement top = doc->createElement( TQString::fromLocal8Bit( "Compound" ) );
if (_hidden)
- top.setAttribute( QString::fromLocal8Bit("hidden"), true );
+ top.setAttribute( TQString::fromLocal8Bit("hidden"), true );
if ( _allowReplace )
- top.setAttribute( QString::fromLocal8Bit("allowReplace"), true );
+ top.setAttribute( TQString::fromLocal8Bit("allowReplace"), true );
- QDomElement title = doc->createElement( QString::fromLocal8Bit( "Title" ) );
- QDomText titleTxt = doc->createTextNode( _title );
+ TQDomElement title = doc->createElement( TQString::fromLocal8Bit( "Title" ) );
+ TQDomText titleTxt = doc->createTextNode( _title );
title.appendChild( titleTxt );
top.appendChild( title );
- QDomElement description = doc->createElement( QString::fromLocal8Bit( "Description" ) );
- QDomText descriptionTxt = doc->createTextNode( _description );
+ TQDomElement description = doc->createElement( TQString::fromLocal8Bit( "Description" ) );
+ TQDomText descriptionTxt = doc->createTextNode( _description );
description.appendChild( descriptionTxt );
top.appendChild( description );
@@ -62,30 +62,30 @@ QDomNode CompoundRegExp::toXml( QDomDocument* doc ) const
}
-bool CompoundRegExp::load( QDomElement top, const QString& version )
+bool CompoundRegExp::load( TQDomElement top, const TQString& version )
{
- Q_ASSERT( top.tagName() == QString::fromLocal8Bit("Compound") );
- QString str = top.attribute( QString::fromLocal8Bit( "hidden" ), QString::fromLocal8Bit("0") );
- _hidden = true; // alway hidden. (str == QString::fromLocal8Bit("1") );
+ Q_ASSERT( top.tagName() == TQString::fromLocal8Bit("Compound") );
+ TQString str = top.attribute( TQString::fromLocal8Bit( "hidden" ), TQString::fromLocal8Bit("0") );
+ _hidden = true; // alway hidden. (str == TQString::fromLocal8Bit("1") );
- str = top.attribute( QString::fromLocal8Bit( "allowReplace" ), QString::fromLocal8Bit("0") );
- _allowReplace = (str == QString::fromLocal8Bit("1") );
+ str = top.attribute( TQString::fromLocal8Bit( "allowReplace" ), TQString::fromLocal8Bit("0") );
+ _allowReplace = (str == TQString::fromLocal8Bit("1") );
- for ( QDomNode node = top.firstChild(); !node.isNull(); node = node.nextSibling() ) {
+ for ( TQDomNode node = top.firstChild(); !node.isNull(); node = node.nextSibling() ) {
if ( !node.isElement() )
continue; // skip past comments.
- QString txt;
- QDomElement child = node.toElement();
- QDomNode txtNode = child.firstChild();
+ TQString txt;
+ TQDomElement child = node.toElement();
+ TQDomNode txtNode = child.firstChild();
if ( txtNode.isText() )
txt = txtNode.toText().data();
- if ( child.tagName() == QString::fromLocal8Bit( "Title" ) ) {
+ if ( child.tagName() == TQString::fromLocal8Bit( "Title" ) ) {
if ( txt.isEmpty() )
_title = txt;
else
_title = i18n(txt.utf8());
}
- else if ( child.tagName() == QString::fromLocal8Bit( "Description" ) ) {
+ else if ( child.tagName() == TQString::fromLocal8Bit( "Description" ) ) {
if ( txt.isEmpty() )
_description = txt;
else
diff --git a/kregexpeditor/compoundregexp.h b/kregexpeditor/compoundregexp.h
index 4e9aa8c..6368359 100644
--- a/kregexpeditor/compoundregexp.h
+++ b/kregexpeditor/compoundregexp.h
@@ -26,16 +26,16 @@
class CompoundRegExp :public RegExp
{
public:
- CompoundRegExp( bool selected, const QString& title = QString::null,
- const QString& description = QString::null,
+ CompoundRegExp( bool selected, const TQString& title = TQString::null,
+ const TQString& description = TQString::null,
bool hidden = false, bool allowReplace = false, RegExp* child = 0);
virtual bool check( ErrorMap&, bool first, bool last );
virtual int precedence() const { return _child->precedence();}
- virtual QDomNode toXml( QDomDocument* doc ) const;
- virtual bool load( QDomElement, const QString& version );
- QString title() const { return _title; }
- QString description() const { return _description; }
+ virtual TQDomNode toXml( TQDomDocument* doc ) const;
+ virtual bool load( TQDomElement, const TQString& version );
+ TQString title() const { return _title; }
+ TQString description() const { return _description; }
RegExp* child() const { return _child; }
bool hidden() const { return _hidden; }
bool allowReplace() const { return _allowReplace; }
@@ -43,8 +43,8 @@ public:
virtual bool operator==( const RegExp& other ) const;
private:
- QString _title;
- QString _description;
+ TQString _title;
+ TQString _description;
bool _hidden;
bool _allowReplace;
RegExp* _child;
diff --git a/kregexpeditor/compoundwidget.cpp b/kregexpeditor/compoundwidget.cpp
index 3294313..441143f 100644
--- a/kregexpeditor/compoundwidget.cpp
+++ b/kregexpeditor/compoundwidget.cpp
@@ -26,33 +26,33 @@
#endif
#include "compoundwidget.h"
-#include <qlayout.h>
-#include <qcursor.h>
-#include <qlineedit.h>
-#include <qpainter.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqcursor.h>
+#include <tqlineedit.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
#include "concwidget.h"
#include "kwidgetstreamer.h"
-#include "qcheckbox.h"
+#include "tqcheckbox.h"
//================================================================================
-CompoundDetailWindow::CompoundDetailWindow( QWidget* parent, const char* name )
- :QWidget( parent, name )
+CompoundDetailWindow::CompoundDetailWindow( TQWidget* parent, const char* name )
+ :TQWidget( parent, name )
{
- QVBoxLayout* layout = new QVBoxLayout( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
layout->setAutoAdd( true );
- QLabel* label = new QLabel( i18n("&Title:"), this);
- _title = new QLineEdit( this );
+ TQLabel* label = new TQLabel( i18n("&Title:"), this);
+ _title = new TQLineEdit( this );
label->setBuddy( _title );
- label = new QLabel( i18n("&Description:"), this );
- _description = new QMultiLineEdit( this );
+ label = new TQLabel( i18n("&Description:"), this );
+ _description = new TQMultiLineEdit( this );
label->setBuddy( _description );
- _allowReplace = new QCheckBox( i18n("&Automatically replace using this item"), this );
- QToolTip::add( _allowReplace, i18n("When the content of this box is typed in to the ASCII line,<br>"
+ _allowReplace = new TQCheckBox( i18n("&Automatically replace using this item"), this );
+ TQToolTip::add( _allowReplace, i18n("When the content of this box is typed in to the ASCII line,<br>"
"this box will automatically be added around it,<br>"
"if this check box is selected.") );
_allowReplace->setChecked( true );
@@ -61,12 +61,12 @@ CompoundDetailWindow::CompoundDetailWindow( QWidget* parent, const char* name )
}
-QString CompoundDetailWindow::title() const
+TQString CompoundDetailWindow::title() const
{
return _title->text();
}
-QString CompoundDetailWindow::description() const
+TQString CompoundDetailWindow::description() const
{
return _description->text();
}
@@ -76,12 +76,12 @@ bool CompoundDetailWindow::allowReplace() const
return _allowReplace->isChecked();
}
-void CompoundDetailWindow::setTitle( QString txt )
+void CompoundDetailWindow::setTitle( TQString txt )
{
_title->setText( txt );
}
-void CompoundDetailWindow::setDescription( QString txt )
+void CompoundDetailWindow::setDescription( TQString txt )
{
_description->setText( txt );
}
@@ -93,7 +93,7 @@ void CompoundDetailWindow::setAllowReplace( bool b )
//================================================================================
-CompoundWidget::CompoundWidget( RegExpEditorWindow* editorWindow, QWidget* parent,
+CompoundWidget::CompoundWidget( RegExpEditorWindow* editorWindow, TQWidget* parent,
const char* name )
:SingleContainerWidget( editorWindow, parent, name == 0 ? "CompoundWidget" : name )
{
@@ -102,7 +102,7 @@ CompoundWidget::CompoundWidget( RegExpEditorWindow* editorWindow, QWidget* paren
}
CompoundWidget::CompoundWidget( CompoundRegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name )
+ TQWidget* parent, const char* name )
: SingleContainerWidget( editorWindow, parent, name == 0 ? "CompoundWidget" : name )
{
init();
@@ -125,19 +125,19 @@ void CompoundWidget::init( )
_content = new CompoundDetailWindow( _configWindow );
_configWindow->setMainWidget( _content );
- connect( _configWindow, SIGNAL(cancelClicked()), this, SLOT(slotConfigCanceled())) ;
- connect(_configWindow, SIGNAL(finished()), this, SLOT(slotConfigWindowClosed()));
+ connect( _configWindow, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotConfigCanceled())) ;
+ connect(_configWindow, TQT_SIGNAL(finished()), this, TQT_SLOT(slotConfigWindowClosed()));
- _down = getIcon( QString::fromLocal8Bit( "1downarrow" ));
- _up = getIcon( QString::fromLocal8Bit( "1uparrow" ) );
+ _down = getIcon( TQString::fromLocal8Bit( "1downarrow" ));
+ _up = getIcon( TQString::fromLocal8Bit( "1uparrow" ) );
_hidden = false;
_backRefId = -1;
}
-QSize CompoundWidget::sizeHint() const
+TQSize CompoundWidget::sizeHint() const
{
- QFontMetrics metrics = fontMetrics();
+ TQFontMetrics metrics = fontMetrics();
_childSize = _child->sizeHint();
_textSize = metrics.size( 0, _content->title() );
@@ -158,15 +158,15 @@ QSize CompoundWidget::sizeHint() const
height = QMAX( _textSize.height(), _pixmapSize.height() ) +
2*bdSize + _childSize.height() + pw;
}
- return QSize( width, height );
+ return TQSize( width, height );
}
-void CompoundWidget::paintEvent( QPaintEvent *e )
+void CompoundWidget::paintEvent( TQPaintEvent *e )
{
- QSize mySize = sizeHint();
+ TQSize mySize = sizeHint();
- QPainter painter(this);
+ TQPainter painter(this);
drawPossibleSelection( painter, mySize);
int horLineY, childY;
@@ -175,7 +175,7 @@ void CompoundWidget::paintEvent( QPaintEvent *e )
if ( _hidden ) {
horLineY = _pixmapSize.height()/2;
childY = _pixmapSize.height() + bdSize;
- _pixmapPos = QPoint( mySize.width()-pw-bdSize-_pixmapSize.width(), 0 );
+ _pixmapPos = TQPoint( mySize.width()-pw-bdSize-_pixmapSize.width(), 0 );
painter.drawLine( pw, horLineY, _pixmapPos.x(), horLineY );
painter.drawLine( mySize.width() - bdSize - pw, horLineY,
mySize.width(), horLineY);
@@ -197,7 +197,7 @@ void CompoundWidget::paintEvent( QPaintEvent *e )
offset += _textSize.width() + bdSize;
}
- _pixmapPos = QPoint( mySize.width()-pw-bdSize-_pixmapSize.width(),
+ _pixmapPos = TQPoint( mySize.width()-pw-bdSize-_pixmapSize.width(),
horLineY - _pixmapSize.height()/2 );
painter.drawLine( offset, horLineY, _pixmapPos.x(), horLineY );
@@ -219,8 +219,8 @@ void CompoundWidget::paintEvent( QPaintEvent *e )
_content->title() );
}
else {
- QSize curSize = _child->size();
- QSize newSize = QSize( QMAX( _child->sizeHint().width(), mySize.width()-2*pw),
+ TQSize curSize = _child->size();
+ TQSize newSize = TQSize( QMAX( _child->sizeHint().width(), mySize.width()-2*pw),
_child->sizeHint().height());
_child->move( pw, childY );
@@ -244,7 +244,7 @@ void CompoundWidget::slotConfigWindowClosed()
void CompoundWidget::slotConfigCanceled()
{
- QDataStream stream( _backup, IO_ReadOnly );
+ TQDataStream stream( _backup, IO_ReadOnly );
KWidgetStreamer streamer;
streamer.fromStream( stream, _content );
repaint();
@@ -256,10 +256,10 @@ RegExp* CompoundWidget::regExp() const
_hidden, _content->allowReplace(), _child->regExp() );
}
-void CompoundWidget::mousePressEvent( QMouseEvent* event )
+void CompoundWidget::mousePressEvent( TQMouseEvent* event )
{
if ( event->button() == LeftButton &&
- QRect( _pixmapPos, _pixmapSize ).contains( event->pos() ) ) {
+ TQRect( _pixmapPos, _pixmapSize ).contains( event->pos() ) ) {
// Skip otherwise we will never see the mouse release
// since it is eaten by Editor window.
}
@@ -267,10 +267,10 @@ void CompoundWidget::mousePressEvent( QMouseEvent* event )
SingleContainerWidget::mousePressEvent( event );
}
-void CompoundWidget::mouseReleaseEvent( QMouseEvent* event)
+void CompoundWidget::mouseReleaseEvent( TQMouseEvent* event)
{
if ( event->button() == LeftButton &&
- QRect( _pixmapPos, _pixmapSize ).contains( event->pos() ) ) {
+ TQRect( _pixmapPos, _pixmapSize ).contains( event->pos() ) ) {
_hidden = !_hidden;
_editorWindow->updateContent( 0 );
repaint(); // is this necesary?
@@ -296,9 +296,9 @@ bool CompoundWidget::updateSelection( bool parentSelected )
int CompoundWidget::edit()
{
- _configWindow->move(QCursor::pos() - QPoint(_configWindow->sizeHint().width()/2,
+ _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->sizeHint().width()/2,
_configWindow->sizeHint().height()/2) );
- QDataStream stream( _backup, IO_WriteOnly );
+ TQDataStream stream( _backup, IO_WriteOnly );
KWidgetStreamer streamer;
streamer.toStream( _content, stream );
return _configWindow->exec();
@@ -310,10 +310,10 @@ int nextId()
return ++counter;
}
-QPixmap CompoundWidget::getIcon( const QString& name )
+TQPixmap CompoundWidget::getIcon( const TQString& name )
{
#ifdef QT_ONLY
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage( qembed_findImage(name) );
return pix;
#else
diff --git a/kregexpeditor/compoundwidget.h b/kregexpeditor/compoundwidget.h
index f757c05..4f68b9e 100644
--- a/kregexpeditor/compoundwidget.h
+++ b/kregexpeditor/compoundwidget.h
@@ -32,18 +32,18 @@ class QCheckBox;
class CompoundDetailWindow :public QWidget
{
public:
- CompoundDetailWindow(QWidget* parent, const char* name = 0);
- QString title() const;
- QString description() const;
+ CompoundDetailWindow(TQWidget* parent, const char* name = 0);
+ TQString title() const;
+ TQString description() const;
bool allowReplace() const;
- void setTitle( QString );
- void setDescription( QString );
+ void setTitle( TQString );
+ void setDescription( TQString );
void setAllowReplace( bool );
private:
- QLineEdit* _title;
- QMultiLineEdit* _description;
- QCheckBox* _allowReplace;
+ TQLineEdit* _title;
+ TQMultiLineEdit* _description;
+ TQCheckBox* _allowReplace;
};
@@ -62,23 +62,23 @@ class CompoundWidget :public SingleContainerWidget
Q_OBJECT
public:
- CompoundWidget( RegExpEditorWindow* editorWindow, QWidget* parent,
+ CompoundWidget( RegExpEditorWindow* editorWindow, TQWidget* parent,
const char* name = 0);
CompoundWidget( CompoundRegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name = 0);
+ TQWidget* parent, const char* name = 0);
virtual bool updateSelection( bool parentSelected );
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
virtual RegExp* regExp() const;
virtual RegExpType type() const { return COMPOUND; }
virtual int edit();
protected:
- virtual void paintEvent( QPaintEvent *e );
- virtual void mousePressEvent( QMouseEvent* e );
- virtual void mouseReleaseEvent( QMouseEvent* e);
+ virtual void paintEvent( TQPaintEvent *e );
+ virtual void mousePressEvent( TQMouseEvent* e );
+ virtual void mouseReleaseEvent( TQMouseEvent* e);
void init();
- QPixmap getIcon( const QString& name );
+ TQPixmap getIcon( const TQString& name );
protected slots:
void slotConfigCanceled();
@@ -86,16 +86,16 @@ protected slots:
private:
bool _hidden;
- QPixmap _up, _down;
- mutable QSize _pixmapSize;
- mutable QPoint _pixmapPos;
+ TQPixmap _up, _down;
+ mutable TQSize _pixmapSize;
+ mutable TQPoint _pixmapPos;
KDialogBase* _configWindow;
CompoundDetailWindow* _content;
- mutable QSize _textSize;
- mutable QSize _childSize;
- QByteArray _backup;
+ mutable TQSize _textSize;
+ mutable TQSize _childSize;
+ TQByteArray _backup;
int _backRefId;
};
diff --git a/kregexpeditor/concregexp.cpp b/kregexpeditor/concregexp.cpp
index 4fac8d0..cefbac4 100644
--- a/kregexpeditor/concregexp.cpp
+++ b/kregexpeditor/concregexp.cpp
@@ -55,20 +55,20 @@ RegExp* ConcRegExp::lastRegExp()
return list.at( list.count()-1);
}
-QDomNode ConcRegExp::toXml( QDomDocument* doc ) const
+TQDomNode ConcRegExp::toXml( TQDomDocument* doc ) const
{
- QDomElement top = doc->createElement( QString::fromLocal8Bit("Concatenation") );
+ TQDomElement top = doc->createElement( TQString::fromLocal8Bit("Concatenation") );
for ( RegExpListIt it(list); *it; ++it ) {
top.appendChild( (*it)->toXml( doc ) );
}
return top;
}
-bool ConcRegExp::load( QDomElement top, const QString& version )
+bool ConcRegExp::load( TQDomElement top, const TQString& version )
{
- Q_ASSERT( top.tagName() == QString::fromLocal8Bit( "Concatenation" ) );
+ Q_ASSERT( top.tagName() == TQString::fromLocal8Bit( "Concatenation" ) );
- for ( QDomNode child = top.firstChild(); !child.isNull(); child = child.nextSibling() ) {
+ for ( TQDomNode child = top.firstChild(); !child.isNull(); child = child.nextSibling() ) {
if ( ! child.isElement() )
continue; // User might have added a comment.
@@ -84,7 +84,7 @@ bool ConcRegExp::operator==( const RegExp& other ) const
{
// TODO: Merge with AltnRegExp::operator==
if ( list.count() == 1 )
- return ( other == *(const_cast< QPtrList<RegExp>& >(list).at(0)) );
+ return ( other == *(const_cast< TQPtrList<RegExp>& >(list).at(0)) );
if ( other.type() != type() )
return false;
diff --git a/kregexpeditor/concregexp.h b/kregexpeditor/concregexp.h
index 52a6342..47e3b26 100644
--- a/kregexpeditor/concregexp.h
+++ b/kregexpeditor/concregexp.h
@@ -36,8 +36,8 @@ public:
virtual bool check( ErrorMap&, bool first, bool last );
virtual int precedence() const { return 2;}
- virtual QDomNode toXml( QDomDocument* doc ) const;
- virtual bool load( QDomElement, const QString& version );
+ virtual TQDomNode toXml( TQDomDocument* doc ) const;
+ virtual bool load( TQDomElement, const TQString& version );
virtual RegExpType type() const {return CONC; }
virtual bool operator==( const RegExp& other ) const;
virtual void replacePart( CompoundRegExp* replacement );
diff --git a/kregexpeditor/concwidget.cpp b/kregexpeditor/concwidget.cpp
index f67c49b..d76730f 100644
--- a/kregexpeditor/concwidget.cpp
+++ b/kregexpeditor/concwidget.cpp
@@ -19,9 +19,9 @@
#include "concwidget.h"
#include "dragaccepter.h"
-#include <qpainter.h>
+#include <tqpainter.h>
-ConcWidget::ConcWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+ConcWidget::ConcWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name)
:MultiContainerWidget(editorWindow, parent, name == 0 ? "concwidget" : name)
{
@@ -33,13 +33,13 @@ ConcWidget::ConcWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
ConcWidget::ConcWidget(RegExpEditorWindow* editorWindow, RegExpWidget *child,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
:MultiContainerWidget(editorWindow, parent, name == 0 ? "concwidget" : name)
{
init();
DragAccepter *accepter = new DragAccepter(editorWindow, this);
_children.append(accepter);
- child->reparent(this, QPoint(0,0), false);
+ child->reparent(this, TQPoint(0,0), false);
addNewChild(accepter, child);
}
@@ -52,13 +52,13 @@ ConcWidget::ConcWidget( RegExpEditorWindow* editorWindow, ConcWidget* origConc,
for (unsigned int i = end; i >= start; i--) {
RegExpWidget* child = origConc->_children.take( i );
_children.prepend( child );
- child->reparent( this, QPoint(0,0), false);
+ child->reparent( this, TQPoint(0,0), false);
}
_children.prepend( new DragAccepter(editorWindow, this) );
}
ConcWidget::ConcWidget( ConcRegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name )
+ TQWidget* parent, const char* name )
:MultiContainerWidget( editorWindow, parent, name == 0 ? "concwidget" : name )
{
init();
@@ -78,22 +78,22 @@ void ConcWidget::init()
}
-QSize ConcWidget::sizeHint() const
+TQSize ConcWidget::sizeHint() const
{
int childrenWidth = 0;
int childrenHeight = 0;
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
for ( ; *it; ++it) {
- QSize thisChildSize = (*it)->sizeHint();
+ TQSize thisChildSize = (*it)->sizeHint();
childrenWidth += thisChildSize.width();
childrenHeight = QMAX(childrenHeight, thisChildSize.height());
}
- return QSize(childrenWidth, childrenHeight);
+ return TQSize(childrenWidth, childrenHeight);
}
-void ConcWidget::paintEvent( QPaintEvent *e)
+void ConcWidget::paintEvent( TQPaintEvent *e)
{
Q_ASSERT( dynamic_cast<DragAccepter*>(_children.at(0)) );
// if this fails, then I should check the location of the show()
@@ -106,8 +106,8 @@ void ConcWidget::paintEvent( QPaintEvent *e)
_children.at(0)->setGeometry( 0, 0, size().width(), size().height() );
}
else {
- QSize myReqSize = sizeHint();
- QSize mySize(QMAX(myReqSize.width(), size().width()),
+ TQSize myReqSize = sizeHint();
+ TQSize mySize(QMAX(myReqSize.width(), size().width()),
QMAX(myReqSize.height(), size().height()));
// If the widget needs less space than it can get then this space should
@@ -118,7 +118,7 @@ void ConcWidget::paintEvent( QPaintEvent *e)
extra = (size().width() - myReqSize.width())/2;
}
- QPainter painter( this );
+ TQPainter painter( this );
drawPossibleSelection( painter, mySize );
@@ -131,8 +131,8 @@ void ConcWidget::paintEvent( QPaintEvent *e)
continue;
RegExpWidget* child = _children.at(i);
- QSize childSize = child->sizeHint();
- QSize curChildSize = child->size();
+ TQSize childSize = child->sizeHint();
+ TQSize curChildSize = child->size();
//----------------------------- first place the accepter
int x = offset;
@@ -150,7 +150,7 @@ void ConcWidget::paintEvent( QPaintEvent *e)
if ( accepter->isSelected() ) {
y = (mySize.height()-_maxSelectedHeight)/2;
h = _maxSelectedHeight;
- painter.fillRect( x, y, w, h, QBrush( gray ) );
+ painter.fillRect( x, y, w, h, TQBrush( gray ) );
}
//-------------------------------------- place the child
@@ -170,7 +170,7 @@ void ConcWidget::paintEvent( QPaintEvent *e)
if ( child->isSelected() ) {
y = (mySize.height()-_maxSelectedHeight)/2;
h = _maxSelectedHeight;
- painter.fillRect( x, y, w, h, QBrush( gray ) );
+ painter.fillRect( x, y, w, h, TQBrush( gray ) );
}
}
@@ -187,7 +187,7 @@ void ConcWidget::paintEvent( QPaintEvent *e)
MultiContainerWidget::paintEvent( e );
}
-void ConcWidget::mousePressEvent ( QMouseEvent* event )
+void ConcWidget::mousePressEvent ( TQMouseEvent* event )
{
if ( event->button() == RightButton ) {
_editorWindow->showRMBMenu( _editorWindow->hasSelection() );
@@ -212,7 +212,7 @@ void ConcWidget::sizeAccepter( DragAccepter* accepter, int height, int totHeight
RegExp* ConcWidget::regExp() const
{
- QPtrListIterator<RegExpWidget> it( _children );
+ TQPtrListIterator<RegExpWidget> it( _children );
++it; // start with the second element.
if ( _children.count() == 3 ) {
@@ -236,7 +236,7 @@ bool ConcWidget::updateSelection(bool parentSelected)
_maxSelectedHeight = 0;
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past the first DragAccepter
for ( ; *it; it +=2 ) {
if ( (*it)->isSelected() ) {
@@ -287,7 +287,7 @@ void ConcWidget::applyRegExpToSelection( RegExpType type )
if ( start == -1 ) {
// No item selected at top level
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past the first DragAccepter
for ( ; *it ; it += 2 ) {
if ( (*it)->hasSelection() ) {
@@ -306,7 +306,7 @@ void ConcWidget::applyRegExpToSelection( RegExpType type )
subSequence->resize(0,0); // see note (1)
- subSequence->reparent( newElm, QPoint(0,0), false);
+ subSequence->reparent( newElm, TQPoint(0,0), false);
_children.insert( start, newElm );
newElm->show();
}
@@ -318,7 +318,7 @@ bool ConcWidget::isSelected() const
// A ConcWidget should be considered selected when all its elements has been selected
// otherwise empty ConcWidgets may be left behind when for example selection is deleted.
bool allSelected = true;
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past first DragAccepter.
for ( ; *it && allSelected; it += 2 ) {
allSelected = allSelected && (*it)->isSelected();
@@ -336,7 +336,7 @@ RegExp* ConcWidget::selection() const
bool foundMoreThanOne = false;
RegExp* regexp = 0;
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past the first DragAccepter
for ( ; (*it) ; it += 2 ) {
if ( (*it)->hasSelection() ) {
@@ -373,10 +373,10 @@ void ConcWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *other)
// 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);
- newChildA->reparent( this, QPoint(0,0), false);
+ newChildA->reparent( this, TQPoint(0,0), false);
_children.insert( i+1, newChildA );
RegExpWidget* newChildB = other->_children.take(j-1);
- newChildB->reparent( this, QPoint(0,0), false);
+ newChildB->reparent( this, TQPoint(0,0), false);
_children.insert( i+1, newChildB );
newChildA->show();
newChildB->show();
@@ -391,7 +391,7 @@ void ConcWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *other)
bool ConcWidget::validateSelection() const
{
bool cont = true;
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // skip past the DragAccepter.
for ( ; *it && cont; it += 2 ) {
cont = (*it)->validateSelection();
diff --git a/kregexpeditor/concwidget.h b/kregexpeditor/concwidget.h
index 6101ed2..9a4820c 100644
--- a/kregexpeditor/concwidget.h
+++ b/kregexpeditor/concwidget.h
@@ -30,17 +30,17 @@ class ConcRegExp;
class ConcWidget :public MultiContainerWidget
{
public:
- ConcWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+ ConcWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name = 0);
ConcWidget(RegExpEditorWindow* editorWindow, RegExpWidget *child,
- QWidget *parent, const char *name=0);
+ TQWidget *parent, const char *name=0);
ConcWidget( RegExpEditorWindow* editorWindow, ConcWidget* origConc,
unsigned int start, unsigned int end);
ConcWidget( ConcRegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name = 0);
+ TQWidget* parent, const char* name = 0);
void init();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
virtual RegExp* regExp() const;
virtual bool updateSelection(bool parentSelected);
virtual bool isSelected() const;
@@ -55,11 +55,11 @@ public:
bool hasAnyChildren() { return _children.count() > 1; }
protected:
- virtual void paintEvent( QPaintEvent *e );
- virtual void mousePressEvent ( QMouseEvent* event );
+ virtual void paintEvent( TQPaintEvent *e );
+ virtual void mousePressEvent ( TQMouseEvent* event );
void sizeAccepter( DragAccepter* accepter, int height, int totHeight );
void getSelectionIndexes( int* start, int* end );
- virtual void dragEnterEvent(QDragEnterEvent* event) { event->accept( false ); }
+ virtual void dragEnterEvent(TQDragEnterEvent* event) { event->accept( false ); }
private:
int _maxSelectedHeight;
diff --git a/kregexpeditor/dcbutton.cpp b/kregexpeditor/dcbutton.cpp
index b5bdcf8..4d714ca 100644
--- a/kregexpeditor/dcbutton.cpp
+++ b/kregexpeditor/dcbutton.cpp
@@ -23,13 +23,13 @@
#include "dcbutton.h"
-DoubleClickButton::DoubleClickButton( QPixmap pixmap, QWidget* parent, const char* name )
- : QToolButton( parent, name ? name : "DoubleClickButton" )
+DoubleClickButton::DoubleClickButton( TQPixmap pixmap, TQWidget* parent, const char* name )
+ : TQToolButton( parent, name ? name : "DoubleClickButton" )
{
setPixmap( pixmap );
}
-void DoubleClickButton::mouseDoubleClickEvent( QMouseEvent* )
+void DoubleClickButton::mouseDoubleClickEvent( TQMouseEvent* )
{
emit doubleClicked();
}
diff --git a/kregexpeditor/dcbutton.h b/kregexpeditor/dcbutton.h
index 78a18a3..7a81e18 100644
--- a/kregexpeditor/dcbutton.h
+++ b/kregexpeditor/dcbutton.h
@@ -18,11 +18,11 @@
#ifndef dcbutton
#define dcbutton
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
class QMouseEvent;
/**
- QToolButton extended to emit a signal on double click.
+ TQToolButton extended to emit a signal on double click.
@internal
*/
class DoubleClickButton :public QToolButton
@@ -30,10 +30,10 @@ class DoubleClickButton :public QToolButton
Q_OBJECT
public:
- DoubleClickButton( QPixmap pix, QWidget* parent, const char* name = 0);
+ DoubleClickButton( TQPixmap pix, TQWidget* parent, const char* name = 0);
protected:
- virtual void mouseDoubleClickEvent ( QMouseEvent * );
+ virtual void mouseDoubleClickEvent ( TQMouseEvent * );
signals:
void doubleClicked();
diff --git a/kregexpeditor/dotregexp.cpp b/kregexpeditor/dotregexp.cpp
index 3d375be..311b454 100644
--- a/kregexpeditor/dotregexp.cpp
+++ b/kregexpeditor/dotregexp.cpp
@@ -26,12 +26,12 @@ bool DotRegExp::check( ErrorMap&, bool, bool )
return false;
}
-QDomNode DotRegExp::toXml( QDomDocument* doc ) const
+TQDomNode DotRegExp::toXml( TQDomDocument* doc ) const
{
- return doc->createElement( QString::fromLocal8Bit("AnyChar") );
+ return doc->createElement( TQString::fromLocal8Bit("AnyChar") );
}
-bool DotRegExp::load( QDomElement /* top */, const QString& /*version*/ )
+bool DotRegExp::load( TQDomElement /* top */, const TQString& /*version*/ )
{
// Nothing to do
return true;
diff --git a/kregexpeditor/dotregexp.h b/kregexpeditor/dotregexp.h
index b46cffb..4af5f6b 100644
--- a/kregexpeditor/dotregexp.h
+++ b/kregexpeditor/dotregexp.h
@@ -32,8 +32,8 @@ public:
virtual bool check( ErrorMap&, bool first, bool last );
virtual int precedence() const { return 4;}
- virtual QDomNode toXml( QDomDocument* doc ) const;
- virtual bool load( QDomElement, const QString& version );
+ virtual TQDomNode toXml( TQDomDocument* doc ) const;
+ virtual bool load( TQDomElement, const TQString& version );
virtual RegExpType type() const { return DOT;}
};
diff --git a/kregexpeditor/drag.cpp b/kregexpeditor/drag.cpp
index 11ecc63..e17973c 100644
--- a/kregexpeditor/drag.cpp
+++ b/kregexpeditor/drag.cpp
@@ -20,8 +20,8 @@
#include "regexpconverter.h"
#include "widgetfactory.h"
-RegExpWidgetDrag::RegExpWidgetDrag( RegExp* regexp, QWidget* dragSource )
- : QDragObject( dragSource ), _regexp( regexp->clone() )
+RegExpWidgetDrag::RegExpWidgetDrag( RegExp* regexp, TQWidget* dragSource )
+ : TQDragObject( dragSource ), _regexp( regexp->clone() )
{
}
@@ -31,17 +31,17 @@ RegExpWidgetDrag::~RegExpWidgetDrag()
}
-bool RegExpWidgetDrag::canDecode( QDragMoveEvent* event )
+bool RegExpWidgetDrag::canDecode( TQDragMoveEvent* event )
{
return event->provides( "KRegExpEditor/widgetdrag" );
}
-RegExpWidget* RegExpWidgetDrag::decode(QDropEvent* event, RegExpEditorWindow* window,
- QWidget* parent)
+RegExpWidget* RegExpWidgetDrag::decode(TQDropEvent* event, RegExpEditorWindow* window,
+ TQWidget* parent)
{
- QByteArray payload = event->encodedData("KRegExpEditor/widgetdrag" );
- QTextStream stream( payload, IO_ReadOnly );
- QString str = stream.read();
+ TQByteArray payload = event->encodedData("KRegExpEditor/widgetdrag" );
+ TQTextStream stream( payload, IO_ReadOnly );
+ TQString str = stream.read();
RegExp* regexp = WidgetFactory::createRegExp( str );
RegExpWidget* widget = WidgetFactory::createWidget( regexp, window, parent );
delete regexp;
@@ -58,15 +58,15 @@ const char * RegExpWidgetDrag::format ( int i ) const
return 0;
}
-QByteArray RegExpWidgetDrag::encodedData ( const char* format ) const
+TQByteArray RegExpWidgetDrag::encodedData ( const char* format ) const
{
- QByteArray data;
- QTextStream stream( data, IO_WriteOnly );
- if ( QString::fromLocal8Bit( format ).startsWith(QString::fromLocal8Bit( "KRegExpEditor/widgetdrag" ) ) ) {
- QString xml = _regexp->toXmlString();
+ TQByteArray data;
+ TQTextStream stream( data, IO_WriteOnly );
+ if ( TQString::fromLocal8Bit( format ).startsWith(TQString::fromLocal8Bit( "KRegExpEditor/widgetdrag" ) ) ) {
+ TQString xml = _regexp->toXmlString();
stream << xml;
}
- else if ( QString::fromLocal8Bit( format ).startsWith(QString::fromLocal8Bit( "text/plain" ) ) ) {
+ else if ( TQString::fromLocal8Bit( format ).startsWith(TQString::fromLocal8Bit( "text/plain" ) ) ) {
stream << RegExpConverter::current()->toStr( _regexp, false );
}
else {
diff --git a/kregexpeditor/drag.h b/kregexpeditor/drag.h
index 5a074d1..1ec220b 100644
--- a/kregexpeditor/drag.h
+++ b/kregexpeditor/drag.h
@@ -18,7 +18,7 @@
#ifndef drag_h
#define drag_h
-#include <qdragobject.h>
+#include <tqdragobject.h>
class RegExp;
class RegExpWidget;
@@ -31,13 +31,13 @@ class RegExpEditorWindow;
class RegExpWidgetDrag :public QDragObject
{
public:
- RegExpWidgetDrag( RegExp* regexp , QWidget* dragSource);
+ RegExpWidgetDrag( RegExp* regexp , TQWidget* dragSource);
~RegExpWidgetDrag();
virtual const char * format ( int i = 0 ) const;
- virtual QByteArray encodedData ( const char * ) const;
- static bool canDecode(QDragMoveEvent* event);
- static RegExpWidget* decode(QDropEvent* event, RegExpEditorWindow* window,
- QWidget* parent);
+ virtual TQByteArray encodedData ( const char * ) const;
+ static bool canDecode(TQDragMoveEvent* event);
+ static RegExpWidget* decode(TQDropEvent* event, RegExpEditorWindow* window,
+ TQWidget* parent);
private:
RegExp* _regexp;
};
diff --git a/kregexpeditor/dragaccepter.cpp b/kregexpeditor/dragaccepter.cpp
index 0198e58..bbbf538 100644
--- a/kregexpeditor/dragaccepter.cpp
+++ b/kregexpeditor/dragaccepter.cpp
@@ -18,7 +18,7 @@
#include "dragaccepter.h"
#include "concwidget.h"
-#include <qpainter.h>
+#include <tqpainter.h>
DragAccepter::DragAccepter(RegExpEditorWindow* editorWindow, RegExpWidget *parent,
const char *name)
@@ -28,14 +28,14 @@ DragAccepter::DragAccepter(RegExpEditorWindow* editorWindow, RegExpWidget *paren
setAcceptDrops(TRUE);
}
-QSize DragAccepter::sizeHint() const
+TQSize DragAccepter::sizeHint() const
{
- return QSize(10,10);
+ return TQSize(10,10);
}
-void DragAccepter::paintEvent(QPaintEvent *e)
+void DragAccepter::paintEvent(TQPaintEvent *e)
{
- QPainter painter(this);
+ TQPainter painter(this);
drawPossibleSelection( painter, size() );
if ( _drawLine )
@@ -44,7 +44,7 @@ void DragAccepter::paintEvent(QPaintEvent *e)
RegExpWidget::paintEvent(e);
}
-void DragAccepter::mousePressEvent ( QMouseEvent* event )
+void DragAccepter::mousePressEvent ( TQMouseEvent* event )
{
if ( event->button() == RightButton ) {
_editorWindow->showRMBMenu( _editorWindow->hasSelection() );
@@ -54,7 +54,7 @@ void DragAccepter::mousePressEvent ( QMouseEvent* event )
}
}
-void DragAccepter::mouseReleaseEvent( QMouseEvent* event )
+void DragAccepter::mouseReleaseEvent( TQMouseEvent* event )
{
if ( _editorWindow->isPasteing() && event->button() == LeftButton ) {
RegExp* regexp = _editorWindow->pasteData();
@@ -82,7 +82,7 @@ void DragAccepter::mouseReleaseEvent( QMouseEvent* event )
}
else {
RegExpWidget *child = WidgetFactory::createWidget( _editorWindow,
- dynamic_cast<QWidget*>(parent()),
+ dynamic_cast<TQWidget*>(parent()),
_editorWindow->insertType() );
if ( child ) {
RegExpWidget *w = dynamic_cast<RegExpWidget*>(parent());
@@ -98,13 +98,13 @@ void DragAccepter::mouseReleaseEvent( QMouseEvent* event )
}
-void DragAccepter::dragEnterEvent(QDragEnterEvent *event)
+void DragAccepter::dragEnterEvent(TQDragEnterEvent *event)
{
bool selfDrag = ( event->source() && event->source()->topLevelWidget() == topLevelWidget() && _isSelected );
event->accept(RegExpWidgetDrag::canDecode( event ) && !selfDrag );
}
-void DragAccepter::dropEvent(QDropEvent *event)
+void DragAccepter::dropEvent(TQDropEvent *event)
{
// The widget will be reparent afterward or part of it will, so no need to give
// it a parent here.
@@ -119,7 +119,7 @@ void DragAccepter::dropEvent(QDropEvent *event)
RegExpWidget *rew = dynamic_cast<RegExpWidget*>(parent());
if (rew)
rew->addNewConcChild(this, elm);
- QWidget *w = dynamic_cast<QWidget*>(parent());
+ TQWidget *w = dynamic_cast<TQWidget*>(parent());
if (w)
w->update();
_editorWindow->updateContent( this );
diff --git a/kregexpeditor/dragaccepter.h b/kregexpeditor/dragaccepter.h
index 48af09f..c9c6fd8 100644
--- a/kregexpeditor/dragaccepter.h
+++ b/kregexpeditor/dragaccepter.h
@@ -32,17 +32,17 @@ class DragAccepter :public RegExpWidget
public:
DragAccepter(RegExpEditorWindow* editorWindow, RegExpWidget *parent,
const char *name = 0);
- QSize sizeHint() const;
+ TQSize sizeHint() const;
virtual RegExp* regExp() const;
virtual RegExpType type() const { return DRAGACCEPTER; }
void setDrawLine( bool drawLine ) { _drawLine = drawLine; }
protected:
- virtual void mousePressEvent ( QMouseEvent* event );
- virtual void mouseReleaseEvent( QMouseEvent* event );
- virtual void dragEnterEvent(QDragEnterEvent *event);
- virtual void dropEvent(QDropEvent *event);
- virtual void paintEvent(QPaintEvent *);
+ virtual void mousePressEvent ( TQMouseEvent* event );
+ virtual void mouseReleaseEvent( TQMouseEvent* event );
+ virtual void dragEnterEvent(TQDragEnterEvent *event);
+ virtual void dropEvent(TQDropEvent *event);
+ virtual void paintEvent(TQPaintEvent *);
virtual bool acceptWidgetInsert( RegExpType ) const { return true; }
virtual bool acceptWidgetPaste() const { return true; }
diff --git a/kregexpeditor/editorwindow.cpp b/kregexpeditor/editorwindow.cpp
index e8c4ac8..fedd0a9 100644
--- a/kregexpeditor/editorwindow.cpp
+++ b/kregexpeditor/editorwindow.cpp
@@ -31,21 +31,21 @@
#include "editorwindow.h"
#include "concwidget.h"
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qaccel.h>
-#include <qcursor.h>
-#include <qclipboard.h>
-#include <qpopupmenu.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqaccel.h>
+#include <tqcursor.h>
+#include <tqclipboard.h>
+#include <tqpopupmenu.h>
#include "regexp.h"
#include "userdefinedregexps.h"
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
-RegExpEditorWindow::RegExpEditorWindow( QWidget *parent, const char *name)
- : QWidget(parent, name, Qt::WPaintUnclipped)
+RegExpEditorWindow::RegExpEditorWindow( TQWidget *parent, const char *name)
+ : TQWidget(parent, name, Qt::WPaintUnclipped)
{
_top = new ConcWidget(this, this);
- _layout = new QHBoxLayout( this);
+ _layout = new TQHBoxLayout( this);
_layout->addWidget(_top);
_top->setToplevel();
_undrawSelection = false;
@@ -54,16 +54,16 @@ RegExpEditorWindow::RegExpEditorWindow( QWidget *parent, const char *name)
_pasteInAction = false;
_pasteData = 0;
- QAccel* accel = new QAccel( this );
- accel->connectItem( accel->insertItem( CTRL+Key_C ), this, SLOT( slotCopy() ) );
- accel->connectItem( accel->insertItem( CTRL+Key_X ), this, SLOT( slotCut() ) );
- accel->connectItem( accel->insertItem( Key_Delete ), this, SLOT( slotCut() ) );
- accel->connectItem( accel->insertItem( Key_BackSpace ), this, SLOT( slotCut() ) );
- accel->connectItem( accel->insertItem( CTRL+Key_V ), this, SLOT( slotStartPasteAction() ) );
- accel->connectItem( accel->insertItem( Key_Escape ), this, SLOT( slotEndActions() ) );
- accel->connectItem( accel->insertItem( CTRL+Key_S ), this, SLOT( slotSave() ) );
+ TQAccel* accel = new TQAccel( this );
+ accel->connectItem( accel->insertItem( CTRL+Key_C ), this, TQT_SLOT( slotCopy() ) );
+ accel->connectItem( accel->insertItem( CTRL+Key_X ), this, TQT_SLOT( slotCut() ) );
+ accel->connectItem( accel->insertItem( Key_Delete ), this, TQT_SLOT( slotCut() ) );
+ accel->connectItem( accel->insertItem( Key_BackSpace ), this, TQT_SLOT( slotCut() ) );
+ accel->connectItem( accel->insertItem( CTRL+Key_V ), this, TQT_SLOT( slotStartPasteAction() ) );
+ accel->connectItem( accel->insertItem( Key_Escape ), this, TQT_SLOT( slotEndActions() ) );
+ accel->connectItem( accel->insertItem( CTRL+Key_S ), this, TQT_SLOT( slotSave() ) );
- connect( this, SIGNAL( change() ), this, SLOT( emitVerifyRegExp() ) );
+ connect( this, TQT_SIGNAL( change() ), this, TQT_SLOT( emitVerifyRegExp() ) );
}
RegExp* RegExpEditorWindow::regExp() const
@@ -71,41 +71,41 @@ RegExp* RegExpEditorWindow::regExp() const
return _top->regExp();
}
-void RegExpEditorWindow::mousePressEvent ( QMouseEvent* event )
+void RegExpEditorWindow::mousePressEvent ( TQMouseEvent* event )
{
setFocus();
updateContent( 0 );
_start = event->pos();
- _lastPoint = QPoint(0,0);
+ _lastPoint = TQPoint(0,0);
if ( pointSelected( event->globalPos() ) ) {
_isDndOperation = true;
}
else {
_isDndOperation = false;
- _selection = QRect();
+ _selection = TQRect();
_top->updateSelection( false );
- QWidget::mousePressEvent( event );
+ TQWidget::mousePressEvent( event );
}
grabMouse();
}
-bool RegExpEditorWindow::pointSelected( QPoint p ) const
+bool RegExpEditorWindow::pointSelected( TQPoint p ) const
{
- QRect rect = _top->selectionRect();
+ TQRect rect = _top->selectionRect();
return rect.contains(p);
}
-void RegExpEditorWindow::mouseMoveEvent ( QMouseEvent* event )
+void RegExpEditorWindow::mouseMoveEvent ( TQMouseEvent* event )
{
if ( _isDndOperation ) {
- if ( ( _start - event->pos() ).manhattanLength() > QApplication::startDragDistance() ) {
+ if ( ( _start - event->pos() ).manhattanLength() > TQApplication::startDragDistance() ) {
RegExp* regexp = _top->selection();
if ( !regexp )
return;
- QDragObject *d = new RegExpWidgetDrag( regexp, this );
+ TQDragObject *d = new RegExpWidgetDrag( regexp, this );
delete regexp;
bool del = d->drag();
@@ -120,13 +120,13 @@ void RegExpEditorWindow::mouseMoveEvent ( QMouseEvent* event )
}
}
else {
- QPainter p( this );
+ TQPainter p( this );
p.setRasterOp( Qt::NotROP );
p.setPen( Qt::DotLine );
// remove last selection rectangle
if ( ! _lastPoint.isNull() && _undrawSelection ) {
- p.drawRect(QRect(_start, _lastPoint));
+ p.drawRect(TQRect(_start, _lastPoint));
}
// Note this line must come after the old rect has been removed
@@ -136,25 +136,25 @@ void RegExpEditorWindow::mouseMoveEvent ( QMouseEvent* event )
_top->updateSelection( false );
emit scrolling( event->pos() );
- p.drawRect(QRect(_start, event->pos()));
+ p.drawRect(TQRect(_start, event->pos()));
_undrawSelection = true;
_lastPoint = event->pos();
- _selection = QRect(mapToGlobal(_start), mapToGlobal(_lastPoint)).normalize();
+ _selection = TQRect(mapToGlobal(_start), mapToGlobal(_lastPoint)).normalize();
}
}
-void RegExpEditorWindow::mouseReleaseEvent( QMouseEvent *event)
+void RegExpEditorWindow::mouseReleaseEvent( TQMouseEvent *event)
{
releaseMouse();
- QWidget::mouseReleaseEvent( event);
+ TQWidget::mouseReleaseEvent( event);
// remove last selection rectangle
- QPainter p( this );
+ TQPainter p( this );
p.setRasterOp( Qt::NotROP );
p.setPen( Qt::DotLine );
if ( ! _lastPoint.isNull() ) {
- p.drawRect(QRect(_start, _lastPoint));
+ p.drawRect(TQRect(_start, _lastPoint));
}
_top->validateSelection();
_top->updateAll();
@@ -164,9 +164,9 @@ void RegExpEditorWindow::mouseReleaseEvent( QMouseEvent *event)
}
}
-bool RegExpEditorWindow::selectionOverlap( QPoint pos, QSize size ) const
+bool RegExpEditorWindow::selectionOverlap( TQPoint pos, TQSize size ) const
{
- QRect child(pos, size);
+ TQRect child(pos, size);
return (_selection.intersects(child) && ! child.contains(_selection));
}
@@ -226,35 +226,35 @@ void RegExpEditorWindow::slotDeleteSelection()
updateContent( 0 );
}
-void RegExpEditorWindow::updateContent( QWidget* focusChild)
+void RegExpEditorWindow::updateContent( TQWidget* focusChild)
{
- QPoint p(0,0);
+ TQPoint p(0,0);
if ( focusChild )
- p = focusChild->mapTo( this, QPoint(0,0) );
+ p = focusChild->mapTo( this, TQPoint(0,0) );
_top->update();
emit contentChanged( p );
}
-QSize RegExpEditorWindow::sizeHint() const
+TQSize RegExpEditorWindow::sizeHint() const
{
return _top->sizeHint();
}
-void RegExpEditorWindow::paintEvent( QPaintEvent* event )
+void RegExpEditorWindow::paintEvent( TQPaintEvent* event )
{
- QWidget::paintEvent( event );
+ TQWidget::paintEvent( event );
_undrawSelection = false;
}
void RegExpEditorWindow::slotCut()
{
- cut( QCursor::pos() );
+ cut( TQCursor::pos() );
emit change();
emit canSave( _top->hasAnyChildren() );
}
-void RegExpEditorWindow::cut( QPoint pos )
+void RegExpEditorWindow::cut( TQPoint pos )
{
cutCopyAux( pos );
slotDeleteSelection();
@@ -262,17 +262,17 @@ void RegExpEditorWindow::cut( QPoint pos )
void RegExpEditorWindow::slotCopy()
{
- copy( QCursor::pos() );
+ copy( TQCursor::pos() );
}
-void RegExpEditorWindow::copy( QPoint pos )
+void RegExpEditorWindow::copy( TQPoint pos )
{
cutCopyAux( pos );
clearSelection( true );
}
-void RegExpEditorWindow::cutCopyAux( QPoint pos )
+void RegExpEditorWindow::cutCopyAux( TQPoint pos )
{
if ( !hasSelection() ) {
RegExpWidget* widget = _top->widgetUnderPoint( pos, true );
@@ -298,9 +298,9 @@ void RegExpEditorWindow::cutCopyAux( QPoint pos )
void RegExpEditorWindow::slotStartPasteAction()
{
- QByteArray data = qApp->clipboard()->data()->encodedData( "KRegExpEditor/widgetdrag" );
- QTextStream stream( data, IO_ReadOnly );
- QString str = stream.read();
+ TQByteArray data = qApp->clipboard()->data()->encodedData( "KRegExpEditor/widgetdrag" );
+ TQTextStream stream( data, IO_ReadOnly );
+ TQString str = stream.read();
RegExp* regexp = WidgetFactory::createRegExp( str );
if ( regexp )
@@ -318,17 +318,17 @@ void RegExpEditorWindow::showRMBMenu( bool enableCutCopy )
enum CHOICES { CUT, COPY, PASTE, SAVE, EDIT };
if ( !_menu ) {
- _menu = new QPopupMenu( 0 );
- _menu->insertItem(getIcon(QString::fromLocal8Bit("editcut")),
+ _menu = new TQPopupMenu( 0 );
+ _menu->insertItem(getIcon(TQString::fromLocal8Bit("editcut")),
i18n("C&ut"), CUT);
- _menu->insertItem(getIcon(QString::fromLocal8Bit("editcopy")),
+ _menu->insertItem(getIcon(TQString::fromLocal8Bit("editcopy")),
i18n("&Copy"), COPY);
- _menu->insertItem(getIcon(QString::fromLocal8Bit("editpaste")),
+ _menu->insertItem(getIcon(TQString::fromLocal8Bit("editpaste")),
i18n("&Paste"), PASTE);
_menu->insertSeparator();
- _menu->insertItem(getIcon(QString::fromLocal8Bit("edit")),
+ _menu->insertItem(getIcon(TQString::fromLocal8Bit("edit")),
i18n("&Edit"), EDIT);
- _menu->insertItem(getIcon(QString::fromLocal8Bit("filesave")),
+ _menu->insertItem(getIcon(TQString::fromLocal8Bit("filesave")),
i18n("&Save Regular Expression..."), SAVE);
}
@@ -342,11 +342,11 @@ void RegExpEditorWindow::showRMBMenu( bool enableCutCopy )
_menu->setItemEnabled( SAVE, _top->hasAnyChildren() );
- RegExpWidget* editWidget = _top->findWidgetToEdit( QCursor::pos() );
+ RegExpWidget* editWidget = _top->findWidgetToEdit( TQCursor::pos() );
_menu->setItemEnabled( EDIT, editWidget );
- QPoint pos = QCursor::pos();
+ TQPoint pos = TQCursor::pos();
int choice = _menu->exec( pos );
switch ( choice ) {
case COPY: copy( pos ); break;
@@ -366,29 +366,29 @@ void RegExpEditorWindow::applyRegExpToSelection( RegExpType tp )
void RegExpEditorWindow::slotSave()
{
- QString dir = WidgetWinItem::path();
- QString txt;
+ TQString dir = WidgetWinItem::path();
+ TQString txt;
#ifdef QT_ONLY
txt = QInputDialog::getText( tr("Name for regexp"), tr("Enter name:") );
if ( txt.isNull() )
return;
#else
- KLineEditDlg dlg(i18n("Enter name:"), QString::null, this);
+ KLineEditDlg dlg(i18n("Enter name:"), TQString::null, this);
dlg.setCaption(i18n("Name for Regular Expression"));
if (!dlg.exec()) return;
txt = dlg.text();
#endif
- QString fileName = dir + QString::fromLocal8Bit("/") + txt + QString::fromLocal8Bit(".regexp");
- QFileInfo finfo( fileName );
+ TQString fileName = dir + TQString::fromLocal8Bit("/") + txt + TQString::fromLocal8Bit(".regexp");
+ TQFileInfo finfo( fileName );
if ( finfo.exists() ) {
- int answer = KMessageBox::warningContinueCancel( this, i18n("<p>Overwrite named regular expression <b>%1</b></p>").arg(txt), QString::null, i18n("Overwrite"));
+ int answer = KMessageBox::warningContinueCancel( this, i18n("<p>Overwrite named regular expression <b>%1</b></p>").arg(txt), TQString::null, i18n("Overwrite"));
if ( answer != KMessageBox::Continue )
return;
}
- QFile file( fileName );
+ TQFile file( fileName );
if ( ! file.open(IO_WriteOnly) ) {
KMessageBox::sorry( this, i18n("Could not open file for writing: %1").arg(fileName) );
return;
@@ -396,10 +396,10 @@ void RegExpEditorWindow::slotSave()
// Convert to XML.
RegExp* regexp = _top->regExp();
- QString xml = regexp->toXmlString();
+ TQString xml = regexp->toXmlString();
delete regexp;
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << xml;
file.close();
@@ -429,7 +429,7 @@ void RegExpEditorWindow::slotSetRegExp( RegExp* regexp )
void RegExpEditorWindow::updateCursorUnderPoint()
{
- RegExpWidget* widget = _top->widgetUnderPoint( QCursor::pos(), false );
+ RegExpWidget* widget = _top->widgetUnderPoint( TQCursor::pos(), false );
if ( widget )
widget->updateCursorShape();
}
@@ -440,10 +440,10 @@ void RegExpEditorWindow::emitVerifyRegExp()
}
-QIconSet RegExpEditorWindow::getIcon( const QString& name )
+TQIconSet RegExpEditorWindow::getIcon( const TQString& name )
{
#ifdef QT_ONLY
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage( qembed_findImage( name ) );
return pix;
#else
diff --git a/kregexpeditor/editorwindow.h b/kregexpeditor/editorwindow.h
index e925c59..dca5603 100644
--- a/kregexpeditor/editorwindow.h
+++ b/kregexpeditor/editorwindow.h
@@ -20,9 +20,9 @@
#include "drag.h"
#include "widgetfactory.h"
-#include <qmultilineedit.h>
-#include <qlabel.h>
-#include <qiconset.h>
+#include <tqmultilineedit.h>
+#include <tqlabel.h>
+#include <tqiconset.h>
class RegExp;
class RegExpWidget;
class QHBoxLayout;
@@ -48,7 +48,7 @@ class RegExpEditorWindow :public QWidget
Q_OBJECT
public:
- RegExpEditorWindow(QWidget *parent, const char *name = 0);
+ RegExpEditorWindow(TQWidget *parent, const char *name = 0);
/**
Returns an object which represent the regular expression "drawn" in
@@ -64,12 +64,12 @@ public:
Note this method is only valid while doing rubber-band
selection. Afterwards, use @ref pointSelected instead.
*/
- bool selectionOverlap( QPoint globalPos, QSize size ) const;
+ bool selectionOverlap( TQPoint globalPos, TQSize size ) const;
/**
returns true if `pos' lays on top of a widget that is selected.
*/
- bool pointSelected( QPoint pos ) const;
+ bool pointSelected( TQPoint pos ) const;
/**
returns true if the editor has a selection.
@@ -86,7 +86,7 @@ public:
invoked update on the top widget, and ensures that `focusChild' is
visible. It's valid for `focusChild' to be 0.
*/
- void updateContent(QWidget* focusChild);
+ void updateContent(TQWidget* focusChild);
RegExp* pasteData() { return _pasteData; }
bool isPasteing() const { return _pasteInAction; }
@@ -109,7 +109,7 @@ public:
*/
void showRMBMenu( bool enableCutCopy );
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
public slots:
@@ -180,13 +180,13 @@ signals:
If focusPoint is non-null then this point should be made visible
*/
- void contentChanged( QPoint focusPoint );
+ void contentChanged( TQPoint focusPoint );
/**
This signal is emitted whenever mouse is being dragged in the editor
window. `focusPoint' is the mouse' current position.
*/
- void scrolling( QPoint focusPoint );
+ void scrolling( TQPoint focusPoint );
/**
see @ref RegExpScrolledEditorWindow::doneEditing
@@ -214,31 +214,31 @@ signals:
protected:
- virtual void mousePressEvent ( QMouseEvent* event );
- virtual void mouseMoveEvent ( QMouseEvent* event );
- virtual void mouseReleaseEvent( QMouseEvent *event);
- virtual void paintEvent( QPaintEvent* event );
+ virtual void mousePressEvent ( TQMouseEvent* event );
+ virtual void mouseMoveEvent ( TQMouseEvent* event );
+ virtual void mouseReleaseEvent( TQMouseEvent *event);
+ virtual void paintEvent( TQPaintEvent* event );
protected slots:
virtual void emitVerifyRegExp();
private:
- void cutCopyAux( QPoint pos );
- void copy( QPoint pos );
- void cut( QPoint pos );
+ void cutCopyAux( TQPoint pos );
+ void copy( TQPoint pos );
+ void cut( TQPoint pos );
private:
/** This points to the top @ref RegExpWidget in the editor window. */
ConcWidget *_top;
/** This points to the layout manager for the editor window */
- QHBoxLayout* _layout;
+ TQHBoxLayout* _layout;
/** Start point and last point draw. Used when doing rubber band selection */
- QPoint _start, _lastPoint;
+ TQPoint _start, _lastPoint;
/** The area which the rubber band selection is over */
- QRect _selection;
+ TQRect _selection;
/**
True when a rubber band selection rectangle is drawn, and need to be
@@ -259,9 +259,9 @@ private:
RegExp* _pasteData;
/** Popup menu used for RMB */
- QPopupMenu* _menu;
+ TQPopupMenu* _menu;
- QIconSet getIcon( const QString& name );
+ TQIconSet getIcon( const TQString& name );
bool _isDndOperation;
};
diff --git a/kregexpeditor/emacsregexpconverter.cpp b/kregexpeditor/emacsregexpconverter.cpp
index 327d04c..7d24454 100644
--- a/kregexpeditor/emacsregexpconverter.cpp
+++ b/kregexpeditor/emacsregexpconverter.cpp
@@ -35,15 +35,15 @@ bool EmacsRegExpConverter::canParse()
return false;
}
-QString EmacsRegExpConverter::toString( AltnRegExp* regexp, bool markSelection )
+TQString EmacsRegExpConverter::toString( AltnRegExp* regexp, bool markSelection )
{
- QString res;
+ TQString res;
bool first = true;
RegExpList list = regexp->children();
for ( RegExpListIt it(list); *it; ++it ) {
if ( !first ) {
- res += QString::fromLatin1("\\|");
+ res += TQString::fromLatin1("\\|");
}
first = false;
res += toStr( *it, markSelection );
@@ -52,17 +52,17 @@ QString EmacsRegExpConverter::toString( AltnRegExp* regexp, bool markSelection )
}
-QString EmacsRegExpConverter::toString( ConcRegExp* regexp, bool markSelection )
+TQString EmacsRegExpConverter::toString( ConcRegExp* regexp, bool markSelection )
{
- QString res;
+ TQString res;
RegExpList list = regexp->children();
for ( RegExpListIt it(list); *it; ++it ) {
- QString startPar = QString::fromLocal8Bit("");
- QString endPar = QString::fromLocal8Bit("");
+ TQString startPar = TQString::fromLocal8Bit("");
+ TQString endPar = TQString::fromLocal8Bit("");
if ( (*it)->precedence() < regexp->precedence() ) {
- startPar = QString::fromLatin1( "\\(" );
- endPar = QString::fromLatin1( "\\)" );
+ startPar = TQString::fromLatin1( "\\(" );
+ endPar = TQString::fromLatin1( "\\)" );
}
res += startPar + toStr( *it, markSelection ) + endPar;
@@ -72,7 +72,7 @@ QString EmacsRegExpConverter::toString( ConcRegExp* regexp, bool markSelection )
}
-QString EmacsRegExpConverter::toString( LookAheadRegExp* /*regexp*/, bool /*markSelection*/ )
+TQString EmacsRegExpConverter::toString( LookAheadRegExp* /*regexp*/, bool /*markSelection*/ )
{
static bool haveWarned = false;
if ( ! haveWarned ) {
@@ -80,12 +80,12 @@ QString EmacsRegExpConverter::toString( LookAheadRegExp* /*regexp*/, bool /*mark
haveWarned = true;
}
- return QString::null;
+ return TQString::null;
}
-QString EmacsRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelection*/ )
+TQString EmacsRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelection*/ )
{
- QString txt;
+ TQString txt;
bool foundCarrot = false;
bool foundDash = false;
@@ -93,15 +93,15 @@ QString EmacsRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSele
// print the single characters, but keep "^" as the very
// last element of the characters.
- QStringList chars = regexp->chars();
+ TQStringList chars = regexp->chars();
for (unsigned int i = 0; i< chars.count(); i++) {
- if ( *chars.at(i) == QChar(']') ) {
+ if ( *chars.at(i) == TQChar(']') ) {
foundParenthesis = true;
}
- else if ( *chars.at(i) == QChar('-') ) {
+ else if ( *chars.at(i) == TQChar('-') ) {
foundDash = true;
}
- else if ( *chars.at(i) == QChar('^') ) {
+ else if ( *chars.at(i) == TQChar('^') ) {
foundCarrot = true;
}
else {
@@ -110,9 +110,9 @@ QString EmacsRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSele
}
// Now insert the ranges.
- QPtrList<StringPair> ranges = regexp->range();
- for ( QPtrListIterator<StringPair> it(ranges); *it; ++it ) {
- txt.append((*it)->first()+ QString::fromLatin1("-")+ (*it)->second());
+ TQPtrList<StringPair> ranges = regexp->range();
+ for ( TQPtrListIterator<StringPair> it(ranges); *it; ++it ) {
+ txt.append((*it)->first()+ TQString::fromLatin1("-")+ (*it)->second());
}
// Ok, its time to build each part of the regexp, here comes the rule:
@@ -122,20 +122,20 @@ QString EmacsRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSele
// finally if '^' is one of the characters, then it must not be the first
// one!
- QString res = QString::fromLatin1("[");
+ TQString res = TQString::fromLatin1("[");
if ( regexp->negate() )
- res.append(QString::fromLatin1("^"));
+ res.append(TQString::fromLatin1("^"));
// a ']' must be the first character in teh range.
if ( foundParenthesis ) {
- res.append(QString::fromLatin1("]"));
+ res.append(TQString::fromLatin1("]"));
}
// a '-' must be the first character ( only coming after a ']')
if ( foundDash ) {
- res.append(QString::fromLatin1("-"));
+ res.append(TQString::fromLatin1("-"));
}
res += txt;
@@ -143,108 +143,108 @@ QString EmacsRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSele
// Insert equivalents to \s,\S,\d,\D,\w, and \W
// non-digit, non-space, and non-word is not supported in Emacs style
if ( regexp->digit() )
- res += QString::fromLocal8Bit("0-9");
+ res += TQString::fromLocal8Bit("0-9");
if ( regexp->space() )
- res += QString::fromLocal8Bit(" ") + QString( QChar( (char) 9 ) ); // Tab char
+ res += TQString::fromLocal8Bit(" ") + TQString( TQChar( (char) 9 ) ); // Tab char
if ( regexp->wordChar() )
- res += QString::fromLocal8Bit("a-zA-Z");
+ res += TQString::fromLocal8Bit("a-zA-Z");
if ( foundCarrot ) {
- res.append( QChar( '^' ) );
+ res.append( TQChar( '^' ) );
}
- res.append(QString::fromLatin1("]"));
+ res.append(TQString::fromLatin1("]"));
return res;
}
-QString EmacsRegExpConverter::toString( CompoundRegExp* regexp, bool markSelection )
+TQString EmacsRegExpConverter::toString( CompoundRegExp* regexp, bool markSelection )
{
return toStr( regexp->child(), markSelection );
}
-QString EmacsRegExpConverter::toString( DotRegExp* /*regexp*/, bool /*markSelection*/ )
+TQString EmacsRegExpConverter::toString( DotRegExp* /*regexp*/, bool /*markSelection*/ )
{
- return QString::fromLatin1( "." );
+ return TQString::fromLatin1( "." );
}
-QString EmacsRegExpConverter::toString( PositionRegExp* regexp, bool /*markSelection*/ )
+TQString EmacsRegExpConverter::toString( PositionRegExp* regexp, bool /*markSelection*/ )
{
static bool haveWarned = false;
switch ( regexp->position()) {
case PositionRegExp::BEGLINE:
- return QString::fromLatin1("^");
+ return TQString::fromLatin1("^");
case PositionRegExp::ENDLINE:
- return QString::fromLatin1("$");
+ return TQString::fromLatin1("$");
case PositionRegExp::WORDBOUNDARY:
case PositionRegExp::NONWORDBOUNDARY:
if ( ! haveWarned ) {
KMessageBox::sorry( 0, i18n( "Word boundary and non word boundary is not supported in Emacs syntax" ) );
haveWarned = true;
- return QString::fromLatin1("");
+ return TQString::fromLatin1("");
}
}
- return QString::fromLatin1("");
+ return TQString::fromLatin1("");
}
-QString EmacsRegExpConverter::toString( RepeatRegExp* regexp, bool markSelection )
+TQString EmacsRegExpConverter::toString( RepeatRegExp* regexp, bool markSelection )
{
RegExp* child = regexp->child();
- QString cText = toStr( child, markSelection );
- QString startPar;
- QString endPar;
+ TQString cText = toStr( child, markSelection );
+ TQString startPar;
+ TQString endPar;
if ( child->precedence() < regexp->precedence() ) {
- startPar = QString::fromLatin1( "\\(" );
- endPar = QString::fromLatin1( "\\)" );
+ startPar = TQString::fromLatin1( "\\(" );
+ endPar = TQString::fromLatin1( "\\)" );
}
if (regexp->min() == 0 && regexp->max() == -1) {
- return startPar + cText +endPar + QString::fromLocal8Bit("*");
+ return startPar + cText +endPar + TQString::fromLocal8Bit("*");
}
else if ( regexp->min() == 0 && regexp->max() == 1 ) {
- return startPar + cText + endPar + QString::fromLocal8Bit("?");
+ return startPar + cText + endPar + TQString::fromLocal8Bit("?");
}
else if ( regexp->min() == 1 && regexp->max() == -1 ) {
- return startPar + cText + endPar + QString::fromLocal8Bit("+");
+ return startPar + cText + endPar + TQString::fromLocal8Bit("+");
}
else {
- QString res = QString::fromLatin1("");
+ TQString res = TQString::fromLatin1("");
for ( int i = 0; i < regexp->min(); ++i ) {
- res += QString::fromLatin1( "\\(" ) + cText + QString::fromLatin1( "\\)" );
+ res += TQString::fromLatin1( "\\(" ) + cText + TQString::fromLatin1( "\\)" );
}
if ( regexp->max() != -1 ) {
for ( int i = regexp->min(); i < regexp->max(); ++i ) {
- res += QString::fromLatin1("\\(") + cText + QString::fromLatin1("\\)?");
+ res += TQString::fromLatin1("\\(") + cText + TQString::fromLatin1("\\)?");
}
}
else
- res += QString::fromLatin1("+");
+ res += TQString::fromLatin1("+");
return res;
}
}
-QString EmacsRegExpConverter::toString( TextRegExp* regexp, bool /*markSelection*/ )
+TQString EmacsRegExpConverter::toString( TextRegExp* regexp, bool /*markSelection*/ )
{
- QValueList<QChar> list;
- list << QChar('$')
- << QChar('^')
- << QChar('.')
- << QChar('*')
- << QChar('+')
- << QChar('?')
- << QChar('[')
- << QChar(']')
- << QChar('\\');
-
- QString res = escape( regexp->text(), list, QChar('\\') );
+ TQValueList<TQChar> list;
+ list << TQChar('$')
+ << TQChar('^')
+ << TQChar('.')
+ << TQChar('*')
+ << TQChar('+')
+ << TQChar('?')
+ << TQChar('[')
+ << TQChar(']')
+ << TQChar('\\');
+
+ TQString res = escape( regexp->text(), list, TQChar('\\') );
return res;
}
-QString EmacsRegExpConverter::name()
+TQString EmacsRegExpConverter::name()
{
- return QString::fromLatin1( "Emacs" );
+ return TQString::fromLatin1( "Emacs" );
}
int EmacsRegExpConverter::features()
diff --git a/kregexpeditor/emacsregexpconverter.h b/kregexpeditor/emacsregexpconverter.h
index bbc9e94..e8e9264 100644
--- a/kregexpeditor/emacsregexpconverter.h
+++ b/kregexpeditor/emacsregexpconverter.h
@@ -25,17 +25,17 @@ class EmacsRegExpConverter :public RegExpConverter
{
public:
virtual bool canParse();
- virtual QString name();
+ virtual TQString name();
virtual int features();
- virtual QString toString( AltnRegExp*, bool markSelection );
- virtual QString toString( ConcRegExp*, bool markSelection );
- virtual QString toString( LookAheadRegExp*, bool markSelection );
- virtual QString toString( TextRangeRegExp*, bool markSelection );
- virtual QString toString( CompoundRegExp*, bool markSelection );
- virtual QString toString( DotRegExp*, bool markSelection );
- virtual QString toString( PositionRegExp*, bool markSelection );
- virtual QString toString( RepeatRegExp*, bool markSelection );
- virtual QString toString( TextRegExp*, bool markSelection );
+ virtual TQString toString( AltnRegExp*, bool markSelection );
+ virtual TQString toString( ConcRegExp*, bool markSelection );
+ virtual TQString toString( LookAheadRegExp*, bool markSelection );
+ virtual TQString toString( TextRangeRegExp*, bool markSelection );
+ virtual TQString toString( CompoundRegExp*, bool markSelection );
+ virtual TQString toString( DotRegExp*, bool markSelection );
+ virtual TQString toString( PositionRegExp*, bool markSelection );
+ virtual TQString toString( RepeatRegExp*, bool markSelection );
+ virtual TQString toString( TextRegExp*, bool markSelection );
};
diff --git a/kregexpeditor/errormap.cpp b/kregexpeditor/errormap.cpp
index c452ddb..ecf2866 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"), QString::fromLatin1("KRegExpEditorLineStartError") );
+ i18n("Regular Expression Error"), TQString::fromLatin1("KRegExpEditorLineStartError") );
}
_lineStartError = true;
}
@@ -56,7 +56,7 @@ void ErrorMap::lineEndError()
{
if ( !_prevLineEndError ) {
KMessageBox::information( 0, i18n("Your regular expression is invalid, due to something following a 'line end'."),
- i18n("Regular Expression Error"), QString::fromLatin1("KRegExpEditorLineEndError") );
+ i18n("Regular Expression Error"), TQString::fromLatin1("KRegExpEditorLineEndError") );
}
_lineEndError = true;
}
@@ -66,7 +66,7 @@ void ErrorMap::lookAheadError()
{
if ( !_prevLookAHeadError ) {
KMessageBox::information( 0, i18n("Your regular expression is invalid. 'Look Ahead' regular expression must be the last sub expression."),
- i18n("Regular Expression Error"), QString::fromLatin1("KRegExpEditorLookAHeadError") );
+ i18n("Regular Expression Error"), TQString::fromLatin1("KRegExpEditorLookAHeadError") );
}
_lookAHeadError = true;
}
diff --git a/kregexpeditor/gen_qregexplexer.cpp b/kregexpeditor/gen_qregexplexer.cpp
index 30f2284..c349dcc 100644
--- a/kregexpeditor/gen_qregexplexer.cpp
+++ b/kregexpeditor/gen_qregexplexer.cpp
@@ -451,7 +451,7 @@ char *yytext;
* Boston, MA 02110-1301, USA.
**/
#line 21 "qregexpparser.l"
- #include <qstring.h>
+ #include <tqstring.h>
#include "textrangeregexp.h"
#include "gen_qregexpparser.hh"
#ifdef QT_ONLY
@@ -770,7 +770,7 @@ YY_RULE_SETUP
#line 77 "qregexpparser.l"
{
TextRangeRegExp* regexp = new TextRangeRegExp( false );
- regexp->addCharacter( QString::fromLocal8Bit( yytext ) );
+ regexp->addCharacter( TQString::fromLocal8Bit( yytext ) );
qregexplval.regexp = regexp;
return TOK_CharClass;
}
@@ -780,7 +780,7 @@ YY_RULE_SETUP
#line 84 "qregexpparser.l"
{
TextRangeRegExp* regexp = new TextRangeRegExp( false );
- regexp->addCharacter( QString::fromLocal8Bit(yytext) );
+ regexp->addCharacter( TQString::fromLocal8Bit(yytext) );
qregexplval.regexp = regexp;
return TOK_CharClass;
}
@@ -790,7 +790,7 @@ YY_RULE_SETUP
#line 90 "qregexpparser.l"
{
TextRangeRegExp* regexp = new TextRangeRegExp( false );
- regexp->addCharacter( QString::fromLocal8Bit(yytext) );
+ regexp->addCharacter( TQString::fromLocal8Bit(yytext) );
qregexplval.regexp = regexp;
return TOK_CharClass;
}
@@ -1774,7 +1774,7 @@ int main()
#line 114 "qregexpparser.l"
-void setParseData( QString qstr ) {
+void setParseData( TQString qstr ) {
const char* cstr;
if ( qstr.isNull() )
cstr = "";
@@ -1837,18 +1837,18 @@ void parseRange( char* txt, int* min, int* max )
RegExp* parseCharClass( char* match )
{
TextRangeRegExp* res = new TextRangeRegExp( false );
- QString txt = QString::fromLocal8Bit( match );
+ TQString txt = TQString::fromLocal8Bit( match );
txt = txt.mid(1,txt.length()-2);
unsigned int i = 0;
- QChar ch = txt.at(i++);
- QString pendingChar;
- QString thisChar;
+ TQChar ch = txt.at(i++);
+ TQString pendingChar;
+ TQString thisChar;
bool charPending = false;
bool rangePending = false;
bool flushPending = false;
- if ( ch == QChar('^') ) {
+ if ( ch == TQChar('^') ) {
res->setNegate( true );
ch = txt.at(i++);
}
@@ -1856,7 +1856,7 @@ RegExp* parseCharClass( char* match )
do {
// If a character is pending, and the next char is '-' then we are
// possible looking at a range.
- if ( ch == QChar('-') && charPending ) {
+ if ( ch == TQChar('-') && charPending ) {
rangePending = true;
ch = txt.at(i++);
continue;
@@ -1870,44 +1870,44 @@ RegExp* parseCharClass( char* match )
charPending = false;
}
- if ( ch == QChar('\\') ) {
+ if ( ch == TQChar('\\') ) {
// Handle the cases where an escape character is specified.
ch = txt.at(i++);
- if ( ch == QChar('a') || ch == QChar('f') || ch == QChar('n') || ch == QChar('r') || ch == QChar('t') || ch == QChar('v') ) {
+ if ( ch == TQChar('a') || ch == TQChar('f') || ch == TQChar('n') || ch == TQChar('r') || ch == TQChar('t') || ch == TQChar('v') ) {
// These are just seen as normal characters.
- thisChar = QString::fromLocal8Bit("\\") + ch;
+ thisChar = TQString::fromLocal8Bit("\\") + ch;
}
- else if ( ch == QChar('d') ) {
+ else if ( ch == TQChar('d') ) {
// The following characters represent character groups. If any of
// these are seen in a range, then the range is ignored, thus [a-\s]
// matches an 'a', a '-', and a space (\s means space).
res->setDigit( true );
flushPending = true;
}
- else if ( ch == QChar('D') ) {
+ else if ( ch == TQChar('D') ) {
res->setNonDigit( true );
flushPending = true;
}
- else if ( ch == QChar('s') ) {
+ else if ( ch == TQChar('s') ) {
res->setSpace( true );
flushPending = true;
}
- else if ( ch == QChar('S') ) {
+ else if ( ch == TQChar('S') ) {
res->setNonSpace( true );
flushPending = true;
}
- else if ( ch == QChar('w') ) {
+ else if ( ch == TQChar('w') ) {
res->setWordChar( true );
flushPending = true;
}
- else if ( ch == QChar('W') ) {
+ else if ( ch == TQChar('W') ) {
res->setNonWordChar( true );
flushPending = true;
}
- else if ( ch == QChar('x') || ch == QChar('X') ) {
+ else if ( ch == TQChar('x') || ch == TQChar('X') ) {
// This is a hexidecimal character: \xHHHH
- QString str;
+ TQString str;
for ( int j=0; j<4; j++) {
ch = txt.at(i++);
if ( ch == 'a' || ch == 'A' || ch == 'b' || ch == 'B' || ch == 'c' || ch == 'C' || ch == 'd' || ch == 'D' ||
@@ -1918,11 +1918,11 @@ RegExp* parseCharClass( char* match )
else
i--;
}
- thisChar = QString::fromLocal8Bit("\\x") + str;
+ thisChar = TQString::fromLocal8Bit("\\x") + str;
}
- else if ( ch == QChar('0') ) {
+ else if ( ch == TQChar('0') ) {
// This is an octal character
- QString str;
+ TQString str;
for ( int j=0; j<4; j++) {
ch = txt.at(i++);
if ( ch == '0' || ch == '1' || ch == '2' || ch == '3' || ch == '4' || ch == '5' || ch == '6' || ch == '7' )
@@ -1930,7 +1930,7 @@ RegExp* parseCharClass( char* match )
else
i--;
}
- thisChar = QString::fromLocal8Bit("\\x") + str ;
+ thisChar = TQString::fromLocal8Bit("\\x") + str ;
}
else {
// Anything else escaped just means the character itself.
@@ -1951,7 +1951,7 @@ RegExp* parseCharClass( char* match )
if ( charPending )
res->addCharacter( pendingChar );
if ( rangePending )
- res->addCharacter( QString::fromLocal8Bit("-") );
+ res->addCharacter( TQString::fromLocal8Bit("-") );
flushPending = false;
charPending = false;
rangePending = false;
@@ -1969,12 +1969,12 @@ RegExp* parseCharClass( char* match )
}
ch = txt.at(i++);
}
- while ( ch != QChar(']') && i <= txt.length() );
+ while ( ch != TQChar(']') && i <= txt.length() );
if ( charPending )
res->addCharacter( pendingChar );
if ( rangePending )
- res->addCharacter( QString::fromLocal8Bit("-") );
+ res->addCharacter( TQString::fromLocal8Bit("-") );
return res;
}
diff --git a/kregexpeditor/gen_qregexpparser.cc b/kregexpeditor/gen_qregexpparser.cc
index b366293..9f8d0a0 100644
--- a/kregexpeditor/gen_qregexpparser.cc
+++ b/kregexpeditor/gen_qregexpparser.cc
@@ -107,7 +107,7 @@
#include <kmessagebox.h>
#endif
- #include <qstring.h>
+ #include <tqstring.h>
#include <stdlib.h>
#include "regexp.h"
@@ -122,10 +122,10 @@
#include "compoundregexp.h"
extern int yylex();
- extern void setParseData( QString str );
+ extern void setParseData( TQString str );
int yyerror (const char *);
void setParseResult( RegExp* );
- RegExp* parseQtRegExp( QString qstr, bool* ok );
+ RegExp* parseQtRegExp( TQString qstr, bool* ok );
static RegExp* parseResult;
static int _index;
@@ -1049,7 +1049,7 @@ yyreduce:
yyval.regexp = new AltnRegExp( false );
dynamic_cast<AltnRegExp*>( yyval.regexp )->addRegExp( yyvsp[-1].regexp );
}
- dynamic_cast<AltnRegExp*>( yyval.regexp )->addRegExp( new TextRegExp( false, QString::fromLatin1("") ) );
+ dynamic_cast<AltnRegExp*>( yyval.regexp )->addRegExp( new TextRegExp( false, TQString::fromLatin1("") ) );
}
break;
@@ -1057,7 +1057,7 @@ yyreduce:
#line 107 "qregexpparser.y"
{
yyval.regexp = new AltnRegExp( false );
- dynamic_cast<AltnRegExp*>( yyval.regexp )->addRegExp( new TextRegExp( false, QString::fromLatin1("") ) );
+ dynamic_cast<AltnRegExp*>( yyval.regexp )->addRegExp( new TextRegExp( false, TQString::fromLatin1("") ) );
dynamic_cast<AltnRegExp*>( yyval.regexp )->addRegExp( yyvsp[0].regexp );
}
break;
@@ -1160,7 +1160,7 @@ yyreduce:
case 23:
#line 157 "qregexpparser.y"
{
- QString match = QString::fromLocal8Bit("\\%1").arg( yyvsp[0].backRef );
+ TQString match = TQString::fromLocal8Bit("\\%1").arg( yyvsp[0].backRef );
yyval.regexp = new TextRegExp( false, match );
KMessageBox::information(0,i18n("<qt>Back reference regular expressions are not supported.<p>"
"<tt>\\1</tt>, <tt>\\2</tt>, ... are <i>back references</i>, meaning they refer to "
@@ -1172,7 +1172,7 @@ yyreduce:
"the back reference will be replaced by matching the text <b>%2</b> literally.")
.arg( match ).arg( match ),
i18n("Back reference regular expressions not supported"),
- QString::fromLocal8Bit("backReferenceNotSupported") );
+ TQString::fromLocal8Bit("backReferenceNotSupported") );
}
break;
@@ -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, QString::fromLocal8Bit("%1").arg(yyvsp[0].ch));
+ yyval.regexp = new TextRegExp( false, TQString::fromLocal8Bit("%1").arg(yyvsp[0].ch));
}
break;
case 27:
#line 182 "qregexpparser.y"
- { yyval.regexp = new TextRegExp( false, QString::fromLocal8Bit("%1").arg(yyvsp[0].ch)); }
+ { yyval.regexp = new TextRegExp( false, TQString::fromLocal8Bit("%1").arg(yyvsp[0].ch)); }
break;
@@ -1427,7 +1427,7 @@ yyreturn:
#line 185 "qregexpparser.y"
-RegExp* parseQtRegExp( QString qstr, bool* ok ) {
+RegExp* parseQtRegExp( TQString qstr, bool* ok ) {
_index = 0;
parseResult = 0;
setParseData( qstr );
diff --git a/kregexpeditor/infopage.cpp b/kregexpeditor/infopage.cpp
index 8f373c5..e467c4b 100644
--- a/kregexpeditor/infopage.cpp
+++ b/kregexpeditor/infopage.cpp
@@ -24,11 +24,11 @@
#include "infopage.h"
-InfoPage::InfoPage( QWidget* parent, const char* name )
+InfoPage::InfoPage( TQWidget* parent, const char* name )
:KTextBrowser( parent, name )
{
- QString txt =
- QString::fromLatin1( "<qt>" ) +
+ TQString txt =
+ TQString::fromLatin1( "<qt>" ) +
i18n( "Translators, feel free to add yourself in the text below, asking for a postcard ;-), "
"also feel free to add a section saying <h2>Translators</h2>. "
"Kind regards, and thanks for your work - Jesper.",
@@ -58,20 +58,20 @@ InfoPage::InfoPage( QWidget* parent, const char* name )
"<h2>Author</h2>"
"<a href=\"http://www.blackie.dk/\">Jesper K. Pedersen</a> &lt;<a href=\"mailto:blackie@kde.org\">blackie@kde.org</a>&gt;")
- + QString::fromLatin1( "</qt>" );
+ + TQString::fromLatin1( "</qt>" );
setText( txt );
}
-void InfoPage::setSource ( const QString& name )
+void InfoPage::setSource ( const TQString& name )
{
#ifdef QT_ONLY
- mimeSourceFactory()->setFilePath( QStringList() << QString::fromLatin1("manual/"));
- QString nm = name;
+ mimeSourceFactory()->setFilePath( TQStringList() << TQString::fromLatin1("manual/"));
+ TQString nm = name;
if ( nm.endsWith("/") )
nm = nm.left( nm.length()-1);
if ( nm.startsWith("mailto:") ) {
- QMessageBox::information( this, tr("Support mail"), tr("Please send the mail to blackie@kde.org") );
+ TQMessageBox::information( this, tr("Support mail"), tr("Please send the mail to blackie@kde.org") );
return;
}
if ( nm.startsWith( "http:" ) )
@@ -81,14 +81,14 @@ void InfoPage::setSource ( const QString& name )
if ( nm == "doc://" )
nm = "doc://index";
- if ( nm.startsWith( QString::fromLocal8Bit("doc://") ) ) {
+ if ( nm.startsWith( TQString::fromLocal8Bit("doc://") ) ) {
nm = nm.mid(6) + ".html";
}
- QTextBrowser::setSource( nm );
+ TQTextBrowser::setSource( nm );
#else
- if ( name.startsWith( QString::fromLocal8Bit("doc://") ) ) {
- kapp->invokeHelp( name.mid(6, name.length()-7), QString::fromLocal8Bit("KRegExpEditor") );
+ if ( name.startsWith( TQString::fromLocal8Bit("doc://") ) ) {
+ kapp->invokeHelp( name.mid(6, name.length()-7), TQString::fromLocal8Bit("KRegExpEditor") );
}
else {
KTextBrowser::setSource( name ); // handle mailto and other links
diff --git a/kregexpeditor/infopage.h b/kregexpeditor/infopage.h
index b518979..cada15d 100644
--- a/kregexpeditor/infopage.h
+++ b/kregexpeditor/infopage.h
@@ -20,7 +20,7 @@
#ifdef QT_ONLY
#include "compat.h"
- #include <qtextbrowser.h>
+ #include <tqtextbrowser.h>
#else
# include <ktextbrowser.h>
#endif
@@ -28,8 +28,8 @@
class InfoPage :public KTextBrowser
{
public:
- InfoPage( QWidget* parent, const char* name );
- virtual void setSource ( const QString& name );
+ InfoPage( TQWidget* parent, const char* name );
+ virtual void setSource ( const TQString& name );
};
diff --git a/kregexpeditor/kregexpeditorgui.cpp b/kregexpeditor/kregexpeditorgui.cpp
index e8f8051..bbf06be 100644
--- a/kregexpeditor/kregexpeditorgui.cpp
+++ b/kregexpeditor/kregexpeditorgui.cpp
@@ -29,24 +29,24 @@
// #include <unistd.h> // DO I need this?
#include <stdio.h>
#include "kregexpeditorprivate.h"
-#include <qlayout.h>
+#include <tqlayout.h>
-const QString KRegExpEditorGUI::version = QString::fromLocal8Bit("1.0");
+const TQString KRegExpEditorGUI::version = TQString::fromLocal8Bit("1.0");
-KRegExpEditorGUI::KRegExpEditorGUI(QWidget *parent, const char *name,
- const QStringList & )
- : QWidget( parent, name)
+KRegExpEditorGUI::KRegExpEditorGUI(TQWidget *parent, const char *name,
+ const TQStringList & )
+ : TQWidget( parent, name)
{
- QHBoxLayout* layout = new QHBoxLayout( this, 6 );
+ TQHBoxLayout* layout = new TQHBoxLayout( this, 6 );
_editor = new KRegExpEditorPrivate( this, "_editor" );
layout->addWidget( _editor );
- connect( _editor, SIGNAL( canUndo(bool) ), this, SIGNAL( canUndo(bool) ) );
- connect( _editor, SIGNAL( canRedo(bool) ), this, SIGNAL( canRedo(bool) ) );
- connect( _editor, SIGNAL( changes(bool) ), this, SIGNAL( changes(bool) ) );
+ 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) ) );
}
-QString KRegExpEditorGUI::regExp() const
+TQString KRegExpEditorGUI::regExp() const
{
return _editor->regexp();
}
@@ -61,41 +61,41 @@ void KRegExpEditorGUI::undo()
_editor->slotUndo();
}
-void KRegExpEditorGUI::setRegExp( const QString &regexp )
+void KRegExpEditorGUI::setRegExp( const TQString &regexp )
{
_editor->slotSetRegexp( regexp );
}
-KRegExpEditorGUIDialog::KRegExpEditorGUIDialog( QWidget *parent,
+KRegExpEditorGUIDialog::KRegExpEditorGUIDialog( TQWidget *parent,
const char *name,
- const QStringList & )
+ const TQStringList & )
: KDialogBase( KDialogBase::Plain, i18n("Regular Expression Editor"),
KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Help, KDialogBase::Ok,
parent, name ? name : "KRegExpDialog" )
{
- QFrame* frame = plainPage();
- QVBoxLayout* layout = new QVBoxLayout( frame, 6 );
+ TQFrame* frame = plainPage();
+ TQVBoxLayout* layout = new TQVBoxLayout( frame, 6 );
layout->setAutoAdd( true );
_editor = new KRegExpEditorGUI( frame );
- connect( _editor, SIGNAL( canUndo(bool) ), this, SIGNAL( canUndo(bool) ) );
- connect( _editor, SIGNAL( canRedo(bool) ), this, SIGNAL( canRedo(bool) ) );
- connect( _editor, SIGNAL( changes(bool) ), this, SIGNAL( changes(bool) ) );
+ 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) ) );
resize( 640, 400 );
- setHelp( QString::null, QString::fromLocal8Bit( "KRegExpEditor" ) );
+ setHelp( TQString::null, TQString::fromLocal8Bit( "KRegExpEditor" ) );
#ifdef QT_ONLY
- connect( this, SIGNAL( helpClicked() ), _editor, SLOT( showHelp() ) );
+ connect( this, TQT_SIGNAL( helpClicked() ), _editor, TQT_SLOT( showHelp() ) );
#endif
}
-QString KRegExpEditorGUIDialog::regExp() const
+TQString KRegExpEditorGUIDialog::regExp() const
{
return _editor->regExp();
}
-void KRegExpEditorGUIDialog::setRegExp( const QString &regexp )
+void KRegExpEditorGUIDialog::setRegExp( const TQString &regexp )
{
_editor->setRegExp( regexp );
}
@@ -110,23 +110,23 @@ void KRegExpEditorGUIDialog::undo()
_editor->undo();
}
-void KRegExpEditorGUIDialog::doSomething( QString method, void* arguments )
+void KRegExpEditorGUIDialog::doSomething( TQString method, void* arguments )
{
_editor->doSomething( method, arguments );
}
-void KRegExpEditorGUI::doSomething( QString method, void* arguments )
+void KRegExpEditorGUI::doSomething( TQString method, void* arguments )
{
- if ( method == QString::fromLatin1( "setCaseSensitive" ) ) {
+ if ( method == TQString::fromLatin1( "setCaseSensitive" ) ) {
_editor->setCaseSensitive( (bool) arguments );
}
- else if ( method == QString::fromLatin1("setMinimal") ) {
+ else if ( method == TQString::fromLatin1("setMinimal") ) {
_editor->setMinimal( (bool) arguments );
}
- else if ( method == QString::fromLatin1("setSyntax") ) {
- _editor->setSyntax( *((QString*) arguments) );
+ else if ( method == TQString::fromLatin1("setSyntax") ) {
+ _editor->setSyntax( *((TQString*) arguments) );
}
- else if ( method == QString::fromLatin1("setAllowNonQtSyntax") ) {
+ else if ( method == TQString::fromLatin1("setAllowNonQtSyntax") ) {
_editor->setAllowNonQtSyntax( (bool) arguments );
}
else {
@@ -134,12 +134,12 @@ void KRegExpEditorGUI::doSomething( QString method, void* arguments )
}
}
-void KRegExpEditorGUIDialog::setMatchText( const QString& txt )
+void KRegExpEditorGUIDialog::setMatchText( const TQString& txt )
{
_editor->setMatchText( txt );
}
-void KRegExpEditorGUI::setMatchText( const QString& txt )
+void KRegExpEditorGUI::setMatchText( const TQString& txt )
{
_editor->setMatchText( txt );
}
@@ -150,7 +150,7 @@ void KRegExpEditorGUI::showHelp()
#ifdef QT_ONLY
_editor->showHelp();
#else
- kapp->invokeHelp( QString::null, QString::fromLocal8Bit( "KRegExpEditor" ) );
+ kapp->invokeHelp( TQString::null, TQString::fromLocal8Bit( "KRegExpEditor" ) );
#endif
}
diff --git a/kregexpeditor/kregexpeditorgui.h b/kregexpeditor/kregexpeditorgui.h
index 6bcd5e6..48545d8 100644
--- a/kregexpeditor/kregexpeditorgui.h
+++ b/kregexpeditor/kregexpeditorgui.h
@@ -34,16 +34,16 @@ class KRegExpEditorPrivate;
@author Jesper Kjær Pedersen <blackie@kde.org>
@version 0.1
**/
-class KDE_EXPORT KRegExpEditorGUI :public QWidget, public KRegExpEditorInterface
+class KDE_EXPORT KRegExpEditorGUI :public TQWidget, public KRegExpEditorInterface
{
Q_OBJECT
- Q_PROPERTY( QString regexp READ regExp WRITE setRegExp )
+ Q_PROPERTY( TQString regexp READ regExp WRITE setRegExp )
public:
- KRegExpEditorGUI( QWidget *parent, const char *name = 0,
- const QStringList & = QStringList() );
- virtual QString regExp() const;
+ KRegExpEditorGUI( TQWidget *parent, const char *name = 0,
+ const TQStringList & = TQStringList() );
+ virtual TQString regExp() const;
- static const QString version;
+ static const TQString version;
signals:
/** This signal tells whether undo is available. */
@@ -54,9 +54,9 @@ signals:
public slots:
virtual void redo();
virtual void undo();
- virtual void setRegExp( const QString &regexp );
- virtual void doSomething( QString method, void* arguments );
- virtual void setMatchText( const QString& );
+ virtual void setRegExp( const TQString &regexp );
+ virtual void doSomething( TQString method, void* arguments );
+ virtual void setMatchText( const TQString& );
void showHelp();
private:
@@ -66,11 +66,11 @@ private:
class KDE_EXPORT KRegExpEditorGUIDialog : public KDialogBase, public KRegExpEditorInterface
{
Q_OBJECT
- Q_PROPERTY( QString regexp READ regExp WRITE setRegExp )
+ Q_PROPERTY( TQString regexp READ regExp WRITE setRegExp )
public:
- KRegExpEditorGUIDialog( QWidget *parent, const char *name, const QStringList &args );
+ KRegExpEditorGUIDialog( TQWidget *parent, const char *name, const TQStringList &args );
- virtual QString regExp() const;
+ virtual TQString regExp() const;
signals:
/** This signal tells whether undo is available. */
@@ -81,9 +81,9 @@ signals:
public slots:
virtual void redo();
virtual void undo();
- virtual void setRegExp( const QString &regexp );
- virtual void doSomething( QString method, void* arguments );
- virtual void setMatchText( const QString& );
+ virtual void setRegExp( const TQString &regexp );
+ virtual void doSomething( TQString method, void* arguments );
+ virtual void setMatchText( const TQString& );
private:
KRegExpEditorGUI *_editor;
diff --git a/kregexpeditor/kregexpeditorprivate.cpp b/kregexpeditor/kregexpeditorprivate.cpp
index b13a655..e7796c8 100644
--- a/kregexpeditor/kregexpeditorprivate.cpp
+++ b/kregexpeditor/kregexpeditorprivate.cpp
@@ -26,35 +26,35 @@
#include "kregexpeditorprivate.moc"
#endif
-#include <qlineedit.h>
-#include <qtooltip.h>
-#include <qtoolbutton.h>
+#include <tqlineedit.h>
+#include <tqtooltip.h>
+#include <tqtoolbutton.h>
#include "kregexpeditorprivate.h"
#include "scrollededitorwindow.h"
#include "regexpbuttons.h"
//#include <unistd.h> // What do I need this for?
#include <stdio.h>
#include "infopage.h"
-#include <qsplitter.h>
-#include <qdockarea.h>
+#include <tqsplitter.h>
+#include <tqdockarea.h>
#include "userdefinedregexps.h"
#include "auxbuttons.h"
-#include <qaccel.h>
-#include <qtimer.h>
+#include <tqaccel.h>
+#include <tqtimer.h>
#include "verifier.h"
-#include <qfile.h>
+#include <tqfile.h>
#include "verifybuttons.h"
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
-KRegExpEditorPrivate::KRegExpEditorPrivate(QWidget *parent, const char *name)
- : QWidget(parent, name), _updating( false ), _autoVerify( true )
+KRegExpEditorPrivate::KRegExpEditorPrivate(TQWidget *parent, const char *name)
+ : TQWidget(parent, name), _updating( false ), _autoVerify( true )
{
setMinimumSize(730,300);
- QDockArea* area = new QDockArea( Horizontal, QDockArea::Normal, this );
+ TQDockArea* area = new TQDockArea( Horizontal, TQDockArea::Normal, this );
area->setMinimumSize(2,2);
- QDockArea* verArea1 = new QDockArea( Vertical, QDockArea::Normal, this );
+ TQDockArea* verArea1 = new TQDockArea( Vertical, TQDockArea::Normal, this );
verArea1->setMinimumSize(2,2);
- QDockArea* verArea2 = new QDockArea( Vertical, QDockArea::Reverse, this );
+ TQDockArea* verArea2 = new TQDockArea( Vertical, TQDockArea::Reverse, this );
verArea2->setMinimumSize(2,2);
// The DockWindows.
@@ -63,33 +63,33 @@ KRegExpEditorPrivate::KRegExpEditorPrivate(QWidget *parent, const char *name)
_auxButtons = new AuxButtons( area, "KRegExpEditorPrivate::AuxButtons" );
_userRegExps = new UserDefinedRegExps( verArea1, "KRegExpEditorPrivate::userRegExps" );
_userRegExps->setResizeEnabled( true );
- QWhatsThis::add( _userRegExps, i18n( "In this window you will find predefined regular expressions. Both regular expressions "
+ TQWhatsThis::add( _userRegExps, i18n( "In this window you will find predefined regular expressions. Both regular expressions "
"you have developed and saved, and regular expressions shipped with the system." ));
// Editor window
- _editor = new QSplitter( Vertical, this, "KRegExpEditorPrivate::_editor" );
+ _editor = new TQSplitter( Vertical, this, "KRegExpEditorPrivate::_editor" );
_scrolledEditorWindow =
new RegExpScrolledEditorWindow( _editor, "KRegExpEditorPrivate::_scrolledEditorWindow" );
- QWhatsThis::add( _scrolledEditorWindow, i18n( "In this window you will develop your regular expressions. "
+ TQWhatsThis::add( _scrolledEditorWindow, i18n( "In this window you will develop your regular expressions. "
"Select one of the actions from the action buttons above, and click the mouse in this "
"window to insert the given action."));
_info = new InfoPage( this, "_info" );
_verifier = new Verifier( _editor, "KRegExpEditorPrivate::_verifier" );
- connect( _verifier, SIGNAL( textChanged() ), this, SLOT( maybeVerify() ) );
- QWhatsThis::add( _verifier, i18n("Type in some text in this window, and see what the regular expression you have developed matches.<p>"
+ connect( _verifier, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( maybeVerify() ) );
+ TQWhatsThis::add( _verifier, i18n("Type in some text in this window, and see what the regular expression you have developed matches.<p>"
"Each second match will be colored in red and each other match will be colored blue, simply so you "
"can distinguish them from each other.<p>"
"If you select part of the regular expression in the editor window, then this part will be "
"highlighted - This allows you to <i>debug</i> your regular expressions") );
_editor->hide();
- _editor->setSizes( QValueList<int>() << _editor->height()/2 << _editor->height()/2 );
+ _editor->setSizes( TQValueList<int>() << _editor->height()/2 << _editor->height()/2 );
- QVBoxLayout *topLayout = new QVBoxLayout( this, 0, 6, "KRegExpEditorPrivate::topLayout" );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, 6, "KRegExpEditorPrivate::topLayout" );
topLayout->addWidget( area );
- QHBoxLayout* rows = new QHBoxLayout; // I need to cal addLayout explicit to get stretching right.
+ TQHBoxLayout* rows = new QHBoxLayout; // I need to cal addLayout explicit to get stretching right.
topLayout->addLayout( rows, 1 );
rows->addWidget( verArea1 );
@@ -98,54 +98,54 @@ KRegExpEditorPrivate::KRegExpEditorPrivate(QWidget *parent, const char *name)
rows->addWidget( verArea2 );
// Connect the buttons
- connect( _regExpButtons, SIGNAL( clicked( int ) ), _scrolledEditorWindow, SLOT( slotInsertRegExp( int ) ) );
- connect( _regExpButtons, SIGNAL( doSelect() ), _scrolledEditorWindow, SLOT( slotDoSelect() ) );
- connect( _userRegExps, SIGNAL( load( RegExp* ) ), _scrolledEditorWindow, SLOT( slotInsertRegExp( RegExp* ) ) );
+ connect( _regExpButtons, TQT_SIGNAL( clicked( int ) ), _scrolledEditorWindow, TQT_SLOT( slotInsertRegExp( int ) ) );
+ connect( _regExpButtons, TQT_SIGNAL( doSelect() ), _scrolledEditorWindow, TQT_SLOT( slotDoSelect() ) );
+ connect( _userRegExps, TQT_SIGNAL( load( RegExp* ) ), _scrolledEditorWindow, TQT_SLOT( slotInsertRegExp( RegExp* ) ) );
- connect( _regExpButtons, SIGNAL( clicked( int ) ), _userRegExps, SLOT( slotUnSelect() ) );
- connect( _regExpButtons, SIGNAL( doSelect() ), _userRegExps, SLOT( slotUnSelect() ) );
- connect( _userRegExps, SIGNAL( load( RegExp* ) ), _regExpButtons, SLOT( slotUnSelect() ) );
+ connect( _regExpButtons, TQT_SIGNAL( clicked( int ) ), _userRegExps, TQT_SLOT( slotUnSelect() ) );
+ connect( _regExpButtons, TQT_SIGNAL( doSelect() ), _userRegExps, TQT_SLOT( slotUnSelect() ) );
+ connect( _userRegExps, TQT_SIGNAL( load( RegExp* ) ), _regExpButtons, TQT_SLOT( slotUnSelect() ) );
- connect( _scrolledEditorWindow, SIGNAL( doneEditing() ), _regExpButtons, SLOT( slotSelectNewAction() ) );
- connect( _scrolledEditorWindow, SIGNAL( doneEditing() ), _userRegExps, SLOT( slotSelectNewAction() ) );
+ connect( _scrolledEditorWindow, TQT_SIGNAL( doneEditing() ), _regExpButtons, TQT_SLOT( slotSelectNewAction() ) );
+ connect( _scrolledEditorWindow, TQT_SIGNAL( doneEditing() ), _userRegExps, TQT_SLOT( slotSelectNewAction() ) );
- connect( _regExpButtons, SIGNAL( clicked( int ) ), this, SLOT( slotShowEditor() ) );
- connect( _userRegExps, SIGNAL( load( RegExp* ) ), this, SLOT( slotShowEditor() ) );
- connect( _regExpButtons, SIGNAL( doSelect() ), this, SLOT( slotShowEditor() ) );
+ connect( _regExpButtons, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotShowEditor() ) );
+ connect( _userRegExps, TQT_SIGNAL( load( RegExp* ) ), this, TQT_SLOT( slotShowEditor() ) );
+ connect( _regExpButtons, TQT_SIGNAL( doSelect() ), this, TQT_SLOT( slotShowEditor() ) );
- connect( _scrolledEditorWindow, SIGNAL( savedRegexp() ), _userRegExps, SLOT( slotPopulateUserRegexps() ) );
+ connect( _scrolledEditorWindow, TQT_SIGNAL( savedRegexp() ), _userRegExps, TQT_SLOT( slotPopulateUserRegexps() ) );
- connect( _auxButtons, SIGNAL( undo() ), this, SLOT( slotUndo() ) );
- connect( _auxButtons, SIGNAL( redo() ), this, SLOT( slotRedo() ) );
- connect( _auxButtons, SIGNAL( cut() ), _scrolledEditorWindow, SLOT( slotCut() ) );
- connect( _auxButtons, SIGNAL( copy() ), _scrolledEditorWindow, SLOT( slotCopy() ) );
- connect( _auxButtons, SIGNAL( paste() ), _scrolledEditorWindow, SLOT( slotPaste() ) );
- connect( _auxButtons, SIGNAL( save() ), _scrolledEditorWindow, SLOT( slotSave() ) );
- connect( _verifyButtons, SIGNAL( autoVerify( bool ) ), this, SLOT( setAutoVerify( bool ) ) );
- connect( _verifyButtons, SIGNAL( verify() ), this, SLOT( doVerify() ) );
- connect( _verifyButtons, SIGNAL( changeSyntax( const QString& ) ), this, SLOT( setSyntax( const QString& ) ) );
+ connect( _auxButtons, TQT_SIGNAL( undo() ), this, TQT_SLOT( slotUndo() ) );
+ connect( _auxButtons, TQT_SIGNAL( redo() ), this, TQT_SLOT( slotRedo() ) );
+ connect( _auxButtons, TQT_SIGNAL( cut() ), _scrolledEditorWindow, TQT_SLOT( slotCut() ) );
+ connect( _auxButtons, TQT_SIGNAL( copy() ), _scrolledEditorWindow, TQT_SLOT( slotCopy() ) );
+ connect( _auxButtons, TQT_SIGNAL( paste() ), _scrolledEditorWindow, TQT_SLOT( slotPaste() ) );
+ connect( _auxButtons, TQT_SIGNAL( save() ), _scrolledEditorWindow, TQT_SLOT( slotSave() ) );
+ connect( _verifyButtons, TQT_SIGNAL( autoVerify( bool ) ), this, TQT_SLOT( setAutoVerify( bool ) ) );
+ connect( _verifyButtons, TQT_SIGNAL( verify() ), this, TQT_SLOT( doVerify() ) );
+ connect( _verifyButtons, TQT_SIGNAL( changeSyntax( const TQString& ) ), this, TQT_SLOT( setSyntax( const TQString& ) ) );
- connect( this, SIGNAL( canUndo( bool ) ), _auxButtons, SLOT( slotCanUndo( bool ) ) );
- connect( this, SIGNAL( canRedo( bool ) ), _auxButtons, SLOT( slotCanRedo( bool ) ) );
- connect( _scrolledEditorWindow, SIGNAL( anythingSelected( bool ) ), _auxButtons, SLOT( slotCanCut( bool ) ) );
- connect( _scrolledEditorWindow, SIGNAL( anythingSelected( bool ) ), _auxButtons, SLOT( slotCanCopy( bool ) ) );
- connect( _scrolledEditorWindow, SIGNAL( anythingOnClipboard( bool ) ), _auxButtons, SLOT( slotCanPaste( bool ) ) );
- connect( _scrolledEditorWindow, SIGNAL( canSave( bool ) ), _auxButtons, SLOT( slotCanSave( bool ) ) );
+ connect( this, TQT_SIGNAL( canUndo( bool ) ), _auxButtons, TQT_SLOT( slotCanUndo( bool ) ) );
+ connect( this, TQT_SIGNAL( canRedo( bool ) ), _auxButtons, TQT_SLOT( slotCanRedo( bool ) ) );
+ connect( _scrolledEditorWindow, TQT_SIGNAL( anythingSelected( bool ) ), _auxButtons, TQT_SLOT( slotCanCut( bool ) ) );
+ connect( _scrolledEditorWindow, TQT_SIGNAL( anythingSelected( bool ) ), _auxButtons, TQT_SLOT( slotCanCopy( bool ) ) );
+ connect( _scrolledEditorWindow, TQT_SIGNAL( anythingOnClipboard( bool ) ), _auxButtons, TQT_SLOT( slotCanPaste( bool ) ) );
+ connect( _scrolledEditorWindow, TQT_SIGNAL( canSave( bool ) ), _auxButtons, TQT_SLOT( slotCanSave( bool ) ) );
- connect( _scrolledEditorWindow, SIGNAL( verifyRegExp() ), this, SLOT( maybeVerify() ) );
+ connect( _scrolledEditorWindow, TQT_SIGNAL( verifyRegExp() ), this, TQT_SLOT( maybeVerify() ) );
- connect( _verifyButtons, SIGNAL( loadVerifyText( const QString& ) ), this, SLOT( setVerifyText( const QString& ) ) );
+ connect( _verifyButtons, TQT_SIGNAL( loadVerifyText( const TQString& ) ), this, TQT_SLOT( setVerifyText( const TQString& ) ) );
- // connect( _verifier, SIGNAL( countChanged( int ) ), _verifyButtons, SLOT( setMatchCount( int ) ) );
+ // connect( _verifier, TQT_SIGNAL( countChanged( int ) ), _verifyButtons, TQT_SLOT( setMatchCount( int ) ) );
// Qt anchors do not work for <pre>...</pre>, thefore scrolling to next/prev match
// do not work. Enable this when they work.
- // connect( _verifyButtons, SIGNAL( gotoFirst() ), _verifier, SLOT( gotoFirst() ) );
- // connect( _verifyButtons, SIGNAL( gotoPrev() ), _verifier, SLOT( gotoPrev() ) );
- // connect( _verifyButtons, SIGNAL( gotoNext() ), _verifier, SLOT( gotoNext() ) );
- // connect( _verifyButtons, SIGNAL( gotoLast() ), _verifier, SLOT( gotoLast() ) );
- // connect( _verifier, SIGNAL( goForwardPossible( bool ) ), _verifyButtons, SLOT( enableForwardButtons( bool ) ) );
- // connect( _verifier, SIGNAL( goBackwardPossible( bool ) ), _verifyButtons, SLOT( enableBackwardButtons( bool ) ) );
+ // connect( _verifyButtons, TQT_SIGNAL( gotoFirst() ), _verifier, TQT_SLOT( gotoFirst() ) );
+ // connect( _verifyButtons, TQT_SIGNAL( gotoPrev() ), _verifier, TQT_SLOT( gotoPrev() ) );
+ // connect( _verifyButtons, TQT_SIGNAL( gotoNext() ), _verifier, TQT_SLOT( gotoNext() ) );
+ // connect( _verifyButtons, TQT_SIGNAL( gotoLast() ), _verifier, TQT_SLOT( gotoLast() ) );
+ // connect( _verifier, TQT_SIGNAL( goForwardPossible( bool ) ), _verifyButtons, TQT_SLOT( enableForwardButtons( bool ) ) );
+ // connect( _verifier, TQT_SIGNAL( goBackwardPossible( bool ) ), _verifyButtons, TQT_SLOT( enableBackwardButtons( bool ) ) );
_auxButtons->slotCanPaste( false );
_auxButtons->slotCanCut( false );
@@ -154,60 +154,60 @@ KRegExpEditorPrivate::KRegExpEditorPrivate(QWidget *parent, const char *name)
// Line Edit
- QHBoxLayout* layout = new QHBoxLayout( topLayout, 6 );
- QLabel* label = new QLabel( i18n("ASCII syntax:"), this );
+ TQHBoxLayout* layout = new TQHBoxLayout( topLayout, 6 );
+ TQLabel* label = new TQLabel( i18n("ASCII syntax:"), this );
layout->addWidget( label );
- clearButton = new QToolButton( this );
- const QString icon( QString::fromLatin1( QApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) );
- QIconSet clearIcon = SmallIconSet( icon );
+ clearButton = new TQToolButton( this );
+ const TQString icon( TQString::fromLatin1( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) );
+ TQIconSet clearIcon = SmallIconSet( icon );
clearButton->setIconSet( clearIcon );
layout->addWidget( clearButton );
- QToolTip::add( clearButton, i18n("Clear expression") );
- _regexpEdit = new QLineEdit( this );
+ TQToolTip::add( clearButton, i18n("Clear expression") );
+ _regexpEdit = new TQLineEdit( this );
layout->addWidget( _regexpEdit );
- QWhatsThis::add( _regexpEdit, i18n( "This is the regular expression in ASCII syntax. You are likely only "
+ 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 QRegExp.<p>"
+ "develop a regular expression using TQRegExp.<p>"
"You may develop your regular expression both by using the graphical "
"editor, and by typing the regular expression in this line edit.") );
#ifdef QT_ONLY
- QPixmap pix( "icons/error.png" );
+ TQPixmap pix( "icons/error.png" );
#else
- QPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", QString::fromLatin1("kregexpeditor/pics/error.png") ), KIcon::Toolbar );
+ TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::fromLatin1("kregexpeditor/pics/error.png") ), KIcon::Toolbar );
#endif
- _error = new QLabel( this );
+ _error = new TQLabel( this );
_error->setPixmap( pix );
layout->addWidget( _error );
_error->hide();
- _timer = new QTimer(this);
+ _timer = new TQTimer(this);
- connect( _scrolledEditorWindow, SIGNAL( change() ), this, SLOT( slotUpdateLineEdit() ) );
- connect( _regexpEdit, SIGNAL(textChanged( const QString& ) ), this, SLOT( slotTriggerUpdate() ) );
- connect( _timer, SIGNAL( timeout() ), this, SLOT( slotTimeout() ) );
- connect( clearButton, SIGNAL( clicked() ), _regexpEdit, SLOT( clear() ) );
+ connect( _scrolledEditorWindow, TQT_SIGNAL( change() ), this, TQT_SLOT( slotUpdateLineEdit() ) );
+ connect( _regexpEdit, TQT_SIGNAL(textChanged( const TQString& ) ), this, TQT_SLOT( slotTriggerUpdate() ) );
+ connect( _timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTimeout() ) );
+ connect( clearButton, TQT_SIGNAL( clicked() ), _regexpEdit, TQT_SLOT( clear() ) );
// Push an initial empty element on the stack.
_undoStack.push( _scrolledEditorWindow->regExp() );
_redoStack.setAutoDelete( true );
- QAccel* accel = new QAccel( this );
- accel->connectItem( accel->insertItem( CTRL+Key_Z ), this, SLOT( slotUndo() ) );
- accel->connectItem( accel->insertItem( CTRL+Key_R ), this, SLOT( slotRedo() ) );
+ TQAccel* accel = new TQAccel( this );
+ accel->connectItem( accel->insertItem( CTRL+Key_Z ), this, TQT_SLOT( slotUndo() ) );
+ accel->connectItem( accel->insertItem( CTRL+Key_R ), this, TQT_SLOT( slotRedo() ) );
- setSyntax( QString::fromLatin1( "Qt" ) );
+ setSyntax( TQString::fromLatin1( "Qt" ) );
}
-QString KRegExpEditorPrivate::regexp()
+TQString KRegExpEditorPrivate::regexp()
{
RegExp* regexp = _scrolledEditorWindow->regExp();
- QString res = RegExpConverter::current()->toStr( regexp, false );
+ TQString res = RegExpConverter::current()->toStr( regexp, false );
delete regexp;
return res;
}
-void KRegExpEditorPrivate::slotUpdateEditor( const QString & txt)
+void KRegExpEditorPrivate::slotUpdateEditor( const TQString & txt)
{
_updating = true;
bool ok;
@@ -217,8 +217,8 @@ void KRegExpEditorPrivate::slotUpdateEditor( const QString & txt)
else {
RegExp* result = RegExpConverter::current()->parse( txt, &ok );
if ( ok ) {
- QPtrList<CompoundRegExp> list = _userRegExps->regExps();
- for ( QPtrListIterator<CompoundRegExp> it( list ); *it; ++it ) {
+ TQPtrList<CompoundRegExp> list = _userRegExps->regExps();
+ for ( TQPtrListIterator<CompoundRegExp> it( list ); *it; ++it ) {
result->replacePart( *it );
}
@@ -247,7 +247,7 @@ void KRegExpEditorPrivate::slotUpdateLineEdit()
RegExp* regexp = _scrolledEditorWindow->regExp();
regexp->check( _errorMap );
- QString str = RegExpConverter::current()->toStr( regexp, false );
+ TQString str = RegExpConverter::current()->toStr( regexp, false );
_regexpEdit->setText( str );
delete regexp;
@@ -264,7 +264,7 @@ void KRegExpEditorPrivate::recordUndoInfo()
RegExp* regexp = _scrolledEditorWindow->regExp();
if ( regexp->toXmlString() != _undoStack.top()->toXmlString() ) {
_undoStack.push( regexp );
- _redoStack = QPtrStack<RegExp>();
+ _redoStack = TQPtrStack<RegExp>();
emitUndoRedoSignals();
}
}
@@ -304,7 +304,7 @@ void KRegExpEditorPrivate::emitUndoRedoSignals()
emit canRedo( _redoStack.count() > 0 );
}
-void KRegExpEditorPrivate::slotSetRegexp( QString regexp )
+void KRegExpEditorPrivate::slotSetRegexp( TQString regexp )
{
_regexpEdit->setText( regexp );
}
@@ -329,7 +329,7 @@ void KRegExpEditorPrivate::slotTimeout()
slotUpdateEditor( _regexpEdit->text() );
}
-void KRegExpEditorPrivate::setMatchText( const QString& text )
+void KRegExpEditorPrivate::setMatchText( const TQString& text )
{
bool autoVerify = _autoVerify;
_autoVerify = false;
@@ -365,17 +365,17 @@ void KRegExpEditorPrivate::setAutoVerify( bool on )
doVerify();
}
-void KRegExpEditorPrivate::setVerifyText( const QString& fileName )
+void KRegExpEditorPrivate::setVerifyText( const TQString& fileName )
{
bool autoVerify = _autoVerify;
_autoVerify = false;
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) ) {
KMessageBox::sorry(0, i18n("Could not open file '%1' for reading").arg( fileName ) );
}
else {
- QTextStream s( &file );
- QString txt = s.read();
+ TQTextStream s( &file );
+ TQString txt = s.read();
file.close();
RegExp* regexp = _scrolledEditorWindow->regExp();
_verifier->setText( txt );
@@ -395,7 +395,7 @@ void KRegExpEditorPrivate::setMinimal( bool b )
_verifier->setMinimal( b );
}
-void KRegExpEditorPrivate::setSyntax( const QString& syntax )
+void KRegExpEditorPrivate::setSyntax( const TQString& syntax )
{
RegExpConverter* converter = _verifyButtons->setSyntax( syntax );
RegExpConverter::setCurrent( converter );
diff --git a/kregexpeditor/kregexpeditorprivate.h b/kregexpeditor/kregexpeditorprivate.h
index 2e40fad..c7858d5 100644
--- a/kregexpeditor/kregexpeditorprivate.h
+++ b/kregexpeditor/kregexpeditorprivate.h
@@ -18,8 +18,8 @@
#ifndef kregexpeditorprivate_h
#define kregexpeditorprivate_h
-#include <qlabel.h>
-#include <qptrstack.h>
+#include <tqlabel.h>
+#include <tqptrstack.h>
#include "regexp.h"
#include "errormap.h"
class QTimer;
@@ -48,14 +48,14 @@ class KRegExpEditorPrivate :public QWidget
Q_OBJECT
public:
- KRegExpEditorPrivate( QWidget *parent, const char *name = 0 );
- QString regexp();
+ KRegExpEditorPrivate( TQWidget *parent, const char *name = 0 );
+ TQString regexp();
void setMinimal( bool );
void setCaseSensitive( bool );
void setAllowNonQtSyntax( bool );
protected slots:
- void slotUpdateEditor( const QString & );
+ void slotUpdateEditor( const TQString & );
void slotUpdateLineEdit();
void slotShowEditor();
void slotTriggerUpdate();
@@ -63,14 +63,14 @@ protected slots:
void maybeVerify();
void doVerify();
void setAutoVerify( bool );
- void setVerifyText( const QString& fileName );
+ void setVerifyText( const TQString& fileName );
public slots:
void slotUndo();
void slotRedo();
- void slotSetRegexp( QString regexp );
- void setMatchText( const QString& text );
- void setSyntax( const QString& );
+ void slotSetRegexp( TQString regexp );
+ void setMatchText( const TQString& text );
+ void setSyntax( const TQString& );
void showHelp();
signals:
@@ -88,18 +88,18 @@ private:
VerifyButtons* _verifyButtons;
AuxButtons *_auxButtons;
InfoPage* _info;
- QLineEdit* _regexpEdit;
- QSplitter* _editor;
+ TQLineEdit* _regexpEdit;
+ TQSplitter* _editor;
bool _updating;
- QLabel* _error;
- QPtrStack<RegExp> _undoStack;
- QPtrStack<RegExp> _redoStack;
+ TQLabel* _error;
+ TQPtrStack<RegExp> _undoStack;
+ TQPtrStack<RegExp> _redoStack;
UserDefinedRegExps* _userRegExps;
- QTimer* _timer;
+ TQTimer* _timer;
Verifier* _verifier;
bool _autoVerify;
ErrorMap _errorMap;
- QToolButton *clearButton;
+ TQToolButton *clearButton;
};
#endif
diff --git a/kregexpeditor/limitedcharlineedit.cpp b/kregexpeditor/limitedcharlineedit.cpp
index 9631603..6322016 100644
--- a/kregexpeditor/limitedcharlineedit.cpp
+++ b/kregexpeditor/limitedcharlineedit.cpp
@@ -16,7 +16,7 @@
* Boston, MA 02110-1301, USA.
**/
#include "limitedcharlineedit.h"
-#include <qvalidator.h>
+#include <tqvalidator.h>
/**
@internal
@@ -25,22 +25,22 @@
class Validator :public QValidator
{
public:
- Validator( LimitedCharLineEdit::Mode mode, QWidget* parent )
- :QValidator( parent, "Validator" ), _mode(mode)
+ Validator( LimitedCharLineEdit::Mode mode, TQWidget* parent )
+ :TQValidator( parent, "Validator" ), _mode(mode)
{
}
- virtual QValidator::State validate( QString& txt, int & /*pos*/ ) const
+ virtual TQValidator::State validate( TQString& txt, int & /*pos*/ ) const
{
if ( _mode == LimitedCharLineEdit::NORMAL ||
(_mode == LimitedCharLineEdit::HEX &&
- QRegExp(QString::fromLocal8Bit("^[0-9A-Fa-f]*$")).search( txt ) != -1) ||
+ TQRegExp(TQString::fromLocal8Bit("^[0-9A-Fa-f]*$")).search( txt ) != -1) ||
(_mode == LimitedCharLineEdit::OCT &&
- QRegExp(QString::fromLocal8Bit("^[0-7]*$")).search( txt ) != -1 ) ) {
- return QValidator::Acceptable;
+ TQRegExp(TQString::fromLocal8Bit("^[0-7]*$")).search( txt ) != -1 ) ) {
+ return TQValidator::Acceptable;
}
else {
- return QValidator::Invalid;
+ return TQValidator::Invalid;
}
}
@@ -49,15 +49,15 @@ private:
};
-void LimitedCharLineEdit::keyPressEvent ( QKeyEvent *event )
+void LimitedCharLineEdit::keyPressEvent ( TQKeyEvent *event )
{
- QLineEdit::keyPressEvent( event );
+ TQLineEdit::keyPressEvent( event );
if ( text().length() == _count && !event->text().isNull() )
focusNextPrevChild(true);
}
-LimitedCharLineEdit::LimitedCharLineEdit( Mode mode, QWidget* parent, const char* name )
- :QLineEdit( parent, name ), _mode(mode)
+LimitedCharLineEdit::LimitedCharLineEdit( Mode mode, TQWidget* parent, const char* name )
+ :TQLineEdit( parent, name ), _mode(mode)
{
if ( mode == NORMAL )
_count = 1;
diff --git a/kregexpeditor/limitedcharlineedit.h b/kregexpeditor/limitedcharlineedit.h
index d4654c6..13026cc 100644
--- a/kregexpeditor/limitedcharlineedit.h
+++ b/kregexpeditor/limitedcharlineedit.h
@@ -18,10 +18,10 @@
#ifndef __limitedcharlineedit
#define __limitedcharlineedit
-#include <qlineedit.h>
+#include <tqlineedit.h>
/**
- QLineEdit which only accepts a prespecified number of character.
+ TQLineEdit which only accepts a prespecified number of character.
@internal
*/
class LimitedCharLineEdit :public QLineEdit
@@ -29,10 +29,10 @@ class LimitedCharLineEdit :public QLineEdit
public:
enum Mode { NORMAL = 0, HEX = 1, OCT = 2 };
- LimitedCharLineEdit(Mode mode, QWidget* parent, const char *name = 0);
+ LimitedCharLineEdit(Mode mode, TQWidget* parent, const char *name = 0);
protected:
- virtual void keyPressEvent ( QKeyEvent * );
+ virtual void keyPressEvent ( TQKeyEvent * );
private:
Mode _mode;
diff --git a/kregexpeditor/lookaheadregexp.cpp b/kregexpeditor/lookaheadregexp.cpp
index 7415ca4..899dcfc 100644
--- a/kregexpeditor/lookaheadregexp.cpp
+++ b/kregexpeditor/lookaheadregexp.cpp
@@ -34,19 +34,19 @@ bool LookAheadRegExp::check( ErrorMap& map, bool , bool last )
}
-QDomNode LookAheadRegExp::toXml( QDomDocument* doc ) const
+TQDomNode LookAheadRegExp::toXml( TQDomDocument* doc ) const
{
- QDomElement top;
+ TQDomElement top;
if ( _tp == POSITIVE )
- top = doc->createElement( QString::fromLocal8Bit("PositiveLookAhead") );
+ top = doc->createElement( TQString::fromLocal8Bit("PositiveLookAhead") );
else
- top = doc->createElement( QString::fromLocal8Bit("NegativeLookAhead") );
+ top = doc->createElement( TQString::fromLocal8Bit("NegativeLookAhead") );
top.appendChild( _child->toXml( doc ) );
return top;
}
-bool LookAheadRegExp::load( QDomElement top, const QString& version )
+bool LookAheadRegExp::load( TQDomElement top, const TQString& version )
{
_child = readRegExp( top, version );
if ( _child ) {
diff --git a/kregexpeditor/lookaheadregexp.h b/kregexpeditor/lookaheadregexp.h
index 9021710..f2c111a 100644
--- a/kregexpeditor/lookaheadregexp.h
+++ b/kregexpeditor/lookaheadregexp.h
@@ -33,8 +33,8 @@ public:
virtual bool check( ErrorMap&, bool first, bool last );
virtual int precedence() const { return 4;}
- virtual QDomNode toXml( QDomDocument* doc ) const;
- virtual bool load( QDomElement, const QString& version );
+ virtual TQDomNode toXml( TQDomDocument* doc ) const;
+ virtual bool load( TQDomElement, const TQString& version );
RegExp* child() const { return _child; }
TYPE lookAheadType() const { return _tp; }
virtual RegExpType type() const { return LOOKAHEAD;}
diff --git a/kregexpeditor/lookaheadwidget.cpp b/kregexpeditor/lookaheadwidget.cpp
index b724a3c..aa9f873 100644
--- a/kregexpeditor/lookaheadwidget.cpp
+++ b/kregexpeditor/lookaheadwidget.cpp
@@ -26,9 +26,9 @@
#include "lookaheadwidget.h"
#include "lookaheadregexp.h"
#include "concwidget.h"
-#include <qpainter.h>
+#include <tqpainter.h>
-LookAheadWidget::LookAheadWidget( RegExpEditorWindow* editorWindow, RegExpType tp, QWidget* parent, const char* name )
+LookAheadWidget::LookAheadWidget( RegExpEditorWindow* editorWindow, RegExpType tp, TQWidget* parent, const char* name )
:SingleContainerWidget(editorWindow, parent, name ? name : "LookAheadWidget" ), _tp(tp)
{
_child = new ConcWidget( editorWindow, this );
@@ -36,7 +36,7 @@ LookAheadWidget::LookAheadWidget( RegExpEditorWindow* editorWindow, RegExpType t
}
LookAheadWidget::LookAheadWidget( LookAheadRegExp* regexp, RegExpEditorWindow* editorWindow, RegExpType tp,
- QWidget* parent, const char* name )
+ TQWidget* parent, const char* name )
:SingleContainerWidget( editorWindow, parent, name ? name : "LookAheadWidget" ), _tp(tp)
{
RegExpWidget* child = WidgetFactory::createWidget( regexp->child(), editorWindow, this );
@@ -60,24 +60,24 @@ RegExp* LookAheadWidget::regExp() const
_child->regExp() );
}
-QSize LookAheadWidget::sizeHint() const
+TQSize LookAheadWidget::sizeHint() const
{
// TODO: Merge with RepeatWidget::sizeHint
- QFontMetrics metrics = fontMetrics();
+ TQFontMetrics metrics = fontMetrics();
_textSize = metrics.size( 0, _text );
_childSize = _child->sizeHint();
int height = _textSize.height() + bdSize + _childSize.height() + bdSize + 2*pw;
int width = 2 * pw + QMAX(_childSize.width(), 4*bdSize + _textSize.width());
- return QSize(width,height);
+ return TQSize(width,height);
}
-void LookAheadWidget::paintEvent( QPaintEvent *e )
+void LookAheadWidget::paintEvent( TQPaintEvent *e )
{
// TODO: Merge with RepeatWidget::paintEvent
- QSize mySize = sizeHint();
- QPainter painter(this);
+ TQSize mySize = sizeHint();
+ TQPainter painter(this);
drawPossibleSelection( painter, mySize );
@@ -104,7 +104,7 @@ void LookAheadWidget::paintEvent( QPaintEvent *e )
SingleContainerWidget::paintEvent(e);
}
-RegExpWidget* LookAheadWidget::findWidgetToEdit( QPoint globalPos )
+RegExpWidget* LookAheadWidget::findWidgetToEdit( TQPoint globalPos )
{
return _child->findWidgetToEdit( globalPos );
}
diff --git a/kregexpeditor/lookaheadwidget.h b/kregexpeditor/lookaheadwidget.h
index 5e244b8..022e419 100644
--- a/kregexpeditor/lookaheadwidget.h
+++ b/kregexpeditor/lookaheadwidget.h
@@ -25,27 +25,27 @@ class LookAheadWidget :public SingleContainerWidget
{
Q_OBJECT
public:
- LookAheadWidget( RegExpEditorWindow* editorWindow, RegExpType tp, QWidget* parent, const char* name = 0 );
+ LookAheadWidget( RegExpEditorWindow* editorWindow, RegExpType tp, TQWidget* parent, const char* name = 0 );
LookAheadWidget( LookAheadRegExp* regexp, RegExpEditorWindow* editorWindow, RegExpType tp,
- QWidget* parent, const char* name = 0);
+ TQWidget* parent, const char* name = 0);
virtual RegExp* regExp() const;
virtual RegExpType type() const { return _tp; }
- virtual QSize sizeHint() const;
- virtual RegExpWidget* findWidgetToEdit( QPoint globalPos );
+ virtual TQSize sizeHint() const;
+ virtual RegExpWidget* findWidgetToEdit( TQPoint globalPos );
protected:
void init();
- virtual void paintEvent( QPaintEvent *e );
+ virtual void paintEvent( TQPaintEvent *e );
private:
RegExpType _tp;
- QString _text;
+ TQString _text;
- mutable QSize _textSize;
- mutable QSize _childSize;
+ mutable TQSize _textSize;
+ mutable TQSize _childSize;
};
#endif // __lookaheadwidget
diff --git a/kregexpeditor/main.cpp b/kregexpeditor/main.cpp
index bde19e9..04fd3a3 100644
--- a/kregexpeditor/main.cpp
+++ b/kregexpeditor/main.cpp
@@ -18,7 +18,7 @@
#ifdef QT_ONLY
#include "compat.h"
- #include <qapplication.h>
+ #include <tqapplication.h>
#else
#include <kaboutdata.h>
#include <kapplication.h>
@@ -28,12 +28,12 @@
#endif
#include "kregexpeditorgui.h"
-#include <qlayout.h>
+#include <tqlayout.h>
int main( int argc, char* argv[] )
{
#ifdef QT_ONLY
- QApplication myapp( argc, argv );
+ TQApplication myapp( argc, argv );
#else
KAboutData aboutData( "kregexpeditor", I18N_NOOP("RegExp Editor"),
"1.0", I18N_NOOP("Editor for Regular Expressions"),
@@ -43,14 +43,14 @@ int main( int argc, char* argv[] )
KApplication myapp;
#endif
- QDialog* top = new QDialog( 0 );
- QVBoxLayout* lay = new QVBoxLayout( top, 6 );
+ TQDialog* top = new TQDialog( 0 );
+ TQVBoxLayout* lay = new TQVBoxLayout( top, 6 );
- KRegExpEditorGUI* iface = new KRegExpEditorGUI( top, "_editor", QStringList() );
- iface->doSomething( QString::fromLatin1("setAllowNonQtSyntax"), (bool*) true );
+ KRegExpEditorGUI* iface = new KRegExpEditorGUI( top, "_editor", TQStringList() );
+ iface->doSomething( TQString::fromLatin1("setAllowNonQtSyntax"), (bool*) true );
lay->addWidget( iface );
- QHBoxLayout* lay2 = new QHBoxLayout( lay, 6 );
+ TQHBoxLayout* lay2 = new TQHBoxLayout( lay, 6 );
KPushButton* help = new KPushButton( KStdGuiItem::help(), top );
KPushButton* quit = new KPushButton( KStdGuiItem::quit(), top );
@@ -58,11 +58,11 @@ int main( int argc, char* argv[] )
lay2->addStretch(1);
lay2->addWidget( quit );
- QObject::connect( help, SIGNAL( clicked() ), iface, SLOT( showHelp() ) );
- QObject::connect( quit, SIGNAL( clicked() ), qApp, SLOT( quit() ) );
+ TQObject::connect( help, TQT_SIGNAL( clicked() ), iface, TQT_SLOT( showHelp() ) );
+ TQObject::connect( quit, TQT_SIGNAL( clicked() ), qApp, TQT_SLOT( quit() ) );
top->show();
- QObject::connect( qApp, SIGNAL( lastWindowClosed() ), qApp, SLOT( quit() ) );
+ TQObject::connect( qApp, TQT_SIGNAL( lastWindowClosed() ), qApp, TQT_SLOT( quit() ) );
myapp.exec();
}
diff --git a/kregexpeditor/multicontainerwidget.cpp b/kregexpeditor/multicontainerwidget.cpp
index b4ae399..cf4403a 100644
--- a/kregexpeditor/multicontainerwidget.cpp
+++ b/kregexpeditor/multicontainerwidget.cpp
@@ -19,14 +19,14 @@
#include "dragaccepter.h"
MultiContainerWidget::MultiContainerWidget( RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name)
+ TQWidget* parent, const char* name)
:RegExpWidget( editorWindow, parent, name )
{
}
void MultiContainerWidget::append( RegExpWidget* child )
{
- child->reparent( this, QPoint(0,0), false );
+ child->reparent( this, TQPoint(0,0), false );
_children.append( child );
_children.append( new DragAccepter( _editorWindow, this ) );
}
@@ -36,7 +36,7 @@ bool MultiContainerWidget::hasSelection() const
if ( _isSelected )
return true;
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // Move past the first dragAccepter
for ( ; *it; it += 2 ) {
if ( (*it)->hasSelection() ) {
@@ -107,8 +107,8 @@ bool MultiContainerWidget::updateSelection(bool parentSelected)
{
bool changed = false;
bool isSel = _isSelected;
- QMemArray<bool> oldState(_children.count());
- QMemArray<bool> newState(_children.count());
+ TQMemArray<bool> oldState(_children.count());
+ TQMemArray<bool> newState(_children.count());
for (int i = 0; i< (int)_children.count();i++) {
oldState[i] = _children.at(i)->isSelected();
@@ -177,21 +177,21 @@ bool MultiContainerWidget::updateSelection(bool parentSelected)
-QRect MultiContainerWidget::selectionRect() const
+TQRect MultiContainerWidget::selectionRect() const
{
if ( _isSelected )
- return QRect( mapToGlobal( QPoint(0,0) ), size() );
+ return TQRect( mapToGlobal( TQPoint(0,0) ), size() );
else {
- QRect res;
- QPtrListIterator<RegExpWidget> it(_children);
+ TQRect res;
+ TQPtrListIterator<RegExpWidget> it(_children);
++it; // Move past the first dragAccepter
for ( ; *it; it +=2 ) {
if ( (*it)->hasSelection() ) {
- QRect childSel = (*it)->selectionRect();
+ TQRect childSel = (*it)->selectionRect();
if ( res.isNull() )
res = childSel;
else {
- QRect newRes;
+ TQRect newRes;
newRes.setLeft( QMIN( res.left(), childSel.left() ) );
newRes.setTop( QMIN( res.top(), childSel.top() ) );
newRes.setRight( QMAX( res.right(), childSel.right() ) );
@@ -204,7 +204,7 @@ QRect MultiContainerWidget::selectionRect() const
}
}
-RegExpWidget* MultiContainerWidget::widgetUnderPoint( QPoint globalPos, bool justVisibleWidgets )
+RegExpWidget* MultiContainerWidget::widgetUnderPoint( TQPoint globalPos, bool justVisibleWidgets )
{
unsigned int start, incr;
if ( justVisibleWidgets ) {
@@ -228,7 +228,7 @@ RegExpWidget* MultiContainerWidget::widgetUnderPoint( QPoint globalPos, bool jus
}
}
-RegExpWidget* MultiContainerWidget::findWidgetToEdit( QPoint globalPos )
+RegExpWidget* MultiContainerWidget::findWidgetToEdit( TQPoint globalPos )
{
for ( unsigned int i = 1; i < _children.count(); i+=2 ) {
RegExpWidget* wid = _children.at(i)->findWidgetToEdit( globalPos );
@@ -241,7 +241,7 @@ RegExpWidget* MultiContainerWidget::findWidgetToEdit( QPoint globalPos )
void MultiContainerWidget::selectWidget( bool sel )
{
RegExpWidget::selectWidget( sel );
- QPtrListIterator<RegExpWidget> it(_children);
+ TQPtrListIterator<RegExpWidget> it(_children);
for ( ; *it ; ++it ) {
(*it)->selectWidget( sel );
}
@@ -250,7 +250,7 @@ void MultiContainerWidget::selectWidget( bool sel )
void MultiContainerWidget::updateAll()
{
- for ( QPtrListIterator<RegExpWidget> it(_children); *it ; ++it ) {
+ for ( TQPtrListIterator<RegExpWidget> it(_children); *it ; ++it ) {
(*it)->updateAll();
}
RegExpWidget::updateAll();
@@ -258,7 +258,7 @@ void MultiContainerWidget::updateAll()
void MultiContainerWidget::updateCursorRecursively()
{
- for ( QPtrListIterator<RegExpWidget> it(_children); *it ; ++it ) {
+ for ( TQPtrListIterator<RegExpWidget> it(_children); *it ; ++it ) {
(*it)->updateCursorRecursively();
}
updateCursorShape();
diff --git a/kregexpeditor/multicontainerwidget.h b/kregexpeditor/multicontainerwidget.h
index 3fa4095..4dd6a58 100644
--- a/kregexpeditor/multicontainerwidget.h
+++ b/kregexpeditor/multicontainerwidget.h
@@ -27,23 +27,23 @@
class MultiContainerWidget :public RegExpWidget
{
public:
- MultiContainerWidget( RegExpEditorWindow* editorWindow, QWidget* parent = 0,
+ MultiContainerWidget( RegExpEditorWindow* editorWindow, TQWidget* parent = 0,
const char* name = 0);
virtual bool hasSelection() const;
virtual void clearSelection();
virtual void deleteSelection();
virtual void addNewChild(DragAccepter *accepter, RegExpWidget *child);
virtual bool updateSelection(bool parentSelected);
- virtual QRect selectionRect() const;
- virtual RegExpWidget* widgetUnderPoint( QPoint globalPos, bool justVisibleWidgets );
- virtual RegExpWidget* findWidgetToEdit( QPoint globalPos );
+ virtual TQRect selectionRect() const;
+ virtual RegExpWidget* widgetUnderPoint( TQPoint globalPos, bool justVisibleWidgets );
+ virtual RegExpWidget* findWidgetToEdit( TQPoint globalPos );
virtual void selectWidget( bool sel );
virtual void updateAll();
virtual void updateCursorRecursively();
protected:
void append( RegExpWidget* child );
- QPtrList<RegExpWidget> _children;
+ TQPtrList<RegExpWidget> _children;
};
diff --git a/kregexpeditor/myfontmetrics.cpp b/kregexpeditor/myfontmetrics.cpp
index cdf29b2..f405c69 100644
--- a/kregexpeditor/myfontmetrics.cpp
+++ b/kregexpeditor/myfontmetrics.cpp
@@ -17,15 +17,15 @@
**/
#include "myfontmetrics.h"
-QSize HackCalculateFontSize(QFontMetrics fm, QString str )
+TQSize HackCalculateFontSize(TQFontMetrics fm, TQString str )
{
- QStringList list = QStringList::split( QString::fromLatin1("\n"), str );
+ TQStringList list = TQStringList::split( TQString::fromLatin1("\n"), str );
int maxWidth = 0;
int height = 0;
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
- QSize size = fm.size( 0, *it );
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ TQSize size = fm.size( 0, *it );
maxWidth = QMAX( maxWidth, size.width() );
height += size.height();
}
- return QSize( maxWidth, height );
+ return TQSize( maxWidth, height );
}
diff --git a/kregexpeditor/myfontmetrics.h b/kregexpeditor/myfontmetrics.h
index 649d32b..a8dba88 100644
--- a/kregexpeditor/myfontmetrics.h
+++ b/kregexpeditor/myfontmetrics.h
@@ -17,11 +17,11 @@
**/
#ifndef __MYFONTMETRICS_H
#define __MYFONTMETRICS_H
-#include <qfontmetrics.h>
-#include <qstringlist.h>
+#include <tqfontmetrics.h>
+#include <tqstringlist.h>
-// QFontMetrics::size is broken, therefore I need this hack until it works in QT3
+// TQFontMetrics::size is broken, therefore I need this hack until it works in QT3
-QSize HackCalculateFontSize(QFontMetrics fm, QString str );
+TQSize HackCalculateFontSize(TQFontMetrics fm, TQString str );
#endif
diff --git a/kregexpeditor/positionregexp.cpp b/kregexpeditor/positionregexp.cpp
index df5311f..d210f66 100644
--- a/kregexpeditor/positionregexp.cpp
+++ b/kregexpeditor/positionregexp.cpp
@@ -34,18 +34,18 @@ bool PositionRegExp::check( ErrorMap& map, bool first , bool last )
return true;
}
-QDomNode PositionRegExp::toXml( QDomDocument* doc ) const
+TQDomNode PositionRegExp::toXml( TQDomDocument* doc ) const
{
switch (_tp) {
- case BEGLINE: return doc->createElement(QString::fromLocal8Bit( "BegLine" ) );
- case ENDLINE: return doc->createElement(QString::fromLocal8Bit( "EndLine" ) );
- case WORDBOUNDARY: return doc->createElement(QString::fromLocal8Bit( "WordBoundary" ) );
- case NONWORDBOUNDARY: return doc->createElement(QString::fromLocal8Bit( "NonWordBoundary" ) );
+ case BEGLINE: return doc->createElement(TQString::fromLocal8Bit( "BegLine" ) );
+ case ENDLINE: return doc->createElement(TQString::fromLocal8Bit( "EndLine" ) );
+ case WORDBOUNDARY: return doc->createElement(TQString::fromLocal8Bit( "WordBoundary" ) );
+ case NONWORDBOUNDARY: return doc->createElement(TQString::fromLocal8Bit( "NonWordBoundary" ) );
}
- return QDomNode();
+ return TQDomNode();
}
-bool PositionRegExp::load( QDomElement /* top */, const QString& /*version*/ )
+bool PositionRegExp::load( TQDomElement /* top */, const TQString& /*version*/ )
{
// Nothing to do.
return true;
diff --git a/kregexpeditor/positionregexp.h b/kregexpeditor/positionregexp.h
index db90f93..6839c79 100644
--- a/kregexpeditor/positionregexp.h
+++ b/kregexpeditor/positionregexp.h
@@ -34,8 +34,8 @@ public:
virtual bool check( ErrorMap&, bool first, bool last );
virtual int precedence() const { return 4;}
- virtual QDomNode toXml( QDomDocument* doc ) const;
- virtual bool load( QDomElement, const QString& version );
+ virtual TQDomNode toXml( TQDomDocument* doc ) const;
+ virtual bool load( TQDomElement, const TQString& version );
virtual RegExpType type() const { return POSITION ;}
private:
diff --git a/kregexpeditor/qt-only/compat.cpp b/kregexpeditor/qt-only/compat.cpp
index 7dbc7b4..a7a5d12 100644
--- a/kregexpeditor/qt-only/compat.cpp
+++ b/kregexpeditor/qt-only/compat.cpp
@@ -18,62 +18,62 @@
#include "compat.h"
-QString i18n( const QString& a) {
- return QObject::tr(a);
+TQString i18n( const TQString& a) {
+ return TQObject::tr(a);
}
-QString i18n( const QString& a, const QString& b) {
- return QObject::tr(b,a);
+TQString i18n( const TQString& a, const TQString& b) {
+ return TQObject::tr(b,a);
}
-KDialogBase::KDialogBase( int /*dialogFace*/, const QString &caption, int buttonMask,
- ButtonCode defaultButton, QWidget *parent, const char *name,
+KDialogBase::KDialogBase( int /*dialogFace*/, const TQString &caption, int buttonMask,
+ ButtonCode defaultButton, TQWidget *parent, const char *name,
bool modal )
- :QDialog( parent, name, modal )
+ :TQDialog( parent, name, modal )
{
init( buttonMask, defaultButton, caption );
}
-KDialogBase::KDialogBase( QWidget* parent, const char* name, bool modal,
- const QString& caption, int buttonMask )
- : QDialog( parent, name, modal )
+KDialogBase::KDialogBase( TQWidget* parent, const char* name, bool modal,
+ const TQString& caption, int buttonMask )
+ : TQDialog( parent, name, modal )
{
init( buttonMask, Ok, caption );
}
-void KDialogBase::init( int buttonMask, ButtonCode /*defaultButton*/, const QString& caption )
+void KDialogBase::init( int buttonMask, ButtonCode /*defaultButton*/, const TQString& caption )
{
setCaption( caption );
- _layout = new QVBoxLayout( this, 6 );
- QHBoxLayout* buts = new QHBoxLayout( _layout, 6 );
- QPushButton* but;
+ _layout = new TQVBoxLayout( this, 6 );
+ TQHBoxLayout* buts = new TQHBoxLayout( _layout, 6 );
+ TQPushButton* but;
if ( buttonMask & Help ) {
- but = new QPushButton( tr("Help"), this );
+ but = new TQPushButton( tr("Help"), this );
buts->addWidget( but );
- connect( but, SIGNAL( clicked() ), this, SIGNAL( helpClicked() ) );
+ connect( but, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( helpClicked() ) );
}
buts->addStretch(1);
if ( buttonMask & Ok ) {
- but = new QPushButton( tr("OK"), this );
+ but = new TQPushButton( tr("OK"), this );
buts->addWidget( but );
- connect( but, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
+ connect( but, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOk() ) );
}
if ( buttonMask & Cancel ) {
- but = new QPushButton( tr("Cancel"), this );
+ but = new TQPushButton( tr("Cancel"), this );
buts->addWidget( but );
- connect( but, SIGNAL( clicked() ), this, SLOT( slotCancel() ) );
+ connect( but, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCancel() ) );
}
}
-void KDialogBase::setMainWidget( QWidget* top )
+void KDialogBase::setMainWidget( TQWidget* top )
{
- top->reparent( this, 0, QPoint(0,0) );
+ top->reparent( this, 0, TQPoint(0,0) );
_layout->insertWidget( 0, top );
}
-QFrame* KDialogBase::plainPage()
+TQFrame* KDialogBase::plainPage()
{
- QFrame* frame = new QFrame( this );
+ TQFrame* frame = new TQFrame( this );
setMainWidget( frame );
return frame;
}
@@ -92,7 +92,7 @@ void KDialogBase::slotCancel()
emit finished();
}
-int KMessageBox::warningYesNo(QWidget *parent, const QString &text, const QString &caption )
+int KMessageBox::warningYesNo(TQWidget *parent, const TQString &text, const TQString &caption )
{
int code = warning( parent, caption, text, tr("No"), tr("Yes") );
if ( code == 0 )
@@ -101,15 +101,15 @@ int KMessageBox::warningYesNo(QWidget *parent, const QString &text, const QStrin
return No;
}
-int KMessageBox::information( QWidget* parent, const QString& text, const QString& caption,
- const QString& /*dontShowAgainName*/ )
+int KMessageBox::information( TQWidget* parent, const TQString& text, const TQString& caption,
+ const TQString& /*dontShowAgainName*/ )
{
- return QMessageBox::information( parent, caption, text );
+ return TQMessageBox::information( parent, caption, text );
}
-int KMessageBox::sorry( QWidget* parent, const QString& text, const QString& caption )
+int KMessageBox::sorry( TQWidget* parent, const TQString& text, const TQString& caption )
{
- return QMessageBox::information( parent, caption, text );
+ return TQMessageBox::information( parent, caption, text );
}
diff --git a/kregexpeditor/qt-only/compat.h b/kregexpeditor/qt-only/compat.h
index edf9ced..5afa317 100644
--- a/kregexpeditor/qt-only/compat.h
+++ b/kregexpeditor/qt-only/compat.h
@@ -18,15 +18,15 @@
#ifndef COMPAT_H
#define COMPAT_H
-#include <qobject.h>
-#include <qmessagebox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qinputdialog.h>
-#include <qframe.h>
+#include <tqobject.h>
+#include <tqmessagebox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqinputdialog.h>
+#include <tqframe.h>
-QString i18n( const QString& a);
-QString i18n( const QString& a, const QString& b);
+TQString i18n( const TQString& a);
+TQString i18n( const TQString& a, const TQString& b);
#define isatty(x) 0
#define KTextBrowser QTextBrowser
@@ -42,18 +42,18 @@ public:
enum ButtonCode {Ok = 1, Cancel, Help};
enum DialogType { Plain };
- KDialogBase ( int dialogFace, const QString &caption, int buttonMask,
+ KDialogBase ( int dialogFace, const TQString &caption, int buttonMask,
ButtonCode defaultButton,
- QWidget *parent=0, const char *name=0, bool modal=true );
+ TQWidget *parent=0, const char *name=0, bool modal=true );
- KDialogBase( QWidget* parent, const char* name = 0, bool modal = true,
- const QString& caption = QString::null,
+ KDialogBase( TQWidget* parent, const char* name = 0, bool modal = true,
+ const TQString& caption = TQString::null,
int buttonMask = 0 );
- void init( int buttonMask, ButtonCode /*defaultButton*/, const QString& caption );
- void setMainWidget( QWidget* top );
- QFrame* plainPage();
- void setHelp( const QString&, const QString& ) {}
+ void init( int buttonMask, ButtonCode /*defaultButton*/, const TQString& caption );
+ void setMainWidget( TQWidget* top );
+ TQFrame* plainPage();
+ void setHelp( const TQString&, const TQString& ) {}
public slots:
void slotOk();
@@ -66,7 +66,7 @@ signals:
void helpClicked();
private:
- QVBoxLayout* _layout;
+ TQVBoxLayout* _layout;
};
class KMessageBox :public QMessageBox
@@ -74,11 +74,11 @@ class KMessageBox :public QMessageBox
Q_OBJECT
public:
enum ButtonCode { Ok = 1, Cancel = 2, Yes = 3, No = 4, Continue = 5 };
- static int warningYesNo (QWidget *parent, const QString &text,
- const QString &caption = QString::null );
- static int information( QWidget* parent, const QString& text, const QString& caption = QString::null,
- const QString& /*dontShowAgainName*/ = QString::null );
- static int sorry( QWidget* parent, const QString& text, const QString& caption = QString::null );
+ static int warningYesNo (TQWidget *parent, const TQString &text,
+ const TQString &caption = TQString::null );
+ static int information( TQWidget* parent, const TQString& text, const TQString& caption = TQString::null,
+ const TQString& /*dontShowAgainName*/ = TQString::null );
+ static int sorry( TQWidget* parent, const TQString& text, const TQString& caption = TQString::null );
};
#endif /* COMPAT_H */
diff --git a/kregexpeditor/qtregexpconverter.cpp b/kregexpeditor/qtregexpconverter.cpp
index 198d7dd..6098097 100644
--- a/kregexpeditor/qtregexpconverter.cpp
+++ b/kregexpeditor/qtregexpconverter.cpp
@@ -29,7 +29,7 @@
#include "positionregexp.h"
#include "repeatregexp.h"
-extern RegExp* parseQtRegExp( QString str, bool *ok );
+extern RegExp* parseQtRegExp( TQString str, bool *ok );
extern RegExp* parseDataQtRegExp();
bool QtRegExpConverter::canParse()
@@ -38,24 +38,24 @@ bool QtRegExpConverter::canParse()
}
-RegExp* QtRegExpConverter::parse( const QString& txt, bool* ok )
+RegExp* QtRegExpConverter::parse( const TQString& txt, bool* ok )
{
return parseQtRegExp( txt, ok );
}
-QString QtRegExpConverter::toString( AltnRegExp* regexp, bool markSelection )
+TQString QtRegExpConverter::toString( AltnRegExp* regexp, bool markSelection )
{
- QString res;
+ TQString res;
bool first = true;
RegExpList list = regexp->children();
for ( RegExpListIt it(list); *it; ++it ) {
if ( !first ) {
- res += QString::fromLatin1( "|" );
+ res += TQString::fromLatin1( "|" );
}
first = false;
if ( markSelection && !regexp->isSelected() && (*it)->isSelected() ) {
- res += QString::fromLatin1("(") + toStr( *it, markSelection ) + QString::fromLatin1(")");
+ res += TQString::fromLatin1("(") + toStr( *it, markSelection ) + TQString::fromLatin1(")");
}
else {
res += toStr( *it, markSelection );
@@ -64,53 +64,53 @@ QString QtRegExpConverter::toString( AltnRegExp* regexp, bool markSelection )
return res;
}
-QString QtRegExpConverter::toString( ConcRegExp* regexp, bool markSelection )
+TQString QtRegExpConverter::toString( ConcRegExp* regexp, bool markSelection )
{
- QString res;
+ TQString res;
bool childSelected = false;
RegExpList list = regexp->children();
for ( RegExpListIt it(list); *it; ++it ) {
- QString startPar = QString::fromLocal8Bit("");
- QString endPar = QString::fromLocal8Bit("");
+ TQString startPar = TQString::fromLocal8Bit("");
+ TQString endPar = TQString::fromLocal8Bit("");
if ( (*it)->precedence() < regexp->precedence() ) {
if ( markSelection )
- startPar = QString::fromLocal8Bit("(?:");
+ startPar = TQString::fromLocal8Bit("(?:");
else
- startPar = QString::fromLatin1( "(" );
- endPar = QString::fromLatin1( ")" );
+ startPar = TQString::fromLatin1( "(" );
+ endPar = TQString::fromLatin1( ")" );
}
// Note these two have different tests! They are activated in each their iteration of the loop.
if ( markSelection && !childSelected && !regexp->isSelected() && (*it)->isSelected() ) {
- res += QString::fromLatin1("(");
+ res += TQString::fromLatin1("(");
childSelected = true;
}
if ( markSelection && childSelected && !regexp->isSelected() && !(*it)->isSelected() ) {
- res += QString::fromLatin1(")");
+ res += TQString::fromLatin1(")");
childSelected= false;
}
res += startPar + toStr( *it, markSelection ) + endPar;
}
if ( markSelection && childSelected && !regexp->isSelected() ) {
- res += QString::fromLatin1(")");
+ res += TQString::fromLatin1(")");
}
return res;
}
-QString QtRegExpConverter::toString( LookAheadRegExp* regexp, bool markSelection )
+TQString QtRegExpConverter::toString( LookAheadRegExp* regexp, bool markSelection )
{
if ( regexp->lookAheadType() == LookAheadRegExp::POSITIVE )
- return QString::fromLatin1( "(?=" ) + toStr( regexp->child(), markSelection ) + QString::fromLocal8Bit( ")" );
+ return TQString::fromLatin1( "(?=" ) + toStr( regexp->child(), markSelection ) + TQString::fromLocal8Bit( ")" );
else
- return QString::fromLatin1( "(?!" ) + toStr( regexp->child(), markSelection ) + QString::fromLocal8Bit( ")" );
+ return TQString::fromLatin1( "(?!" ) + toStr( regexp->child(), markSelection ) + TQString::fromLocal8Bit( ")" );
}
-QString QtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelection*/ )
+TQString QtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelection*/ )
{
- QString txt;
+ TQString txt;
bool foundCarrot = false;
bool foundDash = false;
@@ -118,15 +118,15 @@ QString QtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelecti
// Now print the rest of the single characters, but keep "^" as the very
// last element of the characters.
- QStringList chars = regexp->chars();
+ TQStringList chars = regexp->chars();
for (unsigned int i = 0; i< chars.count(); i++) {
- if ( *chars.at(i) == QChar( ']' ) ) {
+ if ( *chars.at(i) == TQChar( ']' ) ) {
foundParenthesis = true;
}
- else if ( *chars.at(i) == QChar( '-' ) ) {
+ else if ( *chars.at(i) == TQChar( '-' ) ) {
foundDash = true;
}
- else if ( *chars.at(i) == QChar( '^' ) ) {
+ else if ( *chars.at(i) == TQChar( '^' ) ) {
foundCarrot = true;
}
else {
@@ -135,9 +135,9 @@ QString QtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelecti
}
// Now insert the ranges.
- QPtrList<StringPair> ranges = regexp->range();
- for ( QPtrListIterator<StringPair> it(ranges); *it; ++it ) {
- txt.append((*it)->first()+ QString::fromLatin1("-")+ (*it)->second());
+ TQPtrList<StringPair> ranges = regexp->range();
+ for ( TQPtrListIterator<StringPair> it(ranges); *it; ++it ) {
+ txt.append((*it)->first()+ TQString::fromLatin1("-")+ (*it)->second());
}
// Ok, its time to build each part of the regexp, here comes the rule:
@@ -147,145 +147,145 @@ QString QtRegExpConverter::toString( TextRangeRegExp* regexp, bool /*markSelecti
// finally if '^' is one of the characters, then it must not be the first
// one!
- QString res = QString::fromLatin1("[");
+ TQString res = TQString::fromLatin1("[");
if ( regexp->negate() )
- res.append(QString::fromLatin1("^"));
+ res.append(TQString::fromLatin1("^"));
// a ']' must be the first character in teh range.
if ( foundParenthesis ) {
- res.append(QString::fromLatin1("]"));
+ res.append(TQString::fromLatin1("]"));
}
// a '-' must be the first character ( only coming after a ']')
if ( foundDash ) {
- res.append(QString::fromLatin1("-"));
+ res.append(TQString::fromLatin1("-"));
}
res += txt;
// Insert \s,\S,\d,\D,\w, and \W
if ( regexp->digit() )
- res += QString::fromLocal8Bit("\\d");
+ res += TQString::fromLocal8Bit("\\d");
if ( regexp->nonDigit() )
- res += QString::fromLocal8Bit("\\D");
+ res += TQString::fromLocal8Bit("\\D");
if ( regexp->space() )
- res += QString::fromLocal8Bit("\\s");
+ res += TQString::fromLocal8Bit("\\s");
if ( regexp->nonSpace() )
- res += QString::fromLocal8Bit("\\S");
+ res += TQString::fromLocal8Bit("\\S");
if ( regexp->wordChar() )
- res += QString::fromLocal8Bit("\\w");
+ res += TQString::fromLocal8Bit("\\w");
if ( regexp->nonWordChar() )
- res += QString::fromLocal8Bit("\\W");
+ res += TQString::fromLocal8Bit("\\W");
if ( foundCarrot ) {
- res.append( QChar( '^' ) );
+ res.append( TQChar( '^' ) );
}
- res.append(QString::fromLatin1("]"));
+ res.append(TQString::fromLatin1("]"));
return res;
}
-QString QtRegExpConverter::toString( CompoundRegExp* regexp, bool markSelection )
+TQString QtRegExpConverter::toString( CompoundRegExp* regexp, bool markSelection )
{
if ( markSelection && !regexp->isSelected() && regexp->child()->isSelected() )
- return QString::fromLatin1( "(" ) + toStr( regexp->child(), markSelection ) + QString::fromLatin1( ")" );
+ return TQString::fromLatin1( "(" ) + toStr( regexp->child(), markSelection ) + TQString::fromLatin1( ")" );
else
return toStr( regexp->child(), markSelection );
}
-QString QtRegExpConverter::toString( DotRegExp* /*regexp*/, bool /*markSelection*/ )
+TQString QtRegExpConverter::toString( DotRegExp* /*regexp*/, bool /*markSelection*/ )
{
- return QString::fromLatin1( "." );
+ return TQString::fromLatin1( "." );
}
-QString QtRegExpConverter::toString( PositionRegExp* regexp, bool /*markSelection*/ )
+TQString QtRegExpConverter::toString( PositionRegExp* regexp, bool /*markSelection*/ )
{
switch (regexp->position()) {
case PositionRegExp::BEGLINE:
- return QString::fromLatin1("^");
+ return TQString::fromLatin1("^");
case PositionRegExp::ENDLINE:
- return QString::fromLatin1("$");
+ return TQString::fromLatin1("$");
case PositionRegExp::WORDBOUNDARY:
- return QString::fromLatin1("\\b");
+ return TQString::fromLatin1("\\b");
case PositionRegExp::NONWORDBOUNDARY:
- return QString::fromLatin1("\\B");
+ return TQString::fromLatin1("\\B");
}
Q_ASSERT( false );
- return QString::fromLatin1("");
+ return TQString::fromLatin1("");
}
-QString QtRegExpConverter::toString( RepeatRegExp* regexp, bool markSelection )
+TQString QtRegExpConverter::toString( RepeatRegExp* regexp, bool markSelection )
{
RegExp* child = regexp->child();
- QString cText = toStr( child, markSelection );
- QString startPar;
- QString endPar;
+ TQString cText = toStr( child, markSelection );
+ TQString startPar;
+ TQString endPar;
if ( markSelection ) {
if ( !regexp->isSelected() && child->isSelected()) {
- startPar = QString::fromLatin1( "(" );
- endPar = QString::fromLatin1( ")" );
+ startPar = TQString::fromLatin1( "(" );
+ endPar = TQString::fromLatin1( ")" );
}
else if ( child->precedence() < regexp->precedence() ) {
- startPar = QString::fromLatin1( "(?:" );
- endPar = QString::fromLatin1( ")" );
+ startPar = TQString::fromLatin1( "(?:" );
+ endPar = TQString::fromLatin1( ")" );
}
}
else if ( child->precedence() < regexp->precedence() ) {
- startPar = QString::fromLatin1( "(" );
- endPar = QString::fromLatin1( ")" );
+ startPar = TQString::fromLatin1( "(" );
+ endPar = TQString::fromLatin1( ")" );
}
if ( regexp->min() == 0 && regexp->max() == -1) {
- return startPar + cText +endPar + QString::fromLocal8Bit("*");
+ return startPar + cText +endPar + TQString::fromLocal8Bit("*");
}
else if ( regexp->min() == 0 && regexp->max() == 1 ) {
- return startPar + cText + endPar + QString::fromLocal8Bit("?");
+ return startPar + cText + endPar + TQString::fromLocal8Bit("?");
}
else if ( regexp->min() == 1 && regexp->max() == -1 ) {
- return startPar + cText + endPar + QString::fromLocal8Bit("+");
+ return startPar + cText + endPar + TQString::fromLocal8Bit("+");
}
else if ( regexp->max() == -1 ) {
- return startPar + cText + endPar + QString::fromLocal8Bit("{") +
- QString::number( regexp->min() ) + QString::fromLocal8Bit(",") +
- QString::fromLocal8Bit("}");
+ return startPar + cText + endPar + TQString::fromLocal8Bit("{") +
+ TQString::number( regexp->min() ) + TQString::fromLocal8Bit(",") +
+ TQString::fromLocal8Bit("}");
}
else {
- return startPar + cText + endPar + QString::fromLocal8Bit("{") +
- QString::number( regexp->min() ) + QString::fromLocal8Bit(",") +
- QString::number( regexp->max() ) + QString::fromLocal8Bit("}");
+ return startPar + cText + endPar + TQString::fromLocal8Bit("{") +
+ TQString::number( regexp->min() ) + TQString::fromLocal8Bit(",") +
+ TQString::number( regexp->max() ) + TQString::fromLocal8Bit("}");
}
}
-QString QtRegExpConverter::toString( TextRegExp* regexp, bool /*markSelection*/ )
+TQString QtRegExpConverter::toString( TextRegExp* regexp, bool /*markSelection*/ )
{
- QValueList<QChar> list;
- list << QChar('$')
- << QChar('^')
- << QChar('.')
- << QChar('*')
- << QChar('+')
- << QChar('?')
- << QChar('[')
- << QChar(']')
- << QChar('\\')
- << QChar('{')
- << QChar('}')
- << QChar('(')
- << QChar(')')
- << QChar('|');
-
- QString res = escape( regexp->text(), list, QChar('\\') );
+ TQValueList<TQChar> list;
+ list << TQChar('$')
+ << TQChar('^')
+ << TQChar('.')
+ << TQChar('*')
+ << TQChar('+')
+ << TQChar('?')
+ << TQChar('[')
+ << TQChar(']')
+ << TQChar('\\')
+ << TQChar('{')
+ << TQChar('}')
+ << TQChar('(')
+ << TQChar(')')
+ << TQChar('|');
+
+ TQString res = escape( regexp->text(), list, TQChar('\\') );
return res;
}
-QString QtRegExpConverter::name()
+TQString QtRegExpConverter::name()
{
- return QString::fromLatin1( "Qt" );
+ return TQString::fromLatin1( "Qt" );
}
int QtRegExpConverter::features()
@@ -293,7 +293,7 @@ int QtRegExpConverter::features()
return WordBoundary | NonWordBoundary | PosLookAhead | NegLookAhead | CharacterRangeNonItems | ExtRange;
}
-RegexpHighlighter* QtRegExpConverter::highlighter( QTextEdit* edit )
+RegexpHighlighter* QtRegExpConverter::highlighter( TQTextEdit* edit )
{
return new QtRegexpHighlighter( edit );
}
diff --git a/kregexpeditor/qtregexpconverter.h b/kregexpeditor/qtregexpconverter.h
index 100dcf3..d00120c 100644
--- a/kregexpeditor/qtregexpconverter.h
+++ b/kregexpeditor/qtregexpconverter.h
@@ -24,19 +24,19 @@ class QtRegExpConverter :public RegExpConverter
{
public:
virtual bool canParse();
- virtual RegExp* parse( const QString&, bool* ok );
- virtual QString name();
+ virtual RegExp* parse( const TQString&, bool* ok );
+ virtual TQString name();
virtual int features();
- virtual QString toString( AltnRegExp*, bool markSelection );
- virtual QString toString( ConcRegExp*, bool markSelection );
- virtual QString toString( LookAheadRegExp*, bool markSelection );
- virtual QString toString( TextRangeRegExp*, bool markSelection );
- virtual QString toString( CompoundRegExp*, bool markSelection );
- virtual QString toString( DotRegExp*, bool markSelection );
- virtual QString toString( PositionRegExp*, bool markSelection );
- virtual QString toString( RepeatRegExp*, bool markSelection );
- virtual QString toString( TextRegExp*, bool markSelection );
- RegexpHighlighter* highlighter( QTextEdit* edit );
+ virtual TQString toString( AltnRegExp*, bool markSelection );
+ virtual TQString toString( ConcRegExp*, bool markSelection );
+ virtual TQString toString( LookAheadRegExp*, bool markSelection );
+ virtual TQString toString( TextRangeRegExp*, bool markSelection );
+ virtual TQString toString( CompoundRegExp*, bool markSelection );
+ virtual TQString toString( DotRegExp*, bool markSelection );
+ virtual TQString toString( PositionRegExp*, bool markSelection );
+ virtual TQString toString( RepeatRegExp*, bool markSelection );
+ virtual TQString toString( TextRegExp*, bool markSelection );
+ RegexpHighlighter* highlighter( TQTextEdit* edit );
};
#endif /* QTREGEXPCONVERTER_H */
diff --git a/kregexpeditor/qtregexphighlighter.cpp b/kregexpeditor/qtregexphighlighter.cpp
index 1983b89..fdf3a81 100644
--- a/kregexpeditor/qtregexphighlighter.cpp
+++ b/kregexpeditor/qtregexphighlighter.cpp
@@ -16,15 +16,15 @@
* Boston, MA 02110-1301, USA.
**/
#include "qtregexphighlighter.h"
-#include <qregexp.h>
-QtRegexpHighlighter::QtRegexpHighlighter( QTextEdit* editor )
+#include <tqregexp.h>
+QtRegexpHighlighter::QtRegexpHighlighter( TQTextEdit* editor )
:RegexpHighlighter( editor ), _editor( editor )
{
}
-int QtRegexpHighlighter::highlightParagraph( const QString & text, int endStateOfLastPara )
+int QtRegexpHighlighter::highlightParagraph( const TQString & text, int endStateOfLastPara )
{
- QRegExp regexp( _regexp );
+ TQRegExp regexp( _regexp );
regexp.setCaseSensitive( _caseSensitive );
regexp.setMinimal( _minimal );
@@ -35,7 +35,7 @@ int QtRegexpHighlighter::highlightParagraph( const QString & text, int endStateO
}
// ------------------------------ Process with the regular expression.
- QColor colors[] = { Qt::red, Qt::blue };
+ TQColor colors[] = { Qt::red, Qt::blue };
int color = endStateOfLastPara;
if ( color < 0 || color > 1 )
color = 0;
@@ -55,7 +55,7 @@ int QtRegexpHighlighter::highlightParagraph( const QString & text, int endStateO
if ( start != index )
setFormat( index, start-index, colors[color] );
- QFont font = _editor->font();
+ TQFont font = _editor->font();
font.setUnderline( true );
font.setPointSize( (int) (font.pointSize() * 1.3) );
setFormat( start, length, font, colors[color] );
diff --git a/kregexpeditor/qtregexphighlighter.h b/kregexpeditor/qtregexphighlighter.h
index bb57bda..c160ca2 100644
--- a/kregexpeditor/qtregexphighlighter.h
+++ b/kregexpeditor/qtregexphighlighter.h
@@ -18,16 +18,16 @@
#ifndef QTREGEXPHIGHLIGHTER_H
#define QTREGEXPHIGHLIGHTER_H
#include "regexphighlighter.h"
-#include <qtextedit.h>
+#include <tqtextedit.h>
class QtRegexpHighlighter :public RegexpHighlighter
{
public:
- QtRegexpHighlighter( QTextEdit* verifier );
- virtual int highlightParagraph ( const QString & text, int endStateOfLastPara );
+ QtRegexpHighlighter( TQTextEdit* verifier );
+ virtual int highlightParagraph ( const TQString & text, int endStateOfLastPara );
private:
- QTextEdit* _editor;
+ TQTextEdit* _editor;
};
#endif /* QTREGEXPHIGHLIGHTER_H */
diff --git a/kregexpeditor/regexp.cpp b/kregexpeditor/regexp.cpp
index 31450f1..0b583d7 100644
--- a/kregexpeditor/regexp.cpp
+++ b/kregexpeditor/regexp.cpp
@@ -28,7 +28,7 @@ RegExp::RegExp( bool selected ) : _parent(0), _destructing( false ), _selected(
RegExp::~RegExp()
{
_destructing = true;
- for ( QPtrListIterator<RegExp> it(_children); *it; ++it ) {
+ for ( TQPtrListIterator<RegExp> it(_children); *it; ++it ) {
delete *it;
}
if ( _parent )
@@ -54,9 +54,9 @@ void RegExp::setParent( RegExp* parent )
_parent = parent;
}
-RegExp* RegExp::readRegExp( QDomElement top, const QString& version )
+RegExp* RegExp::readRegExp( TQDomElement top, const TQString& version )
{
- for ( QDomNode node = top.firstChild(); !node.isNull(); node = node.nextSibling() ) {
+ for ( TQDomNode node = top.firstChild(); !node.isNull(); node = node.nextSibling() ) {
if (!node.isElement() )
continue; // skip past comments
RegExp* regexp = WidgetFactory::createRegExp(node.toElement(), version );
@@ -65,17 +65,17 @@ RegExp* RegExp::readRegExp( QDomElement top, const QString& version )
return 0;
}
-QString RegExp::toXmlString() const
+TQString RegExp::toXmlString() const
{
- QDomDocument doc;
- doc.setContent( QString::fromLatin1( "<RegularExpression/>" ) );
- QDomNode top = doc.documentElement();
- top.toElement().setAttribute(QString::fromLocal8Bit("version"), KRegExpEditorGUI::version);
+ TQDomDocument doc;
+ doc.setContent( TQString::fromLatin1( "<RegularExpression/>" ) );
+ TQDomNode top = doc.documentElement();
+ top.toElement().setAttribute(TQString::fromLocal8Bit("version"), KRegExpEditorGUI::version);
- QDomNode elm = toXml( &doc );
+ TQDomNode elm = toXml( &doc );
top.appendChild( elm );
- QString xmlString = QString::fromLocal8Bit("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<!DOCTYPE RegularExpression PUBLIC \"-//KDE//KRegexpEditor DTD 1.0//EN\" \"http://www.blackie.dk/kreg.dtd\">\n") + doc.toString();
+ TQString xmlString = TQString::fromLocal8Bit("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<!DOCTYPE RegularExpression PUBLIC \"-//KDE//KRegexpEditor DTD 1.0//EN\" \"http://www.blackie.dk/kreg.dtd\">\n") + doc.toString();
return xmlString;
}
diff --git a/kregexpeditor/regexp.h b/kregexpeditor/regexp.h
index 86bd796..5b2bcae 100644
--- a/kregexpeditor/regexp.h
+++ b/kregexpeditor/regexp.h
@@ -18,8 +18,8 @@
#ifndef REGEXP_H
#define REGEXP_H
-#include <qdom.h>
-#include <qptrlist.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
class CompoundRegExp;
class ErrorMap;
@@ -35,9 +35,9 @@ public:
virtual ~RegExp();
virtual int precedence() const = 0;
- virtual QDomNode toXml( QDomDocument* doc ) const = 0;
- virtual bool load( QDomElement, const QString& version ) = 0;
- QString toXmlString() const;
+ virtual TQDomNode toXml( TQDomDocument* doc ) const = 0;
+ virtual bool load( TQDomElement, const TQString& version ) = 0;
+ TQString toXmlString() const;
void check( ErrorMap& );
virtual bool check( ErrorMap&, bool first, bool last ) = 0;
@@ -55,18 +55,18 @@ public:
void setSelected( bool b ) { _selected = b; }
protected:
- RegExp* readRegExp( QDomElement top, const QString& version );
+ RegExp* readRegExp( TQDomElement top, const TQString& version );
private:
RegExp() {} // disable
- QPtrList<RegExp> _children;
+ TQPtrList<RegExp> _children;
RegExp* _parent;
bool _destructing;
bool _selected;
};
-typedef QPtrList<RegExp> RegExpList;
-typedef QPtrListIterator<RegExp> RegExpListIt;
+typedef TQPtrList<RegExp> RegExpList;
+typedef TQPtrListIterator<RegExp> RegExpListIt;
#endif // REGEXP_H
diff --git a/kregexpeditor/regexpbuttons.cpp b/kregexpeditor/regexpbuttons.cpp
index eae7da0..88e581e 100644
--- a/kregexpeditor/regexpbuttons.cpp
+++ b/kregexpeditor/regexpbuttons.cpp
@@ -27,44 +27,44 @@
#include "regexpbuttons.h"
#include "dcbutton.h"
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qbuttongroup.h>
-#include <qlayout.h>
-#include <qsignalmapper.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
+#include <tqsignalmapper.h>
#include "regexpconverter.h"
-RegExpButtons::RegExpButtons( QWidget *parent, const char *name )
- : QDockWindow( QDockWindow::InDock, parent, name), _keepMode(false)
+RegExpButtons::RegExpButtons( TQWidget *parent, const char *name )
+ : TQDockWindow( TQDockWindow::InDock, parent, name), _keepMode(false)
{
- QBoxLayout *layout = boxLayout();
+ TQBoxLayout *layout = boxLayout();
- _grp = new QButtonGroup(this);
+ _grp = new TQButtonGroup(this);
_grp->hide();
_grp->setExclusive( true );
- _mapper = new QSignalMapper( this, "RegExpButtons::_mapper" );
- connect( _mapper, SIGNAL( mapped(int) ), this, SIGNAL( clicked(int) ) );
+ _mapper = new TQSignalMapper( this, "RegExpButtons::_mapper" );
+ connect( _mapper, TQT_SIGNAL( mapped(int) ), this, TQT_SIGNAL( clicked(int) ) );
// The "select" button.
- _selectBut = new QToolButton( this);
+ _selectBut = new TQToolButton( this);
#ifdef QT_ONLY
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage( qembed_findImage( "select" ) );
#else
- QPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", QString::fromLatin1("kregexpeditor/pics/select.png") ), KIcon::Toolbar );
+ TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::fromLatin1("kregexpeditor/pics/select.png") ), KIcon::Toolbar );
#endif
_selectBut->setPixmap( pix );
layout->addWidget( _selectBut );
_grp->insert(_selectBut);
_selectBut->setToggleButton( true );
- connect( _selectBut, SIGNAL(clicked()), SIGNAL(doSelect()));
- connect( _selectBut, SIGNAL(clicked()), this, SLOT(slotSetNonKeepMode()) );
+ connect( _selectBut, TQT_SIGNAL(clicked()), TQT_SIGNAL(doSelect()));
+ connect( _selectBut, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSetNonKeepMode()) );
- QToolTip::add( _selectBut, i18n("Selection tool"));
- QWhatsThis::add( _selectBut, i18n("<qt>This will change the state of the editor to <i>selection state</i>.<p>"
+ TQToolTip::add( _selectBut, i18n("Selection tool"));
+ TQWhatsThis::add( _selectBut, i18n("<qt>This will change the state of the editor to <i>selection state</i>.<p>"
"In this state you will not be inserting <i>regexp items</i>, but instead select them. "
"To select a number of items, press down the left mouse button and drag it over the items.<p>"
"When you have selected a number of items, you may use cut/copy/paste. These functions are "
@@ -152,28 +152,28 @@ RegExpButtons::RegExpButtons( QWidget *parent, const char *name )
layout->addWidget( _negLookAhead );
}
-DoubleClickButton* RegExpButtons::insert(RegExpType tp, const char* name, QString tooltip, QString whatsthis)
+DoubleClickButton* RegExpButtons::insert(RegExpType tp, const char* name, TQString tooltip, TQString whatsthis)
{
#ifdef QT_ONLY
- QPixmap pix;
- pix.convertFromImage( qembed_findImage( QString::fromLatin1( name ) ) );
+ TQPixmap pix;
+ pix.convertFromImage( qembed_findImage( TQString::fromLatin1( name ) ) );
#else
- QPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", QString::fromLatin1("kregexpeditor/pics/")+QString::fromLatin1(name) +
- QString::fromLatin1(".png") ), KIcon::Toolbar );
+ TQPixmap pix = KGlobal::iconLoader()->loadIcon(locate("data", TQString::fromLatin1("kregexpeditor/pics/")+TQString::fromLatin1(name) +
+ TQString::fromLatin1(".png") ), KIcon::Toolbar );
#endif
DoubleClickButton* but = new DoubleClickButton( pix, this, "RegExpButtons::but");
_mapper->setMapping( but, tp );
- connect( but, SIGNAL( clicked() ), _mapper, SLOT( map() ) );
- connect( but, SIGNAL( clicked() ), this, SLOT( slotSetNonKeepMode() ) );
- connect( but, SIGNAL( doubleClicked() ), this, SLOT( slotSetKeepMode() ) );
+ connect( but, TQT_SIGNAL( clicked() ), _mapper, TQT_SLOT( map() ) );
+ connect( but, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSetNonKeepMode() ) );
+ connect( but, TQT_SIGNAL( doubleClicked() ), this, TQT_SLOT( slotSetKeepMode() ) );
_grp->insert( but );
but->setToggleButton( true );
- QToolTip::add( but, tooltip );
- QWhatsThis::add( but, whatsthis );
+ TQToolTip::add( but, tooltip );
+ TQWhatsThis::add( but, whatsthis );
return but;
}
@@ -181,7 +181,7 @@ DoubleClickButton* RegExpButtons::insert(RegExpType tp, const char* name, QStrin
void RegExpButtons::slotUnSelect()
{
if ( _grp->selected() ) {
- QToolButton *pb = static_cast<QToolButton*>(_grp->selected());
+ TQToolButton *pb = static_cast<TQToolButton*>(_grp->selected());
if (pb) {
pb->setOn( false );
}
diff --git a/kregexpeditor/regexpbuttons.h b/kregexpeditor/regexpbuttons.h
index 5671810..5c81049 100644
--- a/kregexpeditor/regexpbuttons.h
+++ b/kregexpeditor/regexpbuttons.h
@@ -18,7 +18,7 @@
#ifndef __REGEXPBUTTONS_H
#define __REGEXPBUTTONS_H
-#include <qdockwindow.h>
+#include <tqdockwindow.h>
#include "widgetfactory.h"
class DoubleClickButton;
class QButtonGroup;
@@ -31,11 +31,11 @@ class RegExpButtons :public QDockWindow
Q_OBJECT
public:
- RegExpButtons( QWidget *parent, const char *name = 0 );
+ RegExpButtons( TQWidget *parent, const char *name = 0 );
void setFeatures( int features );
protected:
- DoubleClickButton* insert(RegExpType tp, const char* file, QString tooltip, QString whatsthis);
+ DoubleClickButton* insert(RegExpType tp, const char* file, TQString tooltip, TQString whatsthis);
public slots:
void slotSelectNewAction();
@@ -50,13 +50,13 @@ signals:
void doSelect();
private:
- QButtonGroup* _grp;
- QToolButton* _selectBut;
- QToolButton* _wordBoundary;
- QToolButton* _nonWordBoundary;
- QToolButton* _posLookAhead;
- QToolButton* _negLookAhead;
- QSignalMapper* _mapper; // single click Mapper.
+ TQButtonGroup* _grp;
+ TQToolButton* _selectBut;
+ TQToolButton* _wordBoundary;
+ TQToolButton* _nonWordBoundary;
+ TQToolButton* _posLookAhead;
+ TQToolButton* _negLookAhead;
+ TQSignalMapper* _mapper; // single click Mapper.
/**
This variable is true if the use wishes to continue editing in the
diff --git a/kregexpeditor/regexpconverter.cpp b/kregexpeditor/regexpconverter.cpp
index 2d53e20..2678591 100644
--- a/kregexpeditor/regexpconverter.cpp
+++ b/kregexpeditor/regexpconverter.cpp
@@ -27,11 +27,11 @@
#include "positionregexp.h"
#include "repeatregexp.h"
#include "textregexp.h"
-#include <qtextedit.h>
+#include <tqtextedit.h>
#include "regexphighlighter.h"
RegExpConverter* RegExpConverter::_current = 0;
-RegExp* RegExpConverter::parse( const QString&, bool* ok )
+RegExp* RegExpConverter::parse( const TQString&, bool* ok )
{
ok = false;
return new DotRegExp( false ); // This method should never be called.
@@ -39,7 +39,7 @@ RegExp* RegExpConverter::parse( const QString&, bool* ok )
// This function needs to be called toStr rather than toString, as it is not possible to
// over load function across inheritance!
-QString RegExpConverter::toStr( RegExp* regexp, bool markSelection )
+TQString RegExpConverter::toStr( RegExp* regexp, bool markSelection )
{
switch (regexp->type()) {
case RegExp::CONC: return toString( static_cast<ConcRegExp*>( regexp ), markSelection);
@@ -53,13 +53,13 @@ QString RegExpConverter::toStr( RegExp* regexp, bool markSelection )
case RegExp::TEXTRANGE: return toString( static_cast<TextRangeRegExp*>( regexp ), markSelection );
}
qWarning("We shouldn't get here!");
- return QString::fromLatin1( "" );
+ return TQString::fromLatin1( "" );
}
-QString RegExpConverter::escape( QString text, QValueList<QChar> chars, QChar escapeChar) const
+TQString RegExpConverter::escape( TQString text, TQValueList<TQChar> chars, TQChar escapeChar) const
{
- QString res;
+ TQString res;
for (unsigned int i=0; i<text.length(); i++) {
for (unsigned int j=0; j<chars.count(); j++) {
if ( text.at(i) == (chars[j]) ) {
@@ -74,9 +74,9 @@ QString RegExpConverter::escape( QString text, QValueList<QChar> chars, QChar es
}
/**
- Returns a QSyntaxHighlighter to be used in the virifyer widget.
+ Returns a TQSyntaxHighlighter to be used in the virifyer widget.
*/
-RegexpHighlighter* RegExpConverter::highlighter( QTextEdit* )
+RegexpHighlighter* RegExpConverter::highlighter( TQTextEdit* )
{
return 0;
}
diff --git a/kregexpeditor/regexpconverter.h b/kregexpeditor/regexpconverter.h
index ddb1e54..cbb3a59 100644
--- a/kregexpeditor/regexpconverter.h
+++ b/kregexpeditor/regexpconverter.h
@@ -19,8 +19,8 @@
#ifndef REGEXPCONVERTER_H
#define REGEXPCONVERTER_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
class QTextEdit;
class AltnRegExp;
@@ -50,26 +50,26 @@ public:
};
virtual bool canParse() = 0;
- virtual QString name() = 0;
+ virtual TQString name() = 0;
virtual int features() = 0;
- virtual RegExp* parse( const QString&, bool* ok );
- QString toStr( RegExp*, bool markSelection );
- virtual RegexpHighlighter* highlighter( QTextEdit* );
+ virtual RegExp* parse( const TQString&, bool* ok );
+ TQString toStr( RegExp*, bool markSelection );
+ virtual RegexpHighlighter* highlighter( TQTextEdit* );
static void setCurrent( RegExpConverter* );
static RegExpConverter* current();
protected:
- virtual QString toString( AltnRegExp*, bool markSelection ) = 0;
- virtual QString toString( ConcRegExp*, bool markSelection ) = 0;
- virtual QString toString( LookAheadRegExp*, bool markSelection ) = 0;
- virtual QString toString( TextRangeRegExp*, bool markSelection ) = 0;
- virtual QString toString( CompoundRegExp*, bool markSelection ) = 0;
- virtual QString toString( DotRegExp*, bool markSelection ) = 0;
- virtual QString toString( PositionRegExp*, bool markSelection ) = 0;
- virtual QString toString( RepeatRegExp*, bool markSelection ) = 0;
- virtual QString toString( TextRegExp*, bool markSelection ) = 0;
- QString escape( QString text, QValueList<QChar> chars, QChar escapeChar) const;
+ virtual TQString toString( AltnRegExp*, bool markSelection ) = 0;
+ virtual TQString toString( ConcRegExp*, bool markSelection ) = 0;
+ virtual TQString toString( LookAheadRegExp*, bool markSelection ) = 0;
+ virtual TQString toString( TextRangeRegExp*, bool markSelection ) = 0;
+ virtual TQString toString( CompoundRegExp*, bool markSelection ) = 0;
+ virtual TQString toString( DotRegExp*, bool markSelection ) = 0;
+ virtual TQString toString( PositionRegExp*, bool markSelection ) = 0;
+ virtual TQString toString( RepeatRegExp*, bool markSelection ) = 0;
+ virtual TQString toString( TextRegExp*, bool markSelection ) = 0;
+ TQString escape( TQString text, TQValueList<TQChar> chars, TQChar escapeChar) const;
private:
static RegExpConverter* _current;
diff --git a/kregexpeditor/regexphighlighter.cpp b/kregexpeditor/regexphighlighter.cpp
index 3034ee1..6690b68 100644
--- a/kregexpeditor/regexphighlighter.cpp
+++ b/kregexpeditor/regexphighlighter.cpp
@@ -18,12 +18,12 @@
#include "regexphighlighter.h"
-RegexpHighlighter::RegexpHighlighter( QTextEdit* edit )
- :QSyntaxHighlighter( edit ), _caseSensitive( false ), _minimal( false )
+RegexpHighlighter::RegexpHighlighter( TQTextEdit* edit )
+ :TQSyntaxHighlighter( edit ), _caseSensitive( false ), _minimal( false )
{
}
-void RegexpHighlighter::setRegExp( const QString& regexp )
+void RegexpHighlighter::setRegExp( const TQString& regexp )
{
_regexp = regexp;
}
diff --git a/kregexpeditor/regexphighlighter.h b/kregexpeditor/regexphighlighter.h
index 92219b1..9a8003c 100644
--- a/kregexpeditor/regexphighlighter.h
+++ b/kregexpeditor/regexphighlighter.h
@@ -18,18 +18,18 @@
#ifndef REGEXPHIGHLIGHTER_H
#define REGEXPHIGHLIGHTER_H
-#include <qsyntaxhighlighter.h>
+#include <tqsyntaxhighlighter.h>
class RegexpHighlighter :public QSyntaxHighlighter
{
public:
- RegexpHighlighter( QTextEdit* edit );
- void setRegExp( const QString& regexp );
+ RegexpHighlighter( TQTextEdit* edit );
+ void setRegExp( const TQString& regexp );
void setCaseSensitive( bool );
void setMinimal( bool );
protected:
- QString _regexp;
+ TQString _regexp;
bool _caseSensitive, _minimal;
};
diff --git a/kregexpeditor/regexpwidget.cpp b/kregexpeditor/regexpwidget.cpp
index 2ee2aa7..a64b0c4 100644
--- a/kregexpeditor/regexpwidget.cpp
+++ b/kregexpeditor/regexpwidget.cpp
@@ -24,8 +24,8 @@
#include "regexpwidget.h"
#include <iostream>
-#include <qpainter.h>
-#include <qcursor.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
#include "concwidget.h"
#include "dragaccepter.h"
@@ -33,9 +33,9 @@ const int RegExpWidget::pw = 1;
const int RegExpWidget::bdSize = 5;
const int RegExpWidget::space = 5;
-RegExpWidget::RegExpWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+RegExpWidget::RegExpWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name)
- : QWidget(parent, name ? name : "RegExpWidget", WNoMousePropagation ),
+ : TQWidget(parent, name ? name : "RegExpWidget", WNoMousePropagation ),
_editorWindow( editorWindow ), _isSelected( false ), _isToplevel( false )
{
}
@@ -59,7 +59,7 @@ void RegExpWidget::setConcChild(ConcWidget *)
bool RegExpWidget::updateSelection(bool parentSelected)
{
bool selected = ( parentSelected ||
- _editorWindow->selectionOverlap( mapToGlobal( QPoint(0,0) ), size() ) )
+ _editorWindow->selectionOverlap( mapToGlobal( TQPoint(0,0) ), size() ) )
&& !_isToplevel;
if ( _isSelected != selected ) {
@@ -71,10 +71,10 @@ bool RegExpWidget::updateSelection(bool parentSelected)
return false;
}
-void RegExpWidget::drawPossibleSelection( QPainter& painter, QSize mySize )
+void RegExpWidget::drawPossibleSelection( TQPainter& painter, TQSize mySize )
{
if ( _isSelected ) {
- painter.fillRect( 0, 0, mySize.width(), mySize.height(), QBrush( gray ) );
+ painter.fillRect( 0, 0, mySize.width(), mySize.height(), TQBrush( gray ) );
}
}
@@ -114,22 +114,22 @@ int RegExpWidget::edit()
return 0; // Compiler shut up
}
-void RegExpWidget::mousePressEvent ( QMouseEvent* event )
+void RegExpWidget::mousePressEvent ( TQMouseEvent* event )
{
if ( _editorWindow->isPasteing() || _editorWindow->isInserting() )
return;
if ( event->button() == LeftButton ) {
- if ( ! _editorWindow->pointSelected( QCursor::pos() ) ) {
+ if ( ! _editorWindow->pointSelected( TQCursor::pos() ) ) {
_editorWindow->clearSelection( true );
if ( dynamic_cast<DragAccepter*>(this) == 0 && dynamic_cast<ConcWidget*>(this) == 0 ) {
selectWidget( true );
}
}
- QMouseEvent ev( event->type(), mapTo(_editorWindow, event->pos()),
+ TQMouseEvent ev( event->type(), mapTo(_editorWindow, event->pos()),
event->button(), event->state());
- QApplication::sendEvent( _editorWindow, &ev );
+ TQApplication::sendEvent( _editorWindow, &ev );
}
else if ( event->button() == RightButton ) {
_editorWindow->showRMBMenu( true );
@@ -139,10 +139,10 @@ void RegExpWidget::mousePressEvent ( QMouseEvent* event )
// and thus sends the event to the parent - given that the following line is in.
// It doesn't make any change to leave it out.
// 25 Oct. 2001 19:03 -- Jesper K. Pedersen
- // QWidget::mousePressEvent( event );
+ // TQWidget::mousePressEvent( event );
}
-void RegExpWidget::mouseReleaseEvent( QMouseEvent* )
+void RegExpWidget::mouseReleaseEvent( TQMouseEvent* )
{
if ( _editorWindow->isInserting() && acceptWidgetInsert( _editorWindow->insertType() ) ) {
if ( !_editorWindow->hasSelection() )
@@ -156,20 +156,20 @@ void RegExpWidget::mouseReleaseEvent( QMouseEvent* )
}
}
-QRect RegExpWidget::selectionRect() const
+TQRect RegExpWidget::selectionRect() const
{
- return QRect( mapToGlobal( QPoint(0,0) ), size() );
+ return TQRect( mapToGlobal( TQPoint(0,0) ), size() );
}
-void RegExpWidget::enterEvent( QEvent * )
+void RegExpWidget::enterEvent( TQEvent * )
{
updateCursorShape();
}
void RegExpWidget::updateCursorShape()
{
- QCursor cursor;
+ TQCursor cursor;
if ( _editorWindow->isPasteing() ) {
if ( acceptWidgetPaste() )
@@ -205,9 +205,9 @@ bool RegExpWidget::acceptWidgetInsert( RegExpType tp ) const
return WidgetFactory::isContainer( tp );
}
-RegExpWidget* RegExpWidget::widgetUnderPoint( QPoint globalPos, bool )
+RegExpWidget* RegExpWidget::widgetUnderPoint( TQPoint globalPos, bool )
{
- if ( QRect(mapToGlobal( QPoint(0,0) ), size() ).contains( globalPos ) )
+ if ( TQRect(mapToGlobal( TQPoint(0,0) ), size() ).contains( globalPos ) )
return this;
else
return 0;
diff --git a/kregexpeditor/regexpwidget.h b/kregexpeditor/regexpwidget.h
index e0c038d..b6e44cd 100644
--- a/kregexpeditor/regexpwidget.h
+++ b/kregexpeditor/regexpwidget.h
@@ -34,7 +34,7 @@ class RegExpWidget :public QWidget
Q_OBJECT
public:
- RegExpWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+ RegExpWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *label = 0);
/*======================================================================
@@ -123,7 +123,7 @@ public:
/**
Returns the rectangle which makes up the selection.
*/
- virtual QRect selectionRect() const;
+ virtual TQRect selectionRect() const;
/** Selects the RegExp widget and all its chidlren*/
virtual void selectWidget( bool sel );
@@ -155,13 +155,13 @@ public:
Returns the regexp widget under point. If `justVisibleWidgets' is
true, @ref ConcWidget is ignored. That is, a ConcWidget will not be returned.
*/
- virtual RegExpWidget* widgetUnderPoint( QPoint globalPos, bool justVisibleWidgets );
+ virtual RegExpWidget* widgetUnderPoint( TQPoint globalPos, bool justVisibleWidgets );
/**
Returns the widget under point which can be edited. That is the
"innermost" widget editable.
*/
- virtual RegExpWidget* findWidgetToEdit( QPoint /* globalPos */) { return 0; }
+ virtual RegExpWidget* findWidgetToEdit( TQPoint /* globalPos */) { return 0; }
/**
Edits the current widget. That is, bring up the dialog, which is
@@ -172,7 +172,7 @@ public:
protected:
/** Draws a selection rectangle for the current widget. */
- virtual void drawPossibleSelection( QPainter& painter, QSize mySize);
+ virtual void drawPossibleSelection( TQPainter& painter, TQSize mySize);
/** Returns true if the widget accepts paste actions. */
virtual bool acceptWidgetPaste() const;
@@ -182,10 +182,10 @@ protected:
*/
virtual bool acceptWidgetInsert( RegExpType ) const;
- virtual void mousePressEvent ( QMouseEvent* event );
+ virtual void mousePressEvent ( TQMouseEvent* event );
- virtual void mouseReleaseEvent( QMouseEvent* );
- virtual void enterEvent( QEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent* );
+ virtual void enterEvent( TQEvent * );
RegExpEditorWindow* _editorWindow;
diff --git a/kregexpeditor/repeatregexp.cpp b/kregexpeditor/repeatregexp.cpp
index d58736c..e037016 100644
--- a/kregexpeditor/repeatregexp.cpp
+++ b/kregexpeditor/repeatregexp.cpp
@@ -39,26 +39,26 @@ bool RepeatRegExp::check( ErrorMap& map, bool first, bool last )
return ( _lower == 0 );
}
-QDomNode RepeatRegExp::toXml( QDomDocument* doc ) const
+TQDomNode RepeatRegExp::toXml( TQDomDocument* doc ) const
{
- QDomElement top = doc->createElement( QString::fromLocal8Bit("Repeat") );
- top.setAttribute( QString::fromLocal8Bit("lower"), _lower );
- top.setAttribute( QString::fromLocal8Bit("upper"), _upper );
+ TQDomElement top = doc->createElement( TQString::fromLocal8Bit("Repeat") );
+ top.setAttribute( TQString::fromLocal8Bit("lower"), _lower );
+ top.setAttribute( TQString::fromLocal8Bit("upper"), _upper );
top.appendChild( _child->toXml( doc ) );
return top;
}
-bool RepeatRegExp::load( QDomElement top, const QString& version )
+bool RepeatRegExp::load( TQDomElement top, const TQString& version )
{
- Q_ASSERT( top.tagName() == QString::fromLocal8Bit( "Repeat" ) );
- QString lower = top.attribute( QString::fromLocal8Bit("lower"), QString::fromLocal8Bit("0") );
- QString upper = top.attribute( QString::fromLocal8Bit("upper"), QString::fromLocal8Bit("0") );
+ Q_ASSERT( top.tagName() == TQString::fromLocal8Bit( "Repeat" ) );
+ TQString lower = top.attribute( TQString::fromLocal8Bit("lower"), TQString::fromLocal8Bit("0") );
+ TQString upper = top.attribute( TQString::fromLocal8Bit("upper"), TQString::fromLocal8Bit("0") );
bool ok;
_lower = lower.toInt( &ok );
if ( !ok ) {
KMessageBox::sorry( 0, i18n("<p>Value for attribute <b>%1</b> was not an integer for element "
"<b>%2</b></p><p>It contained the value <b>%3</b></p>")
- .arg(QString::fromLatin1("lower")).arg(QString::fromLatin1("Repeat")).arg(lower),
+ .arg(TQString::fromLatin1("lower")).arg(TQString::fromLatin1("Repeat")).arg(lower),
i18n("Error While Loading From XML File") ) ;
_lower = 0;
}
@@ -66,7 +66,7 @@ bool RepeatRegExp::load( QDomElement top, const QString& version )
if ( !ok ) {
KMessageBox::sorry( 0, i18n("<p>Value for attribute <b>%1</b> was not an integer for element "
"<b>%2</b></p><p>It contained the value <b>%3</b></p>")
- .arg(QString::fromLatin1("upper")).arg(QString::fromLatin1("Repeat")).arg(upper),
+ .arg(TQString::fromLatin1("upper")).arg(TQString::fromLatin1("Repeat")).arg(upper),
i18n("Error While Loading From XML File") ) ;
_upper = -1;
}
diff --git a/kregexpeditor/repeatregexp.h b/kregexpeditor/repeatregexp.h
index 21e32cd..e6fd8c8 100644
--- a/kregexpeditor/repeatregexp.h
+++ b/kregexpeditor/repeatregexp.h
@@ -31,8 +31,8 @@ public:
virtual bool check( ErrorMap&, bool first, bool last );
virtual int precedence() const { return 3;}
- virtual QDomNode toXml( QDomDocument* doc ) const;
- virtual bool load( QDomElement, const QString& version );
+ virtual TQDomNode toXml( TQDomDocument* doc ) const;
+ virtual bool load( TQDomElement, const TQString& version );
int min() const { return _lower; }
int max() const { return _upper; }
RegExp* child() const { return _child; }
diff --git a/kregexpeditor/repeatwidget.cpp b/kregexpeditor/repeatwidget.cpp
index 27215e4..80fa2ab 100644
--- a/kregexpeditor/repeatwidget.cpp
+++ b/kregexpeditor/repeatwidget.cpp
@@ -26,16 +26,16 @@
#include "repeatwidget.h"
#include "concwidget.h"
#include "repeatregexp.h"
-#include <qpainter.h>
-#include <qcursor.h>
-#include <qspinbox.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
-#include <qgrid.h>
-#include <qvbuttongroup.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
+#include <tqspinbox.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
+#include <tqgrid.h>
+#include <tqvbuttongroup.h>
#include "kwidgetstreamer.h"
-RepeatWidget::RepeatWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+RepeatWidget::RepeatWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name)
: SingleContainerWidget(editorWindow, parent, name ? name : "RepeatWidget")
{
@@ -44,7 +44,7 @@ RepeatWidget::RepeatWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
}
RepeatWidget::RepeatWidget( RepeatRegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name )
+ TQWidget* parent, const char* name )
:SingleContainerWidget( editorWindow, parent, name )
{
init();
@@ -80,36 +80,36 @@ void RepeatWidget::init()
KDialogBase::Ok | KDialogBase::Cancel);
_content = new RepeatRangeWindow( _configWindow );
_configWindow->setMainWidget( _content );
- connect( _configWindow, SIGNAL( cancelClicked() ), this, SLOT( slotConfigCanceled() ) );
- connect(_configWindow, SIGNAL(finished()), this, SLOT(slotConfigWindowClosed()));
+ connect( _configWindow, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( slotConfigCanceled() ) );
+ connect(_configWindow, TQT_SIGNAL(finished()), this, TQT_SLOT(slotConfigWindowClosed()));
}
-QSize RepeatWidget::sizeHint() const
+TQSize RepeatWidget::sizeHint() const
{
// TODO: Merge with LookAheadWidget::sizeHint
- QFontMetrics metrics = fontMetrics();
+ TQFontMetrics metrics = fontMetrics();
_textSize = metrics.size( 0, _content->text() );
_childSize = _child->sizeHint();
int height = _textSize.height() + bdSize + _childSize.height() + bdSize + 2*pw;
int width = 2 * pw + QMAX(_childSize.width(), 4*bdSize + _textSize.width());
- return QSize(width,height);
+ return TQSize(width,height);
}
-void RepeatWidget::paintEvent( QPaintEvent *e )
+void RepeatWidget::paintEvent( TQPaintEvent *e )
{
// TODO: Merge with LookAheadWidget::paintEvent
- QSize mySize = sizeHint();
- QPainter painter(this);
+ TQSize mySize = sizeHint();
+ TQPainter painter(this);
drawPossibleSelection( painter, mySize );
// move the child to its position and resize it.
_child->move(pw,_textSize.height()+bdSize);
- QSize curChildSize = _child->size();
- QSize newChildSize = QSize(mySize.width() - 2*pw, _childSize.height());
+ TQSize curChildSize = _child->size();
+ TQSize newChildSize = TQSize(mySize.width() - 2*pw, _childSize.height());
if ( curChildSize != newChildSize ) {
_child->resize(newChildSize);
// I resized the child, so give it a chance to relect thus.
@@ -149,7 +149,7 @@ void RepeatWidget::slotConfigWindowClosed()
void RepeatWidget::slotConfigCanceled()
{
- QDataStream stream( _backup, IO_ReadOnly );
+ TQDataStream stream( _backup, IO_ReadOnly );
KWidgetStreamer streamer;
streamer.fromStream( stream, _content );
repaint();
@@ -157,9 +157,9 @@ void RepeatWidget::slotConfigCanceled()
int RepeatWidget::edit()
{
- _configWindow->move(QCursor::pos() - QPoint(_configWindow->sizeHint().width()/2,
+ _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->sizeHint().width()/2,
_configWindow->sizeHint().height()/2) );
- QDataStream stream( _backup, IO_WriteOnly );
+ TQDataStream stream( _backup, IO_WriteOnly );
KWidgetStreamer streamer;
streamer.toStream( _content, stream );
@@ -167,23 +167,23 @@ int RepeatWidget::edit()
}
//--------------------------------------------------------------------------------
-RepeatRangeWindow::RepeatRangeWindow( QWidget* parent, const char* name )
- : QVBox( parent, name ? name : "RepeatRangeWindow" )
+RepeatRangeWindow::RepeatRangeWindow( TQWidget* parent, const char* name )
+ : TQVBox( parent, name ? name : "RepeatRangeWindow" )
{
setSpacing( 6 );
- _group = new QVButtonGroup( i18n("Times to Match"), this, "groupbox" );
+ _group = new TQVButtonGroup( i18n("Times to Match"), this, "groupbox" );
// Any number of times
- QRadioButton* radioBut = new QRadioButton(i18n("Any number of times (including zero times)"),
+ TQRadioButton* radioBut = new TQRadioButton(i18n("Any number of times (including zero times)"),
_group,
"RepeatRangeWindow::choice any times");
_group->insert(radioBut, ANY);
- QWidget* container = new QWidget( _group );
- QHBoxLayout* lay = new QHBoxLayout( container );
- QGrid* grid = new QGrid( 3, container );
+ TQWidget* container = new TQWidget( _group );
+ TQHBoxLayout* lay = new TQHBoxLayout( container );
+ TQGrid* grid = new TQGrid( 3, container );
grid->setSpacing( 5 );
lay->addWidget( grid );
@@ -194,38 +194,38 @@ RepeatRangeWindow::RepeatRangeWindow( QWidget* parent, const char* name )
createLine( grid, i18n( "Exactly" ), &_exactlyTimes, EXACTLY );
// from ___ to ___ times
- radioBut = new QRadioButton(i18n( "From" ), grid, "RepeatRangeWindow::from");
+ radioBut = new TQRadioButton(i18n( "From" ), grid, "RepeatRangeWindow::from");
_group->insert( radioBut, MINMAX );
- _rangeFrom = new QSpinBox( 1, 999, 1, grid);
+ _rangeFrom = new TQSpinBox( 1, 999, 1, grid);
- QHBox* box = new QHBox( grid );
+ TQHBox* box = new TQHBox( grid );
box->setSpacing( 5 );
- (void) new QLabel(i18n( "to" ), box);
- _rangeTo = new QSpinBox( 1, 999, 1, box );
- (void) new QLabel( i18n( "time(s)" ), box );
+ (void) new TQLabel(i18n( "to" ), box);
+ _rangeTo = new TQSpinBox( 1, 999, 1, box );
+ (void) new TQLabel( i18n( "time(s)" ), box );
- connect( _rangeFrom, SIGNAL( valueChanged( int ) ), this, SLOT( slotUpdateMaxVal( int ) ) );
- connect( _rangeTo, SIGNAL( valueChanged( int ) ), this, SLOT( slotUpdateMinVal( int ) ) );
+ connect( _rangeFrom, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotUpdateMaxVal( int ) ) );
+ connect( _rangeTo, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotUpdateMinVal( int ) ) );
// set a default button.
_group->setButton(ANY);
slotItemChange( ANY );
- connect( _group, SIGNAL( clicked( int ) ), this, SLOT( slotItemChange( int ) ) );
+ connect( _group, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotItemChange( int ) ) );
}
-void RepeatRangeWindow::createLine( QWidget* parent, QString text, QSpinBox** spin, REPEATTYPE tp )
+void RepeatRangeWindow::createLine( TQWidget* parent, TQString text, TQSpinBox** spin, REPEATTYPE tp )
{
- QRadioButton* radioBut = new QRadioButton(text, parent);
- *spin = new QSpinBox( 1, 999, 1, parent);
+ TQRadioButton* radioBut = new TQRadioButton(text, parent);
+ *spin = new TQSpinBox( 1, 999, 1, parent);
(*spin)->setValue(1);
- (void) new QLabel(i18n("time(s)"), parent);
+ (void) new TQLabel(i18n("time(s)"), parent);
_group->insert(radioBut, tp);
}
@@ -263,7 +263,7 @@ void RepeatRangeWindow::slotUpdateMaxVal( int minVal )
}
}
-QString RepeatRangeWindow::text()
+TQString RepeatRangeWindow::text()
{
switch ( _group->id(_group->selected()) ) {
case ANY: return i18n("Repeated Any Number of Times");
@@ -274,7 +274,7 @@ QString RepeatRangeWindow::text()
.arg( _rangeFrom->value() ).arg( _rangeTo->value() );
}
qFatal("Fall through!");
- return QString::fromLocal8Bit("");
+ return TQString::fromLocal8Bit("");
}
int RepeatRangeWindow::min()
diff --git a/kregexpeditor/repeatwidget.h b/kregexpeditor/repeatwidget.h
index 434b4cb..747ba30 100644
--- a/kregexpeditor/repeatwidget.h
+++ b/kregexpeditor/repeatwidget.h
@@ -19,7 +19,7 @@
#define __repeatwidget
#include "singlecontainerwidget.h"
-#include <qvbox.h>
+#include <tqvbox.h>
class QButtonGroup;
class KDialogBase;
class QCheckBox;
@@ -37,8 +37,8 @@ Q_OBJECT
public:
enum REPEATTYPE {ANY, ATLEAST, ATMOST, EXACTLY, MINMAX};
- RepeatRangeWindow( QWidget* parent, const char* name = 0 );
- QString text();
+ RepeatRangeWindow( TQWidget* parent, const char* name = 0 );
+ TQString text();
int min();
int max();
void set( REPEATTYPE tp, int min, int max );
@@ -50,14 +50,14 @@ protected slots:
private:
- void createLine( QWidget* parent, QString text, QSpinBox** spin, REPEATTYPE tp );
-
- QSpinBox* _leastTimes;
- QSpinBox* _mostTimes;
- QSpinBox* _exactlyTimes;
- QSpinBox* _rangeFrom;
- QSpinBox* _rangeTo;
- QButtonGroup* _group;
+ void createLine( TQWidget* parent, TQString text, TQSpinBox** spin, REPEATTYPE tp );
+
+ TQSpinBox* _leastTimes;
+ TQSpinBox* _mostTimes;
+ TQSpinBox* _exactlyTimes;
+ TQSpinBox* _rangeFrom;
+ TQSpinBox* _rangeTo;
+ TQButtonGroup* _group;
};
@@ -73,18 +73,18 @@ class RepeatWidget :public SingleContainerWidget
Q_OBJECT
public:
- RepeatWidget( RegExpEditorWindow* editorWindow, QWidget *parent,
+ RepeatWidget( RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name = 0);
RepeatWidget( RepeatRegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name = 0);
+ TQWidget* parent, const char* name = 0);
void init();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
virtual RegExp* regExp() const;
virtual RegExpType type() const { return REPEAT; }
virtual int edit();
protected:
- virtual void paintEvent( QPaintEvent *e );
+ virtual void paintEvent( TQPaintEvent *e );
protected slots:
void slotConfigCanceled();
@@ -94,9 +94,9 @@ private:
KDialogBase* _configWindow;
RepeatRangeWindow* _content;
- mutable QSize _textSize;
- mutable QSize _childSize;
- QByteArray _backup;
+ mutable TQSize _textSize;
+ mutable TQSize _childSize;
+ TQByteArray _backup;
};
diff --git a/kregexpeditor/scrollededitorwindow.cpp b/kregexpeditor/scrollededitorwindow.cpp
index 8518db9..eddd293 100644
--- a/kregexpeditor/scrollededitorwindow.cpp
+++ b/kregexpeditor/scrollededitorwindow.cpp
@@ -22,35 +22,35 @@
#include "scrollededitorwindow.h"
#include "editorwindow.h"
-RegExpScrolledEditorWindow::RegExpScrolledEditorWindow( QWidget* parent, const char* name)
- : QWidget(parent, name)
+RegExpScrolledEditorWindow::RegExpScrolledEditorWindow( TQWidget* parent, const char* name)
+ : TQWidget(parent, name)
{
- _scrollView = new QScrollView( this );
+ _scrollView = new TQScrollView( this );
_editorWindow = new RegExpEditorWindow( _scrollView->viewport());
_scrollView->addChild( _editorWindow );
- _scrollView->setResizePolicy( QScrollView::Manual );
+ _scrollView->setResizePolicy( TQScrollView::Manual );
- connect( _editorWindow, SIGNAL( contentChanged( QPoint ) ),
- this, SLOT( slotUpdateContentSize( QPoint ) ) );
+ connect( _editorWindow, TQT_SIGNAL( contentChanged( TQPoint ) ),
+ this, TQT_SLOT( slotUpdateContentSize( TQPoint ) ) );
- connect( _editorWindow, SIGNAL( scrolling( QPoint ) ),
- this, SLOT( slotScroll( QPoint ) ) );
+ connect( _editorWindow, TQT_SIGNAL( scrolling( TQPoint ) ),
+ this, TQT_SLOT( slotScroll( TQPoint ) ) );
- connect( _editorWindow, SIGNAL( doneEditing() ), this, SIGNAL( doneEditing() ) );
+ connect( _editorWindow, TQT_SIGNAL( doneEditing() ), this, TQT_SIGNAL( doneEditing() ) );
- connect( _editorWindow, SIGNAL( change() ), this, SIGNAL( change() ) );
- connect( _editorWindow, SIGNAL( savedRegexp() ), this, SIGNAL( savedRegexp() ) );
+ connect( _editorWindow, TQT_SIGNAL( change() ), this, TQT_SIGNAL( change() ) );
+ connect( _editorWindow, TQT_SIGNAL( savedRegexp() ), this, TQT_SIGNAL( savedRegexp() ) );
- connect( _editorWindow, SIGNAL( anythingSelected(bool) ), this, SIGNAL( anythingSelected(bool) ) );
- connect( _editorWindow, SIGNAL( anythingOnClipboard(bool) ), this, SIGNAL( anythingOnClipboard(bool) ) );
- connect( _editorWindow, SIGNAL( canSave(bool) ), this, SIGNAL( canSave(bool) ) );
- connect( _editorWindow, SIGNAL( verifyRegExp() ), this, SIGNAL( verifyRegExp() ) );
+ connect( _editorWindow, TQT_SIGNAL( anythingSelected(bool) ), this, TQT_SIGNAL( anythingSelected(bool) ) );
+ connect( _editorWindow, TQT_SIGNAL( anythingOnClipboard(bool) ), this, TQT_SIGNAL( anythingOnClipboard(bool) ) );
+ connect( _editorWindow, TQT_SIGNAL( canSave(bool) ), this, TQT_SIGNAL( canSave(bool) ) );
+ connect( _editorWindow, TQT_SIGNAL( verifyRegExp() ), this, TQT_SIGNAL( verifyRegExp() ) );
}
void RegExpScrolledEditorWindow::slotSetRegExp( RegExp* regexp )
{
_editorWindow->slotSetRegExp( regexp );
- slotUpdateContentSize(QPoint());
+ slotUpdateContentSize(TQPoint());
}
void RegExpScrolledEditorWindow::slotInsertRegExp( int tp)
@@ -98,16 +98,16 @@ RegExp* RegExpScrolledEditorWindow::regExp()
return _editorWindow->regExp();
}
-void RegExpScrolledEditorWindow::resizeEvent( QResizeEvent *event )
+void RegExpScrolledEditorWindow::resizeEvent( TQResizeEvent *event )
{
_scrollView->resize( event->size() );
- slotUpdateContentSize(QPoint());
+ slotUpdateContentSize(TQPoint());
}
-void RegExpScrolledEditorWindow::slotUpdateContentSize( QPoint focusPoint )
+void RegExpScrolledEditorWindow::slotUpdateContentSize( TQPoint focusPoint )
{
- QSize childSize = _editorWindow->sizeHint();
- QSize vpSize = _scrollView->viewportSize(10,10);
+ TQSize childSize = _editorWindow->sizeHint();
+ TQSize vpSize = _scrollView->viewportSize(10,10);
bool change = false;
@@ -136,8 +136,8 @@ void RegExpScrolledEditorWindow::slotUpdateContentSize( QPoint focusPoint )
// TODO: add timers, which will make the widget scroll when mouse is located
-// outside the QScrollView.
-void RegExpScrolledEditorWindow::slotScroll( QPoint focusPoint )
+// outside the TQScrollView.
+void RegExpScrolledEditorWindow::slotScroll( TQPoint focusPoint )
{
_scrollView->ensureVisible( focusPoint.x(), focusPoint.y() );
}
diff --git a/kregexpeditor/scrollededitorwindow.h b/kregexpeditor/scrollededitorwindow.h
index 725b224..a89a588 100644
--- a/kregexpeditor/scrollededitorwindow.h
+++ b/kregexpeditor/scrollededitorwindow.h
@@ -18,7 +18,7 @@
#ifndef __scrolledEditorWindow
#define __scrolledEditorWindow
-#include <qhbox.h>
+#include <tqhbox.h>
class QScrollView;
class RegExpEditorWindow;
class RegExp;
@@ -31,7 +31,7 @@ class RegExpScrolledEditorWindow :public QWidget
{
Q_OBJECT
public:
- RegExpScrolledEditorWindow( QWidget *parent = 0, const char* name = 0);
+ RegExpScrolledEditorWindow( TQWidget *parent = 0, const char* name = 0);
RegExp* regExp();
private:
@@ -39,7 +39,7 @@ private:
protected:
- virtual void resizeEvent( QResizeEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
public slots:
void slotSetRegExp( RegExp* );
@@ -53,8 +53,8 @@ public slots:
void slotPaste();
protected slots:
- void slotUpdateContentSize( QPoint focusPoint );
- void slotScroll( QPoint focusPoint );
+ void slotUpdateContentSize( TQPoint focusPoint );
+ void slotScroll( TQPoint focusPoint );
signals:
/**
@@ -86,7 +86,7 @@ protected slots:
private:
RegExpEditorWindow* _editorWindow;
- QScrollView* _scrollView;
+ TQScrollView* _scrollView;
};
#endif // __scrolledEditorWindow
diff --git a/kregexpeditor/selectablelineedit.cpp b/kregexpeditor/selectablelineedit.cpp
index 98aff72..3620fc3 100644
--- a/kregexpeditor/selectablelineedit.cpp
+++ b/kregexpeditor/selectablelineedit.cpp
@@ -22,19 +22,19 @@
#include "selectablelineedit.h"
-SelectableLineEdit::SelectableLineEdit( RegExpWidget* owner, QWidget* parent, const char* name)
- : QLineEdit( parent, name ), _owner(owner)
+SelectableLineEdit::SelectableLineEdit( RegExpWidget* owner, TQWidget* parent, const char* name)
+ : TQLineEdit( parent, name ), _owner(owner)
{
- connect( this, SIGNAL( textChanged( const QString & ) ), this,
- SLOT( slotKeyPressed() ) );
+ connect( this, TQT_SIGNAL( textChanged( const TQString & ) ), this,
+ TQT_SLOT( slotKeyPressed() ) );
setAcceptDrops( false );
}
void SelectableLineEdit::setSelected( bool selected )
{
if ( selected ) {
- QPalette pal = palette().copy();
- pal.setBrush( QColorGroup::Base, gray );
+ TQPalette pal = palette().copy();
+ pal.setBrush( TQColorGroup::Base, gray );
setPalette( pal );
}
else {
@@ -43,27 +43,27 @@ void SelectableLineEdit::setSelected( bool selected )
repaint();
}
-QSize SelectableLineEdit::sizeHint() const
+TQSize SelectableLineEdit::sizeHint() const
{
- int frameWidth = frame() ? 8 : 4; // from QLineEdit source
- QFontMetrics metrics = fontMetrics();
+ int frameWidth = frame() ? 8 : 4; // from TQLineEdit source
+ TQFontMetrics metrics = fontMetrics();
int actualSize = metrics.width( text() );
int charWidth = metrics.maxWidth();
- int height = QLineEdit::sizeHint().height();
+ int height = TQLineEdit::sizeHint().height();
int width;
if ( hasFocus() )
width = actualSize+6*charWidth + frameWidth;
else
width = QMAX(actualSize, charWidth) + frameWidth;
- return QSize( width , height );
+ return TQSize( width , height );
}
void SelectableLineEdit::slotKeyPressed()
{
- int frameWidth = frame() ? 8 : 4; // from QLineEdit source
+ int frameWidth = frame() ? 8 : 4; // from TQLineEdit source
- QFontMetrics metrics = fontMetrics();
+ TQFontMetrics metrics = fontMetrics();
int actualSize = metrics.width( text() );
if ( actualSize > size().width()-frameWidth ) {
diff --git a/kregexpeditor/selectablelineedit.h b/kregexpeditor/selectablelineedit.h
index 653d85c..dfe356a 100644
--- a/kregexpeditor/selectablelineedit.h
+++ b/kregexpeditor/selectablelineedit.h
@@ -17,11 +17,11 @@
**/
#ifndef __selectablelineedit
#define __selectablelineedit
-#include <qlineedit.h>
+#include <tqlineedit.h>
class RegExpWidget;
/**
- A specialized QLineEdit for use in @ref TextWidget.
+ A specialized TQLineEdit for use in @ref TextWidget.
This widget has two main features:
@li when the @ref TextWidget which contains it is selected, then the
@@ -36,9 +36,9 @@ class SelectableLineEdit :public QLineEdit
Q_OBJECT
public:
- SelectableLineEdit( RegExpWidget* owner, QWidget* parent = 0, const char* name = 0);
+ SelectableLineEdit( RegExpWidget* owner, TQWidget* parent = 0, const char* name = 0);
void setSelected( bool selected );
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
protected slots:
void slotKeyPressed();
diff --git a/kregexpeditor/singlecontainerwidget.cpp b/kregexpeditor/singlecontainerwidget.cpp
index 4782dd9..68b5612 100644
--- a/kregexpeditor/singlecontainerwidget.cpp
+++ b/kregexpeditor/singlecontainerwidget.cpp
@@ -23,7 +23,7 @@
#include "concwidget.h"
SingleContainerWidget::SingleContainerWidget(RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name)
+ TQWidget* parent, const char* name)
: RegExpWidget( editorWindow, parent, name )
{
}
@@ -73,15 +73,15 @@ bool SingleContainerWidget::validateSelection() const
return _child->validateSelection();
}
-QRect SingleContainerWidget::selectionRect() const
+TQRect SingleContainerWidget::selectionRect() const
{
if ( _isSelected )
- return QRect( mapToGlobal( QPoint(0,0) ), size() );
+ return TQRect( mapToGlobal( TQPoint(0,0) ), size() );
else
return _child->selectionRect();
}
-RegExpWidget* SingleContainerWidget::widgetUnderPoint( QPoint globalPos, bool justVisibleWidgets )
+RegExpWidget* SingleContainerWidget::widgetUnderPoint( TQPoint globalPos, bool justVisibleWidgets )
{
RegExpWidget* wid = _child->widgetUnderPoint( globalPos, justVisibleWidgets );
if ( wid )
@@ -93,12 +93,12 @@ RegExpWidget* SingleContainerWidget::widgetUnderPoint( QPoint globalPos, bool ju
}
}
-RegExpWidget* SingleContainerWidget::findWidgetToEdit( QPoint globalPos )
+RegExpWidget* SingleContainerWidget::findWidgetToEdit( TQPoint globalPos )
{
RegExpWidget* wid = _child->findWidgetToEdit( globalPos );
if ( wid )
return wid;
- else if ( QRect(mapToGlobal(QPoint(0,0)), size()).contains( globalPos ) )
+ else if ( TQRect(mapToGlobal(TQPoint(0,0)), size()).contains( globalPos ) )
return this;
else
return 0;
diff --git a/kregexpeditor/singlecontainerwidget.h b/kregexpeditor/singlecontainerwidget.h
index 8f07e6a..7578ce4 100644
--- a/kregexpeditor/singlecontainerwidget.h
+++ b/kregexpeditor/singlecontainerwidget.h
@@ -27,7 +27,7 @@ class SingleContainerWidget :public RegExpWidget
Q_OBJECT
public:
- SingleContainerWidget( RegExpEditorWindow* editorWindow, QWidget* parent,
+ SingleContainerWidget( RegExpEditorWindow* editorWindow, TQWidget* parent,
const char* name = 0);
virtual bool updateSelection( bool parentSelected );
@@ -37,9 +37,9 @@ public:
virtual void applyRegExpToSelection( RegExpType type );
virtual RegExp* selection() const;
virtual bool validateSelection() const;
- virtual QRect selectionRect() const;
- virtual RegExpWidget* widgetUnderPoint( QPoint globalPos, bool justVisibleWidgets );
- virtual RegExpWidget* findWidgetToEdit( QPoint globalPos );
+ virtual TQRect selectionRect() const;
+ virtual RegExpWidget* widgetUnderPoint( TQPoint globalPos, bool justVisibleWidgets );
+ virtual RegExpWidget* findWidgetToEdit( TQPoint globalPos );
virtual void setConcChild( ConcWidget* child );
virtual void selectWidget( bool sel );
virtual void updateAll();
diff --git a/kregexpeditor/test-without-dl/main.cpp b/kregexpeditor/test-without-dl/main.cpp
index 54610ac..a66355f 100644
--- a/kregexpeditor/test-without-dl/main.cpp
+++ b/kregexpeditor/test-without-dl/main.cpp
@@ -17,20 +17,20 @@
**/
#include <kapplication.h>
#include <kcmdlineargs.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "../kregexpeditorgui.h"
class ShootABug :public QObject
{
public:
- virtual bool eventFilter( QObject* recv, QEvent* event )
+ virtual bool eventFilter( TQObject* recv, TQEvent* event )
{
- if ( event->type() == QEvent::MouseButtonPress &&
- dynamic_cast<QMouseEvent*>(event)->state() == Qt::ControlButton ) {
+ if ( event->type() == TQEvent::MouseButtonPress &&
+ dynamic_cast<TQMouseEvent*>(event)->state() == Qt::ControlButton ) {
// Ctrl + left mouse click.
qDebug("----------------------------------------------------");
- qDebug((QString("Widget name : ") + QString( recv->name() )).latin1() );
- qDebug((QString("Widget class: ") + QString( recv->className() )).latin1() );
+ qDebug((TQString("Widget name : ") + TQString( recv->name() )).latin1() );
+ qDebug((TQString("Widget class: ") + TQString( recv->className() )).latin1() );
qDebug("\nObject info:");
recv->dumpObjectInfo();
qDebug("\nObject tree:");
@@ -49,16 +49,16 @@ int main( int argc, char* argv[] )
qApp->installEventFilter( new ShootABug() );
- KRegExpEditorGUIDialog* iface = new KRegExpEditorGUIDialog( 0, "_editor", QStringList() );
- iface->setRegExp( QString::fromLatin1( "#include" ) );
+ KRegExpEditorGUIDialog* iface = new KRegExpEditorGUIDialog( 0, "_editor", TQStringList() );
+ iface->setRegExp( TQString::fromLatin1( "#include" ) );
iface->doSomething( "setMinimal", (void*) false );
- iface->doSomething( "setSyntax", (void*) new QString( QString::fromLatin1( "Emacs" ) ) );
+ iface->doSomething( "setSyntax", (void*) new TQString( TQString::fromLatin1( "Emacs" ) ) );
iface->doSomething( "setShowSyntaxCombo", (bool*) true );
- QFile file("/packages/kde-src/kdeutils/kregexpeditor/test/main.cpp");
+ TQFile file("/packages/kde-src/kdeutils/kregexpeditor/test/main.cpp");
file.open(IO_ReadOnly);
- QTextStream stream( &file);
- QString txt = stream.read();
+ TQTextStream stream( &file);
+ TQString txt = stream.read();
iface->setMatchText( txt );
iface->exec();
diff --git a/kregexpeditor/textrangeregexp.cpp b/kregexpeditor/textrangeregexp.cpp
index 73c2923..0f80964 100644
--- a/kregexpeditor/textrangeregexp.cpp
+++ b/kregexpeditor/textrangeregexp.cpp
@@ -35,12 +35,12 @@ TextRangeRegExp::~TextRangeRegExp()
}
-void TextRangeRegExp::addCharacter( QString str )
+void TextRangeRegExp::addCharacter( TQString str )
{
_chars.append( str );
}
-void TextRangeRegExp::addRange(QString from, QString to)
+void TextRangeRegExp::addRange(TQString from, TQString to)
{
_ranges.append( new StringPair( from, to ) );
}
@@ -50,80 +50,80 @@ bool TextRangeRegExp::check( ErrorMap&, bool, bool )
return false;
}
-QDomNode TextRangeRegExp::toXml( QDomDocument* doc ) const
+TQDomNode TextRangeRegExp::toXml( TQDomDocument* doc ) const
{
- QDomElement top = doc->createElement( QString::fromLocal8Bit( "TextRange" ) );
+ TQDomElement top = doc->createElement( TQString::fromLocal8Bit( "TextRange" ) );
if ( _negate )
- top.setAttribute( QString::fromLocal8Bit("negate"), true );
+ top.setAttribute( TQString::fromLocal8Bit("negate"), true );
if ( _digit )
- top.setAttribute( QString::fromLocal8Bit("digit"), true );
+ top.setAttribute( TQString::fromLocal8Bit("digit"), true );
if ( _nonDigit )
- top.setAttribute( QString::fromLocal8Bit("nonDigit"), true );
+ top.setAttribute( TQString::fromLocal8Bit("nonDigit"), true );
if ( _space )
- top.setAttribute( QString::fromLocal8Bit("space"), true );
+ top.setAttribute( TQString::fromLocal8Bit("space"), true );
if ( _nonSpace )
- top.setAttribute( QString::fromLocal8Bit("nonSpace"), true );
+ top.setAttribute( TQString::fromLocal8Bit("nonSpace"), true );
if ( _wordChar )
- top.setAttribute( QString::fromLocal8Bit("wordChar"), true );
+ top.setAttribute( TQString::fromLocal8Bit("wordChar"), true );
if ( _nonWordChar )
- top.setAttribute( QString::fromLocal8Bit("nonWordChar"), true );
+ top.setAttribute( TQString::fromLocal8Bit("nonWordChar"), true );
- for ( QStringList::ConstIterator it = _chars.begin(); it != _chars.end(); ++it ) {
- QDomElement elm = doc->createElement( QString::fromLocal8Bit( "Character" ) );
- elm.setAttribute( QString::fromLocal8Bit( "char" ), *it );
+ for ( TQStringList::ConstIterator it = _chars.begin(); it != _chars.end(); ++it ) {
+ TQDomElement elm = doc->createElement( TQString::fromLocal8Bit( "Character" ) );
+ elm.setAttribute( TQString::fromLocal8Bit( "char" ), *it );
top.appendChild( elm );
}
- for ( QPtrListIterator<StringPair> it2(_ranges); *it2; ++it2 ) {
- QDomElement elm = doc->createElement( QString::fromLocal8Bit( "Range" ) );
- elm.setAttribute( QString::fromLocal8Bit( "from" ), (*it2)->first() );
- elm.setAttribute( QString::fromLocal8Bit( "to" ), (*it2)->second() );
+ for ( TQPtrListIterator<StringPair> it2(_ranges); *it2; ++it2 ) {
+ TQDomElement elm = doc->createElement( TQString::fromLocal8Bit( "Range" ) );
+ elm.setAttribute( TQString::fromLocal8Bit( "from" ), (*it2)->first() );
+ elm.setAttribute( TQString::fromLocal8Bit( "to" ), (*it2)->second() );
top.appendChild( elm );
}
return top;
}
-bool TextRangeRegExp::load( QDomElement top, const QString& /*version*/ )
+bool TextRangeRegExp::load( TQDomElement top, const TQString& /*version*/ )
{
- Q_ASSERT( top.tagName() == QString::fromLocal8Bit( "TextRange" ) );
- QString str;
- QString one = QString::fromLocal8Bit("1");
- QString zero = QString::fromLocal8Bit("0");
+ Q_ASSERT( top.tagName() == TQString::fromLocal8Bit( "TextRange" ) );
+ TQString str;
+ TQString one = TQString::fromLocal8Bit("1");
+ TQString zero = TQString::fromLocal8Bit("0");
- str = top.attribute( QString::fromLocal8Bit("negate"), zero );
+ str = top.attribute( TQString::fromLocal8Bit("negate"), zero );
_negate = ( str == one );
- str = top.attribute( QString::fromLocal8Bit("digit"), zero );
+ str = top.attribute( TQString::fromLocal8Bit("digit"), zero );
_digit = ( str == one );
- str = top.attribute( QString::fromLocal8Bit("nonDigit"), zero );
+ str = top.attribute( TQString::fromLocal8Bit("nonDigit"), zero );
_nonDigit = ( str == one );
- str = top.attribute( QString::fromLocal8Bit("space"), zero );
+ str = top.attribute( TQString::fromLocal8Bit("space"), zero );
_space = ( str == one );
- str = top.attribute( QString::fromLocal8Bit("nonSpace"), zero );
+ str = top.attribute( TQString::fromLocal8Bit("nonSpace"), zero );
_nonSpace = ( str == one );
- str = top.attribute( QString::fromLocal8Bit("wordChar"), zero );
+ str = top.attribute( TQString::fromLocal8Bit("wordChar"), zero );
_wordChar = ( str == one );
- str = top.attribute( QString::fromLocal8Bit("nonWordChar"), zero );
+ str = top.attribute( TQString::fromLocal8Bit("nonWordChar"), zero );
_nonWordChar = ( str == one );
- for ( QDomNode node = top.firstChild(); !node.isNull(); node = node.nextSibling() ) {
+ for ( TQDomNode node = top.firstChild(); !node.isNull(); node = node.nextSibling() ) {
if ( !node.isElement() )
continue; // Skip comments.
- QDomElement child = node.toElement();
+ TQDomElement child = node.toElement();
- if ( child.tagName() == QString::fromLocal8Bit( "Character" ) ) {
- QString ch = child.attribute( QString::fromLocal8Bit( "char" ) );
+ if ( child.tagName() == TQString::fromLocal8Bit( "Character" ) ) {
+ TQString ch = child.attribute( TQString::fromLocal8Bit( "char" ) );
addCharacter( ch );
}
- else if ( child.tagName() == QString::fromLocal8Bit( "Range" ) ) {
- QString from = child.attribute( QString::fromLocal8Bit( "from" ) );
- QString to = child.attribute( QString::fromLocal8Bit( "to" ) );
+ else if ( child.tagName() == TQString::fromLocal8Bit( "Range" ) ) {
+ TQString from = child.attribute( TQString::fromLocal8Bit( "from" ) );
+ TQString to = child.attribute( TQString::fromLocal8Bit( "to" ) );
addRange( from, to );
}
else {
diff --git a/kregexpeditor/textrangeregexp.h b/kregexpeditor/textrangeregexp.h
index de1785e..28c3e68 100644
--- a/kregexpeditor/textrangeregexp.h
+++ b/kregexpeditor/textrangeregexp.h
@@ -20,9 +20,9 @@
#include "regexp.h"
#include "pair.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
-typedef Pair<QString,QString> StringPair;
+typedef Pair<TQString,TQString> StringPair;
/**
Abstract syntax node for `text range' regular expression
@@ -35,12 +35,12 @@ public:
TextRangeRegExp( bool selected );
virtual ~TextRangeRegExp();
- void addCharacter( QString ch );
- QStringList chars() const { return _chars; }
+ void addCharacter( TQString ch );
+ TQStringList chars() const { return _chars; }
void clearChars() { _chars.clear(); }
- void addRange( QString from, QString to );
- QPtrList<StringPair> range() const { return _ranges; }
+ void addRange( TQString from, TQString to );
+ TQPtrList<StringPair> range() const { return _ranges; }
void clearRange() { _ranges.clear(); }
void setNegate( bool set ) { _negate = set; }
@@ -61,15 +61,15 @@ public:
virtual bool check( ErrorMap&, bool first, bool last );
virtual int precedence() const { return 4;}
- virtual QDomNode toXml( QDomDocument* doc ) const;
- virtual bool load( QDomElement, const QString& version );
+ virtual TQDomNode toXml( TQDomDocument* doc ) const;
+ virtual bool load( TQDomElement, const TQString& version );
virtual RegExpType type() const { return TEXTRANGE;}
virtual bool operator==( const RegExp& other ) const;
private:
bool _negate, _digit, _nonDigit, _space, _nonSpace, _wordChar, _nonWordChar;
- QStringList _chars;
- QPtrList<StringPair> _ranges;
+ TQStringList _chars;
+ TQPtrList<StringPair> _ranges;
};
#endif // __TEXTRANGEREGEXP_H
diff --git a/kregexpeditor/textregexp.cpp b/kregexpeditor/textregexp.cpp
index 7d5d02c..e9b493f 100644
--- a/kregexpeditor/textregexp.cpp
+++ b/kregexpeditor/textregexp.cpp
@@ -24,7 +24,7 @@
#include "textregexp.h"
-TextRegExp::TextRegExp( bool selected, QString text) :RegExp( selected )
+TextRegExp::TextRegExp( bool selected, TQString text) :RegExp( selected )
{
_text = text;
}
@@ -35,34 +35,34 @@ bool TextRegExp::check( ErrorMap&, bool, bool )
}
-void TextRegExp::append( QString str )
+void TextRegExp::append( TQString str )
{
_text.append( str );
}
-QDomNode TextRegExp::toXml( QDomDocument* doc ) const
+TQDomNode TextRegExp::toXml( TQDomDocument* doc ) const
{
- QDomElement top = doc->createElement(QString::fromLocal8Bit("Text"));
- QDomText text = doc->createTextNode( _text );
+ TQDomElement top = doc->createElement(TQString::fromLocal8Bit("Text"));
+ TQDomText text = doc->createTextNode( _text );
top.appendChild( text );
return top;
}
-bool TextRegExp::load( QDomElement top, const QString& /*version*/)
+bool TextRegExp::load( TQDomElement top, const TQString& /*version*/)
{
- Q_ASSERT( top.tagName() == QString::fromLocal8Bit( "Text" ) );
+ Q_ASSERT( top.tagName() == TQString::fromLocal8Bit( "Text" ) );
if ( top.hasChildNodes() ) {
- QDomNode child = top.firstChild();
+ TQDomNode child = top.firstChild();
if ( ! child.isText() ) {
KMessageBox::sorry( 0, i18n("<p>Element <b>Text</b> did not contain any textual data.</p>"),
i18n("Error While Loading From XML File") ) ;
return false;
}
- QDomText txtNode = child.toText();
+ TQDomText txtNode = child.toText();
_text = txtNode.data();
}
else {
- _text = QString::fromLatin1( "" );
+ _text = TQString::fromLatin1( "" );
}
return true;
diff --git a/kregexpeditor/textregexp.h b/kregexpeditor/textregexp.h
index f98d0e9..1dd222e 100644
--- a/kregexpeditor/textregexp.h
+++ b/kregexpeditor/textregexp.h
@@ -27,7 +27,7 @@
class TextRegExp :public RegExp
{
public:
- TextRegExp( bool selected, QString text = QString::null);
+ TextRegExp( bool selected, TQString text = TQString::null);
virtual bool check( ErrorMap&, bool first, bool last );
virtual int precedence() const {
@@ -36,15 +36,15 @@ public:
else
return 4;
}
- QString text() const { return _text; }
- virtual QDomNode toXml( QDomDocument* doc ) const;
- virtual bool load( QDomElement, const QString& version );
- void append( QString str);
+ TQString text() const { return _text; }
+ virtual TQDomNode toXml( TQDomDocument* doc ) const;
+ virtual bool load( TQDomElement, const TQString& version );
+ void append( TQString str);
virtual RegExpType type() const { return TEXT;}
virtual bool operator==( const RegExp& other ) const;
private:
- QString _text;
+ TQString _text;
};
#endif // __textregexp_h
diff --git a/kregexpeditor/textwidget.cpp b/kregexpeditor/textwidget.cpp
index c36d1a8..3ca0d28 100644
--- a/kregexpeditor/textwidget.cpp
+++ b/kregexpeditor/textwidget.cpp
@@ -22,35 +22,35 @@
#include "textwidget.h"
#include "textregexp.h"
#include "selectablelineedit.h"
-#include <qlayout.h>
+#include <tqlayout.h>
-TextWidget::TextWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+TextWidget::TextWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name)
:RegExpWidget(editorWindow, parent, name)
{
- init( QString::fromLocal8Bit("") );
+ init( TQString::fromLocal8Bit("") );
}
TextWidget::TextWidget( TextRegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name )
+ TQWidget* parent, const char* name )
: RegExpWidget( editorWindow, parent, name )
{
init(regexp->text());
}
-void TextWidget::init( const QString& txt )
+void TextWidget::init( const TQString& txt )
{
- QHBoxLayout *lay = new QHBoxLayout(this);
+ TQHBoxLayout *lay = new TQHBoxLayout(this);
_edit = new SelectableLineEdit( this, this, "TextWidget::edit" );
- _edit->setDragEnabled( false ); //otherwise QLineEdit::mouseMoveEvent will set the cursor over and over again.
+ _edit->setDragEnabled( false ); //otherwise TQLineEdit::mouseMoveEvent will set the cursor over and over again.
lay->addWidget(_edit);
_edit->setText( txt );
- connect( _edit, SIGNAL( parentPleaseUpdate() ), this, SLOT(slotUpdate()) );
+ connect( _edit, TQT_SIGNAL( parentPleaseUpdate() ), this, TQT_SLOT(slotUpdate()) );
setFocusProxy( _edit );
_edit->installEventFilter( this );
- connect( _edit, SIGNAL( textChanged( const QString & ) ), _editorWindow, SLOT( emitChange() ) );
+ connect( _edit, TQT_SIGNAL( textChanged( const TQString & ) ), _editorWindow, TQT_SLOT( emitChange() ) );
}
@@ -60,18 +60,18 @@ void TextWidget::slotUpdate()
// 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
// resized.
- QWidget *p = static_cast<QWidget*>(parent());
+ TQWidget *p = static_cast<TQWidget*>(parent());
if (p)
p->repaint();
_editorWindow->updateContent( this );
}
-QSize TextWidget::sizeHint() const
+TQSize TextWidget::sizeHint() const
{
return _edit->sizeHint();
}
-void TextWidget::paintEvent( QPaintEvent *e)
+void TextWidget::paintEvent( TQPaintEvent *e)
{
RegExpWidget::paintEvent(e);
}
@@ -107,32 +107,32 @@ RegExp* TextWidget::regExp() const
return new TextRegExp( isSelected(), _edit->text() );
}
-bool TextWidget::eventFilter( QObject*, QEvent* event)
+bool TextWidget::eventFilter( TQObject*, TQEvent* event)
{
// This is an event filter (in contrast to methods in SelectableLineEdit),
// otherwise lots of functions would need to be exported from TextWidget.
- if ( event->type() == QEvent::MouseButtonRelease ) {
+ if ( event->type() == TQEvent::MouseButtonRelease ) {
if ( _editorWindow->isInserting() ) {
if ( acceptWidgetInsert( _editorWindow->insertType() ) ) {
- mouseReleaseEvent( static_cast<QMouseEvent*>(event) );
+ mouseReleaseEvent( static_cast<TQMouseEvent*>(event) );
}
return true;
}
}
- else if ( event->type() == QEvent::MouseButtonPress ) {
+ else if ( event->type() == TQEvent::MouseButtonPress ) {
if ( _editorWindow->isInserting() ) {
return true;
}
else if ( isSelected() ) {
- QMouseEvent* e = static_cast<QMouseEvent*>( event );
- QMouseEvent ev( event->type(), mapTo(_editorWindow, e->pos()),
+ TQMouseEvent* e = static_cast<TQMouseEvent*>( event );
+ TQMouseEvent ev( event->type(), mapTo(_editorWindow, e->pos()),
e->button(), e->state());
- QApplication::sendEvent( _editorWindow, &ev );
+ TQApplication::sendEvent( _editorWindow, &ev );
return true;
}
}
- else if ( event->type() == QEvent::Enter ) {
+ else if ( event->type() == TQEvent::Enter ) {
if ( _editorWindow->isInserting() ) {
if ( acceptWidgetInsert( _editorWindow->insertType() ) ) {
_edit->setCursor(crossCursor);
@@ -148,7 +148,7 @@ bool TextWidget::eventFilter( QObject*, QEvent* event)
_edit->setCursor( ibeamCursor );
}
}
- else if ( event->type() == QEvent::MouseButtonDblClick && _editorWindow->isInserting() ) {
+ else if ( event->type() == TQEvent::MouseButtonDblClick && _editorWindow->isInserting() ) {
return true;
}
return false;
diff --git a/kregexpeditor/textwidget.h b/kregexpeditor/textwidget.h
index 9a5c0be..054dbd8 100644
--- a/kregexpeditor/textwidget.h
+++ b/kregexpeditor/textwidget.h
@@ -32,30 +32,30 @@ class TextWidget : public RegExpWidget
Q_OBJECT
public:
- TextWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+ TextWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name = 0);
TextWidget( TextRegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent, const char* name = 0);
- virtual QSize sizeHint() const;
+ TQWidget* parent, const char* name = 0);
+ virtual TQSize sizeHint() const;
virtual RegExp* regExp() const;
virtual RegExpType type() const { return TEXT; }
virtual void updateAll();
virtual void selectWidget( bool );
protected:
- void init( const QString& text );
- virtual void paintEvent( QPaintEvent *e );
+ void init( const TQString& text );
+ virtual void paintEvent( TQPaintEvent *e );
virtual bool updateSelection( bool parentSelected );
virtual void clearSelection();
- virtual bool eventFilter( QObject*, QEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
protected slots:
void slotUpdate();
private:
- QString text;
+ TQString text;
SelectableLineEdit *_edit;
- QSize textSize, boxSize, editSize;
+ TQSize textSize, boxSize, editSize;
};
diff --git a/kregexpeditor/userdefinedregexps.cpp b/kregexpeditor/userdefinedregexps.cpp
index de2f675..10c97b0 100644
--- a/kregexpeditor/userdefinedregexps.cpp
+++ b/kregexpeditor/userdefinedregexps.cpp
@@ -27,36 +27,36 @@
#endif
#include "userdefinedregexps.h"
-#include <qheader.h>
-#include <qpopupmenu.h>
-#include <qdir.h>
+#include <tqheader.h>
+#include <tqpopupmenu.h>
+#include <tqdir.h>
#include "widgetfactory.h"
#include "compoundregexp.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
-UserDefinedRegExps::UserDefinedRegExps( QWidget *parent, const char *name )
- : QDockWindow( QDockWindow::InDock, parent, name)
+UserDefinedRegExps::UserDefinedRegExps( TQWidget *parent, const char *name )
+ : TQDockWindow( TQDockWindow::InDock, parent, name)
{
- QWidget* top = new QWidget( this );
- QVBoxLayout* lay = new QVBoxLayout( top, 6 );
+ TQWidget* top = new TQWidget( this );
+ TQVBoxLayout* lay = new TQVBoxLayout( top, 6 );
lay->setAutoAdd( true );
- QLabel* label = new QLabel( i18n("Compound regular expressions:"), top );
+ TQLabel* label = new TQLabel( i18n("Compound regular expressions:"), top );
// This is to avoid that the label set the minimum width for the window.
label->setMinimumSize(1,0);
- _userDefined = new QListView( top, "UserDefinedRegExps::_userDefined" );
- _userDefined->addColumn( QString::null );
+ _userDefined = new TQListView( top, "UserDefinedRegExps::_userDefined" );
+ _userDefined->addColumn( TQString::null );
_userDefined->header()->hide();
// _userDefined->setRootIsDecorated( true );
setWidget( top );
slotPopulateUserRegexps();
- connect( _userDefined, SIGNAL(clicked(QListViewItem*)), this, SLOT(slotLoad(QListViewItem*)) );
- connect( _userDefined, SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&, int )),
- this, SLOT( slotEdit( QListViewItem*, const QPoint& ) ) );
+ connect( _userDefined, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(slotLoad(TQListViewItem*)) );
+ connect( _userDefined, TQT_SIGNAL(rightButtonPressed(TQListViewItem*,const TQPoint&, int )),
+ this, TQT_SLOT( slotEdit( TQListViewItem*, const TQPoint& ) ) );
}
void UserDefinedRegExps::slotPopulateUserRegexps()
@@ -67,46 +67,46 @@ void UserDefinedRegExps::slotPopulateUserRegexps()
createItems( i18n("User Defined"), WidgetWinItem::path(), true );
#ifdef QT_ONLY
- QStringList dirs;
- dirs << QString::fromLatin1( "predefined" );
+ TQStringList dirs;
+ dirs << TQString::fromLatin1( "predefined" );
#else
- QStringList dirs = KGlobal::dirs()->findDirs( "data", QString::fromLocal8Bit("kregexpeditor/predefined/") );
+ TQStringList dirs = KGlobal::dirs()->findDirs( "data", TQString::fromLocal8Bit("kregexpeditor/predefined/") );
#endif
- for ( QStringList::iterator it1 = dirs.begin(); it1 != dirs.end(); ++it1 ) {
- QDir dir( *it1, QString::null, QDir::Name, QDir::Dirs );
- QStringList subdirs = dir.entryList();
- for ( QStringList::iterator it2 = subdirs.begin(); it2 != subdirs.end(); ++it2 ) {
- if ( *it2 == QString::fromLocal8Bit(".") || *it2 == QString::fromLocal8Bit("..") )
+ for ( TQStringList::iterator it1 = dirs.begin(); it1 != dirs.end(); ++it1 ) {
+ TQDir dir( *it1, TQString::null, TQDir::Name, TQDir::Dirs );
+ TQStringList subdirs = dir.entryList();
+ for ( TQStringList::iterator it2 = subdirs.begin(); it2 != subdirs.end(); ++it2 ) {
+ if ( *it2 == TQString::fromLocal8Bit(".") || *it2 == TQString::fromLocal8Bit("..") )
continue;
- createItems( *it2, *it1 + QString::fromLocal8Bit("/") + *it2, false );
+ createItems( *it2, *it1 + TQString::fromLocal8Bit("/") + *it2, false );
}
}
}
-void UserDefinedRegExps::createItems( const QString& _title, const QString& dir, bool usersRegExp )
+void UserDefinedRegExps::createItems( const TQString& _title, const TQString& dir, bool usersRegExp )
{
- QString title = _title;
- if (_title == QString::fromLatin1("general"))
+ TQString title = _title;
+ if (_title == TQString::fromLatin1("general"))
title = i18n("General");
- QListViewItem* lvItem = new QListViewItem( _userDefined, title );
+ TQListViewItem* lvItem = new TQListViewItem( _userDefined, title );
lvItem->setOpen( true );
- QDir directory( dir );
- QStringList files = directory.entryList( QString::fromLocal8Bit("*.regexp") );
- for ( QStringList::Iterator it = files.begin(); it != files.end(); ++it ) {
- QString fileName = dir + QString::fromLocal8Bit("/") + *it;
+ TQDir directory( dir );
+ TQStringList files = directory.entryList( TQString::fromLocal8Bit("*.regexp") );
+ for ( TQStringList::Iterator it = files.begin(); it != files.end(); ++it ) {
+ TQString fileName = dir + TQString::fromLocal8Bit("/") + *it;
- QFile file( fileName );
+ TQFile file( fileName );
if ( ! file.open(IO_ReadOnly) ) {
KMessageBox::sorry( this, i18n("Could not open file for reading: %1").arg(fileName) );
continue;
}
- QTextStream stream( &file );
- QString data = stream.read();
+ TQTextStream stream( &file );
+ TQString data = stream.read();
file.close();
RegExp* regexp = WidgetFactory::createRegExp( data );
@@ -126,7 +126,7 @@ void UserDefinedRegExps::createItems( const QString& _title, const QString& dir,
}
}
-const QPtrList<CompoundRegExp> UserDefinedRegExps::regExps() const
+const TQPtrList<CompoundRegExp> UserDefinedRegExps::regExps() const
{
return _regExps;
}
@@ -137,7 +137,7 @@ void UserDefinedRegExps::slotUnSelect()
_userDefined->clearSelection();
}
-void UserDefinedRegExps::slotLoad(QListViewItem* item)
+void UserDefinedRegExps::slotLoad(TQListViewItem* item)
{
if ( !item || ! dynamic_cast<WidgetWinItem*>(item) ) {
// Mouse pressed outside a widget.
@@ -150,9 +150,9 @@ void UserDefinedRegExps::slotLoad(QListViewItem* item)
}
}
-void UserDefinedRegExps::slotEdit( QListViewItem* item, const QPoint& pos )
+void UserDefinedRegExps::slotEdit( TQListViewItem* item, const TQPoint& pos )
{
- QPopupMenu* menu = new QPopupMenu( this );
+ TQPopupMenu* menu = new TQPopupMenu( this );
menu->insertItem(i18n("Delete"), 1 );
menu->insertItem(i18n("Rename..."), 2 );
if ( !item || ! dynamic_cast<WidgetWinItem*>( item ) ) {
@@ -174,7 +174,7 @@ void UserDefinedRegExps::slotEdit( QListViewItem* item, const QPoint& pos )
if ( which == 1 ) { // Delete
WidgetWinItem* winItem = dynamic_cast<WidgetWinItem*>( item );
Q_ASSERT( winItem );
- QFile file( winItem->fileName() );
+ TQFile file( winItem->fileName() );
Q_ASSERT( file.exists() );
file.remove();
delete item;
@@ -183,10 +183,10 @@ void UserDefinedRegExps::slotEdit( QListViewItem* item, const QPoint& pos )
WidgetWinItem* winItem = dynamic_cast<WidgetWinItem*>( item );
Q_ASSERT( winItem );
- QString oldFile = winItem->fileName();
- QString oldName = winItem->name();
+ TQString oldFile = winItem->fileName();
+ TQString oldName = winItem->name();
- QString txt;
+ TQString txt;
#ifdef QT_ONLY
txt = QInputDialog::getText( tr("Rename Regular Expression"), tr("New name:") );
#else
@@ -197,10 +197,10 @@ void UserDefinedRegExps::slotEdit( QListViewItem* item, const QPoint& pos )
txt = dlg.text();
#endif
if ( !txt.isNull() && oldName != txt ) {
- QString fileName = WidgetWinItem::path() + QString::fromLocal8Bit("/") + txt + QString::fromLocal8Bit(".regexp");
- QFileInfo finfo( fileName );
+ TQString fileName = WidgetWinItem::path() + TQString::fromLocal8Bit("/") + txt + TQString::fromLocal8Bit(".regexp");
+ TQFileInfo finfo( fileName );
if ( finfo.exists() ) {
- int answer = KMessageBox::warningYesNo( this, i18n("<p>Overwrite named regular expression <b>%1</b>?</p>").arg(txt), QString::null, i18n("Overwrite"), i18n("Do Not Overwrite") );
+ int answer = KMessageBox::warningYesNo( this, i18n("<p>Overwrite named regular expression <b>%1</b>?</p>").arg(txt), TQString::null, i18n("Overwrite"), i18n("Do Not Overwrite") );
if ( answer != KMessageBox::Yes )
return;
@@ -209,7 +209,7 @@ void UserDefinedRegExps::slotEdit( QListViewItem* item, const QPoint& pos )
}
else
winItem->setName( txt );
- QDir dir;
+ TQDir dir;
dir.rename( oldFile, fileName );
}
}
@@ -223,18 +223,18 @@ void UserDefinedRegExps::slotSelectNewAction()
slotUnSelect();
}
-WidgetWinItem::WidgetWinItem( QString fileName, RegExp* regexp, bool usersRegExp, QListViewItem* parent )
- :QListViewItem( parent ), _regexp( regexp ), _usersRegExp ( usersRegExp )
+WidgetWinItem::WidgetWinItem( TQString fileName, RegExp* regexp, bool usersRegExp, TQListViewItem* parent )
+ :TQListViewItem( parent ), _regexp( regexp ), _usersRegExp ( usersRegExp )
{
- int index = fileName.findRev(QString::fromLocal8Bit(".regexp"));
+ int index = fileName.findRev(TQString::fromLocal8Bit(".regexp"));
_name = fileName.left(index);
setText( 0, _name );
}
-QString WidgetWinItem::fileName() const
+TQString WidgetWinItem::fileName() const
{
- return path() + QString::fromLocal8Bit("/") +_name + QString::fromLocal8Bit(".regexp");
+ return path() + TQString::fromLocal8Bit("/") +_name + TQString::fromLocal8Bit(".regexp");
}
RegExp* WidgetWinItem::regExp() const
@@ -242,23 +242,23 @@ RegExp* WidgetWinItem::regExp() const
return _regexp;
}
-QString WidgetWinItem::name() const
+TQString WidgetWinItem::name() const
{
return _name;
}
-void WidgetWinItem::setName( const QString& nm )
+void WidgetWinItem::setName( const TQString& nm )
{
_name = nm;
setText( 0, nm );
}
-QString WidgetWinItem::path()
+TQString WidgetWinItem::path()
{
#ifdef QT_ONLY
- return QString::fromLatin1( "predefined" );
+ return TQString::fromLatin1( "predefined" );
#else
- return locateLocal("data", QString::fromLocal8Bit("KRegExpEditor/"));
+ return locateLocal("data", TQString::fromLocal8Bit("KRegExpEditor/"));
#endif
}
diff --git a/kregexpeditor/userdefinedregexps.h b/kregexpeditor/userdefinedregexps.h
index 358aa73..e1fede4 100644
--- a/kregexpeditor/userdefinedregexps.h
+++ b/kregexpeditor/userdefinedregexps.h
@@ -17,8 +17,8 @@
**/
#ifndef __USERDEFINEDREGEXPS_H
#define __USERDEFINEDREGEXPS_H
-#include <qdockwindow.h>
-#include <qlistview.h>
+#include <tqdockwindow.h>
+#include <tqlistview.h>
#include "compoundregexp.h"
@@ -30,43 +30,43 @@ class UserDefinedRegExps :public QDockWindow
Q_OBJECT
public:
- UserDefinedRegExps( QWidget *parent, const char *name = 0 );
- const QPtrList<CompoundRegExp> regExps() const;
+ UserDefinedRegExps( TQWidget *parent, const char *name = 0 );
+ const TQPtrList<CompoundRegExp> regExps() const;
public slots:
void slotSelectNewAction();
protected slots:
- void slotLoad(QListViewItem* item);
- void slotEdit( QListViewItem* item, const QPoint& pos );
+ void slotLoad(TQListViewItem* item);
+ void slotEdit( TQListViewItem* item, const TQPoint& pos );
void slotPopulateUserRegexps();
void slotUnSelect();
protected:
- void createItems( const QString& title, const QString& dir, bool usersRegExp );
+ void createItems( const TQString& title, const TQString& dir, bool usersRegExp );
signals:
void load( RegExp* );
private:
- QListView* _userDefined;
- QPtrList<CompoundRegExp> _regExps;
+ TQListView* _userDefined;
+ TQPtrList<CompoundRegExp> _regExps;
};
class WidgetWinItem :public QListViewItem
{
public:
- WidgetWinItem( QString name, RegExp* regexp, bool users, QListViewItem* parent );
- static QString path();
+ WidgetWinItem( TQString name, RegExp* regexp, bool users, TQListViewItem* parent );
+ static TQString path();
- QString fileName() const;
+ TQString fileName() const;
RegExp* regExp() const;
- QString name() const;
- void setName( const QString& );
+ TQString name() const;
+ void setName( const TQString& );
bool isUsersRegExp() const { return _usersRegExp; }
private:
- QString _name;
+ TQString _name;
RegExp* _regexp;
bool _usersRegExp;
};
diff --git a/kregexpeditor/util.cpp b/kregexpeditor/util.cpp
index 8bff5de..d770488 100644
--- a/kregexpeditor/util.cpp
+++ b/kregexpeditor/util.cpp
@@ -19,22 +19,22 @@
#include "util.h"
#include <kiconloader.h>
#include <kstandarddirs.h>
-QPixmap Util::getKRegExpEditorIcon( const QString& name )
+TQPixmap Util::getKRegExpEditorIcon( const TQString& name )
{
#ifdef QT_ONLY
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage( qembed_findImage(name) );
return pix;
#else
- return KGlobal::iconLoader()->loadIcon(locate("data", QString::fromLatin1("kregexpeditor/pics/") +name ),
+ return KGlobal::iconLoader()->loadIcon(locate("data", TQString::fromLatin1("kregexpeditor/pics/") +name ),
KIcon::Toolbar );
#endif
}
-QPixmap Util::getSystemIcon( const QString& name )
+TQPixmap Util::getSystemIcon( const TQString& name )
{
#ifdef QT_ONLY
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage( qembed_findImage( name ) );
return pix;
#else
@@ -44,12 +44,12 @@ QPixmap Util::getSystemIcon( const QString& name )
}
-QIconSet Util::getSystemIconSet( const QString& name )
+TQIconSet Util::getSystemIconSet( const TQString& name )
{
#ifdef QT_ONLY
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage( qembed_findImage( name ) );
- return QIconSet( pix );
+ return TQIconSet( pix );
#else
KIconLoader loader;
return loader.loadIconSet( name, KIcon::Toolbar);
diff --git a/kregexpeditor/util.h b/kregexpeditor/util.h
index a3b406e..27a9dab 100644
--- a/kregexpeditor/util.h
+++ b/kregexpeditor/util.h
@@ -19,15 +19,15 @@
#ifndef UTIL_H
#define UTIL_H
-#include <qpixmap.h>
-#include <qiconset.h>
+#include <tqpixmap.h>
+#include <tqiconset.h>
class Util
{
public:
- static QPixmap getKRegExpEditorIcon( const QString& name );
- static QPixmap getSystemIcon( const QString& name );
- static QIconSet getSystemIconSet( const QString& name );
+ static TQPixmap getKRegExpEditorIcon( const TQString& name );
+ static TQPixmap getSystemIcon( const TQString& name );
+ static TQIconSet getSystemIconSet( const TQString& name );
};
#endif // UTIL_H
diff --git a/kregexpeditor/verifier.cpp b/kregexpeditor/verifier.cpp
index 322db12..26c1a21 100644
--- a/kregexpeditor/verifier.cpp
+++ b/kregexpeditor/verifier.cpp
@@ -24,7 +24,7 @@
#include "verifier.h"
-Verifier::Verifier( QWidget* parent, const char* name ) : QTextEdit( parent, name )
+Verifier::Verifier( TQWidget* parent, const char* name ) : TQTextEdit( parent, name )
/* QT_ANCHOR_DO_NOT_WORK: ,_current( 0 ) */
{
_highlighter = 0;
@@ -34,7 +34,7 @@ Verifier::Verifier( QWidget* parent, const char* name ) : QTextEdit( parent, nam
/**
Update text edit to show matches of regular expression
*/
-void Verifier::verify( const QString& reg )
+void Verifier::verify( const TQString& reg )
{
if ( _highlighter ) {
_highlighter->setRegExp( reg );
@@ -49,7 +49,7 @@ void Verifier::verify( const QString& reg )
void Verifier::clearRegexp()
{
if ( _highlighter ) {
- _highlighter->setRegExp( QString::null );
+ _highlighter->setRegExp( TQString::null );
_highlighter->rehighlight();
}
}
@@ -97,7 +97,7 @@ void Verifier::setMinimal( bool b )
//
// void Verifier::gotoNum( int which )
// {
-// QString anchor = QString::fromLatin1("match%1").arg(which);
+// TQString anchor = TQString::fromLatin1("match%1").arg(which);
// scrollToAnchor( anchor );
// _current = which;
// emit currentChanged( _current );
diff --git a/kregexpeditor/verifier.h b/kregexpeditor/verifier.h
index 661abef..07454ba 100644
--- a/kregexpeditor/verifier.h
+++ b/kregexpeditor/verifier.h
@@ -17,7 +17,7 @@
**/
#ifndef VERIFIER_H
#define VERIFIER_H
-#include <qtextedit.h>
+#include <tqtextedit.h>
#include "regexphighlighter.h"
class QTimer;
class QProgressDialog;
@@ -27,11 +27,11 @@ class Verifier :public QTextEdit
{
Q_OBJECT
public:
- Verifier( QWidget* parent, const char* name = 0 );
+ Verifier( TQWidget* parent, const char* name = 0 );
void setHighlighter( RegexpHighlighter* );
public slots:
- void verify( const QString& regexp );
+ void verify( const TQString& regexp );
void clearRegexp();
void setCaseSensitive( bool );
void setMinimal( bool );
diff --git a/kregexpeditor/verifybuttons.cpp b/kregexpeditor/verifybuttons.cpp
index cd1b1ef..d7ed66a 100644
--- a/kregexpeditor/verifybuttons.cpp
+++ b/kregexpeditor/verifybuttons.cpp
@@ -17,7 +17,7 @@
**/
#ifdef QT_ONLY
#include "compat.h"
-#include <qfiledialog.h>
+#include <tqfiledialog.h>
#include "images.h"
#else
#include <klocale.h>
@@ -29,72 +29,72 @@
#endif
#include "verifybuttons.h"
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include "qtregexpconverter.h"
#include "emacsregexpconverter.h"
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include "util.h"
-#include <qpopupmenu.h>
-#include <qaction.h>
+#include <tqpopupmenu.h>
+#include <tqaction.h>
-VerifyButtons::VerifyButtons( QWidget* parent, const char* name )
- :QDockWindow( QDockWindow::InDock, parent, name ), _configMenu( 0 )
+VerifyButtons::VerifyButtons( TQWidget* parent, const char* name )
+ :TQDockWindow( TQDockWindow::InDock, parent, name ), _configMenu( 0 )
{
- QBoxLayout* layout = boxLayout();
+ TQBoxLayout* layout = boxLayout();
- _verify = new QToolButton(this);
- QIconSet icon = Util::getSystemIconSet( QString::fromLatin1("spellcheck"));
+ _verify = new TQToolButton(this);
+ TQIconSet icon = Util::getSystemIconSet( TQString::fromLatin1("spellcheck"));
_verify->setIconSet( icon );
- QToolTip::add( _verify, i18n( "Verify regular expression" ) );
- QWhatsThis::add( _verify, i18n("Shows what part of the regular expression is being matched in the <i>verifier window</i>."
+ TQToolTip::add( _verify, i18n( "Verify regular expression" ) );
+ TQWhatsThis::add( _verify, i18n("Shows what part of the regular expression is being matched in the <i>verifier window</i>."
"(The window below the graphical editor window)."));
layout->addWidget( _verify );
- connect( _verify, SIGNAL( clicked() ), this, SIGNAL( verify() ) );
+ connect( _verify, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( verify() ) );
- QToolButton* button = new QToolButton(this);
- button->setPixmap( Util::getSystemIcon( QString::fromLatin1("fileopen")) );
+ TQToolButton* button = new TQToolButton(this);
+ button->setPixmap( Util::getSystemIcon( TQString::fromLatin1("fileopen")) );
layout->addWidget( button );
- connect(button, SIGNAL(clicked()), this, SLOT(loadText()));
- QToolTip::add( button, i18n("Load text in the verifier window") );
+ connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(loadText()));
+ TQToolTip::add( button, i18n("Load text in the verifier window") );
- button = new QToolButton(this);
- button->setPixmap( Util::getSystemIcon( QString::fromLatin1("package_settings")) );
+ button = new TQToolButton(this);
+ button->setPixmap( Util::getSystemIcon( TQString::fromLatin1("package_settings")) );
layout->addWidget( button );
- connect(button, SIGNAL(clicked()), this, SLOT(configure()));
- QToolTip::add( button, i18n("Settings") );
+ 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 QToolButton( QString::fromLatin1("<<"), this);
+ // _first = new TQToolButton( TQString::fromLatin1("<<"), this);
// layout->addWidget( _first );
- // connect(_first, SIGNAL(clicked()), this, SIGNAL( gotoFirst()));
+ // connect(_first, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoFirst()));
// _first->setFixedWidth( 25 );
//
- // _prev = new QToolButton(QString::fromLatin1("<"), this);
+ // _prev = new TQToolButton(TQString::fromLatin1("<"), this);
// layout->addWidget( _prev );
- // connect(_prev, SIGNAL(clicked()), this, SIGNAL( gotoPrev()));
+ // connect(_prev, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoPrev()));
// _prev->setFixedWidth( 20 );
//
- // _next = new QToolButton(QString::fromLatin1(">"), this);
+ // _next = new TQToolButton(TQString::fromLatin1(">"), this);
// layout->addWidget( _next );
- // connect(_next, SIGNAL(clicked()), this, SIGNAL( gotoNext()));
+ // connect(_next, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoNext()));
// _next->setFixedWidth( 20 );
//
- // _last = new QToolButton(QString::fromLatin1(">>"), this);
+ // _last = new TQToolButton(TQString::fromLatin1(">>"), this);
// layout->addWidget( _last );
- // connect(_last, SIGNAL(clicked()), this, SIGNAL( gotoLast()));
+ // connect(_last, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( gotoLast()));
// _last->setFixedWidth( 25 );
// Same as above
-// QLabel* label = new QLabel( i18n("Matches: "), this );
+// TQLabel* label = new TQLabel( i18n("Matches: "), this );
// layout->addWidget( label );
-// _matches = new QLabel(i18n("-"), this );
+// _matches = new TQLabel(i18n("-"), this );
// layout->addWidget( _matches );
-// QString txt = i18n( "Shows number of times regular expression matches the text in the verifier window");
-// QToolTip::add( label, txt );
-// QToolTip::add( _matches, txt );
+// TQString txt = i18n( "Shows number of times regular expression matches the text in the verifier window");
+// TQToolTip::add( label, txt );
+// TQToolTip::add( _matches, txt );
_verify->setEnabled( false );
@@ -102,23 +102,23 @@ VerifyButtons::VerifyButtons( QWidget* parent, const char* name )
// Qt
RegExpConverter* converter = new QtRegExpConverter();
- _converters.append( qMakePair( converter, static_cast<QAction*>( 0 ) ) );
- QString qtConverterName = converter->name();
+ _converters.append( qMakePair( converter, static_cast<TQAction*>( 0 ) ) );
+ TQString qtConverterName = converter->name();
// Emacs
converter = new EmacsRegExpConverter();
- _converters.append( qMakePair( converter, static_cast<QAction*>( 0 ) ) );
+ _converters.append( qMakePair( converter, static_cast<TQAction*>( 0 ) ) );
// -------------------------------------------------- Initialize the config menu
- _configMenu = new QPopupMenu( this, "config menu" );
+ _configMenu = new TQPopupMenu( this, "config menu" );
// Auto Verify
- QAction* autoVerify = new QAction( i18n("Verify on the Fly"), 0, this );
+ TQAction* autoVerify = new TQAction( i18n("Verify on the Fly"), 0, this );
autoVerify->setToggleAction( true );
autoVerify->setOn( true );
- connect( autoVerify, SIGNAL( toggled( bool ) ), this, SLOT( updateVerifyButton( bool ) ) );
- connect( autoVerify, SIGNAL( toggled( bool ) ), this, SIGNAL( autoVerify( bool ) ) );
+ connect( autoVerify, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( updateVerifyButton( bool ) ) );
+ connect( autoVerify, TQT_SIGNAL( toggled( bool ) ), this, TQT_SIGNAL( autoVerify( bool ) ) );
autoVerify->addTo( _configMenu );
autoVerify->setToolTip( i18n( "Toggle on-the-fly verification of regular expression" ) );
autoVerify->setWhatsThis( i18n( "Enabling this option will make the verifier update for each edit. "
@@ -126,19 +126,19 @@ VerifyButtons::VerifyButtons( QWidget* parent, const char* name )
"complex or matches a lot of time, this may be very slow."));
// RegExp Languages
- QPopupMenu* languages = new QPopupMenu( _configMenu );
+ TQPopupMenu* languages = new TQPopupMenu( _configMenu );
_languageId = _configMenu->insertItem( i18n("RegExp Language"), languages );
- QActionGroup* grp = new QActionGroup( this );
- for( QValueList< QPair<RegExpConverter*,QAction*> >::Iterator it = _converters.begin(); it != _converters.end(); ++it ) {
- QString name = (*it).first->name();
- QAction* action = new QAction( name, 0, this );
+ TQActionGroup* grp = new TQActionGroup( this );
+ for( TQValueList< QPair<RegExpConverter*,TQAction*> >::Iterator it = _converters.begin(); it != _converters.end(); ++it ) {
+ TQString name = (*it).first->name();
+ TQAction* action = new TQAction( name, 0, this );
action->setToggleAction( true );
grp->add( action );
(*it).second = action;
}
grp->addTo( languages );
- connect( grp, SIGNAL( selected( QAction* ) ), this, SLOT( slotChangeSyntax( QAction* ) ) );
+ connect( grp, TQT_SIGNAL( selected( TQAction* ) ), this, TQT_SLOT( slotChangeSyntax( TQAction* ) ) );
_configMenu->setItemEnabled( _languageId, false );
// Select the Qt converter by default
@@ -154,7 +154,7 @@ void VerifyButtons::updateVerifyButton( bool b )
void VerifyButtons::loadText()
{
- QString fileName = KFileDialog::getOpenFileName(QString::null, QString::null, this);
+ TQString fileName = KFileDialog::getOpenFileName(TQString::null, TQString::null, this);
if ( !fileName.isNull() ) {
emit loadVerifyText( fileName );
}
@@ -179,21 +179,21 @@ void VerifyButtons::setMatchCount( int /*count*/ )
// currently this is not possible due to limitation in QSyntaxHighlighter
/*
if ( count == -1 )
- _matches->setText( QString::fromLatin1("-") );
+ _matches->setText( TQString::fromLatin1("-") );
else
- _matches->setText( QString::number( count ) );
+ _matches->setText( TQString::number( count ) );
*/
}
-void VerifyButtons::slotChangeSyntax( QAction* action )
+void VerifyButtons::slotChangeSyntax( TQAction* action )
{
emit changeSyntax( action->menuText() );
}
-RegExpConverter* VerifyButtons::setSyntax( const QString& which)
+RegExpConverter* VerifyButtons::setSyntax( const TQString& which)
{
- for( QValueList< QPair<RegExpConverter*, QAction*> >::Iterator it = _converters.begin(); it != _converters.end(); ++it ) {
- QString name = (*it).first->name();
+ for( TQValueList< QPair<RegExpConverter*, TQAction*> >::Iterator it = _converters.begin(); it != _converters.end(); ++it ) {
+ TQString name = (*it).first->name();
if ( name == which ) {
(*it).second->setOn( true );
return (*it).first;
@@ -205,7 +205,7 @@ RegExpConverter* VerifyButtons::setSyntax( const QString& which)
void VerifyButtons::configure()
{
- _configMenu->exec( QCursor::pos() );
+ _configMenu->exec( TQCursor::pos() );
}
void VerifyButtons::setAllowNonQtSyntax( bool b )
diff --git a/kregexpeditor/verifybuttons.h b/kregexpeditor/verifybuttons.h
index aaf3593..39fdf4c 100644
--- a/kregexpeditor/verifybuttons.h
+++ b/kregexpeditor/verifybuttons.h
@@ -18,7 +18,7 @@
#ifndef VERIFYBUTTONS_H
#define VERIFYBUTTONS_H
-#include <qdockwindow.h>
+#include <tqdockwindow.h>
#include "regexpconverter.h"
class QToolButton;
class QLabel;
@@ -30,14 +30,14 @@ class VerifyButtons :public QDockWindow
Q_OBJECT
public:
- VerifyButtons( QWidget* parent, const char* name );
- RegExpConverter* setSyntax( const QString& );
+ VerifyButtons( TQWidget* parent, const char* name );
+ RegExpConverter* setSyntax( const TQString& );
void setAllowNonQtSyntax( bool );
signals:
void verify();
void autoVerify( bool );
- void loadVerifyText( const QString& );
+ void loadVerifyText( const TQString& );
// Qt anchors do not work for <pre>...</pre>, thefore scrolling to next/prev match
// do not work. Enable this when they work.
@@ -46,7 +46,7 @@ signals:
// void gotoNext();
// void gotoLast();
- void changeSyntax( const QString& );
+ void changeSyntax( const TQString& );
public slots:
// void enableForwardButtons( bool );
@@ -56,23 +56,23 @@ public slots:
protected slots:
void updateVerifyButton( bool );
void loadText();
- void slotChangeSyntax( QAction* action );
+ void slotChangeSyntax( TQAction* action );
void configure();
private:
- QToolButton* _verify;
- QLabel* _matches;
- QPopupMenu* _configMenu;
+ TQToolButton* _verify;
+ TQLabel* _matches;
+ TQPopupMenu* _configMenu;
int _languageId;
// Qt anchors do not work for <pre>...</pre>, thefore scrolling to next/prev match
// do not work. Enable this when they work.
- // QToolButton* _first;
- // QToolButton* _prev;
- // QToolButton* _next;
- // QToolButton* _last;
+ // TQToolButton* _first;
+ // TQToolButton* _prev;
+ // TQToolButton* _next;
+ // TQToolButton* _last;
- QValueList< QPair<RegExpConverter*,QAction*> > _converters;
+ TQValueList< QPair<RegExpConverter*,TQAction*> > _converters;
};
diff --git a/kregexpeditor/widgetfactory.cpp b/kregexpeditor/widgetfactory.cpp
index e2e860d..a5a7a78 100644
--- a/kregexpeditor/widgetfactory.cpp
+++ b/kregexpeditor/widgetfactory.cpp
@@ -46,7 +46,7 @@ bool WidgetFactory::isContainer( RegExpType tp )
return ( tp == REPEAT || tp == ALTN || tp == COMPOUND );
}
-RegExpWidget* WidgetFactory::createWidget( RegExpEditorWindow* win, QWidget* parent,
+RegExpWidget* WidgetFactory::createWidget( RegExpEditorWindow* win, TQWidget* parent,
RegExpType type )
{
RegExpWidget* widget = 0;
@@ -80,7 +80,7 @@ RegExpWidget* WidgetFactory::createWidget( RegExpEditorWindow* win, QWidget* par
return 0;
}
- if ( widget->edit() == QDialog::Rejected ) {
+ if ( widget->edit() == TQDialog::Rejected ) {
delete widget;
return 0;
}
@@ -88,7 +88,7 @@ RegExpWidget* WidgetFactory::createWidget( RegExpEditorWindow* win, QWidget* par
}
RegExpWidget* WidgetFactory::createWidget( RegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent )
+ TQWidget* parent )
{
if ( regexp == 0 ) {
qFatal("%s:%d Regexp is 0", __FILE__, __LINE__ );
@@ -131,35 +131,35 @@ RegExpWidget* WidgetFactory::createWidget( RegExp* regexp, RegExpEditorWindow* e
return 0;
}
-RegExp* WidgetFactory::createRegExp( QDomElement node, const QString& version )
+RegExp* WidgetFactory::createRegExp( TQDomElement node, const TQString& version )
{
- QString tag = node.tagName();
+ TQString tag = node.tagName();
RegExp* regexp;
- if ( tag == QString::fromLocal8Bit( "TextRange" ) )
+ if ( tag == TQString::fromLocal8Bit( "TextRange" ) )
regexp = new TextRangeRegExp( false );
- else if ( tag == QString::fromLocal8Bit( "Text" ) )
+ else if ( tag == TQString::fromLocal8Bit( "Text" ) )
regexp = new TextRegExp( false );
- else if ( tag == QString::fromLocal8Bit( "Concatenation" ) )
+ else if ( tag == TQString::fromLocal8Bit( "Concatenation" ) )
regexp = new ConcRegExp( false );
- else if ( tag == QString::fromLocal8Bit( "Alternatives" ) )
+ else if ( tag == TQString::fromLocal8Bit( "Alternatives" ) )
regexp = new AltnRegExp( false );
- else if ( tag == QString::fromLocal8Bit( "BegLine" ) )
+ else if ( tag == TQString::fromLocal8Bit( "BegLine" ) )
regexp = new PositionRegExp( false, PositionRegExp::BEGLINE );
- else if ( tag == QString::fromLocal8Bit( "EndLine" ) )
+ else if ( tag == TQString::fromLocal8Bit( "EndLine" ) )
regexp = new PositionRegExp( false, PositionRegExp::ENDLINE );
- else if ( tag == QString::fromLocal8Bit( "WordBoundary" ) )
+ else if ( tag == TQString::fromLocal8Bit( "WordBoundary" ) )
regexp = new PositionRegExp( false, PositionRegExp::WORDBOUNDARY );
- else if ( tag == QString::fromLocal8Bit( "NonWordBoundary" ) )
+ else if ( tag == TQString::fromLocal8Bit( "NonWordBoundary" ) )
regexp = new PositionRegExp( false, PositionRegExp::NONWORDBOUNDARY );
- else if ( tag == QString::fromLocal8Bit( "PositiveLookAhead" ) )
+ else if ( tag == TQString::fromLocal8Bit( "PositiveLookAhead" ) )
regexp = new LookAheadRegExp( false, LookAheadRegExp::POSITIVE );
- else if ( tag == QString::fromLocal8Bit( "NegativeLookAhead" ) )
+ else if ( tag == TQString::fromLocal8Bit( "NegativeLookAhead" ) )
regexp = new LookAheadRegExp( false, LookAheadRegExp::NEGATIVE );
- else if ( tag == QString::fromLocal8Bit( "Compound" ) )
+ else if ( tag == TQString::fromLocal8Bit( "Compound" ) )
regexp = new CompoundRegExp( false );
- else if ( tag == QString::fromLocal8Bit( "AnyChar" ) )
+ else if ( tag == TQString::fromLocal8Bit( "AnyChar" ) )
regexp = new DotRegExp( false );
- else if ( tag == QString::fromLocal8Bit( "Repeat" ) )
+ else if ( tag == TQString::fromLocal8Bit( "Repeat" ) )
regexp = new RepeatRegExp( false );
else {
KMessageBox::sorry( 0, i18n("<p>Unknown tag while reading XML. Tag was <b>%1</b></p>").arg(tag),
@@ -178,9 +178,9 @@ RegExp* WidgetFactory::createRegExp( QDomElement node, const QString& version )
return 0;
}
-RegExp* WidgetFactory::createRegExp( QString str )
+RegExp* WidgetFactory::createRegExp( TQString str )
{
- QDomDocument doc;
+ TQDomDocument doc;
bool ok = doc.setContent( str );
if ( !ok ) {
KMessageBox::sorry( 0, i18n("Error while loading regular expression from XML. Most probably the regular expression had unmatched tags."),
@@ -189,16 +189,16 @@ RegExp* WidgetFactory::createRegExp( QString str )
// Read the RegularExpression element, and extract the version.
- QDomElement top = doc.documentElement();
- if (! (top.tagName() == QString::fromLocal8Bit("RegularExpression")) ) {
- KMessageBox::sorry( 0, i18n("<p>XML file did not contain a <b>%1</b> tag.</p>").arg(QString::fromLatin1("RegularExpression")),
+ TQDomElement top = doc.documentElement();
+ if (! (top.tagName() == TQString::fromLocal8Bit("RegularExpression")) ) {
+ KMessageBox::sorry( 0, i18n("<p>XML file did not contain a <b>%1</b> tag.</p>").arg(TQString::fromLatin1("RegularExpression")),
i18n("Error While Loading From XML File") ) ;
}
- QString version = top.attribute( QString::fromLocal8Bit("version"), KRegExpEditorGUI::version );
- QDomNode child = top.firstChild();
+ TQString version = top.attribute( TQString::fromLocal8Bit("version"), KRegExpEditorGUI::version );
+ TQDomNode child = top.firstChild();
if ( ! child.isElement() ) {
KMessageBox::sorry( 0, i18n("<p>Error while reading XML file. The element just below the tag "
- "<b>%1</b> was not an element.</p>").arg(QString::fromLatin1("RegularExpression")),
+ "<b>%1</b> was not an element.</p>").arg(TQString::fromLatin1("RegularExpression")),
i18n("Error While Loading From XML File") ) ;
}
diff --git a/kregexpeditor/widgetfactory.h b/kregexpeditor/widgetfactory.h
index b1d1f26..3a55a74 100644
--- a/kregexpeditor/widgetfactory.h
+++ b/kregexpeditor/widgetfactory.h
@@ -18,7 +18,7 @@
#ifndef widgetfactory
#define widgetfactory
-#include <qdom.h>
+#include <tqdom.h>
class RegExpWidget;
class RegExpEditorWindow;
@@ -47,12 +47,12 @@ enum RegExpType {
class WidgetFactory
{
public:
- static RegExpWidget* createWidget( RegExpEditorWindow* editorWindow, QWidget* parent,
+ static RegExpWidget* createWidget( RegExpEditorWindow* editorWindow, TQWidget* parent,
RegExpType type );
static RegExpWidget* createWidget( RegExp* regexp, RegExpEditorWindow* editorWindow,
- QWidget* parent );
- static RegExp* createRegExp( QDomElement node, const QString& version );
- static RegExp* createRegExp( QString str );
+ TQWidget* parent );
+ static RegExp* createRegExp( TQDomElement node, const TQString& version );
+ static RegExp* createRegExp( TQString str );
static bool isContainer( RegExpType );
};
diff --git a/kregexpeditor/zerowidgets.cpp b/kregexpeditor/zerowidgets.cpp
index 94a15d5..f9de296 100644
--- a/kregexpeditor/zerowidgets.cpp
+++ b/kregexpeditor/zerowidgets.cpp
@@ -25,13 +25,13 @@
#include "zerowidgets.h"
#include "dotregexp.h"
#include "positionregexp.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include "myfontmetrics.h"
//--------------------------------------------------------------------------------
// ZeroWidget
//--------------------------------------------------------------------------------
-ZeroWidget::ZeroWidget(QString txt, RegExpEditorWindow* editorWindow,
- QWidget *parent, const char *name)
+ZeroWidget::ZeroWidget(TQString txt, RegExpEditorWindow* editorWindow,
+ TQWidget *parent, const char *name)
: RegExpWidget(editorWindow, parent, name ? name : "ZeroWidget" )
{
_text = txt;
@@ -42,21 +42,21 @@ void ZeroWidget::addNewChild(DragAccepter *, RegExpWidget *)
qFatal("No children should be added to this widget!");
}
-QSize ZeroWidget::sizeHint() const
+TQSize ZeroWidget::sizeHint() const
{
- QFontMetrics metrics = fontMetrics();
+ TQFontMetrics metrics = fontMetrics();
_textSize = HackCalculateFontSize( metrics, _text );
// _textSize = metrics.size(0,_text);
- _boxSize = QSize(_textSize.width() + 2*space, _textSize.height() + 2 *space);
+ _boxSize = TQSize(_textSize.width() + 2*space, _textSize.height() + 2 *space);
return _boxSize;
}
-void ZeroWidget::paintEvent( QPaintEvent *e)
+void ZeroWidget::paintEvent( TQPaintEvent *e)
{
// So what is my Size?
- QSize mySize = sizeHint();
+ TQSize mySize = sizeHint();
- QPainter painter(this);
+ TQPainter painter(this);
drawPossibleSelection( painter, mySize);
// Write the text and the rectangle
@@ -70,7 +70,7 @@ void ZeroWidget::paintEvent( QPaintEvent *e)
//--------------------------------------------------------------------------------
// AnyCharWidget
//--------------------------------------------------------------------------------
-AnyCharWidget::AnyCharWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+AnyCharWidget::AnyCharWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name)
: ZeroWidget(i18n("Any\nCharacter"), editorWindow, parent,
name ? name : "AnyCharWidget")
@@ -86,7 +86,7 @@ RegExp* AnyCharWidget::regExp() const
//--------------------------------------------------------------------------------
// BegLineWidget
//--------------------------------------------------------------------------------
-BegLineWidget::BegLineWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+BegLineWidget::BegLineWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name)
: ZeroWidget(i18n("Line\nStart"), editorWindow, parent,
name ? name : "BegLineWidget")
@@ -102,7 +102,7 @@ RegExp* BegLineWidget::regExp() const
//--------------------------------------------------------------------------------
// EndLineWidget
//--------------------------------------------------------------------------------
-EndLineWidget::EndLineWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+EndLineWidget::EndLineWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name)
: ZeroWidget(i18n("Line\nEnd"), editorWindow, parent, name)
{
@@ -116,7 +116,7 @@ RegExp* EndLineWidget::regExp() const
//--------------------------------------------------------------------------------
// WordBoundaryWidget
//--------------------------------------------------------------------------------
-WordBoundaryWidget::WordBoundaryWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+WordBoundaryWidget::WordBoundaryWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name)
: ZeroWidget(i18n("Word\nBoundary"), editorWindow, parent,
name ? name : "WordBoundaryWidget" )
@@ -131,7 +131,7 @@ RegExp* WordBoundaryWidget::regExp() const
//--------------------------------------------------------------------------------
// NonWordBoundaryWidget
//--------------------------------------------------------------------------------
-NonWordBoundaryWidget::NonWordBoundaryWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+NonWordBoundaryWidget::NonWordBoundaryWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name)
: ZeroWidget(i18n("Non-word\nBoundary"), editorWindow, parent,
name ? name : "NonWordBoundaryWidget" )
diff --git a/kregexpeditor/zerowidgets.h b/kregexpeditor/zerowidgets.h
index cd5e9be..04dd5c7 100644
--- a/kregexpeditor/zerowidgets.h
+++ b/kregexpeditor/zerowidgets.h
@@ -27,19 +27,19 @@
class ZeroWidget :public RegExpWidget
{
public:
- ZeroWidget(QString text, RegExpEditorWindow* editorWindow, QWidget *parent,
+ ZeroWidget(TQString text, RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name = 0);
virtual void addNewChild(DragAccepter *accepter, RegExpWidget *child);
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
protected:
- virtual void paintEvent( QPaintEvent *e );
+ virtual void paintEvent( TQPaintEvent *e );
private:
- QString _text;
+ TQString _text;
- mutable QSize _textSize;
- mutable QSize _boxSize;
+ mutable TQSize _textSize;
+ mutable TQSize _boxSize;
};
@@ -51,7 +51,7 @@ private:
class AnyCharWidget :public ZeroWidget
{
public:
- AnyCharWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+ AnyCharWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *label = 0);
virtual RegExp* regExp() const;
@@ -68,7 +68,7 @@ public:
class BegLineWidget : public ZeroWidget
{
public:
- BegLineWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+ BegLineWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name = 0);
virtual RegExp* regExp() const;
virtual RegExpType type() const { return BEGLINE; }
@@ -84,7 +84,7 @@ public:
class EndLineWidget : public ZeroWidget
{
public:
- EndLineWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+ EndLineWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name = 0);
virtual RegExp* regExp() const;
virtual RegExpType type() const { return ENDLINE; }
@@ -99,7 +99,7 @@ public:
class WordBoundaryWidget : public ZeroWidget
{
public:
- WordBoundaryWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+ WordBoundaryWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name = 0);
virtual RegExp* regExp() const;
virtual RegExpType type() const { return WORDBOUNDARY; }
@@ -115,7 +115,7 @@ public:
class NonWordBoundaryWidget : public ZeroWidget
{
public:
- NonWordBoundaryWidget(RegExpEditorWindow* editorWindow, QWidget *parent,
+ NonWordBoundaryWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
const char *name = 0);
virtual RegExp* regExp() const;
virtual RegExpType type() const { return NONWORDBOUNDARY; }