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/kcontrol/aboutwidget.cpp | 48 ++++++------- kcontrol/kcontrol/aboutwidget.h | 18 ++--- kcontrol/kcontrol/dockcontainer.cpp | 82 +++++++++++------------ kcontrol/kcontrol/dockcontainer.h | 20 +++--- kcontrol/kcontrol/global.cpp | 46 ++++++------- kcontrol/kcontrol/global.h | 48 ++++++------- kcontrol/kcontrol/helpwidget.cpp | 10 +-- kcontrol/kcontrol/helpwidget.h | 12 ++-- kcontrol/kcontrol/indexwidget.cpp | 50 +++++++------- kcontrol/kcontrol/indexwidget.h | 10 +-- kcontrol/kcontrol/kcrootonly.cpp | 10 +-- kcontrol/kcontrol/kcrootonly.h | 2 +- kcontrol/kcontrol/main.cpp | 22 +++--- kcontrol/kcontrol/moduleIface.cpp | 12 ++-- kcontrol/kcontrol/moduleIface.h | 18 ++--- kcontrol/kcontrol/moduleiconview.cpp | 38 +++++------ kcontrol/kcontrol/moduleiconview.h | 22 +++--- kcontrol/kcontrol/modulemenu.cpp | 30 ++++----- kcontrol/kcontrol/modulemenu.h | 18 ++--- kcontrol/kcontrol/modules.cpp | 60 ++++++++--------- kcontrol/kcontrol/modules.h | 30 ++++----- kcontrol/kcontrol/moduletreeview.cpp | 126 +++++++++++++++++------------------ kcontrol/kcontrol/moduletreeview.h | 50 +++++++------- kcontrol/kcontrol/proxywidget.cpp | 110 +++++++++++++++--------------- kcontrol/kcontrol/proxywidget.h | 10 +-- kcontrol/kcontrol/searchwidget.cpp | 66 +++++++++--------- kcontrol/kcontrol/searchwidget.h | 34 +++++----- kcontrol/kcontrol/toplevel.cpp | 126 +++++++++++++++++------------------ kcontrol/kcontrol/toplevel.h | 14 ++-- 29 files changed, 571 insertions(+), 571 deletions(-) (limited to 'kcontrol/kcontrol') diff --git a/kcontrol/kcontrol/aboutwidget.cpp b/kcontrol/kcontrol/aboutwidget.cpp index 209b264ec..3a07ee567 100644 --- a/kcontrol/kcontrol/aboutwidget.cpp +++ b/kcontrol/kcontrol/aboutwidget.cpp @@ -17,11 +17,11 @@ */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -68,8 +68,8 @@ static const char system_text[] = I18N_NOOP("System:"); static const char release_text[] = I18N_NOOP("Release:"); static const char machine_text[] = I18N_NOOP("Machine:"); -AboutWidget::AboutWidget(QWidget *parent , const char *name, QListViewItem* category, const QString &caption) - : QHBox(parent, name), +AboutWidget::AboutWidget(TQWidget *parent , const char *name, TQListViewItem* category, const TQString &caption) + : TQHBox(parent, name), _moduleList(false), _category(category), _caption(caption) @@ -80,16 +80,16 @@ AboutWidget::AboutWidget(QWidget *parent , const char *name, QListViewItem* cate setMinimumSize(400, 400); // set qwhatsthis help - QWhatsThis::add(this, i18n(intro_text)); + TQWhatsThis::add(this, i18n(intro_text)); _viewer = new KHTMLPart( this, "_viewer" ); - _viewer->widget()->setSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ); + _viewer->widget()->setSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ); connect( _viewer->browserExtension(), - SIGNAL(openURLRequest(const KURL&, const KParts::URLArgs&)), - this, SLOT(slotModuleLinkClicked(const KURL&)) ); + TQT_SIGNAL(openURLRequest(const KURL&, const KParts::URLArgs&)), + this, TQT_SLOT(slotModuleLinkClicked(const KURL&)) ); updatePixmap(); } -void AboutWidget::setCategory( QListViewItem* category, const QString& icon, const QString &caption ) +void AboutWidget::setCategory( TQListViewItem* category, const TQString& icon, const TQString &caption ) { _icon = icon; _caption = caption; @@ -105,11 +105,11 @@ void AboutWidget::setCategory( QListViewItem* category, const QString& icon, con void AboutWidget::updatePixmap() { - QString file = locate( "data", "kcontrol/about/main.html" ); - QFile f( file ); + TQString file = locate( "data", "kcontrol/about/main.html" ); + TQFile f( file ); f.open( IO_ReadOnly ); - QTextStream t( &f ); - QString res = t.read(); + TQTextStream t( &f ); + TQString res = t.read(); res = res.arg( locate( "data", "kdeui/about/kde_infopage.css" ) ); if ( kapp->reverseLayout() ) @@ -118,7 +118,7 @@ void AboutWidget::updatePixmap() res = res.arg( "" ); - QString title, intro, caption; + TQString title, intro, caption; if (KCGlobal::isInfoCenter()) { res = res.arg(i18n(kcc_infotext)) @@ -132,7 +132,7 @@ void AboutWidget::updatePixmap() .arg(i18n(intro_text)); } - QString content; + TQString content; if (!_moduleList) { @@ -151,7 +151,7 @@ void AboutWidget::updatePixmap() else { KIconLoader *loader = KGlobal::instance()->iconLoader(); - QString iconPath; + TQString iconPath; if (!_icon.isEmpty()) { iconPath = loader->iconPath( _icon, KIcon::Toolbar ); content += "
 " + _caption + "
"; @@ -159,11 +159,11 @@ void AboutWidget::updatePixmap() content += "\n"; // traverse the list - QListViewItem* pEntry = _category; + TQListViewItem* pEntry = _category; while (pEntry != NULL) { - QString szName; - QString szComment; + TQString szName; + TQString szComment; ConfigModule *module = static_cast(pEntry)->module(); /* TODO: work out link */ content += "
"; @@ -174,8 +174,8 @@ void AboutWidget::updatePixmap() iconPath = loader->iconPath( module->icon(), KIcon::Small ); content += " " + szName + "" + szComment; - KURL moduleURL( QString("kcm://%1").arg(QString().sprintf("%p",module)) ); - QString linkURL( moduleURL.url() ); + KURL moduleURL( TQString("kcm://%1").arg(TQString().sprintf("%p",module)) ); + TQString linkURL( moduleURL.url() ); content = content.arg( linkURL ); _moduleMap.insert( linkURL, module ); } diff --git a/kcontrol/kcontrol/aboutwidget.h b/kcontrol/kcontrol/aboutwidget.h index e0b51fd54..b6ae9857b 100644 --- a/kcontrol/kcontrol/aboutwidget.h +++ b/kcontrol/kcontrol/aboutwidget.h @@ -20,9 +20,9 @@ #ifndef __aboutwidget_h__ #define __aboutwidget_h__ -#include -#include -#include +#include +#include +#include class KCModuleInfo; class QPixmap; @@ -36,13 +36,13 @@ class AboutWidget : public QHBox Q_OBJECT public: - AboutWidget(QWidget *parent, const char *name=0, QListViewItem* category=0, const QString &caption=QString::null); + AboutWidget(TQWidget *parent, const char *name=0, TQListViewItem* category=0, const TQString &caption=TQString::null); /** * Set a new category without creating a new AboutWidget if there is * one visible already (reduces flicker) */ - void setCategory( QListViewItem* category, const QString& icon, const QString& caption); + void setCategory( TQListViewItem* category, const TQString& icon, const TQString& caption); signals: void moduleSelected(ConfigModule *); @@ -58,11 +58,11 @@ private: void updatePixmap(); bool _moduleList; - QListViewItem* _category; - QString _icon; - QString _caption; + TQListViewItem* _category; + TQString _icon; + TQString _caption; KHTMLPart *_viewer; - QMap _moduleMap; + TQMap _moduleMap; }; #endif diff --git a/kcontrol/kcontrol/dockcontainer.cpp b/kcontrol/kcontrol/dockcontainer.cpp index be2587114..598807a2d 100644 --- a/kcontrol/kcontrol/dockcontainer.cpp +++ b/kcontrol/kcontrol/dockcontainer.cpp @@ -17,13 +17,13 @@ */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -42,34 +42,34 @@ class ModuleTitle : public QHBox { public: - ModuleTitle( QWidget *parent, const char *name=0 ); + ModuleTitle( TQWidget *parent, const char *name=0 ); ~ModuleTitle() {} void showTitleFor( ConfigModule *module ); void clear(); protected: - QLabel *m_icon; - QLabel *m_name; + TQLabel *m_icon; + TQLabel *m_name; }; -ModuleTitle::ModuleTitle( QWidget *parent, const char *name ) - : QHBox( parent, name ) +ModuleTitle::ModuleTitle( TQWidget *parent, const char *name ) + : TQHBox( parent, name ) { - QWidget *spacer = new QWidget( this ); + TQWidget *spacer = new TQWidget( this ); spacer->setFixedWidth( KDialog::marginHint()-KDialog::spacingHint() ); - m_icon = new QLabel( this ); - m_name = new QLabel( this ); + m_icon = new TQLabel( this ); + m_name = new TQLabel( this ); - QFont font = m_name->font(); + TQFont font = m_name->font(); font.setPointSize( font.pointSize()+1 ); font.setBold( true ); m_name->setFont( font ); setSpacing( KDialog::spacingHint() ); - if ( QApplication::reverseLayout() ) + if ( TQApplication::reverseLayout() ) { - spacer = new QWidget( this ); + spacer = new TQWidget( this ); setStretchFactor( spacer, 10 ); } else @@ -81,10 +81,10 @@ void ModuleTitle::showTitleFor( ConfigModule *config ) if ( !config ) return; - QWhatsThis::remove( this ); - QWhatsThis::add( this, config->comment() ); + TQWhatsThis::remove( this ); + TQWhatsThis::add( this, config->comment() ); KIconLoader *loader = KGlobal::instance()->iconLoader(); - QPixmap icon = loader->loadIcon( config->icon(), KIcon::NoGroup, 22 ); + TQPixmap icon = loader->loadIcon( config->icon(), KIcon::NoGroup, 22 ); m_icon->setPixmap( icon ); m_name->setText( config->moduleName() ); @@ -93,20 +93,20 @@ void ModuleTitle::showTitleFor( ConfigModule *config ) void ModuleTitle::clear() { - m_icon->setPixmap( QPixmap() ); - m_name->setText( QString::null ); + m_icon->setPixmap( TQPixmap() ); + m_name->setText( TQString::null ); kapp->processEvents(); } -ModuleWidget::ModuleWidget( QWidget *parent, const char *name ) - : QVBox( parent, name ) +ModuleWidget::ModuleWidget( TQWidget *parent, const char *name ) + : TQVBox( parent, name ) { - QHBox* titleLine = new QHBox( this, "titleLine"); + TQHBox* titleLine = new TQHBox( this, "titleLine"); m_title = new ModuleTitle( titleLine, "m_title" ); - QPushButton *helpButton = new QPushButton( titleLine ); + TQPushButton *helpButton = new TQPushButton( titleLine ); helpButton->setIconSet( SmallIconSet("help") ); - connect (helpButton, SIGNAL( clicked() ), this, SIGNAL( helpRequest() ) ); - m_body = new QVBox( this, "m_body" ); + connect (helpButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( helpRequest() ) ); + m_body = new TQVBox( this, "m_body" ); setStretchFactor( m_body, 10 ); } @@ -117,7 +117,7 @@ ProxyWidget *ModuleWidget::load( ConfigModule *module ) if ( proxy ) { - proxy->reparent(m_body, 0, QPoint(0,0), false); + proxy->reparent(m_body, 0, TQPoint(0,0), false); proxy->show(); m_title->showTitleFor( module ); } @@ -125,19 +125,19 @@ ProxyWidget *ModuleWidget::load( ConfigModule *module ) return proxy; } -DockContainer::DockContainer(QWidget *parent) - : QWidgetStack(parent, "DockContainer") +DockContainer::DockContainer(TQWidget *parent) + : TQWidgetStack(parent, "DockContainer") , _basew(0L) , _module(0L) { - _busyw = new QLabel(i18n("Loading..."), this); + _busyw = new TQLabel(i18n("Loading..."), this); _busyw->setAlignment(AlignCenter); _busyw->setTextFormat(RichText); _busyw->setGeometry(0,0, width(), height()); addWidget( _busyw ); _modulew = new ModuleWidget( this, "_modulew" ); - connect (_modulew, SIGNAL( helpRequest() ), SLOT( slotHelpRequest() ) ); + connect (_modulew, TQT_SIGNAL( helpRequest() ), TQT_SLOT( slotHelpRequest() ) ); addWidget( _modulew ); } @@ -146,7 +146,7 @@ DockContainer::~DockContainer() deleteModule(); } -void DockContainer::setBaseWidget(QWidget *widget) +void DockContainer::setBaseWidget(TQWidget *widget) { removeWidget( _basew ); delete _basew; @@ -163,17 +163,17 @@ void DockContainer::setBaseWidget(QWidget *widget) ProxyWidget* DockContainer::loadModule( ConfigModule *module ) { - QApplication::setOverrideCursor( waitCursor ); + TQApplication::setOverrideCursor( waitCursor ); ProxyWidget *widget = _modulew->load( module ); if (widget) { _module = module; - connect(_module, SIGNAL(childClosed()), SLOT(removeModule())); - connect(_module, SIGNAL(changed(ConfigModule *)), - SIGNAL(changedModule(ConfigModule *))); - connect(widget, SIGNAL(quickHelpChanged()), SLOT(quickHelpChanged())); + connect(_module, TQT_SIGNAL(childClosed()), TQT_SLOT(removeModule())); + connect(_module, TQT_SIGNAL(changed(ConfigModule *)), + TQT_SIGNAL(changedModule(ConfigModule *))); + connect(widget, TQT_SIGNAL(quickHelpChanged()), TQT_SLOT(quickHelpChanged())); raiseWidget( _modulew ); emit newModule(widget->caption(), module->docPath(), widget->quickHelp()); @@ -184,7 +184,7 @@ ProxyWidget* DockContainer::loadModule( ConfigModule *module ) emit newModule(_basew->caption(), "", ""); } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); return widget; } diff --git a/kcontrol/kcontrol/dockcontainer.h b/kcontrol/kcontrol/dockcontainer.h index 94494cac5..6291d5b00 100644 --- a/kcontrol/kcontrol/dockcontainer.h +++ b/kcontrol/kcontrol/dockcontainer.h @@ -20,8 +20,8 @@ #ifndef __dockcontainer_h__ #define __dockcontainer_h__ -#include -#include +#include +#include class ConfigModule; class ModuleTitle; @@ -33,7 +33,7 @@ class ModuleWidget : public QVBox Q_OBJECT public: - ModuleWidget( QWidget *parent, const char *name ); + ModuleWidget( TQWidget *parent, const char *name ); ~ModuleWidget() {} ProxyWidget* load( ConfigModule *module ); @@ -43,7 +43,7 @@ class ModuleWidget : public QVBox protected: ModuleTitle *m_title; - QVBox *m_body; + TQVBox *m_body; }; class DockContainer : public QWidgetStack @@ -51,11 +51,11 @@ class DockContainer : public QWidgetStack Q_OBJECT public: - DockContainer(QWidget *parent=0); + DockContainer(TQWidget *parent=0); virtual ~DockContainer(); - void setBaseWidget(QWidget *widget); - QWidget *baseWidget() { return _basew; } + void setBaseWidget(TQWidget *widget); + TQWidget *baseWidget() { return _basew; } bool dockModule(ConfigModule *module); ConfigModule *module() { return _module; } @@ -72,12 +72,12 @@ protected: ProxyWidget* loadModule( ConfigModule *module ); signals: - void newModule(const QString &name, const QString& docPath, const QString &quickhelp); + void newModule(const TQString &name, const TQString& docPath, const TQString &quickhelp); void changedModule(ConfigModule *module); private: - QWidget *_basew; - QLabel *_busyw; + TQWidget *_basew; + TQLabel *_busyw; ModuleWidget *_modulew; ConfigModule *_module; diff --git a/kcontrol/kcontrol/global.cpp b/kcontrol/kcontrol/global.cpp index 83d2052b2..0a409b7e0 100644 --- a/kcontrol/kcontrol/global.cpp +++ b/kcontrol/kcontrol/global.cpp @@ -26,24 +26,24 @@ #include #include -#include -#include +#include +#include #include "global.h" bool KCGlobal::_root = false; bool KCGlobal::_infocenter = false; -QStringList KCGlobal::_types; -QString KCGlobal::_uname = ""; -QString KCGlobal::_hname = ""; -QString KCGlobal::_kdeversion = ""; -QString KCGlobal::_isystem = ""; -QString KCGlobal::_irelease = ""; -QString KCGlobal::_iversion = ""; -QString KCGlobal::_imachine = ""; +TQStringList KCGlobal::_types; +TQString KCGlobal::_uname = ""; +TQString KCGlobal::_hname = ""; +TQString KCGlobal::_kdeversion = ""; +TQString KCGlobal::_isystem = ""; +TQString KCGlobal::_irelease = ""; +TQString KCGlobal::_iversion = ""; +TQString KCGlobal::_imachine = ""; IndexViewMode KCGlobal::_viewmode = Icon; KIcon::StdSizes KCGlobal::_iconsize = KIcon::SizeMedium; -QString KCGlobal::_baseGroup = ""; +TQString KCGlobal::_baseGroup = ""; void KCGlobal::init() { @@ -51,7 +51,7 @@ void KCGlobal::init() buf[0] = '\0'; if (!gethostname(buf, sizeof(buf))) buf[sizeof(buf)-1] ='\0'; - QString hostname(buf); + TQString hostname(buf); setHostName(hostname); setUserName(KUser().loginName()); @@ -68,13 +68,13 @@ void KCGlobal::init() setSystemMachine(info.machine); } -void KCGlobal::setType(const QCString& s) +void KCGlobal::setType(const TQCString& s) { - QString string = s.lower(); - _types = QStringList::split(',', string); + TQString string = s.lower(); + _types = TQStringList::split(',', string); } -QString KCGlobal::baseGroup() +TQString KCGlobal::baseGroup() { if ( _baseGroup.isEmpty() ) { @@ -91,26 +91,26 @@ QString KCGlobal::baseGroup() if (_infocenter) { kdWarning() << "No K menu group with X-KDE-BaseGroup=info found ! Defaulting to Settings/Information/" << endl; - _baseGroup = QString::fromLatin1("Settings/Information/"); + _baseGroup = TQString::fromLatin1("Settings/Information/"); } else { kdWarning() << "No K menu group with X-KDE-BaseGroup=settings found ! Defaulting to Settings/" << endl; - _baseGroup = QString::fromLatin1("Settings/"); + _baseGroup = TQString::fromLatin1("Settings/"); } } } return _baseGroup; } -void KCGlobal::repairAccels( QWidget * tw ) +void KCGlobal::repairAccels( TQWidget * tw ) { - QObjectList * l = tw->queryList( "QAccel" ); - QObjectListIt it( *l ); // iterate over the buttons - QObject * obj; + TQObjectList * l = tw->queryList( "TQAccel" ); + TQObjectListIt it( *l ); // iterate over the buttons + TQObject * obj; while ( (obj=it.current()) != 0 ) { // for each found object... ++it; - ((QAccel*)obj)->repairEventFilter(); + ((TQAccel*)obj)->repairEventFilter(); } delete l; // delete the list, not the objects } diff --git a/kcontrol/kcontrol/global.h b/kcontrol/kcontrol/global.h index 71fbb55c3..80c588751 100644 --- a/kcontrol/kcontrol/global.h +++ b/kcontrol/kcontrol/global.h @@ -22,9 +22,9 @@ #include -#include -#include -#include +#include +#include +#include enum IndexViewMode {Icon, Tree}; @@ -36,41 +36,41 @@ public: static bool isInfoCenter() { return _infocenter; } static bool root() { return _root; } - static QStringList types() { return _types; } - static QString userName() { return _uname; } - static QString hostName() { return _hname; } - static QString kdeVersion() { return _kdeversion; } - static QString systemName() { return _isystem; } - static QString systemRelease() { return _irelease; } - static QString systemVersion() { return _iversion; } - static QString systemMachine() { return _imachine; } + static TQStringList types() { return _types; } + static TQString userName() { return _uname; } + static TQString hostName() { return _hname; } + static TQString kdeVersion() { return _kdeversion; } + static TQString systemName() { return _isystem; } + static TQString systemRelease() { return _irelease; } + static TQString systemVersion() { return _iversion; } + static TQString systemMachine() { return _imachine; } static IndexViewMode viewMode() { return _viewmode; } static KIcon::StdSizes iconSize() { return _iconsize; } - static QString baseGroup(); + static TQString baseGroup(); static void setIsInfoCenter(bool b) { _infocenter = b; } static void setRoot(bool r) { _root = r; } - static void setType(const QCString& s); - static void setUserName(const QString& n){ _uname = n; } - static void setHostName(const QString& n){ _hname = n; } - static void setKDEVersion(const QString& n){ _kdeversion = n; } - static void setSystemName(const QString& n){ _isystem = n; } - static void setSystemRelease(const QString& n){ _irelease = n; } - static void setSystemVersion(const QString& n){ _iversion = n; } - static void setSystemMachine(const QString& n){ _imachine = n; } + static void setType(const TQCString& s); + static void setUserName(const TQString& n){ _uname = n; } + static void setHostName(const TQString& n){ _hname = n; } + static void setKDEVersion(const TQString& n){ _kdeversion = n; } + static void setSystemName(const TQString& n){ _isystem = n; } + static void setSystemRelease(const TQString& n){ _irelease = n; } + static void setSystemVersion(const TQString& n){ _iversion = n; } + static void setSystemMachine(const TQString& n){ _imachine = n; } static void setViewMode(IndexViewMode m) { _viewmode = m; } static void setIconSize(KIcon::StdSizes s) { _iconsize = s; } - static void repairAccels( QWidget * tw ); + static void repairAccels( TQWidget * tw ); private: static bool _root; static bool _infocenter; - static QStringList _types; - static QString _uname, _hname, _isystem, _irelease, _iversion, _imachine, _kdeversion; + static TQStringList _types; + static TQString _uname, _hname, _isystem, _irelease, _iversion, _imachine, _kdeversion; static IndexViewMode _viewmode; static KIcon::StdSizes _iconsize; - static QString _baseGroup; + static TQString _baseGroup; }; #endif diff --git a/kcontrol/kcontrol/helpwidget.cpp b/kcontrol/kcontrol/helpwidget.cpp index b53fbc8a9..131a9bd5c 100644 --- a/kcontrol/kcontrol/helpwidget.cpp +++ b/kcontrol/kcontrol/helpwidget.cpp @@ -17,7 +17,7 @@ */ -#include +#include #include #include @@ -28,12 +28,12 @@ #include "global.h" #include "helpwidget.h" -HelpWidget::HelpWidget(QWidget *parent) : QWhatsThis(parent) +HelpWidget::HelpWidget(TQWidget *parent) : TQWhatsThis(parent) { setBaseText(); } -void HelpWidget::setText(const QString& docPath, const QString& text) +void HelpWidget::setText(const TQString& docPath, const TQString& text) { docpath = docPath; if (text.isEmpty() && docPath.isEmpty()) @@ -59,12 +59,12 @@ void HelpWidget::setBaseText() "Click here to read the general Control Center manual.") ); } -QString HelpWidget::text() const +TQString HelpWidget::text() const { return helptext; } -bool HelpWidget::clicked(const QString & _url) +bool HelpWidget::clicked(const TQString & _url) { if ( _url.isNull() ) return true; diff --git a/kcontrol/kcontrol/helpwidget.h b/kcontrol/kcontrol/helpwidget.h index 08e495096..7393a7c13 100644 --- a/kcontrol/kcontrol/helpwidget.h +++ b/kcontrol/kcontrol/helpwidget.h @@ -26,18 +26,18 @@ class QWhatsThis; class HelpWidget : public QWhatsThis { public: - HelpWidget(QWidget *parent); + HelpWidget(TQWidget *parent); - void setText( const QString& docPath, const QString& text); + void setText( const TQString& docPath, const TQString& text); void setBaseText(); - QString text() const; + TQString text() const; - bool clicked(const QString &); + bool clicked(const TQString &); void handbookRequest(); private: - QString docpath; - QString helptext; + TQString docpath; + TQString helptext; }; #endif diff --git a/kcontrol/kcontrol/indexwidget.cpp b/kcontrol/kcontrol/indexwidget.cpp index d427b5707..cf57dc0e4 100644 --- a/kcontrol/kcontrol/indexwidget.cpp +++ b/kcontrol/kcontrol/indexwidget.cpp @@ -18,7 +18,7 @@ */ -#include +#include #include "indexwidget.h" @@ -26,8 +26,8 @@ #include "moduletreeview.h" #include "moduleiconview.h" -IndexWidget::IndexWidget(ConfigModuleList *modules, QWidget *parent ,const char *name) - : QWidgetStack(parent, name) +IndexWidget::IndexWidget(ConfigModuleList *modules, TQWidget *parent ,const char *name) + : TQWidgetStack(parent, name) , _tree(0L) , _icon(0L) , _modules(modules) @@ -44,7 +44,7 @@ void IndexWidget::reload() _icon->fill(); } -QListViewItem *IndexWidget::firstTreeViewItem() +TQListViewItem *IndexWidget::firstTreeViewItem() { if (_tree) return _tree->firstChild(); @@ -53,14 +53,14 @@ QListViewItem *IndexWidget::firstTreeViewItem() } -void IndexWidget::resizeEvent(QResizeEvent *e) +void IndexWidget::resizeEvent(TQResizeEvent *e) { - QWidgetStack::resizeEvent( e ); + TQWidgetStack::resizeEvent( e ); } void IndexWidget::moduleSelected(ConfigModule *m) { - const QObject *obj = sender(); + const TQObject *obj = sender(); if(!m) return; emit moduleActivated(m); @@ -69,19 +69,19 @@ void IndexWidget::moduleSelected(ConfigModule *m) { _tree->makeVisible(m); - _tree->disconnect(SIGNAL(moduleSelected(ConfigModule*))); + _tree->disconnect(TQT_SIGNAL(moduleSelected(ConfigModule*))); _tree->makeSelected(m); - connect(_tree, SIGNAL(moduleSelected(ConfigModule*)), - this, SLOT(moduleSelected(ConfigModule*))); + connect(_tree, TQT_SIGNAL(moduleSelected(ConfigModule*)), + this, TQT_SLOT(moduleSelected(ConfigModule*))); } else if (obj->inherits("ModuleTreeView") && _icon) { _icon->makeVisible(m); - _icon->disconnect(SIGNAL(moduleSelected(ConfigModule*))); + _icon->disconnect(TQT_SIGNAL(moduleSelected(ConfigModule*))); _icon->makeSelected(m); - connect(_icon, SIGNAL(moduleSelected(ConfigModule*)), - this, SLOT(moduleSelected(ConfigModule*))); + connect(_icon, TQT_SIGNAL(moduleSelected(ConfigModule*)), + this, TQT_SLOT(moduleSelected(ConfigModule*))); } } @@ -89,17 +89,17 @@ void IndexWidget::makeSelected(ConfigModule *module) { if (_icon) { - _icon->disconnect(SIGNAL(moduleSelected(ConfigModule*))); + _icon->disconnect(TQT_SIGNAL(moduleSelected(ConfigModule*))); _icon->makeSelected(module); - connect(_icon, SIGNAL(moduleSelected(ConfigModule*)), - this, SLOT(moduleSelected(ConfigModule*))); + connect(_icon, TQT_SIGNAL(moduleSelected(ConfigModule*)), + this, TQT_SLOT(moduleSelected(ConfigModule*))); } if (_tree) { - _tree->disconnect(SIGNAL(moduleSelected(ConfigModule*))); + _tree->disconnect(TQT_SIGNAL(moduleSelected(ConfigModule*))); _tree->makeSelected(module); - connect(_tree, SIGNAL(moduleSelected(ConfigModule*)), - this, SLOT(moduleSelected(ConfigModule*))); + connect(_tree, TQT_SIGNAL(moduleSelected(ConfigModule*)), + this, TQT_SLOT(moduleSelected(ConfigModule*))); } } @@ -121,8 +121,8 @@ void IndexWidget::activateView(IndexViewMode mode) { _icon=new ModuleIconView(_modules, this); _icon->fill(); - connect(_icon, SIGNAL(moduleSelected(ConfigModule*)), - this, SLOT(moduleSelected(ConfigModule*))); + connect(_icon, TQT_SIGNAL(moduleSelected(ConfigModule*)), + this, TQT_SLOT(moduleSelected(ConfigModule*))); } raiseWidget( _icon ); } @@ -132,10 +132,10 @@ void IndexWidget::activateView(IndexViewMode mode) { _tree=new ModuleTreeView(_modules, this); _tree->fill(); - connect(_tree, SIGNAL(moduleSelected(ConfigModule*)), - this, SLOT(moduleSelected(ConfigModule*))); - connect(_tree, SIGNAL(categorySelected(QListViewItem*)), - this, SIGNAL(categorySelected(QListViewItem*))); + connect(_tree, TQT_SIGNAL(moduleSelected(ConfigModule*)), + this, TQT_SLOT(moduleSelected(ConfigModule*))); + connect(_tree, TQT_SIGNAL(categorySelected(TQListViewItem*)), + this, TQT_SIGNAL(categorySelected(TQListViewItem*))); } raiseWidget( _tree ); } diff --git a/kcontrol/kcontrol/indexwidget.h b/kcontrol/kcontrol/indexwidget.h index 0a358aa2e..a0591fcd1 100644 --- a/kcontrol/kcontrol/indexwidget.h +++ b/kcontrol/kcontrol/indexwidget.h @@ -20,7 +20,7 @@ #ifndef __indexwidget_h__ #define __indexwidget_h__ -#include +#include #include "global.h" @@ -34,10 +34,10 @@ class IndexWidget : public QWidgetStack Q_OBJECT public: - IndexWidget(ConfigModuleList *list, QWidget *parent, const char *name=0); + IndexWidget(ConfigModuleList *list, TQWidget *parent, const char *name=0); virtual ~IndexWidget(); - QListViewItem *firstTreeViewItem(); + TQListViewItem *firstTreeViewItem(); public slots: void makeVisible(ConfigModule *module); void makeSelected(ConfigModule *module); @@ -49,10 +49,10 @@ protected slots: signals: void moduleActivated(ConfigModule *module); - void categorySelected(QListViewItem *); + void categorySelected(TQListViewItem *); protected: - void resizeEvent(QResizeEvent *e); + void resizeEvent(TQResizeEvent *e); private: ModuleTreeView *_tree; diff --git a/kcontrol/kcontrol/kcrootonly.cpp b/kcontrol/kcontrol/kcrootonly.cpp index 5d3a0ce27..723895de3 100644 --- a/kcontrol/kcontrol/kcrootonly.cpp +++ b/kcontrol/kcontrol/kcrootonly.cpp @@ -16,18 +16,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include "kcrootonly.h" -KCRootOnly::KCRootOnly(QWidget *parent, const char *name) +KCRootOnly::KCRootOnly(TQWidget *parent, const char *name) : KCModule(parent, name) { - QVBoxLayout *layout=new QVBoxLayout(this); - QLabel *label = new QLabel(i18n("You need super user privileges to run this control module.
" + TQVBoxLayout *layout=new TQVBoxLayout(this); + TQLabel *label = new TQLabel(i18n("You need super user privileges to run this control module.
" "Click on the \"Administrator Mode\" button below."), this); layout->addWidget(label); label->setAlignment(AlignCenter); diff --git a/kcontrol/kcontrol/kcrootonly.h b/kcontrol/kcontrol/kcrootonly.h index e04df7c80..b52fab34b 100644 --- a/kcontrol/kcontrol/kcrootonly.h +++ b/kcontrol/kcontrol/kcrootonly.h @@ -6,7 +6,7 @@ class KCRootOnly: public KCModule { public: - KCRootOnly(QWidget *parent, const char *name); + KCRootOnly(TQWidget *parent, const char *name); }; #endif diff --git a/kcontrol/kcontrol/main.cpp b/kcontrol/kcontrol/main.cpp index 90e63583c..4a0191dd7 100644 --- a/kcontrol/kcontrol/main.cpp +++ b/kcontrol/kcontrol/main.cpp @@ -32,7 +32,7 @@ * to newInstance(). */ -#include +#include #include #include @@ -61,10 +61,10 @@ KControlApp::KControlApp() // KUniqueApplication does dcop regitration for us ModuleIface *modIface = new ModuleIface(toplevel, "moduleIface"); - connect (modIface, SIGNAL(helpClicked()), toplevel, SLOT(slotHelpRequest())); - connect (modIface, SIGNAL(handbookClicked()), toplevel, SLOT(slotHandbookRequest())); + connect (modIface, TQT_SIGNAL(helpClicked()), toplevel, TQT_SLOT(slotHelpRequest())); + connect (modIface, TQT_SIGNAL(handbookClicked()), toplevel, TQT_SLOT(slotHandbookRequest())); - QRect desk = KGlobalSettings::desktopGeometry(toplevel); + TQRect desk = KGlobalSettings::desktopGeometry(toplevel); KConfig *config = KGlobal::config(); config->setGroup("General"); // Initial size is: @@ -73,13 +73,13 @@ KControlApp::KControlApp() // 800x600 on 72 dpi, 12 pt font // --> 368 + 6 x dpiX, 312 + 4 x dpiY // Adjusted for font size - QPaintDeviceMetrics pdm(toplevel); + TQPaintDeviceMetrics pdm(toplevel); int fontSize = toplevel->fontInfo().pointSize(); if (fontSize == 0) fontSize = (toplevel->fontInfo().pixelSize() * 72) / pdm.logicalDpiX(); - int x = config->readNumEntry(QString::fromLatin1("InitialWidth %1").arg(desk.width()), + int x = config->readNumEntry(TQString::fromLatin1("InitialWidth %1").arg(desk.width()), QMIN( desk.width(), 368 + (6*pdm.logicalDpiX()*fontSize)/12 ) ); - int y = config->readNumEntry(QString::fromLatin1("InitialHeight %1").arg(desk.height()), + int y = config->readNumEntry(TQString::fromLatin1("InitialHeight %1").arg(desk.height()), QMIN( desk.height(), 312 + (4*pdm.logicalDpiX()*fontSize)/12 ) ); toplevel->resize(x,y); } @@ -90,9 +90,9 @@ KControlApp::~KControlApp() { KConfig *config = KGlobal::config(); config->setGroup("General"); - QWidget *desk = QApplication::desktop(); - config->writeEntry(QString::fromLatin1("InitialWidth %1").arg(desk->width()), toplevel->width()); - config->writeEntry(QString::fromLatin1("InitialHeight %1").arg(desk->height()), toplevel->height()); + TQWidget *desk = TQApplication::desktop(); + config->writeEntry(TQString::fromLatin1("InitialWidth %1").arg(desk->width()), toplevel->width()); + config->writeEntry(TQString::fromLatin1("InitialHeight %1").arg(desk->height()), toplevel->height()); config->sync(); } delete toplevel; @@ -109,7 +109,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[]) KCONTROL_VERSION, I18N_NOOP("The KDE Info Center"), KAboutData::License_GPL, I18N_NOOP("(c) 1998-2004, The KDE Control Center Developers")); - QCString argv_0 = argv[0]; + TQCString argv_0 = argv[0]; KAboutData *aboutData; if (argv_0.right(11) == "kinfocenter") { diff --git a/kcontrol/kcontrol/moduleIface.cpp b/kcontrol/kcontrol/moduleIface.cpp index b58f06c26..6d40a8bf7 100644 --- a/kcontrol/kcontrol/moduleIface.cpp +++ b/kcontrol/kcontrol/moduleIface.cpp @@ -23,26 +23,26 @@ #include #include -ModuleIface::ModuleIface(QObject *parent, const char *name) - : QObject(parent, name), DCOPObject(name) { +ModuleIface::ModuleIface(TQObject *parent, const char *name) + : TQObject(parent, name), DCOPObject(name) { - _parent = static_cast(parent); + _parent = static_cast(parent); } ModuleIface::~ModuleIface() { } -QFont ModuleIface::getFont() { +TQFont ModuleIface::getFont() { return _parent->font(); } -QPalette ModuleIface::getPalette(){ +TQPalette ModuleIface::getPalette(){ kdDebug(1208) << "Returned Palette" << endl; return _parent->palette(); } -QString ModuleIface::getStyle() { +TQString ModuleIface::getStyle() { KConfig config( "kdeglobals" ); config.setGroup( "General" ); return config.readEntry("widgetStyle"); diff --git a/kcontrol/kcontrol/moduleIface.h b/kcontrol/kcontrol/moduleIface.h index 8c034d5cd..17b4b07ad 100644 --- a/kcontrol/kcontrol/moduleIface.h +++ b/kcontrol/kcontrol/moduleIface.h @@ -22,23 +22,23 @@ #include -#include -#include -#include +#include +#include +#include -class ModuleIface : public QObject, public DCOPObject { +class ModuleIface : public TQObject, public DCOPObject { Q_OBJECT K_DCOP public: - ModuleIface(QObject *parent, const char *name); + ModuleIface(TQObject *parent, const char *name); ~ModuleIface(); k_dcop: - QFont getFont(); - QPalette getPalette(); - QString getStyle(); + TQFont getFont(); + TQPalette getPalette(); + TQString getStyle(); void invokeHandbook(); void invokeHelp(); @@ -47,7 +47,7 @@ signals: void helpClicked(); private: - QWidget *_parent; + TQWidget *_parent; }; diff --git a/kcontrol/kcontrol/moduleiconview.cpp b/kcontrol/kcontrol/moduleiconview.cpp index 041e6709c..c6df5cb71 100644 --- a/kcontrol/kcontrol/moduleiconview.cpp +++ b/kcontrol/kcontrol/moduleiconview.cpp @@ -18,8 +18,8 @@ */ -#include -#include +#include +#include #include #include @@ -34,13 +34,13 @@ #include "global.h" -ModuleIconView::ModuleIconView(ConfigModuleList *list, QWidget * parent, const char * name) +ModuleIconView::ModuleIconView(ConfigModuleList *list, TQWidget * parent, const char * name) : KListView(parent, name) , _path(KCGlobal::baseGroup()) , _modules(list) { setSorting(1, true); - addColumn(QString::null); + addColumn(TQString::null); // Needed to enforce a cut of the items label rather than // showing a horizontal scrollbar @@ -51,15 +51,15 @@ ModuleIconView::ModuleIconView(ConfigModuleList *list, QWidget * parent, const c // This is intentionally _not_ connected with executed(), since // honoring doubleclick doesn't make any sense here (changed by // large user demand) - connect(this, SIGNAL(clicked(QListViewItem*)), - this, SLOT(slotItemSelected(QListViewItem*))); + connect(this, TQT_SIGNAL(clicked(TQListViewItem*)), + this, TQT_SLOT(slotItemSelected(TQListViewItem*))); } void ModuleIconView::makeSelected(ConfigModule *m) { if (!m) return; - for (QListViewItem *i = firstChild(); i; i = i->nextSibling()) + for (TQListViewItem *i = firstChild(); i; i = i->nextSibling()) { if(static_cast(i)->module() == m) { @@ -72,7 +72,7 @@ void ModuleIconView::makeSelected(ConfigModule *m) void ModuleIconView::makeVisible(ConfigModule *m) { if (!m) return; - QString tmp = _modules->findModule(m); + TQString tmp = _modules->findModule(m); if (tmp.isEmpty()) return; @@ -84,7 +84,7 @@ void ModuleIconView::fill() { clear(); - QPixmap icon; + TQPixmap icon; // add our "up" icon if we aren't top level if (_path != KCGlobal::baseGroup()) { @@ -94,16 +94,16 @@ void ModuleIconView::fill() i->setOrderNo(0); int last_slash = _path.findRev('/', -2); if (last_slash == -1) - i->setTag(QString::null); + i->setTag(TQString::null); else i->setTag(_path.left(last_slash+1)); } int c = 0; - QStringList submenus = _modules->submenus(_path); - for (QStringList::Iterator it = submenus.begin(); it != submenus.end(); ++it ) + TQStringList submenus = _modules->submenus(_path); + for (TQStringList::Iterator it = submenus.begin(); it != submenus.end(); ++it ) { - QString path = (*it); + TQString path = (*it); KServiceGroup::Ptr group = KServiceGroup::group(path); if (!group || !group->isValid()) @@ -117,7 +117,7 @@ void ModuleIconView::fill() } c = 0; - QPtrList moduleList = _modules->modules(_path); + TQPtrList moduleList = _modules->modules(_path); for (ConfigModule *module=moduleList.first(); module != 0; module=moduleList.next()) { icon = loadIcon( module->icon() ); @@ -127,9 +127,9 @@ void ModuleIconView::fill() } } -void ModuleIconView::slotItemSelected(QListViewItem* item) +void ModuleIconView::slotItemSelected(TQListViewItem* item) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); if (!item) return; if (static_cast(item)->module()) @@ -144,7 +144,7 @@ void ModuleIconView::slotItemSelected(QListViewItem* item) } } -void ModuleIconView::keyPressEvent(QKeyEvent *e) +void ModuleIconView::keyPressEvent(TQKeyEvent *e) { if( e->key() == Key_Return || e->key() == Key_Enter @@ -159,9 +159,9 @@ void ModuleIconView::keyPressEvent(QKeyEvent *e) } } -QPixmap ModuleIconView::loadIcon( const QString &name ) +TQPixmap ModuleIconView::loadIcon( const TQString &name ) { - QPixmap icon = DesktopIcon( name, KCGlobal::iconSize() ); + TQPixmap icon = DesktopIcon( name, KCGlobal::iconSize() ); if(icon.isNull()) icon = DesktopIcon( "folder", KCGlobal::iconSize() ); diff --git a/kcontrol/kcontrol/moduleiconview.h b/kcontrol/kcontrol/moduleiconview.h index 4f38a1cad..dcacf9770 100644 --- a/kcontrol/kcontrol/moduleiconview.h +++ b/kcontrol/kcontrol/moduleiconview.h @@ -29,28 +29,28 @@ class ModuleIconItem : public KListViewItem { public: - ModuleIconItem(QListView *parent, const QString& text, const QPixmap& pm, ConfigModule *m = 0) + ModuleIconItem(TQListView *parent, const TQString& text, const TQPixmap& pm, ConfigModule *m = 0) : KListViewItem(parent, text) - , _tag(QString::null) + , _tag(TQString::null) , _module(m) { setPixmap(0, pm); } void setConfigModule(ConfigModule* m) { _module = m; } - void setTag(const QString& t) { _tag = t; } + void setTag(const TQString& t) { _tag = t; } void setOrderNo(int order) { - QString s; + TQString s; setText(1, s.sprintf( "%02d", order ) ); } ConfigModule* module() { return _module; } - QString tag() { return _tag; } + TQString tag() { return _tag; } private: - QString _tag; + TQString _tag; ConfigModule *_module; }; @@ -59,7 +59,7 @@ class ModuleIconView : public KListView Q_OBJECT public: - ModuleIconView(ConfigModuleList *list, QWidget * parent = 0, const char * name = 0); + ModuleIconView(ConfigModuleList *list, TQWidget * parent = 0, const char * name = 0); void makeSelected(ConfigModule* module); void makeVisible(ConfigModule *module); @@ -69,14 +69,14 @@ signals: void moduleSelected(ConfigModule*); protected slots: - void slotItemSelected(QListViewItem*); + void slotItemSelected(TQListViewItem*); protected: - void keyPressEvent(QKeyEvent *); - QPixmap loadIcon( const QString &name ); + void keyPressEvent(TQKeyEvent *); + TQPixmap loadIcon( const TQString &name ); private: - QString _path; + TQString _path; ConfigModuleList *_modules; }; diff --git a/kcontrol/kcontrol/modulemenu.cpp b/kcontrol/kcontrol/modulemenu.cpp index 02becb29a..ad60eda5a 100644 --- a/kcontrol/kcontrol/modulemenu.cpp +++ b/kcontrol/kcontrol/modulemenu.cpp @@ -21,11 +21,11 @@ that is intentional :-] */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -40,7 +40,7 @@ that is intentional :-] #include "global.h" -ModuleMenu::ModuleMenu(ConfigModuleList *list, QWidget * parent, const char * name) +ModuleMenu::ModuleMenu(ConfigModuleList *list, TQWidget * parent, const char * name) : KPopupMenu(parent, name) , _modules(list) { @@ -49,27 +49,27 @@ ModuleMenu::ModuleMenu(ConfigModuleList *list, QWidget * parent, const char * na fill(this, KCGlobal::baseGroup()); - connect(this, SIGNAL(activated(int)), this, SLOT(moduleSelected(int))); + connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(moduleSelected(int))); } -void ModuleMenu::fill(KPopupMenu *parentMenu, const QString &parentPath) +void ModuleMenu::fill(KPopupMenu *parentMenu, const TQString &parentPath) { - QStringList subMenus = _modules->submenus(parentPath); - for(QStringList::ConstIterator it = subMenus.begin(); + TQStringList subMenus = _modules->submenus(parentPath); + for(TQStringList::ConstIterator it = subMenus.begin(); it != subMenus.end(); ++it) { - QString path = *it; + TQString path = *it; KServiceGroup::Ptr group = KServiceGroup::group(path); if (!group) continue; // create new menu KPopupMenu *menu = new KPopupMenu(parentMenu); - connect(menu, SIGNAL(activated(int)), this, SLOT(moduleSelected(int))); + connect(menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(moduleSelected(int))); // Item names may contain ampersands. To avoid them being converted to // accelators, replace them with two ampersands. - QString name = group->caption(); + TQString name = group->caption(); name.replace("&", "&&"); parentMenu->insertItem(KGlobal::iconLoader()->loadIcon(group->icon(), KIcon::Desktop, KIcon::SizeSmall) @@ -79,12 +79,12 @@ void ModuleMenu::fill(KPopupMenu *parentMenu, const QString &parentPath) } ConfigModule *module; - QPtrList moduleList = _modules->modules(parentPath); + TQPtrList moduleList = _modules->modules(parentPath); for (module=moduleList.first(); module != 0; module=moduleList.next()) { // Item names may contain ampersands. To avoid them being converted to // accelators, replace them with two ampersands. - QString name = module->moduleName(); + TQString name = module->moduleName(); name.replace("&", "&&"); int realid = parentMenu->insertItem(KGlobal::iconLoader()->loadIcon(module->icon(), KIcon::Desktop, KIcon::SizeSmall) diff --git a/kcontrol/kcontrol/modulemenu.h b/kcontrol/kcontrol/modulemenu.h index b08140bfc..feac18bd6 100644 --- a/kcontrol/kcontrol/modulemenu.h +++ b/kcontrol/kcontrol/modulemenu.h @@ -24,12 +24,12 @@ that is intentional :-] #define __modulemenu_h__ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include @@ -43,7 +43,7 @@ class ModuleMenu : public KPopupMenu Q_OBJECT public: - ModuleMenu(ConfigModuleList *list, QWidget * parent = 0, const char * name = 0); + ModuleMenu(ConfigModuleList *list, TQWidget * parent = 0, const char * name = 0); signals: void moduleActivated(ConfigModule*); @@ -52,13 +52,13 @@ private slots: void moduleSelected(int id); protected: - void fill(KPopupMenu *parentMenu, const QString &parentPath); + void fill(KPopupMenu *parentMenu, const TQString &parentPath); private: int id; ConfigModuleList *_modules; - QIntDict _moduleDict; + TQIntDict _moduleDict; }; diff --git a/kcontrol/kcontrol/modules.cpp b/kcontrol/kcontrol/modules.cpp index b6d8a2693..cc8c63af4 100644 --- a/kcontrol/kcontrol/modules.cpp +++ b/kcontrol/kcontrol/modules.cpp @@ -21,9 +21,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -43,7 +43,7 @@ #include -template class QPtrList; +template class TQPtrList; ConfigModule::ConfigModule(const KService::Ptr &s) @@ -75,11 +75,11 @@ ProxyWidget *ConfigModule::module() { _module = new ProxyWidget(modWidget, moduleName(), "", run_as_root); - connect(_module, SIGNAL(changed(bool)), this, SLOT(clientChanged(bool))); - connect(_module, SIGNAL(closed()), this, SLOT(clientClosed())); - connect(_module, SIGNAL(handbookRequest()), this, SIGNAL(handbookRequest())); - connect(_module, SIGNAL(helpRequest()), this, SIGNAL(helpRequest())); - connect(_module, SIGNAL(runAsRoot()), this, SLOT(runAsRoot())); + connect(_module, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(clientChanged(bool))); + connect(_module, TQT_SIGNAL(closed()), this, TQT_SLOT(clientClosed())); + connect(_module, TQT_SIGNAL(handbookRequest()), this, TQT_SIGNAL(handbookRequest())); + connect(_module, TQT_SIGNAL(helpRequest()), this, TQT_SIGNAL(helpRequest())); + connect(_module, TQT_SIGNAL(runAsRoot()), this, TQT_SLOT(runAsRoot())); return _module; } @@ -142,31 +142,31 @@ void ConfigModule::runAsRoot() // create an embed widget that will embed the // kcmshell running as root - _embedLayout = new QVBoxLayout(_module->parentWidget()); - _embedFrame = new QVBox( _module->parentWidget() ); - _embedFrame->setFrameStyle( QFrame::Box | QFrame::Raised ); - QPalette pal( red ); - pal.setColor( QColorGroup::Background, + _embedLayout = new TQVBoxLayout(_module->parentWidget()); + _embedFrame = new TQVBox( _module->parentWidget() ); + _embedFrame->setFrameStyle( TQFrame::Box | TQFrame::Raised ); + TQPalette pal( red ); + pal.setColor( TQColorGroup::Background, _module->parentWidget()->colorGroup().background() ); _embedFrame->setPalette( pal ); _embedFrame->setLineWidth( 2 ); _embedFrame->setMidLineWidth( 2 ); _embedLayout->addWidget(_embedFrame,1); // cannot reparent anything else inside QXEmbed, so put the busy label separately - _embedStack = new QWidgetStack(_embedFrame); + _embedStack = new TQWidgetStack(_embedFrame); _embedWidget = new KControlEmbed(_embedStack); _module->hide(); _embedFrame->show(); - QLabel *_busy = new QLabel(i18n("Loading..."), _embedStack); + TQLabel *_busy = new TQLabel(i18n("Loading..."), _embedStack); _busy->setAlignment(AlignCenter); _busy->setTextFormat(RichText); _busy->setGeometry(0,0, _module->width(), _module->height()); _busy->show(); _embedStack->raiseWidget(_busy); - connect(_embedWidget, SIGNAL( windowEmbedded(WId)), SLOT( embedded())); + connect(_embedWidget, TQT_SIGNAL( windowEmbedded(WId)), TQT_SLOT( embedded())); // prepare the process to run the kcmshell - QString cmd = service()->exec().stripWhiteSpace(); + TQString cmd = service()->exec().stripWhiteSpace(); bool kdeshell = false; if (cmd.left(5) == "kdesu") { @@ -186,7 +186,7 @@ void ConfigModule::runAsRoot() } // run the process - QString kdesu = KStandardDirs::findExe("kdesu"); + TQString kdesu = KStandardDirs::findExe("kdesu"); if (!kdesu.isEmpty()) { _rootProcess = new KProcess; @@ -198,13 +198,13 @@ void ConfigModule::runAsRoot() // We also don't have a way to close the module in that case. *_rootProcess << "--n"; // Don't keep password. if (kdeshell) { - *_rootProcess << QString("%1 %2 --embed %3 --lang %4").arg(locate("exe", "kcmshell")).arg(cmd).arg(_embedWidget->winId()).arg(KGlobal::locale()->language()); + *_rootProcess << TQString("%1 %2 --embed %3 --lang %4").arg(locate("exe", "kcmshell")).arg(cmd).arg(_embedWidget->winId()).arg(KGlobal::locale()->language()); } else { - *_rootProcess << QString("%1 --embed %2 --lang %3").arg(cmd).arg(_embedWidget->winId()).arg( KGlobal::locale()->language() ); + *_rootProcess << TQString("%1 --embed %2 --lang %3").arg(cmd).arg(_embedWidget->winId()).arg( KGlobal::locale()->language() ); } - connect(_rootProcess, SIGNAL(processExited(KProcess*)), this, SLOT(rootExited(KProcess*))); + connect(_rootProcess, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(rootExited(KProcess*))); if ( !_rootProcess->start(KProcess::NotifyOnExit) ) { @@ -271,7 +271,7 @@ void ConfigModuleList::readDesktopEntries() readDesktopEntriesRecursive( KCGlobal::baseGroup() ); } -bool ConfigModuleList::readDesktopEntriesRecursive(const QString &path) +bool ConfigModuleList::readDesktopEntriesRecursive(const TQString &path) { KServiceGroup::Ptr group = KServiceGroup::group(path); @@ -314,32 +314,32 @@ bool ConfigModuleList::readDesktopEntriesRecursive(const QString &path) return true; } -QPtrList ConfigModuleList::modules(const QString &path) +TQPtrList ConfigModuleList::modules(const TQString &path) { Menu *menu = subMenus.find(path); if (menu) return menu->modules; - return QPtrList(); + return TQPtrList(); } -QStringList ConfigModuleList::submenus(const QString &path) +TQStringList ConfigModuleList::submenus(const TQString &path) { Menu *menu = subMenus.find(path); if (menu) return menu->submenus; - return QStringList(); + return TQStringList(); } -QString ConfigModuleList::findModule(ConfigModule *module) +TQString ConfigModuleList::findModule(ConfigModule *module) { - QDictIterator it(subMenus); + TQDictIterator it(subMenus); Menu *menu; for(;(menu = it.current());++it) { if (menu->modules.containsRef(module)) return it.currentKey(); } - return QString::null; + return TQString::null; } diff --git a/kcontrol/kcontrol/modules.h b/kcontrol/kcontrol/modules.h index f2364698d..ce31c7af0 100644 --- a/kcontrol/kcontrol/modules.h +++ b/kcontrol/kcontrol/modules.h @@ -21,8 +21,8 @@ #define MODULES_H #include -#include -#include +#include +#include #include template class QPtrList; @@ -36,7 +36,7 @@ class QVBoxLayout; class QVBox; class QWidgetStack; -class ConfigModule : public QObject, public KCModuleInfo +class ConfigModule : public TQObject, public KCModuleInfo { Q_OBJECT @@ -81,53 +81,53 @@ private: ProxyWidget *_module; QXEmbed *_embedWidget; KProcess *_rootProcess; - QVBoxLayout *_embedLayout; - QVBox *_embedFrame; - QWidgetStack *_embedStack; + TQVBoxLayout *_embedLayout; + TQVBox *_embedFrame; + TQWidgetStack *_embedStack; }; -class ConfigModuleList : public QPtrList +class ConfigModuleList : public TQPtrList { public: ConfigModuleList(); void readDesktopEntries(); - bool readDesktopEntriesRecursive(const QString &path); + bool readDesktopEntriesRecursive(const TQString &path); /** * Returns all submenus of the submenu identified by path */ - QPtrList modules(const QString &path); + TQPtrList modules(const TQString &path); /** * Returns all modules of the submenu identified by path */ - QStringList submenus(const QString &path); + TQStringList submenus(const TQString &path); /** * Returns the path of the submenu the module is in */ - QString findModule(ConfigModule *module); + TQString findModule(ConfigModule *module); protected: class Menu { public: - QPtrList modules; - QStringList submenus; + TQPtrList modules; + TQStringList submenus; }; - QDict subMenus; + TQDict subMenus; }; class KControlEmbed : public QXEmbed { Q_OBJECT public: - KControlEmbed( QWidget* w ) : QXEmbed( w ) {} + KControlEmbed( TQWidget* w ) : QXEmbed( w ) {} virtual void windowChanged( WId w ) { if( w ) emit windowEmbedded( w ); } signals: void windowEmbedded( WId w ); diff --git a/kcontrol/kcontrol/moduletreeview.cpp b/kcontrol/kcontrol/moduletreeview.cpp index f933cfcef..6f767ab20 100644 --- a/kcontrol/kcontrol/moduletreeview.cpp +++ b/kcontrol/kcontrol/moduletreeview.cpp @@ -18,31 +18,31 @@ */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include "moduletreeview.h" #include "moduletreeview.moc" #include "modules.h" #include "global.h" -static QPixmap appIcon(const QString &iconName) +static TQPixmap appIcon(const TQString &iconName) { - QString path; - QPixmap normal = KGlobal::iconLoader()->loadIcon(iconName, KIcon::Small, 0, KIcon::DefaultState, &path, true); + TQString path; + TQPixmap normal = KGlobal::iconLoader()->loadIcon(iconName, KIcon::Small, 0, KIcon::DefaultState, &path, true); // make sure they are not larger than KIcon::SizeSmall if (normal.width() > KIcon::SizeSmall || normal.height() > KIcon::SizeSmall) { - QImage tmp = normal.convertToImage(); + TQImage tmp = normal.convertToImage(); tmp = tmp.smoothScale(KIcon::SizeSmall, KIcon::SizeSmall); normal.convertFromImage(tmp); } @@ -53,11 +53,11 @@ class ModuleTreeWhatsThis : public QWhatsThis { public: ModuleTreeWhatsThis( ModuleTreeView* tree) - : QWhatsThis( tree ), treeView( tree ) {} + : TQWhatsThis( tree ), treeView( tree ) {} ~ModuleTreeWhatsThis(){}; - QString text( const QPoint & p) { + TQString text( const TQPoint & p) { ModuleTreeItem* i = (ModuleTreeItem*) treeView->itemAt( p ); if ( i && i->module() ) { return i->module()->comment(); @@ -71,60 +71,60 @@ private: ModuleTreeView* treeView; }; -ModuleTreeView::ModuleTreeView(ConfigModuleList *list, QWidget * parent, const char * name) +ModuleTreeView::ModuleTreeView(ConfigModuleList *list, TQWidget * parent, const char * name) : KListView(parent, name) , _modules(list) { - addColumn(QString::null); - setColumnWidthMode (0, QListView::Maximum); + addColumn(TQString::null); + setColumnWidthMode (0, TQListView::Maximum); setAllColumnsShowFocus(true); - setResizeMode(QListView::AllColumns); + setResizeMode(TQListView::AllColumns); setRootIsDecorated(true); setHScrollBarMode(AlwaysOff); header()->hide(); new ModuleTreeWhatsThis( this ); - connect(this, SIGNAL(clicked(QListViewItem*)), - this, SLOT(slotItemSelected(QListViewItem*))); + connect(this, TQT_SIGNAL(clicked(TQListViewItem*)), + this, TQT_SLOT(slotItemSelected(TQListViewItem*))); } void ModuleTreeView::fill() { clear(); - QStringList subMenus = _modules->submenus(KCGlobal::baseGroup()); - for(QStringList::ConstIterator it = subMenus.begin(); + TQStringList subMenus = _modules->submenus(KCGlobal::baseGroup()); + for(TQStringList::ConstIterator it = subMenus.begin(); it != subMenus.end(); ++it) { - QString path = *it; + TQString path = *it; ModuleTreeItem* menu = new ModuleTreeItem(this); menu->setGroup(path); fill(menu, path); } ConfigModule *module; - QPtrList moduleList = _modules->modules(KCGlobal::baseGroup()); + TQPtrList moduleList = _modules->modules(KCGlobal::baseGroup()); for (module=moduleList.first(); module != 0; module=moduleList.next()) { new ModuleTreeItem(this, module); } } -void ModuleTreeView::fill(ModuleTreeItem *parent, const QString &parentPath) +void ModuleTreeView::fill(ModuleTreeItem *parent, const TQString &parentPath) { - QStringList subMenus = _modules->submenus(parentPath); - for(QStringList::ConstIterator it = subMenus.begin(); + TQStringList subMenus = _modules->submenus(parentPath); + for(TQStringList::ConstIterator it = subMenus.begin(); it != subMenus.end(); ++it) { - QString path = *it; + TQString path = *it; ModuleTreeItem* menu = new ModuleTreeItem(parent); menu->setGroup(path); fill(menu, path); } ConfigModule *module; - QPtrList moduleList = _modules->modules(parentPath); + TQPtrList moduleList = _modules->modules(parentPath); for (module=moduleList.first(); module != 0; module=moduleList.next()) { new ModuleTreeItem(parent, module); @@ -133,10 +133,10 @@ void ModuleTreeView::fill(ModuleTreeItem *parent, const QString &parentPath) -QSize ModuleTreeView::sizeHint() const +TQSize ModuleTreeView::sizeHint() const { - return QListView::sizeHint().boundedTo( - QSize( fontMetrics().maxWidth()*35, QWIDGETSIZE_MAX) ); + return TQListView::sizeHint().boundedTo( + TQSize( fontMetrics().maxWidth()*35, QWIDGETSIZE_MAX) ); } void ModuleTreeView::makeSelected(ConfigModule *module) @@ -162,7 +162,7 @@ void ModuleTreeView::updateItem(ModuleTreeItem *item, ConfigModule *module) } /* -void ModuleTreeView::expandItem(QListViewItem *item, QPtrList *parentList) +void ModuleTreeView::expandItem(TQListViewItem *item, TQPtrList *parentList) { while (item) { @@ -176,14 +176,14 @@ void ModuleTreeView::expandItem(QListViewItem *item, QPtrList *pa */ void ModuleTreeView::makeVisible(ConfigModule *module) { - QString path = _modules->findModule(module); + TQString path = _modules->findModule(module); if (path.startsWith(KCGlobal::baseGroup())) path = path.mid(KCGlobal::baseGroup().length()); - QStringList groups = QStringList::split('/', path); + TQStringList groups = TQStringList::split('/', path); ModuleTreeItem *item = 0; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it=groups.begin(); it != groups.end(); ++it) { if (item) @@ -209,7 +209,7 @@ void ModuleTreeView::makeVisible(ConfigModule *module) ensureItemVisible(item); } -void ModuleTreeView::slotItemSelected(QListViewItem* item) +void ModuleTreeView::slotItemSelected(TQListViewItem* item) { if (!item) return; @@ -228,9 +228,9 @@ void ModuleTreeView::slotItemSelected(QListViewItem* item) /* else { - QPtrList parents; + TQPtrList parents; - QListViewItem* i = item; + TQListViewItem* i = item; while(i) { parents.append(i); @@ -238,19 +238,19 @@ void ModuleTreeView::slotItemSelected(QListViewItem* item) } //int oy1 = item->itemPos(); - //int oy2 = mapFromGlobal(QCursor::pos()).y(); + //int oy2 = mapFromGlobal(TQCursor::pos()).y(); //int offset = oy2 - oy1; expandItem(firstChild(), &parents); - //int x =mapFromGlobal(QCursor::pos()).x(); + //int x =mapFromGlobal(TQCursor::pos()).x(); //int y = item->itemPos() + offset; - //QCursor::setPos(mapToGlobal(QPoint(x, y))); + //TQCursor::setPos(mapToGlobal(TQPoint(x, y))); } */ } -void ModuleTreeView::keyPressEvent(QKeyEvent *e) +void ModuleTreeView::keyPressEvent(TQKeyEvent *e) { if (!currentItem()) return; @@ -258,7 +258,7 @@ void ModuleTreeView::keyPressEvent(QKeyEvent *e) || e->key() == Key_Enter || e->key() == Key_Space) { - //QCursor::setPos(mapToGlobal(QPoint(10, currentItem()->itemPos()+5))); + //TQCursor::setPos(mapToGlobal(TQPoint(10, currentItem()->itemPos()+5))); slotItemSelected(currentItem()); } else @@ -266,10 +266,10 @@ void ModuleTreeView::keyPressEvent(QKeyEvent *e) } -ModuleTreeItem::ModuleTreeItem(QListViewItem *parent, ConfigModule *module) - : QListViewItem(parent) +ModuleTreeItem::ModuleTreeItem(TQListViewItem *parent, ConfigModule *module) + : TQListViewItem(parent) , _module(module) - , _tag(QString::null) + , _tag(TQString::null) , _maxChildIconWidth(0) { if (_module) @@ -280,10 +280,10 @@ ModuleTreeItem::ModuleTreeItem(QListViewItem *parent, ConfigModule *module) } } -ModuleTreeItem::ModuleTreeItem(QListView *parent, ConfigModule *module) - : QListViewItem(parent) +ModuleTreeItem::ModuleTreeItem(TQListView *parent, ConfigModule *module) + : TQListViewItem(parent) , _module(module) - , _tag(QString::null) + , _tag(TQString::null) , _maxChildIconWidth(0) { if (_module) @@ -294,21 +294,21 @@ ModuleTreeItem::ModuleTreeItem(QListView *parent, ConfigModule *module) } } -ModuleTreeItem::ModuleTreeItem(QListViewItem *parent, const QString& text) - : QListViewItem(parent, " " + text) +ModuleTreeItem::ModuleTreeItem(TQListViewItem *parent, const TQString& text) + : TQListViewItem(parent, " " + text) , _module(0) - , _tag(QString::null) + , _tag(TQString::null) , _maxChildIconWidth(0) {} -ModuleTreeItem::ModuleTreeItem(QListView *parent, const QString& text) - : QListViewItem(parent, " " + text) +ModuleTreeItem::ModuleTreeItem(TQListView *parent, const TQString& text) + : TQListViewItem(parent, " " + text) , _module(0) - , _tag(QString::null) + , _tag(TQString::null) , _maxChildIconWidth(0) {} -void ModuleTreeItem::setPixmap(int column, const QPixmap& pm) +void ModuleTreeItem::setPixmap(int column, const TQPixmap& pm) { if (!pm.isNull()) { @@ -317,7 +317,7 @@ void ModuleTreeItem::setPixmap(int column, const QPixmap& pm) p->regChildIconWidth(pm.width()); } - QListViewItem::setPixmap(column, pm); + TQListViewItem::setPixmap(column, pm); } void ModuleTreeItem::regChildIconWidth(int width) @@ -326,7 +326,7 @@ void ModuleTreeItem::regChildIconWidth(int width) _maxChildIconWidth = width; } -void ModuleTreeItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ) +void ModuleTreeItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) { if (!pixmap(0)) { @@ -339,23 +339,23 @@ void ModuleTreeItem::paintCell( QPainter * p, const QColorGroup & cg, int column if (offset > 0) { - QPixmap pixmap(offset, offset); + TQPixmap pixmap(offset, offset); pixmap.fill(Qt::color0); pixmap.setMask(pixmap.createHeuristicMask()); - QBitmap mask( pixmap.size(), true ); + TQBitmap mask( pixmap.size(), true ); pixmap.setMask( mask ); - QListViewItem::setPixmap(0, pixmap); + TQListViewItem::setPixmap(0, pixmap); } } - QListViewItem::paintCell( p, cg, column, width, align ); + TQListViewItem::paintCell( p, cg, column, width, align ); } -void ModuleTreeItem::setGroup(const QString &path) +void ModuleTreeItem::setGroup(const TQString &path) { KServiceGroup::Ptr group = KServiceGroup::group(path); - QString defName = path.left(path.length()-1); + TQString defName = path.left(path.length()-1); int pos = defName.findRev('/'); if (pos >= 0) defName = defName.mid(pos+1); diff --git a/kcontrol/kcontrol/moduletreeview.h b/kcontrol/kcontrol/moduletreeview.h index ecdd2d938..3c16f099e 100644 --- a/kcontrol/kcontrol/moduletreeview.h +++ b/kcontrol/kcontrol/moduletreeview.h @@ -20,11 +20,11 @@ #ifndef __moduletreeview_h__ #define __moduletreeview_h__ -#include -#include -#include +#include +#include +#include #include -#include +#include class ConfigModule; @@ -35,33 +35,33 @@ class ModuleTreeItem : public QListViewItem { public: - ModuleTreeItem(QListViewItem *parent, ConfigModule *module = 0); - ModuleTreeItem(QListViewItem *parent, const QString& text); - ModuleTreeItem(QListView *parent, ConfigModule *module = 0); - ModuleTreeItem(QListView *parent, const QString& text); + ModuleTreeItem(TQListViewItem *parent, ConfigModule *module = 0); + ModuleTreeItem(TQListViewItem *parent, const TQString& text); + ModuleTreeItem(TQListView *parent, ConfigModule *module = 0); + ModuleTreeItem(TQListView *parent, const TQString& text); - void setTag(const QString& tag) { _tag = tag; } - void setCaption(const QString& caption) { _caption = caption; } + void setTag(const TQString& tag) { _tag = tag; } + void setCaption(const TQString& caption) { _caption = caption; } void setModule(ConfigModule *m) { _module = m; } - QString tag() const { return _tag; }; - QString caption() const { return _caption; }; - QString icon() const { return _icon; }; + TQString tag() const { return _tag; }; + TQString caption() const { return _caption; }; + TQString icon() const { return _icon; }; ConfigModule *module() { return _module; }; void regChildIconWidth(int width); int maxChildIconWidth() { return _maxChildIconWidth; } - void setPixmap(int column, const QPixmap& pm); - void setGroup(const QString &path); + void setPixmap(int column, const TQPixmap& pm); + void setGroup(const TQString &path); protected: - void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ); + void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ); private: ConfigModule *_module; - QString _tag; - QString _caption; + TQString _tag; + TQString _caption; int _maxChildIconWidth; - QString _icon; + TQString _icon; }; class ModuleTreeView : public KListView @@ -69,24 +69,24 @@ class ModuleTreeView : public KListView Q_OBJECT public: - ModuleTreeView(ConfigModuleList *list, QWidget * parent = 0, const char * name = 0); + ModuleTreeView(ConfigModuleList *list, TQWidget * parent = 0, const char * name = 0); void makeSelected(ConfigModule* module); void makeVisible(ConfigModule *module); void fill(); - QSize sizeHint() const; + TQSize sizeHint() const; signals: void moduleSelected(ConfigModule*); - void categorySelected(QListViewItem*); + void categorySelected(TQListViewItem*); protected slots: - void slotItemSelected(QListViewItem*); + void slotItemSelected(TQListViewItem*); protected: void updateItem(ModuleTreeItem *item, ConfigModule* module); - void keyPressEvent(QKeyEvent *); - void fill(ModuleTreeItem *parent, const QString &parentPath); + void keyPressEvent(TQKeyEvent *); + void fill(ModuleTreeItem *parent, const TQString &parentPath); private: ConfigModuleList *_modules; diff --git a/kcontrol/kcontrol/proxywidget.cpp b/kcontrol/kcontrol/proxywidget.cpp index 6654bfe14..b8f83c5fc 100644 --- a/kcontrol/kcontrol/proxywidget.cpp +++ b/kcontrol/kcontrol/proxywidget.cpp @@ -20,7 +20,7 @@ #include // for getuid() #include -#include +#include #include #include #include @@ -29,25 +29,25 @@ #include #include -#include -#include +#include +#include #include "global.h" #include "proxywidget.h" #include "proxywidget.moc" #include -#include +#include class WhatsThis : public QWhatsThis { public: WhatsThis( ProxyWidget* parent ) - : QWhatsThis( parent ), proxy( parent ) {} + : TQWhatsThis( parent ), proxy( parent ) {} ~WhatsThis(){}; - QString text( const QPoint & ) { + TQString text( const TQPoint & ) { if ( !proxy->quickHelp().isEmpty() ) return proxy->quickHelp(); else @@ -60,7 +60,7 @@ private: //////////////////////////////////////////////////////////////////////////////////////////////////////// -static void setVisible(QPushButton *btn, bool vis) +static void setVisible(TQPushButton *btn, bool vis) { if (vis) btn->show(); @@ -75,21 +75,21 @@ static void setVisible(QPushButton *btn, bool vis) class RootInfoWidget : public QLabel { public: - RootInfoWidget(QWidget *parent, const char *name); - void setRootMsg(const QString& s) { setText(s); } + RootInfoWidget(TQWidget *parent, const char *name); + void setRootMsg(const TQString& s) { setText(s); } }; -RootInfoWidget::RootInfoWidget(QWidget *parent, const char *name = 0) - : QLabel(parent, name) +RootInfoWidget::RootInfoWidget(TQWidget *parent, const char *name = 0) + : TQLabel(parent, name) { - setFrameShape(QFrame::Box); - setFrameShadow(QFrame::Raised); + setFrameShape(TQFrame::Box); + setFrameShadow(TQFrame::Raised); setText(i18n("Changes in this module require root access.
" "Click the \"Administrator Mode\" button to " "allow modifications in this module.")); - QWhatsThis::add(this, i18n("This module requires special permissions, probably " + TQWhatsThis::add(this, i18n("This module requires special permissions, probably " "for system-wide modifications; therefore, it is " "required that you provide the root password to be " "able to change the module's properties. If you " @@ -103,12 +103,12 @@ RootInfoWidget::RootInfoWidget(QWidget *parent, const char *name = 0) class ProxyView : public QScrollView { public: - ProxyView(KCModule *client, const QString& title, QWidget *parent, bool run_as_root, const char *name); + ProxyView(KCModule *client, const TQString& title, TQWidget *parent, bool run_as_root, const char *name); private: - virtual void resizeEvent(QResizeEvent *); + virtual void resizeEvent(TQResizeEvent *); - QWidget *contentWidget; + TQWidget *contentWidget; KCModule *client; bool scroll; }; @@ -116,82 +116,82 @@ private: class ProxyContentWidget : public QWidget { public: - ProxyContentWidget( QWidget* parent ) : QWidget( parent ) {} + ProxyContentWidget( TQWidget* parent ) : TQWidget( parent ) {} ~ProxyContentWidget(){} // this should be really done by qscrollview in AutoOneFit mode! - QSize sizeHint() const { return minimumSizeHint(); } + TQSize sizeHint() const { return minimumSizeHint(); } }; -ProxyView::ProxyView(KCModule *_client, const QString&, QWidget *parent, bool run_as_root, const char *name) - : QScrollView(parent, name), client(_client) +ProxyView::ProxyView(KCModule *_client, const TQString&, TQWidget *parent, bool run_as_root, const char *name) + : TQScrollView(parent, name), client(_client) { - setResizePolicy(QScrollView::AutoOneFit); + setResizePolicy(TQScrollView::AutoOneFit); setFrameStyle( NoFrame ); contentWidget = new ProxyContentWidget( viewport() ); - QVBoxLayout* vbox = new QVBoxLayout( contentWidget ); + TQVBoxLayout* vbox = new TQVBoxLayout( contentWidget ); if (run_as_root && _client->useRootOnlyMsg()) // notify the user { RootInfoWidget *infoBox = new RootInfoWidget(contentWidget); vbox->addWidget( infoBox ); - QString msg = _client->rootOnlyMsg(); + TQString msg = _client->rootOnlyMsg(); if (!msg.isEmpty()) infoBox->setRootMsg(msg); vbox->setSpacing(KDialog::spacingHint()); } - client->reparent(contentWidget,0,QPoint(0,0),true); + client->reparent(contentWidget,0,TQPoint(0,0),true); vbox->addWidget( client ); vbox->activate(); // make sure we have a proper minimumSizeHint addChild(contentWidget); } -void ProxyView::resizeEvent(QResizeEvent *e) +void ProxyView::resizeEvent(TQResizeEvent *e) { - QScrollView::resizeEvent(e); + TQScrollView::resizeEvent(e); } //////////////////////////////////////////////////////////////////////////////////////////////////////// -ProxyWidget::ProxyWidget(KCModule *client, QString title, const char *name, +ProxyWidget::ProxyWidget(KCModule *client, TQString title, const char *name, bool run_as_root) - : QWidget(0, name) + : TQWidget(0, name) , _client(client) { setCaption(title); if (getuid()==0 ) { // Make root modules look as similar as possible... - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; - if (kapp->dcopClient()->call("kcontrol", "moduleIface", "getPalette()", QByteArray(), + if (kapp->dcopClient()->call("kcontrol", "moduleIface", "getPalette()", TQByteArray(), replyType, replyData)) - if ( replyType == "QPalette") { - QDataStream reply( replyData, IO_ReadOnly ); - QPalette pal; + if ( replyType == "TQPalette") { + TQDataStream reply( replyData, IO_ReadOnly ); + TQPalette pal; reply >> pal; setPalette(pal); } /* // Doesn't work ... - if (kapp->dcopClient()->call("kcontrol", "moduleIface", "getStyle()", QByteArray(), + if (kapp->dcopClient()->call("kcontrol", "moduleIface", "getStyle()", TQByteArray(), replyType, replyData)) - if ( replyType == "QString") { - QDataStream reply( replyData, IO_ReadOnly ); - QString style; + if ( replyType == "TQString") { + TQDataStream reply( replyData, IO_ReadOnly ); + TQString style; reply >> style; setStyle(style); } */ - if (kapp->dcopClient()->call("kcontrol", "moduleIface", "getFont()", QByteArray(), + if (kapp->dcopClient()->call("kcontrol", "moduleIface", "getFont()", TQByteArray(), replyType, replyData)) - if ( replyType == "QFont") { - QDataStream reply( replyData, IO_ReadOnly ); - QFont font; + if ( replyType == "TQFont") { + TQDataStream reply( replyData, IO_ReadOnly ); + TQFont font; reply >> font; setFont(font); } @@ -200,8 +200,8 @@ ProxyWidget::ProxyWidget(KCModule *client, QString title, const char *name, view = new ProxyView(client, title, this, run_as_root, "proxyview"); (void) new WhatsThis( this ); - connect(_client, SIGNAL(changed(bool)), SLOT(clientChanged(bool))); - connect(_client, SIGNAL(quickHelpChanged()), SIGNAL(quickHelpChanged())); + connect(_client, TQT_SIGNAL(changed(bool)), TQT_SLOT(clientChanged(bool))); + connect(_client, TQT_SIGNAL(quickHelpChanged()), TQT_SIGNAL(quickHelpChanged())); _sep = new KSeparator(KSeparator::HLine, this); @@ -225,18 +225,18 @@ ProxyWidget::ProxyWidget(KCModule *client, QString title, const char *name, _apply->setEnabled( false ); _reset->setEnabled( false ); - connect(_handbook, SIGNAL(clicked()), SLOT(handbookClicked())); - connect(_default, SIGNAL(clicked()), SLOT(defaultClicked())); - connect(_apply, SIGNAL(clicked()), SLOT(applyClicked())); - connect(_reset, SIGNAL(clicked()), SLOT(resetClicked())); - connect(_root, SIGNAL(clicked()), SLOT(rootClicked())); + connect(_handbook, TQT_SIGNAL(clicked()), TQT_SLOT(handbookClicked())); + connect(_default, TQT_SIGNAL(clicked()), TQT_SLOT(defaultClicked())); + connect(_apply, TQT_SIGNAL(clicked()), TQT_SLOT(applyClicked())); + connect(_reset, TQT_SIGNAL(clicked()), TQT_SLOT(resetClicked())); + connect(_root, TQT_SIGNAL(clicked()), TQT_SLOT(rootClicked())); - QVBoxLayout *top = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *top = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); top->addWidget(view); top->addWidget(_sep); - QHBoxLayout *buttons = new QHBoxLayout(top, 4); + TQHBoxLayout *buttons = new TQHBoxLayout(top, 4); buttons->addWidget(_handbook); buttons->addWidget(_default); if (run_as_root) @@ -259,7 +259,7 @@ ProxyWidget::~ProxyWidget() delete _client; } -QString ProxyWidget::quickHelp() const +TQString ProxyWidget::quickHelp() const { if (_client) return _client->quickHelp(); @@ -272,7 +272,7 @@ void ProxyWidget::handbookClicked() if (getuid()!=0) emit handbookRequest(); else - kapp->dcopClient()->send("kcontrol", "moduleIface", "invokeHandbook()", QByteArray()); + kapp->dcopClient()->send("kcontrol", "moduleIface", "invokeHandbook()", TQByteArray()); } void ProxyWidget::helpClicked() @@ -280,7 +280,7 @@ void ProxyWidget::helpClicked() if (getuid()!=0) emit helpRequest(); else - kapp->dcopClient()->send("kcontrol", "moduleIface", "invokeHelp()", QByteArray()); + kapp->dcopClient()->send("kcontrol", "moduleIface", "invokeHelp()", TQByteArray()); } void ProxyWidget::defaultClicked() diff --git a/kcontrol/kcontrol/proxywidget.h b/kcontrol/kcontrol/proxywidget.h index a06e571de..c1368b447 100644 --- a/kcontrol/kcontrol/proxywidget.h +++ b/kcontrol/kcontrol/proxywidget.h @@ -32,7 +32,7 @@ class KCModule; class KAboutData; #include "dockcontainer.h" -#include +#include class ProxyView; @@ -42,10 +42,10 @@ class ProxyWidget : public QWidget public: - ProxyWidget(KCModule *client, QString title, const char *name=0, bool run_as_root = false); + ProxyWidget(KCModule *client, TQString title, const char *name=0, bool run_as_root = false); ~ProxyWidget(); - QString quickHelp() const; + TQString quickHelp() const; const KAboutData *aboutData() const; public slots: @@ -71,8 +71,8 @@ signals: private: - QPushButton *_handbook, *_default, *_apply, *_reset, *_root; - QFrame *_sep; + TQPushButton *_handbook, *_default, *_apply, *_reset, *_root; + TQFrame *_sep; KCModule *_client; ProxyView *view; diff --git a/kcontrol/kcontrol/searchwidget.cpp b/kcontrol/kcontrol/searchwidget.cpp index 9701d2d20..e4949622d 100644 --- a/kcontrol/kcontrol/searchwidget.cpp +++ b/kcontrol/kcontrol/searchwidget.cpp @@ -18,10 +18,10 @@ */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -37,8 +37,8 @@ class ModuleItem : public QListBoxPixmap { public: - ModuleItem(ConfigModule *module, QListBox * listbox = 0) : - QListBoxPixmap(listbox, + ModuleItem(ConfigModule *module, TQListBox * listbox = 0) : + TQListBoxPixmap(listbox, KGlobal::iconLoader()->loadIcon(module->icon(), KIcon::Desktop, KIcon::SizeSmall), module->moduleName()) , m_module(module) @@ -53,7 +53,7 @@ protected: }; -KeywordListEntry::KeywordListEntry(const QString& name, ConfigModule* module) +KeywordListEntry::KeywordListEntry(const TQString& name, ConfigModule* module) : _name(name) { if(module) @@ -66,35 +66,35 @@ void KeywordListEntry::addModule(ConfigModule* module) _modules.append(module); } -SearchWidget::SearchWidget(QWidget *parent , const char *name) - : QWidget(parent, name) +SearchWidget::SearchWidget(TQWidget *parent , const char *name) + : TQWidget(parent, name) { _keywords.setAutoDelete(true); - QVBoxLayout * l = new QVBoxLayout(this, 0, 2); + TQVBoxLayout * l = new TQVBoxLayout(this, 0, 2); // keyword list _keyList = new KListBox(this); - QLabel *keyl = new QLabel(_keyList, i18n("&Keywords:"), this); + TQLabel *keyl = new TQLabel(_keyList, i18n("&Keywords:"), this); l->addWidget(keyl); l->addWidget(_keyList); // result list _resultList = new KListBox(this); - QLabel *resultl = new QLabel(_resultList, i18n("&Results:"), this); + TQLabel *resultl = new TQLabel(_resultList, i18n("&Results:"), this); l->addWidget(resultl); l->addWidget(_resultList); - connect(_keyList, SIGNAL(highlighted(const QString&)), - this, SLOT(slotKeywordSelected(const QString&))); + connect(_keyList, TQT_SIGNAL(highlighted(const TQString&)), + this, TQT_SLOT(slotKeywordSelected(const TQString&))); - connect(_resultList, SIGNAL(selected(QListBoxItem*)), - this, SLOT(slotModuleSelected(QListBoxItem *))); - connect(_resultList, SIGNAL(clicked(QListBoxItem *)), - this, SLOT(slotModuleClicked(QListBoxItem *))); + connect(_resultList, TQT_SIGNAL(selected(TQListBoxItem*)), + this, TQT_SLOT(slotModuleSelected(TQListBoxItem *))); + connect(_resultList, TQT_SIGNAL(clicked(TQListBoxItem *)), + this, TQT_SLOT(slotModuleClicked(TQListBoxItem *))); } void SearchWidget::populateKeywordList(ConfigModuleList *list) @@ -108,13 +108,13 @@ void SearchWidget::populateKeywordList(ConfigModuleList *list) continue; // get the modules keyword list - QStringList kw = module->keywords(); + TQStringList kw = module->keywords(); kw << module->moduleName(); // loop through the keyword list to populate _keywords - for(QStringList::ConstIterator it = kw.begin(); it != kw.end(); ++it) + for(TQStringList::ConstIterator it = kw.begin(); it != kw.end(); ++it) { - QString name = (*it).lower(); + TQString name = (*it).lower(); bool found = false; // look if _keywords already has an entry for this keyword @@ -140,35 +140,35 @@ void SearchWidget::populateKeywordList(ConfigModuleList *list) populateKeyListBox("*"); } -void SearchWidget::populateKeyListBox(const QString& s) +void SearchWidget::populateKeyListBox(const TQString& s) { _keyList->clear(); - QStringList matches; + TQStringList matches; for(KeywordListEntry *k = _keywords.first(); k != 0; k = _keywords.next()) { - if ( QRegExp(s, false, true).search(k->moduleName()) >= 0) + if ( TQRegExp(s, false, true).search(k->moduleName()) >= 0) matches.append(k->moduleName().stripWhiteSpace()); } - for(QStringList::ConstIterator it = matches.begin(); it != matches.end(); it++) + for(TQStringList::ConstIterator it = matches.begin(); it != matches.end(); it++) _keyList->insertItem(*it); _keyList->sort(); } -void SearchWidget::populateResultListBox(const QString& s) +void SearchWidget::populateResultListBox(const TQString& s) { _resultList->clear(); - QPtrList results; + TQPtrList results; for(KeywordListEntry *k = _keywords.first(); k != 0; k = _keywords.next()) { if (k->moduleName() == s) { - QPtrList modules = k->modules(); + TQPtrList modules = k->modules(); for(ConfigModule *m = modules.first(); m != 0; m = modules.next()) new ModuleItem(m, _resultList); @@ -178,27 +178,27 @@ void SearchWidget::populateResultListBox(const QString& s) _resultList->sort(); } -void SearchWidget::searchTextChanged(const QString & s) +void SearchWidget::searchTextChanged(const TQString & s) { - QString regexp = s; + TQString regexp = s; regexp += "*"; populateKeyListBox(regexp); if (_keyList->count()==1) _keyList->setSelected(0,true); } -void SearchWidget::slotKeywordSelected(const QString & s) +void SearchWidget::slotKeywordSelected(const TQString & s) { populateResultListBox(s); } -void SearchWidget::slotModuleSelected(QListBoxItem *item) +void SearchWidget::slotModuleSelected(TQListBoxItem *item) { if (item) emit moduleSelected( static_cast(item)->module() ); } -void SearchWidget::slotModuleClicked(QListBoxItem *item) +void SearchWidget::slotModuleClicked(TQListBoxItem *item) { if (item) emit moduleSelected( static_cast(item)->module() ); diff --git a/kcontrol/kcontrol/searchwidget.h b/kcontrol/kcontrol/searchwidget.h index 99aceb7e8..492de1729 100644 --- a/kcontrol/kcontrol/searchwidget.h +++ b/kcontrol/kcontrol/searchwidget.h @@ -21,10 +21,10 @@ #ifndef __searchwidget_h__ #define __searchwidget_h__ -#include -#include -#include -#include +#include +#include +#include +#include #include "modules.h" @@ -35,16 +35,16 @@ class QListBoxItem; class KeywordListEntry { public: - KeywordListEntry(const QString& name, ConfigModule* module); + KeywordListEntry(const TQString& name, ConfigModule* module); void addModule(ConfigModule* module); - QString moduleName() { return _name; } - QPtrList modules() { return _modules; } + TQString moduleName() { return _name; } + TQPtrList modules() { return _modules; } private: - QString _name; - QPtrList _modules; + TQString _name; + TQPtrList _modules; }; @@ -53,26 +53,26 @@ class SearchWidget : public QWidget Q_OBJECT public: - SearchWidget(QWidget *parent, const char *name=0); + SearchWidget(TQWidget *parent, const char *name=0); void populateKeywordList(ConfigModuleList *list); - void searchTextChanged(const QString &); + void searchTextChanged(const TQString &); signals: void moduleSelected(ConfigModule *); protected: - void populateKeyListBox(const QString& regexp); - void populateResultListBox(const QString& keyword); + void populateKeyListBox(const TQString& regexp); + void populateResultListBox(const TQString& keyword); protected slots: - void slotKeywordSelected(const QString &); - void slotModuleSelected(QListBoxItem *item); - void slotModuleClicked(QListBoxItem *item); + void slotKeywordSelected(const TQString &); + void slotModuleSelected(TQListBoxItem *item); + void slotModuleClicked(TQListBoxItem *item); private: KListBox *_keyList, *_resultList; - QPtrList _keywords; + TQPtrList _keywords; }; #endif diff --git a/kcontrol/kcontrol/toplevel.cpp b/kcontrol/kcontrol/toplevel.cpp index c7a47e372..aac3427ff 100644 --- a/kcontrol/kcontrol/toplevel.cpp +++ b/kcontrol/kcontrol/toplevel.cpp @@ -30,12 +30,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "indexwidget.h" #include "searchwidget.h" @@ -52,21 +52,21 @@ TopLevel::TopLevel(const char* name) : KMainWindow( 0, name, WStyle_ContextHelp ) , _active(0), dummyAbout(0) { - setCaption(QString::null); + setCaption(TQString::null); report_bug = 0; // read settings KConfig *config = KGlobal::config(); config->setGroup("Index"); - QString viewmode = config->readEntry("ViewMode", "Tree"); + TQString viewmode = config->readEntry("ViewMode", "Tree"); if (viewmode == "Tree") KCGlobal::setViewMode(Tree); else KCGlobal::setViewMode(Icon); - QString size = config->readEntry("IconSize", "Medium"); + TQString size = config->readEntry("IconSize", "Medium"); if (size == "Small") KCGlobal::setIconSize(KIcon::SizeSmall); else if (size == "Large") @@ -81,58 +81,58 @@ TopLevel::TopLevel(const char* name) _modules->readDesktopEntries(); for ( ConfigModule* m = _modules->first(); m; m = _modules->next() ) { - connect( m, SIGNAL( handbookRequest() ), this, SLOT( slotHandbookRequest() ) ); - connect( m, SIGNAL( helpRequest() ), this, SLOT( slotHelpRequest() ) ); + connect( m, TQT_SIGNAL( handbookRequest() ), this, TQT_SLOT( slotHandbookRequest() ) ); + connect( m, TQT_SIGNAL( helpRequest() ), this, TQT_SLOT( slotHelpRequest() ) ); } // create the layout box - _splitter = new QSplitter( QSplitter::Horizontal, this ); + _splitter = new TQSplitter( TQSplitter::Horizontal, this ); - QFrame* leftFrame = new QFrame ( _splitter ); - QBoxLayout *leftFrameLayout = new QVBoxLayout( leftFrame ); + TQFrame* leftFrame = new TQFrame ( _splitter ); + TQBoxLayout *leftFrameLayout = new TQVBoxLayout( leftFrame ); - QFrame* mSearchFrame = new QFrame( leftFrame ); + TQFrame* mSearchFrame = new TQFrame( leftFrame ); leftFrameLayout->addWidget( mSearchFrame ); - QBoxLayout *searchLayout = new QHBoxLayout( mSearchFrame ); + TQBoxLayout *searchLayout = new TQHBoxLayout( mSearchFrame ); searchLayout->setSpacing( KDialog::spacingHint() ); searchLayout->setMargin( 6 ); - QPushButton *clearButton = new QPushButton( mSearchFrame ); + TQPushButton *clearButton = new TQPushButton( mSearchFrame ); clearButton->setIconSet( KApplication::reverseLayout() ? SmallIconSet( "clear_left" ) : SmallIconSet("locationbar_erase") ); searchLayout->addWidget( clearButton ); - QToolTip::add( clearButton, i18n("Clear search") ); + TQToolTip::add( clearButton, i18n("Clear search") ); - QLabel *label = new QLabel(i18n("Search:"), mSearchFrame ); + TQLabel *label = new TQLabel(i18n("Search:"), mSearchFrame ); searchLayout->addWidget( label ); KLineEdit *searchEdit = new KLineEdit( mSearchFrame ); clearButton->setFixedHeight( searchEdit->height() ); - connect( clearButton, SIGNAL( clicked() ), searchEdit, SLOT( clear() ) ); + connect( clearButton, TQT_SIGNAL( clicked() ), searchEdit, TQT_SLOT( clear() ) ); label->setBuddy( searchEdit ); searchLayout->addWidget( searchEdit ); - connect( searchEdit, SIGNAL( textChanged( const QString & ) ), - SLOT( slotSearchChanged(const QString &) ) ); + connect( searchEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( slotSearchChanged(const TQString &) ) ); // create the left hand side under search - _stack = new QWidgetStack( leftFrame ); + _stack = new TQWidgetStack( leftFrame ); leftFrameLayout->addWidget( _stack ); // index tab _index = new IndexWidget(_modules, this); - connect(_index, SIGNAL(moduleActivated(ConfigModule*)), - this, SLOT(activateModule(ConfigModule*))); + connect(_index, TQT_SIGNAL(moduleActivated(ConfigModule*)), + this, TQT_SLOT(activateModule(ConfigModule*))); _stack->addWidget( _index ); - connect(_index, SIGNAL(categorySelected(QListViewItem*)), - this, SLOT(categorySelected(QListViewItem*))); + connect(_index, TQT_SIGNAL(categorySelected(TQListViewItem*)), + this, TQT_SLOT(categorySelected(TQListViewItem*))); // search tab _search = new SearchWidget(this); _search->populateKeywordList(_modules); - connect(_search, SIGNAL(moduleSelected(ConfigModule *)), - this, SLOT(activateModule(ConfigModule *))); + connect(_search, TQT_SIGNAL(moduleSelected(ConfigModule *)), + this, TQT_SLOT(activateModule(ConfigModule *))); _stack->addWidget( _search ); @@ -142,21 +142,21 @@ TopLevel::TopLevel(const char* name) // help widget _help = new HelpWidget(_dock); - _stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); + _stack->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); // Restore sizes config->setGroup("General"); - QValueList sizes = config->readIntListEntry( "SplitterSizes" ); + TQValueList sizes = config->readIntListEntry( "SplitterSizes" ); if (!sizes.isEmpty()) _splitter->setSizes(sizes); // That one does the trick ... - _splitter->setResizeMode( leftFrame, QSplitter::KeepSize ); + _splitter->setResizeMode( leftFrame, TQSplitter::KeepSize ); - connect(_dock, SIGNAL(newModule(const QString&, const QString&, const QString&)), - this, SLOT(newModule(const QString&, const QString&, const QString&))); - connect(_dock, SIGNAL(changedModule(ConfigModule*)), - SLOT(changedModule(ConfigModule*))); + connect(_dock, TQT_SIGNAL(newModule(const TQString&, const TQString&, const TQString&)), + this, TQT_SLOT(newModule(const TQString&, const TQString&, const TQString&))); + connect(_dock, TQT_SIGNAL(changedModule(ConfigModule*)), + TQT_SLOT(changedModule(ConfigModule*))); // set the main view setCentralWidget( _splitter ); @@ -178,8 +178,8 @@ TopLevel::TopLevel(const char* name) if (KCGlobal::isInfoCenter()) { AboutWidget *aw = new AboutWidget( this, 0, _index->firstTreeViewItem()); - connect( aw, SIGNAL( moduleSelected( ConfigModule * ) ), - SLOT( activateModule( ConfigModule * ) ) ); + connect( aw, TQT_SIGNAL( moduleSelected( ConfigModule * ) ), + TQT_SLOT( activateModule( ConfigModule * ) ) ); _dock->setBaseWidget( aw ); KWin::setIcons( winId(), KGlobal::iconLoader()->loadIcon("hwinfo", KIcon::NoGroup, 32 ), @@ -188,8 +188,8 @@ TopLevel::TopLevel(const char* name) else { AboutWidget *aw = new AboutWidget(this); - connect( aw, SIGNAL( moduleSelected( ConfigModule * ) ), - SLOT( activateModule( ConfigModule * ) ) ); + connect( aw, TQT_SIGNAL( moduleSelected( ConfigModule * ) ), + TQT_SLOT( activateModule( ConfigModule * ) ) ); _dock->setBaseWidget(aw); } } @@ -234,40 +234,40 @@ bool TopLevel::queryClose() void TopLevel::setupActions() { - KStdAction::quit(this, SLOT(close()), actionCollection()); - KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), + KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); + KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); icon_view = new KRadioAction - (i18n("&Icon View"), 0, this, SLOT(activateIconView()), + (i18n("&Icon View"), 0, this, TQT_SLOT(activateIconView()), actionCollection(), "activate_iconview"); icon_view->setExclusiveGroup( "viewmode" ); tree_view = new KRadioAction - (i18n("&Tree View"), 0, this, SLOT(activateTreeView()), + (i18n("&Tree View"), 0, this, TQT_SLOT(activateTreeView()), actionCollection(), "activate_treeview"); tree_view->setExclusiveGroup( "viewmode" ); icon_small = new KRadioAction - (i18n("&Small"), 0, this, SLOT(activateSmallIcons()), + (i18n("&Small"), 0, this, TQT_SLOT(activateSmallIcons()), actionCollection(), "activate_smallicons"); icon_small->setExclusiveGroup( "iconsize" ); icon_medium = new KRadioAction - (i18n("&Medium"), 0, this, SLOT(activateMediumIcons()), + (i18n("&Medium"), 0, this, TQT_SLOT(activateMediumIcons()), actionCollection(), "activate_mediumicons"); icon_medium->setExclusiveGroup( "iconsize" ); icon_large = new KRadioAction - (i18n("&Large"), 0, this, SLOT(activateLargeIcons()), + (i18n("&Large"), 0, this, TQT_SLOT(activateLargeIcons()), actionCollection(), "activate_largeicons"); icon_large->setExclusiveGroup( "iconsize" ); icon_huge = new KRadioAction - (i18n("&Huge"), 0, this, SLOT(activateHugeIcons()), + (i18n("&Huge"), 0, this, TQT_SLOT(activateHugeIcons()), actionCollection(), "activate_hugeicons"); icon_huge->setExclusiveGroup( "iconsize" ); - about_module = new KAction(i18n("About Current Module"), 0, this, SLOT(aboutModule()), actionCollection(), "help_about_module"); + about_module = new KAction(i18n("About Current Module"), 0, this, TQT_SLOT(aboutModule()), actionCollection(), "help_about_module"); about_module->setEnabled(false); // I need to add this so that each module can get a bug reported, @@ -280,7 +280,7 @@ actionCollection()); report_bug = actionCollection()->action("help_report_bug"); report_bug->setText(i18n("&Report Bug...")); report_bug->disconnect(); - connect(report_bug, SIGNAL(activated()), SLOT(reportBug())); + connect(report_bug, TQT_SIGNAL(activated()), TQT_SLOT(reportBug())); } void TopLevel::activateIconView() @@ -345,7 +345,7 @@ void TopLevel::activateHugeIcons() _index->reload(); } -void TopLevel::newModule(const QString &name, const QString& docPath, const QString &quickhelp) +void TopLevel::newModule(const TQString &name, const TQString& docPath, const TQString &quickhelp) { setCaption(name, false); @@ -366,7 +366,7 @@ void TopLevel::changedModule(ConfigModule *changed) setCaption(changed->moduleName(), changed->isChanged() ); } -void TopLevel::categorySelected(QListViewItem *category) +void TopLevel::categorySelected(TQListViewItem *category) { if (_active) { @@ -390,13 +390,13 @@ void TopLevel::categorySelected(QListViewItem *category) } _dock->removeModule(); about_module->setText( i18n( "About Current Module" ) ); - about_module->setIconSet( QIconSet() ); + about_module->setIconSet( TQIconSet() ); about_module->setEnabled( false ); // insert the about widget - QListViewItem *firstItem = category->firstChild(); - QString caption = static_cast(category)->caption(); - QString icon = static_cast(category)->icon(); + TQListViewItem *firstItem = category->firstChild(); + TQString caption = static_cast(category)->caption(); + TQString icon = static_cast(category)->icon(); if( _dock->baseWidget()->isA( "AboutWidget" ) ) { static_cast( _dock->baseWidget() )->setCategory( firstItem, icon, caption); @@ -404,8 +404,8 @@ void TopLevel::categorySelected(QListViewItem *category) else { AboutWidget *aw = new AboutWidget( this, 0, firstItem, caption ); - connect( aw, SIGNAL( moduleSelected( ConfigModule * ) ), - SLOT( activateModule( ConfigModule * ) ) ); + connect( aw, TQT_SIGNAL( moduleSelected( ConfigModule * ) ), + TQT_SLOT( activateModule( ConfigModule * ) ) ); _dock->setBaseWidget( aw ); } } @@ -445,7 +445,7 @@ void TopLevel::activateModule(ConfigModule *mod) else { about_module->setText(i18n("About Current Module")); - about_module->setIconSet(QIconSet()); + about_module->setIconSet(TQIconSet()); about_module->setEnabled(false); } } @@ -456,7 +456,7 @@ void TopLevel::deleteDummyAbout() dummyAbout = 0; } -void TopLevel::slotSearchChanged(const QString& search) +void TopLevel::slotSearchChanged(const TQString& search) { if (search.isEmpty()) _stack->raiseWidget(_index); @@ -469,7 +469,7 @@ void TopLevel::slotSearchChanged(const QString& search) void TopLevel::slotHelpRequest() { - _help->display(_help->text(), QCursor::pos ( ), _dock); + _help->display(_help->text(), TQCursor::pos ( ), _dock); } void TopLevel::slotHandbookRequest() @@ -500,7 +500,7 @@ void TopLevel::reportBug() } KBugReport *br = new KBugReport(this, false, dummyAbout); if (deleteit) - connect(br, SIGNAL(finished()), SLOT(deleteDummyAbout())); + connect(br, TQT_SIGNAL(finished()), TQT_SLOT(deleteDummyAbout())); else dummyAbout = 0; br->show(); @@ -512,7 +512,7 @@ void TopLevel::aboutModule() dlg.exec(); } -QString TopLevel::handleAmpersand( QString modulename ) const +TQString TopLevel::handleAmpersand( TQString modulename ) const { if( modulename.contains( '&' )) // double it { diff --git a/kcontrol/kcontrol/toplevel.h b/kcontrol/kcontrol/toplevel.h index 02e42a49e..2f10cb3bc 100644 --- a/kcontrol/kcontrol/toplevel.h +++ b/kcontrol/kcontrol/toplevel.h @@ -22,7 +22,7 @@ #define __TOPLEVEL_H__ #include -#include +#include class QSplitter; @@ -52,8 +52,8 @@ protected: protected slots: void activateModule(ConfigModule *); - void categorySelected(QListViewItem *category); - void newModule(const QString &name, const QString& docPath, const QString &quickhelp); + void categorySelected(TQListViewItem *category); + void newModule(const TQString &name, const TQString& docPath, const TQString &quickhelp); void activateIconView(); void activateTreeView(); @@ -67,7 +67,7 @@ protected slots: void deleteDummyAbout(); - void slotSearchChanged(const QString &); + void slotSearchChanged(const TQString &); void slotHandbookRequest(); void slotHelpRequest(); @@ -77,10 +77,10 @@ protected slots: private: - QString handleAmpersand( QString ) const; + TQString handleAmpersand( TQString ) const; - QSplitter *_splitter; - QWidgetStack *_stack; + TQSplitter *_splitter; + TQWidgetStack *_stack; DockContainer *_dock; ModuleTitle *_title; -- cgit v1.2.3