From c663b6440964f6ac48027143ac9e63298991f9d0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:33:34 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kcontrol/iccconfig/iccconfig.cpp | 100 +++++++++++++++++++-------------------- kcontrol/iccconfig/iccconfig.h | 20 ++++---- 2 files changed, 60 insertions(+), 60 deletions(-) (limited to 'kcontrol/iccconfig') diff --git a/kcontrol/iccconfig/iccconfig.cpp b/kcontrol/iccconfig/iccconfig.cpp index 05ea09cac..41ddfe8e3 100644 --- a/kcontrol/iccconfig/iccconfig.cpp +++ b/kcontrol/iccconfig/iccconfig.cpp @@ -18,11 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -45,14 +45,14 @@ #include #include #include -#include +#include #include "iccconfig.h" using namespace std; /**** DLL Interface ****/ -typedef KGenericFactory KICCCFactory; +typedef KGenericFactory KICCCFactory; K_EXPORT_COMPONENT_FACTORY( kcm_iccconfig, KICCCFactory("kcmiccconfig") ) KSimpleConfig *config; @@ -60,13 +60,13 @@ KSimpleConfig *systemconfig; /**** KICCConfig ****/ -KICCConfig::KICCConfig(QWidget *parent, const char *name, const QStringList &) +KICCConfig::KICCConfig(TQWidget *parent, const char *name, const TQStringList &) : KCModule(KICCCFactory::instance(), parent, name) { - QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); - config = new KSimpleConfig( QString::fromLatin1( "kiccconfigrc" )); - systemconfig = new KSimpleConfig( QString::fromLatin1( KDE_CONFDIR "/kicc/kiccconfigrc" )); + TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + config = new KSimpleConfig( TQString::fromLatin1( "kiccconfigrc" )); + systemconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/kicc/kiccconfigrc" )); KAboutData *about = new KAboutData(I18N_NOOP("kcmiccconfig"), I18N_NOOP("KDE ICC Profile Control Module"), @@ -82,23 +82,23 @@ KICCConfig::KICCConfig(QWidget *parent, const char *name, const QStringList &) setRootOnlyMsg(i18n("The global ICC color profile is a system wide setting, and requires administrator access
To alter the system's global ICC profile, click on the \"Administrator Mode\" button below.")); setUseRootOnlyMsg(true); - connect(base->systemEnableSupport, SIGNAL(clicked()), SLOT(changed())); - connect(base->systemEnableSupport, SIGNAL(toggled(bool)), base->systemIccFile, SLOT(setEnabled(bool))); - connect(base->enableSupport, SIGNAL(clicked()), SLOT(changed())); - connect(base->enableSupport, SIGNAL(toggled(bool)), base->iccFile, SLOT(setEnabled(bool))); - connect(base->enableSupport, SIGNAL(toggled(bool)), base->randrScreenList, SLOT(setEnabled(bool))); - connect(base->enableSupport, SIGNAL(toggled(bool)), base->iccProfileList, SLOT(setEnabled(bool))); - connect(base->enableSupport, SIGNAL(toggled(bool)), base->addProfileButton, SLOT(setEnabled(bool))); - connect(base->enableSupport, SIGNAL(toggled(bool)), base->renameProfileButton, SLOT(setEnabled(bool))); - connect(base->enableSupport, SIGNAL(toggled(bool)), base->deleteProfileButton, SLOT(setEnabled(bool))); - connect(base->iccProfileList, SIGNAL(activated(int)), this, SLOT(selectProfile(int))); - connect(base->randrScreenList, SIGNAL(activated(int)), this, SLOT(selectScreen(int))); - connect(base->iccFile, SIGNAL(textChanged(const QString&)), SLOT(updateArray())); - connect(base->systemIccFile, SIGNAL(textChanged(const QString&)), SLOT(changed())); - - connect(base->addProfileButton, SIGNAL(clicked()), this, SLOT(addProfile())); - connect(base->renameProfileButton, SIGNAL(clicked()), this, SLOT(renameProfile())); - connect(base->deleteProfileButton, SIGNAL(clicked()), this, SLOT(deleteProfile())); + connect(base->systemEnableSupport, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); + connect(base->systemEnableSupport, TQT_SIGNAL(toggled(bool)), base->systemIccFile, TQT_SLOT(setEnabled(bool))); + connect(base->enableSupport, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); + connect(base->enableSupport, TQT_SIGNAL(toggled(bool)), base->iccFile, TQT_SLOT(setEnabled(bool))); + connect(base->enableSupport, TQT_SIGNAL(toggled(bool)), base->randrScreenList, TQT_SLOT(setEnabled(bool))); + connect(base->enableSupport, TQT_SIGNAL(toggled(bool)), base->iccProfileList, TQT_SLOT(setEnabled(bool))); + connect(base->enableSupport, TQT_SIGNAL(toggled(bool)), base->addProfileButton, TQT_SLOT(setEnabled(bool))); + connect(base->enableSupport, TQT_SIGNAL(toggled(bool)), base->renameProfileButton, TQT_SLOT(setEnabled(bool))); + connect(base->enableSupport, TQT_SIGNAL(toggled(bool)), base->deleteProfileButton, TQT_SLOT(setEnabled(bool))); + connect(base->iccProfileList, TQT_SIGNAL(activated(int)), this, TQT_SLOT(selectProfile(int))); + connect(base->randrScreenList, TQT_SIGNAL(activated(int)), this, TQT_SLOT(selectScreen(int))); + connect(base->iccFile, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(updateArray())); + connect(base->systemIccFile, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed())); + + connect(base->addProfileButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(addProfile())); + connect(base->renameProfileButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(renameProfile())); + connect(base->deleteProfileButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteProfile())); load(); @@ -127,7 +127,7 @@ KICCConfig::~KICCConfig() void KICCConfig::deleteProfile () { int i; - QString *iccFileArrayNew; + TQString *iccFileArrayNew; // Delete the profile config->deleteGroup(base->iccProfileList->currentText()); @@ -146,24 +146,24 @@ void KICCConfig::deleteProfile () { void KICCConfig::renameProfile () { int i; - QString *iccFileArrayNew; + TQString *iccFileArrayNew; // Pop up a text entry box asking for the name of the new profile bool _ok = false; bool _end = false; - QString _new; - QString _text = i18n("Please enter the new profile name below:"); - QString _error; + TQString _new; + TQString _text = i18n("Please enter the new profile name below:"); + TQString _error; while (!_end) { - _new = KInputDialog::getText( i18n("ICC Profile Configuration"), _error + _text, QString::null, &_ok, this); + _new = KInputDialog::getText( i18n("ICC Profile Configuration"), _error + _text, TQString::null, &_ok, this); if (!_ok ) { _end = true; } else { - _error = QString(); + _error = TQString(); if (!_new.isEmpty()) { if (findProfileIndex(_new) != -1) - _error = i18n("Error: A profile with that name already exists") + QString("\n"); + _error = i18n("Error: A profile with that name already exists") + TQString("\n"); else _end = true; } @@ -180,24 +180,24 @@ void KICCConfig::renameProfile () { void KICCConfig::addProfile () { int i; - QString *iccFileArrayNew; + TQString *iccFileArrayNew; // Pop up a text entry box asking for the name of the new profile bool _ok = false; bool _end = false; - QString _new; - QString _text = i18n("Please enter the new profile name below:"); - QString _error; + TQString _new; + TQString _text = i18n("Please enter the new profile name below:"); + TQString _error; while (!_end) { - _new = KInputDialog::getText( i18n("ICC Profile Configuration"), _error + _text, QString::null, &_ok, this); + _new = KInputDialog::getText( i18n("ICC Profile Configuration"), _error + _text, TQString::null, &_ok, this); if (!_ok ) { _end = true; } else { - _error = QString(); + _error = TQString(); if (!_new.isEmpty()) { if (findProfileIndex(_new) != -1) - _error = i18n("Error: A profile with that name already exists") + QString("\n"); + _error = i18n("Error: A profile with that name already exists") + TQString("\n"); else _end = true; } @@ -250,11 +250,11 @@ void KICCConfig::updateDisplayedInformation () { base->iccFile->setURL(iccFileArray[((base->iccProfileList->currentItem())*(base->randrScreenList->count()))+(base->randrScreenList->currentItem())]); } -QString KICCConfig::extractFileName(QString displayName, QString profileName) { +TQString KICCConfig::extractFileName(TQString displayName, TQString profileName) { // } -int KICCConfig::findProfileIndex(QString profileName) { +int KICCConfig::findProfileIndex(TQString profileName) { int i; for (i=0;iiccProfileList->text(i) == profileName) { @@ -264,7 +264,7 @@ int KICCConfig::findProfileIndex(QString profileName) { return -1; } -int KICCConfig::findScreenIndex(QString screenName) { +int KICCConfig::findScreenIndex(TQString screenName) { int i; for (i=0;i<(base->randrScreenList->count());i++) { if (base->randrScreenList->text(i) == screenName) { @@ -317,7 +317,7 @@ void KICCConfig::load(bool useDefaults ) // Find all profile names numberOfProfiles = 0; cfgProfiles = config->groupList(); - for (QStringList::Iterator i(cfgProfiles.begin()); i != cfgProfiles.end(); ++i) { + for (TQStringList::Iterator i(cfgProfiles.begin()); i != cfgProfiles.end(); ++i) { base->iccProfileList->insertItem((*i), -1); numberOfProfiles++; } @@ -379,7 +379,7 @@ void KICCConfig::save() config->sync(); systemconfig->sync(); - QString errorstr; + TQString errorstr; if (base->enableSupport->isChecked() == true) { errorstr = randrsimple->applyIccConfiguration(base->iccProfileList->currentText(), KDE_CONFDIR); } @@ -390,7 +390,7 @@ void KICCConfig::save() errorstr = randrsimple->clearIccConfiguration(); } if (errorstr != "") { - KMessageBox::error(this, QString("Unable to apply ICC configuration:\n\r%1").arg(errorstr)); + KMessageBox::error(this, TQString("Unable to apply ICC configuration:\n\r%1").arg(errorstr)); } emit changed(false); @@ -401,7 +401,7 @@ void KICCConfig::defaults() load( true ); } -QString KICCConfig::quickHelp() const +TQString KICCConfig::quickHelp() const { return i18n("

