From 5f5ee2367157176ed223b86343eb0a9e4022e020 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:52:55 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdelirc/kcmlirc/editaction.cpp | 72 +++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'kdelirc/kcmlirc/editaction.cpp') 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 -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -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 &p = a->arguments(); + const TQValueList &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 dict = theServer->profiles(); - QDictIterator i(dict); + TQDict dict = theServer->profiles(); + TQDictIterator 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 dict = p->actions(); - for(QDictIterator i(dict); i.current(); ++i) + TQDict dict = p->actions(); + for(TQDictIterator 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(); } -- cgit v1.2.1