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/display/display.cpp | 32 ++++++++++++++++---------------- kcontrol/display/display.h | 8 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) (limited to 'kcontrol/display') diff --git a/kcontrol/display/display.cpp b/kcontrol/display/display.cpp index 1c514810c..d7675160e 100644 --- a/kcontrol/display/display.cpp +++ b/kcontrol/display/display.cpp @@ -17,9 +17,9 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include @@ -27,34 +27,34 @@ #include "display.h" -typedef KGenericFactory DisplayFactory; +typedef KGenericFactory DisplayFactory; K_EXPORT_COMPONENT_FACTORY ( kcm_display, DisplayFactory( "display" ) ) -KCMDisplay::KCMDisplay( QWidget *parent, const char *name, const QStringList& ) +KCMDisplay::KCMDisplay( TQWidget *parent, const char *name, const TQStringList& ) : KCModule( parent, name ) , m_changed(false) { - m_tabs = new QTabWidget( this ); + m_tabs = new TQTabWidget( this ); addTab( "randr", i18n( "Size && Orientation" ) ); addTab( "nvidiadisplay", i18n( "Graphics Adaptor" ) ); addTab( "nvidia3d", i18n( "3D Options" ) ); addTab( "kgamma", i18n( "Monitor Gamma" ) ); - if ( QApplication::desktop()->isVirtualDesktop() ) + if ( TQApplication::desktop()->isVirtualDesktop() ) addTab( "xinerama", i18n( "Multiple Monitors" ) ); addTab( "energy", i18n( "Power Control" ) ); - QVBoxLayout *top = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQVBoxLayout *top = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); top->addWidget( m_tabs ); setButtons( Apply|Help ); load(); } -void KCMDisplay::addTab( const QString &name, const QString &label ) +void KCMDisplay::addTab( const TQString &name, const TQString &label ) { - QWidget *page = new QWidget( m_tabs, name.latin1() ); - QVBoxLayout *top = new QVBoxLayout( page, KDialog::marginHint() ); + TQWidget *page = new TQWidget( m_tabs, name.latin1() ); + TQVBoxLayout *top = new TQVBoxLayout( page, KDialog::marginHint() ); KCModule *kcm = KCModuleLoader::loadModule( name, page ); @@ -63,7 +63,7 @@ void KCMDisplay::addTab( const QString &name, const QString &label ) top->addWidget( kcm ); m_tabs->addTab( page, label ); - connect( kcm, SIGNAL( changed(bool) ), SLOT( moduleChanged(bool) ) ); + connect( kcm, TQT_SIGNAL( changed(bool) ), TQT_SLOT( moduleChanged(bool) ) ); m_modules.insert(kcm, false); } else @@ -72,20 +72,20 @@ void KCMDisplay::addTab( const QString &name, const QString &label ) void KCMDisplay::load() { - for (QMap::ConstIterator it = m_modules.begin(); it != m_modules.end(); ++it) + for (TQMap::ConstIterator it = m_modules.begin(); it != m_modules.end(); ++it) it.key()->load(); } void KCMDisplay::save() { - for (QMap::Iterator it = m_modules.begin(); it != m_modules.end(); ++it) + for (TQMap::Iterator it = m_modules.begin(); it != m_modules.end(); ++it) if (it.data()) it.key()->save(); } void KCMDisplay::moduleChanged( bool isChanged ) { - QMap::Iterator currentModule = m_modules.find(static_cast(const_cast(sender()))); + TQMap::Iterator currentModule = m_modules.find(static_cast(const_cast(sender()))); Q_ASSERT(currentModule != m_modules.end()); if (currentModule.data() == isChanged) return; @@ -94,7 +94,7 @@ void KCMDisplay::moduleChanged( bool isChanged ) bool c = false; - for (QMap::ConstIterator it = m_modules.begin(); it != m_modules.end(); ++it) { + for (TQMap::ConstIterator it = m_modules.begin(); it != m_modules.end(); ++it) { if (it.data()) { c = true; break; diff --git a/kcontrol/display/display.h b/kcontrol/display/display.h index d07695320..ec5811725 100644 --- a/kcontrol/display/display.h +++ b/kcontrol/display/display.h @@ -29,7 +29,7 @@ class KCMDisplay : public KCModule Q_OBJECT public: - KCMDisplay( QWidget *parent, const char *name, const QStringList& ); + KCMDisplay( TQWidget *parent, const char *name, const TQStringList& ); void load(); void save(); @@ -37,10 +37,10 @@ class KCMDisplay : public KCModule void moduleChanged(bool isChanged); private: - void addTab( const QString &name, const QString &label ); + void addTab( const TQString &name, const TQString &label ); - QTabWidget *m_tabs; - QMap m_modules; + TQTabWidget *m_tabs; + TQMap m_modules; bool m_changed; }; -- cgit v1.2.1