ICC Profile Configuration

This module allows you to configure KDE support" " for ICC profiles. This allows you to easily color correct your monitor" diff --git a/kcontrol/iccconfig/iccconfig.h b/kcontrol/iccconfig/iccconfig.h index a12c9a49d..e3b91e34d 100644 --- a/kcontrol/iccconfig/iccconfig.h +++ b/kcontrol/iccconfig/iccconfig.h @@ -42,8 +42,8 @@ class KICCConfig : public KCModule, public DCOPObject public: - //KICCConfig(QWidget *parent = 0L, const char *name = 0L); - KICCConfig(QWidget *parent, const char *name, const QStringList &); + //KICCConfig(TQWidget *parent = 0L, const char *name = 0L); + KICCConfig(TQWidget *parent, const char *name, const TQStringList &); virtual ~KICCConfig(); ICCConfigBase *base; @@ -54,7 +54,7 @@ public: void defaults(); int buttons(); - QString quickHelp() const; + TQString quickHelp() const; k_dcop: @@ -66,14 +66,14 @@ private: ScreenInfo *randr_screen_info; int numberOfProfiles; int numberOfScreens; - QStringList cfgScreenInfo; - QStringList cfgProfiles; + TQStringList cfgScreenInfo; + TQStringList cfgProfiles; void updateDisplayedInformation (); - QString extractFileName(QString displayName, QString profileName); - QString *iccFileArray; - int findProfileIndex(QString profileName); - int findScreenIndex(QString screenName); - QString m_defaultProfile; + TQString extractFileName(TQString displayName, TQString profileName); + TQString *iccFileArray; + int findProfileIndex(TQString profileName); + int findScreenIndex(TQString screenName); + TQString m_defaultProfile; private slots: void selectProfile (int slotNumber); -- cgit v1.2.1