summaryrefslogtreecommitdiffstats
path: root/kabc/plugins/dir
diff options
context:
space:
mode:
Diffstat (limited to 'kabc/plugins/dir')
-rw-r--r--kabc/plugins/dir/resourcedir.cpp42
-rw-r--r--kabc/plugins/dir/resourcedir.h16
-rw-r--r--kabc/plugins/dir/resourcedirconfig.cpp16
-rw-r--r--kabc/plugins/dir/resourcedirconfig.h4
4 files changed, 39 insertions, 39 deletions
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp
index 1947e98f3..0897c9cee 100644
--- a/kabc/plugins/dir/resourcedir.cpp
+++ b/kabc/plugins/dir/resourcedir.cpp
@@ -24,9 +24,9 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -67,13 +67,13 @@ ResourceDir::ResourceDir( const KConfig *config )
}
}
-ResourceDir::ResourceDir( const QString &path, const QString &format )
+ResourceDir::ResourceDir( const TQString &path, const TQString &format )
: Resource( 0 ), mAsynchronous( false )
{
init( path, format );
}
-void ResourceDir::init( const QString &path, const QString &format )
+void ResourceDir::init( const TQString &path, const TQString &format )
{
mFormatName = format;
@@ -87,9 +87,9 @@ void ResourceDir::init( const QString &path, const QString &format )
mLock = 0;
- connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( pathChanged() ) );
- connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( pathChanged() ) );
- connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( pathChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( pathChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( pathChanged() ) );
+ connect( &mDirWatch, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( pathChanged() ) );
setPath( path );
}
@@ -143,15 +143,15 @@ void ResourceDir::releaseSaveTicket( Ticket *ticket )
bool ResourceDir::doOpen()
{
- QDir dir( mPath );
+ TQDir dir( mPath );
if ( !dir.exists() ) { // no directory available
return dir.mkdir( dir.path() );
} else {
- QString testName = dir.entryList( QDir::Files )[0];
+ TQString testName = dir.entryList( TQDir::Files )[0];
if ( testName.isNull() || testName.isEmpty() ) // no file in directory
return true;
- QFile file( mPath + "/" + testName );
+ TQFile file( mPath + "/" + testName );
if ( file.open( IO_ReadOnly ) )
return true;
@@ -174,13 +174,13 @@ bool ResourceDir::load()
mAsynchronous = false;
- QDir dir( mPath );
- QStringList files = dir.entryList( QDir::Files );
+ TQDir dir( mPath );
+ TQStringList files = dir.entryList( TQDir::Files );
- QStringList::Iterator it;
+ TQStringList::Iterator it;
bool ok = true;
for ( it = files.begin(); it != files.end(); ++it ) {
- QFile file( mPath + "/" + (*it) );
+ TQFile file( mPath + "/" + (*it) );
if ( !file.open( IO_ReadOnly ) ) {
addressBook()->error( i18n( "Unable to open file '%1' for reading" ).arg( file.name() ) );
@@ -224,7 +224,7 @@ bool ResourceDir::save( Ticket * )
if ( !it.data().changed() )
continue;
- QFile file( mPath + "/" + (*it).uid() );
+ TQFile file( mPath + "/" + (*it).uid() );
if ( !file.open( IO_WriteOnly ) ) {
addressBook()->error( i18n( "Unable to open file '%1' for writing" ).arg( file.name() ) );
continue;
@@ -255,7 +255,7 @@ bool ResourceDir::asyncSave( Ticket *ticket )
return ok;
}
-void ResourceDir::setPath( const QString &path )
+void ResourceDir::setPath( const TQString &path )
{
mDirWatch.stopScan();
if ( mDirWatch.contains( mPath ) )
@@ -266,12 +266,12 @@ void ResourceDir::setPath( const QString &path )
mDirWatch.startScan();
}
-QString ResourceDir::path() const
+TQString ResourceDir::path() const
{
return mPath;
}
-void ResourceDir::setFormat( const QString &format )
+void ResourceDir::setFormat( const TQString &format )
{
mFormatName = format;
@@ -282,7 +282,7 @@ void ResourceDir::setFormat( const QString &format )
mFormat = factory->format( mFormatName );
}
-QString ResourceDir::format() const
+TQString ResourceDir::format() const
{
return mFormatName;
}
@@ -303,7 +303,7 @@ void ResourceDir::pathChanged()
void ResourceDir::removeAddressee( const Addressee& addr )
{
- QFile::remove( mPath + "/" + addr.uid() );
+ TQFile::remove( mPath + "/" + addr.uid() );
mAddrMap.erase( addr.uid() );
}
diff --git a/kabc/plugins/dir/resourcedir.h b/kabc/plugins/dir/resourcedir.h
index b54f0ddda..125882a84 100644
--- a/kabc/plugins/dir/resourcedir.h
+++ b/kabc/plugins/dir/resourcedir.h
@@ -44,7 +44,7 @@ class KABC_EXPORT ResourceDir : public Resource
public:
ResourceDir( const KConfig* );
- ResourceDir( const QString &path, const QString &type = "vcard" );
+ ResourceDir( const TQString &path, const TQString &type = "vcard" );
~ResourceDir();
virtual void writeConfig( KConfig* );
@@ -63,22 +63,22 @@ class KABC_EXPORT ResourceDir : public Resource
/**
Set path to be used for saving.
*/
- void setPath( const QString & );
+ void setPath( const TQString & );
/**
Return path used for loading and saving the address book.
*/
- QString path() const;
+ TQString path() const;
/**
Set the format by name.
*/
- void setFormat( const QString &format );
+ void setFormat( const TQString &format );
/**
Returns the format name.
*/
- QString format() const;
+ TQString format() const;
/**
Remove a addressee from its source.
@@ -90,15 +90,15 @@ class KABC_EXPORT ResourceDir : public Resource
void pathChanged();
protected:
- void init( const QString &path, const QString &format );
+ void init( const TQString &path, const TQString &format );
private:
FormatPlugin *mFormat;
KDirWatch mDirWatch;
- QString mPath;
- QString mFormatName;
+ TQString mPath;
+ TQString mFormatName;
Lock *mLock;
diff --git a/kabc/plugins/dir/resourcedirconfig.cpp b/kabc/plugins/dir/resourcedirconfig.cpp
index ada7c1f9d..819d75d96 100644
--- a/kabc/plugins/dir/resourcedirconfig.cpp
+++ b/kabc/plugins/dir/resourcedirconfig.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -34,19 +34,19 @@
using namespace KABC;
-ResourceDirConfig::ResourceDirConfig( QWidget* parent, const char* name )
+ResourceDirConfig::ResourceDirConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0,
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2, 0,
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Format:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Format:" ), this );
mFormatBox = new KComboBox( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mFormatBox, 0, 1 );
- label = new QLabel( i18n( "Location:" ), this );
+ label = new TQLabel( i18n( "Location:" ), this );
mFileNameEdit = new KURLRequester( this );
mFileNameEdit->setMode( KFile::Directory );
@@ -54,8 +54,8 @@ ResourceDirConfig::ResourceDirConfig( QWidget* parent, const char* name )
mainLayout->addWidget( mFileNameEdit, 1, 1 );
FormatFactory *factory = FormatFactory::self();
- QStringList formats = factory->formats();
- QStringList::Iterator it;
+ TQStringList formats = factory->formats();
+ TQStringList::Iterator it;
for ( it = formats.begin(); it != formats.end(); ++it ) {
FormatInfo *info = factory->info( *it );
if ( info ) {
diff --git a/kabc/plugins/dir/resourcedirconfig.h b/kabc/plugins/dir/resourcedirconfig.h
index 46d446b36..4333fdae1 100644
--- a/kabc/plugins/dir/resourcedirconfig.h
+++ b/kabc/plugins/dir/resourcedirconfig.h
@@ -33,7 +33,7 @@ class KABC_EXPORT ResourceDirConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceDirConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceDirConfig( TQWidget* parent = 0, const char* name = 0 );
void setEditMode( bool value );
@@ -45,7 +45,7 @@ private:
KComboBox* mFormatBox;
KURLRequester* mFileNameEdit;
- QStringList mFormatTypes;
+ TQStringList mFormatTypes;
bool mInEditMode;
};