From a2277b6bc715464e83882b90c2a058139b8a6b54 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 23 Jun 2011 01:42:07 +0000 Subject: TQt4 port kdeutils This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdelirc/kcmlirc/addaction.cpp | 38 ++++----- kdelirc/kcmlirc/addaction.h | 3 +- kdelirc/kcmlirc/addactionbase.ui | 164 +++++++++++++++++++------------------- kdelirc/kcmlirc/editaction.cpp | 8 +- kdelirc/kcmlirc/editaction.h | 3 +- kdelirc/kcmlirc/editactionbase.ui | 140 ++++++++++++++++---------------- kdelirc/kcmlirc/editmode.cpp | 2 +- kdelirc/kcmlirc/editmode.h | 3 +- kdelirc/kcmlirc/editmodebase.ui | 40 +++++----- kdelirc/kcmlirc/kcmlirc.cpp | 59 +++++++------- kdelirc/kcmlirc/kcmlirc.h | 14 ++-- kdelirc/kcmlirc/kcmlircbase.ui | 50 ++++++------ kdelirc/kcmlirc/kcmlircbase.ui.h | 6 +- kdelirc/kcmlirc/modeslist.cpp | 2 +- kdelirc/kcmlirc/modeslist.h | 3 +- kdelirc/kcmlirc/newmode.ui | 28 +++---- kdelirc/kcmlirc/newmode.ui.h | 2 +- kdelirc/kcmlirc/selectprofile.ui | 10 +-- 18 files changed, 291 insertions(+), 284 deletions(-) (limited to 'kdelirc/kcmlirc') diff --git a/kdelirc/kcmlirc/addaction.cpp b/kdelirc/kcmlirc/addaction.cpp index f2d6ad3..1d13f19 100644 --- a/kdelirc/kcmlirc/addaction.cpp +++ b/kdelirc/kcmlirc/addaction.cpp @@ -32,7 +32,7 @@ #include "profileserver.h" #include "remoteserver.h" -AddAction::AddAction(TQWidget *parent, const char *name, const Mode &mode): AddActionBase(parent, name), theMode(mode) +AddAction::AddAction(TQWidget *tqparent, const char *name, const Mode &mode): AddActionBase(tqparent, name), theMode(mode) { connect(this, TQT_SIGNAL( selected(const TQString &) ), TQT_SLOT( updateForPageChange() )); connect(this, TQT_SIGNAL( selected(const TQString &) ), TQT_SLOT( slotCorrectPage() )); @@ -92,12 +92,12 @@ void AddAction::updateButton(const TQString &remote, const TQString &button) { if(theMode.remote() == remote) { // note this isn't the "correct" way of doing it; really i should iterate throughg the items and try to find the item which when put through buttonMap[item] returns the current button name. but i cant be arsed. - theButtons->setCurrentItem(theButtons->findItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0)); - theButtons->ensureItemVisible(theButtons->findItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0)); + theButtons->setCurrentItem(theButtons->tqfindItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0)); + theButtons->ensureItemVisible(theButtons->tqfindItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0)); } else KMessageBox::error(this, i18n( "You did not select a mode of that remote control. Please use %1, " - "or revert back to select a different mode." ).arg( theMode.remoteName() ), + "or revert back to select a different mode." ).tqarg( theMode.remoteName() ), i18n( "Incorrect Remote Control Detected" )); if(indexOf(currentPage()) == 1) @@ -149,7 +149,7 @@ const TQStringList AddAction::getFunctions(const TQString app, const TQString ob if( *i != "QCStringList interfaces()" && *i != "QCStringList functions()" && *i != "QCStringList objects()" && - *i != "QCStringList find(TQCString)" ) + *i != "QCStringList tqfind(TQCString)" ) ret += TQString::fromUtf8(*i); return ret; } @@ -180,7 +180,7 @@ void AddAction::updateOptions() else if(theUseDCOP->isChecked()) { if(!theObjects->selectedItem()) return; - TQListViewItem* i = theObjects->selectedItem()->parent(); + TQListViewItem* i = theObjects->selectedItem()->tqparent(); if(!i) return; isUnique = uniqueProgramMap[i]; TQRegExp r("(.*)-[0-9]+"); @@ -262,19 +262,19 @@ void AddAction::updateParameter() if(theParameters->currentItem()) { TQString type = theParameters->currentItem()->text(2); int index = theParameters->currentItem()->text(3).toInt() - 1; - if(type.find("int") != -1 || type.find("short") != -1 || type.find("long") != -1) + if(type.tqfind("int") != -1 || type.tqfind("short") != -1 || type.tqfind("long") != -1) { theValue->raiseWidget(2); theValueIntNumInput->setValue(theArguments[index].toInt()); } - else if(type.find("double") != -1 || type.find("float") != -1) + else if(type.tqfind("double") != -1 || type.tqfind("float") != -1) { theValue->raiseWidget(3); theValueDoubleNumInput->setValue(theArguments[index].toDouble()); } - else if(type.find("bool") != -1) + else if(type.tqfind("bool") != -1) { theValue->raiseWidget(1); theValueCheckBox->setChecked(theArguments[index].toBool()); } - else if(type.find("TQStringList") != -1) + else if(type.tqfind(TQSTRINGLIST_OBJECT_NAME_STRING) != -1) { theValue->raiseWidget(4); TQStringList backup = theArguments[index].toStringList(); // backup needed because calling clear will kill what ever has been saved. @@ -307,13 +307,13 @@ void AddAction::slotParameterChanged() if(!theParameters->currentItem()) return; int index = theParameters->currentItem()->text(3).toInt() - 1; TQString type = theParameters->currentItem()->text(2); - if(type.find("int") != -1 || type.find("short") != -1 || type.find("long") != -1) + if(type.tqfind("int") != -1 || type.tqfind("short") != -1 || type.tqfind("long") != -1) theArguments[index].asInt() = theValueIntNumInput->value(); - else if(type.find("double") != -1 || type.find("float") != -1) + else if(type.tqfind("double") != -1 || type.tqfind("float") != -1) theArguments[index].asDouble() = theValueDoubleNumInput->value(); - else if(type.find("bool") != -1) + else if(type.tqfind("bool") != -1) theArguments[index].asBool() = theValueCheckBox->isChecked(); - else if(type.find("TQStringList") != -1) + else if(type.tqfind(TQSTRINGLIST_OBJECT_NAME_STRING) != -1) theArguments[index].asStringList() = theValueEditListBox->items(); else theArguments[index].asString() = theValueLineEdit->text(); @@ -339,11 +339,11 @@ void AddAction::updateObjects() QCStringList theApps = theClient->registeredApplications(); for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i) { - if(!TQString(*i).find("anonymous")) continue; - if(!TQString(*i).find(i18n( "anonymous" ))) continue; + if(!TQString(*i).tqfind("anonymous")) continue; + if(!TQString(*i).tqfind(i18n( "anonymous" ))) continue; TQRegExp r("(.*)-[0-9]+"); TQString name = r.exactMatch(TQString(*i)) ? r.cap(1) : *i; - if(names.contains(name)) continue; + if(names.tqcontains(name)) continue; names += name; KListViewItem *a = new KListViewItem(theObjects, name); @@ -361,8 +361,8 @@ void AddAction::updateObjects() void AddAction::updateFunctions() { theFunctions->clear(); - if(theObjects->currentItem() && theObjects->currentItem()->parent()) - { TQStringList functions = getFunctions(nameProgramMap[theObjects->currentItem()->parent()], theObjects->currentItem()->text(0)); + if(theObjects->currentItem() && theObjects->currentItem()->tqparent()) + { TQStringList functions = getFunctions(nameProgramMap[theObjects->currentItem()->tqparent()], theObjects->currentItem()->text(0)); for(TQStringList::iterator i = functions.begin(); i != functions.end(); ++i) { Prototype p((TQString)(*i)); new KListViewItem(theFunctions, p.name(), p.argumentList(), *i); diff --git a/kdelirc/kcmlirc/addaction.h b/kdelirc/kcmlirc/addaction.h index 821c6b5..b95fd17 100644 --- a/kdelirc/kcmlirc/addaction.h +++ b/kdelirc/kcmlirc/addaction.h @@ -27,6 +27,7 @@ class TQListViewItem; class AddAction : public AddActionBase { Q_OBJECT + TQ_OBJECT int curPage; Mode theMode; @@ -66,7 +67,7 @@ public: TQMap uniqueProgramMap; TQMap nameProgramMap; - AddAction(TQWidget *parent, const char *name, const Mode &mode); + AddAction(TQWidget *tqparent, const char *name, const Mode &mode); ~AddAction(); }; diff --git a/kdelirc/kcmlirc/addactionbase.ui b/kdelirc/kcmlirc/addactionbase.ui index 092463a..e60a89f 100644 --- a/kdelirc/kcmlirc/addactionbase.ui +++ b/kdelirc/kcmlirc/addactionbase.ui @@ -1,7 +1,7 @@ AddActionBase Gav Wood - + AddActionBase @@ -16,7 +16,7 @@ Add Action - + page @@ -27,7 +27,7 @@ unnamed - + buttonGroup1 @@ -52,7 +52,7 @@ 0 - + theUseProfile @@ -63,9 +63,9 @@ true - + - layout14 + tqlayout14 @@ -81,7 +81,7 @@ Expanding - + 81 31 @@ -125,7 +125,7 @@ Expanding - + 101 31 @@ -144,14 +144,14 @@ Expanding - + 311 20 - + theUseDCOP @@ -169,14 +169,14 @@ Expanding - + 321 21 - + theChangeMode @@ -194,7 +194,7 @@ Expanding - + 21 20 @@ -205,7 +205,7 @@ - + page @@ -216,20 +216,20 @@ unnamed - + theButtonText You are attempting to configure an action for a button on [remote] (in mode [mode]). Press a button on this remote control or select from the list. - + WordBreak|AlignVCenter - + - layout6 + tqlayout6 @@ -245,7 +245,7 @@ Expanding - + 110 41 @@ -289,7 +289,7 @@ Expanding - + 110 31 @@ -300,7 +300,7 @@ - + page @@ -311,7 +311,7 @@ unnamed - + splitter8 @@ -412,9 +412,9 @@ false - + - layout13 + tqlayout13 @@ -474,7 +474,7 @@ - + page @@ -485,7 +485,7 @@ unnamed - + buttonGroup4 @@ -499,7 +499,7 @@ unnamed - + theNotJustStart @@ -510,9 +510,9 @@ true - + - layout37 + tqlayout37 @@ -528,7 +528,7 @@ Expanding - + 61 21 @@ -586,7 +586,7 @@ - + theJustStart @@ -604,7 +604,7 @@ Expanding - + 21 81 @@ -615,7 +615,7 @@ - + page @@ -675,17 +675,17 @@ theParameters - + - layout35 + tqlayout35 unnamed - + - layout34 + tqlayout34 @@ -701,14 +701,14 @@ Expanding - + 21 111 - + theCurParameter @@ -739,14 +739,14 @@ Expanding - + 146 21 - + theValue @@ -761,7 +761,7 @@ 0 - + page @@ -785,7 +785,7 @@ Expanding - + 21 61 @@ -802,7 +802,7 @@ - + page @@ -826,14 +826,14 @@ Expanding - + 21 61 - + theValueCheckBox @@ -846,7 +846,7 @@ - + page @@ -870,7 +870,7 @@ Expanding - + 20 61 @@ -884,7 +884,7 @@ - + page @@ -908,7 +908,7 @@ Expanding - + 21 51 @@ -922,7 +922,7 @@ - + page @@ -957,7 +957,7 @@ Expanding - + 147 21 @@ -968,7 +968,7 @@ - + page @@ -979,7 +979,7 @@ unnamed - + textLabel1 @@ -1006,7 +1006,7 @@ Horizontal - + theRepeat @@ -1014,7 +1014,7 @@ This action is &repeatable if the button is held down - + theAutoStart @@ -1035,14 +1035,14 @@ Expanding - + 670 20 - + theIMTop @@ -1075,7 +1075,7 @@ Horizontal - + theIMLabel @@ -1085,11 +1085,11 @@ This application may have multiple instances. In the case of having multiple instances at once when this action should be executed, choose a course of action: - + WordBreak|AlignVCenter - + theIMGroup @@ -1112,7 +1112,7 @@ 0 - + theDontSend @@ -1126,7 +1126,7 @@ true - + theSendToTop @@ -1137,7 +1137,7 @@ Send the action to the instance hi&ghest in the window stacking order - + theSendToBottom @@ -1148,7 +1148,7 @@ Send the action to the instance &lowest in window stacking order - + theSendToAll @@ -1171,7 +1171,7 @@ Expanding - + 20 170 @@ -1180,7 +1180,7 @@ - + page @@ -1191,7 +1191,7 @@ unnamed - + buttonGroup3 @@ -1208,7 +1208,7 @@ 0 - + theSwitchMode @@ -1216,9 +1216,9 @@ &Switch to mode: - + - layout13 + tqlayout13 @@ -1234,7 +1234,7 @@ Expanding - + 131 31 @@ -1278,7 +1278,7 @@ Expanding - + 131 31 @@ -1287,7 +1287,7 @@ - + theExitMode @@ -1308,14 +1308,14 @@ Expanding - + 551 20 - + textLabel1_2 @@ -1337,7 +1337,7 @@ Horizontal - + theDoBefore @@ -1348,7 +1348,7 @@ true - + theDoAfter @@ -1366,7 +1366,7 @@ Expanding - + 21 30 @@ -1574,7 +1574,7 @@ accept() - + updateFunctions() updateParameter() updateParameters() @@ -1587,8 +1587,8 @@ updateForPageChange() slotParameterChanged() updateOptions() - - + + klistview.h klistview.h diff --git a/kdelirc/kcmlirc/editaction.cpp b/kdelirc/kcmlirc/editaction.cpp index 594e4a2..a48ece9 100644 --- a/kdelirc/kcmlirc/editaction.cpp +++ b/kdelirc/kcmlirc/editaction.cpp @@ -35,7 +35,7 @@ #include "editaction.h" #include "addaction.h" -EditAction::EditAction(IRAIt action, TQWidget *parent, const char *name) : EditActionBase(parent, name) +EditAction::EditAction(IRAIt action, TQWidget *tqparent, const char *name) : EditActionBase(tqparent, name) { theAction = action; @@ -175,7 +175,7 @@ void EditAction::updateArguments() } theArguments->setEnabled(p.count()); for(unsigned i = 0; i < p.count(); i++) - { theArguments->insertItem(TQString().setNum(i + 1) + ": " + (p.name(i).isEmpty() ? p.type(i) : p.name(i) + " (" + p.type(i) + ")")); + { theArguments->insertItem(TQString(TQString().setNum(i + 1) + ": " + (p.name(i).isEmpty() ? p.type(i) : p.name(i) + " (" + p.type(i) + ")"))); arguments[i].cast(TQVariant::nameToType(p.type(i).utf8())); } if(p.count()) updateArgument(0); else updateArgument(-1); @@ -319,10 +319,10 @@ void EditAction::updateDCOPApplications() QCStringList theApps = theClient->registeredApplications(); for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i) { - if(!TQString(*i).find("anonymous")) continue; + if(!TQString(*i).tqfind("anonymous")) continue; TQRegExp r("(.*)-[0-9]+"); TQString name = r.exactMatch(TQString(*i)) ? r.cap(1) : *i; - if(names.contains(name)) continue; + if(names.tqcontains(name)) continue; names += name; theDCOPApplications->insertItem(name); diff --git a/kdelirc/kcmlirc/editaction.h b/kdelirc/kcmlirc/editaction.h index 7efa7ca..b3d3939 100644 --- a/kdelirc/kcmlirc/editaction.h +++ b/kdelirc/kcmlirc/editaction.h @@ -26,6 +26,7 @@ class EditAction : public EditActionBase { Q_OBJECT + TQ_OBJECT IRAIt theAction; TQMap applicationMap, functionMap; TQMap nameProgramMap; @@ -48,7 +49,7 @@ public: virtual void updateDCOPObjects(); virtual void updateDCOPFunctions(); - EditAction(IRAIt action, TQWidget *parent = 0, const char *name = 0); + EditAction(IRAIt action, TQWidget *tqparent = 0, const char *name = 0); ~EditAction(); }; diff --git a/kdelirc/kcmlirc/editactionbase.ui b/kdelirc/kcmlirc/editactionbase.ui index 02e238c..df4576f 100644 --- a/kdelirc/kcmlirc/editactionbase.ui +++ b/kdelirc/kcmlirc/editactionbase.ui @@ -1,6 +1,6 @@ EditActionBase - + EditActionBase @@ -22,11 +22,11 @@ unnamed - + tabWidget3 - + tab @@ -37,7 +37,7 @@ unnamed - + buttonGroup3 @@ -54,15 +54,15 @@ 0 - + - layout40 + tqlayout40 unnamed - + theDCOPApplications @@ -78,7 +78,7 @@ - + textLabel4_3 @@ -92,7 +92,7 @@ theDCOPObjects - + buttonGroup5 @@ -109,7 +109,7 @@ 0 - + theNotJustStart @@ -128,7 +128,7 @@ true - + theFunctions @@ -141,7 +141,7 @@ - + theJustStart @@ -151,7 +151,7 @@ - + textLabel4_2 @@ -165,7 +165,7 @@ theDCOPFunctions - + textLabel5 @@ -176,7 +176,7 @@ theApplications - + theApplications @@ -189,7 +189,7 @@ - + theDCOPFunctions @@ -197,7 +197,7 @@ false - + theUseProfile @@ -208,7 +208,7 @@ true - + textLabel5_2 @@ -222,7 +222,7 @@ theDCOPApplications - + theUseDCOP @@ -230,7 +230,7 @@ Use &DCOP: - + theDCOPObjects @@ -240,15 +240,15 @@ - + - layout36 + tqlayout36 unnamed - + theValue @@ -263,7 +263,7 @@ 0 - + page @@ -295,7 +295,7 @@ Expanding - + 20 91 @@ -304,7 +304,7 @@ - + page @@ -318,7 +318,7 @@ 0 - + theValueCheckBox @@ -339,7 +339,7 @@ Expanding - + 20 101 @@ -348,7 +348,7 @@ - + page @@ -377,7 +377,7 @@ Expanding - + 21 101 @@ -386,7 +386,7 @@ - + page @@ -415,7 +415,7 @@ Expanding - + 20 101 @@ -424,7 +424,7 @@ - + page @@ -467,14 +467,14 @@ Expanding - + 21 111 - + theArguments @@ -486,7 +486,7 @@ 0 - + 106 0 @@ -503,14 +503,14 @@ Expanding - + 20 101 - + textLabel8 @@ -533,22 +533,22 @@ Expanding - + 481 20 - + - layout17 + tqlayout17 unnamed - + theChangeMode @@ -556,7 +556,7 @@ Change &mode to: - + theModes @@ -584,7 +584,7 @@ Expanding - + 21 30 @@ -595,7 +595,7 @@ - + tab @@ -606,7 +606,7 @@ unnamed - + textLabel3 @@ -628,7 +628,7 @@ Horizontal - + theRepeat @@ -636,7 +636,7 @@ &Action repeats if button is held down - + theAutoStart @@ -654,14 +654,14 @@ Expanding - + 491 20 - + textLabel1_2 @@ -683,7 +683,7 @@ Horizontal - + theDoBefore @@ -697,7 +697,7 @@ true - + theDoAfter @@ -718,14 +718,14 @@ Expanding - + 670 20 - + theIMTop @@ -758,7 +758,7 @@ Horizontal - + theIMLabel @@ -768,11 +768,11 @@ This application may have multiple instances. In the case of having multiple instances at once when this action should be executed, choose a course of action: - + WordBreak|AlignVCenter - + theIMGroup @@ -795,7 +795,7 @@ 0 - + theDontSend @@ -809,7 +809,7 @@ true - + theSendToTop @@ -820,7 +820,7 @@ Send the action to the instance hi&ghest in window stacking order - + theSendToBottom @@ -831,7 +831,7 @@ Send the action to the instance &lowest in window stacking order - + theSendToAll @@ -854,7 +854,7 @@ Expanding - + 20 150 @@ -864,7 +864,7 @@ - + Layout1 @@ -878,7 +878,7 @@ 6 - + buttonHelp @@ -902,14 +902,14 @@ Expanding - + 20 20 - + buttonOk @@ -923,7 +923,7 @@ true - + buttonCancel @@ -1263,7 +1263,7 @@ buttonOk buttonCancel - + updateFunctions() updateApplications() updateDCOPApplications() @@ -1273,8 +1273,8 @@ updateArgument(int) slotParameterChanged() updateOptions() - - + + klineedit.h knuminput.h diff --git a/kdelirc/kcmlirc/editmode.cpp b/kdelirc/kcmlirc/editmode.cpp index aad27da..6092e96 100644 --- a/kdelirc/kcmlirc/editmode.cpp +++ b/kdelirc/kcmlirc/editmode.cpp @@ -16,7 +16,7 @@ #include "editmode.h" -EditMode::EditMode(TQWidget *parent, const char *name, bool modal, WFlags fl) : EditModeBase(parent, name, modal, fl) +EditMode::EditMode(TQWidget *tqparent, const char *name, bool modal, WFlags fl) : EditModeBase(tqparent, name, modal, fl) { theIcon->setIconType(KIcon::Panel, KIcon::Any); } diff --git a/kdelirc/kcmlirc/editmode.h b/kdelirc/kcmlirc/editmode.h index df3c888..8ea0c45 100644 --- a/kdelirc/kcmlirc/editmode.h +++ b/kdelirc/kcmlirc/editmode.h @@ -21,12 +21,13 @@ class EditMode : public EditModeBase { Q_OBJECT + TQ_OBJECT public: void slotCheckText(const TQString &newText); void slotClearIcon(); - EditMode(TQWidget *parent = 0, const char *name = 0, bool modal = false, WFlags fl = 0); + EditMode(TQWidget *tqparent = 0, const char *name = 0, bool modal = false, WFlags fl = 0); ~EditMode(); }; diff --git a/kdelirc/kcmlirc/editmodebase.ui b/kdelirc/kcmlirc/editmodebase.ui index dd26940..a0f4b27 100644 --- a/kdelirc/kcmlirc/editmodebase.ui +++ b/kdelirc/kcmlirc/editmodebase.ui @@ -1,6 +1,6 @@ EditModeBase - + EditModeBase @@ -19,7 +19,7 @@ unnamed - + textLabel1 @@ -41,15 +41,15 @@ Horizontal - + - layout25 + tqlayout25 unnamed - + textLabel4 @@ -60,9 +60,9 @@ theIcon - + - layout24 + tqlayout24 @@ -78,7 +78,7 @@ Expanding - + 110 21 @@ -114,7 +114,7 @@ - + theName @@ -122,7 +122,7 @@ false - + textLabel5 @@ -145,14 +145,14 @@ Expanding - + 410 20 - + textLabel2 @@ -174,7 +174,7 @@ Horizontal - + theDefault @@ -192,7 +192,7 @@ Expanding - + 20 90 @@ -213,9 +213,9 @@ Horizontal - + - layout15 + tqlayout15 @@ -231,7 +231,7 @@ Expanding - + 231 20 @@ -289,11 +289,11 @@ slotClearIcon() - + slotCheckText(const QString &) slotClearIcon() - - + + kicondialog.h kpushbutton.h diff --git a/kdelirc/kcmlirc/kcmlirc.cpp b/kdelirc/kcmlirc/kcmlirc.cpp index b248127..2fc7313 100644 --- a/kdelirc/kcmlirc/kcmlirc.cpp +++ b/kdelirc/kcmlirc/kcmlirc.cpp @@ -49,7 +49,7 @@ typedef KGenericFactory theFactory; K_EXPORT_COMPONENT_FACTORY(kcmlirc, theFactory("kcmlirc")) -KCMLirc::KCMLirc(TQWidget *parent, const char *name, TQStringList /*args*/) : DCOPObject("KCMLirc"), KCModule(parent, name) +KCMLirc::KCMLirc(TQWidget *tqparent, const char *name, TQStringList /*args*/) : DCOPObject("KCMLirc"), KCModule(tqparent, name) { KGlobal::locale()->insertCatalogue( "kcmlirc" ); setAboutData(new KAboutData("kcmlirc", I18N_NOOP("KDE Lirc"), VERSION, I18N_NOOP("The KDE IR Remote Control System"), KAboutData::License_GPL_V2, "Copyright (c)2003 Gav Wood", I18N_NOOP("Use this to configure KDE's infrared remote control system in order to control any KDE application with your infrared remote control."), "http://www.kde.org")); @@ -74,8 +74,8 @@ KCMLirc::KCMLirc(TQWidget *parent, const char *name, TQStringList /*args*/) : DC (new TQHBoxLayout(this))->setAutoAdd(true); theKCMLircBase = new KCMLircBase(this); connect(theKCMLircBase->theModes, TQT_SIGNAL( selectionChanged(TQListViewItem *) ), this, TQT_SLOT( updateActions() )); - connect(theKCMLircBase->theModes, TQT_SIGNAL( selectionChanged(TQListViewItem *) ), this, TQT_SLOT( updateModesStatus(TQListViewItem *) )); - connect(theKCMLircBase->theActions, TQT_SIGNAL( currentChanged(TQListViewItem *) ), this, TQT_SLOT( updateActionsStatus(TQListViewItem *) )); + connect(theKCMLircBase->theModes, TQT_SIGNAL( selectionChanged(TQListViewItem *) ), this, TQT_SLOT( updateModestqStatus(TQListViewItem *) )); + connect(theKCMLircBase->theActions, TQT_SIGNAL( currentChanged(TQListViewItem *) ), this, TQT_SLOT( updateActionstqStatus(TQListViewItem *) )); connect(theKCMLircBase->theExtensions, TQT_SIGNAL( selectionChanged(TQListViewItem *) ), this, TQT_SLOT( updateInformation() )); connect(theKCMLircBase->theModes, TQT_SIGNAL( itemRenamed(TQListViewItem *) ), this, TQT_SLOT( slotRenamed(TQListViewItem *) )); connect(theKCMLircBase->theModes, TQT_SIGNAL(dropped(KListView*, TQDropEvent*, TQListViewItem*, TQListViewItem*)), this, TQT_SLOT(slotDrop(KListView*, TQDropEvent*, TQListViewItem*, TQListViewItem*))); @@ -94,17 +94,17 @@ KCMLirc::~KCMLirc() { } -void KCMLirc::updateModesStatus(TQListViewItem *item) +void KCMLirc::updateModestqStatus(TQListViewItem *item) { - theKCMLircBase->theModes->setItemsRenameable(item && item->parent()); + theKCMLircBase->theModes->setItemsRenameable(item && item->tqparent()); theKCMLircBase->theAddActions->setEnabled(ProfileServer::profileServer()->profiles().count() && theKCMLircBase->theModes->selectedItem() && RemoteServer::remoteServer()->remotes()[modeMap[theKCMLircBase->theModes->selectedItem()].remote()]); theKCMLircBase->theAddAction->setEnabled(item); theKCMLircBase->theAddMode->setEnabled(item); - theKCMLircBase->theRemoveMode->setEnabled(item && item->parent()); + theKCMLircBase->theRemoveMode->setEnabled(item && item->tqparent()); theKCMLircBase->theEditMode->setEnabled(item); } -void KCMLirc::updateActionsStatus(TQListViewItem *item) +void KCMLirc::updateActionstqStatus(TQListViewItem *item) { theKCMLircBase->theRemoveAction->setEnabled(item); theKCMLircBase->theEditAction->setEnabled(item); @@ -114,7 +114,7 @@ void KCMLirc::slotRenamed(TQListViewItem *item) { if(!item) return; - if(item->parent() && item->text(0) != modeMap[item].name()) + if(item->tqparent() && item->text(0) != modeMap[item].name()) { allActions.renameMode(modeMap[item], item->text(0)); allModes.rename(modeMap[item], item->text(0)); emit changed(true); @@ -128,7 +128,7 @@ void KCMLirc::slotEditAction() EditAction theDialog(actionMap[theKCMLircBase->theActions->currentItem()], this); TQListViewItem *item = theKCMLircBase->theModes->currentItem(); - if(item->parent()) item = item->parent(); + if(item->tqparent()) item = item->tqparent(); theDialog.theModes->insertItem(i18n("[Exit current mode]")); for(item = item->firstChild(); item; item = item->nextSibling()) theDialog.theModes->insertItem(item->text(0)); @@ -166,7 +166,7 @@ void KCMLirc::slotAddAction() // populate the modes list box TQListViewItem *item = theKCMLircBase->theModes->selectedItem(); - if(item->parent()) item = item->parent(); + if(item->tqparent()) item = item->tqparent(); theDialog.theModes->setEnabled(item->firstChild()); theDialog.theSwitchMode->setEnabled(item->firstChild()); for(item = item->firstChild(); item; item = item->nextSibling()) @@ -202,7 +202,7 @@ void KCMLirc::slotAddAction() a.setRepeat(false); } // DCOP? - else if(theDialog.theUseDCOP->isChecked() && theDialog.theObjects->selectedItem() && theDialog.theObjects->selectedItem()->parent() && theDialog.theFunctions->selectedItem()) + else if(theDialog.theUseDCOP->isChecked() && theDialog.theObjects->selectedItem() && theDialog.theObjects->selectedItem()->tqparent() && theDialog.theFunctions->selectedItem()) { a.setProgram(theDialog.program); a.setObject(theDialog.theObjects->selectedItem()->text(0)); @@ -267,7 +267,8 @@ void KCMLirc::autoPopulate(const Profile &profile, const Remote &remote, const T Arguments l; // argument count should be either 0 or 1. undefined if > 1. if(Prototype(pa->prototype()).argumentCount() == 1) - { l.append(TQString().setNum(i.current()->parameter().toFloat() * pa->multiplier())); + { + l.append(TQString(TQString().setNum(i.current()->parameter().toFloat() * pa->multiplier()))); l.back().cast(TQVariant::nameToType(Prototype(pa->prototype()).type(0).utf8())); } a.setArguments(l); @@ -283,7 +284,7 @@ void KCMLirc::slotAddMode() NewMode theDialog(this, 0); TQMap remoteMap; TQListViewItem *tr = theKCMLircBase->theModes->selectedItem(); - if(tr) if(tr->parent()) tr = tr->parent(); + if(tr) if(tr->tqparent()) tr = tr->tqparent(); for(TQListViewItem *i = theKCMLircBase->theModes->firstChild(); i; i = i->nextSibling()) { KListViewItem *a = new KListViewItem(theDialog.theRemotes, i->text(0)); remoteMap[a] = modeMap[i].remote(); @@ -304,7 +305,7 @@ void KCMLirc::slotEditMode() EditMode theDialog(this, 0); Mode &mode = modeMap[theKCMLircBase->theModes->selectedItem()]; - theDialog.theName->setEnabled(theKCMLircBase->theModes->selectedItem()->parent()); + theDialog.theName->setEnabled(theKCMLircBase->theModes->selectedItem()->tqparent()); theDialog.theName->setText(mode.name().isEmpty() ? mode.remoteName() : mode.name()); if(!mode.iconFile().isNull()) theDialog.theIcon->setIcon(mode.iconFile()); @@ -315,7 +316,7 @@ void KCMLirc::slotEditMode() if(theDialog.exec() == TQDialog::Accepted) { kdDebug() << "Setting icon : " << theDialog.theIcon->icon() << endl; - mode.setIconFile(theDialog.theIcon->icon().isEmpty() ? TQString::null : theDialog.theIcon->icon()); + mode.setIconFile(theDialog.theIcon->icon().isEmpty() ? TQString() : theDialog.theIcon->icon()); allModes.updateMode(mode); if(!mode.name().isEmpty()) { allActions.renameMode(mode, theDialog.theName->text()); @@ -330,9 +331,9 @@ void KCMLirc::slotEditMode() void KCMLirc::slotRemoveMode() { if(!theKCMLircBase->theModes->selectedItem()) return; - if(!theKCMLircBase->theModes->selectedItem()->parent()) return; + if(!theKCMLircBase->theModes->selectedItem()->tqparent()) return; - if(KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to remove %1 and all its actions?").arg(theKCMLircBase->theModes->selectedItem()->text(0)), i18n("Erase Actions?")) == KMessageBox::Continue) + if(KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to remove %1 and all its actions?").tqarg(theKCMLircBase->theModes->selectedItem()->text(0)), i18n("Erase Actions?")) == KMessageBox::Continue) { allModes.erase(modeMap[theKCMLircBase->theModes->selectedItem()]); updateModes(); @@ -373,10 +374,10 @@ void KCMLirc::updateActions() theKCMLircBase->theActions->clear(); actionMap.clear(); - if(!theKCMLircBase->theModes->selectedItem()) { updateActionsStatus(0); return; } + if(!theKCMLircBase->theModes->selectedItem()) { updateActionstqStatus(0); return; } Mode m = modeMap[theKCMLircBase->theModes->selectedItem()]; - theKCMLircBase->theModeLabel->setText(m.remoteName() + ": " + (m.name().isEmpty() ? i18n("Actions always available") : i18n("Actions available only in mode %1").arg(m.name()))); + theKCMLircBase->theModeLabel->setText(m.remoteName() + ": " + (m.name().isEmpty() ? i18n("Actions always available") : i18n("Actions available only in mode %1").tqarg(m.name()))); IRAItList l = allActions.findByMode(m); for(IRAItList::iterator i = l.begin(); i != l.end(); ++i) { TQListViewItem *b = new KListViewItem(theKCMLircBase->theActions, (**i).buttonName(), (**i).application(), (**i).function(), (**i).arguments().toString(), (**i).notes()); @@ -386,7 +387,7 @@ void KCMLirc::updateActions() if(theKCMLircBase->theActions->currentItem()) theKCMLircBase->theActions->currentItem()->setSelected(true); - updateActionsStatus(theKCMLircBase->theActions->currentItem()); + updateActionstqStatus(theKCMLircBase->theActions->currentItem()); } void KCMLirc::gotButton(TQString remote, TQString button) @@ -428,7 +429,7 @@ void KCMLirc::updateModes() } if(theKCMLircBase->theModes->currentItem()) theKCMLircBase->theModes->currentItem()->setSelected(true); - updateModesStatus(theKCMLircBase->theModes->currentItem()); + updateModestqStatus(theKCMLircBase->theModes->currentItem()); updateActions(); } @@ -464,15 +465,15 @@ void KCMLirc::updateInformation() if(!theKCMLircBase->theExtensions->selectedItem()) return; - if(!theKCMLircBase->theExtensions->selectedItem()->parent()) + if(!theKCMLircBase->theExtensions->selectedItem()->tqparent()) { - theKCMLircBase->theInformationLabel->setText(i18n("Information on %1:").arg(theKCMLircBase->theExtensions->selectedItem()->text(0))); + theKCMLircBase->theInformationLabel->setText(i18n("Information on %1:").tqarg(theKCMLircBase->theExtensions->selectedItem()->text(0))); if(theKCMLircBase->theExtensions->selectedItem()->text(0) == i18n("Applications")) new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Applications"), TQString().setNum(theKCMLircBase->theExtensions->selectedItem()->childCount())); else if(theKCMLircBase->theExtensions->selectedItem()->text(0) == i18n("Remote Controls")) new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Remote Controls"), TQString().setNum(theKCMLircBase->theExtensions->selectedItem()->childCount())); } - else if(theKCMLircBase->theExtensions->selectedItem()->parent()->text(0) == i18n("Applications")) + else if(theKCMLircBase->theExtensions->selectedItem()->tqparent()->text(0) == i18n("Applications")) { ProfileServer *theServer = ProfileServer::profileServer(); const Profile *p = theServer->profiles()[profileMap[theKCMLircBase->theExtensions->selectedItem()]]; @@ -480,9 +481,9 @@ void KCMLirc::updateInformation() new TQListViewItem(theKCMLircBase->theInformation, i18n("Extension Author"), p->author()); new TQListViewItem(theKCMLircBase->theInformation, i18n("Application Identifier"), p->id()); new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Actions"), TQString().setNum(p->actions().count())); - theKCMLircBase->theInformationLabel->setText(i18n("Information on %1:").arg(p->name())); + theKCMLircBase->theInformationLabel->setText(i18n("Information on %1:").tqarg(p->name())); } - else if(theKCMLircBase->theExtensions->selectedItem()->parent()->text(0) == i18n("Remote Controls")) + else if(theKCMLircBase->theExtensions->selectedItem()->tqparent()->text(0) == i18n("Remote Controls")) { RemoteServer *theServer = RemoteServer::remoteServer(); const Remote *p = theServer->remotes()[remoteMap[theKCMLircBase->theExtensions->selectedItem()]]; @@ -490,7 +491,7 @@ void KCMLirc::updateInformation() new TQListViewItem(theKCMLircBase->theInformation, i18n("Extension Author"), p->author()); new TQListViewItem(theKCMLircBase->theInformation, i18n("Remote Control Identifier"), p->id()); new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Buttons"), TQString().setNum(p->buttons().count())); - theKCMLircBase->theInformationLabel->setText(i18n("Information on %1:").arg(p->name())); + theKCMLircBase->theInformationLabel->setText(i18n("Information on %1:").tqarg(p->name())); } } @@ -533,9 +534,9 @@ void KCMLirc::configChanged() // TODO: Take this out when I know how extern "C" { - KDE_EXPORT KCModule *create_kcmlirc(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_kcmlirc(TQWidget *tqparent, const char *) { KGlobal::locale()->insertCatalogue("kcmlirc"); - return new KCMLirc(parent, "KCMLirc"); + return new KCMLirc(tqparent, "KCMLirc"); } } diff --git a/kdelirc/kcmlirc/kcmlirc.h b/kdelirc/kcmlirc/kcmlirc.h index 468302b..4af2347 100644 --- a/kdelirc/kcmlirc/kcmlirc.h +++ b/kdelirc/kcmlirc/kcmlirc.h @@ -31,6 +31,7 @@ class Remote; class KCMLirc: public KCModule, virtual public DCOPObject { Q_OBJECT +// TQ_OBJECT K_DCOP private: @@ -45,8 +46,8 @@ private: public slots: void updateActions(); - void updateModesStatus(TQListViewItem *); - void updateActionsStatus(TQListViewItem *); + void updateModestqStatus(TQListViewItem *); + void updateActionstqStatus(TQListViewItem *); void updateModes(); void updateExtensions(); void updateInformation(); @@ -61,10 +62,11 @@ public slots: void slotRenamed(TQListViewItem *item); void slotEditMode(); - -// MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN +// QMOC_SKIP_BEGIN k_dcop: -// MOC_SKIP_END +// QMOC_SKIP_END +#endif // now just used as a proxy to AddAction class virtual void gotButton(TQString remote, TQString button); signals: @@ -76,7 +78,7 @@ public: virtual void defaults(); virtual void configChanged(); - KCMLirc(TQWidget *parent = 0, const char *name = 0, TQStringList args = TQStringList()); + KCMLirc(TQWidget *tqparent = 0, const char *name = 0, TQStringList args = TQStringList()); ~KCMLirc(); }; diff --git a/kdelirc/kcmlirc/kcmlircbase.ui b/kdelirc/kcmlirc/kcmlircbase.ui index c4b0b81..eca2753 100644 --- a/kdelirc/kcmlirc/kcmlircbase.ui +++ b/kdelirc/kcmlirc/kcmlircbase.ui @@ -1,7 +1,7 @@ KCMLircBase Gav Wood - + KCMLircBase @@ -23,14 +23,14 @@ 0 - + tabWidget2 0 - + tab @@ -41,7 +41,7 @@ unnamed - + theMainLabel @@ -74,18 +74,18 @@ There are currently no remote controls available. You must first set up LIRC correctly; see www.lirc.org for more information. - + WordBreak|AlignTop - + splitter4 Horizontal - + modeLayout @@ -96,7 +96,7 @@ 0 - + theRemotesLabel @@ -140,7 +140,7 @@ true - + modeButtonLayout @@ -158,7 +158,7 @@ Expanding - + 17 20 @@ -202,9 +202,9 @@ - + - layout9 + tqlayout9 @@ -213,7 +213,7 @@ 0 - + theModeLabel @@ -298,9 +298,9 @@ true - + - layout7 + tqlayout7 @@ -316,16 +316,16 @@ Expanding - + 240 21 - + - layout6 + tqlayout6 @@ -356,7 +356,7 @@ A&dd... - + theEditAction @@ -387,7 +387,7 @@ - + tab @@ -398,7 +398,7 @@ unnamed - + splitter5 @@ -427,9 +427,9 @@ true - + - layout9 + tqlayout9 @@ -438,7 +438,7 @@ 0 - + theInformationLabel @@ -490,7 +490,7 @@ init() - + klistview.h kpushbutton.h diff --git a/kdelirc/kcmlirc/kcmlircbase.ui.h b/kdelirc/kcmlirc/kcmlircbase.ui.h index 124ab3f..42faaab 100644 --- a/kdelirc/kcmlirc/kcmlircbase.ui.h +++ b/kdelirc/kcmlirc/kcmlircbase.ui.h @@ -12,7 +12,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -23,7 +23,7 @@ void KCMLircBase::init() { delete theModes; modeLayout->removeItem(modeButtonLayout); - theModes = new ModesList(dynamic_cast(modeLayout->parent()), "theModes"); + theModes = new ModesList(TQT_TQWIDGET(modeLayout->parent()), "theModes"); theModes->addColumn(i18n("Remote Control")); theModes->addColumn(i18n("Default")); theModes->addColumn(i18n("Icon")); @@ -32,6 +32,6 @@ void KCMLircBase::init() theModes->setItemsRenameable(true); modeLayout->addWidget(theModes); modeLayout->addLayout(modeButtonLayout); - modeLayout->invalidate(); + modeLayout->tqinvalidate(); modeLayout->activate(); } diff --git a/kdelirc/kcmlirc/modeslist.cpp b/kdelirc/kcmlirc/modeslist.cpp index 83678d1..a182129 100644 --- a/kdelirc/kcmlirc/modeslist.cpp +++ b/kdelirc/kcmlirc/modeslist.cpp @@ -16,7 +16,7 @@ #include "modeslist.h" -ModesList::ModesList(TQWidget *parent, const char *name) : KListView(parent, name) +ModesList::ModesList(TQWidget *tqparent, const char *name) : KListView(tqparent, name) { setAcceptDrops(true); setDropVisualizer(false); diff --git a/kdelirc/kcmlirc/modeslist.h b/kdelirc/kcmlirc/modeslist.h index 22e6cc0..5cc77a8 100644 --- a/kdelirc/kcmlirc/modeslist.h +++ b/kdelirc/kcmlirc/modeslist.h @@ -25,9 +25,10 @@ class ModesList : public KListView { Q_OBJECT + TQ_OBJECT public: virtual bool acceptDrag(TQDropEvent *) const; - ModesList(TQWidget *parent = 0, const char *name = 0); + ModesList(TQWidget *tqparent = 0, const char *name = 0); }; #endif diff --git a/kdelirc/kcmlirc/newmode.ui b/kdelirc/kcmlirc/newmode.ui index e3da8ef..90e91e8 100644 --- a/kdelirc/kcmlirc/newmode.ui +++ b/kdelirc/kcmlirc/newmode.ui @@ -1,6 +1,6 @@ NewMode - + NewMode @@ -38,15 +38,15 @@ true - + - layout11 + tqlayout11 unnamed - + textLabel5 @@ -54,7 +54,7 @@ Name: - + theName @@ -75,9 +75,9 @@ Horizontal - + - layout12 + tqlayout12 @@ -93,7 +93,7 @@ Expanding - + 61 21 @@ -138,18 +138,18 @@ theName - textChanged(const QString&) + textChanged(const TQString&) NewMode - slotTextChanged(const QString&) + slotTextChanged(const TQString&) newmode.ui.h - - slotTextChanged( const QString & newText ) - - + + slotTextChanged( const TQString & newText ) + + klistview.h kpushbutton.h diff --git a/kdelirc/kcmlirc/newmode.ui.h b/kdelirc/kcmlirc/newmode.ui.h index 2bb2f54..29c4166 100644 --- a/kdelirc/kcmlirc/newmode.ui.h +++ b/kdelirc/kcmlirc/newmode.ui.h @@ -12,7 +12,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kdelirc/kcmlirc/selectprofile.ui b/kdelirc/kcmlirc/selectprofile.ui index 2d4ac18..ad6867a 100644 --- a/kdelirc/kcmlirc/selectprofile.ui +++ b/kdelirc/kcmlirc/selectprofile.ui @@ -1,6 +1,6 @@ SelectProfile - + SelectProfile @@ -52,9 +52,9 @@ Horizontal - + - layout47 + tqlayout47 @@ -70,7 +70,7 @@ Expanding - + 40 20 @@ -119,7 +119,7 @@ reject() - + klistview.h kpushbutton.h -- cgit v1.2.1