From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- filesharing/advanced/kcm_sambaconf/dictmanager.cpp | 66 +++++++++++----------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'filesharing/advanced/kcm_sambaconf/dictmanager.cpp') diff --git a/filesharing/advanced/kcm_sambaconf/dictmanager.cpp b/filesharing/advanced/kcm_sambaconf/dictmanager.cpp index 1b252ed5..c2437f04 100644 --- a/filesharing/advanced/kcm_sambaconf/dictmanager.cpp +++ b/filesharing/advanced/kcm_sambaconf/dictmanager.cpp @@ -27,12 +27,12 @@ ******************************************************************************/ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -56,73 +56,73 @@ DictManager::DictManager(SambaShare* share): DictManager::~DictManager() { } -void DictManager::handleUnsupportedWidget(const QString & s, QWidget* w) { +void DictManager::handleUnsupportedWidget(const TQString & s, TQWidget* w) { w->setEnabled(false); - QToolTip::add(w,i18n("The option %1 is not supported by your Samba version").arg(s)); + TQToolTip::add(w,i18n("The option %1 is not supported by your Samba version").arg(s)); } -void DictManager::add(const QString & key, QLineEdit* lineEdit) { +void DictManager::add(const TQString & key, TQLineEdit* lineEdit) { if (_share->optionSupported(key)) { lineEditDict.insert(key,lineEdit); - connect(lineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(changedSlot())); + connect(lineEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changedSlot())); } else handleUnsupportedWidget(key,lineEdit); } -void DictManager::add(const QString & key, QCheckBox* checkBox){ +void DictManager::add(const TQString & key, TQCheckBox* checkBox){ if (_share->optionSupported(key)) { checkBoxDict.insert(key,checkBox); - connect(checkBox, SIGNAL(clicked()), this, SLOT(changedSlot())); + connect(checkBox, TQT_SIGNAL(clicked()), this, TQT_SLOT(changedSlot())); } else handleUnsupportedWidget(key,checkBox); } -void DictManager::add(const QString & key, KURLRequester* urlRq){ +void DictManager::add(const TQString & key, KURLRequester* urlRq){ if (_share->optionSupported(key)) { urlRequesterDict.insert(key,urlRq); - connect(urlRq, SIGNAL(textChanged(const QString &)), this, SLOT(changedSlot())); + connect(urlRq, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changedSlot())); } else handleUnsupportedWidget(key,urlRq); } -void DictManager::add(const QString & key, QSpinBox* spinBox){ +void DictManager::add(const TQString & key, TQSpinBox* spinBox){ if (_share->optionSupported(key)) { spinBoxDict.insert(key,spinBox); - connect(spinBox, SIGNAL(valueChanged(int)), this, SLOT(changedSlot())); + connect(spinBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changedSlot())); } else handleUnsupportedWidget(key,spinBox); } -void DictManager::add(const QString & key, QComboBox* comboBox, QStringList* values){ +void DictManager::add(const TQString & key, TQComboBox* comboBox, TQStringList* values){ if (_share->optionSupported(key)) { comboBoxDict.insert(key,comboBox); comboBoxValuesDict.insert(key,values); - connect(comboBox, SIGNAL(activated(int)), this, SLOT(changedSlot())); + connect(comboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changedSlot())); } else handleUnsupportedWidget(key,comboBox); } void DictManager::load(SambaShare* share, bool globalValue, bool defaultValue){ - QDictIterator checkBoxIt( checkBoxDict ); + TQDictIterator checkBoxIt( checkBoxDict ); for( ; checkBoxIt.current(); ++checkBoxIt ) { checkBoxIt.current()->setChecked(share->getBoolValue(checkBoxIt.currentKey(),globalValue,defaultValue)); } - QDictIterator lineEditIt( lineEditDict ); + TQDictIterator lineEditIt( lineEditDict ); for( ; lineEditIt.current(); ++lineEditIt ) { lineEditIt.current()->setText(share->getValue(lineEditIt.currentKey(),globalValue,defaultValue)); } - QDictIterator urlRequesterIt( urlRequesterDict ); + TQDictIterator urlRequesterIt( urlRequesterDict ); for( ; urlRequesterIt.current(); ++urlRequesterIt ) { urlRequesterIt.current()->setURL(share->getValue(urlRequesterIt.currentKey(),globalValue,defaultValue)); } - QDictIterator spinBoxIt( spinBoxDict ); + TQDictIterator spinBoxIt( spinBoxDict ); for( ; spinBoxIt.current(); ++spinBoxIt ) { spinBoxIt.current()->setValue(share->getValue(spinBoxIt.currentKey(),globalValue,defaultValue).toInt()); @@ -133,11 +133,11 @@ void DictManager::load(SambaShare* share, bool globalValue, bool defaultValue){ } void DictManager::loadComboBoxes(SambaShare* share, bool globalValue, bool defaultValue) { - QDictIterator comboBoxIt( comboBoxDict ); + TQDictIterator comboBoxIt( comboBoxDict ); for( ; comboBoxIt.current(); ++comboBoxIt ) { - QStringList *v = comboBoxValuesDict[comboBoxIt.currentKey()]; - QString value = share->getValue(comboBoxIt.currentKey(),globalValue,defaultValue); + TQStringList *v = comboBoxValuesDict[comboBoxIt.currentKey()]; + TQString value = share->getValue(comboBoxIt.currentKey(),globalValue,defaultValue); if (value.isNull()) continue; @@ -147,9 +147,9 @@ void DictManager::loadComboBoxes(SambaShare* share, bool globalValue, bool defau int comboIndex = 0; - QStringList::iterator it; + TQStringList::iterator it; for ( it = v->begin(); it != v->end(); ++it ) { - QString lower = (*it).lower(); + TQString lower = (*it).lower(); if ( lower == "yes" && boolFromText(value)) break; @@ -170,34 +170,34 @@ void DictManager::loadComboBoxes(SambaShare* share, bool globalValue, bool defau void DictManager::save(SambaShare* share, bool globalValue, bool defaultValue){ - QDictIterator checkBoxIt( checkBoxDict ); + TQDictIterator checkBoxIt( checkBoxDict ); for( ; checkBoxIt.current(); ++checkBoxIt ) { share->setValue(checkBoxIt.currentKey(),checkBoxIt.current()->isChecked(), globalValue, defaultValue ); } - QDictIterator lineEditIt( lineEditDict ); + TQDictIterator lineEditIt( lineEditDict ); for( ; lineEditIt.current(); ++lineEditIt ) { share->setValue(lineEditIt.currentKey(),lineEditIt.current()->text(), globalValue, defaultValue ); } - QDictIterator urlRequesterIt( urlRequesterDict ); + TQDictIterator urlRequesterIt( urlRequesterDict ); for( ; urlRequesterIt.current(); ++urlRequesterIt ) { share->setValue(urlRequesterIt.currentKey(),urlRequesterIt.current()->url(), globalValue, defaultValue ); } - QDictIterator spinBoxIt( spinBoxDict ); + TQDictIterator spinBoxIt( spinBoxDict ); for( ; spinBoxIt.current(); ++spinBoxIt ) { share->setValue(spinBoxIt.currentKey(),spinBoxIt.current()->value(), globalValue, defaultValue ); } - QDictIterator comboBoxIt( comboBoxDict ); + TQDictIterator comboBoxIt( comboBoxDict ); for( ; comboBoxIt.current(); ++comboBoxIt ) { - QStringList* values = comboBoxValuesDict[comboBoxIt.currentKey()]; + TQStringList* values = comboBoxValuesDict[comboBoxIt.currentKey()]; int i = comboBoxIt.current()->currentItem(); share->setValue(comboBoxIt.currentKey(),(*values)[i], globalValue, defaultValue ); -- cgit v1.2.1