diff options
Diffstat (limited to 'kdelirc/kcmlirc')
-rw-r--r-- | kdelirc/kcmlirc/addaction.cpp | 106 | ||||
-rw-r--r-- | kdelirc/kcmlirc/addaction.h | 24 | ||||
-rw-r--r-- | kdelirc/kcmlirc/editaction.cpp | 72 | ||||
-rw-r--r-- | kdelirc/kcmlirc/editaction.h | 12 | ||||
-rw-r--r-- | kdelirc/kcmlirc/editmode.cpp | 4 | ||||
-rw-r--r-- | kdelirc/kcmlirc/editmode.h | 4 | ||||
-rw-r--r-- | kdelirc/kcmlirc/kcmlirc.cpp | 150 | ||||
-rw-r--r-- | kdelirc/kcmlirc/kcmlirc.h | 26 | ||||
-rw-r--r-- | kdelirc/kcmlirc/kcmlircbase.ui.h | 2 | ||||
-rw-r--r-- | kdelirc/kcmlirc/modeslist.cpp | 6 | ||||
-rw-r--r-- | kdelirc/kcmlirc/modeslist.h | 4 | ||||
-rw-r--r-- | kdelirc/kcmlirc/newmode.ui.h | 2 |
12 files changed, 206 insertions, 206 deletions
diff --git a/kdelirc/kcmlirc/addaction.cpp b/kdelirc/kcmlirc/addaction.cpp index 1a3ecef..f2d6ad3 100644 --- a/kdelirc/kcmlirc/addaction.cpp +++ b/kdelirc/kcmlirc/addaction.cpp @@ -8,12 +8,12 @@ * (at your option) any later version. * ***************************************************************************/ -#include <qregexp.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qwidgetstack.h> -#include <qcheckbox.h> -#include <qbuttongroup.h> +#include <tqregexp.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqwidgetstack.h> +#include <tqcheckbox.h> +#include <tqbuttongroup.h> #include <kdebug.h> #include <klineedit.h> @@ -32,10 +32,10 @@ #include "profileserver.h" #include "remoteserver.h" -AddAction::AddAction(QWidget *parent, const char *name, const Mode &mode): AddActionBase(parent, name), theMode(mode) +AddAction::AddAction(TQWidget *parent, const char *name, const Mode &mode): AddActionBase(parent, name), theMode(mode) { - connect(this, SIGNAL( selected(const QString &) ), SLOT( updateForPageChange() )); - connect(this, SIGNAL( selected(const QString &) ), SLOT( slotCorrectPage() )); + connect(this, TQT_SIGNAL( selected(const TQString &) ), TQT_SLOT( updateForPageChange() )); + connect(this, TQT_SIGNAL( selected(const TQString &) ), TQT_SLOT( slotCorrectPage() )); curPage = 0; updateProfiles(); updateButtons(); @@ -64,23 +64,23 @@ void AddAction::slotCorrectPage() curPage = indexOf(currentPage()); if(curPage == 2 && theUseProfile->isChecked()) - showPage(((QWizard *)this)->page(lastPage > 1 ? 1 : 3)); + showPage(((TQWizard *)this)->page(lastPage > 1 ? 1 : 3)); if((curPage == 2 || curPage == 5) && theChangeMode->isChecked()) - showPage(((QWizard *)this)->page(lastPage > 1 ? 1 : 6)); + showPage(((TQWizard *)this)->page(lastPage > 1 ? 1 : 6)); if(curPage == 3 && theUseDCOP->isChecked()) - showPage(((QWizard *)this)->page(lastPage == 4 ? 2 : 4)); + showPage(((TQWizard *)this)->page(lastPage == 4 ? 2 : 4)); if(curPage == 4 && ( (theUseDCOP->isChecked() && theFunctions->currentItem() && !Prototype(theFunctions->currentItem()->text(2)).count()) || (theUseProfile->isChecked() && (theProfileFunctions->currentItem() && !theProfileFunctions->currentItem()->text(1).toInt() || theJustStart->isChecked())) )) - showPage(((QWizard *)this)->page(lastPage == 5 ? (theUseDCOP->isChecked() ? 2 : 3) : 5)); + showPage(((TQWizard *)this)->page(lastPage == 5 ? (theUseDCOP->isChecked() ? 2 : 3) : 5)); } void AddAction::requestNextPress() { - IRKick_stub("irkick", "IRKick").stealNextPress(DCOPClient::mainClient()->appId(), "KCMLirc", "gotButton(QString, QString)"); + IRKick_stub("irkick", "IRKick").stealNextPress(DCOPClient::mainClient()->appId(), "KCMLirc", "gotButton(TQString, TQString)"); } void AddAction::cancelRequest() @@ -88,7 +88,7 @@ void AddAction::cancelRequest() IRKick_stub("irkick", "IRKick").dontStealNextPress(); } -void AddAction::updateButton(const QString &remote, const QString &button) +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. @@ -109,9 +109,9 @@ void AddAction::updateButtons() theButtons->clear(); buttonMap.clear(); IRKick_stub IRKick("irkick", "IRKick"); - QStringList buttons = IRKick.buttons(theMode.remote()); - for(QStringList::iterator j = buttons.begin(); j != buttons.end(); ++j) - buttonMap[new QListViewItem(theButtons, RemoteServer::remoteServer()->getButtonName(theMode.remote(), *j))] = *j; + TQStringList buttons = IRKick.buttons(theMode.remote()); + for(TQStringList::iterator j = buttons.begin(); j != buttons.end(); ++j) + buttonMap[new TQListViewItem(theButtons, RemoteServer::remoteServer()->getButtonName(theMode.remote(), *j))] = *j; } void AddAction::updateForPageChange() @@ -140,17 +140,17 @@ void AddAction::updateButtonStates() } } -const QStringList AddAction::getFunctions(const QString app, const QString obj) +const TQStringList AddAction::getFunctions(const TQString app, const TQString obj) { - QStringList ret; + TQStringList ret; DCOPClient *theClient = KApplication::kApplication()->dcopClient(); QCStringList theApps = theClient->remoteFunctions(app.utf8(), obj.utf8()); for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i) if( *i != "QCStringList interfaces()" && *i != "QCStringList functions()" && *i != "QCStringList objects()" && - *i != "QCStringList find(QCString)" ) - ret += QString::fromUtf8(*i); + *i != "QCStringList find(TQCString)" ) + ret += TQString::fromUtf8(*i); return ret; } @@ -160,10 +160,10 @@ void AddAction::updateProfiles() theProfiles->clear(); profileMap.clear(); - QDict<Profile> dict = theServer->profiles(); - QDictIterator<Profile> i(dict); + TQDict<Profile> dict = theServer->profiles(); + TQDictIterator<Profile> i(dict); for(; i.current(); ++i) - profileMap[new QListViewItem(theProfiles, i.current()->name())] = i.currentKey(); + profileMap[new TQListViewItem(theProfiles, i.current()->name())] = i.currentKey(); } void AddAction::updateOptions() @@ -180,10 +180,10 @@ void AddAction::updateOptions() else if(theUseDCOP->isChecked()) { if(!theObjects->selectedItem()) return; - QListViewItem* i = theObjects->selectedItem()->parent(); + TQListViewItem* i = theObjects->selectedItem()->parent(); if(!i) return; isUnique = uniqueProgramMap[i]; - QRegExp r("(.*)-[0-9]+"); + TQRegExp r("(.*)-[0-9]+"); program = r.exactMatch(nameProgramMap[i]) ? r.cap(1) : nameProgramMap[i]; im = IM_DONTSEND; } @@ -213,9 +213,9 @@ void AddAction::updateProfileFunctions() if(!theProfiles->currentItem()) return; const Profile *p = theServer->profiles()[profileMap[theProfiles->currentItem()]]; - QDict<ProfileAction> dict = p->actions(); - for(QDictIterator<ProfileAction> i(dict); i.current(); ++i) - profileFunctionMap[new QListViewItem(theProfileFunctions, i.current()->name(), QString().setNum(i.current()->arguments().count()), i.current()->comment())] = i.currentKey(); + TQDict<ProfileAction> dict = p->actions(); + for(TQDictIterator<ProfileAction> i(dict); i.current(); ++i) + profileFunctionMap[new TQListViewItem(theProfileFunctions, i.current()->name(), TQString().setNum(i.current()->arguments().count()), i.current()->comment())] = i.currentKey(); updateParameters(); updateOptions(); } @@ -228,9 +228,9 @@ void AddAction::updateParameters() { Prototype p(theFunctions->currentItem()->text(2)); for(unsigned k = 0; k < p.count(); k++) - { new KListViewItem(theParameters, p.name(k).isEmpty() ? i18n( "<anonymous>" ) : p.name(k), "", p.type(k), QString().setNum(k + 1)); - theArguments.append(QVariant("")); - theArguments.back().cast(QVariant::nameToType(p.type(k).utf8())); + { new KListViewItem(theParameters, p.name(k).isEmpty() ? i18n( "<anonymous>" ) : p.name(k), "", p.type(k), TQString().setNum(k + 1)); + theArguments.append(TQVariant("")); + theArguments.back().cast(TQVariant::nameToType(p.type(k).utf8())); } } else if(theUseProfile->isChecked() && theProfiles->currentItem()) @@ -243,10 +243,10 @@ void AddAction::updateParameters() const ProfileAction *pa = p->actions()[profileFunctionMap[theProfileFunctions->currentItem()]]; int index = 1; - for(QValueList<ProfileActionArgument>::const_iterator i = pa->arguments().begin(); i != pa->arguments().end(); ++i, index++) - { theArguments.append(QVariant((*i).getDefault())); - theArguments.back().cast(QVariant::nameToType((*i).type().utf8())); - new QListViewItem(theParameters, (*i).comment(), theArguments.back().toString(), (*i).type(), QString().setNum(index)); + for(TQValueList<ProfileActionArgument>::const_iterator i = pa->arguments().begin(); i != pa->arguments().end(); ++i, index++) + { theArguments.append(TQVariant((*i).getDefault())); + theArguments.back().cast(TQVariant::nameToType((*i).type().utf8())); + new TQListViewItem(theParameters, (*i).comment(), theArguments.back().toString(), (*i).type(), TQString().setNum(index)); } // quicky update options too... @@ -260,7 +260,7 @@ void AddAction::updateParameters() void AddAction::updateParameter() { if(theParameters->currentItem()) - { QString type = theParameters->currentItem()->text(2); + { 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) { theValue->raiseWidget(2); @@ -274,9 +274,9 @@ void AddAction::updateParameter() { theValue->raiseWidget(1); theValueCheckBox->setChecked(theArguments[index].toBool()); } - else if(type.find("QStringList") != -1) + else if(type.find("TQStringList") != -1) { theValue->raiseWidget(4); - QStringList backup = theArguments[index].toStringList(); + TQStringList backup = theArguments[index].toStringList(); // backup needed because calling clear will kill what ever has been saved. theValueEditListBox->clear(); theValueEditListBox->insertStringList(backup); @@ -306,31 +306,31 @@ void AddAction::slotParameterChanged() { if(!theParameters->currentItem()) return; int index = theParameters->currentItem()->text(3).toInt() - 1; - QString type = theParameters->currentItem()->text(2); + TQString type = theParameters->currentItem()->text(2); if(type.find("int") != -1 || type.find("short") != -1 || type.find("long") != -1) theArguments[index].asInt() = theValueIntNumInput->value(); else if(type.find("double") != -1 || type.find("float") != -1) theArguments[index].asDouble() = theValueDoubleNumInput->value(); else if(type.find("bool") != -1) theArguments[index].asBool() = theValueCheckBox->isChecked(); - else if(type.find("QStringList") != -1) + else if(type.find("TQStringList") != -1) theArguments[index].asStringList() = theValueEditListBox->items(); else theArguments[index].asString() = theValueLineEdit->text(); - theArguments[theParameters->currentItem()->text(3).toInt() - 1].cast(QVariant::nameToType(theParameters->currentItem()->text(2).utf8())); + theArguments[theParameters->currentItem()->text(3).toInt() - 1].cast(TQVariant::nameToType(theParameters->currentItem()->text(2).utf8())); updateArgument(theParameters->currentItem()); } // takes theArguments[theIndex] and puts it into theItem -void AddAction::updateArgument(QListViewItem *theItem) +void AddAction::updateArgument(TQListViewItem *theItem) { theItem->setText(1, theArguments[theItem->text(3).toInt() - 1].toString()); } void AddAction::updateObjects() { - QStringList names; + TQStringList names; theObjects->clear(); uniqueProgramMap.clear(); nameProgramMap.clear(); @@ -339,15 +339,15 @@ void AddAction::updateObjects() QCStringList theApps = theClient->registeredApplications(); for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i) { - if(!QString(*i).find("anonymous")) continue; - if(!QString(*i).find(i18n( "anonymous" ))) continue; - QRegExp r("(.*)-[0-9]+"); - QString name = r.exactMatch(QString(*i)) ? r.cap(1) : *i; + if(!TQString(*i).find("anonymous")) continue; + if(!TQString(*i).find(i18n( "anonymous" ))) continue; + TQRegExp r("(.*)-[0-9]+"); + TQString name = r.exactMatch(TQString(*i)) ? r.cap(1) : *i; if(names.contains(name)) continue; names += name; KListViewItem *a = new KListViewItem(theObjects, name); - uniqueProgramMap[a] = name == QString(*i); + uniqueProgramMap[a] = name == TQString(*i); nameProgramMap[a] = *i; QCStringList theObjects = theClient->remoteObjects(*i); @@ -362,9 +362,9 @@ void AddAction::updateFunctions() { theFunctions->clear(); if(theObjects->currentItem() && theObjects->currentItem()->parent()) - { QStringList functions = getFunctions(nameProgramMap[theObjects->currentItem()->parent()], theObjects->currentItem()->text(0)); - for(QStringList::iterator i = functions.begin(); i != functions.end(); ++i) - { Prototype p((QString)(*i)); + { TQStringList functions = getFunctions(nameProgramMap[theObjects->currentItem()->parent()], 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 4d13659..df3d9c7 100644 --- a/kdelirc/kcmlirc/addaction.h +++ b/kdelirc/kcmlirc/addaction.h @@ -10,8 +10,8 @@ #ifndef ADDACTION_H #define ADDACTION_H -#include <qvaluelist.h> -#include <qpair.h> +#include <tqvaluelist.h> +#include <tqpair.h> #include <addactionbase.h> @@ -39,7 +39,7 @@ public slots: // connected to KCMLirc class to receive DCOP calls to tell it what button has been pressed virtual void updateForPageChange(); - virtual void updateButton(const QString &remote, const QString &button); + virtual void updateButton(const TQString &remote, const TQString &button); virtual void updateButtons(); virtual void updateFunctions(); virtual void updateObjects(); @@ -52,21 +52,21 @@ public slots: public: Arguments theArguments; - QString program; + TQString program; bool isUnique; - static const QStringList getFunctions(const QString app, const QString obj); - void updateArgument(QListViewItem *theItem); + static const TQStringList getFunctions(const TQString app, const TQString obj); + void updateArgument(TQListViewItem *theItem); void requestNextPress(); void cancelRequest(); - QMap<QListViewItem *, QString> profileMap; - QMap<QListViewItem *, QString> profileFunctionMap; - QMap<QListViewItem *, QString> buttonMap; - QMap<QListViewItem *, bool> uniqueProgramMap; - QMap<QListViewItem *, QString> nameProgramMap; + TQMap<TQListViewItem *, TQString> profileMap; + TQMap<TQListViewItem *, TQString> profileFunctionMap; + TQMap<TQListViewItem *, TQString> buttonMap; + TQMap<TQListViewItem *, bool> uniqueProgramMap; + TQMap<TQListViewItem *, TQString> nameProgramMap; - AddAction(QWidget *parent, const char *name, const Mode &mode); + AddAction(TQWidget *parent, const char *name, const Mode &mode); ~AddAction(); }; diff --git a/kdelirc/kcmlirc/editaction.cpp b/kdelirc/kcmlirc/editaction.cpp index 5a2a28b..594e4a2 100644 --- a/kdelirc/kcmlirc/editaction.cpp +++ b/kdelirc/kcmlirc/editaction.cpp @@ -10,13 +10,13 @@ // Copyright: See COPYING file that comes with this distribution // // -#include <qregexp.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qwidgetstack.h> -#include <qbuttongroup.h> +#include <tqregexp.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqwidgetstack.h> +#include <tqbuttongroup.h> #include <kdebug.h> #include <klineedit.h> @@ -35,7 +35,7 @@ #include "editaction.h" #include "addaction.h" -EditAction::EditAction(IRAIt action, QWidget *parent, const char *name) : EditActionBase(parent, name) +EditAction::EditAction(IRAIt action, TQWidget *parent, const char *name) : EditActionBase(parent, name) { theAction = action; @@ -151,16 +151,16 @@ void EditAction::updateArguments() theArguments->clear(); const ProfileAction *a = ProfileServer::profileServer()->getAction(applicationMap[theApplications->currentText()], functionMap[theFunctions->currentText()]); if(!a) { arguments.clear(); return; } - const QValueList<ProfileActionArgument> &p = a->arguments(); + const TQValueList<ProfileActionArgument> &p = a->arguments(); if(p.count() != arguments.count()) { arguments.clear(); for(unsigned i = 0; i < p.count(); i++) - arguments.append(QVariant("")); + arguments.append(TQVariant("")); } theArguments->setEnabled(p.count()); for(unsigned i = 0; i < p.count(); i++) { theArguments->insertItem(p[i].comment() + " (" + p[i].type() + ")"); - arguments[i].cast(QVariant::nameToType(p[i].type().utf8())); + arguments[i].cast(TQVariant::nameToType(p[i].type().utf8())); } if(p.count()) updateArgument(0); else updateArgument(-1); } @@ -171,12 +171,12 @@ void EditAction::updateArguments() if(p.count() != arguments.count()) { arguments.clear(); for(unsigned i = 0; i < p.count(); i++) - arguments.append(QVariant("")); + arguments.append(TQVariant("")); } theArguments->setEnabled(p.count()); for(unsigned i = 0; i < p.count(); i++) - { theArguments->insertItem(QString().setNum(i + 1) + ": " + (p.name(i).isEmpty() ? p.type(i) : p.name(i) + " (" + p.type(i) + ")")); - arguments[i].cast(QVariant::nameToType(p.type(i).utf8())); + { theArguments->insertItem(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); } @@ -216,22 +216,22 @@ void EditAction::slotParameterChanged() kdDebug() << type << endl; switch(type) { - case QVariant::Int: case QVariant::UInt: + case TQVariant::Int: case TQVariant::UInt: arguments[theArguments->currentItem()].asInt() = theValueIntNumInput->value(); break; - case QVariant::Double: + case TQVariant::Double: arguments[theArguments->currentItem()].asDouble() = theValueDoubleNumInput->value(); break; - case QVariant::Bool: + case TQVariant::Bool: arguments[theArguments->currentItem()].asBool() = theValueCheckBox->isChecked(); break; - case QVariant::StringList: + case TQVariant::StringList: arguments[theArguments->currentItem()].asStringList() = theValueEditListBox->items(); break; default: arguments[theArguments->currentItem()].asString() = theValueLineEdit->text(); } - arguments[theArguments->currentItem()].cast(QVariant::Type(type)); + arguments[theArguments->currentItem()].cast(TQVariant::Type(type)); kdDebug() << "out: " << arguments[theArguments->currentItem()].toString() << endl; } @@ -242,21 +242,21 @@ void EditAction::updateArgument(int index) if(index >= 0) { switch(arguments[index].type()) { - case QVariant::Int: case QVariant::UInt: + case TQVariant::Int: case TQVariant::UInt: theValue->raiseWidget(2); theValueIntNumInput->setValue(arguments[index].toInt()); break; - case QVariant::Double: + case TQVariant::Double: theValue->raiseWidget(3); theValueDoubleNumInput->setValue(arguments[index].toDouble()); break; - case QVariant::Bool: + case TQVariant::Bool: theValue->raiseWidget(1); theValueCheckBox->setChecked(arguments[index].toBool()); break; - case QVariant::StringList: + case TQVariant::StringList: { theValue->raiseWidget(4); - QStringList backup = arguments[index].toStringList(); + TQStringList backup = arguments[index].toStringList(); // backup needed because calling clear will kill what ever has been saved. theValueEditListBox->clear(); theValueEditListBox->insertStringList(backup); @@ -284,8 +284,8 @@ void EditAction::updateApplications() theApplications->clear(); applicationMap.clear(); - QDict<Profile> dict = theServer->profiles(); - QDictIterator<Profile> i(dict); + TQDict<Profile> dict = theServer->profiles(); + TQDictIterator<Profile> i(dict); for(; i.current(); ++i) { theApplications->insertItem(i.current()->name()); applicationMap[i.current()->name()] = i.currentKey(); @@ -302,8 +302,8 @@ void EditAction::updateFunctions() const Profile *p = theServer->profiles()[applicationMap[theApplications->currentText()]]; - QDict<ProfileAction> dict = p->actions(); - for(QDictIterator<ProfileAction> i(dict); i.current(); ++i) + TQDict<ProfileAction> dict = p->actions(); + for(TQDictIterator<ProfileAction> i(dict); i.current(); ++i) { theFunctions->insertItem(i.current()->name()); functionMap[i.current()->name()] = i.currentKey(); } @@ -312,21 +312,21 @@ void EditAction::updateFunctions() void EditAction::updateDCOPApplications() { - QStringList names; + TQStringList names; theDCOPApplications->clear(); DCOPClient *theClient = KApplication::kApplication()->dcopClient(); QCStringList theApps = theClient->registeredApplications(); for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i) { - if(!QString(*i).find("anonymous")) continue; - QRegExp r("(.*)-[0-9]+"); - QString name = r.exactMatch(QString(*i)) ? r.cap(1) : *i; + if(!TQString(*i).find("anonymous")) continue; + TQRegExp r("(.*)-[0-9]+"); + TQString name = r.exactMatch(TQString(*i)) ? r.cap(1) : *i; if(names.contains(name)) continue; names += name; theDCOPApplications->insertItem(name); - uniqueProgramMap[name] = name == QString(*i); + uniqueProgramMap[name] = name == TQString(*i); nameProgramMap[name] = *i; @@ -343,7 +343,7 @@ void EditAction::updateDCOPObjects() if(!theObjects.size() && theDCOPApplications->currentText() == (*theAction).program()) theDCOPObjects->insertItem((*theAction).object()); for(QCStringList::iterator j = theObjects.begin(); j != theObjects.end(); ++j) if(*j != "ksycoca" && *j != "qt" && AddAction::getFunctions(nameProgramMap[theDCOPApplications->currentText()], *j).count()) - theDCOPObjects->insertItem(QString::fromUtf8(*j)); + theDCOPObjects->insertItem(TQString::fromUtf8(*j)); updateDCOPFunctions(); } @@ -351,9 +351,9 @@ void EditAction::updateDCOPFunctions() { theDCOPFunctions->clear(); if(theDCOPApplications->currentText().isNull() || theDCOPApplications->currentText().isEmpty()) return; - QStringList functions = AddAction::getFunctions(nameProgramMap[theDCOPApplications->currentText()], theDCOPObjects->currentText()); + TQStringList functions = AddAction::getFunctions(nameProgramMap[theDCOPApplications->currentText()], theDCOPObjects->currentText()); if(!functions.size() && theDCOPApplications->currentText() == (*theAction).program()) theDCOPFunctions->insertItem((*theAction).method().prototype()); - for(QStringList::iterator i = functions.begin(); i != functions.end(); ++i) + for(TQStringList::iterator i = functions.begin(); i != functions.end(); ++i) theDCOPFunctions->insertItem(*i); updateArguments(); } diff --git a/kdelirc/kcmlirc/editaction.h b/kdelirc/kcmlirc/editaction.h index 1a7aa00..7efa7ca 100644 --- a/kdelirc/kcmlirc/editaction.h +++ b/kdelirc/kcmlirc/editaction.h @@ -13,7 +13,7 @@ #ifndef EDITACTION_H #define EDITACTION_H -#include <qstring.h> +#include <tqstring.h> #include "iractions.h" #include "editactionbase.h" @@ -27,11 +27,11 @@ class EditAction : public EditActionBase { Q_OBJECT IRAIt theAction; - QMap<QString, QString> applicationMap, functionMap; - QMap<QString, QString> nameProgramMap; - QMap<QString, bool> uniqueProgramMap; + TQMap<TQString, TQString> applicationMap, functionMap; + TQMap<TQString, TQString> nameProgramMap; + TQMap<TQString, bool> uniqueProgramMap; Arguments arguments; - QString program; + TQString program; bool isUnique; public: @@ -48,7 +48,7 @@ public: virtual void updateDCOPObjects(); virtual void updateDCOPFunctions(); - EditAction(IRAIt action, QWidget *parent = 0, const char *name = 0); + EditAction(IRAIt action, TQWidget *parent = 0, const char *name = 0); ~EditAction(); }; diff --git a/kdelirc/kcmlirc/editmode.cpp b/kdelirc/kcmlirc/editmode.cpp index 3fba8f0..aad27da 100644 --- a/kdelirc/kcmlirc/editmode.cpp +++ b/kdelirc/kcmlirc/editmode.cpp @@ -16,7 +16,7 @@ #include "editmode.h" -EditMode::EditMode(QWidget *parent, const char *name, bool modal, WFlags fl) : EditModeBase(parent, name, modal, fl) +EditMode::EditMode(TQWidget *parent, const char *name, bool modal, WFlags fl) : EditModeBase(parent, name, modal, fl) { theIcon->setIconType(KIcon::Panel, KIcon::Any); } @@ -30,7 +30,7 @@ void EditMode::slotClearIcon() theIcon->resetIcon(); } -void EditMode::slotCheckText(const QString &newText) +void EditMode::slotCheckText(const TQString &newText) { theOK->setEnabled(!newText.isEmpty()); } diff --git a/kdelirc/kcmlirc/editmode.h b/kdelirc/kcmlirc/editmode.h index 14a709d..df3c888 100644 --- a/kdelirc/kcmlirc/editmode.h +++ b/kdelirc/kcmlirc/editmode.h @@ -23,10 +23,10 @@ class EditMode : public EditModeBase Q_OBJECT public: - void slotCheckText(const QString &newText); + void slotCheckText(const TQString &newText); void slotClearIcon(); - EditMode(QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags fl = 0); + EditMode(TQWidget *parent = 0, const char *name = 0, bool modal = false, WFlags fl = 0); ~EditMode(); }; diff --git a/kdelirc/kcmlirc/kcmlirc.cpp b/kdelirc/kcmlirc/kcmlirc.cpp index 1686bcd..b248127 100644 --- a/kdelirc/kcmlirc/kcmlirc.cpp +++ b/kdelirc/kcmlirc/kcmlirc.cpp @@ -8,14 +8,14 @@ * (at your option) any later version. * ***************************************************************************/ -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qradiobutton.h> -#include <qcombobox.h> -#include <qevent.h> -#include <qlistview.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqradiobutton.h> +#include <tqcombobox.h> +#include <tqevent.h> +#include <tqlistview.h> #include <kpushbutton.h> #include <kapplication.h> @@ -46,10 +46,10 @@ #include "modeslist.h" #include "selectprofile.h" -typedef KGenericFactory<KCMLirc, QWidget> theFactory; +typedef KGenericFactory<KCMLirc, TQWidget> theFactory; K_EXPORT_COMPONENT_FACTORY(kcmlirc, theFactory("kcmlirc")) -KCMLirc::KCMLirc(QWidget *parent, const char *name, QStringList /*args*/) : DCOPObject("KCMLirc"), KCModule(parent, name) +KCMLirc::KCMLirc(TQWidget *parent, const char *name, TQStringList /*args*/) : DCOPObject("KCMLirc"), KCModule(parent, 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")); @@ -71,22 +71,22 @@ KCMLirc::KCMLirc(QWidget *parent, const char *name, QStringList /*args*/) : DCOP kdDebug() << "OK" << ok << endl; - (new QHBoxLayout(this))->setAutoAdd(true); + (new TQHBoxLayout(this))->setAutoAdd(true); theKCMLircBase = new KCMLircBase(this); - connect(theKCMLircBase->theModes, SIGNAL( selectionChanged(QListViewItem *) ), this, SLOT( updateActions() )); - connect(theKCMLircBase->theModes, SIGNAL( selectionChanged(QListViewItem *) ), this, SLOT( updateModesStatus(QListViewItem *) )); - connect(theKCMLircBase->theActions, SIGNAL( currentChanged(QListViewItem *) ), this, SLOT( updateActionsStatus(QListViewItem *) )); - connect(theKCMLircBase->theExtensions, SIGNAL( selectionChanged(QListViewItem *) ), this, SLOT( updateInformation() )); - connect(theKCMLircBase->theModes, SIGNAL( itemRenamed(QListViewItem *) ), this, SLOT( slotRenamed(QListViewItem *) )); - connect(theKCMLircBase->theModes, SIGNAL(dropped(KListView*, QDropEvent*, QListViewItem*, QListViewItem*)), this, SLOT(slotDrop(KListView*, QDropEvent*, QListViewItem*, QListViewItem*))); - connect((QObject *)(theKCMLircBase->theAddActions), SIGNAL( clicked() ), this, SLOT( slotAddActions() )); - connect((QObject *)(theKCMLircBase->theAddAction), SIGNAL( clicked() ), this, SLOT( slotAddAction() )); - connect((QObject *)(theKCMLircBase->theEditAction), SIGNAL( clicked() ), this, SLOT( slotEditAction() )); - connect((QObject *)(theKCMLircBase->theActions), SIGNAL( doubleClicked(QListViewItem *) ), this, SLOT( slotEditAction() )); - connect((QObject *)(theKCMLircBase->theRemoveAction), SIGNAL( clicked() ), this, SLOT( slotRemoveAction() )); - connect((QObject *)(theKCMLircBase->theAddMode), SIGNAL( clicked() ), this, SLOT( slotAddMode() )); - connect((QObject *)(theKCMLircBase->theEditMode), SIGNAL( clicked() ), this, SLOT( slotEditMode() )); - connect((QObject *)(theKCMLircBase->theRemoveMode), SIGNAL( clicked() ), this, SLOT( slotRemoveMode() )); + 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->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*))); + connect((TQObject *)(theKCMLircBase->theAddActions), TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddActions() )); + connect((TQObject *)(theKCMLircBase->theAddAction), TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddAction() )); + connect((TQObject *)(theKCMLircBase->theEditAction), TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotEditAction() )); + connect((TQObject *)(theKCMLircBase->theActions), TQT_SIGNAL( doubleClicked(TQListViewItem *) ), this, TQT_SLOT( slotEditAction() )); + connect((TQObject *)(theKCMLircBase->theRemoveAction), TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemoveAction() )); + connect((TQObject *)(theKCMLircBase->theAddMode), TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddMode() )); + connect((TQObject *)(theKCMLircBase->theEditMode), TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotEditMode() )); + connect((TQObject *)(theKCMLircBase->theRemoveMode), TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemoveMode() )); load(); } @@ -94,7 +94,7 @@ KCMLirc::~KCMLirc() { } -void KCMLirc::updateModesStatus(QListViewItem *item) +void KCMLirc::updateModesStatus(TQListViewItem *item) { theKCMLircBase->theModes->setItemsRenameable(item && item->parent()); theKCMLircBase->theAddActions->setEnabled(ProfileServer::profileServer()->profiles().count() && theKCMLircBase->theModes->selectedItem() && RemoteServer::remoteServer()->remotes()[modeMap[theKCMLircBase->theModes->selectedItem()].remote()]); @@ -104,13 +104,13 @@ void KCMLirc::updateModesStatus(QListViewItem *item) theKCMLircBase->theEditMode->setEnabled(item); } -void KCMLirc::updateActionsStatus(QListViewItem *item) +void KCMLirc::updateActionsStatus(TQListViewItem *item) { theKCMLircBase->theRemoveAction->setEnabled(item); theKCMLircBase->theEditAction->setEnabled(item); } -void KCMLirc::slotRenamed(QListViewItem *item) +void KCMLirc::slotRenamed(TQListViewItem *item) { if(!item) return; @@ -127,13 +127,13 @@ void KCMLirc::slotEditAction() if(!theKCMLircBase->theActions->currentItem()) return; EditAction theDialog(actionMap[theKCMLircBase->theActions->currentItem()], this); - QListViewItem *item = theKCMLircBase->theModes->currentItem(); + TQListViewItem *item = theKCMLircBase->theModes->currentItem(); if(item->parent()) item = item->parent(); theDialog.theModes->insertItem(i18n("[Exit current mode]")); for(item = item->firstChild(); item; item = item->nextSibling()) theDialog.theModes->insertItem(item->text(0)); theDialog.readFrom(); - if(theDialog.exec() == QDialog::Accepted) { theDialog.writeBack(); emit changed(true); updateActions(); } + if(theDialog.exec() == TQDialog::Accepted) { theDialog.writeBack(); emit changed(true); updateActions(); } } void KCMLirc::slotAddActions() @@ -144,11 +144,11 @@ void KCMLirc::slotAddActions() SelectProfile theDialog(this, 0); - QMap<QListViewItem *, Profile *> profileMap; - QDict<Profile> dict = ProfileServer::profileServer()->profiles(); - for(QDictIterator<Profile> i(dict); i.current(); ++i) profileMap[new QListViewItem(theDialog.theProfiles, i.current()->name())] = i.current(); + TQMap<TQListViewItem *, Profile *> profileMap; + TQDict<Profile> dict = ProfileServer::profileServer()->profiles(); + for(TQDictIterator<Profile> i(dict); i.current(); ++i) profileMap[new TQListViewItem(theDialog.theProfiles, i.current()->name())] = i.current(); - if(theDialog.exec() == QDialog::Accepted && theDialog.theProfiles->currentItem()) + if(theDialog.exec() == TQDialog::Accepted && theDialog.theProfiles->currentItem()) { autoPopulate(*(profileMap[theDialog.theProfiles->currentItem()]), *(RemoteServer::remoteServer()->remotes()[m.remote()]), m.name()); updateActions(); emit changed(true); @@ -162,10 +162,10 @@ void KCMLirc::slotAddAction() Mode m = modeMap[theKCMLircBase->theModes->selectedItem()]; AddAction theDialog(this, 0, m); - connect(this, SIGNAL(haveButton(const QString &, const QString &)), &theDialog, SLOT(updateButton(const QString &, const QString &))); + connect(this, TQT_SIGNAL(haveButton(const TQString &, const TQString &)), &theDialog, TQT_SLOT(updateButton(const TQString &, const TQString &))); // populate the modes list box - QListViewItem *item = theKCMLircBase->theModes->selectedItem(); + TQListViewItem *item = theKCMLircBase->theModes->selectedItem(); if(item->parent()) item = item->parent(); theDialog.theModes->setEnabled(item->firstChild()); theDialog.theSwitchMode->setEnabled(item->firstChild()); @@ -174,7 +174,7 @@ void KCMLirc::slotAddAction() if(item->isSelected()) { a->setSelected(true); theDialog.theModes->setCurrentItem(a); } } - if(theDialog.exec() == QDialog::Accepted && theDialog.theButtons->selectedItem()) + if(theDialog.exec() == TQDialog::Accepted && theDialog.theButtons->selectedItem()) { IRAction a; a.setRemote(m.remote()); a.setMode(m.name()); @@ -246,10 +246,10 @@ void KCMLirc::slotRemoveAction() emit changed(true); } -void KCMLirc::autoPopulate(const Profile &profile, const Remote &remote, const QString &mode) +void KCMLirc::autoPopulate(const Profile &profile, const Remote &remote, const TQString &mode) { - QDict<RemoteButton> d = remote.buttons(); - for(QDictIterator<RemoteButton> i(d); i.current(); ++i) + TQDict<RemoteButton> d = remote.buttons(); + for(TQDictIterator<RemoteButton> i(d); i.current(); ++i) { const ProfileAction *pa = profile.searchClass(i.current()->getClass()); if(pa) { @@ -267,8 +267,8 @@ void KCMLirc::autoPopulate(const Profile &profile, const Remote &remote, const Q Arguments l; // argument count should be either 0 or 1. undefined if > 1. if(Prototype(pa->prototype()).argumentCount() == 1) - { l.append(QString().setNum(i.current()->parameter().toFloat() * pa->multiplier())); - l.back().cast(QVariant::nameToType(Prototype(pa->prototype()).type(0).utf8())); + { l.append(TQString().setNum(i.current()->parameter().toFloat() * pa->multiplier())); + l.back().cast(TQVariant::nameToType(Prototype(pa->prototype()).type(0).utf8())); } a.setArguments(l); allActions.addAction(a); @@ -281,15 +281,15 @@ void KCMLirc::slotAddMode() if(!theKCMLircBase->theModes->selectedItem()) return; NewMode theDialog(this, 0); - QMap<QListViewItem *, QString> remoteMap; - QListViewItem *tr = theKCMLircBase->theModes->selectedItem(); + TQMap<TQListViewItem *, TQString> remoteMap; + TQListViewItem *tr = theKCMLircBase->theModes->selectedItem(); if(tr) if(tr->parent()) tr = tr->parent(); - for(QListViewItem *i = theKCMLircBase->theModes->firstChild(); i; i = i->nextSibling()) + for(TQListViewItem *i = theKCMLircBase->theModes->firstChild(); i; i = i->nextSibling()) { KListViewItem *a = new KListViewItem(theDialog.theRemotes, i->text(0)); remoteMap[a] = modeMap[i].remote(); if(i == tr) { a->setSelected(true); theDialog.theRemotes->setCurrentItem(a); } } - if(theDialog.exec() == QDialog::Accepted && theDialog.theRemotes->selectedItem() && !theDialog.theName->text().isEmpty()) + if(theDialog.exec() == TQDialog::Accepted && theDialog.theRemotes->selectedItem() && !theDialog.theName->text().isEmpty()) { allModes.add(Mode(remoteMap[theDialog.theRemotes->selectedItem()], theDialog.theName->text())); updateModes(); @@ -313,9 +313,9 @@ void KCMLirc::slotEditMode() theDialog.theDefault->setChecked(allModes.isDefault(mode)); theDialog.theDefault->setEnabled(!allModes.isDefault(mode)); - if(theDialog.exec() == QDialog::Accepted) + if(theDialog.exec() == TQDialog::Accepted) { kdDebug() << "Setting icon : " << theDialog.theIcon->icon() << endl; - mode.setIconFile(theDialog.theIcon->icon().isEmpty() ? QString::null : theDialog.theIcon->icon()); + mode.setIconFile(theDialog.theIcon->icon().isEmpty() ? TQString::null : theDialog.theIcon->icon()); allModes.updateMode(mode); if(!mode.name().isEmpty()) { allActions.renameMode(mode, theDialog.theName->text()); @@ -348,7 +348,7 @@ void KCMLirc::slotSetDefaultMode() emit changed(true); } -void KCMLirc::slotDrop(KListView *, QDropEvent *, QListViewItem *, QListViewItem *after) +void KCMLirc::slotDrop(KListView *, TQDropEvent *, TQListViewItem *, TQListViewItem *after) { Mode m = modeMap[after]; @@ -357,7 +357,7 @@ void KCMLirc::slotDrop(KListView *, QDropEvent *, QListViewItem *, QListViewItem KMessageBox::error(this, i18n("You may only drag the selected items onto a mode of the same remote control"), i18n("You May Not Drag Here")); return; } - for(QListViewItem *i = theKCMLircBase->theActions->firstChild(); i; i = i->nextSibling()) + for(TQListViewItem *i = theKCMLircBase->theActions->firstChild(); i; i = i->nextSibling()) if(i->isSelected()) (*(actionMap[i])).setMode(m.name()); @@ -379,7 +379,7 @@ void KCMLirc::updateActions() theKCMLircBase->theModeLabel->setText(m.remoteName() + ": " + (m.name().isEmpty() ? i18n("Actions <i>always</i> available") : i18n("Actions available only in mode <b>%1</b>").arg(m.name()))); IRAItList l = allActions.findByMode(m); for(IRAItList::iterator i = l.begin(); i != l.end(); ++i) - { QListViewItem *b = new KListViewItem(theKCMLircBase->theActions, (**i).buttonName(), (**i).application(), (**i).function(), (**i).arguments().toString(), (**i).notes()); + { TQListViewItem *b = new KListViewItem(theKCMLircBase->theActions, (**i).buttonName(), (**i).application(), (**i).function(), (**i).arguments().toString(), (**i).notes()); actionMap[b] = *i; if(*i == oldCurrent) { b->setSelected(true); theKCMLircBase->theActions->setCurrentItem(b); } } @@ -389,7 +389,7 @@ void KCMLirc::updateActions() updateActionsStatus(theKCMLircBase->theActions->currentItem()); } -void KCMLirc::gotButton(QString remote, QString button) +void KCMLirc::gotButton(TQString remote, TQString button) { emit haveButton(remote, button); } @@ -403,14 +403,14 @@ void KCMLirc::updateModes() modeMap.clear(); IRKick_stub IRKick("irkick", "IRKick"); - QStringList remotes = IRKick.remotes(); + TQStringList remotes = IRKick.remotes(); if(remotes.begin() == remotes.end()) theKCMLircBase->theMainLabel->setMaximumSize(32767, 32767); else theKCMLircBase->theMainLabel->setMaximumSize(0, 0); - for(QStringList::iterator i = remotes.begin(); i != remotes.end(); ++i) + for(TQStringList::iterator i = remotes.begin(); i != remotes.end(); ++i) { Mode mode = allModes.getMode(*i, ""); - QListViewItem *a = new KListViewItem(theKCMLircBase->theModes, RemoteServer::remoteServer()->getRemoteName(*i), allModes.isDefault(mode) ? "Default" : "", mode.iconFile().isNull() ? "" : ""); + TQListViewItem *a = new KListViewItem(theKCMLircBase->theModes, RemoteServer::remoteServer()->getRemoteName(*i), allModes.isDefault(mode) ? "Default" : "", mode.iconFile().isNull() ? "" : ""); if(!mode.iconFile().isNull()) a->setPixmap(2, KIconLoader().loadIcon(mode.iconFile(), KIcon::Panel)); modeMap[a] = mode; // the null mode @@ -419,7 +419,7 @@ void KCMLirc::updateModes() ModeList l = allModes.getModes(*i); for(ModeList::iterator j = l.begin(); j != l.end(); ++j) if(!(*j).name().isEmpty()) - { QListViewItem *b = new KListViewItem(a, (*j).name(), allModes.isDefault(*j) ? i18n("Default") : "", (*j).iconFile().isNull() ? "" : ""); + { TQListViewItem *b = new KListViewItem(a, (*j).name(), allModes.isDefault(*j) ? i18n("Default") : "", (*j).iconFile().isNull() ? "" : ""); if(!(*j).iconFile().isNull()) b->setPixmap(2, KIconLoader().loadIcon((*j).iconFile(), KIcon::Panel)); modeMap[b] = *j; @@ -437,22 +437,22 @@ void KCMLirc::updateExtensions() theKCMLircBase->theExtensions->clear(); { ProfileServer *theServer = ProfileServer::profileServer(); - QListViewItem *a = new QListViewItem(theKCMLircBase->theExtensions, i18n("Applications")); + TQListViewItem *a = new TQListViewItem(theKCMLircBase->theExtensions, i18n("Applications")); a->setOpen(true); profileMap.clear(); - QDict<Profile> dict = theServer->profiles(); - QDictIterator<Profile> i(dict); + TQDict<Profile> dict = theServer->profiles(); + TQDictIterator<Profile> i(dict); for(; i.current(); ++i) - profileMap[new QListViewItem(a, i.current()->name())] = i.currentKey(); + profileMap[new TQListViewItem(a, i.current()->name())] = i.currentKey(); } { RemoteServer *theServer = RemoteServer::remoteServer(); - QListViewItem *a = new QListViewItem(theKCMLircBase->theExtensions, i18n("Remote Controls")); + TQListViewItem *a = new TQListViewItem(theKCMLircBase->theExtensions, i18n("Remote Controls")); a->setOpen(true); remoteMap.clear(); - QDict<Remote> dict = theServer->remotes(); - QDictIterator<Remote> i(dict); + TQDict<Remote> dict = theServer->remotes(); + TQDictIterator<Remote> i(dict); for(; i.current(); ++i) - remoteMap[new QListViewItem(a, i.current()->name())] = i.currentKey(); + remoteMap[new TQListViewItem(a, i.current()->name())] = i.currentKey(); } updateInformation(); } @@ -468,28 +468,28 @@ void KCMLirc::updateInformation() { theKCMLircBase->theInformationLabel->setText(i18n("Information on <b>%1</b>:").arg(theKCMLircBase->theExtensions->selectedItem()->text(0))); if(theKCMLircBase->theExtensions->selectedItem()->text(0) == i18n("Applications")) - new QListViewItem(theKCMLircBase->theInformation, i18n("Number of Applications"), QString().setNum(theKCMLircBase->theExtensions->selectedItem()->childCount())); + 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 QListViewItem(theKCMLircBase->theInformation, i18n("Number of Remote Controls"), QString().setNum(theKCMLircBase->theExtensions->selectedItem()->childCount())); + 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")) { ProfileServer *theServer = ProfileServer::profileServer(); const Profile *p = theServer->profiles()[profileMap[theKCMLircBase->theExtensions->selectedItem()]]; - new QListViewItem(theKCMLircBase->theInformation, i18n("Extension Name"), p->name()); - new QListViewItem(theKCMLircBase->theInformation, i18n("Extension Author"), p->author()); - new QListViewItem(theKCMLircBase->theInformation, i18n("Application Identifier"), p->id()); - new QListViewItem(theKCMLircBase->theInformation, i18n("Number of Actions"), QString().setNum(p->actions().count())); + new TQListViewItem(theKCMLircBase->theInformation, i18n("Extension Name"), p->name()); + 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 <b>%1</b>:").arg(p->name())); } else if(theKCMLircBase->theExtensions->selectedItem()->parent()->text(0) == i18n("Remote Controls")) { RemoteServer *theServer = RemoteServer::remoteServer(); const Remote *p = theServer->remotes()[remoteMap[theKCMLircBase->theExtensions->selectedItem()]]; - new QListViewItem(theKCMLircBase->theInformation, i18n("Extension Name"), p->name()); - new QListViewItem(theKCMLircBase->theInformation, i18n("Extension Author"), p->author()); - new QListViewItem(theKCMLircBase->theInformation, i18n("Remote Control Identifier"), p->id()); - new QListViewItem(theKCMLircBase->theInformation, i18n("Number of Buttons"), QString().setNum(p->buttons().count())); + new TQListViewItem(theKCMLircBase->theInformation, i18n("Extension Name"), p->name()); + 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 <b>%1</b>:").arg(p->name())); } } @@ -533,7 +533,7 @@ void KCMLirc::configChanged() // TODO: Take this out when I know how extern "C" { - KDE_EXPORT KCModule *create_kcmlirc(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_kcmlirc(TQWidget *parent, const char *) { KGlobal::locale()->insertCatalogue("kcmlirc"); return new KCMLirc(parent, "KCMLirc"); } diff --git a/kdelirc/kcmlirc/kcmlirc.h b/kdelirc/kcmlirc/kcmlirc.h index ba88ae2..517004f 100644 --- a/kdelirc/kcmlirc/kcmlirc.h +++ b/kdelirc/kcmlirc/kcmlirc.h @@ -11,8 +11,8 @@ #ifndef _KCMLIRC_H_ #define _KCMLIRC_H_ -#include <qstringlist.h> -#include <qmap.h> +#include <tqstringlist.h> +#include <tqmap.h> #include <kcmodule.h> @@ -37,16 +37,16 @@ private: KCMLircBase *theKCMLircBase; IRActions allActions; Modes allModes; - QMap<QListViewItem *, IRAIt > actionMap; - QMap<QListViewItem *, Mode> modeMap; - QMap<QListViewItem *, QString> profileMap, remoteMap; + TQMap<TQListViewItem *, IRAIt > actionMap; + TQMap<TQListViewItem *, Mode> modeMap; + TQMap<TQListViewItem *, TQString> profileMap, remoteMap; - void autoPopulate(const Profile &profile, const Remote &remote, const QString &mode); + void autoPopulate(const Profile &profile, const Remote &remote, const TQString &mode); public slots: void updateActions(); - void updateModesStatus(QListViewItem *); - void updateActionsStatus(QListViewItem *); + void updateModesStatus(TQListViewItem *); + void updateActionsStatus(TQListViewItem *); void updateModes(); void updateExtensions(); void updateInformation(); @@ -57,8 +57,8 @@ public slots: void slotAddActions(); void slotEditAction(); void slotRemoveAction(); - void slotDrop(KListView *, QDropEvent *, QListViewItem *, QListViewItem *after); - void slotRenamed(QListViewItem *item); + void slotDrop(KListView *, TQDropEvent *, TQListViewItem *, TQListViewItem *after); + void slotRenamed(TQListViewItem *item); void slotEditMode(); @@ -66,9 +66,9 @@ public slots: k_dcop: // MOC_SKIP_END // now just used as a proxy to AddAction class - virtual void gotButton(QString remote, QString button); + virtual void gotButton(TQString remote, TQString button); signals: - void haveButton(const QString &remote, const QString &button); + void haveButton(const TQString &remote, const TQString &button); public: virtual void load(); @@ -76,7 +76,7 @@ public: virtual void defaults(); virtual void configChanged(); - KCMLirc(QWidget *parent = 0, const char *name = 0, QStringList args = QStringList()); + KCMLirc(TQWidget *parent = 0, const char *name = 0, TQStringList args = TQStringList()); ~KCMLirc(); }; diff --git a/kdelirc/kcmlirc/kcmlircbase.ui.h b/kdelirc/kcmlirc/kcmlircbase.ui.h index f9082b6..124ab3f 100644 --- a/kdelirc/kcmlirc/kcmlircbase.ui.h +++ b/kdelirc/kcmlirc/kcmlircbase.ui.h @@ -23,7 +23,7 @@ void KCMLircBase::init() { delete theModes; modeLayout->removeItem(modeButtonLayout); - theModes = new ModesList(dynamic_cast<QWidget *>(modeLayout->parent()), "theModes"); + theModes = new ModesList(dynamic_cast<TQWidget *>(modeLayout->parent()), "theModes"); theModes->addColumn(i18n("Remote Control")); theModes->addColumn(i18n("Default")); theModes->addColumn(i18n("Icon")); diff --git a/kdelirc/kcmlirc/modeslist.cpp b/kdelirc/kcmlirc/modeslist.cpp index 6150705..83678d1 100644 --- a/kdelirc/kcmlirc/modeslist.cpp +++ b/kdelirc/kcmlirc/modeslist.cpp @@ -10,20 +10,20 @@ // Copyright: See COPYING file that comes with this distribution // // -#include <qwidget.h> +#include <tqwidget.h> #include <kdebug.h> #include "modeslist.h" -ModesList::ModesList(QWidget *parent, const char *name) : KListView(parent, name) +ModesList::ModesList(TQWidget *parent, const char *name) : KListView(parent, name) { setAcceptDrops(true); setDropVisualizer(false); setDropHighlighter(true); } -bool ModesList::acceptDrag(QDropEvent *) const +bool ModesList::acceptDrag(TQDropEvent *) const { // TODO: make safer by checking source/mime type // TODO: make safer by only allowing drops on the correct remote control's modes diff --git a/kdelirc/kcmlirc/modeslist.h b/kdelirc/kcmlirc/modeslist.h index 2fee458..22e6cc0 100644 --- a/kdelirc/kcmlirc/modeslist.h +++ b/kdelirc/kcmlirc/modeslist.h @@ -26,8 +26,8 @@ class ModesList : public KListView { Q_OBJECT public: - virtual bool acceptDrag(QDropEvent *) const; - ModesList(QWidget *parent = 0, const char *name = 0); + virtual bool acceptDrag(TQDropEvent *) const; + ModesList(TQWidget *parent = 0, const char *name = 0); }; #endif diff --git a/kdelirc/kcmlirc/newmode.ui.h b/kdelirc/kcmlirc/newmode.ui.h index 96c1eb4..2bb2f54 100644 --- a/kdelirc/kcmlirc/newmode.ui.h +++ b/kdelirc/kcmlirc/newmode.ui.h @@ -18,7 +18,7 @@ *****************************************************************************/ -void NewMode::slotTextChanged( const QString &newText ) +void NewMode::slotTextChanged( const TQString &newText ) { kPushButton6->setEnabled(newText != ""); } |