summaryrefslogtreecommitdiffstats
path: root/kresources
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 /kresources
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 'kresources')
-rw-r--r--kresources/configdialog.cpp34
-rw-r--r--kresources/configdialog.h6
-rw-r--r--kresources/configpage.cpp86
-rw-r--r--kresources/configpage.h28
-rw-r--r--kresources/configwidget.cpp4
-rw-r--r--kresources/configwidget.h4
-rw-r--r--kresources/factory.cpp30
-rw-r--r--kresources/factory.h24
-rw-r--r--kresources/kcmkresources.cpp10
-rw-r--r--kresources/kcmkresources.h2
-rw-r--r--kresources/manager.h26
-rw-r--r--kresources/manageriface.h12
-rw-r--r--kresources/managerimpl.cpp78
-rw-r--r--kresources/managerimpl.h30
-rw-r--r--kresources/resource.cpp26
-rw-r--r--kresources/resource.h50
-rw-r--r--kresources/selectdialog.cpp24
-rw-r--r--kresources/selectdialog.h14
18 files changed, 244 insertions, 244 deletions
diff --git a/kresources/configdialog.cpp b/kresources/configdialog.cpp
index 3b88ff4b7..bbebc47a3 100644
--- a/kresources/configdialog.cpp
+++ b/kresources/configdialog.cpp
@@ -25,43 +25,43 @@
#include <klineedit.h>
#include <kmessagebox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include "factory.h"
#include "configdialog.h"
using namespace KRES;
-ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
- /*const QString& type,*/ Resource* resource, /*KConfig *config, */const char *name )
+ConfigDialog::ConfigDialog( TQWidget *parent, const TQString& resourceFamily,
+ /*const TQString& type,*/ Resource* resource, /*KConfig *config, */const char *name )
: KDialogBase( parent, name, true, i18n( "Resource Configuration" ),
Ok|Cancel, Ok, false )/*, mConfig( config )*/, mResource( resource )
{
Factory *factory = Factory::self( resourceFamily );
- QFrame *main = makeMainWidget();
+ TQFrame *main = makeMainWidget();
- QVBoxLayout *mainLayout = new QVBoxLayout( main, 0, spacingHint() );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( main, 0, spacingHint() );
- QGroupBox *generalGroupBox = new QGroupBox( 2, Qt::Horizontal, main );
+ TQGroupBox *generalGroupBox = new TQGroupBox( 2, Qt::Horizontal, main );
generalGroupBox->layout()->setSpacing( spacingHint() );
generalGroupBox->setTitle( i18n( "General Settings" ) );
- new QLabel( i18n( "Name:" ), generalGroupBox );
+ new TQLabel( i18n( "Name:" ), generalGroupBox );
mName = new KLineEdit( generalGroupBox );
- mReadOnly = new QCheckBox( i18n( "Read-only" ), generalGroupBox );
+ mReadOnly = new TQCheckBox( i18n( "Read-only" ), generalGroupBox );
mName->setText( mResource->resourceName() );
mReadOnly->setChecked( mResource->readOnly() );
mainLayout->addWidget( generalGroupBox );
- QGroupBox *resourceGroupBox = new QGroupBox( 2, Qt::Horizontal, main );
+ TQGroupBox *resourceGroupBox = new TQGroupBox( 2, Qt::Horizontal, main );
resourceGroupBox->layout()->setSpacing( spacingHint() );
resourceGroupBox->setTitle( i18n( "%1 Resource Settings" )
.arg( factory->typeName( resource->type() ) ) );
@@ -74,12 +74,12 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
mConfigWidget->setInEditMode( false );
mConfigWidget->loadSettings( mResource );
mConfigWidget->show();
- connect( mConfigWidget, SIGNAL( setReadOnly( bool ) ),
- SLOT( setReadOnly( bool ) ) );
+ connect( mConfigWidget, TQT_SIGNAL( setReadOnly( bool ) ),
+ TQT_SLOT( setReadOnly( bool ) ) );
}
- connect( mName, SIGNAL( textChanged(const QString &)),
- SLOT( slotNameChanged(const QString &)));
+ connect( mName, TQT_SIGNAL( textChanged(const TQString &)),
+ TQT_SLOT( slotNameChanged(const TQString &)));
slotNameChanged( mName->text() );
setMinimumSize( sizeHint() );
@@ -91,7 +91,7 @@ void ConfigDialog::setInEditMode( bool value )
mConfigWidget->setInEditMode( value );
}
-void ConfigDialog::slotNameChanged( const QString &text)
+void ConfigDialog::slotNameChanged( const TQString &text)
{
enableButtonOK( !text.isEmpty() );
}
diff --git a/kresources/configdialog.h b/kresources/configdialog.h
index 6fa751687..96545d7a4 100644
--- a/kresources/configdialog.h
+++ b/kresources/configdialog.h
@@ -37,7 +37,7 @@ class KRESOURCES_EXPORT ConfigDialog : public KDialogBase
Q_OBJECT
public:
// Resource=0: create new resource
- ConfigDialog( QWidget *parent, const QString& resourceFamily,
+ ConfigDialog( TQWidget *parent, const TQString& resourceFamily,
Resource* resource, const char *name = 0);
void setInEditMode( bool value );
@@ -45,14 +45,14 @@ class KRESOURCES_EXPORT ConfigDialog : public KDialogBase
protected slots:
void accept();
void setReadOnly( bool value );
- void slotNameChanged( const QString &text);
+ void slotNameChanged( const TQString &text);
private:
ConfigWidget *mConfigWidget;
Resource* mResource;
KLineEdit *mName;
- QCheckBox *mReadOnly;
+ TQCheckBox *mReadOnly;
};
}
diff --git a/kresources/configpage.cpp b/kresources/configpage.cpp
index e133d5b99..5e5e61198 100644
--- a/kresources/configpage.cpp
+++ b/kresources/configpage.cpp
@@ -21,9 +21,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kcombobox.h>
@@ -61,8 +61,8 @@ ResourcePageInfo::~ResourcePageInfo() {
class ConfigViewItem : public QCheckListItem
{
public:
- ConfigViewItem( QListView *parent, Resource* resource ) :
- QCheckListItem( parent, resource->resourceName(), CheckBox ),
+ ConfigViewItem( TQListView *parent, Resource* resource ) :
+ TQCheckListItem( parent, resource->resourceName(), CheckBox ),
mResource( resource ),
mIsStandard( false )
{
@@ -72,7 +72,7 @@ class ConfigViewItem : public QCheckListItem
void setStandard( bool value )
{
- setText( 2, ( value ? i18n( "Yes" ) : QString::null ) );
+ setText( 2, ( value ? i18n( "Yes" ) : TQString::null ) );
mIsStandard = value;
}
@@ -86,7 +86,7 @@ class ConfigViewItem : public QCheckListItem
setOn( mResource->isActive() );
setText( 0, mResource->resourceName() );
setText( 1, mResource->type() );
- setText( 2, mIsStandard ? i18n( "Yes" ) : QString::null );
+ setText( 2, mIsStandard ? i18n( "Yes" ) : TQString::null );
}
private:
@@ -95,20 +95,20 @@ class ConfigViewItem : public QCheckListItem
bool mIsStandard;
};
-ConfigPage::ConfigPage( QWidget *parent, const char *name )
- : QWidget( parent, name ),
+ConfigPage::ConfigPage( TQWidget *parent, const char *name )
+ : TQWidget( parent, name ),
mCurrentManager( 0 ),
mCurrentConfig( 0 )
{
setCaption( i18n( "Resource Configuration" ) );
- QVBoxLayout *mainLayout = new QVBoxLayout( this );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this );
- QGroupBox *groupBox = new QGroupBox( i18n( "Resources" ), this );
+ TQGroupBox *groupBox = new TQGroupBox( i18n( "Resources" ), this );
groupBox->setColumnLayout(0, Qt::Vertical );
groupBox->layout()->setSpacing( 6 );
groupBox->layout()->setMargin( 11 );
- QGridLayout *groupBoxLayout = new QGridLayout( groupBox->layout(), 2, 2 );
+ TQGridLayout *groupBoxLayout = new TQGridLayout( groupBox->layout(), 2, 2 );
mFamilyCombo = new KComboBox( false, groupBox );
groupBoxLayout->addMultiCellWidget( mFamilyCombo, 0, 0, 0, 1 );
@@ -121,14 +121,14 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name )
mListView->addColumn( i18n( "Standard" ) );
groupBoxLayout->addWidget( mListView, 1, 0 );
- connect( mListView, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int ) ), this, SLOT( slotEdit() ) );
+ connect( mListView, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int ) ), this, TQT_SLOT( slotEdit() ) );
KButtonBox *buttonBox = new KButtonBox( groupBox, Vertical );
- mAddButton = buttonBox->addButton( i18n( "&Add..." ), this, SLOT(slotAdd()) );
- mRemoveButton = buttonBox->addButton( i18n( "&Remove" ), this, SLOT(slotRemove()) );
+ mAddButton = buttonBox->addButton( i18n( "&Add..." ), this, TQT_SLOT(slotAdd()) );
+ mRemoveButton = buttonBox->addButton( i18n( "&Remove" ), this, TQT_SLOT(slotRemove()) );
mRemoveButton->setEnabled( false );
- mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT(slotEdit()) );
+ mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, TQT_SLOT(slotEdit()) );
mEditButton->setEnabled( false );
- mStandardButton = buttonBox->addButton( i18n( "&Use as Standard" ), this, SLOT(slotStandard()) );
+ mStandardButton = buttonBox->addButton( i18n( "&Use as Standard" ), this, TQT_SLOT(slotStandard()) );
mStandardButton->setEnabled( false );
buttonBox->layout();
@@ -136,12 +136,12 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name )
mainLayout->addWidget( groupBox );
- connect( mFamilyCombo, SIGNAL( activated( int ) ),
- SLOT( slotFamilyChanged( int ) ) );
- connect( mListView, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ) );
- connect( mListView, SIGNAL( clicked( QListViewItem * ) ),
- SLOT( slotItemClicked( QListViewItem * ) ) );
+ connect( mFamilyCombo, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotFamilyChanged( int ) ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ) );
+ connect( mListView, TQT_SIGNAL( clicked( TQListViewItem * ) ),
+ TQT_SLOT( slotItemClicked( TQListViewItem * ) ) );
mLastItem = 0;
@@ -153,7 +153,7 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name )
ConfigPage::~ConfigPage()
{
- QValueList<KSharedPtr<ResourcePageInfo> >::Iterator it;
+ TQValueList<KSharedPtr<ResourcePageInfo> >::Iterator it;
for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) {
(*it)->mManager->removeObserver( this );
}
@@ -170,15 +170,15 @@ void ConfigPage::load()
mListView->clear();
mFamilyMap.clear();
mInfoMap.clear();
- QStringList familyDisplayNames;
+ TQStringList familyDisplayNames;
// KDE-3.3 compatibility code: get families from the plugins
- QStringList compatFamilyNames;
+ TQStringList compatFamilyNames;
const KTrader::OfferList plugins = KTrader::self()->query( "KResources/Plugin" );
KTrader::OfferList::ConstIterator it = plugins.begin();
KTrader::OfferList::ConstIterator end = plugins.end();
for ( ; it != end; ++it ) {
- const QString family = (*it)->property( "X-KDE-ResourceFamily" ).toString();
+ const TQString family = (*it)->property( "X-KDE-ResourceFamily" ).toString();
if ( compatFamilyNames.find( family ) == compatFamilyNames.end() )
compatFamilyNames.append( family );
}
@@ -186,9 +186,9 @@ void ConfigPage::load()
const KTrader::OfferList managers = KTrader::self()->query( "KResources/Manager" );
KTrader::OfferList::ConstIterator m_it;
for( m_it = managers.begin(); m_it != managers.end(); ++m_it ) {
- QString displayName = (*m_it)->property( "Name" ).toString();
+ TQString displayName = (*m_it)->property( "Name" ).toString();
familyDisplayNames.append( displayName );
- QString family = (*m_it)->property( "X-KDE-ResourceFamily" ).toString();
+ TQString family = (*m_it)->property( "X-KDE-ResourceFamily" ).toString();
if ( !family.isEmpty() ) {
compatFamilyNames.remove( family );
mFamilyMap.append( family );
@@ -197,7 +197,7 @@ void ConfigPage::load()
}
// Rest of the kde-3.3 compat code
- QStringList::ConstIterator cfit = compatFamilyNames.begin();
+ TQStringList::ConstIterator cfit = compatFamilyNames.begin();
for ( ; cfit != compatFamilyNames.end(); ++cfit ) {
mFamilyMap.append( *cfit );
familyDisplayNames.append( *cfit );
@@ -215,7 +215,7 @@ void ConfigPage::load()
emit changed( false );
}
-void ConfigPage::loadManager( const QString& family )
+void ConfigPage::loadManager( const TQString& family )
{
mCurrentManager = new Manager<Resource>( family );
if ( mCurrentManager ) {
@@ -234,7 +234,7 @@ void ConfigPage::save()
{
saveResourceSettings();
- QValueList<KSharedPtr<ResourcePageInfo> >::Iterator it;
+ TQValueList<KSharedPtr<ResourcePageInfo> >::Iterator it;
for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it )
(*it)->mManager->writeConfig( (*it)->mConfig );
@@ -291,16 +291,16 @@ void ConfigPage::slotAdd()
if ( !mCurrentManager )
return;
- QStringList types = mCurrentManager->resourceTypeNames();
- QStringList descs = mCurrentManager->resourceTypeDescriptions();
+ TQStringList types = mCurrentManager->resourceTypeNames();
+ TQStringList descs = mCurrentManager->resourceTypeDescriptions();
bool ok = false;
- QString desc = KInputDialog::getItem( i18n( "Resource Configuration" ),
+ TQString desc = KInputDialog::getItem( i18n( "Resource Configuration" ),
i18n( "Please select type of the new resource:" ), descs,
0, false, &ok, this );
if ( !ok )
return;
- QString type = types[ descs.findIndex( desc ) ];
+ TQString type = types[ descs.findIndex( desc ) ];
// Create new resource
Resource *resource = mCurrentManager->createResource( type );
@@ -325,7 +325,7 @@ void ConfigPage::slotAdd()
// as standard resource
if ( !resource->readOnly() ) {
bool onlyReadOnly = true;
- QListViewItem *it = mListView->firstChild();
+ TQListViewItem *it = mListView->firstChild();
while ( it != 0 ) {
ConfigViewItem *confIt = static_cast<ConfigViewItem*>( it );
if ( !confIt->readOnly() && confIt != item )
@@ -350,7 +350,7 @@ void ConfigPage::slotRemove()
if ( !mCurrentManager )
return;
- QListViewItem *item = mListView->currentItem();
+ TQListViewItem *item = mListView->currentItem();
ConfigViewItem *confItem = static_cast<ConfigViewItem*>( item );
if ( !confItem )
@@ -377,7 +377,7 @@ void ConfigPage::slotEdit()
if ( !mCurrentManager )
return;
- QListViewItem *item = mListView->currentItem();
+ TQListViewItem *item = mListView->currentItem();
ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item );
if ( !configItem )
return;
@@ -419,7 +419,7 @@ void ConfigPage::slotStandard()
return;
}
- QListViewItem *it = mListView->firstChild();
+ TQListViewItem *it = mListView->firstChild();
while ( it != 0 ) {
ConfigViewItem *configItem = static_cast<ConfigViewItem*>( it );
if ( configItem->standard() )
@@ -481,7 +481,7 @@ void ConfigPage::resourceDeleted( Resource *resource )
ConfigViewItem *ConfigPage::findItem( Resource *resource )
{
- QListViewItem *i;
+ TQListViewItem *i;
for( i = mListView->firstChild(); i; i = i->nextSibling() ) {
ConfigViewItem *item = static_cast<ConfigViewItem *>( i );
if ( item->resource() == resource ) return item;
@@ -489,7 +489,7 @@ ConfigViewItem *ConfigPage::findItem( Resource *resource )
return 0;
}
-void ConfigPage::slotItemClicked( QListViewItem *item )
+void ConfigPage::slotItemClicked( TQListViewItem *item )
{
ConfigViewItem *configItem = static_cast<ConfigViewItem *>( item );
if ( !configItem ) return;
@@ -508,7 +508,7 @@ void ConfigPage::slotItemClicked( QListViewItem *item )
void ConfigPage::saveResourceSettings()
{
if ( mCurrentManager ) {
- QListViewItem *item = mListView->firstChild();
+ TQListViewItem *item = mListView->firstChild();
while ( item ) {
ConfigViewItem *configItem = static_cast<ConfigViewItem *>( item );
diff --git a/kresources/configpage.h b/kresources/configpage.h
index 4a4231f07..eb24d84be 100644
--- a/kresources/configpage.h
+++ b/kresources/configpage.h
@@ -24,8 +24,8 @@
#define KRESOURCES_CONFIGPAGE_H
#include <ksharedptr.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
#include "manager.h"
@@ -49,12 +49,12 @@ class KRESOURCES_EXPORT ResourcePageInfo : public KShared
class Resource;
class ConfigViewItem;
-class KRESOURCES_EXPORT ConfigPage : public QWidget, public ManagerObserver<Resource>
+class KRESOURCES_EXPORT ConfigPage : public TQWidget, public ManagerObserver<Resource>
{
Q_OBJECT
public:
- ConfigPage( QWidget *parent = 0, const char *name = 0 );
+ ConfigPage( TQWidget *parent = 0, const char *name = 0 );
virtual ~ConfigPage();
void load();
@@ -79,30 +79,30 @@ class KRESOURCES_EXPORT ConfigPage : public QWidget, public ManagerObserver<Reso
ConfigViewItem *findItem( Resource *resource );
protected slots:
- void slotItemClicked( QListViewItem * );
+ void slotItemClicked( TQListViewItem * );
signals:
void changed( bool );
private:
- void loadManager( const QString& family );
+ void loadManager( const TQString& family );
void saveResourceSettings();
Manager<Resource>* mCurrentManager;
KConfig* mCurrentConfig;
KConfig* mConfig;
- QString mFamily;
- QStringList mFamilyMap;
- QValueList<KSharedPtr<ResourcePageInfo> > mInfoMap;
+ TQString mFamily;
+ TQStringList mFamilyMap;
+ TQValueList<KSharedPtr<ResourcePageInfo> > mInfoMap;
KComboBox* mFamilyCombo;
KListView* mListView;
- QPushButton* mAddButton;
- QPushButton* mRemoveButton;
- QPushButton* mEditButton;
- QPushButton* mStandardButton;
+ TQPushButton* mAddButton;
+ TQPushButton* mRemoveButton;
+ TQPushButton* mEditButton;
+ TQPushButton* mStandardButton;
- QListViewItem* mLastItem;
+ TQListViewItem* mLastItem;
};
}
diff --git a/kresources/configwidget.cpp b/kresources/configwidget.cpp
index 20197d81a..5d6f0f6b1 100644
--- a/kresources/configwidget.cpp
+++ b/kresources/configwidget.cpp
@@ -25,8 +25,8 @@
using namespace KRES;
-ConfigWidget::ConfigWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+ConfigWidget::ConfigWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
}
diff --git a/kresources/configwidget.h b/kresources/configwidget.h
index ae763978a..47917edd3 100644
--- a/kresources/configwidget.h
+++ b/kresources/configwidget.h
@@ -26,7 +26,7 @@
#include <kconfig.h>
-#include <qwidget.h>
+#include <tqwidget.h>
namespace KRES {
@@ -34,7 +34,7 @@ class KRESOURCES_EXPORT ConfigWidget : public QWidget
{
Q_OBJECT
public:
- ConfigWidget( QWidget *parent = 0, const char *name = 0 );
+ ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
/**
Sets the widget to 'edit' mode. Reimplement this method if you are
diff --git a/kresources/factory.cpp b/kresources/factory.cpp
index eadd7a2c2..462d6be9c 100644
--- a/kresources/factory.cpp
+++ b/kresources/factory.cpp
@@ -27,23 +27,23 @@
#include <kstandarddirs.h>
#include <kstaticdeleter.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "resource.h"
#include "factory.h"
using namespace KRES;
-QDict<Factory> *Factory::mSelves = 0;
-static KStaticDeleter< QDict<Factory> > staticDeleter;
+TQDict<Factory> *Factory::mSelves = 0;
+static KStaticDeleter< TQDict<Factory> > staticDeleter;
-Factory *Factory::self( const QString& resourceFamily )
+Factory *Factory::self( const TQString& resourceFamily )
{
kdDebug(5650) << "Factory::self()" << endl;
Factory *factory = 0;
if ( !mSelves )
- staticDeleter.setObject( mSelves, new QDict<Factory> );
+ staticDeleter.setObject( mSelves, new TQDict<Factory> );
factory = mSelves->find( resourceFamily );
@@ -55,14 +55,14 @@ Factory *Factory::self( const QString& resourceFamily )
return factory;
}
-Factory::Factory( const QString& resourceFamily ) :
+Factory::Factory( const TQString& resourceFamily ) :
mResourceFamily( resourceFamily )
{
- KTrader::OfferList plugins = KTrader::self()->query( "KResources/Plugin", QString( "[X-KDE-ResourceFamily] == '%1'" )
+ KTrader::OfferList plugins = KTrader::self()->query( "KResources/Plugin", TQString( "[X-KDE-ResourceFamily] == '%1'" )
.arg( resourceFamily ) );
KTrader::OfferList::ConstIterator it;
for ( it = plugins.begin(); it != plugins.end(); ++it ) {
- QVariant type = (*it)->property( "X-KDE-ResourceType" );
+ TQVariant type = (*it)->property( "X-KDE-ResourceType" );
if ( !type.toString().isEmpty() )
mTypeMap.insert( type.toString(), *it );
}
@@ -72,12 +72,12 @@ Factory::~Factory()
{
}
-QStringList Factory::typeNames() const
+TQStringList Factory::typeNames() const
{
return mTypeMap.keys();
}
-ConfigWidget *Factory::configWidget( const QString& type, QWidget *parent )
+ConfigWidget *Factory::configWidget( const TQString& type, TQWidget *parent )
{
if ( type.isEmpty() || !mTypeMap.contains( type ) )
return 0;
@@ -107,25 +107,25 @@ ConfigWidget *Factory::configWidget( const QString& type, QWidget *parent )
return wdg;
}
-QString Factory::typeName( const QString &type ) const
+TQString Factory::typeName( const TQString &type ) const
{
if ( type.isEmpty() || !mTypeMap.contains( type ) )
- return QString();
+ return TQString();
KService::Ptr ptr = mTypeMap[ type ];
return ptr->name();
}
-QString Factory::typeDescription( const QString &type ) const
+TQString Factory::typeDescription( const TQString &type ) const
{
if ( type.isEmpty() || !mTypeMap.contains( type ) )
- return QString();
+ return TQString();
KService::Ptr ptr = mTypeMap[ type ];
return ptr->comment();
}
-Resource *Factory::resource( const QString& type, const KConfig *config )
+Resource *Factory::resource( const TQString& type, const KConfig *config )
{
kdDebug(5650) << "Factory::resource( " << type << ", config )" << endl;
diff --git a/kresources/factory.h b/kresources/factory.h
index d7a1e069e..925ff2e82 100644
--- a/kresources/factory.h
+++ b/kresources/factory.h
@@ -24,8 +24,8 @@
#ifndef KRESOURCES_FACTORY_H
#define KRESOURCES_FACTORY_H
-#include <qdict.h>
-#include <qstring.h>
+#include <tqdict.h>
+#include <tqstring.h>
#include <kconfig.h>
#include <klibloader.h>
@@ -66,7 +66,7 @@ class KRESOURCES_EXPORT Factory
/**
* Returns the global resource factory.
*/
- static Factory *self( const QString& resourceFamily );
+ static Factory *self( const TQString& resourceFamily );
~Factory();
@@ -77,7 +77,7 @@ class KRESOURCES_EXPORT Factory
* @param type The type of the resource, returned by typeNames()
* @param parent The parent widget
*/
- ConfigWidget *configWidget( const QString& type, QWidget *parent = 0 );
+ ConfigWidget *configWidget( const TQString& type, TQWidget *parent = 0 );
/**
* Returns a pointer to a resource object or a null pointer
@@ -87,31 +87,31 @@ class KRESOURCES_EXPORT Factory
* @param config The config object where the resource get it settings from,
* or 0 if a resource with default values should be created.
*/
- Resource *resource( const QString& type, const KConfig *config );
+ Resource *resource( const TQString& type, const KConfig *config );
/**
* Returns a list of all available resource types.
*/
- QStringList typeNames() const;
+ TQStringList typeNames() const;
/**
* Returns the name for a special type.
*/
- QString typeName( const QString &type ) const;
+ TQString typeName( const TQString &type ) const;
/**
* Returns the description for a special type.
*/
- QString typeDescription( const QString &type ) const;
+ TQString typeDescription( const TQString &type ) const;
protected:
- Factory( const QString& resourceFamily );
+ Factory( const TQString& resourceFamily );
private:
- static QDict<Factory> *mSelves;
+ static TQDict<Factory> *mSelves;
- QString mResourceFamily;
- QMap<QString, KService::Ptr> mTypeMap;
+ TQString mResourceFamily;
+ TQMap<TQString, KService::Ptr> mTypeMap;
};
}
diff --git a/kresources/kcmkresources.cpp b/kresources/kcmkresources.cpp
index be7b22b5a..41fdb91fe 100644
--- a/kresources/kcmkresources.cpp
+++ b/kresources/kcmkresources.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kaboutdata.h>
#include <kgenericfactory.h>
@@ -29,16 +29,16 @@
#include "kcmkresources.h"
-typedef KGenericFactory<KCMKResources, QWidget> ResourcesFactory;
+typedef KGenericFactory<KCMKResources, TQWidget> ResourcesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kresources, ResourcesFactory( "kcmkresources" ) )
-KCMKResources::KCMKResources( QWidget *parent, const char *name, const QStringList& )
+KCMKResources::KCMKResources( TQWidget *parent, const char *name, const TQStringList& )
: KCModule( ResourcesFactory::instance(), parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
mConfigPage = new KRES::ConfigPage( this );
layout->addWidget( mConfigPage );
- connect( mConfigPage, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) );
+ connect( mConfigPage, TQT_SIGNAL( changed( bool ) ), TQT_SIGNAL( changed( bool ) ) );
setButtons( Help | Apply );
KAboutData *about =
new KAboutData( I18N_NOOP( "kcmkresources" ),
diff --git a/kresources/kcmkresources.h b/kresources/kcmkresources.h
index 2f090bdec..97a3183e0 100644
--- a/kresources/kcmkresources.h
+++ b/kresources/kcmkresources.h
@@ -29,7 +29,7 @@ class KRESOURCES_EXPORT KCMKResources : public KCModule
Q_OBJECT
public:
- KCMKResources( QWidget *parent, const char *name, const QStringList& );
+ KCMKResources( TQWidget *parent, const char *name, const TQStringList& );
void load();
void save();
diff --git a/kresources/manager.h b/kresources/manager.h
index b129a7317..ab1562716 100644
--- a/kresources/manager.h
+++ b/kresources/manager.h
@@ -24,8 +24,8 @@
#ifndef KRESOURCES_MANAGER_H
#define KRESOURCES_MANAGER_H
-#include <qdict.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kresources/factory.h>
@@ -209,7 +209,7 @@ class Manager : private ManagerNotifier
Create manager for given resource family. The family argument is used as
identifier for loading and saving resource configurations.
*/
- Manager( const QString &family )
+ Manager( const TQString &family )
{
mFactory = Factory::self( family );
// The managerimpl will use the same Factory object as the manager
@@ -295,7 +295,7 @@ class Manager : private ManagerNotifier
Returns a list of the names of the resources managed by the
Manager for this family.
*/
- QStringList resourceNames() const
+ TQStringList resourceNames() const
{
return mImpl->resourceNames();
}
@@ -310,7 +310,7 @@ class Manager : private ManagerNotifier
@param type The type of the resource, one of those returned
by resourceTypeNames()
*/
- T *createResource( const QString& type )
+ T *createResource( const TQString& type )
{
return dynamic_cast<T *>( mFactory->resource( type, 0 ) );
}
@@ -318,7 +318,7 @@ class Manager : private ManagerNotifier
/**
Returns a list of the names of all available resource types.
*/
- QStringList resourceTypeNames() const
+ TQStringList resourceTypeNames() const
{
return mFactory->typeNames();
}
@@ -326,16 +326,16 @@ class Manager : private ManagerNotifier
/**
Return list of descriptions of all available resource types.
*/
- QStringList resourceTypeDescriptions() const
+ TQStringList resourceTypeDescriptions() const
{
- QStringList typeDescs;
- QStringList types = mFactory->typeNames();
+ TQStringList typeDescs;
+ TQStringList types = mFactory->typeNames();
- for ( QStringList::ConstIterator it = types.begin(); it != types.end();
+ for ( TQStringList::ConstIterator it = types.begin(); it != types.end();
++it ) {
- QString desc = mFactory->typeName( *it );
+ TQString desc = mFactory->typeName( *it );
if ( !mFactory->typeDescription( *it ).isEmpty() )
- desc += QString::fromLatin1(" (") + mFactory->typeDescription( *it ) + QString::fromLatin1(")");
+ desc += TQString::fromLatin1(" (") + mFactory->typeDescription( *it ) + TQString::fromLatin1(")");
typeDescs.append( desc );
}
@@ -414,7 +414,7 @@ class Manager : private ManagerNotifier
private:
ManagerImpl *mImpl;
Factory *mFactory;
- QPtrList<ManagerObserver<T> > mObservers;
+ TQPtrList<ManagerObserver<T> > mObservers;
};
}
diff --git a/kresources/manageriface.h b/kresources/manageriface.h
index 7644d7bc2..8f82ea4b7 100644
--- a/kresources/manageriface.h
+++ b/kresources/manageriface.h
@@ -31,14 +31,14 @@ class KRESOURCES_EXPORT ManagerIface : virtual public DCOPObject
K_DCOP
k_dcop_signals:
- void signalKResourceAdded( QString managerId, QString resourceId );
- void signalKResourceModified( QString managerId, QString resourceId );
- void signalKResourceDeleted( QString managerId, QString resourceId );
+ void signalKResourceAdded( TQString managerId, TQString resourceId );
+ void signalKResourceModified( TQString managerId, TQString resourceId );
+ void signalKResourceDeleted( TQString managerId, TQString resourceId );
k_dcop:
- virtual ASYNC dcopKResourceAdded( QString managerId, QString resourceId ) = 0;
- virtual ASYNC dcopKResourceModified( QString managerId, QString resourceId ) = 0;
- virtual ASYNC dcopKResourceDeleted( QString managerId, QString resourceId ) = 0;
+ virtual ASYNC dcopKResourceAdded( TQString managerId, TQString resourceId ) = 0;
+ virtual ASYNC dcopKResourceModified( TQString managerId, TQString resourceId ) = 0;
+ virtual ASYNC dcopKResourceDeleted( TQString managerId, TQString resourceId ) = 0;
};
}
diff --git a/kresources/managerimpl.cpp b/kresources/managerimpl.cpp
index 01380e03b..b5d9ec32f 100644
--- a/kresources/managerimpl.cpp
+++ b/kresources/managerimpl.cpp
@@ -37,7 +37,7 @@
using namespace KRES;
-ManagerImpl::ManagerImpl( ManagerNotifier *notifier, const QString &family )
+ManagerImpl::ManagerImpl( ManagerNotifier *notifier, const TQString &family )
: DCOPObject( "ManagerIface_" + family.utf8() ),
mNotifier( notifier ),
mFamily( family ), mConfig( 0 ), mStdConfig( 0 ), mStandard( 0 ),
@@ -55,18 +55,18 @@ ManagerImpl::ManagerImpl( ManagerNotifier *notifier, const QString &family )
kdDebug(5650) << "Connecting DCOP signals..." << endl;
if ( !connectDCOPSignal( 0, "ManagerIface_" + family.utf8(),
- "signalKResourceAdded( QString, QString )",
- "dcopKResourceAdded( QString, QString )", false ) )
+ "signalKResourceAdded( TQString, TQString )",
+ "dcopKResourceAdded( TQString, TQString )", false ) )
kdWarning(5650) << "Could not connect ResourceAdded signal!" << endl;
if ( !connectDCOPSignal( 0, "ManagerIface_" + family.utf8(),
- "signalKResourceModified( QString, QString )",
- "dcopKResourceModified( QString, QString )", false ) )
+ "signalKResourceModified( TQString, TQString )",
+ "dcopKResourceModified( TQString, TQString )", false ) )
kdWarning(5650) << "Could not connect ResourceModified signal!" << endl;
if ( !connectDCOPSignal( 0, "ManagerIface_" + family.utf8(),
- "signalKResourceDeleted( QString, QString )",
- "dcopKResourceDeleted( QString, QString )", false ) )
+ "signalKResourceDeleted( TQString, TQString )",
+ "dcopKResourceDeleted( TQString, TQString )", false ) )
kdWarning(5650) << "Could not connect ResourceDeleted signal!" << endl;
kapp->dcopClient()->setNotifications( true );
@@ -87,7 +87,7 @@ ManagerImpl::~ManagerImpl()
void ManagerImpl::createStandardConfig()
{
if ( !mStdConfig ) {
- QString file = defaultConfigFile( mFamily );
+ TQString file = defaultConfigFile( mFamily );
mStdConfig = new KConfig( file );
}
@@ -111,12 +111,12 @@ void ManagerImpl::readConfig( KConfig *cfg )
mConfig->setGroup( "General" );
- QStringList keys = mConfig->readListEntry( "ResourceKeys" );
+ TQStringList keys = mConfig->readListEntry( "ResourceKeys" );
keys += mConfig->readListEntry( "PassiveResourceKeys" );
- QString standardKey = mConfig->readEntry( "Standard" );
+ TQString standardKey = mConfig->readEntry( "Standard" );
- for ( QStringList::Iterator it = keys.begin(); it != keys.end(); ++it ) {
+ for ( TQStringList::Iterator it = keys.begin(); it != keys.end(); ++it ) {
readResourceConfig( *it, false );
}
@@ -133,15 +133,15 @@ void ManagerImpl::writeConfig( KConfig *cfg )
mConfig = cfg;
}
- QStringList activeKeys;
- QStringList passiveKeys;
+ TQStringList activeKeys;
+ TQStringList passiveKeys;
// First write all keys, collect active and passive keys on the way
Resource::List::Iterator it;
for ( it = mResources.begin(); it != mResources.end(); ++it ) {
writeResourceConfig( *it, false );
- QString key = (*it)->identifier();
+ TQString key = (*it)->identifier();
if( (*it)->isActive() )
activeKeys.append( key );
else
@@ -219,7 +219,7 @@ void ManagerImpl::setStandardResource( Resource *resource )
// DCOP asynchronous functions
-void ManagerImpl::dcopKResourceAdded( QString managerId, QString resourceId )
+void ManagerImpl::dcopKResourceAdded( TQString managerId, TQString resourceId )
{
if ( managerId == mId ) {
kdDebug(5650) << "Ignore DCOP notification to myself" << endl;
@@ -243,7 +243,7 @@ void ManagerImpl::dcopKResourceAdded( QString managerId, QString resourceId )
<< resourceId << endl;
}
-void ManagerImpl::dcopKResourceModified( QString managerId, QString resourceId )
+void ManagerImpl::dcopKResourceModified( TQString managerId, TQString resourceId )
{
if ( managerId == mId ) {
kdDebug(5650) << "Ignore DCOP notification to myself" << endl;
@@ -259,7 +259,7 @@ void ManagerImpl::dcopKResourceModified( QString managerId, QString resourceId )
<< resourceId << endl;
}
-void ManagerImpl::dcopKResourceDeleted( QString managerId, QString resourceId )
+void ManagerImpl::dcopKResourceDeleted( TQString managerId, TQString resourceId )
{
if ( managerId == mId ) {
kdDebug(5650) << "Ignore DCOP notification to myself" << endl;
@@ -281,9 +281,9 @@ void ManagerImpl::dcopKResourceDeleted( QString managerId, QString resourceId )
<< resourceId << endl;
}
-QStringList ManagerImpl::resourceNames()
+TQStringList ManagerImpl::resourceNames()
{
- QStringList result;
+ TQStringList result;
Resource::List::ConstIterator it;
for ( it = mResources.begin(); it != mResources.end(); ++it ) {
@@ -297,9 +297,9 @@ Resource::List *ManagerImpl::resourceList()
return &mResources;
}
-QPtrList<Resource> ManagerImpl::resources()
+TQPtrList<Resource> ManagerImpl::resources()
{
- QPtrList<Resource> result;
+ TQPtrList<Resource> result;
Resource::List::ConstIterator it;
for ( it = mResources.begin(); it != mResources.end(); ++it ) {
@@ -308,9 +308,9 @@ QPtrList<Resource> ManagerImpl::resources()
return result;
}
-QPtrList<Resource> ManagerImpl::resources( bool active )
+TQPtrList<Resource> ManagerImpl::resources( bool active )
{
- QPtrList<Resource> result;
+ TQPtrList<Resource> result;
Resource::List::ConstIterator it;
for ( it = mResources.begin(); it != mResources.end(); ++it ) {
@@ -321,7 +321,7 @@ QPtrList<Resource> ManagerImpl::resources( bool active )
return result;
}
-Resource *ManagerImpl::readResourceConfig( const QString &identifier,
+Resource *ManagerImpl::readResourceConfig( const TQString &identifier,
bool checkActive )
{
kdDebug(5650) << "ManagerImpl::readResourceConfig() " << identifier << endl;
@@ -333,8 +333,8 @@ Resource *ManagerImpl::readResourceConfig( const QString &identifier,
mConfig->setGroup( "Resource_" + identifier );
- QString type = mConfig->readEntry( "ResourceType" );
- QString name = mConfig->readEntry( "ResourceName" );
+ TQString type = mConfig->readEntry( "ResourceType" );
+ TQString name = mConfig->readEntry( "ResourceName" );
Resource *resource = mFactory->resource( type, mConfig );
if ( !resource ) {
kdDebug(5650) << "Failed to create resource with id " << identifier << endl;
@@ -346,13 +346,13 @@ Resource *ManagerImpl::readResourceConfig( const QString &identifier,
mConfig->setGroup( "General" );
- QString standardKey = mConfig->readEntry( "Standard" );
+ TQString standardKey = mConfig->readEntry( "Standard" );
if ( standardKey == identifier ) {
mStandard = resource;
}
if ( checkActive ) {
- QStringList activeKeys = mConfig->readListEntry( "ResourceKeys" );
+ TQStringList activeKeys = mConfig->readListEntry( "ResourceKeys" );
resource->setActive( activeKeys.contains( identifier ) );
}
mResources.append( resource );
@@ -362,7 +362,7 @@ Resource *ManagerImpl::readResourceConfig( const QString &identifier,
void ManagerImpl::writeResourceConfig( Resource *resource, bool checkActive )
{
- QString key = resource->identifier();
+ TQString key = resource->identifier();
kdDebug(5650) << "Saving resource " << key << endl;
@@ -372,7 +372,7 @@ void ManagerImpl::writeResourceConfig( Resource *resource, bool checkActive )
resource->writeConfig( mConfig );
mConfig->setGroup( "General" );
- QString standardKey = mConfig->readEntry( "Standard" );
+ TQString standardKey = mConfig->readEntry( "Standard" );
if ( resource == mStandard && standardKey != key )
mConfig->writeEntry( "Standard", resource->identifier() );
@@ -380,8 +380,8 @@ void ManagerImpl::writeResourceConfig( Resource *resource, bool checkActive )
mConfig->writeEntry( "Standard", "" );
if ( checkActive ) {
- QStringList activeKeys = mConfig->readListEntry( "ResourceKeys" );
- QStringList passiveKeys = mConfig->readListEntry( "PassiveResourceKeys" );
+ TQStringList activeKeys = mConfig->readListEntry( "ResourceKeys" );
+ TQStringList passiveKeys = mConfig->readListEntry( "PassiveResourceKeys" );
if ( resource->isActive() ) {
if ( passiveKeys.contains( key ) ) { // remove it from passive list
passiveKeys.remove( key );
@@ -408,22 +408,22 @@ void ManagerImpl::writeResourceConfig( Resource *resource, bool checkActive )
void ManagerImpl::removeResource( Resource *resource )
{
- QString key = resource->identifier();
+ TQString key = resource->identifier();
if ( !mConfig ) createStandardConfig();
mConfig->setGroup( "General" );
- QStringList activeKeys = mConfig->readListEntry( "ResourceKeys" );
+ TQStringList activeKeys = mConfig->readListEntry( "ResourceKeys" );
if ( activeKeys.contains( key ) ) {
activeKeys.remove( key );
mConfig->writeEntry( "ResourceKeys", activeKeys );
} else {
- QStringList passiveKeys = mConfig->readListEntry( "PassiveResourceKeys" );
+ TQStringList passiveKeys = mConfig->readListEntry( "PassiveResourceKeys" );
passiveKeys.remove( key );
mConfig->writeEntry( "PassiveResourceKeys", passiveKeys );
}
- QString standardKey = mConfig->readEntry( "Standard" );
+ TQString standardKey = mConfig->readEntry( "Standard" );
if ( standardKey == key ) {
mConfig->writeEntry( "Standard", "" );
}
@@ -432,7 +432,7 @@ void ManagerImpl::removeResource( Resource *resource )
mConfig->sync();
}
-Resource *ManagerImpl::getResource( const QString &identifier )
+Resource *ManagerImpl::getResource( const TQString &identifier )
{
Resource::List::ConstIterator it;
for ( it = mResources.begin(); it != mResources.end(); ++it ) {
@@ -442,7 +442,7 @@ Resource *ManagerImpl::getResource( const QString &identifier )
return 0;
}
-QString ManagerImpl::defaultConfigFile( const QString &family )
+TQString ManagerImpl::defaultConfigFile( const TQString &family )
{
- return QString( "kresources/%1/stdrc" ).arg( family );
+ return TQString( "kresources/%1/stdrc" ).arg( family );
}
diff --git a/kresources/managerimpl.h b/kresources/managerimpl.h
index 107f7b1f0..e86ea3d9d 100644
--- a/kresources/managerimpl.h
+++ b/kresources/managerimpl.h
@@ -23,9 +23,9 @@
#ifndef KRESOURCES_MANAGERIMPL_H
#define KRESOURCES_MANAGERIMPL_H
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
#include "manageriface.h"
#include <kresources/resource.h>
@@ -46,7 +46,7 @@ class ManagerNotifier;
class KRESOURCES_EXPORT ManagerImpl : virtual public ManagerIface
{
public:
- ManagerImpl( ManagerNotifier *, const QString &family );
+ ManagerImpl( ManagerNotifier *, const TQString &family );
~ManagerImpl();
void readConfig( KConfig * );
@@ -63,39 +63,39 @@ class KRESOURCES_EXPORT ManagerImpl : virtual public ManagerIface
Resource::List *resourceList();
- QPtrList<Resource> resources();
+ TQPtrList<Resource> resources();
// Get only active or passive resources
- QPtrList<Resource> resources( bool active );
+ TQPtrList<Resource> resources( bool active );
- QStringList resourceNames();
+ TQStringList resourceNames();
- static QString defaultConfigFile( const QString &family );
+ static TQString defaultConfigFile( const TQString &family );
private:
// dcop calls
- void dcopKResourceAdded( QString managerId, QString resourceId );
- void dcopKResourceModified( QString managerId, QString resourceId );
- void dcopKResourceDeleted( QString managerId, QString resourceId );
+ void dcopKResourceAdded( TQString managerId, TQString resourceId );
+ void dcopKResourceModified( TQString managerId, TQString resourceId );
+ void dcopKResourceDeleted( TQString managerId, TQString resourceId );
private:
void createStandardConfig();
- Resource *readResourceConfig( const QString& identifier, bool checkActive );
+ Resource *readResourceConfig( const TQString& identifier, bool checkActive );
void writeResourceConfig( Resource *resource, bool checkActive );
void removeResource( Resource *resource );
Resource *getResource( Resource *resource );
- Resource *getResource( const QString& identifier );
+ Resource *getResource( const TQString& identifier );
ManagerNotifier *mNotifier;
- QString mFamily;
+ TQString mFamily;
KConfig *mConfig;
KConfig *mStdConfig;
Resource *mStandard;
Factory *mFactory;
Resource::List mResources;
- QString mId;
+ TQString mId;
bool mConfigRead;
class ManagerImplPrivate;
diff --git a/kresources/resource.cpp b/kresources/resource.cpp
index ff30cb552..b9cdd95c4 100644
--- a/kresources/resource.cpp
+++ b/kresources/resource.cpp
@@ -33,19 +33,19 @@ class Resource::ResourcePrivate
{
public:
#ifdef QT_THREAD_SUPPORT
- QMutex mMutex;
+ TQMutex mMutex;
#endif
int mOpenCount;
- QString mType;
- QString mIdentifier;
+ TQString mType;
+ TQString mIdentifier;
bool mReadOnly;
- QString mName;
+ TQString mName;
bool mActive;
bool mIsOpen;
};
Resource::Resource( const KConfig* config )
- : QObject( 0, "" ), d( new ResourcePrivate )
+ : TQObject( 0, "" ), d( new ResourcePrivate )
{
d->mOpenCount = 0;
d->mIsOpen = false;
@@ -86,7 +86,7 @@ bool Resource::open()
{
d->mIsOpen = true;
#ifdef QT_THREAD_SUPPORT
- QMutexLocker guard( &(d->mMutex) );
+ TQMutexLocker guard( &(d->mMutex) );
#endif
if ( !d->mOpenCount ) {
kdDebug(5650) << "Opening resource " << resourceName() << endl;
@@ -99,7 +99,7 @@ bool Resource::open()
void Resource::close()
{
#ifdef QT_THREAD_SUPPORT
- QMutexLocker guard( &(d->mMutex) );
+ TQMutexLocker guard( &(d->mMutex) );
#endif
if ( !d->mOpenCount ) {
kdDebug(5650) << "ERROR: Resource " << resourceName() << " closed more times than previously opened" << endl;
@@ -120,22 +120,22 @@ bool Resource::isOpen() const
return d->mIsOpen;
}
-void Resource::setIdentifier( const QString& identifier )
+void Resource::setIdentifier( const TQString& identifier )
{
d->mIdentifier = identifier;
}
-QString Resource::identifier() const
+TQString Resource::identifier() const
{
return d->mIdentifier;
}
-void Resource::setType( const QString& type )
+void Resource::setType( const TQString& type )
{
d->mType = type;
}
-QString Resource::type() const
+TQString Resource::type() const
{
return d->mType;
}
@@ -150,12 +150,12 @@ bool Resource::readOnly() const
return d->mReadOnly;
}
-void Resource::setResourceName( const QString &name )
+void Resource::setResourceName( const TQString &name )
{
d->mName = name;
}
-QString Resource::resourceName() const
+TQString Resource::resourceName() const
{
return d->mName;
}
diff --git a/kresources/resource.h b/kresources/resource.h
index f0e988fe3..63190378d 100644
--- a/kresources/resource.h
+++ b/kresources/resource.h
@@ -22,9 +22,9 @@
#ifndef KRESOURCES_RESOURCE_H
#define KRESOURCES_RESOURCE_H
-#include <qmutex.h>
-#include <qvaluelist.h>
-#include <qwidget.h>
+#include <tqmutex.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
#include <klibloader.h>
@@ -77,8 +77,8 @@ class ResourceExample : public KRES::Resource
void writeConfig( KConfig *config );
private:
- QString mLocation;
- QString mPassword;
+ TQString mLocation;
+ TQString mPassword;
}
\endcode
@@ -109,7 +109,7 @@ void ResourceExample::writeConfig( KConfig *config )
extern "C"
{
- KRES::ResourceExample *config_widget( QWidget *parent ) {
+ KRES::ResourceExample *config_widget( TQWidget *parent ) {
return new ResourceExampleConfig( parent, "Configure Example Resource" );
}
@@ -130,7 +130,7 @@ class ResourceExampleConfig : public KRES::ResourceConfigWidget
{
Q_OBJECT
public:
- ResourceExampleConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceExampleConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource);
@@ -144,25 +144,25 @@ class ResourceExampleConfig : public KRES::ResourceConfigWidget
<B>resourceexampleconfig.cpp</B>:
\code
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kresources/resourceconfigwidget.h>
#include "resourceexample.h"
#include "resourceexampleconfig.h"
-ResourceExampleConfig::ResourceExampleConfig( QWidget *parent, const char *name )
+ResourceExampleConfig::ResourceExampleConfig( TQWidget *parent, const char *name )
: KRES::ResourceConfigWidget( parent, name )
{
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2 );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2 );
- QLabel *label = new QLabel( i18n( "Location:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Location:" ), this );
mHostEdit = new KLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mHostEdit, 1, 1 );
- label = new QLabel( i18n( "Password:" ), this );
+ label = new TQLabel( i18n( "Password:" ), this );
mPasswordEdit = new KLineEdit( this );
- mPasswordEdit->setEchoMode( QLineEdit::Password );
+ mPasswordEdit->setEchoMode( TQLineEdit::Password );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mPasswordEdit, 2, 1 );
}
@@ -259,7 +259,7 @@ class KRESOURCES_EXPORT Resource : public QObject
Q_OBJECT
public:
- typedef QValueList<Resource *> List;
+ typedef TQValueList<Resource *> List;
/**
* Constructor. Construct resource from config.
@@ -311,12 +311,12 @@ class KRESOURCES_EXPORT Resource : public QObject
* in the resource family configuration file for this resource.
* @return This resource's identifier
*/
- QString identifier() const;
+ TQString identifier() const;
/**
* Returns the type of this resource.
*/
- QString type() const;
+ TQString type() const;
/**
* Mark the resource as read-only. You can override this method,
@@ -333,12 +333,12 @@ class KRESOURCES_EXPORT Resource : public QObject
* Set the name of resource. You can override this method,
* but also remember to call Resource::setResourceName().
*/
- virtual void setResourceName( const QString &name );
+ virtual void setResourceName( const TQString &name );
/**
* Returns the name of resource.
*/
- virtual QString resourceName() const;
+ virtual TQString resourceName() const;
/**
Sets, if the resource is active.
@@ -373,8 +373,8 @@ class KRESOURCES_EXPORT Resource : public QObject
*/
virtual void doClose() {}
- void setIdentifier( const QString &identifier );
- void setType( const QString &type );
+ void setIdentifier( const TQString &identifier );
+ void setType( const TQString &type );
private:
class ResourcePrivate;
@@ -386,11 +386,11 @@ class KRESOURCES_EXPORT PluginFactoryBase : public KLibFactory
public:
virtual Resource *resource( const KConfig *config ) = 0;
- virtual ConfigWidget *configWidget( QWidget *parent ) = 0;
+ virtual ConfigWidget *configWidget( TQWidget *parent ) = 0;
protected:
- virtual QObject* createObject( QObject *parent, const char *name, const char *className,
- const QStringList & args)
+ virtual TQObject* createObject( TQObject *parent, const char *name, const char *className,
+ const TQStringList & args)
{
Q_UNUSED(parent);
Q_UNUSED(name);
@@ -409,7 +409,7 @@ class PluginFactory : public PluginFactoryBase
return new TR( config );
}
- ConfigWidget *configWidget( QWidget *parent )
+ ConfigWidget *configWidget( TQWidget *parent )
{
return new TC( parent );
}
diff --git a/kresources/selectdialog.cpp b/kresources/selectdialog.cpp
index a36e7ec48..cc1c7e593 100644
--- a/kresources/selectdialog.cpp
+++ b/kresources/selectdialog.cpp
@@ -26,8 +26,8 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
#include "resource.h"
@@ -35,17 +35,17 @@
using namespace KRES;
-SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent,
+SelectDialog::SelectDialog( TQPtrList<Resource> list, TQWidget *parent,
const char *name )
: KDialog( parent, name, true )
{
setCaption( i18n( "Resource Selection" ) );
resize( 300, 200 );
- QVBoxLayout *mainLayout = new QVBoxLayout( this );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this );
mainLayout->setMargin( marginHint() );
- QGroupBox *groupBox = new QGroupBox( 2, Qt::Horizontal, this );
+ TQGroupBox *groupBox = new TQGroupBox( 2, Qt::Horizontal, this );
groupBox->setTitle( i18n( "Resources" ) );
mResourceId = new KListBox( groupBox );
@@ -57,8 +57,8 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent,
KButtonBox *buttonBox = new KButtonBox( this );
buttonBox->addStretch();
- buttonBox->addButton( KStdGuiItem::ok(), this, SLOT( accept() ) );
- buttonBox->addButton( KStdGuiItem::cancel(), this, SLOT( reject() ) );
+ buttonBox->addButton( KStdGuiItem::ok(), this, TQT_SLOT( accept() ) );
+ buttonBox->addButton( KStdGuiItem::cancel(), this, TQT_SLOT( reject() ) );
buttonBox->layout();
mainLayout->addWidget( buttonBox );
@@ -75,10 +75,10 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent,
}
mResourceId->setCurrentItem( 0 );
- connect( mResourceId, SIGNAL(returnPressed(QListBoxItem*)),
- SLOT(accept()) );
- connect( mResourceId, SIGNAL( executed( QListBoxItem* ) ),
- SLOT( accept() ) );
+ connect( mResourceId, TQT_SIGNAL(returnPressed(TQListBoxItem*)),
+ TQT_SLOT(accept()) );
+ connect( mResourceId, TQT_SIGNAL( executed( TQListBoxItem* ) ),
+ TQT_SLOT( accept() ) );
}
Resource *SelectDialog::resource()
@@ -89,7 +89,7 @@ Resource *SelectDialog::resource()
return 0;
}
-Resource *SelectDialog::getResource( QPtrList<Resource> list, QWidget *parent )
+Resource *SelectDialog::getResource( TQPtrList<Resource> list, TQWidget *parent )
{
if ( list.count() == 0 ) {
KMessageBox::error( parent, i18n( "There is no resource available!" ) );
diff --git a/kresources/selectdialog.h b/kresources/selectdialog.h
index 5ec90fc58..26905e47b 100644
--- a/kresources/selectdialog.h
+++ b/kresources/selectdialog.h
@@ -24,9 +24,9 @@
#ifndef KRESOURCES_SELECTDIALOG_H
#define KRESOURCES_SELECTDIALOG_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
#include <kdialog.h>
@@ -43,7 +43,7 @@ class Resource;
*
* \code
*
- * QPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
+ * TQPtrList<Resource> list = ... // can be retrived from KRES::Manager (e.g. KABC::AddressBook)
*
* KABC::Resource *res = KABC::SelectDialog::getResource( list, parentWdg );
* if ( !res ) {
@@ -62,7 +62,7 @@ class KRESOURCES_EXPORT SelectDialog : KDialog
* @param parent The parent widget
* @param name The name of the dialog
*/
- SelectDialog( QPtrList<Resource> list, QWidget *parent = 0,
+ SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
const char *name = 0);
/**
@@ -74,12 +74,12 @@ class KRESOURCES_EXPORT SelectDialog : KDialog
* Opens a dialog showing the available resources and returns the resource the
* user has selected. Returns 0, if the dialog was canceled.
*/
- static Resource *getResource( QPtrList<Resource> list, QWidget *parent = 0 );
+ static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
private:
KListBox *mResourceId;
- QMap<int, Resource*> mResourceMap;
+ TQMap<int, Resource*> mResourceMap;
};
}