diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
commit | e985f7e545f4739493965aad69bbecb136dc9346 (patch) | |
tree | 54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /kommander/widgets | |
parent | f7670c198945adc3b95ad69a959fe5f8ae55b493 (diff) | |
download | tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip |
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/widgets')
67 files changed, 358 insertions, 322 deletions
diff --git a/kommander/widgets/aboutdialog.cpp b/kommander/widgets/aboutdialog.cpp index 9377b377..4425412c 100644 --- a/kommander/widgets/aboutdialog.cpp +++ b/kommander/widgets/aboutdialog.cpp @@ -36,8 +36,8 @@ enum Functions { LastFunction }; -AboutDialog::AboutDialog(TQWidget *parent, const char *name) - : TQLabel(parent, name), KommanderWidget(this) +AboutDialog::AboutDialog(TQWidget *tqparent, const char *name) + : TQLabel(tqparent, name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; diff --git a/kommander/widgets/aboutdialog.h b/kommander/widgets/aboutdialog.h index 64d6c9ab..5837f355 100644 --- a/kommander/widgets/aboutdialog.h +++ b/kommander/widgets/aboutdialog.h @@ -24,11 +24,12 @@ class KAboutData; class AboutDialog : public TQLabel, public KommanderWidget { Q_OBJECT - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_OBJECT + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) public: - AboutDialog(TQWidget *parent = 0, const char *name = 0); + AboutDialog(TQWidget *tqparent = 0, const char *name = 0); ~AboutDialog(); diff --git a/kommander/widgets/buttongroup.cpp b/kommander/widgets/buttongroup.cpp index 751c8e5c..6b0feef3 100644 --- a/kommander/widgets/buttongroup.cpp +++ b/kommander/widgets/buttongroup.cpp @@ -39,7 +39,7 @@ enum Functions { }; ButtonGroup::ButtonGroup(TQWidget *a_parent, const char *a_name) - : TQButtonGroup(a_parent, a_name), KommanderWidget(this) + : TQButtonGroup(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "checked"; @@ -109,7 +109,7 @@ void ButtonGroup::contextMenuEvent( TQContextMenuEvent * e ) bool ButtonGroup::isFunctionSupported(int f) { - return f == DCOP::text || f == DCOP::checked || f == DCOP::setChecked || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction); + return f == DCOP::text || f == DCOP::checked || f == DCOP::setChecked || f == DCOP::tqgeometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction); } @@ -120,8 +120,8 @@ TQString ButtonGroup::handleDCOP(int function, const TQStringList& args) { TQString text; for (int i = 0; i < count(); i++) - if (dynamic_cast<KommanderWidget*>(find(i))) - text += (dynamic_cast<KommanderWidget*>(find(i)))->evalAssociatedText(); + if (dynamic_cast<KommanderWidget*>(tqfind(i))) + text += (dynamic_cast<KommanderWidget*>(tqfind(i)))->evalAssociatedText(); return text; } case DCOP::checked: @@ -133,7 +133,7 @@ TQString ButtonGroup::handleDCOP(int function, const TQStringList& args) case BG_selectedId: return TQString::number(this->selectedId() ); break; - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/buttongroup.h b/kommander/widgets/buttongroup.h index 67252a5c..ff7d5edb 100644 --- a/kommander/widgets/buttongroup.h +++ b/kommander/widgets/buttongroup.h @@ -34,10 +34,11 @@ class TQShowEvent; class KOMMANDER_EXPORT ButtonGroup : public TQButtonGroup, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget DESIGNABLE false) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget DESIGNABLE false) public: ButtonGroup(TQWidget *a_parent, const char *a_name); ~ButtonGroup(); diff --git a/kommander/widgets/checkbox.cpp b/kommander/widgets/checkbox.cpp index f7fe20be..696a9b2b 100644 --- a/kommander/widgets/checkbox.cpp +++ b/kommander/widgets/checkbox.cpp @@ -29,7 +29,7 @@ #include "checkbox.h" CheckBox::CheckBox(TQWidget *a_parent, const char *a_name) - : TQCheckBox(a_parent, a_name), KommanderWidget(this) + : TQCheckBox(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "unchecked"; @@ -102,7 +102,7 @@ void CheckBox::showEvent(TQShowEvent* e) bool CheckBox::isFunctionSupported(int f) { - return f == DCOP::text || f == DCOP::setText || f == DCOP::checked || f == DCOP::setChecked || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor; + return f == DCOP::text || f == DCOP::setText || f == DCOP::checked || f == DCOP::setChecked || f == DCOP::tqgeometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor; } void CheckBox::contextMenuEvent( TQContextMenuEvent * e ) @@ -125,7 +125,7 @@ TQString CheckBox::handleDCOP(int function, const TQStringList& args) case DCOP::setChecked: setChecked(args[0] != "false" && args[0] != "0"); break; - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/checkbox.h b/kommander/widgets/checkbox.h index 4dde80de..acd2144f 100644 --- a/kommander/widgets/checkbox.h +++ b/kommander/widgets/checkbox.h @@ -34,10 +34,11 @@ class TQShowEvent; class KOMMANDER_EXPORT CheckBox : public TQCheckBox, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: CheckBox(TQWidget *a_parent, const char *a_name); ~CheckBox(); diff --git a/kommander/widgets/closebutton.cpp b/kommander/widgets/closebutton.cpp index 9a9aa4f8..a8892d13 100644 --- a/kommander/widgets/closebutton.cpp +++ b/kommander/widgets/closebutton.cpp @@ -31,7 +31,7 @@ #include "closebutton.h" CloseButton::CloseButton(TQWidget* a_parent, const char* a_name) - : KPushButton(a_parent, a_name), KommanderWidget(this) + : KPushButton(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -41,14 +41,14 @@ CloseButton::CloseButton(TQWidget* a_parent, const char* a_name) connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(startProcess())); - TQObject *parent = this; - while (parent->parent() != 0) + TQObject *tqparent = TQT_TQOBJECT(this); + while (tqparent->tqparent() != 0) { - parent = parent->parent(); - if (parent->inherits(TQDIALOG_OBJECT_NAME_STRING)) + tqparent = tqparent->tqparent(); + if (tqparent->inherits(TQDIALOG_OBJECT_NAME_STRING)) break; } - connect(this, TQT_SIGNAL(clicked()), parent, TQT_SLOT(reject())); + connect(this, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(reject())); } CloseButton::~CloseButton() diff --git a/kommander/widgets/closebutton.h b/kommander/widgets/closebutton.h index 42ff3627..c1971588 100644 --- a/kommander/widgets/closebutton.h +++ b/kommander/widgets/closebutton.h @@ -33,11 +33,12 @@ class TQShowEvent; class KOMMANDER_EXPORT CloseButton : public KPushButton, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) - Q_PROPERTY(bool writeStdout READ writeStdout WRITE setWriteStdout) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(bool writeStdout READ writeStdout WRITE setWriteStdout) public: CloseButton(TQWidget* a_parent, const char* a_name); ~CloseButton(); diff --git a/kommander/widgets/combobox.cpp b/kommander/widgets/combobox.cpp index cab29337..4efa3a2c 100644 --- a/kommander/widgets/combobox.cpp +++ b/kommander/widgets/combobox.cpp @@ -30,14 +30,14 @@ #include "combobox.h" enum Functions { - FirstFunction = 353, //CHANGE THIS NUMBER TO AN UNIQUE ONE!!! + FirstFunction = 353, //CHANGE THIS NUMBER TO AN UNITQUE ONE!!! popupList, LastFunction }; ComboBox::ComboBox(TQWidget *a_parent, const char *a_name) - : KComboBox(a_parent, a_name), KommanderWidget(this) + : KComboBox(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -121,7 +121,7 @@ bool ComboBox::isFunctionSupported(int f) return f == DCOP::text || f == DCOP::selection || f == DCOP::setSelection || f == DCOP::currentItem || f == DCOP::setCurrentItem || f == DCOP::item || f == DCOP::removeItem || f == DCOP::insertItem || f == DCOP::insertItems || - f == DCOP::addUniqueItem || f == DCOP::clear || f == DCOP::count || f == DCOP::setEditable || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction); + f == DCOP::addUniqueItem || f == DCOP::clear || f == DCOP::count || f == DCOP::setEditable || f == DCOP::tqgeometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction); } TQString ComboBox::handleDCOP(int function, const TQStringList& args) @@ -192,7 +192,7 @@ TQString ComboBox::handleDCOP(int function, const TQStringList& args) case popupList: TQComboBox::popup(); break; - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/combobox.h b/kommander/widgets/combobox.h index 5fb5306d..4ba5393b 100644 --- a/kommander/widgets/combobox.h +++ b/kommander/widgets/combobox.h @@ -34,10 +34,11 @@ class TQShowEvent; class KOMMANDER_EXPORT ComboBox : public KComboBox, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: ComboBox(TQWidget *a_parent, const char *a_name); diff --git a/kommander/widgets/datepicker.cpp b/kommander/widgets/datepicker.cpp index 928e1b81..1e321ed5 100644 --- a/kommander/widgets/datepicker.cpp +++ b/kommander/widgets/datepicker.cpp @@ -27,7 +27,7 @@ #include "datepicker.h" DatePicker::DatePicker(TQWidget *a_parent, const char *a_name) - : KDatePicker(a_parent, a_name), KommanderWidget(this) + : KDatePicker(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -101,7 +101,7 @@ void DatePicker::contextMenuEvent( TQContextMenuEvent * e ) bool DatePicker::isFunctionSupported(int f) { - return f == DCOP::text || f == DCOP::setText || f == DCOP::geometry || f == DCOP::hasFocus ; + return f == DCOP::text || f == DCOP::setText || f == DCOP::tqgeometry || f == DCOP::hasFocus ; } TQString DatePicker::handleDCOP(int function, const TQStringList& args) @@ -112,7 +112,7 @@ TQString DatePicker::handleDCOP(int function, const TQStringList& args) case DCOP::setText: setDate(TQDate::fromString(args[0], Qt::ISODate)); break; - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/datepicker.h b/kommander/widgets/datepicker.h index 61644f92..ebf3a7da 100644 --- a/kommander/widgets/datepicker.h +++ b/kommander/widgets/datepicker.h @@ -34,10 +34,11 @@ class TQShowEvent; class KOMMANDER_EXPORT DatePicker : public KDatePicker, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: DatePicker(TQWidget *a_parent, const char *a_name); diff --git a/kommander/widgets/dialog.cpp b/kommander/widgets/dialog.cpp index fd3b0b27..15dd7e30 100644 --- a/kommander/widgets/dialog.cpp +++ b/kommander/widgets/dialog.cpp @@ -34,14 +34,14 @@ enum Functions { FirstFunction = 185, - D_focusWidget, + D_tqfocusWidget, D_waitCursor, D_restoreCursor, LastFunction }; Dialog::Dialog(TQWidget *a_parent, const char *a_name, bool a_modal, int a_flags) - : TQDialog(a_parent, a_name, a_modal, a_flags), KommanderWindow(this) + : TQDialog(a_parent, a_name, a_modal, a_flags), KommanderWindow(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -53,7 +53,7 @@ Dialog::Dialog(TQWidget *a_parent, const char *a_name, bool a_modal, int a_flags m_shebang = "#!/usr/bin/kmdr-executor"; m_firstShow = true; KommanderPlugin::setDefaultGroup(Group::DCOP); - KommanderPlugin::registerFunction(D_focusWidget, "focusWidget(TQString widget)", i18n("The name of the widget having focus"), 1); + KommanderPlugin::registerFunction(D_tqfocusWidget, "tqfocusWidget(TQString widget)", i18n("The name of the widget having focus"), 1); KommanderPlugin::registerFunction(D_waitCursor, "waitCursor(TQString widget)", i18n("Set a wait cursor. CAUTION: if set more than once an equal number of calls to restore must be made to clear it."), 1); KommanderPlugin::registerFunction(D_restoreCursor, "restoreCursor(TQString widget)", i18n("Restore normal curser. NOTE: must be called as many times as wait was."), 1); } @@ -148,7 +148,7 @@ void Dialog::show() { //if the dialog is embedded in a KPart, the show can be called many times. //to avoid re-init and sending signals we don't want, in that case call only the -//QWidget's show method to show the widgets, but don't do any TQDialog specific +//TQWidget's show method to show the widgets, but don't do any TQDialog specific //task if (!m_firstShow) { @@ -193,7 +193,7 @@ void Dialog::contextMenuEvent( TQContextMenuEvent * e ) bool Dialog::isFunctionSupported(int f) { - return f == DCOP::text || f == DCOP::setText || f == DCOP::geometry || (f > FirstFunction && f < LastFunction); + return f == DCOP::text || f == DCOP::setText || f == DCOP::tqgeometry || (f > FirstFunction && f < LastFunction); } TQString Dialog::handleDCOP(int function, const TQStringList& args) @@ -204,14 +204,14 @@ TQString Dialog::handleDCOP(int function, const TQStringList& args) case DCOP::setText: setWidgetText(args[0]); break; - case DCOP::geometry: + case DCOP::tqgeometry: return TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); break; - case D_focusWidget: - return focusWidget()->name(); + case D_tqfocusWidget: + return tqfocusWidget()->name(); break; case D_waitCursor: - TQApplication::setOverrideCursor(TQCursor(Qt::WaitCursor)); + TQApplication::setOverrideCursor(TQCursor(TQt::WaitCursor)); break; case D_restoreCursor: TQApplication::restoreOverrideCursor(); diff --git a/kommander/widgets/dialog.h b/kommander/widgets/dialog.h index 90fa11c1..1c8cf5d6 100644 --- a/kommander/widgets/dialog.h +++ b/kommander/widgets/dialog.h @@ -29,14 +29,15 @@ class TQShowEvent; class KOMMANDER_EXPORT Dialog : public TQDialog, public KommanderWindow { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) - Q_PROPERTY(bool useInternalParser READ useInternalParser WRITE setUseInternalParser) - Q_PROPERTY(bool useShebang READ useShebang WRITE setUseShebang DESIGNABLE true) - Q_PROPERTY(TQString shebang READ Shebang WRITE setShebang DESIGNABLE true) - Q_OVERRIDE(bool modal DESIGNABLE false) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(bool useInternalParser READ useInternalParser WRITE setUseInternalParser) + TQ_PROPERTY(bool useShebang READ useShebang WRITE setUseShebang DESIGNABLE true) + TQ_PROPERTY(TQString shebang READ Shebang WRITE setShebang DESIGNABLE true) + TQ_OVERRIDE(bool modal DESIGNABLE false) public: Dialog(TQWidget *, const char *, bool = true, int=0); diff --git a/kommander/widgets/execbutton.cpp b/kommander/widgets/execbutton.cpp index eccfe306..be8f109d 100644 --- a/kommander/widgets/execbutton.cpp +++ b/kommander/widgets/execbutton.cpp @@ -40,7 +40,7 @@ using namespace std; enum Functions { - FirstFunction = 260, //CHANGE THIS NUMBER TO AN UNIQUE ONE!!! + FirstFunction = 260, //CHANGE THIS NUMBER TO AN UNITQUE ONE!!! EB_isOn, EB_setPopup, EB_setButtonText, @@ -48,7 +48,7 @@ enum Functions { }; ExecButton::ExecButton(TQWidget* a_parent, const char* a_name) - : KPushButton(a_parent, a_name), KommanderWidget(this) + : KPushButton(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -113,11 +113,11 @@ void ExecButton::setWidgetText(const TQString& a_text) void ExecButton::startProcess() { TQString at = evalAssociatedText().stripWhiteSpace(); - bool enabledStatus = isEnabled(); + bool enabledtqStatus = isEnabled(); if (m_blockGUI != None) setEnabled(false); if (m_blockGUI == GUI) - KApplication::setOverrideCursor(TQCursor(Qt::WaitCursor)); + KApplication::setOverrideCursor(TQCursor(TQt::WaitCursor)); MyProcess* process = new MyProcess(this); process->setBlocking(m_blockGUI == GUI); connect(process, TQT_SIGNAL(processExited(MyProcess*)), TQT_SLOT(processExited(MyProcess*))); @@ -128,7 +128,7 @@ void ExecButton::startProcess() if (writeStdout()) cout << m_output << flush; } - setEnabled(enabledStatus); + setEnabled(enabledtqStatus); } @@ -180,7 +180,7 @@ void ExecButton::contextMenuEvent( TQContextMenuEvent * e ) bool ExecButton::isFunctionSupported(int f) { - return f == DCOP::text || f == DCOP::setText || f == DCOP::execute || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction); + return f == DCOP::text || f == DCOP::setText || f == DCOP::execute || f == DCOP::tqgeometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction); } TQString ExecButton::handleDCOP(int function, const TQStringList& args) @@ -202,7 +202,7 @@ TQString ExecButton::handleDCOP(int function, const TQStringList& args) break; case EB_setPopup: { - TQWidgetList *list = TQApplication::allWidgets(); + TQWidgetList *list = TQApplication::tqallWidgets(); TQWidgetListIt it( *list ); TQWidget * w; while ( (w=it.current()) != 0 ) { // for each widget... @@ -215,7 +215,7 @@ TQString ExecButton::handleDCOP(int function, const TQStringList& args) } break; } - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/execbutton.h b/kommander/widgets/execbutton.h index b646e5e7..6e8c478f 100644 --- a/kommander/widgets/execbutton.h +++ b/kommander/widgets/execbutton.h @@ -36,13 +36,14 @@ class TQShowEvent; class KOMMANDER_EXPORT ExecButton : public KPushButton, public KommanderWidget { Q_OBJECT + TQ_OBJECT Q_ENUMS(Blocking) - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) - Q_PROPERTY(bool writeStdout READ writeStdout WRITE setWriteStdout) - Q_PROPERTY(Blocking blockGUI READ blockGUI WRITE setBlockGUI) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(bool writeStdout READ writeStdout WRITE setWriteStdout) + TQ_PROPERTY(Blocking blockGUI READ blockGUI WRITE setBlockGUI) public: ExecButton(TQWidget *a_parent, const char *a_name); diff --git a/kommander/widgets/fileselector.cpp b/kommander/widgets/fileselector.cpp index a7c29673..f6806e5b 100644 --- a/kommander/widgets/fileselector.cpp +++ b/kommander/widgets/fileselector.cpp @@ -35,7 +35,7 @@ #include "fileselector.h" FileSelector::FileSelector(TQWidget * a_parent, const char *a_name) - : TQWidget(a_parent, a_name), KommanderWidget(this) + : TQWidget(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -50,9 +50,9 @@ FileSelector::FileSelector(TQWidget * a_parent, const char *a_name) m_boxLayout->addWidget(m_lineEdit); m_boxLayout->addWidget(m_selectButton); - setSizePolicy(m_lineEdit->sizePolicy()); - m_lineEdit->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); - m_selectButton->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding)); + tqsetSizePolicy(m_lineEdit->sizePolicy()); + m_lineEdit->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); + m_selectButton->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding)); connect(m_selectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(makeSelection())); @@ -222,13 +222,13 @@ TQString FileSelector::handleDCOP(int function, const TQStringList& args) return m_lineEdit->selectedText(); case DCOP::setSelection: { - int f = m_lineEdit->text().find(args[0]); + int f = m_lineEdit->text().tqfind(args[0]); if (f != -1) m_lineEdit->setSelection(f, args[0].length()); break; } case DCOP::clear: - setWidgetText(TQString::null); + setWidgetText(TQString()); break; default: return KommanderWidget::handleDCOP(function, args); diff --git a/kommander/widgets/fileselector.h b/kommander/widgets/fileselector.h index 44758131..fd254fd6 100644 --- a/kommander/widgets/fileselector.h +++ b/kommander/widgets/fileselector.h @@ -36,17 +36,18 @@ class TQShowEvent; class KOMMANDER_EXPORT FileSelector : public TQWidget, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) - Q_PROPERTY(bool showEditor READ showEditor WRITE setShowEditor) - Q_PROPERTY(TQString buttonCaption READ caption WRITE setCaption) - Q_PROPERTY(TQString selectionFilter READ selectionFilter WRITE setSelectionFilter) - Q_PROPERTY(TQString selectionCaption READ selectionCaption WRITE setSelectionCaption) - Q_PROPERTY(SelectionType selectionType READ selectionType WRITE setSelectionType) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(bool showEditor READ showEditor WRITE setShowEditor) + TQ_PROPERTY(TQString buttonCaption READ caption WRITE setCaption) + TQ_PROPERTY(TQString selectionFilter READ selectionFilter WRITE setSelectionFilter) + TQ_PROPERTY(TQString selectionCaption READ selectionCaption WRITE setSelectionCaption) + TQ_PROPERTY(SelectionType selectionType READ selectionType WRITE setSelectionType) Q_ENUMS(SelectionType) - Q_PROPERTY(bool selectionOpenMultiple READ selectionOpenMultiple WRITE setSelectionOpenMultiple) + TQ_PROPERTY(bool selectionOpenMultiple READ selectionOpenMultiple WRITE setSelectionOpenMultiple) public: FileSelector(TQWidget *a_parent, const char *a_name); diff --git a/kommander/widgets/fontdialog.cpp b/kommander/widgets/fontdialog.cpp index 5fc17edc..3efde0f4 100644 --- a/kommander/widgets/fontdialog.cpp +++ b/kommander/widgets/fontdialog.cpp @@ -28,8 +28,8 @@ enum Functions { LastFunction }; -FontDialog::FontDialog(TQWidget *parent, const char *name) - : TQLabel(parent, name), KommanderWidget(this) +FontDialog::FontDialog(TQWidget *tqparent, const char *name) + : TQLabel(tqparent, name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; diff --git a/kommander/widgets/fontdialog.h b/kommander/widgets/fontdialog.h index f7ccdf0f..46c828e2 100644 --- a/kommander/widgets/fontdialog.h +++ b/kommander/widgets/fontdialog.h @@ -23,11 +23,12 @@ class FontDialog : public TQLabel, public KommanderWidget { Q_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_OBJECT + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - FontDialog(TQWidget *parent = 0, const char *name = 0); + FontDialog(TQWidget *tqparent = 0, const char *name = 0); ~FontDialog(); @@ -44,6 +45,7 @@ public slots: virtual void setWidgetText(const TQString &); virtual void populate(); +public: TQFont m_font; }; diff --git a/kommander/widgets/groupbox.cpp b/kommander/widgets/groupbox.cpp index 7ca1c199..aef8042d 100644 --- a/kommander/widgets/groupbox.cpp +++ b/kommander/widgets/groupbox.cpp @@ -32,7 +32,7 @@ GroupBox::GroupBox(TQWidget *a_parent, const char *a_name) - : TQGroupBox(a_parent, a_name), KommanderWidget(this) + : TQGroupBox(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -84,13 +84,13 @@ void GroupBox::populate() void GroupBox::insertChild(TQObject *a_child) { m_childList.append(a_child); - TQObject::insertChild(a_child); + TQT_TQOBJECT(this)->TQObject::insertChild(a_child); } void GroupBox::removeChild(TQObject *a_child) { m_childList.remove(a_child); - TQObject::removeChild(a_child); + TQT_TQOBJECT(this)->TQObject::removeChild(a_child); } void GroupBox::showEvent( TQShowEvent *e ) @@ -108,7 +108,7 @@ void GroupBox::contextMenuEvent( TQContextMenuEvent * e ) bool GroupBox::isFunctionSupported(int f) { - return f == DCOP::text || f == DCOP::setText || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor; + return f == DCOP::text || f == DCOP::setText || f == DCOP::tqgeometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor; // || (f >= FirstFunction && f <= LastFunction); } @@ -126,7 +126,7 @@ TQString GroupBox::handleDCOP(int function, const TQStringList& args) case DCOP::setText: setTitle(args[0]); break; - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/groupbox.h b/kommander/widgets/groupbox.h index b624cd15..ebfd9a74 100644 --- a/kommander/widgets/groupbox.h +++ b/kommander/widgets/groupbox.h @@ -34,10 +34,11 @@ class TQShowEvent; class KOMMANDER_EXPORT GroupBox : public TQGroupBox, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: GroupBox(TQWidget *a_parent, const char *a_name); ~GroupBox(); diff --git a/kommander/widgets/konsole.cpp b/kommander/widgets/konsole.cpp index c27cb8fe..728d9b1f 100644 --- a/kommander/widgets/konsole.cpp +++ b/kommander/widgets/konsole.cpp @@ -26,7 +26,7 @@ #include <myprocess.h> Konsole::Konsole(TQWidget* a_parent, const char* a_name) - : KTextEdit(a_parent, a_name), KommanderWidget(this), mSeenEOL(false), mProcess(false) + : KTextEdit(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)), mSeenEOL(false), mProcess(false) { TQStringList states; states << "default"; @@ -89,7 +89,7 @@ void Konsole::execute() mProcess->setBlocking(false); connect(mProcess, TQT_SIGNAL(processExited(MyProcess*)), TQT_SLOT(processExited(MyProcess*))); connect(mProcess, TQT_SIGNAL(processReceivedStdout(MyProcess*, char*, int)), TQT_SLOT(processReceivedStdout(MyProcess*, char*, int))); - setCursor(TQCursor(Qt::WaitCursor)); + setCursor(TQCursor(TQt::WaitCursor)); mProcess->run(at); } diff --git a/kommander/widgets/konsole.h b/kommander/widgets/konsole.h index 894060f9..efd34042 100644 --- a/kommander/widgets/konsole.h +++ b/kommander/widgets/konsole.h @@ -32,11 +32,12 @@ class MyProcess; class KOMMANDER_EXPORT Konsole : public KTextEdit, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_OVERRIDE(bool readOnly DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_OVERRIDE(bool readOnly DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: Konsole(TQWidget *a_parent, const char *a_name); diff --git a/kommander/widgets/label.cpp b/kommander/widgets/label.cpp index ee422325..ce56b3c4 100644 --- a/kommander/widgets/label.cpp +++ b/kommander/widgets/label.cpp @@ -26,7 +26,7 @@ #include "label.h" Label::Label(TQWidget *a_parent, const char *a_name) - : TQLabel(a_parent, a_name), KommanderWidget(this) + : TQLabel(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -88,7 +88,7 @@ void Label::showEvent(TQShowEvent *e) bool Label::isFunctionSupported(int f) { - return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor; + return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::tqgeometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor; } TQString Label::handleDCOP(int function, const TQStringList& args) @@ -102,7 +102,7 @@ TQString Label::handleDCOP(int function, const TQStringList& args) case DCOP::clear: setWidgetText(""); break; - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/label.h b/kommander/widgets/label.h index 70b8b248..31a25198 100644 --- a/kommander/widgets/label.h +++ b/kommander/widgets/label.h @@ -33,10 +33,11 @@ class TQShowEvent; class KOMMANDER_EXPORT Label : public TQLabel, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: Label(TQWidget *a_parent, const char *a_name); ~Label(); diff --git a/kommander/widgets/lineedit.cpp b/kommander/widgets/lineedit.cpp index 08913b4e..2f4f9de6 100644 --- a/kommander/widgets/lineedit.cpp +++ b/kommander/widgets/lineedit.cpp @@ -31,7 +31,7 @@ enum functions { }; LineEdit::LineEdit(TQWidget *a_parent, const char *a_name) - : KLineEdit(a_parent, a_name), KommanderWidget((TQObject *)this) + : KLineEdit(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -124,7 +124,7 @@ void LineEdit::contextMenuEvent( TQContextMenuEvent * e ) bool LineEdit::isFunctionSupported(int f) { return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::setSelection || - f == DCOP::clear || f == DCOP::setEditable || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || f == DCOP::isModified || (f >= FirstFunction && f <= LastFunction) ; + f == DCOP::clear || f == DCOP::setEditable || f == DCOP::tqgeometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || f == DCOP::isModified || (f >= FirstFunction && f <= LastFunction) ; } TQString LineEdit::handleDCOP(int function, const TQStringList& args) @@ -146,7 +146,7 @@ TQString LineEdit::handleDCOP(int function, const TQStringList& args) case DCOP::setEditable: setReadOnly(args[0] == "false" || args[0] == "0"); break; - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/lineedit.h b/kommander/widgets/lineedit.h index d0ee32f5..654ff4dc 100644 --- a/kommander/widgets/lineedit.h +++ b/kommander/widgets/lineedit.h @@ -34,10 +34,11 @@ class TQShowEvent; class KOMMANDER_EXPORT LineEdit : public KLineEdit, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: LineEdit(TQWidget *, const char *); virtual ~LineEdit(); diff --git a/kommander/widgets/listbox.cpp b/kommander/widgets/listbox.cpp index 3dd36357..1135a540 100644 --- a/kommander/widgets/listbox.cpp +++ b/kommander/widgets/listbox.cpp @@ -30,7 +30,7 @@ #include "listbox.h" ListBox::ListBox(TQWidget *a_parent, const char *a_name) - : KListBox(a_parent, a_name), KommanderWidget(this) + : KListBox(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -96,7 +96,7 @@ bool ListBox::isFunctionSupported(int f) return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::setSelection || f == DCOP::insertItems || f == DCOP::insertItem || f == DCOP::removeItem || f == DCOP::clear || f == DCOP::currentItem || f == DCOP::setCurrentItem || f == DCOP::item || f == DCOP::addUniqueItem || - f == DCOP::findItem || f == DCOP::setPixmap || f == DCOP::count || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor; + f == DCOP::findItem || f == DCOP::setPixmap || f == DCOP::count || f == DCOP::tqgeometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor; } void ListBox::contextMenuEvent( TQContextMenuEvent * e ) @@ -125,7 +125,7 @@ TQString ListBox::handleDCOP(int function, const TQStringList& args) } case DCOP::setSelection: { - TQListBoxItem* found = findItem(args[0], Qt::ExactMatch); + TQListBoxItem* found = tqfindItem(args[0], TQt::ExactMatch); if (found) setCurrentItem(index(found)); break; @@ -162,14 +162,14 @@ TQString ListBox::handleDCOP(int function, const TQStringList& args) return TQString(); } case DCOP::addUniqueItem: - if (!findItem(args[0], Qt::ExactMatch)) + if (!tqfindItem(args[0], TQt::ExactMatch)) insertItem(args[0]); break; case DCOP::findItem: { - TQListBoxItem* found = findItem(args[0], Qt::ExactMatch); - if (!found) found = findItem(args[0], Qt::BeginsWith); - if (!found) found = findItem(args[0], Qt::Contains); + TQListBoxItem* found = tqfindItem(args[0], TQt::ExactMatch); + if (!found) found = tqfindItem(args[0], TQt::BeginsWith); + if (!found) found = tqfindItem(args[0], TQt::Contains); if (found) return TQString::number(index(found)); else return TQString::number(-1); @@ -197,7 +197,7 @@ TQString ListBox::handleDCOP(int function, const TQStringList& args) strings += item(i)->text(); return strings.join("\n"); } - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/listbox.h b/kommander/widgets/listbox.h index dd59bc3b..84fff290 100644 --- a/kommander/widgets/listbox.h +++ b/kommander/widgets/listbox.h @@ -34,10 +34,11 @@ class TQShowEvent; class KOMMANDER_EXPORT ListBox : public KListBox, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: ListBox(TQWidget *a_parent, const char *a_name); ~ListBox(); diff --git a/kommander/widgets/pixmaplabel.cpp b/kommander/widgets/pixmaplabel.cpp index 78077c5c..e8b013db 100644 --- a/kommander/widgets/pixmaplabel.cpp +++ b/kommander/widgets/pixmaplabel.cpp @@ -31,7 +31,7 @@ #include "pixmaplabel.h" PixmapLabel::PixmapLabel(TQWidget *a_parent, const char *a_name) - : TQLabel(a_parent, a_name), KommanderWidget(this) + : TQLabel(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -103,7 +103,7 @@ void PixmapLabel::contextMenuEvent( TQContextMenuEvent * e ) bool PixmapLabel::isFunctionSupported(int f) { - return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::geometry; + return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::tqgeometry; } TQString PixmapLabel::handleDCOP(int function, const TQStringList& args) @@ -117,7 +117,7 @@ TQString PixmapLabel::handleDCOP(int function, const TQStringList& args) break; case DCOP::text: return text(); - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/pixmaplabel.h b/kommander/widgets/pixmaplabel.h index dbc3e113..72f66077 100644 --- a/kommander/widgets/pixmaplabel.h +++ b/kommander/widgets/pixmaplabel.h @@ -34,9 +34,10 @@ class TQShowEvent; class KOMMANDER_EXPORT PixmapLabel : public TQLabel, public KommanderWidget { Q_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_OBJECT + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: PixmapLabel(TQWidget *a_parent, const char *a_name); ~PixmapLabel(); diff --git a/kommander/widgets/plugin.cpp b/kommander/widgets/plugin.cpp index 020ae6da..009da398 100644 --- a/kommander/widgets/plugin.cpp +++ b/kommander/widgets/plugin.cpp @@ -57,7 +57,7 @@ class KomStdPlugin : public KommanderPlugin { public: KomStdPlugin(); - virtual TQWidget *create( const TQString &key, TQWidget *parent = 0, const char *name = 0 ); + virtual TQWidget *create( const TQString &key, TQWidget *tqparent = 0, const char *name = 0 ); }; KomStdPlugin::KomStdPlugin() @@ -97,41 +97,41 @@ KomStdPlugin::KomStdPlugin() addWidget("AboutDialog", group, "", new TQIconSet(KGlobal::iconLoader()->loadIcon("kommander", KIcon::NoGroup, KIcon::SizeMedium))); } -TQWidget *KomStdPlugin::create( const TQString &key, TQWidget *parent, const char *name ) +TQWidget *KomStdPlugin::create( const TQString &key, TQWidget *tqparent, const char *name ) { - if (key == "ButtonGroup") return new ButtonGroup(parent, name); - else if (key == "CheckBox") return new CheckBox(parent, name); - else if (key == "CloseButton") return new CloseButton(parent, name); - else if (key == "ComboBox") return new ComboBox(parent, name); - else if (key == "Dialog") return new Dialog(parent, name); - else if (key == "ExecButton") return new ExecButton(parent, name); - else if (key == "FileSelector") return new FileSelector(parent, name); - else if (key == "GroupBox") return new GroupBox(parent, name); - else if (key == "Konsole") return new Konsole(parent, name); - else if (key == "Label") return new Label(parent, name); - else if (key == "LineEdit") return new LineEdit(parent, name); - else if (key == "ListBox") return new ListBox(parent, name); - else if (key == "PixmapLabel") return new PixmapLabel(parent, name); - else if (key == "ProgressBar") return new ProgressBar(parent, name); - else if (key == "RadioButton") return new RadioButton(parent, name); - else if (key == "RichTextEditor") return new RichTextEditor(parent, name); - else if (key == "ScriptObject") return new ScriptObject(parent, name); - else if (key == "Slider") return new Slider(parent, name); - else if (key == "SpinBoxInt") return new SpinBoxInt(parent, name); - else if (key == "StatusBar") return new StatusBar(parent, name); - else if (key == "SubDialog") return new SubDialog(parent, name); - else if (key == "Table") return new Table(parent, name); - else if (key == "TabWidget") return new TabWidget(parent, name); - else if (key == "ToolBox") return new ToolBox(parent, name); - else if (key == "TextBrowser") return new TextBrowser(parent, name); - else if (key == "TextEdit") return new TextEdit(parent, name); - else if (key == "Timer") return new Timer(parent, name); - else if (key == "TreeWidget") return new TreeWidget(parent, name); - else if (key == "Wizard") return new Wizard(parent, name); - else if (key == "DatePicker") return new DatePicker(parent, name); - else if (key == "PopupMenu") return new PopupMenu(parent, name); - else if (key == "FontDialog") return new FontDialog(parent, name); - else if (key == "AboutDialog") return new AboutDialog(parent, name); + if (key == "ButtonGroup") return new ButtonGroup(tqparent, name); + else if (key == "CheckBox") return new CheckBox(tqparent, name); + else if (key == "CloseButton") return new CloseButton(tqparent, name); + else if (key == "ComboBox") return new ComboBox(tqparent, name); + else if (key == "Dialog") return new Dialog(tqparent, name); + else if (key == "ExecButton") return new ExecButton(tqparent, name); + else if (key == "FileSelector") return new FileSelector(tqparent, name); + else if (key == "GroupBox") return new GroupBox(tqparent, name); + else if (key == "Konsole") return new Konsole(tqparent, name); + else if (key == "Label") return new Label(tqparent, name); + else if (key == "LineEdit") return new LineEdit(tqparent, name); + else if (key == "ListBox") return new ListBox(tqparent, name); + else if (key == "PixmapLabel") return new PixmapLabel(tqparent, name); + else if (key == "ProgressBar") return new ProgressBar(tqparent, name); + else if (key == "RadioButton") return new RadioButton(tqparent, name); + else if (key == "RichTextEditor") return new RichTextEditor(tqparent, name); + else if (key == "ScriptObject") return new ScriptObject(tqparent, name); + else if (key == "Slider") return new Slider(tqparent, name); + else if (key == "SpinBoxInt") return new SpinBoxInt(tqparent, name); + else if (key == "StatusBar") return new StatusBar(tqparent, name); + else if (key == "SubDialog") return new SubDialog(tqparent, name); + else if (key == "Table") return new Table(tqparent, name); + else if (key == "TabWidget") return new TabWidget(tqparent, name); + else if (key == "ToolBox") return new ToolBox(tqparent, name); + else if (key == "TextBrowser") return new TextBrowser(tqparent, name); + else if (key == "TextEdit") return new TextEdit(tqparent, name); + else if (key == "Timer") return new Timer(tqparent, name); + else if (key == "TreeWidget") return new TreeWidget(tqparent, name); + else if (key == "Wizard") return new Wizard(tqparent, name); + else if (key == "DatePicker") return new DatePicker(tqparent, name); + else if (key == "PopupMenu") return new PopupMenu(tqparent, name); + else if (key == "FontDialog") return new FontDialog(tqparent, name); + else if (key == "AboutDialog") return new AboutDialog(tqparent, name); else return 0; } diff --git a/kommander/widgets/popupmenu.cpp b/kommander/widgets/popupmenu.cpp index 48bb4474..e00ee485 100644 --- a/kommander/widgets/popupmenu.cpp +++ b/kommander/widgets/popupmenu.cpp @@ -32,8 +32,8 @@ #define INSERTSUBMENU 109 #define LAST_FUNCTION INSERTSUBMENU -PopupMenu::PopupMenu(TQWidget *parent, const char *name) - : TQLabel(parent, name), KommanderWidget(this) +PopupMenu::PopupMenu(TQWidget *tqparent, const char *name) + : TQLabel(tqparent, name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -114,7 +114,7 @@ void PopupMenu::popup(int x, int y) void PopupMenu::slotMenuItemActivated(int id) { TQString widget = m_associations[id]; - KommanderWidget::evalAssociatedText(TQString("#!kommander\n%1.execute(%2)").arg(widget).arg(id)); + KommanderWidget::evalAssociatedText(TQString("#!kommander\n%1.execute(%2)").tqarg(widget).tqarg(id)); } void PopupMenu::populate() @@ -138,7 +138,7 @@ TQString PopupMenu::insertSubmenu(const TQString& title, const TQString &menuWid bool PopupMenu::isFunctionSupported(int f) { - return f == DCOP::clear || f == DCOP::execute || f == DCOP::item || (f >= INSERTMENUITEM && f <= LAST_FUNCTION) || f == DCOP::count || f == DCOP::geometry; + return f == DCOP::clear || f == DCOP::execute || f == DCOP::item || (f >= INSERTMENUITEM && f <= LAST_FUNCTION) || f == DCOP::count || f == DCOP::tqgeometry; } TQString PopupMenu::handleDCOP(int function, const TQStringList& args) @@ -223,13 +223,13 @@ TQString PopupMenu::handleDCOP(int function, const TQStringList& args) case DCOP::item: { uint index = args[0].toInt(); - return index < m_params.count() ? m_params[index] : TQString::null; + return index < m_params.count() ? m_params[index] : TQString(); break; } case DCOP::count: return TQString::number(m_menu->count()); break; - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/popupmenu.h b/kommander/widgets/popupmenu.h index dff28a86..9a0dc925 100644 --- a/kommander/widgets/popupmenu.h +++ b/kommander/widgets/popupmenu.h @@ -25,11 +25,12 @@ class KPopupMenu; class PopupMenu : public TQLabel, public KommanderWidget { Q_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_OBJECT + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - PopupMenu(TQWidget *parent = 0, const char *name = 0); + PopupMenu(TQWidget *tqparent = 0, const char *name = 0); ~PopupMenu(); virtual bool isKommanderWidget() const; diff --git a/kommander/widgets/progressbar.cpp b/kommander/widgets/progressbar.cpp index 30d4f329..b010af91 100644 --- a/kommander/widgets/progressbar.cpp +++ b/kommander/widgets/progressbar.cpp @@ -36,7 +36,7 @@ enum Functions { }; ProgressBar::ProgressBar(TQWidget *a_parent, const char *a_name) - : KProgress(a_parent, a_name), KommanderWidget(this) + : KProgress(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -94,7 +94,7 @@ void ProgressBar::showEvent(TQShowEvent *e) bool ProgressBar::isFunctionSupported(int f) { - return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::setMaximum || f == DCOP::geometry || (f > FirstFunction && f < LastFunction); + return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::setMaximum || f == DCOP::tqgeometry || (f > FirstFunction && f < LastFunction); } TQString ProgressBar::handleDCOP(int function, const TQStringList& args) @@ -111,7 +111,7 @@ TQString ProgressBar::handleDCOP(int function, const TQStringList& args) case DCOP::setMaximum: setTotalSteps(args[0].toUInt()); break; - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; @@ -123,7 +123,7 @@ TQString ProgressBar::handleDCOP(int function, const TQStringList& args) color.setNamedColor(args[0]); TQPalette p = this->palette(); p.setColor(TQPalette::Active, TQColorGroup::Highlight, color); - this->setPalette( p, TRUE ); + this->tqsetPalette( p, TRUE ); break; } case PB_setHightlightTextColor: @@ -132,7 +132,7 @@ TQString ProgressBar::handleDCOP(int function, const TQStringList& args) color.setNamedColor(args[0]); TQPalette p = this->palette(); p.setColor(TQPalette::Active, TQColorGroup::HighlightedText, color); - this->setPalette( p, TRUE ); + this->tqsetPalette( p, TRUE ); break; } default: diff --git a/kommander/widgets/progressbar.h b/kommander/widgets/progressbar.h index ca5daf8c..182a2faa 100644 --- a/kommander/widgets/progressbar.h +++ b/kommander/widgets/progressbar.h @@ -33,10 +33,11 @@ class TQShowEvent; class KOMMANDER_EXPORT ProgressBar: public KProgress, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: ProgressBar(TQWidget *a_parent, const char *a_name); diff --git a/kommander/widgets/radiobutton.cpp b/kommander/widgets/radiobutton.cpp index ba46248d..317263e4 100644 --- a/kommander/widgets/radiobutton.cpp +++ b/kommander/widgets/radiobutton.cpp @@ -28,7 +28,7 @@ #include "radiobutton.h" RadioButton::RadioButton(TQWidget *a_parent, const char *a_name) - : TQRadioButton(a_parent, a_name), KommanderWidget(this) + : TQRadioButton(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "unchecked"; @@ -101,7 +101,7 @@ void RadioButton::contextMenuEvent( TQContextMenuEvent * e ) bool RadioButton::isFunctionSupported(int f) { - return f == DCOP::text || f == DCOP::setText || f == DCOP::setChecked || f == DCOP::checked || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor; + return f == DCOP::text || f == DCOP::setText || f == DCOP::setChecked || f == DCOP::checked || f == DCOP::tqgeometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor; } TQString RadioButton::handleDCOP(int function, const TQStringList& args) @@ -117,7 +117,7 @@ TQString RadioButton::handleDCOP(int function, const TQStringList& args) break; case DCOP::checked: return TQString::number(isOn()); - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/radiobutton.h b/kommander/widgets/radiobutton.h index e93a96af..328cb853 100644 --- a/kommander/widgets/radiobutton.h +++ b/kommander/widgets/radiobutton.h @@ -33,10 +33,11 @@ class TQShowEvent; class KOMMANDER_EXPORT RadioButton : public TQRadioButton, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: RadioButton(TQWidget *a_parent, const char *a_name); ~RadioButton(); diff --git a/kommander/widgets/richtexteditor.cpp b/kommander/widgets/richtexteditor.cpp index 9e54f07c..e5de817b 100644 --- a/kommander/widgets/richtexteditor.cpp +++ b/kommander/widgets/richtexteditor.cpp @@ -43,7 +43,7 @@ #include "pixmaps/textright.xpm" RichTextEditor::RichTextEditor(TQWidget *a_parent, const char *a_name) - : TQWidget(a_parent, a_name), KommanderWidget((TQObject *)this) + : TQWidget(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; @@ -61,11 +61,11 @@ RichTextEditor::RichTextEditor(TQWidget *a_parent, const char *a_name) m_textedit = new TQTextEdit(this, "editor"); m_textedit->setTextFormat(RichText); - // layout the widgets - TQVBoxLayout *layout = new TQVBoxLayout(this); - layout->addWidget(m_toolbar); - layout->addWidget(m_textedit); - layout->setSpacing(1); + // tqlayout the widgets + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); + tqlayout->addWidget(m_toolbar); + tqlayout->addWidget(m_textedit); + tqlayout->setSpacing(1); // setup buttons TQHBoxLayout *tbLayout = new TQHBoxLayout(m_toolbar); @@ -106,7 +106,7 @@ RichTextEditor::RichTextEditor(TQWidget *a_parent, const char *a_name) connect(m_alignGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(textAlign(int))); connect(m_textedit, TQT_SIGNAL(currentFontChanged(const TQFont &)), this, TQT_SLOT(fontChanged(const TQFont &))); - connect(m_textedit, TQT_SIGNAL(currentAlignmentChanged(int)), this, TQT_SLOT(alignmentChanged(int))); + connect(m_textedit, TQT_SIGNAL(currentAlignmentChanged(int)), this, TQT_SLOT(tqalignmentChanged(int))); connect(m_textedit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(setTextChanged())); @@ -180,13 +180,13 @@ void RichTextEditor::textItalic(bool a_isOn) void RichTextEditor::textAlign(int a_id) { - TQToolButton *b = (TQToolButton *)m_alignGroup->find(a_id); + TQToolButton *b = (TQToolButton *)m_alignGroup->tqfind(a_id); if(b == m_buttonTextLeft) - m_textedit->setAlignment(Qt::AlignLeft); + m_textedit->tqsetAlignment(TQt::AlignLeft); else if(b == m_buttonTextCenter) - m_textedit->setAlignment(Qt::AlignCenter); + m_textedit->tqsetAlignment(TQt::AlignCenter); else if(b == m_buttonTextRight) - m_textedit->setAlignment(Qt::AlignRight); + m_textedit->tqsetAlignment(TQt::AlignRight); } void RichTextEditor::fontChanged(const TQFont &a_font) @@ -196,13 +196,13 @@ void RichTextEditor::fontChanged(const TQFont &a_font) m_buttonTextUnder->setOn(a_font.underline()); } -void RichTextEditor::alignmentChanged(int a_alignment) +void RichTextEditor::tqalignmentChanged(int a_tqalignment) { - if((a_alignment == AlignAuto) || (a_alignment & AlignLeft)) + if((a_tqalignment == AlignAuto) || (a_tqalignment & AlignLeft)) m_buttonTextLeft->setOn(true); - else if(a_alignment & AlignHCenter) + else if(a_tqalignment & AlignHCenter) m_buttonTextCenter->setOn(true); - else if(a_alignment & AlignRight) + else if(a_tqalignment & AlignRight) m_buttonTextRight->setOn(true); } diff --git a/kommander/widgets/richtexteditor.h b/kommander/widgets/richtexteditor.h index 17faf6b5..31347e96 100644 --- a/kommander/widgets/richtexteditor.h +++ b/kommander/widgets/richtexteditor.h @@ -37,10 +37,11 @@ class TQShowEvent; class KOMMANDER_EXPORT RichTextEditor : public TQWidget, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: RichTextEditor(TQWidget *, const char *); virtual ~RichTextEditor(); @@ -62,7 +63,7 @@ public slots: void textUnder(bool); void textItalic(bool); void fontChanged(const TQFont &); - void alignmentChanged(int); + void tqalignmentChanged(int); virtual void populate(); signals: void widgetOpened(); diff --git a/kommander/widgets/scriptobject.cpp b/kommander/widgets/scriptobject.cpp index 2824d81f..472bb98c 100644 --- a/kommander/widgets/scriptobject.cpp +++ b/kommander/widgets/scriptobject.cpp @@ -30,7 +30,7 @@ #include <specials.h> ScriptObject::ScriptObject(TQWidget *a_parent, const char *a_name) - : TQLabel(a_parent, a_name), KommanderWidget(this) + : TQLabel(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -93,7 +93,7 @@ void ScriptObject::populate() TQString ScriptObject::executeProcess(bool blocking) { - int index = ( states().findIndex( currentState()) ); + int index = ( states().tqfindIndex( currentState()) ); if (index == -1) { printError(i18n("Invalid state for associated text.")); @@ -169,7 +169,7 @@ TQString ScriptObject::handleDCOP(int function, const TQStringList& args) setAssociatedText(args[0]); break; case DCOP::clear: - setAssociatedText(TQString::null); + setAssociatedText(TQString()); break; case DCOP::execute: m_params = args; @@ -178,7 +178,7 @@ TQString ScriptObject::handleDCOP(int function, const TQStringList& args) case DCOP::item: { uint index = args[0].toInt(); - return index < m_params.count() ? m_params[index] : TQString::null; + return index < m_params.count() ? m_params[index] : TQString(); } case DCOP::count: return TQString::number(m_params.count()); diff --git a/kommander/widgets/scriptobject.h b/kommander/widgets/scriptobject.h index 325903cc..8a50f97e 100644 --- a/kommander/widgets/scriptobject.h +++ b/kommander/widgets/scriptobject.h @@ -29,10 +29,11 @@ class KOMMANDER_EXPORT ScriptObject : public TQLabel, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: ScriptObject(TQWidget *a_parent, const char *a_name); diff --git a/kommander/widgets/slider.cpp b/kommander/widgets/slider.cpp index b3bef6fc..b8068ede 100644 --- a/kommander/widgets/slider.cpp +++ b/kommander/widgets/slider.cpp @@ -23,7 +23,7 @@ #include "slider.h" Slider::Slider(TQWidget * a_parent, const char *a_name) - : TQSlider(a_parent, a_name), KommanderWidget((TQObject *) this) + : TQSlider(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; diff --git a/kommander/widgets/slider.h b/kommander/widgets/slider.h index 1ed39a8b..e6324d50 100644 --- a/kommander/widgets/slider.h +++ b/kommander/widgets/slider.h @@ -29,9 +29,11 @@ class TQShowEvent; class KOMMANDER_EXPORT Slider: public TQSlider, public KommanderWidget { - Q_OBJECT Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + Q_OBJECT + TQ_OBJECT + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: Slider(TQWidget*, const char*); virtual ~Slider(); diff --git a/kommander/widgets/spinboxint.cpp b/kommander/widgets/spinboxint.cpp index a2b9af6a..cc264f34 100644 --- a/kommander/widgets/spinboxint.cpp +++ b/kommander/widgets/spinboxint.cpp @@ -28,7 +28,7 @@ #include "spinboxint.h" SpinBoxInt::SpinBoxInt(TQWidget *a_parent, const char *a_name) - : TQSpinBox(a_parent, a_name), KommanderWidget(this) + : TQSpinBox(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -101,7 +101,7 @@ void SpinBoxInt::focusInEvent( TQFocusEvent * e) bool SpinBoxInt::isFunctionSupported(int f) { - return f == DCOP::text || f == DCOP::setText || f == DCOP::setMaximum || f == DCOP::geometry|| f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor; + return f == DCOP::text || f == DCOP::setText || f == DCOP::setMaximum || f == DCOP::tqgeometry|| f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor; } TQString SpinBoxInt::handleDCOP(int function, const TQStringList& args) @@ -115,7 +115,7 @@ TQString SpinBoxInt::handleDCOP(int function, const TQStringList& args) case DCOP::setMaximum: setMaxValue(args[0].toUInt()); break; - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/spinboxint.h b/kommander/widgets/spinboxint.h index 214692fe..c92489c3 100644 --- a/kommander/widgets/spinboxint.h +++ b/kommander/widgets/spinboxint.h @@ -33,10 +33,11 @@ class TQShowEvent; class KOMMANDER_EXPORT SpinBoxInt : public TQSpinBox, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: SpinBoxInt(TQWidget *a_parent, const char *a_name); ~SpinBoxInt(); diff --git a/kommander/widgets/statusbar.cpp b/kommander/widgets/statusbar.cpp index 59070884..3c5e76f5 100644 --- a/kommander/widgets/statusbar.cpp +++ b/kommander/widgets/statusbar.cpp @@ -27,14 +27,14 @@ #include "statusbar.h" StatusBar::StatusBar(TQWidget *a_parent, const char *a_name) - : KStatusBar(a_parent, a_name), KommanderWidget(this) + : KStatusBar(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; setStates(states); setDisplayStates(states); - insertItem(TQString::null, 0, 1); - setItemAlignment(0, Qt::AlignLeft); + insertItem(TQString(), 0, 1); + setItemAlignment(0, TQt::AlignLeft); } StatusBar::~StatusBar() diff --git a/kommander/widgets/statusbar.h b/kommander/widgets/statusbar.h index 0971b1ce..616283fd 100644 --- a/kommander/widgets/statusbar.h +++ b/kommander/widgets/statusbar.h @@ -33,10 +33,11 @@ class TQShowEvent; class KOMMANDER_EXPORT StatusBar : public KStatusBar, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: StatusBar(TQWidget *a_parent, const char *a_name); diff --git a/kommander/widgets/subdialog.cpp b/kommander/widgets/subdialog.cpp index 292ac541..47e4ec69 100644 --- a/kommander/widgets/subdialog.cpp +++ b/kommander/widgets/subdialog.cpp @@ -32,7 +32,7 @@ #include "subdialog.h" SubDialog::SubDialog(TQWidget *a_parent, const char *a_name) - : TQPushButton(a_parent, a_name), KommanderWidget(this), m_dialog(0) + : TQPushButton(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)), m_dialog(0) { TQStringList states; states << "default"; diff --git a/kommander/widgets/subdialog.h b/kommander/widgets/subdialog.h index c61eda15..2e1120a3 100644 --- a/kommander/widgets/subdialog.h +++ b/kommander/widgets/subdialog.h @@ -34,11 +34,12 @@ class TQShowEvent; class KOMMANDER_EXPORT SubDialog : public TQPushButton, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQString kmdrFile READ kmdrFile WRITE setKmdrFile) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQString kmdrFile READ kmdrFile WRITE setKmdrFile) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: SubDialog(TQWidget *a_parent, const char *a_name); ~SubDialog(); diff --git a/kommander/widgets/table.cpp b/kommander/widgets/table.cpp index b7e2d68a..4056431e 100644 --- a/kommander/widgets/table.cpp +++ b/kommander/widgets/table.cpp @@ -48,7 +48,7 @@ enum Functions { Table::Table(TQWidget *a_parent, const char *a_name) - : TQTable(a_parent, a_name), KommanderWidget(this) + : TQTable(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -114,7 +114,7 @@ void Table::setWidgetText(const TQString&) TQString Table::selectedArea() { TQTableSelection sel = selection(currentSelection()); - return TQString("%1,%2,%3,%4").arg(sel.topRow()).arg(sel.leftCol()).arg(sel.bottomRow()).arg(sel.rightCol()); + return TQString("%1,%2,%3,%4").tqarg(sel.topRow()).tqarg(sel.leftCol()).tqarg(sel.bottomRow()).tqarg(sel.rightCol()); } @@ -123,7 +123,7 @@ bool Table::isFunctionSupported(int f) return f == DCOP::currentColumn || f == DCOP::currentRow || f == DCOP::insertColumn || f == DCOP::insertRow || f == DCOP::cellText || f == DCOP::setCellText || f == DCOP::setCellWidget || f == DCOP::cellWidget || f == DCOP::columnCount || f == DCOP::removeRow || f == DCOP::removeColumn || f == DCOP::setColumnCaption || - f == DCOP::setRowCaption || f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction); + f == DCOP::setRowCaption || f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::tqgeometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction); } void Table::setCellWidget(int row, int col, const TQString & _widgetName) @@ -131,7 +131,7 @@ void Table::setCellWidget(int row, int col, const TQString & _widgetName) KommanderWidget *w = widgetByName(_widgetName); if (w) { - TQWidget *widget = static_cast<TQWidget*>(w->object()); + TQWidget *widget = TQT_TQWIDGET(w->object()); if (TQTable::cellWidget(row, col) != widget) { setCurrentCell(-1, -1); //hack to not delete the cellwidget after clicking away to another cell. @@ -167,7 +167,7 @@ void Table::setCellText(int row, int col, const TQString& text) { KommanderWidget *w = widgetByName(widget->name()); if (w) - widget->reparent(parentDialog(), TQPoint(0,0)); + widget->reparent(tqparentDialog(), TQPoint(0,0)); } setText(row, col, text); endEdit(row, col, false, false); @@ -354,7 +354,7 @@ TQString Table::handleDCOP(int function, const TQStringList& args) return "No row at index "+args[0]; break; } - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/table.h b/kommander/widgets/table.h index 1539597d..38cb9a33 100644 --- a/kommander/widgets/table.h +++ b/kommander/widgets/table.h @@ -31,11 +31,12 @@ class TQWidget; class KOMMANDER_EXPORT Table : public TQTable, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_OVERRIDE(bool readOnly DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_OVERRIDE(bool readOnly DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: Table(TQWidget *a_parent, const char *a_name); diff --git a/kommander/widgets/tabwidget.cpp b/kommander/widgets/tabwidget.cpp index 8ffc95b1..1574ba9e 100644 --- a/kommander/widgets/tabwidget.cpp +++ b/kommander/widgets/tabwidget.cpp @@ -44,7 +44,7 @@ enum Functions { }; TabWidget::TabWidget(TQWidget *a_parent, const char *a_name, int a_flags) - : TQTabWidget(a_parent, a_name, a_flags), KommanderWidget(this) + : TQTabWidget(a_parent, a_name, a_flags), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; diff --git a/kommander/widgets/tabwidget.h b/kommander/widgets/tabwidget.h index 3bae4d0a..e848f402 100644 --- a/kommander/widgets/tabwidget.h +++ b/kommander/widgets/tabwidget.h @@ -28,10 +28,11 @@ class TQShowEvent; class KOMMANDER_EXPORT TabWidget : public TQTabWidget, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: TabWidget(TQWidget *, const char *, int=0); ~TabWidget(); diff --git a/kommander/widgets/textbrowser.cpp b/kommander/widgets/textbrowser.cpp index a2f9e744..f6b1330e 100644 --- a/kommander/widgets/textbrowser.cpp +++ b/kommander/widgets/textbrowser.cpp @@ -35,7 +35,7 @@ enum Functions { }; TextBrowser::TextBrowser(TQWidget * a_parent, const char *a_name) - : KTextBrowser(a_parent, a_name), KommanderWidget((TQObject *) this) + : KTextBrowser(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; diff --git a/kommander/widgets/textbrowser.h b/kommander/widgets/textbrowser.h index 3a106fcf..27a5b1e2 100644 --- a/kommander/widgets/textbrowser.h +++ b/kommander/widgets/textbrowser.h @@ -30,9 +30,10 @@ class TQShowEvent; class KOMMANDER_EXPORT TextBrowser: public KTextBrowser, public KommanderWidget { Q_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_OBJECT + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: TextBrowser(TQWidget*, const char*); virtual ~TextBrowser(); diff --git a/kommander/widgets/textedit.cpp b/kommander/widgets/textedit.cpp index 72f8c754..1ca2e167 100644 --- a/kommander/widgets/textedit.cpp +++ b/kommander/widgets/textedit.cpp @@ -28,7 +28,7 @@ #include <kommanderplugin.h> enum Functions { - FirstFunction = 450, //CHANGE THIS NUMBER TO AN UNIQUE ONE!!! + FirstFunction = 450, //CHANGE THIS NUMBER TO AN UNITQUE ONE!!! TE_setModified, TE_selectText, TE_paragraphs, @@ -43,7 +43,7 @@ enum Functions { }; TextEdit::TextEdit(TQWidget * a_parent, const char *a_name):KTextEdit(a_parent, a_name), -KommanderWidget((TQObject *) this) +KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -143,7 +143,7 @@ void TextEdit::contextMenuEvent( TQContextMenuEvent * e ) bool TextEdit::isFunctionSupported(int f) { - return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::setSelection || f == DCOP::clear || f == DCOP::setEditable || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || f == DCOP::isModified || (f >= FirstFunction && f <= LastFunction); + return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::setSelection || f == DCOP::clear || f == DCOP::setEditable || f == DCOP::tqgeometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || f == DCOP::isModified || (f >= FirstFunction && f <= LastFunction); } TQString TextEdit::handleDCOP(int function, const TQStringList& args) @@ -200,8 +200,8 @@ TQString TextEdit::handleDCOP(int function, const TQStringList& args) { // int para = args[3].toInt(); // int idx = args[4].toInt(); -// return TQString::number(TQTextEdit::find(args[0], args[1].toUInt(), false, args[2].toUInt(), para, idx )); - return TQString::number(TQTextEdit::find(args[0], args[1].toUInt(), false )); +// return TQString::number(TQTextEdit::tqfind(args[0], args[1].toUInt(), false, args[2].toUInt(), para, idx )); + return TQString::number(TQTextEdit::tqfind(args[0], args[1].toUInt(), false )); break; } case TE_VAsuperScript: @@ -210,7 +210,7 @@ TQString TextEdit::handleDCOP(int function, const TQStringList& args) case TE_VAnormalScript: TQTextEdit::setVerticalAlignment(AlignNormal); break; - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/textedit.h b/kommander/widgets/textedit.h index 3132e315..de040391 100644 --- a/kommander/widgets/textedit.h +++ b/kommander/widgets/textedit.h @@ -31,9 +31,11 @@ class TQShowEvent; class KOMMANDER_EXPORT TextEdit: public KTextEdit, public KommanderWidget { - Q_OBJECT Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + Q_OBJECT + TQ_OBJECT + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: TextEdit(TQWidget *, const char *); virtual ~TextEdit(); diff --git a/kommander/widgets/timer.cpp b/kommander/widgets/timer.cpp index 5a7251f1..2bc934b0 100644 --- a/kommander/widgets/timer.cpp +++ b/kommander/widgets/timer.cpp @@ -38,7 +38,7 @@ enum Functions { }; Timer::Timer(TQWidget *a_parent, const char *a_name) - : TQLabel(a_parent, a_name), KommanderWidget(this) + : TQLabel(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; diff --git a/kommander/widgets/timer.h b/kommander/widgets/timer.h index 095c7dac..6d14452d 100644 --- a/kommander/widgets/timer.h +++ b/kommander/widgets/timer.h @@ -27,12 +27,13 @@ class TQTimer; class KOMMANDER_EXPORT Timer : public TQLabel, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) - Q_PROPERTY(int interval READ interval WRITE setInterval) - Q_PROPERTY(bool singleShot READ singleShot WRITE setSingleShot) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(int interval READ interval WRITE setInterval) + TQ_PROPERTY(bool singleShot READ singleShot WRITE setSingleShot) public: Timer(TQWidget *a_parent, const char *a_name); diff --git a/kommander/widgets/toolbox.cpp b/kommander/widgets/toolbox.cpp index a6340098..b2b57748 100644 --- a/kommander/widgets/toolbox.cpp +++ b/kommander/widgets/toolbox.cpp @@ -27,8 +27,8 @@ #define FIRST_FUNCTION ADDWIDGET #define LAST_FUNCTION INDEXOF -ToolBox::ToolBox(TQWidget *parent, const char *name) - : TQToolBox(parent, name), KommanderWidget(this) +ToolBox::ToolBox(TQWidget *tqparent, const char *name) + : TQToolBox(tqparent, name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -121,7 +121,7 @@ void ToolBox::contextMenuEvent( TQContextMenuEvent * e ) bool ToolBox::isFunctionSupported(int f) { - return f == DCOP::count || f == DCOP::geometry || (f >= FIRST_FUNCTION && f <= LAST_FUNCTION) ; + return f == DCOP::count || f == DCOP::tqgeometry || (f >= FIRST_FUNCTION && f <= LAST_FUNCTION) ; } TQString ToolBox::handleDCOP(int function, const TQStringList& args) @@ -176,7 +176,7 @@ TQString ToolBox::handleDCOP(int function, const TQStringList& args) } case DCOP::count: return TQString::number(count()); - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/toolbox.h b/kommander/widgets/toolbox.h index 12761df0..ab5375b0 100644 --- a/kommander/widgets/toolbox.h +++ b/kommander/widgets/toolbox.h @@ -21,11 +21,12 @@ class ToolBox : public TQToolBox, public KommanderWidget { Q_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_OBJECT + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) public: - ToolBox(TQWidget *parent = 0, const char *name = 0); + ToolBox(TQWidget *tqparent = 0, const char *name = 0); ~ToolBox(); diff --git a/kommander/widgets/treewidget.cpp b/kommander/widgets/treewidget.cpp index ef3b7e65..e04fe41d 100644 --- a/kommander/widgets/treewidget.cpp +++ b/kommander/widgets/treewidget.cpp @@ -55,7 +55,7 @@ enum Functions { }; TreeWidget::TreeWidget(TQWidget *a_parent, const char *a_name) - : KListView(a_parent, a_name), KommanderWidget(this) + : KListView(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; @@ -95,7 +95,7 @@ void TreeWidget::addItemFromString(const TQString& s) TQStringList elements = TQStringList::split(m_pathSeparator, s, true); if (elements.count() > 1) setRootIsDecorated(true); - TQListViewItem* parent = 0; + TQListViewItem* tqparent = 0; if (m_lastPath.size() < elements.count()) m_lastPath.resize(elements.count()); uint i = 0; @@ -103,13 +103,13 @@ void TreeWidget::addItemFromString(const TQString& s) { if (m_lastPath[i] && m_lastPath[i]->text(0) == elements[i]) { - parent = m_lastPath[i]; + tqparent = m_lastPath[i]; i++; continue; } else { - TQListViewItem* item = (i>0) ? parent->firstChild() : firstChild(); + TQListViewItem* item = (i>0) ? tqparent->firstChild() : firstChild(); while (item) { if (item->text(0) == *it) @@ -117,19 +117,19 @@ void TreeWidget::addItemFromString(const TQString& s) item = item->nextSibling(); } if (item) - parent = item; + tqparent = item; else - parent = itemFromString(parent, *it); - m_lastPath.insert(i, parent); + tqparent = itemFromString(tqparent, *it); + m_lastPath.insert(i, tqparent); i++; } } } -TQListViewItem* TreeWidget::itemFromString(TQListViewItem* parent, const TQString& s) +TQListViewItem* TreeWidget::itemFromString(TQListViewItem* tqparent, const TQString& s) { TQStringList elements; - if (s.contains("\t")) + if (s.tqcontains("\t")) elements = TQStringList::split("\t", s, true); else elements = TQStringList::split("\\t", s, true); @@ -137,8 +137,8 @@ TQListViewItem* TreeWidget::itemFromString(TQListViewItem* parent, const TQStrin if (cols >= columns()) cols = columns(); TQListViewItem* item; - if (parent) - item = new TQListViewItem(parent); + if (tqparent) + item = new TQListViewItem(tqparent); else item = new TQListViewItem(this); int i = 0; @@ -208,8 +208,8 @@ TQString TreeWidget::itemsText() if (path.isEmpty()) items.append(itemText(it.current())); else - items.append(TQString("%1%2%3").arg(path).arg(m_pathSeparator) - .arg(itemText(it.current()))); + items.append(TQString("%1%2%3").tqarg(path).tqarg(m_pathSeparator) + .tqarg(itemText(it.current()))); ++it; } return items.join("\n"); @@ -219,14 +219,14 @@ TQString TreeWidget::itemPath(TQListViewItem* item) const { if (!item) return TQString(); - item = item->parent(); + item = item->tqparent(); if (!item) return TQString(); TQStringList path; while (item) { path.prepend(item->text(0)); - item = item->parent(); + item = item->tqparent(); } return path.join(m_pathSeparator); } @@ -295,11 +295,11 @@ void TreeWidget::contextMenuEvent( TQContextMenuEvent * e ) void TreeWidget::setColAlign(int column, const TQString& align) { if (align.lower() == "left") - setColumnAlignment (column, Qt::AlignLeft); + setColumnAlignment (column, TQt::AlignLeft); else if (align.lower() == "right") - setColumnAlignment (column, Qt::AlignRight); + setColumnAlignment (column, TQt::AlignRight); else if (align.lower() == "center") - setColumnAlignment (column, Qt::AlignCenter); + setColumnAlignment (column, TQt::AlignCenter); } bool TreeWidget::isFunctionSupported(int f) @@ -307,7 +307,7 @@ bool TreeWidget::isFunctionSupported(int f) return f == DCOP::insertItem || f == DCOP::text || f == DCOP::setText || f == DCOP::insertItems || f == DCOP::selection || f == DCOP::setSelection || f == DCOP::clear || f == DCOP::removeItem || f == DCOP::currentItem || f == DCOP::setCurrentItem || f == DCOP::findItem || f == DCOP::item || - f == DCOP::itemPath || f == DCOP::itemDepth || f == DCOP::setPixmap || f == DCOP::setColumnCaption || f == DCOP::removeColumn || f == DCOP::columnCount || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f > FirstFunction && f < LastFunction) || (f >= TW_FUNCTION && f <= TW_LAST_FUNCTION); + f == DCOP::itemPath || f == DCOP::itemDepth || f == DCOP::setPixmap || f == DCOP::setColumnCaption || f == DCOP::removeColumn || f == DCOP::columnCount || f == DCOP::tqgeometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f > FirstFunction && f < LastFunction) || (f >= TW_FUNCTION && f <= TW_LAST_FUNCTION); } TQString TreeWidget::handleDCOP(int function, const TQStringList& args) @@ -342,7 +342,7 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args) { if (it.current()->isSelected()) { - selection.append(TQString("%1\n").arg(itemToIndexSafe(it.current()))); + selection.append(TQString("%1\n").tqarg(itemToIndexSafe(it.current()))); } ++it; } @@ -368,14 +368,14 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args) } case DCOP::setSelection: if (selectionModeExt() == Single || selectionModeExt() == NoSelection) - setCurrentItem(findItem(args[0], 0)); + setCurrentItem(tqfindItem(args[0], 0)); else { clearSelection(); TQStringList items(TQStringList::split("\n", args[0])); for (TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it) { - TQListViewItem* item = findItem(*it, 0); + TQListViewItem* item = tqfindItem(*it, 0); if (item) { item->setSelected(true); @@ -405,17 +405,17 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args) break; case DCOP::findItem: if (!args[1]) - return TQString::number(itemToIndexSafe(findItem(args[0], 0))); + return TQString::number(itemToIndexSafe(tqfindItem(args[0], 0))); else { if (args[2].toUInt() && args[3].toUInt()) - return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt()))); + return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt()))); else if (args[2].toUInt()) - return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::CaseSensitive | Qt::Contains))); + return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt(), TQt::CaseSensitive | TQt::Contains))); else if (args[3].toUInt()) - return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::ExactMatch))); + return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt(), TQt::ExactMatch))); else - return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::Contains))); + return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt(), TQt::Contains))); } break; case DCOP::item: @@ -494,7 +494,7 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args) case TW_childCount: return TQString::number(childCount()); break; - case DCOP::geometry: + case DCOP::tqgeometry: { TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height()); return geo; diff --git a/kommander/widgets/treewidget.h b/kommander/widgets/treewidget.h index 3988c9a8..df7440b1 100644 --- a/kommander/widgets/treewidget.h +++ b/kommander/widgets/treewidget.h @@ -35,11 +35,12 @@ class TQShowEvent; class KOMMANDER_EXPORT TreeWidget : public KListView, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) - Q_PROPERTY(TQString pathSeparator READ pathSeparator WRITE setPathSeparator) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(TQString pathSeparator READ pathSeparator WRITE setPathSeparator) public: TreeWidget(TQWidget *a_parent, const char *a_name); @@ -75,7 +76,7 @@ protected: TQString itemPath(TQListViewItem* item) const; private: void addItemFromString(const TQString& s); - TQListViewItem* itemFromString(TQListViewItem* parent, const TQString& s); + TQListViewItem* itemFromString(TQListViewItem* tqparent, const TQString& s); TQPtrVector<TQListViewItem> m_lastPath; TQString m_pathSeparator; int addColumnTree(const TQString & label, int width = -1 ); diff --git a/kommander/widgets/wizard.cpp b/kommander/widgets/wizard.cpp index 8cc16933..b5fabc20 100644 --- a/kommander/widgets/wizard.cpp +++ b/kommander/widgets/wizard.cpp @@ -32,7 +32,7 @@ Wizard::Wizard(TQWidget *a_parent, const char *a_name, bool a_modal, int a_flags) - : TQWizard(a_parent, a_name, a_modal, a_flags), KommanderWidget(this) + : TQWizard(a_parent, a_name, a_modal, a_flags), KommanderWidget(TQT_TQOBJECT(this)) { TQStringList states; states << "default"; diff --git a/kommander/widgets/wizard.h b/kommander/widgets/wizard.h index 6852fc77..5104af9a 100644 --- a/kommander/widgets/wizard.h +++ b/kommander/widgets/wizard.h @@ -30,13 +30,14 @@ class TQShowEvent; class KOMMANDER_EXPORT Wizard : public TQWizard, public KommanderWidget { Q_OBJECT + TQ_OBJECT - Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) - Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) - Q_PROPERTY(bool KommanderWidget READ isKommanderWidget) - Q_PROPERTY(HelpAction helpAction READ helpAction WRITE setHelpAction) + TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false) + TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false) + TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget) + TQ_PROPERTY(HelpAction helpAction READ helpAction WRITE setHelpAction) Q_ENUMS(HelpAction) - Q_PROPERTY(TQString helpActionText READ helpActionText WRITE setHelpActionText) + TQ_PROPERTY(TQString helpActionText READ helpActionText WRITE setHelpActionText) public: Wizard(TQWidget *, const char *, bool = true, int = 0); |