summaryrefslogtreecommitdiffstats
path: root/kregexpeditor/KMultiFormListBox
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
commit5f5ee2367157176ed223b86343eb0a9e4022e020 (patch)
tree6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /kregexpeditor/KMultiFormListBox
parent4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff)
downloadtdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz
tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kregexpeditor/KMultiFormListBox')
-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
19 files changed, 160 insertions, 160 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();