summaryrefslogtreecommitdiffstats
path: root/kaddressbook/common
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kaddressbook/common
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook/common')
-rw-r--r--kaddressbook/common/filter.cpp28
-rw-r--r--kaddressbook/common/filter.h26
-rw-r--r--kaddressbook/common/kabprefs.cpp2
-rw-r--r--kaddressbook/common/kabprefs.h22
-rw-r--r--kaddressbook/common/locationmap.cpp6
-rw-r--r--kaddressbook/common/locationmap.h6
6 files changed, 45 insertions, 45 deletions
diff --git a/kaddressbook/common/filter.cpp b/kaddressbook/common/filter.cpp
index ccac46ef..13e5f5fc 100644
--- a/kaddressbook/common/filter.cpp
+++ b/kaddressbook/common/filter.cpp
@@ -29,12 +29,12 @@
#include "filter.h"
Filter::Filter()
- : mName( QString::null ), mMatchRule( Matching ), mEnabled( true ),
+ : mName( TQString::null ), mMatchRule( Matching ), mEnabled( true ),
mInternal( false ), mIsEmpty( true )
{
}
-Filter::Filter( const QString &name )
+Filter::Filter( const TQString &name )
: mName( name ), mMatchRule( Matching ), mEnabled( true ),
mInternal( false ), mIsEmpty( false )
{
@@ -44,14 +44,14 @@ Filter::~Filter()
{
}
-void Filter::setName( const QString &name )
+void Filter::setName( const TQString &name )
{
mName = name;
mIsEmpty = false;
}
-const QString &Filter::name() const
+const TQString &Filter::name() const
{
return mName;
}
@@ -74,7 +74,7 @@ void Filter::apply( KABC::Addressee::List &addresseeList )
bool Filter::filterAddressee( const KABC::Addressee &a ) const
{
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
iter = mCategoryList.begin();
// empty filter always matches
@@ -109,14 +109,14 @@ bool Filter::isEnabled() const
return mEnabled;
}
-void Filter::setCategories( const QStringList &list )
+void Filter::setCategories( const TQStringList &list )
{
mCategoryList = list;
mIsEmpty = false;
}
-const QStringList &Filter::categories() const
+const TQStringList &Filter::categories() const
{
return mCategoryList;
}
@@ -139,7 +139,7 @@ void Filter::restore( KConfig *config )
mIsEmpty = false;
}
-void Filter::save( KConfig *config, const QString &baseGroup, Filter::List &list )
+void Filter::save( KConfig *config, const TQString &baseGroup, Filter::List &list )
{
{
KConfigGroupSaver s( config, baseGroup );
@@ -147,7 +147,7 @@ void Filter::save( KConfig *config, const QString &baseGroup, Filter::List &list
// remove the old filters
uint count = config->readNumEntry( "Count" );
for ( uint i = 0; i < count; ++i )
- config->deleteGroup( QString( "%1_%2" ).arg( baseGroup ).arg( i ) );
+ config->deleteGroup( TQString( "%1_%2" ).arg( baseGroup ).arg( i ) );
}
@@ -155,7 +155,7 @@ void Filter::save( KConfig *config, const QString &baseGroup, Filter::List &list
Filter::List::Iterator iter;
for ( iter = list.begin(); iter != list.end(); ++iter ) {
if ( !(*iter).mInternal ) {
- KConfigGroupSaver s( config, QString( "%1_%2" ).arg( baseGroup )
+ KConfigGroupSaver s( config, TQString( "%1_%2" ).arg( baseGroup )
.arg( index ) );
(*iter).save( config );
index++;
@@ -166,7 +166,7 @@ void Filter::save( KConfig *config, const QString &baseGroup, Filter::List &list
config->writeEntry( "Count", index );
}
-Filter::List Filter::restore( KConfig *config, const QString &baseGroup )
+Filter::List Filter::restore( KConfig *config, const TQString &baseGroup )
{
Filter::List list;
int count = 0;
@@ -179,15 +179,15 @@ Filter::List Filter::restore( KConfig *config, const QString &baseGroup )
for ( int i = 0; i < count; i++ ) {
{
- KConfigGroupSaver s( config, QString( "%1_%2" ).arg( baseGroup ).arg( i ) );
+ KConfigGroupSaver s( config, TQString( "%1_%2" ).arg( baseGroup ).arg( i ) );
f.restore( config );
}
list.append( f );
}
- const QStringList cats = KABPrefs::instance()->customCategories();
- for ( QStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it ) {
+ const TQStringList cats = KABPrefs::instance()->customCategories();
+ for ( TQStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it ) {
Filter filter;
filter.mName = *it;
filter.mEnabled = true;
diff --git a/kaddressbook/common/filter.h b/kaddressbook/common/filter.h
index 9251c5c1..9f66699e 100644
--- a/kaddressbook/common/filter.h
+++ b/kaddressbook/common/filter.h
@@ -24,9 +24,9 @@
#ifndef FILTER_H
#define FILTER_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <kabc/addressee.h>
#include <kconfig.h>
@@ -39,23 +39,23 @@
class Filter
{
public:
- typedef QValueList<Filter> List;
+ typedef TQValueList<Filter> List;
enum MatchRule { Matching = 0, NotMatching = 1 };
Filter();
- Filter( const QString& name );
+ Filter( const TQString& name );
~Filter();
/**
Set the name of the filter.
*/
- void setName( const QString &name );
+ void setName( const TQString &name );
/**
@return The name of the filter.
*/
- const QString &name() const;
+ const TQString &name() const;
/**
@return Whether the filter is an internal one.
@@ -92,12 +92,12 @@ class Filter
/**
Set the list of categories. This list is used to filter addressees.
*/
- void setCategories( const QStringList &list );
+ void setCategories( const TQStringList &list );
/**
@return The list of categories.
*/
- const QStringList &categories() const;
+ const TQStringList &categories() const;
/**
Saves the filter to the config file. The group should already be set.
@@ -118,7 +118,7 @@ class Filter
will be append for each filter saved.
@param list The list of filters to be saved.
*/
- static void save( KConfig *config, const QString &baseGroup, Filter::List &list );
+ static void save( KConfig *config, const TQString &baseGroup, Filter::List &list );
/**
Restores a list of filters from a config file.
@@ -128,7 +128,7 @@ class Filter
@return The list of filters.
*/
- static Filter::List restore( KConfig *config, const QString &baseGroup );
+ static Filter::List restore( KConfig *config, const TQString &baseGroup );
/**
Sets the filter rule. If the rule is Filter::Matching (default),
@@ -149,8 +149,8 @@ class Filter
bool isEmpty() const;
private:
- QString mName;
- QStringList mCategoryList;
+ TQString mName;
+ TQStringList mCategoryList;
MatchRule mMatchRule;
bool mEnabled;
bool mInternal;
diff --git a/kaddressbook/common/kabprefs.cpp b/kaddressbook/common/kabprefs.cpp
index e8402d56..cacb2dfd 100644
--- a/kaddressbook/common/kabprefs.cpp
+++ b/kaddressbook/common/kabprefs.cpp
@@ -35,7 +35,7 @@ KABPrefs::KABPrefs()
{
KConfigSkeleton::setCurrentGroup( "General" );
- QStringList defaultMap;
+ TQStringList defaultMap;
defaultMap << "http://maps.google.com/maps?f=q&hl=%1&q=%n,%l,%s";
addItemString( "LocationMapURL", mLocationMapURL, defaultMap[ 0 ] );
addItemStringList( "LocationMapURLs", mLocationMapURLs, defaultMap );
diff --git a/kaddressbook/common/kabprefs.h b/kaddressbook/common/kabprefs.h
index 3c2db152..688cab99 100644
--- a/kaddressbook/common/kabprefs.h
+++ b/kaddressbook/common/kabprefs.h
@@ -24,7 +24,7 @@
#ifndef KABPREFS_H
#define KABPREFS_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdepimmacros.h>
#include "kabprefs_base.h"
@@ -40,34 +40,34 @@ class KDE_EXPORT KABPrefs : public KABPrefsBase
void usrReadConfig();
void usrWriteConfig();
- void setLocationMapURL( const QString &locationMapURL )
+ void setLocationMapURL( const TQString &locationMapURL )
{
- if ( !isImmutable( QString::fromLatin1( "LocationMapURL" ) ) )
+ if ( !isImmutable( TQString::fromLatin1( "LocationMapURL" ) ) )
mLocationMapURL = locationMapURL;
}
- QString locationMapURL() const
+ TQString locationMapURL() const
{
return mLocationMapURL;
}
- void setLocationMapURLs( const QStringList &locationMapURLs )
+ void setLocationMapURLs( const TQStringList &locationMapURLs )
{
- if ( !isImmutable( QString::fromLatin1( "LocationMapURLs" ) ) )
+ if ( !isImmutable( TQString::fromLatin1( "LocationMapURLs" ) ) )
mLocationMapURLs = locationMapURLs;
}
- QStringList locationMapURLs() const
+ TQStringList locationMapURLs() const
{
return mLocationMapURLs;
}
- QStringList customCategories() const
+ TQStringList customCategories() const
{
return mCustomCategories;
}
- void setCustomCategories(const QStringList & s)
+ void setCustomCategories(const TQStringList & s)
{
mCustomCategories = s;
}
@@ -79,8 +79,8 @@ class KDE_EXPORT KABPrefs : public KABPrefsBase
static KABPrefs *mInstance;
- QString mLocationMapURL;
- QStringList mLocationMapURLs;
+ TQString mLocationMapURL;
+ TQStringList mLocationMapURLs;
};
#endif
diff --git a/kaddressbook/common/locationmap.cpp b/kaddressbook/common/locationmap.cpp
index 92bdfaab..efae019c 100644
--- a/kaddressbook/common/locationmap.cpp
+++ b/kaddressbook/common/locationmap.cpp
@@ -61,7 +61,7 @@ void LocationMap::showAddress( const KABC::Address &addr )
kapp->invokeBrowser( url.url() );
}
-QString LocationMap::createUrl( const KABC::Address &addr )
+TQString LocationMap::createUrl( const KABC::Address &addr )
{
/**
This method makes substitutions for the following place holders:
@@ -72,10 +72,10 @@ QString LocationMap::createUrl( const KABC::Address &addr )
%c country (in ISO format)
*/
- QString urlTemplate = KABPrefs::instance()->locationMapURL().arg( KGlobal::locale()->country() );
+ TQString urlTemplate = KABPrefs::instance()->locationMapURL().arg( KGlobal::locale()->country() );
if ( urlTemplate.isEmpty() ) {
KMessageBox::error( 0, i18n( "No service provider available for map lookup!\nPlease add one in the configuration dialog." ) );
- return QString::null;
+ return TQString::null;
}
#if KDE_VERSION >= 319
diff --git a/kaddressbook/common/locationmap.h b/kaddressbook/common/locationmap.h
index 82300d9d..e8a79036 100644
--- a/kaddressbook/common/locationmap.h
+++ b/kaddressbook/common/locationmap.h
@@ -25,8 +25,8 @@
#define LOCATIONMAP_H
#include <kabc/address.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
class LocationMap : public QObject
{
@@ -43,7 +43,7 @@ class LocationMap : public QObject
LocationMap();
private:
- QString createUrl( const KABC::Address& );
+ TQString createUrl( const KABC::Address& );
static LocationMap *mSelf;
};