summaryrefslogtreecommitdiffstats
path: root/kutils/ksettings
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kutils/ksettings
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kutils/ksettings')
-rw-r--r--kutils/ksettings/componentsdialog.cpp72
-rw-r--r--kutils/ksettings/componentsdialog.h8
-rw-r--r--kutils/ksettings/dialog.cpp134
-rw-r--r--kutils/ksettings/dialog.h32
-rw-r--r--kutils/ksettings/dispatcher.cpp36
-rw-r--r--kutils/ksettings/dispatcher.h28
-rw-r--r--kutils/ksettings/pluginpage.cpp18
-rw-r--r--kutils/ksettings/pluginpage.h8
8 files changed, 168 insertions, 168 deletions
diff --git a/kutils/ksettings/componentsdialog.cpp b/kutils/ksettings/componentsdialog.cpp
index 5093af985..cb3695e05 100644
--- a/kutils/ksettings/componentsdialog.cpp
+++ b/kutils/ksettings/componentsdialog.cpp
@@ -19,10 +19,10 @@
#include "ksettings/componentsdialog.h"
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klistview.h>
-#include <qlabel.h>
-#include <qheader.h>
+#include <tqlabel.h>
+#include <tqheader.h>
#include <kplugininfo.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -36,34 +36,34 @@ class ComponentsDialog::ComponentsDialogPrivate
{
public:
KListView * listview;
- QFrame * infowidget;
- QLabel * iconwidget;
- QLabel * commentwidget;
- QLabel * descriptionwidget;
- QMap<QCheckListItem*, KPluginInfo*> plugininfomap;
- QValueList<KPluginInfo*> plugininfolist;
+ TQFrame * infowidget;
+ TQLabel * iconwidget;
+ TQLabel * commentwidget;
+ TQLabel * descriptionwidget;
+ TQMap<TQCheckListItem*, KPluginInfo*> plugininfomap;
+ TQValueList<KPluginInfo*> plugininfolist;
};
-ComponentsDialog::ComponentsDialog( QWidget * parent, const char * name )
+ComponentsDialog::ComponentsDialog( TQWidget * parent, const char * name )
: KDialogBase( parent, name, false, i18n( "Select Components" ) )
, d( new ComponentsDialogPrivate )
{
- QWidget * page = new QWidget( this );
+ TQWidget * page = new TQWidget( this );
setMainWidget( page );
- ( new QHBoxLayout( page, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ ( new TQHBoxLayout( page, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
d->listview = new KListView( page );
d->listview->setMinimumSize( 200, 200 );
- d->infowidget = new QFrame( page );
+ d->infowidget = new TQFrame( page );
d->infowidget->setMinimumSize( 200, 200 );
- ( new QVBoxLayout( d->infowidget, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
- d->iconwidget = new QLabel( d->infowidget );
+ ( new TQVBoxLayout( d->infowidget, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ d->iconwidget = new TQLabel( d->infowidget );
( void )new KSeparator( d->infowidget );
- d->commentwidget = new QLabel( d->infowidget );
+ d->commentwidget = new TQLabel( d->infowidget );
d->commentwidget->setAlignment( Qt::WordBreak );
- d->descriptionwidget = new QLabel( d->infowidget );
+ d->descriptionwidget = new TQLabel( d->infowidget );
d->descriptionwidget->setAlignment( Qt::WordBreak );
- d->listview->addColumn( QString::null );
+ d->listview->addColumn( TQString::null );
d->listview->header()->hide();
d->listview->setRootIsDecorated( true );
d->listview->setSorting( -1 );
@@ -71,14 +71,14 @@ ComponentsDialog::ComponentsDialog( QWidget * parent, const char * name )
d->listview->setSelectionModeExt( KListView::Single );
d->listview->setAllColumnsShowFocus( true );
- connect( d->listview, SIGNAL( pressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( d->listview, SIGNAL( spacePressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( d->listview, SIGNAL( returnPressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( d->listview, SIGNAL( selectionChanged( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
+ connect( d->listview, TQT_SIGNAL( pressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( d->listview, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( d->listview, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( d->listview, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
}
ComponentsDialog::~ComponentsDialog()
@@ -90,17 +90,17 @@ void ComponentsDialog::addPluginInfo( KPluginInfo * info )
d->plugininfolist.append( info );
}
-void ComponentsDialog::setPluginInfos( const QMap<QString, KPluginInfo*> &
+void ComponentsDialog::setPluginInfos( const TQMap<TQString, KPluginInfo*> &
plugininfos )
{
- for( QMap<QString, KPluginInfo*>::ConstIterator it = plugininfos.begin();
+ for( TQMap<TQString, KPluginInfo*>::ConstIterator it = plugininfos.begin();
it != plugininfos.end(); ++it )
{
d->plugininfolist.append( it.data() );
}
}
-void ComponentsDialog::setPluginInfos( const QValueList<KPluginInfo *> &plugins )
+void ComponentsDialog::setPluginInfos( const TQValueList<KPluginInfo *> &plugins )
{
d->plugininfolist = plugins;
}
@@ -112,12 +112,12 @@ void ComponentsDialog::show()
d->plugininfomap.clear();
// construct the treelist
- for( QValueList<KPluginInfo*>::ConstIterator it = d->plugininfolist.begin();
+ for( TQValueList<KPluginInfo*>::ConstIterator it = d->plugininfolist.begin();
it != d->plugininfolist.end(); ++it )
{
( *it )->load();
- QCheckListItem * item = new QCheckListItem( d->listview, ( *it )->name(),
- QCheckListItem::CheckBox );
+ TQCheckListItem * item = new TQCheckListItem( d->listview, ( *it )->name(),
+ TQCheckListItem::CheckBox );
if( ! ( *it )->icon().isEmpty() )
item->setPixmap( 0, SmallIcon( ( *it )->icon(), IconSize( KIcon::Small ) ) );
item->setOn( ( *it )->isPluginEnabled() );
@@ -126,7 +126,7 @@ void ComponentsDialog::show()
KDialogBase::show();
}
-void ComponentsDialog::executed( QListViewItem * item )
+void ComponentsDialog::executed( TQListViewItem * item )
{
kdDebug( 704 ) << k_funcinfo << endl;
if( item == 0 )
@@ -134,11 +134,11 @@ void ComponentsDialog::executed( QListViewItem * item )
if( item->rtti() != 1 ) // check for QCheckListItem
return;
- QCheckListItem * citem = static_cast<QCheckListItem *>( item );
+ TQCheckListItem * citem = static_cast<TQCheckListItem *>( item );
bool checked = citem->isOn();
kdDebug( 704 ) << "it's a " << ( checked ? "checked" : "unchecked" )
- << " QCheckListItem" << endl;
+ << " TQCheckListItem" << endl;
KPluginInfo * info = d->plugininfomap[ citem ];
info->setPluginEnabled( checked );
@@ -151,7 +151,7 @@ void ComponentsDialog::executed( QListViewItem * item )
void ComponentsDialog::savePluginInfos()
{
- for( QValueList<KPluginInfo*>::ConstIterator it = d->plugininfolist.begin();
+ for( TQValueList<KPluginInfo*>::ConstIterator it = d->plugininfolist.begin();
it != d->plugininfolist.end(); ++it )
{
if( ( *it )->config() )
diff --git a/kutils/ksettings/componentsdialog.h b/kutils/ksettings/componentsdialog.h
index e5325f707..2847622a8 100644
--- a/kutils/ksettings/componentsdialog.h
+++ b/kutils/ksettings/componentsdialog.h
@@ -47,7 +47,7 @@ class KUTILS_EXPORT ComponentsDialog : public KDialogBase
@param parent parent widget
@param name name
*/
- ComponentsDialog( QWidget * parent = 0, const char * name = 0 );
+ ComponentsDialog( TQWidget * parent = 0, const char * name = 0 );
~ComponentsDialog();
/**
@@ -57,11 +57,11 @@ class KUTILS_EXPORT ComponentsDialog : public KDialogBase
/**
Set list of plugins the dialog offers for selection. (Overwrites a previous list)
*/
- void setPluginInfos( const QMap<QString, KPluginInfo*> & plugininfos );
+ void setPluginInfos( const TQMap<TQString, KPluginInfo*> & plugininfos );
/**
Set list of plugins the dialog offers for selection. (Overwrites a previous list)
*/
- void setPluginInfos( const QValueList<KPluginInfo *> &plugins );
+ void setPluginInfos( const TQValueList<KPluginInfo *> &plugins );
/**
* reimplemented
@@ -73,7 +73,7 @@ class KUTILS_EXPORT ComponentsDialog : public KDialogBase
void slotApply();
private slots:
- void executed( QListViewItem * );
+ void executed( TQListViewItem * );
private:
void savePluginInfos();
diff --git a/kutils/ksettings/dialog.cpp b/kutils/ksettings/dialog.cpp
index c98c68872..35ad153ef 100644
--- a/kutils/ksettings/dialog.cpp
+++ b/kutils/ksettings/dialog.cpp
@@ -31,8 +31,8 @@
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
#include <kiconloader.h>
-#include <qvbox.h>
-#include <qlabel.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
#include "kcmoduleinfo.h"
namespace KSettings
@@ -40,13 +40,13 @@ namespace KSettings
struct GroupInfo
{
- QString id;
- QString name;
- QString comment;
- QString icon;
+ TQString id;
+ TQString name;
+ TQString comment;
+ TQString icon;
int weight;
- QString parentid;
- QWidget * page;
+ TQString parentid;
+ TQWidget * page;
};
// The TreeList can get really complicated. That's why a tree data structure
@@ -54,7 +54,7 @@ struct GroupInfo
class PageNode
{
private:
- typedef QValueList<PageNode*> List;
+ typedef TQValueList<PageNode*> List;
enum Type { KCM, Group, Root };
union Value
{
@@ -185,17 +185,17 @@ class PageNode
( *it )->makeDirty();
}
- QString name() const
+ TQString name() const
{
if( Root == m_type )
- return QString::fromAscii( "root node" );
+ return TQString::fromAscii( "root node" );
return ( KCM == m_type ) ? m_value.kcm->moduleName()
: m_value.group->name;
}
- QStringList parentNames() const
+ TQStringList parentNames() const
{
- QStringList ret;
+ TQStringList ret;
PageNode * node = m_parent;
while( node && node->m_type != Root )
{
@@ -218,13 +218,13 @@ class PageNode
}
if( Group == m_type && 0 == m_value.group->page )
{
- QPixmap icon;
+ TQPixmap icon;
if( ! m_value.group->icon.isNull() )
icon = SmallIcon( m_value.group->icon,
IconSize( KIcon::Small ) );
- QVBox * page = dlg->addVBoxPage( m_value.group->name,
- QString::null, icon );
- QLabel * comment = new QLabel( m_value.group->comment, page );
+ TQVBox * page = dlg->addVBoxPage( m_value.group->name,
+ TQString::null, icon );
+ TQLabel * comment = new TQLabel( m_value.group->comment, page );
comment->setTextFormat( Qt::RichText );
m_value.group->page = page;
}
@@ -291,7 +291,7 @@ class PageNode
return false;
}
- bool insert( KCModuleInfo * info, const QString & parentid )
+ bool insert( KCModuleInfo * info, const TQString & parentid )
{
if( parentid.isNull() )
{
@@ -349,14 +349,14 @@ class Dialog::DialogPrivate
bool staticlistview;
KCMultiDialog * dlg;
PageNode pagetree;
- QWidget * parentwidget;
- QStringList registeredComponents;
- QValueList<KService::Ptr> services;
- QMap<QString, KPluginInfo*> plugininfomap;
+ TQWidget * parentwidget;
+ TQStringList registeredComponents;
+ TQValueList<KService::Ptr> services;
+ TQMap<TQString, KPluginInfo*> plugininfomap;
};
-Dialog::Dialog( QWidget * parent, const char * name )
- : QObject( parent, name )
+Dialog::Dialog( TQWidget * parent, const char * name )
+ : TQObject( parent, name )
, d( new DialogPrivate( this ) )
{
d->parentwidget = parent;
@@ -365,8 +365,8 @@ Dialog::Dialog( QWidget * parent, const char * name )
}
Dialog::Dialog( ContentInListView content,
- QWidget * parent, const char * name )
- : QObject( parent, name )
+ TQWidget * parent, const char * name )
+ : TQObject( parent, name )
, d( new DialogPrivate( this ) )
{
d->parentwidget = parent;
@@ -374,9 +374,9 @@ Dialog::Dialog( ContentInListView content,
d->services = instanceServices();
}
-Dialog::Dialog( const QStringList & components,
- QWidget * parent, const char * name )
- : QObject( parent, name )
+Dialog::Dialog( const TQStringList & components,
+ TQWidget * parent, const char * name )
+ : TQObject( parent, name )
, d( new DialogPrivate( this ) )
{
d->parentwidget = parent;
@@ -384,9 +384,9 @@ Dialog::Dialog( const QStringList & components,
d->services = instanceServices() + parentComponentsServices( components );
}
-Dialog::Dialog( const QStringList & components,
- ContentInListView content, QWidget * parent, const char * name )
- : QObject( parent, name )
+Dialog::Dialog( const TQStringList & components,
+ ContentInListView content, TQWidget * parent, const char * name )
+ : TQObject( parent, name )
, d( new DialogPrivate( this ) )
{
d->parentwidget = parent;
@@ -399,9 +399,9 @@ Dialog::~Dialog()
delete d;
}
-void Dialog::addPluginInfos( const QValueList<KPluginInfo*> & plugininfos )
+void Dialog::addPluginInfos( const TQValueList<KPluginInfo*> & plugininfos )
{
- for( QValueList<KPluginInfo*>::ConstIterator it = plugininfos.begin();
+ for( TQValueList<KPluginInfo*>::ConstIterator it = plugininfos.begin();
it != plugininfos.end(); ++it )
{
d->registeredComponents.append( ( *it )->pluginName() );
@@ -425,16 +425,16 @@ KCMultiDialog * Dialog::dialog()
return d->dlg;
}
-QValueList<KService::Ptr> Dialog::instanceServices() const
+TQValueList<KService::Ptr> Dialog::instanceServices() const
{
kdDebug( 700 ) << k_funcinfo << endl;
- QString instanceName = KGlobal::instance()->instanceName();
+ TQString instanceName = KGlobal::instance()->instanceName();
d->registeredComponents.append( instanceName );
kdDebug( 700 ) << "calling KServiceGroup::childGroup( " << instanceName
<< " )" << endl;
KServiceGroup::Ptr service = KServiceGroup::childGroup( instanceName );
- QValueList<KService::Ptr> ret;
+ TQValueList<KService::Ptr> ret;
if( service && service->isValid() )
{
@@ -458,11 +458,11 @@ QValueList<KService::Ptr> Dialog::instanceServices() const
return ret;
}
-QValueList<KService::Ptr> Dialog::parentComponentsServices(
- const QStringList & kcdparents ) const
+TQValueList<KService::Ptr> Dialog::parentComponentsServices(
+ const TQStringList & kcdparents ) const
{
d->registeredComponents += kcdparents;
- QString constraint = kcdparents.join(
+ TQString constraint = kcdparents.join(
"' in [X-KDE-ParentComponents]) or ('" );
constraint = "('" + constraint + "' in [X-KDE-ParentComponents])";
@@ -478,9 +478,9 @@ bool Dialog::isPluginForKCMEnabled( KCModuleInfo * moduleinfo ) const
kdDebug( 700 ) << "check whether the " << moduleinfo->moduleName()
<< " KCM should be shown" << endl;
// for all parent components
- QStringList parentComponents = moduleinfo->service()->property(
+ TQStringList parentComponents = moduleinfo->service()->property(
"X-KDE-ParentComponents" ).toStringList();
- for( QStringList::ConstIterator pcit = parentComponents.begin();
+ for( TQStringList::ConstIterator pcit = parentComponents.begin();
pcit != parentComponents.end(); ++pcit )
{
// if the parentComponent is not registered ignore it
@@ -509,15 +509,15 @@ bool Dialog::isPluginForKCMEnabled( KCModuleInfo * moduleinfo ) const
return enabled;
}
-void Dialog::parseGroupFile( const QString & filename )
+void Dialog::parseGroupFile( const TQString & filename )
{
KSimpleConfig file( filename );
- QStringList groups = file.groupList();
- for( QStringList::ConstIterator it = groups.begin(); it != groups.end();
+ TQStringList groups = file.groupList();
+ for( TQStringList::ConstIterator it = groups.begin(); it != groups.end();
++it )
{
GroupInfo group;
- QString id = *it;
+ TQString id = *it;
file.setGroup( id.utf8() );
group.id = id;
group.name = file.readEntry( "Name" );
@@ -532,26 +532,26 @@ void Dialog::parseGroupFile( const QString & filename )
void Dialog::createDialogFromServices()
{
// read .setdlg files
- QString setdlgpath = locate( "appdata",
+ TQString setdlgpath = locate( "appdata",
KGlobal::instance()->instanceName() + ".setdlg" );
- QStringList setdlgaddon = KGlobal::dirs()->findAllResources( "appdata",
+ TQStringList setdlgaddon = KGlobal::dirs()->findAllResources( "appdata",
"ksettingsdialog/*.setdlg" );
if( ! setdlgpath.isNull() )
parseGroupFile( setdlgpath );
if( setdlgaddon.size() > 0 )
- for( QStringList::ConstIterator it = setdlgaddon.begin();
+ for( TQStringList::ConstIterator it = setdlgaddon.begin();
it != setdlgaddon.end(); ++it )
parseGroupFile( *it );
// now we process the KCModule services
- for( QValueList<KService::Ptr>::ConstIterator it = d->services.begin();
+ for( TQValueList<KService::Ptr>::ConstIterator it = d->services.begin();
it != d->services.end(); ++it )
{
// we create the KCModuleInfo
KCModuleInfo * info = new KCModuleInfo( *it );
- QString parentid;
- QVariant tmp = info->service()->property( "X-KDE-CfgDlgHierarchy",
- QVariant::String );
+ TQString parentid;
+ TQVariant tmp = info->service()->property( "X-KDE-CfgDlgHierarchy",
+ TQVariant::String );
if( tmp.isValid() )
parentid = tmp.toString();
d->pagetree.insert( info, parentid );
@@ -588,14 +588,14 @@ void Dialog::createDialogFromServices()
if( ! d->staticlistview )
d->dlg->addButtonBelowList( i18n( "Select Components..." ), this,
- SLOT( configureTree() ) );
+ TQT_SLOT( configureTree() ) );
- connect( d->dlg, SIGNAL( okClicked() ), Dispatcher::self(),
- SLOT( syncConfiguration() ) );
- connect( d->dlg, SIGNAL( applyClicked() ), Dispatcher::self(),
- SLOT( syncConfiguration() ) );
- connect( d->dlg, SIGNAL( configCommitted( const QCString & ) ),
- Dispatcher::self(), SLOT( reparseConfiguration( const QCString & ) ) );
+ connect( d->dlg, TQT_SIGNAL( okClicked() ), Dispatcher::self(),
+ TQT_SLOT( syncConfiguration() ) );
+ connect( d->dlg, TQT_SIGNAL( applyClicked() ), Dispatcher::self(),
+ TQT_SLOT( syncConfiguration() ) );
+ connect( d->dlg, TQT_SIGNAL( configCommitted( const TQCString & ) ),
+ Dispatcher::self(), TQT_SLOT( reparseConfiguration( const TQCString & ) ) );
d->pagetree.addToDialog( d->dlg );
@@ -609,13 +609,13 @@ void Dialog::configureTree()
ComponentsDialog * subdlg = new ComponentsDialog( d->dlg );
subdlg->setPluginInfos( d->plugininfomap );
subdlg->show();
- connect( subdlg, SIGNAL( okClicked() ), this, SLOT( updateTreeList() ) );
- connect( subdlg, SIGNAL( applyClicked() ), this, SLOT( updateTreeList() ) );
- connect( subdlg, SIGNAL( okClicked() ), this,
- SIGNAL( pluginSelectionChanged() ) );
- connect( subdlg, SIGNAL( applyClicked() ), this,
- SIGNAL( pluginSelectionChanged() ) );
- connect( subdlg, SIGNAL( finished() ), subdlg, SLOT( delayedDestruct() ) );
+ connect( subdlg, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( updateTreeList() ) );
+ connect( subdlg, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( updateTreeList() ) );
+ connect( subdlg, TQT_SIGNAL( okClicked() ), this,
+ TQT_SIGNAL( pluginSelectionChanged() ) );
+ connect( subdlg, TQT_SIGNAL( applyClicked() ), this,
+ TQT_SIGNAL( pluginSelectionChanged() ) );
+ connect( subdlg, TQT_SIGNAL( finished() ), subdlg, TQT_SLOT( delayedDestruct() ) );
}
void Dialog::updateTreeList()
diff --git a/kutils/ksettings/dialog.h b/kutils/ksettings/dialog.h
index 84f4619be..f19bf225a 100644
--- a/kutils/ksettings/dialog.h
+++ b/kutils/ksettings/dialog.h
@@ -20,7 +20,7 @@
#ifndef KSETTINGS_DIALOG_H
#define KSETTINGS_DIALOG_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kservice.h>
template<class T> class QValueList;
@@ -52,14 +52,14 @@ namespace KSettings
* If you use a KPart that was not especially designed for your app you can use
* the second constructor:
* \code
- * QStringList kpartslist;
+ * TQStringList kpartslist;
* for( all my kparts )
* kpartslist += m_mypart->instance().instanceName();
* m_cfgdlg = new Dialog( kpartslist, this );
* \endcode
* and the action for the config dialog is connected to the show slot:
* \code
- * KStdAction::preferences( m_cfgdlg, SLOT( show() ), actionCollection() );
+ * KStdAction::preferences( m_cfgdlg, TQT_SLOT( show() ), actionCollection() );
* \endcode
*
* If you need to be informed when the config was changed and applied in the
@@ -102,7 +102,7 @@ class KUTILS_EXPORT Dialog : public QObject
* widget.
* @param name name
*/
- Dialog( QWidget * parent = 0, const char * name = 0 );
+ Dialog( TQWidget * parent = 0, const char * name = 0 );
/**
* Construct a new Preferences Dialog for the application. It uses all
@@ -115,14 +115,14 @@ class KUTILS_EXPORT Dialog : public QObject
* widget.
* @param name name
*/
- Dialog( ContentInListView content = Static, QWidget * parent = 0,
+ Dialog( ContentInListView content = Static, TQWidget * parent = 0,
const char * name = 0 );
/**
* Construct a new Preferences Dialog with the pages for the selected
* instance names. For example if you want to have the configuration
* pages for the kviewviewer KPart you would pass a
- * QStringList consisting of only the name of the part "kviewviewer".
+ * TQStringList consisting of only the name of the part "kviewviewer".
*
* @param components A list of the names of the components that your
* config dialog should merge the config pages in.
@@ -131,14 +131,14 @@ class KUTILS_EXPORT Dialog : public QObject
* widget.
* @param name name
*/
- Dialog( const QStringList & components, QWidget * parent = 0,
+ Dialog( const TQStringList & components, TQWidget * parent = 0,
const char * name = 0 );
/**
* Construct a new Preferences Dialog with the pages for the selected
* instance names. For example if you want to have the configuration
* pages for the kviewviewer KPart you would pass a
- * QStringList consisting of only the name of the part "kviewviewer".
+ * TQStringList consisting of only the name of the part "kviewviewer".
*
* @param components A list of the names of the components that your
* config dialog should merge the config pages in.
@@ -149,8 +149,8 @@ class KUTILS_EXPORT Dialog : public QObject
* widget.
* @param name name
*/
- Dialog( const QStringList & components, ContentInListView
- content, QWidget * parent = 0, const char * name = 0 );
+ Dialog( const TQStringList & components, ContentInListView
+ content, TQWidget * parent = 0, const char * name = 0 );
~Dialog();
@@ -158,7 +158,7 @@ class KUTILS_EXPORT Dialog : public QObject
* If you use a Configurable dialog you need to pass KPluginInfo
* objects that the dialog should configure.
*/
- void addPluginInfos( const QValueList<KPluginInfo*> & plugininfos );
+ void addPluginInfos( const TQValueList<KPluginInfo*> & plugininfos );
KCMultiDialog * dialog();
@@ -190,21 +190,21 @@ class KUTILS_EXPORT Dialog : public QObject
*/
bool isPluginForKCMEnabled( KCModuleInfo * ) const;
- QValueList<KService::Ptr> instanceServices() const;
- QValueList<KService::Ptr> parentComponentsServices(
- const QStringList & ) const;
+ TQValueList<KService::Ptr> instanceServices() const;
+ TQValueList<KService::Ptr> parentComponentsServices(
+ const TQStringList & ) const;
/**
* @internal
* Read the .setdlg file and add it to the groupmap
*/
- void parseGroupFile( const QString & );
+ void parseGroupFile( const TQString & );
/**
* @internal
* If this module is put into a TreeList hierarchy this will return a
* list of the names of the parent modules.
*/
- QStringList parentModuleNames( KCModuleInfo * );
+ TQStringList parentModuleNames( KCModuleInfo * );
/**
* @internal
diff --git a/kutils/ksettings/dispatcher.cpp b/kutils/ksettings/dispatcher.cpp
index 4e54538d8..7f20c1bc3 100644
--- a/kutils/ksettings/dispatcher.cpp
+++ b/kutils/ksettings/dispatcher.cpp
@@ -19,7 +19,7 @@
#include "ksettings/dispatcher.h"
-#include <qsignal.h>
+#include <tqsignal.h>
#include <kstaticdeleter.h>
#include <kdebug.h>
@@ -45,8 +45,8 @@ Dispatcher * Dispatcher::self()
return m_self;
}
-Dispatcher::Dispatcher( QObject * parent, const char * name )
- : QObject( parent, name )
+Dispatcher::Dispatcher( TQObject * parent, const char * name )
+ : TQObject( parent, name )
//, d( 0 )
{
kdDebug( 701 ) << k_funcinfo << endl;
@@ -58,32 +58,32 @@ Dispatcher::~Dispatcher()
//delete d;
}
-void Dispatcher::registerInstance( KInstance * instance, QObject * recv, const char * slot )
+void Dispatcher::registerInstance( KInstance * instance, TQObject * recv, const char * slot )
{
assert( instance != 0 );
// keep the KInstance around and call
// instance->config()->reparseConfiguration when the app should reparse
- QCString instanceName = instance->instanceName();
+ TQCString instanceName = instance->instanceName();
kdDebug( 701 ) << k_funcinfo << instanceName << endl;
m_instanceName[ recv ] = instanceName;
- QSignal * sig;
+ TQSignal * sig;
if( m_instanceInfo.contains( instanceName ) )
{
sig = m_instanceInfo[ instanceName ].signal;
}
else
{
- sig = new QSignal( this, "signal dispatcher" );
+ sig = new TQSignal( this, "signal dispatcher" );
m_instanceInfo[ instanceName ].signal = sig;
m_instanceInfo[ instanceName ].instance = instance;
}
sig->connect( recv, slot );
++m_instanceInfo[ instanceName ].count;
- connect( recv, SIGNAL( destroyed( QObject * ) ), this, SLOT( unregisterInstance( QObject * ) ) );
+ connect( recv, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( unregisterInstance( TQObject * ) ) );
}
-KConfig * Dispatcher::configForInstanceName( const QCString & instanceName )
+KConfig * Dispatcher::configForInstanceName( const TQCString & instanceName )
{
kdDebug( 701 ) << k_funcinfo << endl;
if( m_instanceInfo.contains( instanceName ) )
@@ -97,17 +97,17 @@ KConfig * Dispatcher::configForInstanceName( const QCString & instanceName )
return 0;
}
-QStrList Dispatcher::instanceNames() const
+TQStrList Dispatcher::instanceNames() const
{
kdDebug( 701 ) << k_funcinfo << endl;
- QStrList names;
- for( QMap<QCString, InstanceInfo>::ConstIterator it = m_instanceInfo.begin(); it != m_instanceInfo.end(); ++it )
+ TQStrList names;
+ for( TQMap<TQCString, InstanceInfo>::ConstIterator it = m_instanceInfo.begin(); it != m_instanceInfo.end(); ++it )
if( ( *it ).count > 0 )
names.append( it.key() );
return names;
}
-void Dispatcher::reparseConfiguration( const QCString & instanceName )
+void Dispatcher::reparseConfiguration( const TQCString & instanceName )
{
kdDebug( 701 ) << k_funcinfo << instanceName << endl;
// check if the instanceName is valid:
@@ -116,7 +116,7 @@ void Dispatcher::reparseConfiguration( const QCString & instanceName )
// first we reparse the config of the instance so that the KConfig object
// will be up to date
m_instanceInfo[ instanceName ].instance->config()->reparseConfiguration();
- QSignal * sig = m_instanceInfo[ instanceName ].signal;
+ TQSignal * sig = m_instanceInfo[ instanceName ].signal;
if( sig )
{
kdDebug( 701 ) << "emit signal to instance" << endl;
@@ -126,16 +126,16 @@ void Dispatcher::reparseConfiguration( const QCString & instanceName )
void Dispatcher::syncConfiguration()
{
- for( QMap<QCString, InstanceInfo>::ConstIterator it = m_instanceInfo.begin(); it != m_instanceInfo.end(); ++it )
+ for( TQMap<TQCString, InstanceInfo>::ConstIterator it = m_instanceInfo.begin(); it != m_instanceInfo.end(); ++it )
{
( *it ).instance->config()->sync();
}
}
-void Dispatcher::unregisterInstance( QObject * obj )
+void Dispatcher::unregisterInstance( TQObject * obj )
{
kdDebug( 701 ) << k_funcinfo << endl;
- QCString name = m_instanceName[ obj ];
+ TQCString name = m_instanceName[ obj ];
m_instanceName.remove( obj ); //obj will be destroyed when we return, so we better remove this entry
--m_instanceInfo[ name ].count;
if( m_instanceInfo[ name ].count == 0 )
@@ -145,7 +145,7 @@ void Dispatcher::unregisterInstance( QObject * obj )
}
}
-//X KInstance * Dispatcher::instanceForName( const QCString & instanceName )
+//X KInstance * Dispatcher::instanceForName( const TQCString & instanceName )
//X {
//X return m_instanceInfo[ instanceName ].instance;
//X }
diff --git a/kutils/ksettings/dispatcher.h b/kutils/ksettings/dispatcher.h
index 5f6270bb5..f428b35fd 100644
--- a/kutils/ksettings/dispatcher.h
+++ b/kutils/ksettings/dispatcher.h
@@ -20,8 +20,8 @@
#ifndef KSETTINGS_DISPATCHER_H
#define KSETTINGS_DISPATCHER_H
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
#include <kdelibs_export.h>
class QCString;
@@ -42,7 +42,7 @@ namespace KSettings
* into the KConfigureDialog you need a way to get notified. This is what you
* do:
* \code
- * Dispatcher::self()->registerInstance( instance(), this, SLOT( loadSettings() ) );
+ * Dispatcher::self()->registerInstance( instance(), this, TQT_SLOT( loadSettings() ) );
* \endcode
*
* @author Matthias Kretz <kretz@kde.org>
@@ -69,26 +69,26 @@ class KUTILS_EXPORT Dispatcher : public QObject
*
* @param instance The KInstance object
* @param recv The object that should receive the signal
- * @param slot The slot to be called: SLOT( slotName() )
+ * @param slot The slot to be called: TQT_SLOT( slotName() )
*/
- void registerInstance( KInstance * instance, QObject * recv, const char * slot );
+ void registerInstance( KInstance * instance, TQObject * recv, const char * slot );
/**
* @return the KConfig object that belongs to the instanceName
*/
- KConfig * configForInstanceName( const QCString & instanceName );
+ KConfig * configForInstanceName( const TQCString & instanceName );
/**
* @return a list of all the instance names that are currently
* registered
*/
- QStrList instanceNames() const;
+ TQStrList instanceNames() const;
//X /**
//X * @return The KInstance object belonging to the instance name you pass
//X * (only works for registered instances of course).
//X */
-//X KInstance * instanceForName( const QCString & instanceName );
+//X KInstance * instanceForName( const TQCString & instanceName );
public slots:
/**
@@ -97,7 +97,7 @@ class KUTILS_EXPORT Dispatcher : public QObject
*
* @param instanceName The value of X-KDE-ParentComponents.
*/
- void reparseConfiguration( const QCString & instanceName );
+ void reparseConfiguration( const TQCString & instanceName );
/**
* When this slot is called the KConfig objects of all the registered
@@ -108,20 +108,20 @@ class KUTILS_EXPORT Dispatcher : public QObject
void syncConfiguration();
private slots:
- void unregisterInstance( QObject * );
+ void unregisterInstance( TQObject * );
private:
- Dispatcher( QObject * parent = 0, const char * name = 0 );
+ Dispatcher( TQObject * parent = 0, const char * name = 0 );
~Dispatcher();
static Dispatcher * m_self;
struct InstanceInfo {
KInstance * instance;
- QSignal * signal;
+ TQSignal * signal;
int count;
};
- QMap<QCString, InstanceInfo> m_instanceInfo;
- QMap<QObject *, QCString> m_instanceName;
+ TQMap<TQCString, InstanceInfo> m_instanceInfo;
+ TQMap<TQObject *, TQCString> m_instanceName;
class DispatcherPrivate;
DispatcherPrivate * d;
diff --git a/kutils/ksettings/pluginpage.cpp b/kutils/ksettings/pluginpage.cpp
index 2456ebf86..99ea904f2 100644
--- a/kutils/ksettings/pluginpage.cpp
+++ b/kutils/ksettings/pluginpage.cpp
@@ -19,7 +19,7 @@
#include "ksettings/pluginpage.h"
#include "kpluginselector.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kdialog.h>
#include "ksettings/dispatcher.h"
@@ -37,24 +37,24 @@ class PluginPage::PluginPagePrivate
KPluginSelector * selwid;
};
- PluginPage::PluginPage( QWidget * parent, const char * name, const QStringList & args )
+ PluginPage::PluginPage( TQWidget * parent, const char * name, const TQStringList & args )
: KCModule( parent, name, args )
, d( new PluginPagePrivate )
{
- ( new QVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
d->selwid = new KPluginSelector( this );
- connect( d->selwid, SIGNAL( changed( bool ) ), this, SIGNAL( changed( bool ) ) );
+ connect( d->selwid, TQT_SIGNAL( changed( bool ) ), this, TQT_SIGNAL( changed( bool ) ) );
}
- PluginPage::PluginPage( KInstance * instance, QWidget * parent, const QStringList & args )
+ PluginPage::PluginPage( KInstance * instance, TQWidget * parent, const TQStringList & args )
: KCModule( instance, parent, args )
, d( new PluginPagePrivate )
{
- ( new QVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
d->selwid = new KPluginSelector( this );
- connect( d->selwid, SIGNAL( changed( bool ) ), this, SIGNAL( changed( bool ) ) );
- connect( d->selwid, SIGNAL( configCommitted( const QCString & ) ),
- Dispatcher::self(), SLOT( reparseConfiguration( const QCString & ) ) );
+ connect( d->selwid, TQT_SIGNAL( changed( bool ) ), this, TQT_SIGNAL( changed( bool ) ) );
+ connect( d->selwid, TQT_SIGNAL( configCommitted( const TQCString & ) ),
+ Dispatcher::self(), TQT_SLOT( reparseConfiguration( const TQCString & ) ) );
}
PluginPage::~PluginPage()
diff --git a/kutils/ksettings/pluginpage.h b/kutils/ksettings/pluginpage.h
index fc6120f78..acd0ace1f 100644
--- a/kutils/ksettings/pluginpage.h
+++ b/kutils/ksettings/pluginpage.h
@@ -38,10 +38,10 @@ namespace KSettings
* PluginPage and add the appropriate plugin infos to the KPluginSelector.
* This is done using the pluginSelector() method:
* \code
- * typedef KGenericFactory<MyAppPluginConfig, QWidget> MyAppPluginConfigFactory;
+ * typedef KGenericFactory<MyAppPluginConfig, TQWidget> MyAppPluginConfigFactory;
* K_EXPORT_COMPONENT_FACTORY( kcm_myapppluginconfig, MyAppPluginConfigFactory( "kcm_myapppluginconfig" ) );
*
- * MyAppPluginConfig( QWidget * parent, const char *, const QStringList & args )
+ * MyAppPluginConfig( TQWidget * parent, const char *, const TQStringList & args )
* : PluginPage( MyAppPluginConfigFactory::instance(), parent, args )
* {
* pluginSelector()->addPlugins( KGlobal::instance()->instanceName(), i18n( "General Plugins" ), "General" );
@@ -78,13 +78,13 @@ class KUTILS_EXPORT PluginPage : public KCModule
* Standart KCModule constructor. Automatically creates the the
* KPluginSelector widget.
*/
- PluginPage( QWidget * parent = 0, const char * name = 0, const QStringList & args = QStringList() );
+ PluginPage( TQWidget * parent = 0, const char * name = 0, const TQStringList & args = TQStringList() );
/**
* Standart KCModule constructor. Automatically creates the the
* KPluginSelector widget.
*/
- PluginPage( KInstance * instance, QWidget * parent = 0, const QStringList & args = QStringList() );
+ PluginPage( KInstance * instance, TQWidget * parent = 0, const TQStringList & args = TQStringList() );
~PluginPage();