summaryrefslogtreecommitdiffstats
path: root/libkdepim
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 /libkdepim
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 'libkdepim')
-rw-r--r--libkdepim/addresseediffalgo.cpp10
-rw-r--r--libkdepim/addresseediffalgo.h6
-rw-r--r--libkdepim/addresseeemailselection.cpp46
-rw-r--r--libkdepim/addresseeemailselection.h52
-rw-r--r--libkdepim/addresseelineedit.cpp300
-rw-r--r--libkdepim/addresseelineedit.h60
-rw-r--r--libkdepim/addresseeselector.cpp120
-rw-r--r--libkdepim/addresseeselector.h40
-rw-r--r--libkdepim/addresseeview.cpp280
-rw-r--r--libkdepim/addresseeview.h50
-rw-r--r--libkdepim/addressesdialog.cpp250
-rw-r--r--libkdepim/addressesdialog.h62
-rw-r--r--libkdepim/alarmclient.cpp6
-rw-r--r--libkdepim/broadcaststatus.cpp16
-rw-r--r--libkdepim/broadcaststatus.h18
-rw-r--r--libkdepim/calendardiffalgo.cpp32
-rw-r--r--libkdepim/calendardiffalgo.h2
-rw-r--r--libkdepim/categoryeditdialog.cpp56
-rw-r--r--libkdepim/categoryeditdialog.h2
-rw-r--r--libkdepim/categoryselectdialog.cpp50
-rw-r--r--libkdepim/categoryselectdialog.h14
-rw-r--r--libkdepim/cfgc/autoexample.cpp2
-rw-r--r--libkdepim/cfgc/example.cfg4
-rw-r--r--libkdepim/clicklineedit.cpp24
-rw-r--r--libkdepim/clicklineedit.h18
-rw-r--r--libkdepim/collectingprocess.cpp44
-rw-r--r--libkdepim/collectingprocess.h6
-rw-r--r--libkdepim/completionordereditor.cpp70
-rw-r--r--libkdepim/completionordereditor.h12
-rw-r--r--libkdepim/configmanager.cpp4
-rw-r--r--libkdepim/configmanager.h6
-rw-r--r--libkdepim/csshelper.cpp130
-rw-r--r--libkdepim/csshelper.h44
-rw-r--r--libkdepim/designerfields.cpp190
-rw-r--r--libkdepim/designerfields.h28
-rw-r--r--libkdepim/diffalgo.cpp26
-rw-r--r--libkdepim/diffalgo.h28
-rw-r--r--libkdepim/distributionlist.cpp62
-rw-r--r--libkdepim/distributionlist.h26
-rw-r--r--libkdepim/embeddedurlpage.cpp26
-rw-r--r--libkdepim/embeddedurlpage.h12
-rw-r--r--libkdepim/htmldiffalgodisplay.cpp34
-rw-r--r--libkdepim/htmldiffalgodisplay.h20
-rw-r--r--libkdepim/infoextension.cpp4
-rw-r--r--libkdepim/infoextension.h6
-rw-r--r--libkdepim/interfaces/AddressBookServiceIface.h6
-rw-r--r--libkdepim/interfaces/MailTransportServiceIface.h34
-rw-r--r--libkdepim/kabcresourcecached.cpp34
-rw-r--r--libkdepim/kabcresourcecached.h16
-rw-r--r--libkdepim/kaccount.cpp10
-rw-r--r--libkdepim/kaccount.h14
-rw-r--r--libkdepim/kaddrbook.cpp72
-rw-r--r--libkdepim/kaddrbook.h14
-rw-r--r--libkdepim/kcmdesignerfields.cpp168
-rw-r--r--libkdepim/kcmdesignerfields.h30
-rw-r--r--libkdepim/kconfigpropagator.cpp72
-rw-r--r--libkdepim/kconfigpropagator.h74
-rw-r--r--libkdepim/kconfigwizard.cpp44
-rw-r--r--libkdepim/kconfigwizard.h18
-rw-r--r--libkdepim/kdateedit.cpp102
-rw-r--r--libkdepim/kdateedit.h34
-rw-r--r--libkdepim/kdatepickerpopup.cpp40
-rw-r--r--libkdepim/kdatepickerpopup.h16
-rw-r--r--libkdepim/kfileio.cpp86
-rw-r--r--libkdepim/kfileio.h20
-rw-r--r--libkdepim/kfoldertree.cpp96
-rw-r--r--libkdepim/kfoldertree.h62
-rw-r--r--libkdepim/kimportdialog.cpp206
-rw-r--r--libkdepim/kimportdialog.h74
-rw-r--r--libkdepim/kincidencechooser.cpp112
-rw-r--r--libkdepim/kincidencechooser.h14
-rw-r--r--libkdepim/kmailcompletion.cpp34
-rw-r--r--libkdepim/kmailcompletion.h12
-rw-r--r--libkdepim/komposer/core/attachment.cpp32
-rw-r--r--libkdepim/komposer/core/attachment.h40
-rw-r--r--libkdepim/komposer/core/core.cpp70
-rw-r--r--libkdepim/komposer/core/core.h26
-rw-r--r--libkdepim/komposer/core/corewidget.cpp4
-rw-r--r--libkdepim/komposer/core/corewidget.h16
-rw-r--r--libkdepim/komposer/core/editor.cpp4
-rw-r--r--libkdepim/komposer/core/editor.h16
-rw-r--r--libkdepim/komposer/core/komposerIface.h20
-rw-r--r--libkdepim/komposer/core/plugin.cpp6
-rw-r--r--libkdepim/komposer/core/plugin.h8
-rw-r--r--libkdepim/komposer/core/pluginmanager.cpp132
-rw-r--r--libkdepim/komposer/core/pluginmanager.h40
-rw-r--r--libkdepim/komposer/core/prefsmodule.cpp36
-rw-r--r--libkdepim/komposer/core/prefsmodule.h18
-rw-r--r--libkdepim/komposer/core/tests/managertest.cpp4
-rw-r--r--libkdepim/komposer/core/tests/managertest.h6
-rw-r--r--libkdepim/komposer/core/tests/tester.cpp4
-rw-r--r--libkdepim/komposer/core/tests/tester.h10
-rw-r--r--libkdepim/komposer/core/tests/testfactory.h10
-rw-r--r--libkdepim/komposer/core/tests/testmanager.cpp16
-rw-r--r--libkdepim/komposer/core/tests/testmanager.h4
-rw-r--r--libkdepim/komposer/plugins/default/defaulteditor.cpp120
-rw-r--r--libkdepim/komposer/plugins/default/defaulteditor.h12
-rw-r--r--libkdepim/komposer/test/test.cpp2
-rw-r--r--libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp40
-rw-r--r--libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h42
-rw-r--r--libkdepim/kpimprefs.cpp36
-rw-r--r--libkdepim/kpimprefs.h16
-rw-r--r--libkdepim/kpimurlrequesterdlg.cpp4
-rw-r--r--libkdepim/kpimurlrequesterdlg.h10
-rw-r--r--libkdepim/kpixmapregionselectordialog.cpp50
-rw-r--r--libkdepim/kpixmapregionselectordialog.h12
-rw-r--r--libkdepim/kpixmapregionselectorwidget.cpp108
-rw-r--r--libkdepim/kpixmapregionselectorwidget.h40
-rw-r--r--libkdepim/kprefsdialog.cpp302
-rw-r--r--libkdepim/kprefsdialog.h176
-rw-r--r--libkdepim/kregexp3.cpp32
-rw-r--r--libkdepim/kregexp3.h26
-rw-r--r--libkdepim/kresourceprefs.cpp6
-rw-r--r--libkdepim/kresourceprefs.h4
-rw-r--r--libkdepim/krsqueezedtextlabel.cpp46
-rw-r--r--libkdepim/krsqueezedtextlabel.h20
-rw-r--r--libkdepim/kscoring.cpp248
-rw-r--r--libkdepim/kscoring.h238
-rw-r--r--libkdepim/kscoringeditor.cpp338
-rw-r--r--libkdepim/kscoringeditor.h88
-rw-r--r--libkdepim/ksubscription.cpp192
-rw-r--r--libkdepim/ksubscription.h76
-rw-r--r--libkdepim/ktimeedit.cpp84
-rw-r--r--libkdepim/ktimeedit.h30
-rw-r--r--libkdepim/kvcarddrag.cpp20
-rw-r--r--libkdepim/kvcarddrag.h16
-rw-r--r--libkdepim/kwidgetlister.cpp38
-rw-r--r--libkdepim/kwidgetlister.h24
-rw-r--r--libkdepim/kxface.cpp44
-rw-r--r--libkdepim/kxface.h8
-rw-r--r--libkdepim/ldapclient.cpp186
-rw-r--r--libkdepim/ldapclient.h116
-rw-r--r--libkdepim/ldapsearchdialog.cpp148
-rw-r--r--libkdepim/ldapsearchdialog.h22
-rw-r--r--libkdepim/linklocator.cpp136
-rw-r--r--libkdepim/linklocator.h28
-rw-r--r--libkdepim/maillistdrag.cpp84
-rw-r--r--libkdepim/maillistdrag.h40
-rw-r--r--libkdepim/overlaywidget.cpp22
-rw-r--r--libkdepim/overlaywidget.h16
-rw-r--r--libkdepim/pluginloader.h2
-rw-r--r--libkdepim/pluginloaderbase.cpp36
-rw-r--r--libkdepim/pluginloaderbase.h24
-rw-r--r--libkdepim/progressdialog.cpp156
-rw-r--r--libkdepim/progressdialog.h46
-rw-r--r--libkdepim/progressmanager.cpp58
-rw-r--r--libkdepim/progressmanager.h78
-rw-r--r--libkdepim/qutf7codec.cpp48
-rw-r--r--libkdepim/qutf7codec.h26
-rw-r--r--libkdepim/qutf7codecplugin.cpp24
-rw-r--r--libkdepim/recentaddresses.cpp34
-rw-r--r--libkdepim/recentaddresses.h12
-rw-r--r--libkdepim/resourceabc.h28
-rw-r--r--libkdepim/sendsmsdialog.cpp40
-rw-r--r--libkdepim/sendsmsdialog.h8
-rw-r--r--libkdepim/sidebarextension.cpp6
-rw-r--r--libkdepim/sidebarextension.h10
-rw-r--r--libkdepim/spellingfilter.cpp32
-rw-r--r--libkdepim/spellingfilter.h30
-rw-r--r--libkdepim/ssllabel.cpp18
-rw-r--r--libkdepim/ssllabel.h4
-rw-r--r--libkdepim/statusbarprogresswidget.cpp86
-rw-r--r--libkdepim/statusbarprogresswidget.h18
-rw-r--r--libkdepim/tests/test_kregexp.cpp4
-rw-r--r--libkdepim/tests/testdateedit.cpp14
-rw-r--r--libkdepim/tests/testdateedit.h6
-rw-r--r--libkdepim/tests/testdistrlist.cpp44
-rw-r--r--libkdepim/tests/testdistrlist.h4
-rw-r--r--libkdepim/tests/testlinklocator.cpp44
-rw-r--r--libkdepim/tests/testutf7decoder.cpp12
-rw-r--r--libkdepim/tests/testutf7encoder.cpp8
-rw-r--r--libkdepim/tests/testutf7encoder2.cpp16
-rw-r--r--libkdepim/tests/testwizard.cpp16
-rw-r--r--libkdepim/weaver.cpp58
-rw-r--r--libkdepim/weaver.h40
-rw-r--r--libkdepim/weaverextensions.cpp20
-rw-r--r--libkdepim/weaverextensions.h4
-rw-r--r--libkdepim/weaverlogger.cpp2
-rw-r--r--libkdepim/weaverlogger.h2
179 files changed, 4399 insertions, 4399 deletions
diff --git a/libkdepim/addresseediffalgo.cpp b/libkdepim/addresseediffalgo.cpp
index 23970607a..361ec631f 100644
--- a/libkdepim/addresseediffalgo.cpp
+++ b/libkdepim/addresseediffalgo.cpp
@@ -23,7 +23,7 @@
using namespace KPIM;
-static bool compareString( const QString &left, const QString &right )
+static bool compareString( const TQString &left, const TQString &right )
{
if ( left.isEmpty() && right.isEmpty() )
return true;
@@ -120,19 +120,19 @@ void AddresseeDiffAlgo::run()
end();
}
-QString AddresseeDiffAlgo::toString( const KABC::PhoneNumber &number )
+TQString AddresseeDiffAlgo::toString( const KABC::PhoneNumber &number )
{
return number.number();
}
-QString AddresseeDiffAlgo::toString( const KABC::Address &addr )
+TQString AddresseeDiffAlgo::toString( const KABC::Address &addr )
{
return addr.formattedAddress();
}
template <class L>
-void AddresseeDiffAlgo::diffList( const QString &id,
- const QValueList<L> &left, const QValueList<L> &right )
+void AddresseeDiffAlgo::diffList( const TQString &id,
+ const TQValueList<L> &left, const TQValueList<L> &right )
{
for ( uint i = 0; i < left.count(); ++i ) {
if ( right.find( left[ i ] ) == right.end() )
diff --git a/libkdepim/addresseediffalgo.h b/libkdepim/addresseediffalgo.h
index fea5bab51..dbfac9a55 100644
--- a/libkdepim/addresseediffalgo.h
+++ b/libkdepim/addresseediffalgo.h
@@ -36,10 +36,10 @@ class KDE_EXPORT AddresseeDiffAlgo : public DiffAlgo
private:
template <class L>
- void diffList( const QString &id, const QValueList<L> &left, const QValueList<L> &right );
+ void diffList( const TQString &id, const TQValueList<L> &left, const TQValueList<L> &right );
- QString toString( const KABC::PhoneNumber &number );
- QString toString( const KABC::Address &address );
+ TQString toString( const KABC::PhoneNumber &number );
+ TQString toString( const KABC::Address &address );
KABC::Addressee mLeftAddressee;
KABC::Addressee mRightAddressee;
diff --git a/libkdepim/addresseeemailselection.cpp b/libkdepim/addresseeemailselection.cpp
index d5a8c02a3..f5d840c9c 100644
--- a/libkdepim/addresseeemailselection.cpp
+++ b/libkdepim/addresseeemailselection.cpp
@@ -40,7 +40,7 @@ uint AddresseeEmailSelection::fieldCount() const
return 3;
}
-QString AddresseeEmailSelection::fieldTitle( uint index ) const
+TQString AddresseeEmailSelection::fieldTitle( uint index ) const
{
switch ( index ) {
case 0:
@@ -53,21 +53,21 @@ QString AddresseeEmailSelection::fieldTitle( uint index ) const
return i18n( "Bcc" );
break;
default:
- return QString::null;
+ return TQString::null;
}
}
-QStringList AddresseeEmailSelection::to() const
+TQStringList AddresseeEmailSelection::to() const
{
return mToEmailList;
}
-QStringList AddresseeEmailSelection::cc() const
+TQStringList AddresseeEmailSelection::cc() const
{
return mCcEmailList;
}
-QStringList AddresseeEmailSelection::bcc() const
+TQStringList AddresseeEmailSelection::bcc() const
{
return mBccEmailList;
}
@@ -87,32 +87,32 @@ KABC::Addressee::List AddresseeEmailSelection::bccAddresses() const
return mBccAddresseeList;
}
-QStringList AddresseeEmailSelection::toDistributionLists() const
+TQStringList AddresseeEmailSelection::toDistributionLists() const
{
return mToDistributionList;
}
-QStringList AddresseeEmailSelection::ccDistributionLists() const
+TQStringList AddresseeEmailSelection::ccDistributionLists() const
{
return mCcDistributionList;
}
-QStringList AddresseeEmailSelection::bccDistributionLists() const
+TQStringList AddresseeEmailSelection::bccDistributionLists() const
{
return mBccDistributionList;
}
-void AddresseeEmailSelection::setSelectedTo( const QStringList &emails )
+void AddresseeEmailSelection::setSelectedTo( const TQStringList &emails )
{
setSelectedItem( 0, emails );
}
-void AddresseeEmailSelection::setSelectedCC( const QStringList &emails )
+void AddresseeEmailSelection::setSelectedCC( const TQStringList &emails )
{
setSelectedItem( 1, emails );
}
-void AddresseeEmailSelection::setSelectedBCC( const QStringList &emails )
+void AddresseeEmailSelection::setSelectedBCC( const TQStringList &emails )
{
setSelectedItem( 2, emails );
}
@@ -123,12 +123,12 @@ uint AddresseeEmailSelection::itemCount( const KABC::Addressee &addressee ) cons
return addressee.emails().count();
}
-QString AddresseeEmailSelection::itemText( const KABC::Addressee &addressee, uint index ) const
+TQString AddresseeEmailSelection::itemText( const KABC::Addressee &addressee, uint index ) const
{
return addressee.formattedName() + " " + email( addressee, index );
}
-QPixmap AddresseeEmailSelection::itemIcon( const KABC::Addressee &addressee, uint ) const
+TQPixmap AddresseeEmailSelection::itemIcon( const KABC::Addressee &addressee, uint ) const
{
if ( !addressee.photo().data().isNull() )
return addressee.photo().data().smoothScale( 16, 16 );
@@ -141,24 +141,24 @@ bool AddresseeEmailSelection::itemEnabled( const KABC::Addressee &addressee, uin
return addressee.emails().count() != 0;
}
-bool AddresseeEmailSelection::itemMatches( const KABC::Addressee &addressee, uint index, const QString &pattern ) const
+bool AddresseeEmailSelection::itemMatches( const KABC::Addressee &addressee, uint index, const TQString &pattern ) const
{
return addressee.formattedName().startsWith( pattern, false ) ||
email( addressee, index ).startsWith( pattern, false );
}
-bool AddresseeEmailSelection::itemEquals( const KABC::Addressee &addressee, uint index, const QString &pattern ) const
+bool AddresseeEmailSelection::itemEquals( const KABC::Addressee &addressee, uint index, const TQString &pattern ) const
{
return (pattern == addressee.formattedName() + " " + email( addressee, index )) ||
(addressee.emails().contains( pattern ));
}
-QString AddresseeEmailSelection::distributionListText( const KABC::DistributionList *distributionList ) const
+TQString AddresseeEmailSelection::distributionListText( const KABC::DistributionList *distributionList ) const
{
return distributionList->name();
}
-QPixmap AddresseeEmailSelection::distributionListIcon( const KABC::DistributionList* ) const
+TQPixmap AddresseeEmailSelection::distributionListIcon( const KABC::DistributionList* ) const
{
return KGlobal::iconLoader()->loadIcon( "kdmconfig", KIcon::Small );
}
@@ -169,7 +169,7 @@ bool AddresseeEmailSelection::distributionListEnabled( const KABC::DistributionL
}
bool AddresseeEmailSelection::distributionListMatches( const KABC::DistributionList *distributionList,
- const QString &pattern ) const
+ const TQString &pattern ) const
{
// check whether the name of the distribution list matches the pattern or one of its entries.
bool ok = distributionList->name().startsWith( pattern, false );
@@ -190,12 +190,12 @@ uint AddresseeEmailSelection::addressBookCount() const
return 1;
}
-QString AddresseeEmailSelection::addressBookTitle( uint index ) const
+TQString AddresseeEmailSelection::addressBookTitle( uint index ) const
{
if ( index == 0 )
return i18n( "Recent Addresses" );
else
- return QString::null;
+ return TQString::null;
}
KABC::Addressee::List AddresseeEmailSelection::addressBookContent( uint index ) const
@@ -208,14 +208,14 @@ KABC::Addressee::List AddresseeEmailSelection::addressBookContent( uint index )
}
}
-QString AddresseeEmailSelection::email( const KABC::Addressee &addressee, uint index ) const
+TQString AddresseeEmailSelection::email( const KABC::Addressee &addressee, uint index ) const
{
return addressee.emails()[ index ];
}
-void AddresseeEmailSelection::setSelectedItem( uint fieldIndex, const QStringList &emails )
+void AddresseeEmailSelection::setSelectedItem( uint fieldIndex, const TQStringList &emails )
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = emails.begin(); it != emails.end(); ++it ) {
KABC::Addressee addr;
addr.insertEmail( *it, true );
diff --git a/libkdepim/addresseeemailselection.h b/libkdepim/addresseeemailselection.h
index ca96306f2..58acd8cb3 100644
--- a/libkdepim/addresseeemailselection.h
+++ b/libkdepim/addresseeemailselection.h
@@ -39,7 +39,7 @@ class KDE_EXPORT AddresseeEmailSelection : public Selection
/**
Returns the title for the field specified by index.
*/
- virtual QString fieldTitle( uint index ) const;
+ virtual TQString fieldTitle( uint index ) const;
/**
Returns the number of items for the given addressee.
@@ -49,12 +49,12 @@ class KDE_EXPORT AddresseeEmailSelection : public Selection
/**
Returns the text that's used for the item specified by index.
*/
- virtual QString itemText( const KABC::Addressee &addresse, uint index ) const;
+ virtual TQString itemText( const KABC::Addressee &addresse, uint index ) const;
/**
Returns the icon that's used for the item specified by index.
*/
- virtual QPixmap itemIcon( const KABC::Addressee &addresse, uint index ) const;
+ virtual TQPixmap itemIcon( const KABC::Addressee &addresse, uint index ) const;
/**
Returns whether the item specified by index is enabled.
@@ -64,22 +64,22 @@ class KDE_EXPORT AddresseeEmailSelection : public Selection
/**
Returns whether the item specified by index matches the passed pattern.
*/
- virtual bool itemMatches( const KABC::Addressee &addresse, uint index, const QString &pattern ) const;
+ virtual bool itemMatches( const KABC::Addressee &addresse, uint index, const TQString &pattern ) const;
/**
Returns whether the item specified by index equals the passed pattern.
*/
- virtual bool itemEquals( const KABC::Addressee &addresse, uint index, const QString &pattern ) const;
+ virtual bool itemEquals( const KABC::Addressee &addresse, uint index, const TQString &pattern ) const;
/**
Returns the text that's used for the given distribution list.
*/
- virtual QString distributionListText( const KABC::DistributionList *distributionList ) const;
+ virtual TQString distributionListText( const KABC::DistributionList *distributionList ) const;
/**
Returns the icon that's used for the given distribution list.
*/
- virtual QPixmap distributionListIcon( const KABC::DistributionList *distributionList ) const;
+ virtual TQPixmap distributionListIcon( const KABC::DistributionList *distributionList ) const;
/**
Returns whether the given distribution list is enabled.
@@ -90,7 +90,7 @@ class KDE_EXPORT AddresseeEmailSelection : public Selection
Returns whether the given distribution list matches the passed pattern.
*/
virtual bool distributionListMatches( const KABC::DistributionList *distributionList,
- const QString &pattern ) const;
+ const TQString &pattern ) const;
/**
Returns the number of additional address books.
@@ -100,47 +100,47 @@ class KDE_EXPORT AddresseeEmailSelection : public Selection
/**
Returns the title for an additional address book.
*/
- virtual QString addressBookTitle( uint index ) const;
+ virtual TQString addressBookTitle( uint index ) const;
/**
Returns the content for an additional address book.
*/
virtual KABC::Addressee::List addressBookContent( uint index ) const;
- QStringList to() const;
- QStringList cc() const;
- QStringList bcc() const;
+ TQStringList to() const;
+ TQStringList cc() const;
+ TQStringList bcc() const;
KABC::Addressee::List toAddresses() const;
KABC::Addressee::List ccAddresses() const;
KABC::Addressee::List bccAddresses() const;
- QStringList toDistributionLists() const;
- QStringList ccDistributionLists() const;
- QStringList bccDistributionLists() const;
+ TQStringList toDistributionLists() const;
+ TQStringList ccDistributionLists() const;
+ TQStringList bccDistributionLists() const;
- void setSelectedTo( const QStringList &emails );
- void setSelectedCC( const QStringList &emails );
- void setSelectedBCC( const QStringList &emails );
+ void setSelectedTo( const TQStringList &emails );
+ void setSelectedCC( const TQStringList &emails );
+ void setSelectedBCC( const TQStringList &emails );
private:
virtual void addSelectedAddressees( uint fieldIndex, const KABC::Addressee&, uint itemIndex );
virtual void addSelectedDistributionList( uint fieldIndex, const KABC::DistributionList* );
- QString email( const KABC::Addressee&, uint ) const;
- void setSelectedItem( uint fieldIndex, const QStringList& );
+ TQString email( const KABC::Addressee&, uint ) const;
+ void setSelectedItem( uint fieldIndex, const TQStringList& );
KABC::Addressee::List mToAddresseeList;
KABC::Addressee::List mCcAddresseeList;
KABC::Addressee::List mBccAddresseeList;
- QStringList mToEmailList;
- QStringList mCcEmailList;
- QStringList mBccEmailList;
+ TQStringList mToEmailList;
+ TQStringList mCcEmailList;
+ TQStringList mBccEmailList;
- QStringList mToDistributionList;
- QStringList mCcDistributionList;
- QStringList mBccDistributionList;
+ TQStringList mToDistributionList;
+ TQStringList mCcDistributionList;
+ TQStringList mBccDistributionList;
};
}
diff --git a/libkdepim/addresseelineedit.cpp b/libkdepim/addresseelineedit.cpp
index a40ad3551..7031a83eb 100644
--- a/libkdepim/addresseelineedit.cpp
+++ b/libkdepim/addresseelineedit.cpp
@@ -50,57 +50,57 @@
#include <kurldrag.h>
#include <klocale.h>
-#include <qpopupmenu.h>
-#include <qapplication.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qregexp.h>
-#include <qevent.h>
-#include <qdragobject.h>
-#include <qclipboard.h>
+#include <tqpopupmenu.h>
+#include <tqapplication.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqregexp.h>
+#include <tqevent.h>
+#include <tqdragobject.h>
+#include <tqclipboard.h>
using namespace KPIM;
KMailCompletion * AddresseeLineEdit::s_completion = 0L;
KPIM::CompletionItemsMap* AddresseeLineEdit::s_completionItemMap = 0L;
-QStringList* AddresseeLineEdit::s_completionSources = 0L;
+TQStringList* AddresseeLineEdit::s_completionSources = 0L;
bool AddresseeLineEdit::s_addressesDirty = false;
-QTimer* AddresseeLineEdit::s_LDAPTimer = 0L;
+TQTimer* AddresseeLineEdit::s_LDAPTimer = 0L;
KPIM::LdapSearch* AddresseeLineEdit::s_LDAPSearch = 0L;
-QString* AddresseeLineEdit::s_LDAPText = 0L;
+TQString* AddresseeLineEdit::s_LDAPText = 0L;
AddresseeLineEdit* AddresseeLineEdit::s_LDAPLineEdit = 0L;
static KStaticDeleter<KMailCompletion> completionDeleter;
static KStaticDeleter<KPIM::CompletionItemsMap> completionItemsDeleter;
-static KStaticDeleter<QTimer> ldapTimerDeleter;
+static KStaticDeleter<TQTimer> ldapTimerDeleter;
static KStaticDeleter<KPIM::LdapSearch> ldapSearchDeleter;
-static KStaticDeleter<QString> ldapTextDeleter;
-static KStaticDeleter<QStringList> completionSourcesDeleter;
+static KStaticDeleter<TQString> ldapTextDeleter;
+static KStaticDeleter<TQStringList> completionSourcesDeleter;
// needs to be unique, but the actual name doesn't matter much
-static QCString newLineEditDCOPObjectName()
+static TQCString newLineEditDCOPObjectName()
{
static int s_count = 0;
- QCString name( "KPIM::AddresseeLineEdit" );
+ TQCString name( "KPIM::AddresseeLineEdit" );
if ( s_count++ ) {
name += '-';
- name += QCString().setNum( s_count );
+ name += TQCString().setNum( s_count );
}
return name;
}
-static const QString s_completionItemIndentString = " ";
+static const TQString s_completionItemIndentString = " ";
-static bool itemIsHeader( const QListBoxItem* item )
+static bool itemIsHeader( const TQListBoxItem* item )
{
return item && !item->text().startsWith( s_completionItemIndentString );
}
-AddresseeLineEdit::AddresseeLineEdit( QWidget* parent, bool useCompletion,
+AddresseeLineEdit::AddresseeLineEdit( TQWidget* parent, bool useCompletion,
const char *name )
- : ClickLineEdit( parent, QString::null, name ), DCOPObject( newLineEditDCOPObjectName() )
+ : ClickLineEdit( parent, TQString::null, name ), DCOPObject( newLineEditDCOPObjectName() )
{
m_useCompletion = useCompletion;
m_completionInitialized = false;
@@ -123,46 +123,46 @@ void AddresseeLineEdit::init()
s_completion->setIgnoreCase( true );
completionItemsDeleter.setObject( s_completionItemMap, new KPIM::CompletionItemsMap() );
- completionSourcesDeleter.setObject( s_completionSources, new QStringList() );
+ completionSourcesDeleter.setObject( s_completionSources, new TQStringList() );
}
-// connect( s_completion, SIGNAL( match( const QString& ) ),
-// this, SLOT( slotMatched( const QString& ) ) );
+// connect( s_completion, TQT_SIGNAL( match( const TQString& ) ),
+// this, TQT_SLOT( slotMatched( const TQString& ) ) );
if ( m_useCompletion ) {
if ( !s_LDAPTimer ) {
- ldapTimerDeleter.setObject( s_LDAPTimer, new QTimer( 0, "ldapTimerDeleter" ) );
+ ldapTimerDeleter.setObject( s_LDAPTimer, new TQTimer( 0, "ldapTimerDeleter" ) );
ldapSearchDeleter.setObject( s_LDAPSearch, new KPIM::LdapSearch );
- ldapTextDeleter.setObject( s_LDAPText, new QString );
+ ldapTextDeleter.setObject( s_LDAPText, new TQString );
/* Add completion sources for all ldap server, 0 to n. Added first so
* that they map to the ldapclient::clientNumber() */
- QValueList< LdapClient* > clients = s_LDAPSearch->clients();
- for ( QValueList<LdapClient*>::iterator it = clients.begin(); it != clients.end(); ++it ) {
+ TQValueList< LdapClient* > clients = s_LDAPSearch->clients();
+ for ( TQValueList<LdapClient*>::iterator it = clients.begin(); it != clients.end(); ++it ) {
addCompletionSource( "LDAP server: " + (*it)->server().host() );
}
}
if ( !m_completionInitialized ) {
setCompletionObject( s_completion, false );
- connect( this, SIGNAL( completion( const QString& ) ),
- this, SLOT( slotCompletion() ) );
- connect( this, SIGNAL( returnPressed( const QString& ) ),
- this, SLOT( slotReturnPressed( const QString& ) ) );
+ connect( this, TQT_SIGNAL( completion( const TQString& ) ),
+ this, TQT_SLOT( slotCompletion() ) );
+ connect( this, TQT_SIGNAL( returnPressed( const TQString& ) ),
+ this, TQT_SLOT( slotReturnPressed( const TQString& ) ) );
KCompletionBox *box = completionBox();
- connect( box, SIGNAL( highlighted( const QString& ) ),
- this, SLOT( slotPopupCompletion( const QString& ) ) );
- connect( box, SIGNAL( userCancelled( const QString& ) ),
- SLOT( slotUserCancelled( const QString& ) ) );
+ connect( box, TQT_SIGNAL( highlighted( const TQString& ) ),
+ this, TQT_SLOT( slotPopupCompletion( const TQString& ) ) );
+ connect( box, TQT_SIGNAL( userCancelled( const TQString& ) ),
+ TQT_SLOT( slotUserCancelled( const TQString& ) ) );
// The emitter is always called KPIM::IMAPCompletionOrder by contract
if ( !connectDCOPSignal( 0, "KPIM::IMAPCompletionOrder", "orderChanged()",
"slotIMAPCompletionOrderChanged()", false ) )
kdError() << "AddresseeLineEdit: connection to orderChanged() failed" << endl;
- connect( s_LDAPTimer, SIGNAL( timeout() ), SLOT( slotStartLDAPLookup() ) );
- connect( s_LDAPSearch, SIGNAL( searchData( const KPIM::LdapResultList& ) ),
- SLOT( slotLDAPSearchData( const KPIM::LdapResultList& ) ) );
+ connect( s_LDAPTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotStartLDAPLookup() ) );
+ connect( s_LDAPSearch, TQT_SIGNAL( searchData( const KPIM::LdapResultList& ) ),
+ TQT_SLOT( slotLDAPSearchData( const KPIM::LdapResultList& ) ) );
m_completionInitialized = true;
}
@@ -175,7 +175,7 @@ AddresseeLineEdit::~AddresseeLineEdit()
stopLDAPLookup();
}
-void AddresseeLineEdit::setFont( const QFont& font )
+void AddresseeLineEdit::setFont( const TQFont& font )
{
KLineEdit::setFont( font );
if ( m_useCompletion )
@@ -187,7 +187,7 @@ void AddresseeLineEdit::allowSemiColonAsSeparator( bool useSemiColonAsSeparator
m_useSemiColonAsSeparator = useSemiColonAsSeparator;
}
-void AddresseeLineEdit::keyPressEvent( QKeyEvent *e )
+void AddresseeLineEdit::keyPressEvent( TQKeyEvent *e )
{
bool accept = false;
@@ -211,7 +211,7 @@ void AddresseeLineEdit::keyPressEvent( QKeyEvent *e )
if ( e->isAccepted() ) {
updateSearchString();
- QString searchString( m_searchString );
+ TQString searchString( m_searchString );
//LDAP does not know about our string manipulation, remove it
if ( m_searchExtended )
searchString = m_searchString.mid( 1 );
@@ -227,7 +227,7 @@ void AddresseeLineEdit::keyPressEvent( QKeyEvent *e )
}
}
-void AddresseeLineEdit::insert( const QString &t )
+void AddresseeLineEdit::insert( const TQString &t )
{
if ( !m_smartPaste ) {
KLineEdit::insert( t );
@@ -236,16 +236,16 @@ void AddresseeLineEdit::insert( const QString &t )
//kdDebug(5300) << " AddresseeLineEdit::insert( \"" << t << "\" )" << endl;
- QString newText = t.stripWhiteSpace();
+ TQString newText = t.stripWhiteSpace();
if ( newText.isEmpty() )
return;
// remove newlines in the to-be-pasted string
- QStringList lines = QStringList::split( QRegExp("\r?\n"), newText, false );
- for ( QStringList::iterator it = lines.begin();
+ TQStringList lines = TQStringList::split( TQRegExp("\r?\n"), newText, false );
+ for ( TQStringList::iterator it = lines.begin();
it != lines.end(); ++it ) {
// remove trailing commas and whitespace
- (*it).remove( QRegExp(",?\\s*$") );
+ (*it).remove( TQRegExp(",?\\s*$") );
}
newText = lines.join( ", " );
@@ -259,10 +259,10 @@ void AddresseeLineEdit::insert( const QString &t )
newText.replace( " dot ", "." );
}
else if ( newText.find("(at)") != -1 ) {
- newText.replace( QRegExp("\\s*\\(at\\)\\s*"), "@" );
+ newText.replace( TQRegExp("\\s*\\(at\\)\\s*"), "@" );
}
- QString contents = text();
+ TQString contents = text();
int start_sel = 0;
int end_sel = 0;
int pos = cursorPosition( );
@@ -278,7 +278,7 @@ void AddresseeLineEdit::insert( const QString &t )
int eot = contents.length();
while ((eot > 0) && contents[ eot - 1 ].isSpace() ) eot--;
if ( eot == 0 )
- contents = QString::null;
+ contents = TQString::null;
else if ( pos >= eot ) {
if ( contents[ eot - 1 ] == ',' )
eot--;
@@ -293,7 +293,7 @@ void AddresseeLineEdit::insert( const QString &t )
setCursorPosition( pos + newText.length() );
}
-void AddresseeLineEdit::setText( const QString & text )
+void AddresseeLineEdit::setText( const TQString & text )
{
ClickLineEdit::setText( text.stripWhiteSpace() );
}
@@ -307,11 +307,11 @@ void AddresseeLineEdit::paste()
m_smartPaste = false;
}
-void AddresseeLineEdit::mouseReleaseEvent( QMouseEvent *e )
+void AddresseeLineEdit::mouseReleaseEvent( TQMouseEvent *e )
{
- // reimplemented from QLineEdit::mouseReleaseEvent()
+ // reimplemented from TQLineEdit::mouseReleaseEvent()
if ( m_useCompletion
- && QApplication::clipboard()->supportsSelection()
+ && TQApplication::clipboard()->supportsSelection()
&& !isReadOnly()
&& e->button() == MidButton ) {
m_smartPaste = true;
@@ -321,18 +321,18 @@ void AddresseeLineEdit::mouseReleaseEvent( QMouseEvent *e )
m_smartPaste = false;
}
-void AddresseeLineEdit::dropEvent( QDropEvent *e )
+void AddresseeLineEdit::dropEvent( TQDropEvent *e )
{
KURL::List uriList;
if ( !isReadOnly()
&& KURLDrag::canDecode(e) && KURLDrag::decode( e, uriList ) ) {
- QString contents = text();
+ TQString contents = text();
// remove trailing white space and comma
int eot = contents.length();
while ( ( eot > 0 ) && contents[ eot - 1 ].isSpace() )
eot--;
if ( eot == 0 )
- contents = QString::null;
+ contents = TQString::null;
else if ( contents[ eot - 1 ] == ',' ) {
eot--;
contents.truncate( eot );
@@ -358,7 +358,7 @@ void AddresseeLineEdit::dropEvent( QDropEvent *e )
if ( m_useCompletion )
m_smartPaste = true;
- QLineEdit::dropEvent( e );
+ TQLineEdit::dropEvent( e );
m_smartPaste = false;
}
@@ -388,7 +388,7 @@ void AddresseeLineEdit::doCompletion( bool ctrlT )
// cursor at end of string - or Ctrl+T pressed for substring completion?
if ( ctrlT ) {
- const QStringList completions = getAdjustedCompletionItems( false );
+ const TQStringList completions = getAdjustedCompletionItems( false );
if ( completions.count() > 1 )
; //m_previousAddresses = prevAddr;
@@ -412,14 +412,14 @@ void AddresseeLineEdit::doCompletion( bool ctrlT )
case KGlobalSettings::CompletionPopup:
{
- const QStringList items = getAdjustedCompletionItems( true );
+ const TQStringList items = getAdjustedCompletionItems( true );
setCompletedItems( items, false );
break;
}
case KGlobalSettings::CompletionShell:
{
- QString match = s_completion->makeCompletion( m_searchString );
+ TQString match = s_completion->makeCompletion( m_searchString );
if ( !match.isNull() && match != m_searchString ) {
setText( m_previousAddresses + match );
setEdited( true );
@@ -439,16 +439,16 @@ void AddresseeLineEdit::doCompletion( bool ctrlT )
//if only our \" is left, remove it since user has not typed it either
if ( m_searchExtended && m_searchString == "\"" ){
m_searchExtended = false;
- m_searchString = QString::null;
+ m_searchString = TQString::null;
setText( m_previousAddresses );
break;
}
- QString match = s_completion->makeCompletion( m_searchString );
+ TQString match = s_completion->makeCompletion( m_searchString );
if ( !match.isEmpty() ) {
if ( match != m_searchString ) {
- QString adds = m_previousAddresses + match;
+ TQString adds = m_previousAddresses + match;
setCompletedText( adds );
}
} else {
@@ -469,7 +469,7 @@ void AddresseeLineEdit::doCompletion( bool ctrlT )
//now try again
match = s_completion->makeCompletion( m_searchString );
if ( !match.isEmpty() && match != m_searchString ) {
- QString adds = m_previousAddresses + match;
+ TQString adds = m_previousAddresses + match;
setCompletedText( adds );
}
}
@@ -484,7 +484,7 @@ void AddresseeLineEdit::doCompletion( bool ctrlT )
}
}
-void AddresseeLineEdit::slotPopupCompletion( const QString& completion )
+void AddresseeLineEdit::slotPopupCompletion( const TQString& completion )
{
setText( m_previousAddresses + completion.stripWhiteSpace() );
cursorAtEnd();
@@ -492,10 +492,10 @@ void AddresseeLineEdit::slotPopupCompletion( const QString& completion )
updateSearchString();
}
-void AddresseeLineEdit::slotReturnPressed( const QString& item )
+void AddresseeLineEdit::slotReturnPressed( const TQString& item )
{
Q_UNUSED( item );
- QListBoxItem* i = completionBox()->selectedItem();
+ TQListBoxItem* i = completionBox()->selectedItem();
if ( i != 0 )
slotPopupCompletion( i->text() );
}
@@ -507,7 +507,7 @@ void AddresseeLineEdit::loadContacts()
s_addressesDirty = false;
//m_contactMap.clear();
- QApplication::setOverrideCursor( KCursor::waitCursor() ); // loading might take a while
+ TQApplication::setOverrideCursor( KCursor::waitCursor() ); // loading might take a while
KConfig config( "kpimcompletionorder" ); // The weights for non-imap kabc resources is there.
config.setGroup( "CompletionWeights" );
@@ -515,17 +515,17 @@ void AddresseeLineEdit::loadContacts()
KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );
// Can't just use the addressbook's iterator, we need to know which subresource
// is behind which contact.
- QPtrList<KABC::Resource> resources( addressBook->resources() );
- for( QPtrListIterator<KABC::Resource> resit( resources ); *resit; ++resit ) {
+ TQPtrList<KABC::Resource> resources( addressBook->resources() );
+ for( TQPtrListIterator<KABC::Resource> resit( resources ); *resit; ++resit ) {
KABC::Resource* resource = *resit;
KPIM::ResourceABC* resabc = dynamic_cast<ResourceABC *>( resource );
if ( resabc ) { // IMAP KABC resource; need to associate each contact with the subresource
- const QMap<QString, QString> uidToResourceMap = resabc->uidToResourceMap();
+ const TQMap<TQString, TQString> uidToResourceMap = resabc->uidToResourceMap();
KABC::Resource::Iterator it;
for ( it = resource->begin(); it != resource->end(); ++it ) {
- QString uid = (*it).uid();
- QMap<QString, QString>::const_iterator wit = uidToResourceMap.find( uid );
- const QString subresourceLabel = resabc->subresourceLabel( *wit );
+ TQString uid = (*it).uid();
+ TQMap<TQString, TQString>::const_iterator wit = uidToResourceMap.find( uid );
+ const TQString subresourceLabel = resabc->subresourceLabel( *wit );
int idx = s_completionSources->findIndex( subresourceLabel );
if ( idx == -1 ) {
s_completionSources->append( subresourceLabel );
@@ -548,8 +548,8 @@ void AddresseeLineEdit::loadContacts()
int weight = config.readNumEntry( "DistributionLists", 60 );
KABC::DistributionListManager manager( addressBook );
manager.load();
- const QStringList distLists = manager.listNames();
- QStringList::const_iterator listIt;
+ const TQStringList distLists = manager.listNames();
+ TQStringList::const_iterator listIt;
int idx = addCompletionSource( i18n( "Distribution Lists" ) );
for ( listIt = distLists.begin(); listIt != distLists.end(); ++listIt ) {
@@ -557,16 +557,16 @@ void AddresseeLineEdit::loadContacts()
addCompletionItem( (*listIt).simplifyWhiteSpace(), weight, idx );
//for CompletionShell, CompletionPopup
- QStringList sl( (*listIt).simplifyWhiteSpace() );
+ TQStringList sl( (*listIt).simplifyWhiteSpace() );
addCompletionItem( (*listIt).simplifyWhiteSpace(), weight, idx, &sl );
}
#endif
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if ( !m_addressBookConnected ) {
- connect( addressBook, SIGNAL( addressBookChanged( AddressBook* ) ), SLOT( loadContacts() ) );
+ connect( addressBook, TQT_SIGNAL( addressBookChanged( AddressBook* ) ), TQT_SLOT( loadContacts() ) );
m_addressBookConnected = true;
}
}
@@ -581,33 +581,33 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int
addCompletionItem( addr.formattedName(), weight, source );
//for CompletionShell, CompletionPopup
- QStringList sl( addr.formattedName() );
+ TQStringList sl( addr.formattedName() );
addCompletionItem( addr.formattedName(), weight, source, &sl );
return;
}
#endif
//m_contactMap.insert( addr.realName(), addr );
- const QStringList emails = addr.emails();
- QStringList::ConstIterator it;
+ const TQStringList emails = addr.emails();
+ TQStringList::ConstIterator it;
const int prefEmailWeight = 1; //increment weight by prefEmailWeight
int isPrefEmail = prefEmailWeight; //first in list is preferredEmail
for ( it = emails.begin(); it != emails.end(); ++it ) {
//TODO: highlight preferredEmail
- const QString email( (*it) );
- const QString givenName = addr.givenName();
- const QString familyName= addr.familyName();
- const QString nickName = addr.nickName();
- const QString domain = email.mid( email.find( '@' ) + 1 );
- QString fullEmail = addr.fullEmail( email );
+ const TQString email( (*it) );
+ const TQString givenName = addr.givenName();
+ const TQString familyName= addr.familyName();
+ const TQString nickName = addr.nickName();
+ const TQString domain = email.mid( email.find( '@' ) + 1 );
+ TQString fullEmail = addr.fullEmail( email );
//TODO: let user decide what fields to use in lookup, e.g. company, city, ...
//for CompletionAuto
if ( givenName.isEmpty() && familyName.isEmpty() ) {
addCompletionItem( fullEmail, weight + isPrefEmail, source ); // use whatever is there
} else {
- const QString byFirstName= "\"" + givenName + " " + familyName + "\" <" + email + ">";
- const QString byLastName = "\"" + familyName + ", " + givenName + "\" <" + email + ">";
+ const TQString byFirstName= "\"" + givenName + " " + familyName + "\" <" + email + ">";
+ const TQString byLastName = "\"" + familyName + ", " + givenName + "\" <" + email + ">";
addCompletionItem( byFirstName, weight + isPrefEmail, source );
addCompletionItem( byLastName, weight + isPrefEmail, source );
}
@@ -615,18 +615,18 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int
addCompletionItem( email, weight + isPrefEmail, source );
if ( !nickName.isEmpty() ){
- const QString byNick = "\"" + nickName + "\" <" + email + ">";
+ const TQString byNick = "\"" + nickName + "\" <" + email + ">";
addCompletionItem( byNick, weight + isPrefEmail, source );
}
if ( !domain.isEmpty() ){
- const QString byDomain = "\"" + domain + " " + familyName + " " + givenName + "\" <" + email + ">";
+ const TQString byDomain = "\"" + domain + " " + familyName + " " + givenName + "\" <" + email + ">";
addCompletionItem( byDomain, weight + isPrefEmail, source );
}
//for CompletionShell, CompletionPopup
- QStringList keyWords;
- const QString realName = addr.realName();
+ TQStringList keyWords;
+ const TQString realName = addr.realName();
if ( !givenName.isEmpty() && !familyName.isEmpty() ) {
keyWords.append( givenName + " " + familyName );
@@ -665,14 +665,14 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int
if ( len == 0 ) continue;
if( '\0' == (*it)[len-1] )
--len;
- const QString tmp = (*it).left( len );
- const QString fullEmail = addr.fullEmail( tmp );
+ const TQString tmp = (*it).left( len );
+ const TQString fullEmail = addr.fullEmail( tmp );
//kdDebug(5300) << "AddresseeLineEdit::addContact() \"" << fullEmail << "\" weight=" << weight << endl;
addCompletionItem( fullEmail.simplifyWhiteSpace(), weight, source );
// Try to guess the last name: if found, we add an extra
// entry to the list to make sure completion works even
// if the user starts by typing in the last name.
- QString name( addr.realName().simplifyWhiteSpace() );
+ TQString name( addr.realName().simplifyWhiteSpace() );
if( name.endsWith("\"") )
name.truncate( name.length()-1 );
if( name.startsWith("\"") )
@@ -685,7 +685,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int
bool bDone = false;
int i = -1;
while( ( i = name.findRev(' ') ) > 1 && !bDone ) {
- QString sLastName( name.mid( i+1 ) );
+ TQString sLastName( name.mid( i+1 ) );
if( ! sLastName.isEmpty() &&
2 <= sLastName.length() && // last names must be at least 2 chars long
! sLastName.endsWith(".") ) { // last names must not end with a dot (like "Jr." or "Sr.")
@@ -694,7 +694,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int
sLastName.prepend( "\"" );
sLastName.append( ", " + name + "\" <" );
}
- QString sExtraEntry( sLastName );
+ TQString sExtraEntry( sLastName );
sExtraEntry.append( tmp.isEmpty() ? addr.preferredEmail() : tmp );
sExtraEntry.append( ">" );
//kdDebug(5300) << "AddresseeLineEdit::addContact() added extra \"" << sExtraEntry.simplifyWhiteSpace() << "\" weight=" << weight << endl;
@@ -711,7 +711,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int
}
}
-void AddresseeLineEdit::addCompletionItem( const QString& string, int weight, int completionItemSource, const QStringList * keyWords )
+void AddresseeLineEdit::addCompletionItem( const TQString& string, int weight, int completionItemSource, const TQStringList * keyWords )
{
// Check if there is an exact match for item already, and use the max weight if so.
// Since there's no way to get the information from KCompletion, we have to keep our own QMap
@@ -747,9 +747,9 @@ void AddresseeLineEdit::stopLDAPLookup()
void AddresseeLineEdit::startLoadingLDAPEntries()
{
- QString s( *s_LDAPText );
+ TQString s( *s_LDAPText );
// TODO cache last?
- QString prevAddr;
+ TQString prevAddr;
int n = s.findRev( ',' );
if ( n >= 0 ) {
prevAddr = s.left( n + 1 ) + ' ';
@@ -784,18 +784,18 @@ void AddresseeLineEdit::slotLDAPSearchData( const KPIM::LdapResultList& adrs )
}
}
-void AddresseeLineEdit::setCompletedItems( const QStringList& items, bool autoSuggest )
+void AddresseeLineEdit::setCompletedItems( const TQStringList& items, bool autoSuggest )
{
KCompletionBox* completionBox = this->completionBox();
if ( !items.isEmpty() &&
!(items.count() == 1 && m_searchString == items.first()) )
{
- QString oldCurrentText = completionBox->currentText();
- QListBoxItem *itemUnderMouse = completionBox->itemAt(
- completionBox->viewport()->mapFromGlobal(QCursor::pos()) );
- QString oldTextUnderMouse;
- QPoint oldPosOfItemUnderMouse;
+ TQString oldCurrentText = completionBox->currentText();
+ TQListBoxItem *itemUnderMouse = completionBox->itemAt(
+ completionBox->viewport()->mapFromGlobal(TQCursor::pos()) );
+ TQString oldTextUnderMouse;
+ TQPoint oldPosOfItemUnderMouse;
if ( itemUnderMouse ) {
oldTextUnderMouse = itemUnderMouse->text();
oldPosOfItemUnderMouse = completionBox->itemRect( itemUnderMouse ).topLeft();
@@ -816,7 +816,7 @@ void AddresseeLineEdit::setCompletedItems( const QStringList& items, bool autoSu
// Try to re-select what was selected before, otherrwise use the first
// item, if there is one
- QListBoxItem* item = 0;
+ TQListBoxItem* item = 0;
if ( oldCurrentText.isEmpty()
|| ( item = completionBox->findItem( oldCurrentText ) ) == 0 ) {
item = completionBox->item( 1 );
@@ -824,15 +824,15 @@ void AddresseeLineEdit::setCompletedItems( const QStringList& items, bool autoSu
if ( item )
{
if ( itemUnderMouse ) {
- QListBoxItem *newItemUnderMouse = completionBox->findItem( oldTextUnderMouse );
+ TQListBoxItem *newItemUnderMouse = completionBox->findItem( oldTextUnderMouse );
// if the mouse was over an item, before, but now that's elsewhere,
// move the cursor, so folks don't accidently click the wrong item
if ( newItemUnderMouse ) {
- QRect r = completionBox->itemRect( newItemUnderMouse );
- QPoint target = r.topLeft();
+ TQRect r = completionBox->itemRect( newItemUnderMouse );
+ TQPoint target = r.topLeft();
if ( oldPosOfItemUnderMouse != target ) {
target.setX( target.x() + r.width()/2 );
- QCursor::setPos( completionBox->viewport()->mapToGlobal(target) );
+ TQCursor::setPos( completionBox->viewport()->mapToGlobal(target) );
}
}
}
@@ -847,7 +847,7 @@ void AddresseeLineEdit::setCompletedItems( const QStringList& items, bool autoSu
if ( autoSuggest )
{
int index = items.first().find( m_searchString );
- QString newText = items.first().mid( index );
+ TQString newText = items.first().mid( index );
setUserSelection(false);
setCompletedText(newText,true);
}
@@ -856,14 +856,14 @@ void AddresseeLineEdit::setCompletedItems( const QStringList& items, bool autoSu
{
if ( completionBox && completionBox->isVisible() ) {
completionBox->hide();
- completionBox->setItems( QStringList() );
+ completionBox->setItems( TQStringList() );
}
}
}
-QPopupMenu* AddresseeLineEdit::createPopupMenu()
+TQPopupMenu* AddresseeLineEdit::createPopupMenu()
{
- QPopupMenu *menu = KLineEdit::createPopupMenu();
+ TQPopupMenu *menu = KLineEdit::createPopupMenu();
if ( !menu )
return 0;
@@ -871,7 +871,7 @@ QPopupMenu* AddresseeLineEdit::createPopupMenu()
menu->setItemVisible( ShortAutoCompletion, false );
menu->setItemVisible( PopupAutoCompletion, false );
menu->insertItem( i18n( "Configure Completion Order..." ),
- this, SLOT( slotEditCompletionOrder() ) );
+ this, TQT_SLOT( slotEditCompletionOrder() ) );
}
return menu;
}
@@ -889,7 +889,7 @@ void KPIM::AddresseeLineEdit::slotIMAPCompletionOrderChanged()
s_addressesDirty = true;
}
-void KPIM::AddresseeLineEdit::slotUserCancelled( const QString& cancelText )
+void KPIM::AddresseeLineEdit::slotUserCancelled( const TQString& cancelText )
{
if ( s_LDAPSearch && s_LDAPLineEdit == this )
stopLDAPLookup();
@@ -927,7 +927,7 @@ void AddresseeLineEdit::updateSearchString()
}
else
{
- m_previousAddresses = QString::null;
+ m_previousAddresses = TQString::null;
}
}
@@ -946,7 +946,7 @@ KCompletion::CompOrder KPIM::AddresseeLineEdit::completionOrder()
{
KConfig config( "kpimcompletionorder" );
config.setGroup( "General" );
- const QString order = config.readEntry( "CompletionOrder", "Weighted" );
+ const TQString order = config.readEntry( "CompletionOrder", "Weighted" );
if ( order == "Weighted" )
return KCompletion::Weighted;
@@ -954,30 +954,30 @@ KCompletion::CompOrder KPIM::AddresseeLineEdit::completionOrder()
return KCompletion::Sorted;
}
-int KPIM::AddresseeLineEdit::addCompletionSource( const QString &source )
+int KPIM::AddresseeLineEdit::addCompletionSource( const TQString &source )
{
s_completionSources->append( source );
return s_completionSources->size()-1;
}
-bool KPIM::AddresseeLineEdit::eventFilter(QObject *obj, QEvent *e)
+bool KPIM::AddresseeLineEdit::eventFilter(TQObject *obj, TQEvent *e)
{
if ( obj == completionBox() ) {
- if ( e->type() == QEvent::MouseButtonPress
- || e->type() == QEvent::MouseMove
- || e->type() == QEvent::MouseButtonRelease ) {
- QMouseEvent* me = static_cast<QMouseEvent*>( e );
+ if ( e->type() == TQEvent::MouseButtonPress
+ || e->type() == TQEvent::MouseMove
+ || e->type() == TQEvent::MouseButtonRelease ) {
+ TQMouseEvent* me = static_cast<TQMouseEvent*>( e );
// find list box item at the event position
- QListBoxItem *item = completionBox()->itemAt( me->pos() );
+ TQListBoxItem *item = completionBox()->itemAt( me->pos() );
if ( !item ) {
// In the case of a mouse move outside of the box we don't want
// the parent to fuzzy select a header by mistake.
- bool eat = e->type() == QEvent::MouseMove;
+ bool eat = e->type() == TQEvent::MouseMove;
return eat;
}
// avoid selection of headers on button press, or move or release while
// a button is pressed
- if ( e->type() == QEvent::MouseButtonPress
+ if ( e->type() == TQEvent::MouseButtonPress
|| me->state() & LeftButton || me->state() & MidButton
|| me->state() & RightButton ) {
if ( itemIsHeader(item) ) {
@@ -988,30 +988,30 @@ bool KPIM::AddresseeLineEdit::eventFilter(QObject *obj, QEvent *e)
// to fuzzy auto-selection from QListBox
completionBox()->setCurrentItem( item );
completionBox()->setSelected( completionBox()->index( item ), true );
- if ( e->type() == QEvent::MouseMove )
+ if ( e->type() == TQEvent::MouseMove )
return true; // avoid fuzzy selection behavior
}
}
}
}
if ( ( obj == this ) &&
- ( e->type() == QEvent::AccelOverride ) ) {
- QKeyEvent *ke = static_cast<QKeyEvent*>( e );
+ ( e->type() == TQEvent::AccelOverride ) ) {
+ TQKeyEvent *ke = static_cast<TQKeyEvent*>( e );
if ( ke->key() == Key_Up || ke->key() == Key_Down || ke->key() == Key_Tab ) {
ke->accept();
return true;
}
}
if ( ( obj == this ) &&
- ( e->type() == QEvent::KeyPress ) &&
+ ( e->type() == TQEvent::KeyPress ) &&
completionBox()->isVisible() ) {
- QKeyEvent *ke = static_cast<QKeyEvent*>( e );
+ TQKeyEvent *ke = static_cast<TQKeyEvent*>( e );
unsigned int currentIndex = completionBox()->currentItem();
if ( ke->key() == Key_Up ) {
//kdDebug() << "EVENTFILTER: Key_Up currentIndex=" << currentIndex << endl;
// figure out if the item we would be moving to is one we want
// to ignore. If so, go one further
- QListBoxItem *itemAbove = completionBox()->item( currentIndex - 1 );
+ TQListBoxItem *itemAbove = completionBox()->item( currentIndex - 1 );
if ( itemAbove && itemIsHeader(itemAbove) ) {
// there is a header above us, check if there is even further up
// and if so go one up, so it'll be selected
@@ -1030,7 +1030,7 @@ bool KPIM::AddresseeLineEdit::eventFilter(QObject *obj, QEvent *e)
} else if ( ke->key() == Key_Down ) {
// same strategy for downwards
//kdDebug() << "EVENTFILTER: Key_Down. currentIndex=" << currentIndex << endl;
- QListBoxItem *itemBelow = completionBox()->item( currentIndex + 1 );
+ TQListBoxItem *itemBelow = completionBox()->item( currentIndex + 1 );
if ( itemBelow && itemIsHeader( itemBelow ) ) {
if ( completionBox()->item( currentIndex + 2 ) ) {
//kdDebug() << "EVENTFILTER: Key_Down -> skipping " << currentIndex+1 << endl;
@@ -1049,13 +1049,13 @@ bool KPIM::AddresseeLineEdit::eventFilter(QObject *obj, QEvent *e)
// special case of the initial selection, which is unfortunately a header.
// Setting it to selected tricks KCompletionBox into not treating is special
// and selecting making it current, instead of the one below.
- QListBoxItem *item = completionBox()->item( currentIndex );
+ TQListBoxItem *item = completionBox()->item( currentIndex );
if ( item && itemIsHeader(item) ) {
completionBox()->setSelected( currentIndex, true );
}
} else if ( ke->key() == Key_Tab || ke->key() == Key_Backtab ) {
/// first, find the header of teh current section
- QListBoxItem *myHeader = 0;
+ TQListBoxItem *myHeader = 0;
int i = currentIndex;
while ( i>=0 ) {
if ( itemIsHeader( completionBox()->item(i) ) ) {
@@ -1067,7 +1067,7 @@ bool KPIM::AddresseeLineEdit::eventFilter(QObject *obj, QEvent *e)
Q_ASSERT( myHeader ); // we should always be able to find a header
// find the next header (searching backwards, for Key_Backtab
- QListBoxItem *nextHeader = 0;
+ TQListBoxItem *nextHeader = 0;
const int iterationstep = ke->key() == Key_Tab ? 1 : -1;
// when iterating forward, start at the currentindex, when backwards,
// one up from our header, or at the end
@@ -1079,7 +1079,7 @@ bool KPIM::AddresseeLineEdit::eventFilter(QObject *obj, QEvent *e)
j = (j + iterationstep) % completionBox()->count();
}
if ( nextHeader && nextHeader != myHeader ) {
- QListBoxItem *item = completionBox()->item( j + 1 );
+ TQListBoxItem *item = completionBox()->item( j + 1 );
if ( item && !itemIsHeader(item) ) {
completionBox()->setSelected( j+1, true );
completionBox()->setCurrentItem( item );
@@ -1092,23 +1092,23 @@ bool KPIM::AddresseeLineEdit::eventFilter(QObject *obj, QEvent *e)
return ClickLineEdit::eventFilter( obj, e );
}
-const QStringList KPIM::AddresseeLineEdit::getAdjustedCompletionItems( bool fullSearch )
+const TQStringList KPIM::AddresseeLineEdit::getAdjustedCompletionItems( bool fullSearch )
{
- QStringList items = fullSearch ?
+ TQStringList items = fullSearch ?
s_completion->allMatches( m_searchString )
: s_completion->substringCompletion( m_searchString );
int lastSourceIndex = -1;
unsigned int i = 0;
- QMap<int, QStringList> sections;
- QStringList sortedItems;
- for ( QStringList::Iterator it = items.begin(); it != items.end(); ++it, ++i ) {
+ TQMap<int, TQStringList> sections;
+ TQStringList sortedItems;
+ for ( TQStringList::Iterator it = items.begin(); it != items.end(); ++it, ++i ) {
CompletionItemsMap::const_iterator cit = s_completionItemMap->find(*it);
if ( cit == s_completionItemMap->end() )continue;
int idx = (*cit).second;
if ( s_completion->order() == KCompletion::Weighted ) {
if ( lastSourceIndex == -1 || lastSourceIndex != idx ) {
- const QString sourceLabel( (*s_completionSources)[idx] );
+ const TQString sourceLabel( (*s_completionSources)[idx] );
if ( sections.find(idx) == sections.end() ) {
items.insert( it, sourceLabel );
}
@@ -1125,9 +1125,9 @@ const QStringList KPIM::AddresseeLineEdit::getAdjustedCompletionItems( bool full
}
}
if ( s_completion->order() == KCompletion::Weighted ) {
- for ( QMap<int, QStringList>::Iterator it( sections.begin() ), end( sections.end() ); it != end; ++it ) {
+ for ( TQMap<int, TQStringList>::Iterator it( sections.begin() ), end( sections.end() ); it != end; ++it ) {
sortedItems.append( (*s_completionSources)[it.key()] );
- for ( QStringList::Iterator sit( (*it).begin() ), send( (*it).end() ); sit != send; ++sit ) {
+ for ( TQStringList::Iterator sit( (*it).begin() ), send( (*it).end() ); sit != send; ++sit ) {
sortedItems.append( *sit );
}
}
diff --git a/libkdepim/addresseelineedit.h b/libkdepim/addresseelineedit.h
index dacfd96a3..5f8d2f496 100644
--- a/libkdepim/addresseelineedit.h
+++ b/libkdepim/addresseelineedit.h
@@ -26,11 +26,11 @@
#ifndef ADDRESSEELINEEDIT_H
#define ADDRESSEELINEEDIT_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qtimer.h>
-#include <qpair.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
#include <kabc/addressee.h>
@@ -44,8 +44,8 @@ class KConfig;
namespace KPIM {
class LdapSearch;
class LdapResult;
-typedef QValueList<LdapResult> LdapResultList;
-typedef QMap< QString, QPair<int,int> > CompletionItemsMap;
+typedef TQValueList<LdapResult> LdapResultList;
+typedef TQMap< TQString, QPair<int,int> > CompletionItemsMap;
}
namespace KPIM {
@@ -56,24 +56,24 @@ class KDE_EXPORT AddresseeLineEdit : public ClickLineEdit, public DCOPObject
Q_OBJECT
public:
- AddresseeLineEdit( QWidget* parent, bool useCompletion = true,
+ AddresseeLineEdit( TQWidget* parent, bool useCompletion = true,
const char *name = 0L);
virtual ~AddresseeLineEdit();
- virtual void setFont( const QFont& );
+ virtual void setFont( const TQFont& );
void allowSemiColonAsSeparator( bool );
public slots:
void cursorAtEnd();
void enableCompletion( bool enable );
/** Reimplemented for stripping whitespace after completion */
- virtual void setText( const QString& txt );
+ virtual void setText( const TQString& txt );
protected slots:
virtual void loadContacts();
protected:
void addContact( const KABC::Addressee&, int weight, int source = -1 );
- virtual void keyPressEvent( QKeyEvent* );
+ virtual void keyPressEvent( TQKeyEvent* );
/**
* Reimplemented for smart insertion of email addresses.
* Features:
@@ -82,22 +82,22 @@ class KDE_EXPORT AddresseeLineEdit : public ClickLineEdit, public DCOPObject
* - Recognizes email addresses which are protected against address
* harvesters, i.e. "name at kde dot org" and "name(at)kde.org"
*/
- virtual void insert( const QString &text );
+ virtual void insert( const TQString &text );
/** Reimplemented for smart insertion of pasted email addresses. */
virtual void paste();
/** Reimplemented for smart insertion with middle mouse button. */
- virtual void mouseReleaseEvent( QMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
/** Reimplemented for smart insertion of dragged email addresses. */
- virtual void dropEvent( QDropEvent *e );
+ virtual void dropEvent( TQDropEvent *e );
void doCompletion( bool ctrlT );
- virtual QPopupMenu *createPopupMenu();
+ virtual TQPopupMenu *createPopupMenu();
/**
* Adds the name of a completion source to the internal list of
* such sources and returns its index, such that that can be used
* for insertion of items associated with that source.
*/
- int addCompletionSource( const QString& );
+ int addCompletionSource( const TQString& );
/** return whether we are using sorted or weighted display */
static KCompletion::CompOrder completionOrder();
@@ -108,27 +108,27 @@ class KDE_EXPORT AddresseeLineEdit : public ClickLineEdit, public DCOPObject
private slots:
void slotCompletion();
- void slotPopupCompletion( const QString& );
- void slotReturnPressed( const QString& );
+ void slotPopupCompletion( const TQString& );
+ void slotReturnPressed( const TQString& );
void slotStartLDAPLookup();
void slotLDAPSearchData( const KPIM::LdapResultList& );
void slotEditCompletionOrder();
- void slotUserCancelled( const QString& );
+ void slotUserCancelled( const TQString& );
private:
- virtual bool eventFilter(QObject *o, QEvent *e);
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
void init();
void startLoadingLDAPEntries();
void stopLDAPLookup();
- void setCompletedItems( const QStringList& items, bool autoSuggest );
- void addCompletionItem( const QString& string, int weight, int source, const QStringList * keyWords=0 );
- QString completionSearchText( QString& );
- const QStringList getAdjustedCompletionItems( bool fullSearch );
+ void setCompletedItems( const TQStringList& items, bool autoSuggest );
+ void addCompletionItem( const TQString& string, int weight, int source, const TQStringList * keyWords=0 );
+ TQString completionSearchText( TQString& );
+ const TQStringList getAdjustedCompletionItems( bool fullSearch );
void updateSearchString();
- QString m_previousAddresses;
- QString m_searchString;
+ TQString m_previousAddresses;
+ TQString m_searchString;
bool m_useCompletion;
bool m_completionInitialized;
bool m_smartPaste;
@@ -137,16 +137,16 @@ class KDE_EXPORT AddresseeLineEdit : public ClickLineEdit, public DCOPObject
bool m_searchExtended; //has \" been added?
bool m_useSemiColonAsSeparator;
- //QMap<QString, KABC::Addressee> m_contactMap;
+ //TQMap<TQString, KABC::Addressee> m_contactMap;
static bool s_addressesDirty;
static KMailCompletion *s_completion;
static CompletionItemsMap* s_completionItemMap;
- static QTimer *s_LDAPTimer;
+ static TQTimer *s_LDAPTimer;
static KPIM::LdapSearch *s_LDAPSearch;
- static QString *s_LDAPText;
+ static TQString *s_LDAPText;
static AddresseeLineEdit *s_LDAPLineEdit;
- static QStringList *s_completionSources;
+ static TQStringList *s_completionSources;
class AddresseeLineEditPrivate;
AddresseeLineEditPrivate *d;
diff --git a/libkdepim/addresseeselector.cpp b/libkdepim/addresseeselector.cpp
index 26562335f..5bd73b5d7 100644
--- a/libkdepim/addresseeselector.cpp
+++ b/libkdepim/addresseeselector.cpp
@@ -19,11 +19,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qsignalmapper.h>
-#include <qtoolbutton.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqsignalmapper.h>
+#include <tqtoolbutton.h>
#include <kabc/stdaddressbook.h>
#include <kcombobox.h>
@@ -41,36 +41,36 @@ using namespace KPIM;
class AddresseeSelector::AddressBookManager
{
public:
- QStringList titles() const;
+ TQStringList titles() const;
void addResource( KABC::Resource* );
- void addAddressBook( const QString &title, SelectionItem::List &list );
+ void addAddressBook( const TQString &title, SelectionItem::List &list );
void clear();
bool contains( uint index, const SelectionItem& );
private:
struct AddressBookEntry {
- QString title;
+ TQString title;
SelectionItem::List list;
};
- QValueList<KABC::Resource*> mResources;
- QValueList<AddressBookEntry> mAddressBooks;
+ TQValueList<KABC::Resource*> mResources;
+ TQValueList<AddressBookEntry> mAddressBooks;
};
-QStringList AddresseeSelector::AddressBookManager::titles() const
+TQStringList AddresseeSelector::AddressBookManager::titles() const
{
- QStringList titles;
+ TQStringList titles;
// we've always an 'all' entry
titles.append( i18n( "All" ) );
- QValueList<KABC::Resource*>::ConstIterator resIt;
+ TQValueList<KABC::Resource*>::ConstIterator resIt;
for ( resIt = mResources.begin(); resIt != mResources.end(); ++resIt )
titles.append( (*resIt)->resourceName() );
- QValueList<AddressBookEntry>::ConstIterator abIt;
+ TQValueList<AddressBookEntry>::ConstIterator abIt;
for ( abIt = mAddressBooks.begin(); abIt != mAddressBooks.end(); ++abIt )
titles.append( (*abIt).title );
@@ -83,7 +83,7 @@ void AddresseeSelector::AddressBookManager::addResource( KABC::Resource *resourc
mResources.append( resource );
}
-void AddresseeSelector::AddressBookManager::addAddressBook( const QString &title,
+void AddresseeSelector::AddressBookManager::addAddressBook( const TQString &title,
SelectionItem::List &list )
{
AddressBookEntry entry;
@@ -187,9 +187,9 @@ uint SelectionItem::index() const
class SelectionViewItem : public QListViewItem
{
public:
- SelectionViewItem( QListView *parent, Selection *selection,
+ SelectionViewItem( TQListView *parent, Selection *selection,
SelectionItem *item )
- : QListViewItem( parent, "" ), mSelection( selection ), mItem( item )
+ : TQListViewItem( parent, "" ), mSelection( selection ), mItem( item )
{
if ( mItem->distributionList() == 0 )
mIcon = mSelection->itemIcon( mItem->addressee(), mItem->index() );
@@ -197,7 +197,7 @@ class SelectionViewItem : public QListViewItem
mIcon = mSelection->distributionListIcon( mItem->distributionList() );
}
- QString text( int column ) const
+ TQString text( int column ) const
{
if ( column == 0 ) {
if ( mItem->distributionList() == 0 )
@@ -205,10 +205,10 @@ class SelectionViewItem : public QListViewItem
else
return mSelection->distributionListText( mItem->distributionList() );
} else
- return QString::null;
+ return TQString::null;
}
- const QPixmap* pixmap( int column ) const
+ const TQPixmap* pixmap( int column ) const
{
if ( column == 0 ) {
return &mIcon;
@@ -221,14 +221,14 @@ class SelectionViewItem : public QListViewItem
private:
Selection *mSelection;
SelectionItem *mItem;
- QPixmap mIcon;
+ TQPixmap mIcon;
};
-AddresseeSelector::AddresseeSelector( Selection *selection, QWidget *parent, const char *name )
- : QWidget( parent, name ), mSelection( selection ), mManager( 0 )
+AddresseeSelector::AddresseeSelector( Selection *selection, TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mSelection( selection ), mManager( 0 )
{
- mMoveMapper = new QSignalMapper( this );
- mRemoveMapper = new QSignalMapper( this );
+ mMoveMapper = new TQSignalMapper( this );
+ mRemoveMapper = new TQSignalMapper( this );
mAddressBookManager = new AddressBookManager();
@@ -250,33 +250,33 @@ AddresseeSelector::~AddresseeSelector()
void AddresseeSelector::init()
{
- connect( KABC::StdAddressBook::self( true ), SIGNAL( addressBookChanged( AddressBook* ) ),
- this, SLOT( reloadAddressBook() ) );
- connect( mAddresseeFilter, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( updateAddresseeView() ) );
- connect( mAddressBookCombo, SIGNAL( activated( int ) ),
- this, SLOT( updateAddresseeView() ) );
-
- connect( mMoveMapper, SIGNAL( mapped( int ) ),
- this, SLOT( move( int ) ) );
- connect( mRemoveMapper, SIGNAL( mapped( int ) ),
- this, SLOT( remove( int ) ) );
+ connect( KABC::StdAddressBook::self( true ), TQT_SIGNAL( addressBookChanged( AddressBook* ) ),
+ this, TQT_SLOT( reloadAddressBook() ) );
+ connect( mAddresseeFilter, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( updateAddresseeView() ) );
+ connect( mAddressBookCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( updateAddresseeView() ) );
+
+ connect( mMoveMapper, TQT_SIGNAL( mapped( int ) ),
+ this, TQT_SLOT( move( int ) ) );
+ connect( mRemoveMapper, TQT_SIGNAL( mapped( int ) ),
+ this, TQT_SLOT( remove( int ) ) );
reloadAddressBook();
}
void AddresseeSelector::initGUI()
{
- QGridLayout *layout = new QGridLayout( this, 2, 3, KDialog::marginHint(), KDialog::spacingHint() );
- QGridLayout *topLayout = new QGridLayout( this, 2, 2, KDialog::marginHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 2, 3, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGridLayout *topLayout = new TQGridLayout( this, 2, 2, KDialog::marginHint() );
- QLabel *label = new QLabel( i18n( "Address book:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Address book:" ), this );
mAddressBookCombo = new KComboBox( false, this );
topLayout->addWidget( label, 0, 0 );
topLayout->addWidget( mAddressBookCombo, 0, 1 );
- label = new QLabel( i18n( "Search:" ), this );
+ label = new TQLabel( i18n( "Search:" ), this );
mAddresseeFilter = new KLineEdit( this );
topLayout->addWidget( label, 1, 0 );
@@ -288,8 +288,8 @@ void AddresseeSelector::initGUI()
int row = 1;
- QIconSet moveSet = KGlobal::iconLoader()->loadIconSet( "next", KIcon::Small );
- QIconSet removeSet = KGlobal::iconLoader()->loadIconSet( "previous", KIcon::Small );
+ TQIconSet moveSet = KGlobal::iconLoader()->loadIconSet( "next", KIcon::Small );
+ TQIconSet removeSet = KGlobal::iconLoader()->loadIconSet( "previous", KIcon::Small );
uint count = mSelection->fieldCount();
for ( uint i = 0; i < count; ++i, ++row ) {
@@ -298,30 +298,30 @@ void AddresseeSelector::initGUI()
listView->setFullWidth( true );
mSelectionViews.append( listView );
- connect( listView, SIGNAL( doubleClicked( QListViewItem*, const QPoint&, int ) ),
- mRemoveMapper, SLOT( map() ) );
+ connect( listView, TQT_SIGNAL( doubleClicked( TQListViewItem*, const TQPoint&, int ) ),
+ mRemoveMapper, TQT_SLOT( map() ) );
mRemoveMapper->setMapping( listView, i );
- QVBoxLayout *buttonLayout = new QVBoxLayout( this );
+ TQVBoxLayout *buttonLayout = new TQVBoxLayout( this );
buttonLayout->setAlignment( Qt::AlignBottom );
layout->addLayout( buttonLayout, row, 1 );
// move button
- QToolButton *moveButton = new QToolButton( this );
+ TQToolButton *moveButton = new TQToolButton( this );
moveButton->setIconSet( moveSet );
moveButton->setFixedSize( 30, 30 );
- connect( moveButton, SIGNAL( clicked() ),
- mMoveMapper, SLOT( map() ) );
+ connect( moveButton, TQT_SIGNAL( clicked() ),
+ mMoveMapper, TQT_SLOT( map() ) );
mMoveMapper->setMapping( moveButton, i );
// remove button
- QToolButton *removeButton = new QToolButton( this );
+ TQToolButton *removeButton = new TQToolButton( this );
removeButton->setIconSet( removeSet );
removeButton->setFixedSize( 30, 30 );
- connect( removeButton, SIGNAL( clicked() ),
- mRemoveMapper, SLOT( map() ) );
+ connect( removeButton, TQT_SIGNAL( clicked() ),
+ mRemoveMapper, TQT_SLOT( map() ) );
mRemoveMapper->setMapping( removeButton, i );
buttonLayout->addWidget( moveButton );
@@ -423,7 +423,7 @@ void AddresseeSelector::setItemSelected( uint fieldIndex, const KABC::Addressee
}
void AddresseeSelector::setItemSelected( uint fieldIndex, const KABC::Addressee &addr,
- uint itemIndex, const QString &text )
+ uint itemIndex, const TQString &text )
{
bool found = false;
@@ -514,9 +514,9 @@ void AddresseeSelector::reloadAddressBook()
mManager->load();
- QStringList lists = mManager->listNames();
+ TQStringList lists = mManager->listNames();
- QStringList::Iterator listIt;
+ TQStringList::Iterator listIt;
for ( listIt = lists.begin(); listIt != lists.end(); ++listIt ) {
KABC::DistributionList *list = mManager->list( *listIt );
SelectionItem item( list, 0 );
@@ -528,8 +528,8 @@ void AddresseeSelector::reloadAddressBook()
// update address book combo
mAddressBookCombo->clear();
- QPtrList<KABC::Resource> resources = KABC::StdAddressBook::self( true )->resources();
- QPtrListIterator<KABC::Resource> resIt( resources );
+ TQPtrList<KABC::Resource> resources = KABC::StdAddressBook::self( true )->resources();
+ TQPtrListIterator<KABC::Resource> resIt( resources );
while ( resIt.current() ) {
if ( resIt.current()->isActive() )
mAddressBookManager->addResource( resIt );
@@ -561,11 +561,11 @@ void AddresseeSelector::reloadAddressBook()
AddresseeSelectorDialog::AddresseeSelectorDialog( Selection *selection,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( Plain, "", Ok | Cancel, Ok, parent, name, true )
{
- QFrame *frame = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( frame );
+ TQFrame *frame = plainPage();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame );
mSelector = new KPIM::AddresseeSelector( selection, frame );
layout->addWidget( mSelector );
@@ -575,7 +575,7 @@ AddresseeSelectorDialog::AddresseeSelectorDialog( Selection *selection,
void AddresseeSelectorDialog::accept()
{
mSelector->finish();
- QDialog::accept();
+ TQDialog::accept();
}
#include "addresseeselector.moc"
diff --git a/libkdepim/addresseeselector.h b/libkdepim/addresseeselector.h
index 46481abdf..769447fff 100644
--- a/libkdepim/addresseeselector.h
+++ b/libkdepim/addresseeselector.h
@@ -28,9 +28,9 @@
#include <kdialogbase.h>
#include <kdepimmacros.h>
-#include <qbitarray.h>
-#include <qpixmap.h>
-#include <qwidget.h>
+#include <tqbitarray.h>
+#include <tqpixmap.h>
+#include <tqwidget.h>
class KComboBox;
class KLineEdit;
@@ -56,7 +56,7 @@ class KDE_EXPORT Selection
/**
Returns the title for the field specified by index.
*/
- virtual QString fieldTitle( uint index ) const = 0;
+ virtual TQString fieldTitle( uint index ) const = 0;
/**
Returns the number of items for the given addressee.
@@ -66,12 +66,12 @@ class KDE_EXPORT Selection
/**
Returns the text that's used for the item specified by index.
*/
- virtual QString itemText( const KABC::Addressee &addresse, uint index ) const = 0;
+ virtual TQString itemText( const KABC::Addressee &addresse, uint index ) const = 0;
/**
Returns the icon that's used for the item specified by index.
*/
- virtual QPixmap itemIcon( const KABC::Addressee &addresse, uint index ) const = 0;
+ virtual TQPixmap itemIcon( const KABC::Addressee &addresse, uint index ) const = 0;
/**
Returns whether the item specified by index is enabled.
@@ -81,22 +81,22 @@ class KDE_EXPORT Selection
/**
Returns whether the item specified by index matches the passed pattern.
*/
- virtual bool itemMatches( const KABC::Addressee &addresse, uint index, const QString &pattern ) const = 0;
+ virtual bool itemMatches( const KABC::Addressee &addresse, uint index, const TQString &pattern ) const = 0;
/**
Returns whether the item specified by index equals the passed pattern.
*/
- virtual bool itemEquals( const KABC::Addressee &addresse, uint index, const QString &pattern ) const = 0;
+ virtual bool itemEquals( const KABC::Addressee &addresse, uint index, const TQString &pattern ) const = 0;
/**
Returns the text that's used for the given distribution list.
*/
- virtual QString distributionListText( const KABC::DistributionList *distributionList ) const = 0;
+ virtual TQString distributionListText( const KABC::DistributionList *distributionList ) const = 0;
/**
Returns the icon that's used for the given distribution list.
*/
- virtual QPixmap distributionListIcon( const KABC::DistributionList *distributionList ) const = 0;
+ virtual TQPixmap distributionListIcon( const KABC::DistributionList *distributionList ) const = 0;
/**
Returns whether the given distribution list is enabled.
@@ -107,7 +107,7 @@ class KDE_EXPORT Selection
Returns whether the given distribution list matches the passed pattern.
*/
virtual bool distributionListMatches( const KABC::DistributionList *distributionList,
- const QString &pattern ) const = 0;
+ const TQString &pattern ) const = 0;
/**
Returns the number of additional address books.
@@ -117,7 +117,7 @@ class KDE_EXPORT Selection
/**
Returns the title for an additional address book.
*/
- virtual QString addressBookTitle( uint index ) const = 0;
+ virtual TQString addressBookTitle( uint index ) const = 0;
/**
Returns the content for an additional address book.
@@ -142,7 +142,7 @@ class KDE_EXPORT Selection
class SelectionItem
{
public:
- typedef QValueList<SelectionItem> List;
+ typedef TQValueList<SelectionItem> List;
SelectionItem( const KABC::Addressee &addressee, uint index );
SelectionItem( KABC::DistributionList *list, uint index );
@@ -160,7 +160,7 @@ class SelectionItem
KABC::Addressee mAddressee;
KABC::DistributionList *mDistributionList;
uint mIndex;
- QBitArray mField;
+ TQBitArray mField;
};
class KDE_EXPORT AddresseeSelector : public QWidget
@@ -169,7 +169,7 @@ class KDE_EXPORT AddresseeSelector : public QWidget
public:
AddresseeSelector( Selection *selection,
- QWidget *parent, const char *name = 0 );
+ TQWidget *parent, const char *name = 0 );
~AddresseeSelector();
/**
@@ -179,7 +179,7 @@ class KDE_EXPORT AddresseeSelector : public QWidget
void setItemSelected( uint fieldIndex, const KABC::Addressee&, uint itemIndex );
void setItemSelected( uint fieldIndex, const KABC::Addressee&,
- uint itemIndex, const QString& );
+ uint itemIndex, const TQString& );
private slots:
void move( int index );
@@ -202,9 +202,9 @@ class KDE_EXPORT AddresseeSelector : public QWidget
KListView *mAddresseeView;
SelectionItem::List mSelectionItems;
- QValueList<KListView*> mSelectionViews;
- QSignalMapper *mMoveMapper;
- QSignalMapper *mRemoveMapper;
+ TQValueList<KListView*> mSelectionViews;
+ TQSignalMapper *mMoveMapper;
+ TQSignalMapper *mRemoveMapper;
KABC::DistributionListManager *mManager;
@@ -218,7 +218,7 @@ class KDE_EXPORT AddresseeSelectorDialog : public KDialogBase
public:
AddresseeSelectorDialog( Selection *selection,
- QWidget *parent = 0, const char *name = 0 );
+ TQWidget *parent = 0, const char *name = 0 );
protected slots:
void accept();
diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp
index 30aa3bef2..c250aa495 100644
--- a/libkdepim/addresseeview.cpp
+++ b/libkdepim/addresseeview.cpp
@@ -19,10 +19,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qbuffer.h>
-#include <qimage.h>
-#include <qpopupmenu.h>
-#include <qurl.h>
+#include <tqbuffer.h>
+#include <tqimage.h>
+#include <tqpopupmenu.h>
+#include <tqurl.h>
#include <kabc/address.h>
#include <kabc/addressee.h>
@@ -50,26 +50,26 @@
using namespace KPIM;
-AddresseeView::AddresseeView( QWidget *parent, const char *name,
+AddresseeView::AddresseeView( TQWidget *parent, const char *name,
KConfig *config )
: KTextBrowser( parent, name ), mDefaultConfig( false ), mImageJob( 0 ),
mLinkMask( AddressLinks | EmailLinks | PhoneLinks | URLLinks | IMLinks | CustomFields )
{
- setWrapPolicy( QTextEdit::AtWordBoundary );
+ setWrapPolicy( TQTextEdit::AtWordBoundary );
setLinkUnderline( false );
- setVScrollBarMode( QScrollView::AlwaysOff );
- setHScrollBarMode( QScrollView::AlwaysOff );
+ setVScrollBarMode( TQScrollView::AlwaysOff );
+ setHScrollBarMode( TQScrollView::AlwaysOff );
- QStyleSheet *sheet = styleSheet();
- QStyleSheetItem *link = sheet->item( "a" );
+ TQStyleSheet *sheet = styleSheet();
+ TQStyleSheetItem *link = sheet->item( "a" );
link->setColor( KGlobalSettings::linkColor() );
- connect( this, SIGNAL( mailClick( const QString&, const QString& ) ),
- this, SLOT( slotMailClicked( const QString&, const QString& ) ) );
- connect( this, SIGNAL( urlClick( const QString& ) ),
- this, SLOT( slotUrlClicked( const QString& ) ) );
- connect( this, SIGNAL( highlighted( const QString& ) ),
- this, SLOT( slotHighlighted( const QString& ) ) );
+ connect( this, TQT_SIGNAL( mailClick( const TQString&, const TQString& ) ),
+ this, TQT_SLOT( slotMailClicked( const TQString&, const TQString& ) ) );
+ connect( this, TQT_SIGNAL( urlClick( const TQString& ) ),
+ this, TQT_SLOT( slotUrlClicked( const TQString& ) ) );
+ connect( this, TQT_SIGNAL( highlighted( const TQString& ) ),
+ this, TQT_SLOT( slotHighlighted( const TQString& ) ) );
setNotifyClick( true );
@@ -88,13 +88,13 @@ AddresseeView::AddresseeView( QWidget *parent, const char *name,
mActionShowCustomFields = new KToggleAction( i18n( "Show Custom Fields" ) );
mActionShowCustomFields->setCheckedState( i18n( "Hide Custom Fields" ) );
- connect( mActionShowBirthday, SIGNAL( toggled( bool ) ), SLOT( configChanged() ) );
- connect( mActionShowAddresses, SIGNAL( toggled( bool ) ), SLOT( configChanged() ) );
- connect( mActionShowEmails, SIGNAL( toggled( bool ) ), SLOT( configChanged() ) );
- connect( mActionShowPhones, SIGNAL( toggled( bool ) ), SLOT( configChanged() ) );
- connect( mActionShowURLs, SIGNAL( toggled( bool ) ), SLOT( configChanged() ) );
- connect( mActionShowIMAddresses, SIGNAL( toggled( bool ) ), SLOT( configChanged() ) );
- connect( mActionShowCustomFields, SIGNAL( toggled( bool ) ), SLOT( configChanged() ) );
+ connect( mActionShowBirthday, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( configChanged() ) );
+ connect( mActionShowAddresses, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( configChanged() ) );
+ connect( mActionShowEmails, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( configChanged() ) );
+ connect( mActionShowPhones, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( configChanged() ) );
+ connect( mActionShowURLs, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( configChanged() ) );
+ connect( mActionShowIMAddresses, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( configChanged() ) );
+ connect( mActionShowCustomFields, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( configChanged() ) );
if ( !config ) {
mConfig = new KConfig( "kaddressbookrc" );
@@ -106,10 +106,10 @@ AddresseeView::AddresseeView( QWidget *parent, const char *name,
// set up IMProxy to display contacts' IM presence and make connections to keep the display live
mKIMProxy = ::KIMProxy::instance( kapp->dcopClient() );
- connect( mKIMProxy, SIGNAL( sigContactPresenceChanged( const QString& ) ),
- this, SLOT( slotPresenceChanged( const QString& ) ) );
- connect( mKIMProxy, SIGNAL( sigPresenceInfoExpired() ),
- this, SLOT( slotPresenceInfoExpired() ) );
+ connect( mKIMProxy, TQT_SIGNAL( sigContactPresenceChanged( const TQString& ) ),
+ this, TQT_SLOT( slotPresenceChanged( const TQString& ) ) );
+ connect( mKIMProxy, TQT_SIGNAL( sigPresenceInfoExpired() ),
+ this, TQT_SLOT( slotPresenceInfoExpired() ) );
}
AddresseeView::~AddresseeView()
@@ -148,10 +148,10 @@ void AddresseeView::enableLinks( int linkMask )
mLinkMask = linkMask;
}
-QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *proxy, LinkMask linkMask,
+TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *proxy, LinkMask linkMask,
bool internalLoading, FieldMask fieldMask )
{
- QString image = QString( "contact_%1_image" ).arg( addr.uid() );
+ TQString image = TQString( "contact_%1_image" ).arg( addr.uid() );
// Style strings from Gentix; this is just an initial version.
//
@@ -160,18 +160,18 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
// placeholder where we fill in something else (in this case,
// the global background color).
//
- QString backgroundColor = KGlobalSettings::alternateBackgroundColor().name();
- QString cellStyle = QString::fromLatin1(
+ TQString backgroundColor = KGlobalSettings::alternateBackgroundColor().name();
+ TQString cellStyle = TQString::fromLatin1(
"style=\""
"padding-right: 2px; "
"border-right: #000 dashed 1px; "
"background: %1;\"").arg(backgroundColor);
- QString backgroundColor2 = KGlobalSettings::baseColor().name();
- QString cellStyle2 = QString::fromLatin1(
+ TQString backgroundColor2 = KGlobalSettings::baseColor().name();
+ TQString cellStyle2 = TQString::fromLatin1(
"style=\""
"padding-left: 2px; "
"background: %1;\"").arg(backgroundColor2);
- QString tableStyle = QString::fromLatin1(
+ TQString tableStyle = TQString::fromLatin1(
"style=\""
"border: solid 1px; "
"margin: 0em;\"");
@@ -179,17 +179,17 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
// We'll be building a table to display the vCard in.
// Each row of the table will be built using this string for its HTML.
//
- QString rowFmtStr = QString::fromLatin1(
+ TQString rowFmtStr = TQString::fromLatin1(
"<tr>"
"<td align=\"right\" valign=\"top\" width=\"30%\" "); // Tag unclosed
rowFmtStr.append( cellStyle );
- rowFmtStr.append( QString::fromLatin1(
+ rowFmtStr.append( TQString::fromLatin1(
">" // Close tag
"<b>%1</b>"
"</td>"
"<td align=\"left\" valign=\"top\" width=\"70%\" ") ); // Tag unclosed
rowFmtStr.append( cellStyle2 );
- rowFmtStr.append( QString::fromLatin1(
+ rowFmtStr.append( TQString::fromLatin1(
">" // Close tag
"%2"
"</td>"
@@ -197,7 +197,7 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
) );
// Build the table's rows here
- QString dynamicPart;
+ TQString dynamicPart;
if ( !internalLoading ) {
@@ -212,7 +212,7 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
}
if ( fieldMask & BirthdayFields ) {
- QDate date = addr.birthday().date();
+ TQDate date = addr.birthday().date();
if ( date.isValid() )
dynamicPart += rowFmtStr
@@ -224,22 +224,22 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
KABC::PhoneNumber::List phones = addr.phoneNumbers();
KABC::PhoneNumber::List::ConstIterator phoneIt;
for ( phoneIt = phones.begin(); phoneIt != phones.end(); ++phoneIt ) {
- QString number = QStyleSheet::escape( (*phoneIt).number() );
+ TQString number = TQStyleSheet::escape( (*phoneIt).number() );
- QString url;
+ TQString url;
if ( (*phoneIt).type() & KABC::PhoneNumber::Fax )
- url = QString::fromLatin1( "fax:" ) + number;
+ url = TQString::fromLatin1( "fax:" ) + number;
else
- url = QString::fromLatin1( "phone:" ) + number;
+ url = TQString::fromLatin1( "phone:" ) + number;
if ( linkMask & PhoneLinks ) {
- QString smsURL;
+ TQString smsURL;
if ( (*phoneIt).type() & KABC::PhoneNumber::Cell )
- smsURL = QString(" (<a href=\"sms:%1\">%2</a>)" ).arg( number ).arg( i18n( "SMS") );
+ smsURL = TQString(" (<a href=\"sms:%1\">%2</a>)" ).arg( number ).arg( i18n( "SMS") );
dynamicPart += rowFmtStr
.arg( (*phoneIt).typeLabel().replace( " ", "&nbsp;" ) )
- .arg( QString::fromLatin1( "<a href=\"%1\">%2</a>%3" ).arg( url ).arg( number ).arg( smsURL ) );
+ .arg( TQString::fromLatin1( "<a href=\"%1\">%2</a>%3" ).arg( url ).arg( number ).arg( smsURL ) );
} else {
dynamicPart += rowFmtStr
.arg( (*phoneIt).typeLabel().replace( " ", "&nbsp;" ) )
@@ -249,17 +249,17 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
}
if ( fieldMask & EmailFields ) {
- QStringList emails = addr.emails();
- QStringList::ConstIterator emailIt;
- QString type = i18n( "Email" );
+ TQStringList emails = addr.emails();
+ TQStringList::ConstIterator emailIt;
+ TQString type = i18n( "Email" );
for ( emailIt = emails.begin(); emailIt != emails.end(); ++emailIt ) {
- QString fullEmail = addr.fullEmail( *emailIt );
- QUrl::encode( fullEmail );
+ TQString fullEmail = addr.fullEmail( *emailIt );
+ TQUrl::encode( fullEmail );
if ( linkMask & EmailLinks ) {
dynamicPart += rowFmtStr.arg( type )
- .arg( QString::fromLatin1( "<a href=\"mailto:%1\">%2</a>" )
- .arg( fullEmail, QStyleSheet::escape( *emailIt ) ) );
+ .arg( TQString::fromLatin1( "<a href=\"mailto:%1\">%2</a>" )
+ .arg( fullEmail, TQStyleSheet::escape( *emailIt ) ) );
} else {
dynamicPart += rowFmtStr.arg( type ).arg( *emailIt );
}
@@ -268,7 +268,7 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
if ( fieldMask & URLFields ) {
if ( !addr.url().url().isEmpty() ) {
- QString url;
+ TQString url;
if ( linkMask & URLLinks ) {
url = (addr.url().url().startsWith( "http://" ) || addr.url().url().startsWith( "https://" ) ? addr.url().prettyURL() :
"http://" + addr.url().prettyURL());
@@ -279,7 +279,7 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
dynamicPart += rowFmtStr.arg( i18n("Homepage") ).arg( url );
}
- QString blog = addr.custom( "KADDRESSBOOK", "BlogFeed" );
+ TQString blog = addr.custom( "KADDRESSBOOK", "BlogFeed" );
if ( !blog.isEmpty() ) {
if ( linkMask & URLLinks ) {
blog = KStringHandler::tagURLs( blog );
@@ -293,12 +293,12 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
KABC::Address::List::ConstIterator addrIt;
for ( addrIt = addresses.begin(); addrIt != addresses.end(); ++addrIt ) {
if ( (*addrIt).label().isEmpty() ) {
- QString formattedAddress;
+ TQString formattedAddress;
- formattedAddress = QStyleSheet::escape( (*addrIt).formattedAddress().stripWhiteSpace() );
+ formattedAddress = TQStyleSheet::escape( (*addrIt).formattedAddress().stripWhiteSpace() );
formattedAddress = formattedAddress.replace( '\n', "<br>" );
- QString link = "<a href=\"addr:" + (*addrIt).id() + "\">" +
+ TQString link = "<a href=\"addr:" + (*addrIt).id() + "\">" +
formattedAddress + "</a>";
if ( linkMask & AddressLinks ) {
@@ -311,7 +311,7 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
.arg( formattedAddress );
}
} else {
- QString link = "<a href=\"addr:" + (*addrIt).id() + "\">" +
+ TQString link = "<a href=\"addr:" + (*addrIt).id() + "\">" +
(*addrIt).label().replace( '\n', "<br>" ) + "</a>";
if ( linkMask & AddressLinks ) {
@@ -327,18 +327,18 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
}
}
- QString notes;
+ TQString notes;
if ( !addr.note().isEmpty() ) {
// @STYLE@ - substitute the cell style in first, and append
// the data afterwards (keeps us safe from possible % signs
// in either one).
- notes = QStyleSheet::escape( addr.note() );
+ notes = TQStyleSheet::escape( addr.note() );
notes = rowFmtStr.arg( i18n( "Notes" ) ).arg( notes.replace( '\n', "<br>" ) ) ;
}
- QString customData;
+ TQString customData;
if ( fieldMask & CustomFields ) {
- static QMap<QString, QString> titleMap;
+ static TQMap<TQString, TQString> titleMap;
if ( titleMap.isEmpty() ) {
titleMap.insert( "Department", i18n( "Department" ) );
titleMap.insert( "Profession", i18n( "Profession" ) );
@@ -350,60 +350,60 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
}
if ( !addr.customs().empty() ) {
- QStringList customs = addr.customs();
- QStringList::Iterator it( customs.begin() );
- const QStringList::Iterator endIt( customs.end() );
+ TQStringList customs = addr.customs();
+ TQStringList::Iterator it( customs.begin() );
+ const TQStringList::Iterator endIt( customs.end() );
for ( ; it != endIt; ++it ) {
- QString customEntry = *it;
+ TQString customEntry = *it;
if ( customEntry.startsWith ( "KADDRESSBOOK-" ) ) {
customEntry.remove( "KADDRESSBOOK-X-" );
customEntry.remove( "KADDRESSBOOK-" );
int pos = customEntry.find( ':' );
- QString key = customEntry.left( pos );
- const QString value = customEntry.mid( pos + 1 );
+ TQString key = customEntry.left( pos );
+ const TQString value = customEntry.mid( pos + 1 );
// blog and im address is handled separated
if ( key == "BlogFeed" || key == "IMAddress" )
continue;
- const QMap<QString, QString>::ConstIterator keyIt = titleMap.find( key );
+ const TQMap<TQString, TQString>::ConstIterator keyIt = titleMap.find( key );
if ( keyIt != titleMap.end() )
key = keyIt.data();
- customData += rowFmtStr.arg( key ).arg( QStyleSheet::escape( value ) ) ;
+ customData += rowFmtStr.arg( key ).arg( TQStyleSheet::escape( value ) ) ;
}
}
}
}
- QString name( QStyleSheet::escape( addr.realName() ) );
- QString role( QStyleSheet::escape( addr.role() ) );
- QString organization( QStyleSheet::escape( addr.organization() ) );
+ TQString name( TQStyleSheet::escape( addr.realName() ) );
+ TQString role( TQStyleSheet::escape( addr.role() ) );
+ TQString organization( TQStyleSheet::escape( addr.organization() ) );
if ( fieldMask & IMFields ) {
- const QString imAddress = addr.custom( "KADDRESSBOOK", "X-IMAddress" );
+ const TQString imAddress = addr.custom( "KADDRESSBOOK", "X-IMAddress" );
if ( !imAddress.isEmpty() ) {
- customData += rowFmtStr.arg( i18n( "IM Address" ) ).arg( QStyleSheet::escape( imAddress ) ) ;
+ customData += rowFmtStr.arg( i18n( "IM Address" ) ).arg( TQStyleSheet::escape( imAddress ) ) ;
}
if ( proxy ) {
if ( proxy->isPresent( addr.uid() ) && proxy->presenceNumeric( addr.uid() ) > 0 ) {
- // set image source to either a QMimeSourceFactory key or a data:/ URL
- QString imgSrc;
+ // set image source to either a TQMimeSourceFactory key or a data:/ URL
+ TQString imgSrc;
if ( internalLoading ) {
- imgSrc = QString::fromLatin1( "im_status_%1_image").arg( addr.uid() );
- QMimeSourceFactory::defaultFactory()->setPixmap( imgSrc, proxy->presenceIcon( addr.uid() ) );
+ imgSrc = TQString::fromLatin1( "im_status_%1_image").arg( addr.uid() );
+ TQMimeSourceFactory::defaultFactory()->setPixmap( imgSrc, proxy->presenceIcon( addr.uid() ) );
} else
imgSrc = pixmapAsDataUrl( proxy->presenceIcon( addr.uid() ) );
// make the status a link, if required
- QString imStatus;
+ TQString imStatus;
if ( linkMask & IMLinks )
- imStatus = QString::fromLatin1( "<a href=\"im:\"><img src=\"%1\"> (%2)</a>" );
+ imStatus = TQString::fromLatin1( "<a href=\"im:\"><img src=\"%1\"> (%2)</a>" );
else
- imStatus = QString::fromLatin1( "<img src=\"%1\"> (%2)" );
+ imStatus = TQString::fromLatin1( "<img src=\"%1\"> (%2)" );
// append our status to the rest of the dynamic part of the addressee
dynamicPart += rowFmtStr
@@ -421,58 +421,58 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
// do it this way to avoid cases where the substituted string
// contains %1 and the like.
//
- QString strAddr = QString::fromLatin1(
+ TQString strAddr = TQString::fromLatin1(
"<div align=\"center\">"
"<table cellpadding=\"1\" cellspacing=\"0\" %1>"
"<tr>").arg(tableStyle);
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"<td align=\"right\" valign=\"top\" width=\"30%\" rowspan=\"3\" %2>")
.arg( cellStyle ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"<img src=\"%1\" width=\"50\" vspace=\"1\">" // image
"</td>")
.arg( image ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"<td align=\"left\" width=\"70%\" %2>")
.arg( cellStyle2 ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"<font size=\"+2\"><b>%2</b></font></td>" // name
"</tr>")
.arg( name ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"<tr>"
"<td align=\"left\" width=\"70%\" %2>")
.arg( cellStyle2 ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"%3</td>" // role
"</tr>")
.arg( role ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"<tr>"
"<td align=\"left\" width=\"70%\" %2>")
.arg( cellStyle2 ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"%4</td>" // organization
"</tr>")
.arg( organization ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"<tr><td %2>")
.arg( cellStyle ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"&nbsp;</td><td %2>&nbsp;</td></tr>")
.arg( cellStyle2 ) );
strAddr.append( dynamicPart );
strAddr.append( notes );
strAddr.append( customData );
- strAddr.append( QString::fromLatin1( "</table></div>\n" ) );
+ strAddr.append( TQString::fromLatin1( "</table></div>\n" ) );
if ( addr.resource() ) {
- QString addrBookName = addr.resource()->resourceName();
+ TQString addrBookName = addr.resource()->resourceName();
ResourceABC *r = dynamic_cast<ResourceABC*>( addr.resource() );
if ( r && !r->subresources().isEmpty() ) {
- const QString subRes = r->uidToResourceMap()[ addr.uid() ];
- const QString label = r->subresourceLabel( subRes );
+ const TQString subRes = r->uidToResourceMap()[ addr.uid() ];
+ const TQString label = r->subresourceLabel( subRes );
if ( !label.isEmpty() )
addrBookName = label;
}
@@ -481,13 +481,13 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
return strAddr;
}
-QString AddresseeView::pixmapAsDataUrl( const QPixmap& pixmap )
+TQString AddresseeView::pixmapAsDataUrl( const TQPixmap& pixmap )
{
- QByteArray ba;
- QBuffer buffer( ba );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
pixmap.save( &buffer, "PNG" );
- QString encoded( "data:image/png;base64," );
+ TQString encoded( "data:image/png;base64," );
encoded.append( KCodecs::base64Encode( ba ) );
return encoded;
}
@@ -495,7 +495,7 @@ QString AddresseeView::pixmapAsDataUrl( const QPixmap& pixmap )
void AddresseeView::updateView()
{
// clear view
- setText( QString::null );
+ setText( TQString::null );
if ( mAddressee.isEmpty() )
return;
@@ -523,10 +523,10 @@ void AddresseeView::updateView()
if ( mActionShowCustomFields->isChecked() )
fieldMask |= CustomFields;
- QString strAddr = vCardAsHTML( mAddressee, mKIMProxy, (LinkMask)mLinkMask,
+ TQString strAddr = vCardAsHTML( mAddressee, mKIMProxy, (LinkMask)mLinkMask,
true, (FieldMask)fieldMask );
- strAddr = QString::fromLatin1(
+ strAddr = TQString::fromLatin1(
"<html>"
"<body text=\"%1\" bgcolor=\"%2\">" // text and background color
"%3" // dynamic part
@@ -536,24 +536,24 @@ void AddresseeView::updateView()
.arg( KGlobalSettings::baseColor().name() )
.arg( strAddr );
- QString imageURL = QString( "contact_%1_image" ).arg( mAddressee.uid() );
+ TQString imageURL = TQString( "contact_%1_image" ).arg( mAddressee.uid() );
KABC::Picture picture = mAddressee.photo();
if ( picture.isIntern() && !picture.data().isNull() )
- QMimeSourceFactory::defaultFactory()->setImage( imageURL, picture.data() );
+ TQMimeSourceFactory::defaultFactory()->setImage( imageURL, picture.data() );
else {
if ( !picture.url().isEmpty() ) {
if ( mImageData.count() > 0 )
- QMimeSourceFactory::defaultFactory()->setImage( imageURL, mImageData );
+ TQMimeSourceFactory::defaultFactory()->setImage( imageURL, mImageData );
else {
mImageJob = KIO::get( KURL( picture.url() ), false, false );
- connect( mImageJob, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( data( KIO::Job*, const QByteArray& ) ) );
- connect( mImageJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( result( KIO::Job* ) ) );
+ connect( mImageJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) );
+ connect( mImageJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( result( KIO::Job* ) ) );
}
} else {
- QMimeSourceFactory::defaultFactory()->setPixmap( imageURL,
+ TQMimeSourceFactory::defaultFactory()->setPixmap( imageURL,
KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 128 ) );
}
}
@@ -567,24 +567,24 @@ KABC::Addressee AddresseeView::addressee() const
return mAddressee;
}
-void AddresseeView::urlClicked( const QString &url )
+void AddresseeView::urlClicked( const TQString &url )
{
kapp->invokeBrowser( url );
}
-void AddresseeView::emailClicked( const QString &email )
+void AddresseeView::emailClicked( const TQString &email )
{
if ( email.startsWith( "mailto:" ) )
- kapp->invokeMailer( email.mid( 7 ), QString::null );
+ kapp->invokeMailer( email.mid( 7 ), TQString::null );
else
- kapp->invokeMailer( email, QString::null );
+ kapp->invokeMailer( email, TQString::null );
}
-void AddresseeView::phoneNumberClicked( const QString &number )
+void AddresseeView::phoneNumberClicked( const TQString &number )
{
KConfig config( "kaddressbookrc" );
config.setGroup( "General" );
- QString commandLine = config.readEntry( "PhoneHookApplication" );
+ TQString commandLine = config.readEntry( "PhoneHookApplication" );
if ( commandLine.isEmpty() ) {
KMessageBox::sorry( this, i18n( "There is no application set which could be executed. Please go to the settings dialog and configure one." ) );
@@ -595,11 +595,11 @@ void AddresseeView::phoneNumberClicked( const QString &number )
KRun::runCommand( commandLine );
}
-void AddresseeView::smsTextClicked( const QString &number )
+void AddresseeView::smsTextClicked( const TQString &number )
{
KConfig config( "kaddressbookrc" );
config.setGroup( "General" );
- QString commandLine = config.readEntry( "SMSHookApplication" );
+ TQString commandLine = config.readEntry( "SMSHookApplication" );
if ( commandLine.isEmpty() ) {
KMessageBox::sorry( this, i18n( "There is no application set which could be executed. Please go to the settings dialog and configure one." ) );
@@ -612,14 +612,14 @@ void AddresseeView::smsTextClicked( const QString &number )
sendSMS ( number, dlg.text() );
}
-void AddresseeView::sendSMS( const QString &number, const QString &text )
+void AddresseeView::sendSMS( const TQString &number, const TQString &text )
{
KConfig config( "kaddressbookrc" );
config.setGroup( "General" );
- QString commandLine = config.readEntry( "SMSHookApplication" );
+ TQString commandLine = config.readEntry( "SMSHookApplication" );
KTempFile file ;
- QTextStream* stream = file.textStream();
+ TQTextStream* stream = file.textStream();
*stream << text;
file.close();
@@ -629,11 +629,11 @@ void AddresseeView::sendSMS( const QString &number, const QString &text )
KRun::runCommand( commandLine );
}
-void AddresseeView::faxNumberClicked( const QString &number )
+void AddresseeView::faxNumberClicked( const TQString &number )
{
KConfig config( "kaddressbookrc" );
config.setGroup( "General" );
- QString commandLine = config.readEntry( "FaxHookApplication", "kdeprintfax --phone %N" );
+ TQString commandLine = config.readEntry( "FaxHookApplication", "kdeprintfax --phone %N" );
if ( commandLine.isEmpty() ) {
KMessageBox::sorry( this, i18n( "There is no application set which could be executed. Please go to the settings dialog and configure one." ) );
@@ -649,9 +649,9 @@ void AddresseeView::imAddressClicked()
mKIMProxy->chatWithContact( mAddressee.uid() );
}
-QPopupMenu *AddresseeView::createPopupMenu( const QPoint& )
+TQPopupMenu *AddresseeView::createPopupMenu( const TQPoint& )
{
- QPopupMenu *menu = new QPopupMenu( this );
+ TQPopupMenu *menu = new TQPopupMenu( this );
mActionShowBirthday->plug( menu );
mActionShowAddresses->plug( menu );
mActionShowEmails->plug( menu );
@@ -663,12 +663,12 @@ QPopupMenu *AddresseeView::createPopupMenu( const QPoint& )
return menu;
}
-void AddresseeView::slotMailClicked( const QString&, const QString &email )
+void AddresseeView::slotMailClicked( const TQString&, const TQString &email )
{
emailClicked( email );
}
-void AddresseeView::slotUrlClicked( const QString &url )
+void AddresseeView::slotUrlClicked( const TQString &url )
{
if ( url.startsWith( "phone:" ) )
phoneNumberClicked( strippedNumber( url.mid( 8 ) ) );
@@ -684,27 +684,27 @@ void AddresseeView::slotUrlClicked( const QString &url )
urlClicked( url );
}
-void AddresseeView::slotHighlighted( const QString &link )
+void AddresseeView::slotHighlighted( const TQString &link )
{
if ( link.startsWith( "mailto:" ) ) {
- QString email = link.mid( 7 );
+ TQString email = link.mid( 7 );
emit emailHighlighted( email );
emit highlightedMessage( i18n( "Send mail to '%1'" ).arg( email ) );
} else if ( link.startsWith( "phone:" ) ) {
- QString number = link.mid( 8 );
+ TQString number = link.mid( 8 );
emit phoneNumberHighlighted( strippedNumber( number ) );
emit highlightedMessage( i18n( "Call number %1" ).arg( number ) );
} else if ( link.startsWith( "fax:" ) ) {
- QString number = link.mid( 6 );
+ TQString number = link.mid( 6 );
emit faxNumberHighlighted( strippedNumber( number ) );
emit highlightedMessage( i18n( "Send fax to %1" ).arg( number ) );
} else if ( link.startsWith( "addr:" ) ) {
emit highlightedMessage( i18n( "Show address on map" ) );
} else if ( link.startsWith( "sms:" ) ) {
- QString number = link.mid( 6 );
+ TQString number = link.mid( 6 );
emit highlightedMessage( i18n( "Send SMS to %1" ).arg( number ) );
} else if ( link.startsWith( "http:" ) || link.startsWith( "https:" ) ) {
emit urlHighlighted( link );
@@ -715,7 +715,7 @@ void AddresseeView::slotHighlighted( const QString &link )
emit highlightedMessage( "" );
}
-void AddresseeView::slotPresenceChanged( const QString &uid )
+void AddresseeView::slotPresenceChanged( const TQString &uid )
{
kdDebug() << k_funcinfo << " uid is: " << uid << " mAddressee is: " << mAddressee.uid() << endl;
if ( uid == mAddressee.uid() )
@@ -734,7 +734,7 @@ void AddresseeView::configChanged()
updateView();
}
-void AddresseeView::data( KIO::Job*, const QByteArray &d )
+void AddresseeView::data( KIO::Job*, const TQByteArray &d )
{
unsigned int oldSize = mImageData.size();
mImageData.resize( oldSize + d.size() );
@@ -776,12 +776,12 @@ void AddresseeView::save()
mConfig->sync();
}
-QString AddresseeView::strippedNumber( const QString &number )
+TQString AddresseeView::strippedNumber( const TQString &number )
{
- QString retval;
+ TQString retval;
for ( uint i = 0; i < number.length(); ++i ) {
- QChar c = number[ i ];
+ TQChar c = number[ i ];
if ( c.isDigit() || c == '*' || c == '#' || c == '+' && i == 0 )
retval.append( c );
}
diff --git a/libkdepim/addresseeview.h b/libkdepim/addresseeview.h
index fe81226d4..97c6eebbb 100644
--- a/libkdepim/addresseeview.h
+++ b/libkdepim/addresseeview.h
@@ -22,7 +22,7 @@
#ifndef KPIM_ADDRESSEEVIEW_H
#define KPIM_ADDRESSEEVIEW_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kabc/addressee.h>
#include <ktextbrowser.h>
@@ -50,7 +50,7 @@ class KDE_EXPORT AddresseeView : public KTextBrowser
@param config The config object where the settings are stored
which fields will be shown.
*/
- AddresseeView( QWidget *parent = 0, const char *name = 0,
+ AddresseeView( TQWidget *parent = 0, const char *name = 0,
KConfig *config = 0 );
~AddresseeView();
@@ -127,46 +127,46 @@ class KDE_EXPORT AddresseeView : public KTextBrowser
@param fieldMask The mask for which fields of the contact will
be displayed.
*/
- static QString vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *proxy, LinkMask linkMask = DefaultLinks,
+ static TQString vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *proxy, LinkMask linkMask = DefaultLinks,
bool internalLoading = true, FieldMask fieldMask = DefaultFields );
/**
- * Encodes a QPixmap as a PNG into a data: URL (rfc2397), readable by the data kio protocol
+ * Encodes a TQPixmap as a PNG into a data: URL (rfc2397), readable by the data kio protocol
* @param pixmap the pixmap to encode
* @return a data: URL
*/
- static QString pixmapAsDataUrl( const QPixmap& pixmap );
+ static TQString pixmapAsDataUrl( const TQPixmap& pixmap );
signals:
- void urlHighlighted( const QString &url );
- void emailHighlighted( const QString &email );
- void phoneNumberHighlighted( const QString &number );
- void faxNumberHighlighted( const QString &number );
+ void urlHighlighted( const TQString &url );
+ void emailHighlighted( const TQString &email );
+ void phoneNumberHighlighted( const TQString &number );
+ void faxNumberHighlighted( const TQString &number );
- void highlightedMessage( const QString &message );
+ void highlightedMessage( const TQString &message );
- void addressClicked( const QString &uid );
+ void addressClicked( const TQString &uid );
protected:
- virtual void urlClicked( const QString &url );
- virtual void emailClicked( const QString &mail );
- virtual void phoneNumberClicked( const QString &number );
- virtual void smsTextClicked( const QString &number );
- virtual void sendSMS( const QString &number, const QString &msg );
- virtual void faxNumberClicked( const QString &number );
+ virtual void urlClicked( const TQString &url );
+ virtual void emailClicked( const TQString &mail );
+ virtual void phoneNumberClicked( const TQString &number );
+ virtual void smsTextClicked( const TQString &number );
+ virtual void sendSMS( const TQString &number, const TQString &msg );
+ virtual void faxNumberClicked( const TQString &number );
virtual void imAddressClicked();
- virtual QPopupMenu *createPopupMenu( const QPoint& );
+ virtual TQPopupMenu *createPopupMenu( const TQPoint& );
private slots:
- void slotMailClicked( const QString&, const QString& );
- void slotUrlClicked( const QString& );
- void slotHighlighted( const QString& );
- void slotPresenceChanged( const QString & );
+ void slotMailClicked( const TQString&, const TQString& );
+ void slotUrlClicked( const TQString& );
+ void slotHighlighted( const TQString& );
+ void slotPresenceChanged( const TQString & );
void slotPresenceInfoExpired();
void configChanged();
- void data( KIO::Job*, const QByteArray& );
+ void data( KIO::Job*, const TQByteArray& );
void result( KIO::Job* );
private:
@@ -175,12 +175,12 @@ class KDE_EXPORT AddresseeView : public KTextBrowser
void updateView();
- QString strippedNumber( const QString &number );
+ TQString strippedNumber( const TQString &number );
KConfig *mConfig;
bool mDefaultConfig;
- QByteArray mImageData;
+ TQByteArray mImageData;
KIO::Job *mImageJob;
KToggleAction *mActionShowBirthday;
diff --git a/libkdepim/addressesdialog.cpp b/libkdepim/addressesdialog.cpp
index 3dc38920e..8a33d7999 100644
--- a/libkdepim/addressesdialog.cpp
+++ b/libkdepim/addressesdialog.cpp
@@ -52,10 +52,10 @@
#include <krun.h>
#include <kstandarddirs.h>
-#include <qdict.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qwidget.h>
+#include <tqdict.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqwidget.h>
namespace KPIM {
@@ -82,7 +82,7 @@ struct AddressesDialog::AddressesDialogPrivate {
AddresseeViewItem *ccItem;
AddresseeViewItem *bccItem;
- QDict<AddresseeViewItem> groupDict;
+ TQDict<AddresseeViewItem> groupDict;
KABC::Addressee::List recentAddresses;
LDAPSearchDialog *ldapSearchDialog;
@@ -91,7 +91,7 @@ struct AddressesDialog::AddressesDialogPrivate {
AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const KABC::Addressee& addr,
int emailIndex )
- : QObject( 0 ), KListViewItem( parent, addr.realName(),
+ : TQObject( 0 ), KListViewItem( parent, addr.realName(),
( emailIndex == 0 ? addr.preferredEmail() : addr.emails()[ emailIndex ] ) )
{
d = new AddresseeViewItemPrivate;
@@ -111,24 +111,24 @@ AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const KABC::Add
}
}
-AddresseeViewItem::AddresseeViewItem( KListView *lv, const QString& name, Category cat )
- : QObject(0), KListViewItem( lv, name )
+AddresseeViewItem::AddresseeViewItem( KListView *lv, const TQString& name, Category cat )
+ : TQObject(0), KListViewItem( lv, name )
{
d = new AddresseeViewItemPrivate;
d->category = cat;
}
-AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const QString& name,
+AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const TQString& name,
const KABC::Addressee::List &lst )
- : QObject(0), KListViewItem( parent, name, i18n("<group>") )
+ : TQObject(0), KListViewItem( parent, name, i18n("<group>") )
{
d = new AddresseeViewItemPrivate;
d->category = FilledGroup;
d->addresses = lst;
}
-AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const QString& name )
- : QObject(0), KListViewItem( parent, name, i18n("<group>") )
+AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const TQString& name )
+ : TQObject(0), KListViewItem( parent, name, i18n("<group>") )
{
d = new AddresseeViewItemPrivate;
d->category = DistList;
@@ -172,7 +172,7 @@ AddresseeViewItem::email() const
return text(1);
}
-bool AddresseeViewItem::matches(const QString& txt) const
+bool AddresseeViewItem::matches(const TQString& txt) const
{
return d->address.realName().contains(txt, false) || d->address.preferredEmail().contains(txt, false);
}
@@ -185,11 +185,11 @@ void AddresseeViewItem::setSelected(bool selected)
}
emit addressSelected( this, selected );
- QListViewItem::setSelected(selected);
+ TQListViewItem::setSelected(selected);
}
int
-AddresseeViewItem::compare( QListViewItem * i, int col, bool ascending ) const
+AddresseeViewItem::compare( TQListViewItem * i, int col, bool ascending ) const
{
if ( category() == Group || category() == Entry )
return KListViewItem::compare( i , col, ascending );
@@ -210,11 +210,11 @@ AddresseeViewItem::compare( QListViewItem * i, int col, bool ascending ) const
return -1;
}
-AddressesDialog::AddressesDialog( QWidget *widget, const char *name )
+AddressesDialog::AddressesDialog( TQWidget *widget, const char *name )
: KDialogBase( widget, name, true, i18n("Address Selection"),
Ok|Cancel, Ok, true )
{
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
d = new AddressesDialogPrivate;
d->ui = new AddressPickerUI( page );
@@ -236,8 +236,8 @@ AddresseeViewItem* AddressesDialog::selectedToItem()
if ( !d->toItem )
{
d->toItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("To"), AddresseeViewItem::To );
- connect(d->toItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(d->toItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
return d->toItem;
}
@@ -247,8 +247,8 @@ AddresseeViewItem* AddressesDialog::selectedCcItem()
if ( !d->ccItem )
{
d->ccItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("CC"), AddresseeViewItem::CC );
- connect(d->ccItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(d->ccItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
return d->ccItem;
}
@@ -258,17 +258,17 @@ AddresseeViewItem* AddressesDialog::selectedBccItem()
if ( !d->bccItem )
{
d->bccItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("BCC"), AddresseeViewItem::BCC );
- connect(d->bccItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(d->bccItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
return d->bccItem;
}
void
-AddressesDialog::setSelectedTo( const QStringList& l )
+AddressesDialog::setSelectedTo( const TQStringList& l )
{
- QString name, email;
- for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ TQString name, email;
+ for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
KABC::Addressee addr;
KABC::Addressee::parseEmailAddress( *it, name, email );
addr.setNameFromString( name );
@@ -278,10 +278,10 @@ AddressesDialog::setSelectedTo( const QStringList& l )
}
void
-AddressesDialog::setSelectedCC( const QStringList& l )
+AddressesDialog::setSelectedCC( const TQStringList& l )
{
- QString name, email;
- for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ TQString name, email;
+ for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
KABC::Addressee addr;
KABC::Addressee::parseEmailAddress( *it, name, email );
addr.setNameFromString( name );
@@ -291,10 +291,10 @@ AddressesDialog::setSelectedCC( const QStringList& l )
}
void
-AddressesDialog::setSelectedBCC( const QStringList& l )
+AddressesDialog::setSelectedBCC( const TQStringList& l )
{
- QString name, email;
- for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ TQString name, email;
+ for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
KABC::Addressee addr;
KABC::Addressee::parseEmailAddress( *it, name, email );
addr.setNameFromString( name );
@@ -316,12 +316,12 @@ AddressesDialog::setRecentAddresses( const KABC::Addressee::List& list )
void
AddressesDialog::updateRecentAddresses()
{
- static const QString &recentGroup = KGlobal::staticQString( i18n( "Recent Addresses" ) );
+ static const TQString &recentGroup = KGlobal::staticQString( i18n( "Recent Addresses" ) );
if ( !d->recent ) {
d->recent = new AddresseeViewItem( d->ui->mAvailableView, recentGroup );
- connect(d->recent, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(availableAddressSelected(AddresseeViewItem*, bool)));
+ connect(d->recent, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(availableAddressSelected(AddresseeViewItem*, bool)));
d->recent->setVisible( false );
d->groupDict.insert( recentGroup, d->recent );
}
@@ -350,7 +350,7 @@ AddressesDialog::setShowBCC( bool b )
QStringList
AddressesDialog::to() const
{
- QStringList emails = allDistributionLists( d->toItem );
+ TQStringList emails = allDistributionLists( d->toItem );
KABC::Addressee::List l = toAddresses();
emails += entryToString( l );
@@ -360,7 +360,7 @@ AddressesDialog::to() const
QStringList
AddressesDialog::cc() const
{
- QStringList emails = allDistributionLists( d->ccItem );
+ TQStringList emails = allDistributionLists( d->ccItem );
KABC::Addressee::List l = ccAddresses();
emails += entryToString( l );
@@ -370,7 +370,7 @@ AddressesDialog::cc() const
QStringList
AddressesDialog::bcc() const
{
- QStringList emails = allDistributionLists( d->bccItem );
+ TQStringList emails = allDistributionLists( d->bccItem );
KABC::Addressee::List l = bccAddresses();
emails += entryToString( l );
@@ -387,13 +387,13 @@ KABC::Addressee::List
AddressesDialog::allToAddressesNoDuplicates() const
{
KABC::Addressee::List aList = allAddressee( d->toItem );
- const QStringList dList = toDistributionLists();
+ const TQStringList dList = toDistributionLists();
KABC::AddressBook* abook = KABC::StdAddressBook::self( true );
#ifdef KDEPIM_NEW_DISTRLISTS
- for ( QStringList::ConstIterator it = dList.begin(); it != dList.end(); ++it ) {
- const QValueList<KPIM::DistributionList::Entry> eList
+ for ( TQStringList::ConstIterator it = dList.begin(); it != dList.end(); ++it ) {
+ const TQValueList<KPIM::DistributionList::Entry> eList
= KPIM::DistributionList::findByName(abook, *it).entries(abook);
- QValueList<KPIM::DistributionList::Entry>::ConstIterator eit;
+ TQValueList<KPIM::DistributionList::Entry>::ConstIterator eit;
for( eit = eList.begin(); eit != eList.end(); ++eit ) {
KABC::Addressee a = (*eit).addressee;
if ( !a.preferredEmail().isEmpty() && aList.find( a ) == aList.end() ) {
@@ -404,9 +404,9 @@ AddressesDialog::allToAddressesNoDuplicates() const
#else
KABC::DistributionListManager manager( abook );
manager.load();
- for ( QStringList::ConstIterator it = dList.begin(); it != dList.end(); ++it ) {
- const QValueList<KABC::DistributionList::Entry> eList = manager.list( *it )->entries();
- QValueList<KABC::DistributionList::Entry>::ConstIterator eit;
+ for ( TQStringList::ConstIterator it = dList.begin(); it != dList.end(); ++it ) {
+ const TQValueList<KABC::DistributionList::Entry> eList = manager.list( *it )->entries();
+ TQValueList<KABC::DistributionList::Entry>::ConstIterator eit;
for( eit = eList.begin(); eit != eList.end(); ++eit ) {
KABC::Addressee a = (*eit).addressee;
if ( !a.preferredEmail().isEmpty() && aList.find( a ) == aList.end() ) {
@@ -455,11 +455,11 @@ AddressesDialog::updateAvailableAddressees()
d->ui->mAvailableView->clear();
d->groupDict.clear();
- static const QString &personalGroup = KGlobal::staticQString( i18n( "Other Addresses" ) );
+ static const TQString &personalGroup = KGlobal::staticQString( i18n( "Other Addresses" ) );
d->ui->mAvailableView->setRootIsDecorated( true );
d->personal = new AddresseeViewItem( d->ui->mAvailableView, personalGroup );
- //connect(d->personal, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- // this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ //connect(d->personal, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ // this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
d->personal->setVisible( false );
d->groupDict.insert( personalGroup, d->personal );
@@ -482,8 +482,8 @@ AddressesDialog::updateAvailableAddressees()
void AddressesDialog::checkForSingleAvailableGroup()
{
- QListViewItem* item = d->ui->mAvailableView->firstChild();
- QListViewItem* firstGroup = 0;
+ TQListViewItem* item = d->ui->mAvailableView->firstChild();
+ TQListViewItem* firstGroup = 0;
int found = 0;
while (item)
{
@@ -539,7 +539,7 @@ AddressesDialog::selectedAddressSelected( AddresseeViewItem* item, bool selected
// we have to avoid that a parent and a child is selected together
// because in this case we get a double object deletion ( program crashes )
// when removing the selected items from list
- AddresseeViewItem* parent = static_cast<AddresseeViewItem*>(((QListViewItem*)item)->parent());
+ AddresseeViewItem* parent = static_cast<AddresseeViewItem*>(((TQListViewItem*)item)->parent());
if ( parent && selected )
parent->setSelected( false );
if (selected)
@@ -562,36 +562,36 @@ AddressesDialog::selectedAddressSelected( AddresseeViewItem* item, bool selected
void
AddressesDialog::initConnections()
{
- connect( d->ui->mFilterEdit, SIGNAL(textChanged(const QString &)),
- SLOT(filterChanged(const QString &)) );
- connect( d->ui->mToButton, SIGNAL(clicked()),
- SLOT(addSelectedTo()) );
- connect( d->ui->mCCButton, SIGNAL(clicked()),
- SLOT(addSelectedCC()) );
- connect( d->ui->mBCCButton, SIGNAL(clicked()),
- SLOT(addSelectedBCC()) );
- connect( d->ui->mSaveAs, SIGNAL(clicked()),
- SLOT(saveAs()) );
- connect( d->ui->mLdapSearch, SIGNAL(clicked()),
- SLOT(searchLdap()) );
- connect( d->ui->mRemoveButton, SIGNAL(clicked()),
- SLOT(removeEntry()) );
- connect( d->ui->mAvailableView, SIGNAL(selectionChanged()),
- SLOT(availableSelectionChanged()) );
- connect( d->ui->mAvailableView, SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(addSelectedTo()) );
- connect( d->ui->mSelectedView, SIGNAL(selectionChanged()),
- SLOT(selectedSelectionChanged()) );
- connect( d->ui->mSelectedView, SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(removeEntry()) );
+ connect( d->ui->mFilterEdit, TQT_SIGNAL(textChanged(const TQString &)),
+ TQT_SLOT(filterChanged(const TQString &)) );
+ connect( d->ui->mToButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(addSelectedTo()) );
+ connect( d->ui->mCCButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(addSelectedCC()) );
+ connect( d->ui->mBCCButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(addSelectedBCC()) );
+ connect( d->ui->mSaveAs, TQT_SIGNAL(clicked()),
+ TQT_SLOT(saveAs()) );
+ connect( d->ui->mLdapSearch, TQT_SIGNAL(clicked()),
+ TQT_SLOT(searchLdap()) );
+ connect( d->ui->mRemoveButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(removeEntry()) );
+ connect( d->ui->mAvailableView, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(availableSelectionChanged()) );
+ connect( d->ui->mAvailableView, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(addSelectedTo()) );
+ connect( d->ui->mSelectedView, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(selectedSelectionChanged()) );
+ connect( d->ui->mSelectedView, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(removeEntry()) );
#ifndef KDEPIM_NEW_DISTRLISTS
- connect( KABC::DistributionListWatcher::self(), SIGNAL( changed() ),
- this, SLOT( updateAvailableAddressees() ) );
+ connect( KABC::DistributionListWatcher::self(), TQT_SIGNAL( changed() ),
+ this, TQT_SLOT( updateAvailableAddressees() ) );
#endif
- connect( KABC::StdAddressBook::self( true ), SIGNAL( addressBookChanged(AddressBook*) ),
- this, SLOT( updateAvailableAddressees() ) );
+ connect( KABC::StdAddressBook::self( true ), TQT_SIGNAL( addressBookChanged(AddressBook*) ),
+ this, TQT_SLOT( updateAvailableAddressees() ) );
}
void
@@ -601,9 +601,9 @@ AddressesDialog::addAddresseeToAvailable( const KABC::Addressee& addr, Addressee
return;
if ( useCategory ) {
- QStringList categories = addr.categories();
+ TQStringList categories = addr.categories();
- for ( QStringList::Iterator it = categories.begin(); it != categories.end(); ++it ) {
+ for ( TQStringList::Iterator it = categories.begin(); it != categories.end(); ++it ) {
if ( !d->groupDict[ *it ] ) { //we don't have the category yet
AddresseeViewItem* category = new AddresseeViewItem( d->ui->mAvailableView, *it );
d->groupDict.insert( *it, category );
@@ -611,8 +611,8 @@ AddressesDialog::addAddresseeToAvailable( const KABC::Addressee& addr, Addressee
for ( uint i = 0; i < addr.emails().count(); ++i ) {
AddresseeViewItem* addressee = new AddresseeViewItem( d->groupDict[ *it ], addr, i );
- connect(addressee, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(availableAddressSelected(AddresseeViewItem*, bool)));
+ connect(addressee, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(availableAddressSelected(AddresseeViewItem*, bool)));
}
}
}
@@ -626,8 +626,8 @@ AddressesDialog::addAddresseeToAvailable( const KABC::Addressee& addr, Addressee
if ( defaultParent && noCategory ) { // only non-categorized items here
AddresseeViewItem* addressee = new AddresseeViewItem( defaultParent, addr );
- connect(addressee, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(availableAddressSelected(AddresseeViewItem*, bool)));
+ connect(addressee, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(availableAddressSelected(AddresseeViewItem*, bool)));
}
}
@@ -645,8 +645,8 @@ AddressesDialog::addAddresseeToSelected( const KABC::Addressee& addr, AddresseeV
myChild = static_cast<AddresseeViewItem*>( myChild->nextSibling() );
}
AddresseeViewItem* addressee = new AddresseeViewItem( defaultParent, addr );
- connect(addressee, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(addressee, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
defaultParent->setOpen( true );
}
@@ -655,11 +655,11 @@ AddressesDialog::addAddresseeToSelected( const KABC::Addressee& addr, AddresseeV
void
AddressesDialog::addAddresseesToSelected( AddresseeViewItem *parent,
- const QPtrList<AddresseeViewItem>& addresses )
+ const TQPtrList<AddresseeViewItem>& addresses )
{
Q_ASSERT( parent );
- QPtrListIterator<AddresseeViewItem> itr( addresses );
+ TQPtrListIterator<AddresseeViewItem> itr( addresses );
if (itr.current())
{
@@ -693,8 +693,8 @@ AddressesDialog::addAddresseesToSelected( AddresseeViewItem *parent,
address->setVisible( false );
selectedToAvailableMapping.insert(address, newItem);
selectedToAvailableMapping.insert(newItem, address);
- connect(newItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(newItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
parent->setOpen( true );
@@ -703,7 +703,7 @@ AddressesDialog::addAddresseesToSelected( AddresseeViewItem *parent,
QStringList
AddressesDialog::entryToString( const KABC::Addressee::List& l ) const
{
- QStringList entries;
+ TQStringList entries;
for( KABC::Addressee::List::ConstIterator it = l.begin(); it != l.end(); ++it ) {
entries += (*it).fullEmail();
@@ -717,8 +717,8 @@ AddressesDialog::addSelectedTo()
if ( !d->toItem )
{
d->toItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("To"), AddresseeViewItem::To );
- connect(d->toItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(d->toItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
addAddresseesToSelected( d->toItem, selectedAvailableAddresses );
@@ -739,8 +739,8 @@ AddressesDialog::addSelectedCC()
if ( !d->ccItem )
{
d->ccItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("CC"), AddresseeViewItem::CC );
- connect(d->ccItem , SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(d->ccItem , TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
addAddresseesToSelected( d->ccItem, selectedAvailableAddresses );
@@ -761,8 +761,8 @@ AddressesDialog::addSelectedBCC()
if ( !d->bccItem )
{
d->bccItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("BCC"), AddresseeViewItem::BCC );
- connect(d->bccItem , SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(d->bccItem , TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
addAddresseesToSelected( d->bccItem, selectedAvailableAddresses );
@@ -798,13 +798,13 @@ void AddressesDialog::unmapSelectedAddress(AddresseeViewItem* item)
void
AddressesDialog::removeEntry()
{
- QPtrList<AddresseeViewItem> lst;
+ TQPtrList<AddresseeViewItem> lst;
bool resetTo = false;
bool resetCC = false;
bool resetBCC = false;
lst.setAutoDelete( false );
- QPtrListIterator<AddresseeViewItem> it( selectedSelectedAddresses );
+ TQPtrListIterator<AddresseeViewItem> it( selectedSelectedAddresses );
while ( it.current() ) {
AddresseeViewItem* item = it.current();
++it;
@@ -849,12 +849,12 @@ AddressesDialog::removeEntry()
// copied from kabcore.cpp :(
// KDE4: should be in libkabc I think
-static KABC::Resource *requestResource( KABC::AddressBook* abook, QWidget *parent )
+static KABC::Resource *requestResource( KABC::AddressBook* abook, TQWidget *parent )
{
- QPtrList<KABC::Resource> kabcResources = abook->resources();
+ TQPtrList<KABC::Resource> kabcResources = abook->resources();
- QPtrList<KRES::Resource> kresResources;
- QPtrListIterator<KABC::Resource> resIt( kabcResources );
+ TQPtrList<KRES::Resource> kresResources;
+ TQPtrListIterator<KABC::Resource> resIt( kabcResources );
KABC::Resource *resource;
while ( ( resource = resIt.current() ) != 0 ) {
++resIt;
@@ -887,9 +887,9 @@ AddressesDialog::saveAs()
}
bool ok = false;
- QString name = KInputDialog::getText( i18n("New Distribution List"),
+ TQString name = KInputDialog::getText( i18n("New Distribution List"),
i18n("Please enter name:"),
- QString::null, &ok,
+ TQString::null, &ok,
this );
if ( !ok || name.isEmpty() )
return;
@@ -941,8 +941,8 @@ AddressesDialog::searchLdap()
{
if ( !d->ldapSearchDialog ) {
d->ldapSearchDialog = new LDAPSearchDialog( this );
- connect( d->ldapSearchDialog, SIGNAL( addresseesAdded() ),
- SLOT(ldapSearchResult() ) );
+ connect( d->ldapSearchDialog, TQT_SIGNAL( addresseesAdded() ),
+ TQT_SLOT(ldapSearchResult() ) );
}
d->ldapSearchDialog->show();
}
@@ -950,12 +950,12 @@ AddressesDialog::searchLdap()
void
AddressesDialog::ldapSearchResult()
{
- QStringList emails = QStringList::split(',', d->ldapSearchDialog->selectedEMails() );
- QStringList::iterator it( emails.begin() );
- QStringList::iterator end( emails.end() );
+ TQStringList emails = TQStringList::split(',', d->ldapSearchDialog->selectedEMails() );
+ TQStringList::iterator it( emails.begin() );
+ TQStringList::iterator end( emails.end() );
for ( ; it != end; ++it ){
- QString name;
- QString email;
+ TQString name;
+ TQString email;
KPIM::getNameAndMail( (*it), name, email );
KABC::Addressee ad;
ad.setNameFromString( name );
@@ -967,13 +967,13 @@ AddressesDialog::ldapSearchResult()
void
AddressesDialog::launchAddressBook()
{
- kapp->startServiceByDesktopName( "kaddressbook", QString() );
+ kapp->startServiceByDesktopName( "kaddressbook", TQString() );
}
void
-AddressesDialog::filterChanged( const QString& txt )
+AddressesDialog::filterChanged( const TQString& txt )
{
- QListViewItemIterator it( d->ui->mAvailableView );
+ TQListViewItemIterator it( d->ui->mAvailableView );
bool showAll = false;
if ( txt.isEmpty() )
@@ -991,8 +991,8 @@ AddressesDialog::filterChanged( const QString& txt )
if ( item->category() == AddresseeViewItem::Entry ) {
bool matches = item->matches( txt ) ;
item->setVisible( matches );
- if ( matches && static_cast<QListViewItem*>(item)->parent() ) {
- static_cast<QListViewItem*>(item)->parent()->setOpen( true );//open the parents with found entries
+ if ( matches && static_cast<TQListViewItem*>(item)->parent() ) {
+ static_cast<TQListViewItem*>(item)->parent()->setOpen( true );//open the parents with found entries
}
}
}
@@ -1002,7 +1002,7 @@ KABC::Addressee::List
AddressesDialog::allAddressee( KListView* view, bool onlySelected ) const
{
KABC::Addressee::List lst;
- QListViewItemIterator it( view );
+ TQListViewItemIterator it( view );
while ( it.current() ) {
AddresseeViewItem* item = static_cast<AddresseeViewItem*>( it.current() );
if ( !onlySelected || item->isSelected() ) {
@@ -1050,10 +1050,10 @@ AddressesDialog::allAddressee( AddresseeViewItem* parent ) const
QStringList
AddressesDialog::allDistributionLists( AddresseeViewItem* parent ) const
{
- QStringList lists;
+ TQStringList lists;
if ( !parent )
- return QStringList();
+ return TQStringList();
AddresseeViewItem *item = static_cast<AddresseeViewItem*>( parent->firstChild() );
while ( item ) {
@@ -1072,13 +1072,13 @@ AddressesDialog::addDistributionLists()
KABC::AddressBook* abook = KABC::StdAddressBook::self( true );
#ifdef KDEPIM_NEW_DISTRLISTS
- const QValueList<KPIM::DistributionList> distLists =
+ const TQValueList<KPIM::DistributionList> distLists =
KPIM::DistributionList::allDistributionLists( abook );
#else
KABC::DistributionListManager manager( abook );
manager.load();
- QStringList distLists = manager.listNames();
+ TQStringList distLists = manager.listNames();
#endif
if ( distLists.isEmpty() )
@@ -1088,9 +1088,9 @@ AddressesDialog::addDistributionLists()
i18n( "Distribution Lists" ) );
#ifdef KDEPIM_NEW_DISTRLISTS
- QValueList<KPIM::DistributionList>::ConstIterator listIt;
+ TQValueList<KPIM::DistributionList>::ConstIterator listIt;
#else
- QStringList::Iterator listIt;
+ TQStringList::Iterator listIt;
#endif
for ( listIt = distLists.begin(); listIt != distLists.end(); ++listIt ) {
#ifdef KDEPIM_NEW_DISTRLISTS
@@ -1102,8 +1102,8 @@ AddressesDialog::addDistributionLists()
#endif
AddresseeViewItem *item = new AddresseeViewItem( topItem, dlist.name() );
- connect( item, SIGNAL( addressSelected( AddresseeViewItem*, bool ) ),
- this, SLOT( availableAddressSelected( AddresseeViewItem*, bool ) ) );
+ connect( item, TQT_SIGNAL( addressSelected( AddresseeViewItem*, bool ) ),
+ this, TQT_SLOT( availableAddressSelected( AddresseeViewItem*, bool ) ) );
#ifdef KDEPIM_NEW_DISTRLISTS
KPIM::DistributionList::Entry::List::Iterator itemIt;
diff --git a/libkdepim/addressesdialog.h b/libkdepim/addressesdialog.h
index 06e8305d3..4b3ea9dc9 100644
--- a/libkdepim/addressesdialog.h
+++ b/libkdepim/addressesdialog.h
@@ -28,14 +28,14 @@
#include <kabc/addressee.h>
#include <kdialogbase.h>
#include <klistview.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qptrdict.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqptrdict.h>
#include <kdepimmacros.h>
namespace KPIM {
- class AddresseeViewItem : public QObject, public KListViewItem
+ class AddresseeViewItem : public TQObject, public KListViewItem
{
Q_OBJECT
@@ -50,21 +50,21 @@ namespace KPIM {
DistList =6
};
AddresseeViewItem( AddresseeViewItem *parent, const KABC::Addressee& addr, int emailIndex = 0 );
- AddresseeViewItem( KListView *lv, const QString& name, Category cat=Group );
- AddresseeViewItem( AddresseeViewItem *parent, const QString& name, const KABC::Addressee::List &lst );
- AddresseeViewItem( AddresseeViewItem *parent, const QString& name );
+ AddresseeViewItem( KListView *lv, const TQString& name, Category cat=Group );
+ AddresseeViewItem( AddresseeViewItem *parent, const TQString& name, const KABC::Addressee::List &lst );
+ AddresseeViewItem( AddresseeViewItem *parent, const TQString& name );
~AddresseeViewItem();
KABC::Addressee addressee() const;
KABC::Addressee::List addresses() const;
Category category() const;
- QString name() const;
- QString email() const;
+ TQString name() const;
+ TQString email() const;
- bool matches( const QString& ) const;
+ bool matches( const TQString& ) const;
- virtual int compare( QListViewItem * i, int col, bool ascending ) const;
+ virtual int compare( TQListViewItem * i, int col, bool ascending ) const;
virtual void setSelected( bool );
signals:
@@ -79,21 +79,21 @@ namespace KPIM {
{
Q_OBJECT
public:
- AddressesDialog( QWidget *widget=0, const char *name=0 );
+ AddressesDialog( TQWidget *widget=0, const char *name=0 );
~AddressesDialog();
/**
- * Returns the list of picked "To" addresses as a QStringList.
+ * Returns the list of picked "To" addresses as a TQStringList.
*/
- QStringList to() const;
+ TQStringList to() const;
/**
- * Returns the list of picked "CC" addresses as a QStringList.
+ * Returns the list of picked "CC" addresses as a TQStringList.
*/
- QStringList cc() const;
+ TQStringList cc() const;
/**
- * Returns the list of picked "BCC" addresses as a QStringList.
+ * Returns the list of picked "BCC" addresses as a TQStringList.
*/
- QStringList bcc() const;
+ TQStringList bcc() const;
/**
* Returns the list of picked "To" addresses as KABC::Addressee::List.
@@ -121,17 +121,17 @@ namespace KPIM {
* Returns the list of picked "To" distribution lists.
* This complements @ref toAddresses.
*/
- QStringList toDistributionLists() const;
+ TQStringList toDistributionLists() const;
/**
* Returns the list of picked "CC" distribution lists.
* This complements @ref ccAddresses.
*/
- QStringList ccDistributionLists() const;
+ TQStringList ccDistributionLists() const;
/**
* Returns the list of picked "BCC" distribution lists.
* This complements @ref bccAddresses.
*/
- QStringList bccDistributionLists() const;
+ TQStringList bccDistributionLists() const;
public slots:
/**
@@ -152,15 +152,15 @@ namespace KPIM {
/**
* Adds addresses in @p l to the selected "To" group.
*/
- void setSelectedTo( const QStringList& l );
+ void setSelectedTo( const TQStringList& l );
/**
* Adds addresses in @p l to the selected "CC" group.
*/
- void setSelectedCC( const QStringList& l );
+ void setSelectedCC( const TQStringList& l );
/**
* Adds addresses in @p l to the selected "BCC" group.
*/
- void setSelectedBCC( const QStringList& l );
+ void setSelectedBCC( const TQStringList& l );
protected slots:
void addSelectedTo();
@@ -173,7 +173,7 @@ namespace KPIM {
void ldapSearchResult();
void launchAddressBook();
- void filterChanged( const QString & );
+ void filterChanged( const TQString & );
void updateAvailableAddressees();
void availableSelectionChanged();
@@ -193,11 +193,11 @@ namespace KPIM {
void addAddresseeToSelected( const KABC::Addressee& addr,
AddresseeViewItem* defaultParent=0 );
void addAddresseesToSelected( AddresseeViewItem *parent,
- const QPtrList<AddresseeViewItem>& addresses );
- QStringList entryToString( const KABC::Addressee::List& l ) const;
+ const TQPtrList<AddresseeViewItem>& addresses );
+ TQStringList entryToString( const KABC::Addressee::List& l ) const;
KABC::Addressee::List allAddressee( AddresseeViewItem* parent ) const;
KABC::Addressee::List allAddressee( KListView* view, bool onlySelected = true ) const;
- QStringList allDistributionLists( AddresseeViewItem* parent ) const;
+ TQStringList allDistributionLists( AddresseeViewItem* parent ) const;
private:
// if there's only one group in the available list, open it
@@ -211,9 +211,9 @@ namespace KPIM {
struct AddressesDialogPrivate;
AddressesDialogPrivate *d;
- QPtrList<AddresseeViewItem> selectedAvailableAddresses;
- QPtrList<AddresseeViewItem> selectedSelectedAddresses;
- QPtrDict<AddresseeViewItem> selectedToAvailableMapping;
+ TQPtrList<AddresseeViewItem> selectedAvailableAddresses;
+ TQPtrList<AddresseeViewItem> selectedSelectedAddresses;
+ TQPtrDict<AddresseeViewItem> selectedToAvailableMapping;
};
}
diff --git a/libkdepim/alarmclient.cpp b/libkdepim/alarmclient.cpp
index b7250d490..5616cd029 100644
--- a/libkdepim/alarmclient.cpp
+++ b/libkdepim/alarmclient.cpp
@@ -42,13 +42,13 @@ void AlarmClient::startDaemon()
}
KGlobal::dirs()->addResourceType("autostart", "share/autostart");
- QString desktopFile = locate( "autostart", "korgac.desktop" );
+ TQString desktopFile = locate( "autostart", "korgac.desktop" );
if ( desktopFile.isEmpty() ) {
kdWarning() << "Couldn't find autostart/korgac.desktop!" << endl;
}
else {
- QString error;
- if ( kapp->startServiceByDesktopPath( desktopFile, QStringList(), &error ) != 0 )
+ TQString error;
+ if ( kapp->startServiceByDesktopPath( desktopFile, TQStringList(), &error ) != 0 )
kdWarning() << "Failure starting korgac:" << error << endl;
}
}
diff --git a/libkdepim/broadcaststatus.cpp b/libkdepim/broadcaststatus.cpp
index 5d0af0d13..b566bd4b2 100644
--- a/libkdepim/broadcaststatus.cpp
+++ b/libkdepim/broadcaststatus.cpp
@@ -14,7 +14,7 @@
#include <config.h>
#endif
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <klocale.h>
#include <kglobal.h>
@@ -46,18 +46,18 @@ BroadcastStatus::~BroadcastStatus()
instance_ = 0;
}
-void BroadcastStatus::setStatusMsg( const QString& message )
+void BroadcastStatus::setStatusMsg( const TQString& message )
{
mStatusMsg = message;
if( !mTransientActive )
emit statusMsg( message );
}
-void BroadcastStatus::setStatusMsgWithTimestamp( const QString& message )
+void BroadcastStatus::setStatusMsgWithTimestamp( const TQString& message )
{
KLocale* locale = KGlobal::locale();
setStatusMsg( i18n( "%1 is a time, %2 is a status message", "[%1] %2" )
- .arg( locale->formatTime( QTime::currentTime(),
+ .arg( locale->formatTime( TQTime::currentTime(),
true /* with seconds */ ) )
.arg( message ) );
}
@@ -69,7 +69,7 @@ void BroadcastStatus::setStatusMsgTransmissionCompleted( int numMessages,
bool mLeaveOnServer,
KPIM::ProgressItem* item )
{
- QString statusMsg;
+ TQString statusMsg;
if( numMessages > 0 ) {
if( numBytes != -1 ) {
if( ( numBytesToRead != numBytes ) && mLeaveOnServer )
@@ -99,7 +99,7 @@ void BroadcastStatus::setStatusMsgTransmissionCompleted( int numMessages,
item->setStatus( statusMsg );
}
-void BroadcastStatus::setStatusMsgTransmissionCompleted( const QString& account,
+void BroadcastStatus::setStatusMsgTransmissionCompleted( const TQString& account,
int numMessages,
int numBytes,
int numBytesRead,
@@ -107,7 +107,7 @@ void BroadcastStatus::setStatusMsgTransmissionCompleted( const QString& account,
bool mLeaveOnServer,
KPIM::ProgressItem* item )
{
- QString statusMsg;
+ TQString statusMsg;
if( numMessages > 0 ) {
if( numBytes != -1 ) {
if( ( numBytesToRead != numBytes ) && mLeaveOnServer )
@@ -147,7 +147,7 @@ void BroadcastStatus::setStatusMsgTransmissionCompleted( const QString& account,
item->setStatus( statusMsg );
}
-void BroadcastStatus::setTransientStatusMsg( const QString& msg )
+void BroadcastStatus::setTransientStatusMsg( const TQString& msg )
{
mTransientActive = true;
emit statusMsg( msg );
diff --git a/libkdepim/broadcaststatus.h b/libkdepim/broadcaststatus.h
index e15ca87db..ad5c11bc1 100644
--- a/libkdepim/broadcaststatus.h
+++ b/libkdepim/broadcaststatus.h
@@ -11,8 +11,8 @@
#ifndef __kpim_broadcast_status_h
#define __kpim_broadcast_status_h
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
#include <kdepimmacros.h>
@@ -41,9 +41,9 @@ public:
static BroadcastStatus *instance();
/** Return the last status message from setStatusMsg() */
- QString statusMsg() const { return mStatusMsg; }
+ TQString statusMsg() const { return mStatusMsg; }
/** Sets a status bar message with timestamp */
- void setStatusMsgWithTimestamp( const QString& message );
+ void setStatusMsgWithTimestamp( const TQString& message );
/** Sets a transmission completed status bar message */
void setStatusMsgTransmissionCompleted( int numMessages,
int numBytes = -1,
@@ -51,7 +51,7 @@ public:
int numBytesToRead = -1,
bool mLeaveOnServer = false,
KPIM::ProgressItem* progressItem = 0 ); // set the same status in this progress item
- void setStatusMsgTransmissionCompleted( const QString& account,
+ void setStatusMsgTransmissionCompleted( const TQString& account,
int numMessages,
int numBytes = -1,
int numBytesRead = -1,
@@ -62,13 +62,13 @@ public:
public slots:
/** Emit an update status bar signal. It's a slot so it can be hooked up
to other signals. */
- void setStatusMsg( const QString& message );
+ void setStatusMsg( const TQString& message );
/**
Set a status message that will go away again with the next call of
reset().
*/
- void setTransientStatusMsg( const QString& msg );
+ void setTransientStatusMsg( const TQString& msg );
/**
Reset the status message to what ever non-transient message was last
active or has since been set.
@@ -78,12 +78,12 @@ public slots:
signals:
/** Emitted when setStatusMsg is called. */
- void statusMsg( const QString& );
+ void statusMsg( const TQString& );
protected:
BroadcastStatus();
- QString mStatusMsg;
+ TQString mStatusMsg;
bool mTransientActive;
static BroadcastStatus* instance_;
};
diff --git a/libkdepim/calendardiffalgo.cpp b/libkdepim/calendardiffalgo.cpp
index 4550ef3b3..79676fb84 100644
--- a/libkdepim/calendardiffalgo.cpp
+++ b/libkdepim/calendardiffalgo.cpp
@@ -26,7 +26,7 @@
using namespace KPIM;
#ifndef KDE_USE_FINAL
-static bool compareString( const QString &left, const QString &right )
+static bool compareString( const TQString &left, const TQString &right )
{
if ( left.isEmpty() && right.isEmpty() )
return true;
@@ -35,42 +35,42 @@ static bool compareString( const QString &left, const QString &right )
}
#endif
-static QString toString( KCal::Attendee *attendee )
+static TQString toString( KCal::Attendee *attendee )
{
return attendee->name() + "<" + attendee->email() + ">";
}
-static QString toString( KCal::Alarm * )
+static TQString toString( KCal::Alarm * )
{
- return QString::null;
+ return TQString::null;
}
-static QString toString( KCal::Incidence * )
+static TQString toString( KCal::Incidence * )
{
- return QString::null;
+ return TQString::null;
}
-static QString toString( KCal::Attachment * )
+static TQString toString( KCal::Attachment * )
{
- return QString::null;
+ return TQString::null;
}
-static QString toString( const QDate &date )
+static TQString toString( const TQDate &date )
{
return date.toString();
}
-static QString toString( const QDateTime &dateTime )
+static TQString toString( const TQDateTime &dateTime )
{
return dateTime.toString();
}
-static QString toString( const QString str )
+static TQString toString( const TQString str )
{
return str;
}
-static QString toString( bool value )
+static TQString toString( bool value )
{
if ( value )
return i18n( "Yes" );
@@ -126,7 +126,7 @@ void CalendarDiffAlgo::diffIncidenceBase( KCal::IncidenceBase *left, KCal::Incid
conflictField( i18n( "Has duration" ), toString( left->hasDuration() ), toString( right->hasDuration() ) );
if ( left->duration() != right->duration() )
- conflictField( i18n( "Duration" ), QString::number( left->duration() ), QString::number( right->duration() ) );
+ conflictField( i18n( "Duration" ), TQString::number( left->duration() ), TQString::number( right->duration() ) );
}
void CalendarDiffAlgo::diffIncidence( KCal::Incidence *left, KCal::Incidence *right )
@@ -191,15 +191,15 @@ void CalendarDiffAlgo::diffTodo( KCal::Todo *left, KCal::Todo *right )
conflictField( i18n( "Has Complete Date" ), toString( left->hasCompletedDate() ), toString( right->hasCompletedDate() ) );
if ( left->percentComplete() != right->percentComplete() )
- conflictField( i18n( "Complete" ), QString::number( left->percentComplete() ), QString::number( right->percentComplete() ) );
+ conflictField( i18n( "Complete" ), TQString::number( left->percentComplete() ), TQString::number( right->percentComplete() ) );
if ( left->completed() != right->completed() )
conflictField( i18n( "Completed" ), toString( left->completed() ), toString( right->completed() ) );
}
template <class L>
-void CalendarDiffAlgo::diffList( const QString &id,
- const QValueList<L> &left, const QValueList<L> &right )
+void CalendarDiffAlgo::diffList( const TQString &id,
+ const TQValueList<L> &left, const TQValueList<L> &right )
{
for ( uint i = 0; i < left.count(); ++i ) {
if ( right.find( left[ i ] ) == right.end() )
diff --git a/libkdepim/calendardiffalgo.h b/libkdepim/calendardiffalgo.h
index 14fb4eba3..43d855134 100644
--- a/libkdepim/calendardiffalgo.h
+++ b/libkdepim/calendardiffalgo.h
@@ -37,7 +37,7 @@ class KDE_EXPORT CalendarDiffAlgo : public DiffAlgo
private:
template <class L>
- void diffList( const QString &id, const QValueList<L> &left, const QValueList<L> &right );
+ void diffList( const TQString &id, const TQValueList<L> &left, const TQValueList<L> &right );
void diffIncidenceBase( KCal::IncidenceBase*, KCal::IncidenceBase* );
void diffIncidence( KCal::Incidence*, KCal::Incidence* );
diff --git a/libkdepim/categoryeditdialog.cpp b/libkdepim/categoryeditdialog.cpp
index 757848b67..719bd9209 100644
--- a/libkdepim/categoryeditdialog.cpp
+++ b/libkdepim/categoryeditdialog.cpp
@@ -20,12 +20,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstringlist.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qpushbutton.h>
+#include <tqstringlist.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include "kpimprefs.h"
@@ -37,59 +37,59 @@ using namespace KPIM;
class CategoryEditDialog::Private
{
public:
- QListView *mView;
- QPushButton *mAddButton;
- QPushButton *mEditButton;
- QPushButton *mDeleteButton;
+ TQListView *mView;
+ TQPushButton *mAddButton;
+ TQPushButton *mEditButton;
+ TQPushButton *mDeleteButton;
};
class CategoryListViewItem : public QListViewItem
{
public:
- CategoryListViewItem( QListView *view, const QString &text ) :
- QListViewItem( view, text )
+ CategoryListViewItem( TQListView *view, const TQString &text ) :
+ TQListViewItem( view, text )
{
}
void okRename ( int col ) // we need that public to explicitly accept renaming when closing the dialog
{
- QListViewItem::okRename( col );
+ TQListViewItem::okRename( col );
}
};
-CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent,
+CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, TQWidget* parent,
const char* name, bool modal )
: KDialogBase::KDialogBase( parent, name, modal,
i18n("Edit Categories"), Ok|Apply|Cancel|Help, Ok, true ),
mPrefs( prefs ), d( new Private )
{
- QWidget *widget = new QWidget( this );
+ TQWidget *widget = new TQWidget( this );
setMainWidget( widget );
- QGridLayout *layout = new QGridLayout( widget, 4, 2, marginHint(), spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( widget, 4, 2, marginHint(), spacingHint() );
- d->mView = new QListView( widget );
+ d->mView = new TQListView( widget );
d->mView->addColumn( "" );
d->mView->header()->hide();
- d->mView->setDefaultRenameAction( QListView::Accept );
+ d->mView->setDefaultRenameAction( TQListView::Accept );
layout->addMultiCellWidget( d->mView, 0, 3, 0, 0 );
- d->mAddButton = new QPushButton( i18n( "Add" ), widget );
+ d->mAddButton = new TQPushButton( i18n( "Add" ), widget );
layout->addWidget( d->mAddButton, 0, 1 );
- d->mEditButton = new QPushButton( i18n( "Edit" ), widget );
+ d->mEditButton = new TQPushButton( i18n( "Edit" ), widget );
layout->addWidget( d->mEditButton, 1, 1 );
- d->mDeleteButton = new QPushButton( i18n( "Remove" ), widget );
+ d->mDeleteButton = new TQPushButton( i18n( "Remove" ), widget );
layout->addWidget( d->mDeleteButton, 2, 1 );
fillList();
- connect( d->mAddButton, SIGNAL( clicked() ), this, SLOT( add() ) );
- connect( d->mEditButton, SIGNAL( clicked() ), this, SLOT( edit() ) );
- connect( d->mDeleteButton, SIGNAL( clicked() ), this, SLOT( remove() ) );
+ connect( d->mAddButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( add() ) );
+ connect( d->mEditButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( edit() ) );
+ connect( d->mDeleteButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( remove() ) );
}
/*
@@ -103,12 +103,12 @@ CategoryEditDialog::~CategoryEditDialog()
void CategoryEditDialog::fillList()
{
d->mView->clear();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
bool categoriesExist=false;
for ( it = mPrefs->mCustomCategories.begin();
it != mPrefs->mCustomCategories.end(); ++it ) {
- QListViewItem *item = new CategoryListViewItem( d->mView, *it );
+ TQListViewItem *item = new CategoryListViewItem( d->mView, *it );
item->setRenameEnabled( 0, true );
categoriesExist = true;
@@ -124,7 +124,7 @@ void CategoryEditDialog::add()
if ( d->mView->firstChild() )
d->mView->setCurrentItem( d->mView->firstChild() );
- QListViewItem *item = new CategoryListViewItem( d->mView, i18n( "New category" ) );
+ TQListViewItem *item = new CategoryListViewItem( d->mView, i18n( "New category" ) );
item->setRenameEnabled( 0, true );
d->mView->setSelected( item, true );
@@ -168,7 +168,7 @@ void CategoryEditDialog::slotApply()
{
mPrefs->mCustomCategories.clear();
- QListViewItem *item = d->mView->firstChild();
+ TQListViewItem *item = d->mView->firstChild();
while ( item ) {
if ( !item->text( 0 ).isEmpty() )
mPrefs->mCustomCategories.append( item->text( 0 ) );
diff --git a/libkdepim/categoryeditdialog.h b/libkdepim/categoryeditdialog.h
index 5dc21fe1e..f8168b7af 100644
--- a/libkdepim/categoryeditdialog.h
+++ b/libkdepim/categoryeditdialog.h
@@ -33,7 +33,7 @@ class KDE_EXPORT CategoryEditDialog : public KDialogBase
{
Q_OBJECT
public:
- CategoryEditDialog( KPimPrefs *prefs, QWidget* parent = 0,
+ CategoryEditDialog( KPimPrefs *prefs, TQWidget* parent = 0,
const char* name = 0,
bool modal = false );
~CategoryEditDialog();
diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp
index 51090290a..4eb072b12 100644
--- a/libkdepim/categoryselectdialog.cpp
+++ b/libkdepim/categoryselectdialog.cpp
@@ -20,9 +20,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qheader.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqheader.h>
#include "categoryselectdialog_base.h"
#include <klocale.h>
@@ -32,7 +32,7 @@
using namespace KPIM;
-CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent,
+CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, TQWidget* parent,
const char* name, bool modal )
: KDialogBase::KDialogBase( parent, name, modal,
i18n("Select Categories"), Ok|Apply|Cancel|Help, Ok, true ),
@@ -44,18 +44,18 @@ CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent,
setCategories();
- connect( mWidget->mButtonEdit, SIGNAL(clicked()),
- SIGNAL(editCategories()) );
- connect( mWidget->mButtonClear, SIGNAL(clicked()),
- SLOT(clear()) );
+ connect( mWidget->mButtonEdit, TQT_SIGNAL(clicked()),
+ TQT_SIGNAL(editCategories()) );
+ connect( mWidget->mButtonClear, TQT_SIGNAL(clicked()),
+ TQT_SLOT(clear()) );
}
-void CategorySelectDialog::setCategories( const QStringList &categoryList )
+void CategorySelectDialog::setCategories( const TQStringList &categoryList )
{
mWidget->mCategories->clear();
mCategoryList.clear();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = categoryList.begin(); it != categoryList.end(); ++it )
if ( mPrefs->mCustomCategories.find( *it ) == mPrefs->mCustomCategories.end() )
@@ -63,7 +63,7 @@ void CategorySelectDialog::setCategories( const QStringList &categoryList )
for ( it = mPrefs->mCustomCategories.begin();
it != mPrefs->mCustomCategories.end(); ++it ) {
- new QCheckListItem( mWidget->mCategories, *it, QCheckListItem::CheckBox );
+ new TQCheckListItem( mWidget->mCategories, *it, TQCheckListItem::CheckBox );
}
}
@@ -71,40 +71,40 @@ CategorySelectDialog::~CategorySelectDialog()
{
}
-void CategorySelectDialog::setSelected(const QStringList &selList)
+void CategorySelectDialog::setSelected(const TQStringList &selList)
{
clear();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = selList.begin(); it != selList.end(); ++it ) {
- QCheckListItem *item = (QCheckListItem *)mWidget->mCategories->firstChild();
+ TQCheckListItem *item = (TQCheckListItem *)mWidget->mCategories->firstChild();
while (item) {
if (item->text() == *it) {
item->setOn(true);
break;
}
- item = (QCheckListItem *)item->nextSibling();
+ item = (TQCheckListItem *)item->nextSibling();
}
}
}
-QStringList CategorySelectDialog::selectedCategories() const
+TQStringList CategorySelectDialog::selectedCategories() const
{
return mCategoryList;
}
void CategorySelectDialog::slotApply()
{
- QStringList categories;
- QCheckListItem *item = (QCheckListItem *)mWidget->mCategories->firstChild();
+ TQStringList categories;
+ TQCheckListItem *item = (TQCheckListItem *)mWidget->mCategories->firstChild();
while (item) {
if (item->isOn()) {
categories.append(item->text());
}
- item = (QCheckListItem *)item->nextSibling();
+ item = (TQCheckListItem *)item->nextSibling();
}
- QString categoriesStr = categories.join(", ");
+ TQString categoriesStr = categories.join(", ");
mCategoryList = categories;
@@ -120,22 +120,22 @@ void CategorySelectDialog::slotOk()
void CategorySelectDialog::clear()
{
- QCheckListItem *item = (QCheckListItem *)mWidget->mCategories->firstChild();
+ TQCheckListItem *item = (TQCheckListItem *)mWidget->mCategories->firstChild();
while (item) {
item->setOn(false);
- item = (QCheckListItem *)item->nextSibling();
+ item = (TQCheckListItem *)item->nextSibling();
}
}
void CategorySelectDialog::updateCategoryConfig()
{
- QStringList selected;
- QCheckListItem *item = (QCheckListItem *)mWidget->mCategories->firstChild();
+ TQStringList selected;
+ TQCheckListItem *item = (TQCheckListItem *)mWidget->mCategories->firstChild();
while (item) {
if (item->isOn()) {
selected.append(item->text());
}
- item = (QCheckListItem *)item->nextSibling();
+ item = (TQCheckListItem *)item->nextSibling();
}
setCategories();
diff --git a/libkdepim/categoryselectdialog.h b/libkdepim/categoryselectdialog.h
index e26a56013..dd5ad3b50 100644
--- a/libkdepim/categoryselectdialog.h
+++ b/libkdepim/categoryselectdialog.h
@@ -34,17 +34,17 @@ class KDE_EXPORT CategorySelectDialog : public KDialogBase
{
Q_OBJECT
public:
- CategorySelectDialog( KPimPrefs *prefs, QWidget *parent = 0,
+ CategorySelectDialog( KPimPrefs *prefs, TQWidget *parent = 0,
const char *name = 0, bool modal = false );
~CategorySelectDialog();
/**
Adds this categories to the default categories.
*/
- void setCategories( const QStringList &categoryList = QStringList() );
- void setSelected( const QStringList &selList );
+ void setCategories( const TQStringList &categoryList = TQStringList() );
+ void setSelected( const TQStringList &selList );
- QStringList selectedCategories() const;
+ TQStringList selectedCategories() const;
public slots:
void slotOk();
@@ -53,14 +53,14 @@ class KDE_EXPORT CategorySelectDialog : public KDialogBase
void updateCategoryConfig();
signals:
- void categoriesSelected( const QString & );
- void categoriesSelected( const QStringList & );
+ void categoriesSelected( const TQString & );
+ void categoriesSelected( const TQStringList & );
void editCategories();
private:
KPimPrefs *mPrefs;
CategorySelectDialog_base *mWidget;
- QStringList mCategoryList;
+ TQStringList mCategoryList;
class CategorySelectDialogPrivate;
CategorySelectDialogPrivate *d;
diff --git a/libkdepim/cfgc/autoexample.cpp b/libkdepim/cfgc/autoexample.cpp
index 52ab961f8..69d1e739e 100644
--- a/libkdepim/cfgc/autoexample.cpp
+++ b/libkdepim/cfgc/autoexample.cpp
@@ -34,7 +34,7 @@
#include <kstandarddirs.h>
#include <kautoconfigdialog.h>
-#include <qlabel.h>
+#include <tqlabel.h>
int main( int argc, char **argv )
{
diff --git a/libkdepim/cfgc/example.cfg b/libkdepim/cfgc/example.cfg
index 51071980f..28a2d06b1 100644
--- a/libkdepim/cfgc/example.cfg
+++ b/libkdepim/cfgc/example.cfg
@@ -27,12 +27,12 @@
</entry>
</group>
<group name="MyOptions">
- <entry type="QString">
+ <entry type="TQString">
<name>MyString</name>
<label>This is a string</label>
<default>Default String</default>
</entry>
- <entry type="QStringList">
+ <entry type="TQStringList">
<name>MyStringList</name>
<default>up,down</default>
</entry>
diff --git a/libkdepim/clicklineedit.cpp b/libkdepim/clicklineedit.cpp
index c53821639..dfe7cbadf 100644
--- a/libkdepim/clicklineedit.cpp
+++ b/libkdepim/clicklineedit.cpp
@@ -22,11 +22,11 @@
#include "clicklineedit.h"
-#include "qpainter.h"
+#include "tqpainter.h"
using namespace KPIM;
-ClickLineEdit::ClickLineEdit(QWidget *parent, const QString &msg, const char* name) :
+ClickLineEdit::ClickLineEdit(TQWidget *parent, const TQString &msg, const char* name) :
KLineEdit(parent, name)
{
mDrawClickMsg = true;
@@ -36,50 +36,50 @@ ClickLineEdit::ClickLineEdit(QWidget *parent, const QString &msg, const char* na
ClickLineEdit::~ClickLineEdit() {}
-void ClickLineEdit::setClickMessage( const QString &msg )
+void ClickLineEdit::setClickMessage( const TQString &msg )
{
mClickMessage = msg;
repaint();
}
-void ClickLineEdit::setText( const QString &txt )
+void ClickLineEdit::setText( const TQString &txt )
{
mDrawClickMsg = txt.isEmpty();
repaint();
KLineEdit::setText( txt );
}
-void ClickLineEdit::drawContents( QPainter *p )
+void ClickLineEdit::drawContents( TQPainter *p )
{
KLineEdit::drawContents( p );
if ( mDrawClickMsg == true && !hasFocus() ) {
- QPen tmp = p->pen();
- p->setPen( palette().color( QPalette::Disabled, QColorGroup::Text ) );
- QRect cr = contentsRect();
+ TQPen tmp = p->pen();
+ p->setPen( palette().color( TQPalette::Disabled, TQColorGroup::Text ) );
+ TQRect cr = contentsRect();
p->drawText( cr, AlignAuto|AlignVCenter, mClickMessage );
p->setPen( tmp );
}
}
-void ClickLineEdit::focusInEvent( QFocusEvent *ev )
+void ClickLineEdit::focusInEvent( TQFocusEvent *ev )
{
if ( mDrawClickMsg == true )
{
mDrawClickMsg = false;
repaint();
}
- QLineEdit::focusInEvent( ev );
+ TQLineEdit::focusInEvent( ev );
}
-void ClickLineEdit::focusOutEvent( QFocusEvent *ev )
+void ClickLineEdit::focusOutEvent( TQFocusEvent *ev )
{
if ( text().isEmpty() )
{
mDrawClickMsg = true;
repaint();
}
- QLineEdit::focusOutEvent( ev );
+ TQLineEdit::focusOutEvent( ev );
}
#include "clicklineedit.moc"
diff --git a/libkdepim/clicklineedit.h b/libkdepim/clicklineedit.h
index ba2e29580..0eb4c7a8d 100644
--- a/libkdepim/clicklineedit.h
+++ b/libkdepim/clicklineedit.h
@@ -36,23 +36,23 @@ namespace KPIM {
class KDE_EXPORT ClickLineEdit : public KLineEdit
{
Q_OBJECT
- Q_PROPERTY( QString clickMessage READ clickMessage WRITE setClickMessage )
+ Q_PROPERTY( TQString clickMessage READ clickMessage WRITE setClickMessage )
public:
- ClickLineEdit( QWidget *parent, const QString &msg = QString::null, const char* name = 0 );
+ ClickLineEdit( TQWidget *parent, const TQString &msg = TQString::null, const char* name = 0 );
~ClickLineEdit();
- void setClickMessage( const QString &msg );
- QString clickMessage() const { return mClickMessage; }
+ void setClickMessage( const TQString &msg );
+ TQString clickMessage() const { return mClickMessage; }
- virtual void setText( const QString& txt );
+ virtual void setText( const TQString& txt );
protected:
- virtual void drawContents( QPainter *p );
- virtual void focusInEvent( QFocusEvent *ev );
- virtual void focusOutEvent( QFocusEvent *ev );
+ virtual void drawContents( TQPainter *p );
+ virtual void focusInEvent( TQFocusEvent *ev );
+ virtual void focusOutEvent( TQFocusEvent *ev );
private:
- QString mClickMessage;
+ TQString mClickMessage;
bool mDrawClickMsg;
};
diff --git a/libkdepim/collectingprocess.cpp b/libkdepim/collectingprocess.cpp
index 5d2dc2496..2e1b61714 100644
--- a/libkdepim/collectingprocess.cpp
+++ b/libkdepim/collectingprocess.cpp
@@ -32,7 +32,7 @@
#include "collectingprocess.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <string.h>
@@ -43,13 +43,13 @@ struct CollectingProcess::Private {
{}
uint stdoutSize;
- QValueList<QByteArray> stdoutBuffer;
+ TQValueList<TQByteArray> stdoutBuffer;
uint stderrSize;
- QValueList<QByteArray> stderrBuffer;
+ TQValueList<TQByteArray> stderrBuffer;
};
-CollectingProcess::CollectingProcess( QObject * parent, const char * name )
+CollectingProcess::CollectingProcess( TQObject * parent, const char * name )
: KProcess( parent, name )
{
d = new Private();
@@ -61,25 +61,25 @@ CollectingProcess::~CollectingProcess() {
bool CollectingProcess::start( RunMode runmode, Communication comm ) {
// prevent duplicate connection
- disconnect( this, SIGNAL( receivedStdout( KProcess *, char *, int ) ),
- this, SLOT( slotReceivedStdout( KProcess *, char *, int ) ) );
+ disconnect( this, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ),
+ this, TQT_SLOT( slotReceivedStdout( KProcess *, char *, int ) ) );
if ( comm & Stdout ) {
- connect( this, SIGNAL( receivedStdout( KProcess *, char *, int ) ),
- this, SLOT( slotReceivedStdout( KProcess *, char *, int ) ) );
+ connect( this, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ),
+ this, TQT_SLOT( slotReceivedStdout( KProcess *, char *, int ) ) );
}
// prevent duplicate connection
- disconnect( this, SIGNAL( receivedStderr( KProcess *, char *, int ) ),
- this, SLOT( slotReceivedStderr( KProcess *, char *, int ) ) );
+ disconnect( this, TQT_SIGNAL( receivedStderr( KProcess *, char *, int ) ),
+ this, TQT_SLOT( slotReceivedStderr( KProcess *, char *, int ) ) );
if ( comm & Stderr ) {
- connect( this, SIGNAL( receivedStderr( KProcess *, char *, int ) ),
- this, SLOT( slotReceivedStderr( KProcess *, char *, int ) ) );
+ connect( this, TQT_SIGNAL( receivedStderr( KProcess *, char *, int ) ),
+ this, TQT_SLOT( slotReceivedStderr( KProcess *, char *, int ) ) );
}
return KProcess::start( runmode, comm );
}
void CollectingProcess::slotReceivedStdout( KProcess *, char *buf, int len )
{
- QByteArray b;
+ TQByteArray b;
b.duplicate( buf, len );
d->stdoutBuffer.append( b );
d->stdoutSize += len;
@@ -87,21 +87,21 @@ void CollectingProcess::slotReceivedStdout( KProcess *, char *buf, int len )
void CollectingProcess::slotReceivedStderr( KProcess *, char *buf, int len )
{
- QByteArray b;
+ TQByteArray b;
b.duplicate( buf, len );
d->stderrBuffer.append( b );
d->stderrSize += len;
}
-QByteArray CollectingProcess::collectedStdout()
+TQByteArray CollectingProcess::collectedStdout()
{
if ( d->stdoutSize == 0 ) {
- return QByteArray();
+ return TQByteArray();
}
uint offset = 0;
- QByteArray b( d->stdoutSize );
- for ( QValueList<QByteArray>::const_iterator it = d->stdoutBuffer.begin();
+ TQByteArray b( d->stdoutSize );
+ for ( TQValueList<TQByteArray>::const_iterator it = d->stdoutBuffer.begin();
it != d->stdoutBuffer.end();
++it ) {
memcpy( b.data() + offset, (*it).data(), (*it).size() );
@@ -113,15 +113,15 @@ QByteArray CollectingProcess::collectedStdout()
return b;
}
-QByteArray CollectingProcess::collectedStderr()
+TQByteArray CollectingProcess::collectedStderr()
{
if ( d->stderrSize == 0 ) {
- return QByteArray();
+ return TQByteArray();
}
uint offset = 0;
- QByteArray b( d->stderrSize );
- for ( QValueList<QByteArray>::const_iterator it = d->stderrBuffer.begin();
+ TQByteArray b( d->stderrSize );
+ for ( TQValueList<TQByteArray>::const_iterator it = d->stderrBuffer.begin();
it != d->stderrBuffer.end();
++it ) {
memcpy( b.data() + offset, (*it).data(), (*it).size() );
diff --git a/libkdepim/collectingprocess.h b/libkdepim/collectingprocess.h
index 0bad28a85..aff8a8d32 100644
--- a/libkdepim/collectingprocess.h
+++ b/libkdepim/collectingprocess.h
@@ -49,7 +49,7 @@ namespace KPIM {
class KDE_EXPORT CollectingProcess : public KProcess {
Q_OBJECT
public:
- CollectingProcess( QObject * parent = 0, const char * name = 0 );
+ CollectingProcess( TQObject * parent = 0, const char * name = 0 );
~CollectingProcess();
/** Starts the process in NotifyOnExit mode and writes in to stdin of
@@ -58,9 +58,9 @@ public:
bool start( RunMode runmode, Communication comm );
/** Returns the contents of the stdout buffer and clears it afterwards. */
- QByteArray collectedStdout();
+ TQByteArray collectedStdout();
/** Returns the contents of the stderr buffer and clears it afterwards. */
- QByteArray collectedStderr();
+ TQByteArray collectedStderr();
private slots:
void slotReceivedStdout( KProcess *, char *, int );
diff --git a/libkdepim/completionordereditor.cpp b/libkdepim/completionordereditor.cpp
index 4f797c2c1..b507d9b97 100644
--- a/libkdepim/completionordereditor.cpp
+++ b/libkdepim/completionordereditor.cpp
@@ -41,10 +41,10 @@
#include <klistview.h>
#include <kpushbutton.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qheader.h>
-#include <qtoolbutton.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqheader.h>
+#include <tqtoolbutton.h>
#include <kapplication.h>
#include <dcopclient.h>
@@ -75,7 +75,7 @@ using namespace KPIM;
namespace KPIM {
-int CompletionItemList::compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
+int CompletionItemList::compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
{
int w1 = ( (CompletionItem*)s1 )->completionWeight();
int w2 = ( (CompletionItem*)s2 )->completionWeight();
@@ -87,7 +87,7 @@ class LDAPCompletionItem : public CompletionItem
{
public:
LDAPCompletionItem( LdapClient* ldapClient ) : mLdapClient( ldapClient ) {}
- virtual QString label() const { return i18n( "LDAP server %1" ).arg( mLdapClient->server().host() ); }
+ virtual TQString label() const { return i18n( "LDAP server %1" ).arg( mLdapClient->server().host() ); }
virtual int completionWeight() const { return mLdapClient->completionWeight(); }
virtual void save( CompletionOrderEditor* );
protected:
@@ -101,7 +101,7 @@ void LDAPCompletionItem::save( CompletionOrderEditor* )
{
KConfig config( "kabldaprc" );
config.setGroup( "LDAP" );
- config.writeEntry( QString( "SelectedCompletionWeight%1" ).arg( mLdapClient->clientNumber() ),
+ config.writeEntry( TQString( "SelectedCompletionWeight%1" ).arg( mLdapClient->clientNumber() ),
mWeight );
config.sync();
}
@@ -110,18 +110,18 @@ void LDAPCompletionItem::save( CompletionOrderEditor* )
class SimpleCompletionItem : public CompletionItem
{
public:
- SimpleCompletionItem( CompletionOrderEditor* editor, const QString& label, const QString& identifier )
+ SimpleCompletionItem( CompletionOrderEditor* editor, const TQString& label, const TQString& identifier )
: mLabel( label ), mIdentifier( identifier ) {
KConfigGroup group( editor->configFile(), "CompletionWeights" );
mWeight = group.readNumEntry( mIdentifier, 60 );
}
- virtual QString label() const { return mLabel; }
+ virtual TQString label() const { return mLabel; }
virtual int completionWeight() const { return mWeight; }
virtual void save( CompletionOrderEditor* );
protected:
virtual void setCompletionWeight( int weight ) { mWeight = weight; }
private:
- QString mLabel, mIdentifier;
+ TQString mLabel, mIdentifier;
int mWeight;
};
@@ -137,10 +137,10 @@ void SimpleCompletionItem::save( CompletionOrderEditor* editor )
class KABCImapSubResCompletionItem : public CompletionItem
{
public:
- KABCImapSubResCompletionItem( ResourceABC* resource, const QString& subResource )
+ KABCImapSubResCompletionItem( ResourceABC* resource, const TQString& subResource )
: mResource( resource ), mSubResource( subResource ), mWeight( completionWeight() ) {}
- virtual QString label() const {
- return QString( "%1 %2" ).arg( mResource->resourceName() ).arg( mResource->subresourceLabel( mSubResource ) );
+ virtual TQString label() const {
+ return TQString( "%1 %2" ).arg( mResource->resourceName() ).arg( mResource->subresourceLabel( mSubResource ) );
}
virtual int completionWeight() const {
return mResource->subresourceCompletionWeight( mSubResource );
@@ -153,7 +153,7 @@ public:
}
private:
ResourceABC* mResource;
- QString mSubResource;
+ TQString mSubResource;
int mWeight;
};
@@ -162,8 +162,8 @@ private:
class CompletionViewItem : public QListViewItem
{
public:
- CompletionViewItem( QListView* lv, CompletionItem* item )
- : QListViewItem( lv, lv->lastItem(), item->label() ), mItem( item ) {}
+ CompletionViewItem( TQListView* lv, CompletionItem* item )
+ : TQListViewItem( lv, lv->lastItem(), item->label() ), mItem( item ) {}
CompletionItem* item() const { return mItem; }
void setItem( CompletionItem* i ) { mItem = i; setText( 0, mItem->label() ); }
@@ -172,25 +172,25 @@ private:
};
CompletionOrderEditor::CompletionOrderEditor( KPIM::LdapSearch* ldapSearch,
- QWidget* parent, const char* name )
+ TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n("Edit Completion Order"), Ok|Cancel, Ok, true ),
mConfig( "kpimcompletionorder" ), mDirty( false )
{
mItems.setAutoDelete( true );
// The first step is to gather all the data, creating CompletionItem objects
- QValueList< LdapClient* > ldapClients = ldapSearch->clients();
- for( QValueList<LdapClient*>::const_iterator it = ldapClients.begin(); it != ldapClients.end(); ++it ) {
+ TQValueList< LdapClient* > ldapClients = ldapSearch->clients();
+ for( TQValueList<LdapClient*>::const_iterator it = ldapClients.begin(); it != ldapClients.end(); ++it ) {
//kdDebug(5300) << "LDAP: host " << (*it)->host() << " weight " << (*it)->completionWeight() << endl;
mItems.append( new LDAPCompletionItem( *it ) );
}
KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );
- QPtrList<KABC::Resource> resources = addressBook->resources();
- for( QPtrListIterator<KABC::Resource> resit( resources ); *resit; ++resit ) {
+ TQPtrList<KABC::Resource> resources = addressBook->resources();
+ for( TQPtrListIterator<KABC::Resource> resit( resources ); *resit; ++resit ) {
//kdDebug(5300) << "KABC Resource: " << (*resit)->className() << endl;
ResourceABC* res = dynamic_cast<ResourceABC *>( *resit );
if ( res ) { // IMAP KABC resource
- const QStringList subresources = res->subresources();
- for( QStringList::const_iterator it = subresources.begin(); it != subresources.end(); ++it ) {
+ const TQStringList subresources = res->subresources();
+ for( TQStringList::const_iterator it = subresources.begin(); it != subresources.end(); ++it ) {
mItems.append( new KABCImapSubResCompletionItem( res, *it ) );
}
} else { // non-IMAP KABC resource
@@ -207,18 +207,18 @@ CompletionOrderEditor::CompletionOrderEditor( KPIM::LdapSearch* ldapSearch,
// Now sort the items, then create the GUI
mItems.sort();
- QHBox* page = makeHBoxMainWidget();
+ TQHBox* page = makeHBoxMainWidget();
mListView = new KListView( page );
mListView->setSorting( -1 );
- mListView->addColumn( QString::null );
+ mListView->addColumn( TQString::null );
mListView->header()->hide();
- for( QPtrListIterator<CompletionItem> compit( mItems ); *compit; ++compit ) {
+ for( TQPtrListIterator<CompletionItem> compit( mItems ); *compit; ++compit ) {
new CompletionViewItem( mListView, *compit );
kdDebug(5300) << " " << (*compit)->label() << " " << (*compit)->completionWeight() << endl;
}
- QVBox* upDownBox = new QVBox( page );
+ TQVBox* upDownBox = new TQVBox( page );
mUpButton = new KPushButton( upDownBox, "mUpButton" );
mUpButton->setIconSet( BarIconSet( "up", KIcon::SizeSmall ) );
mUpButton->setEnabled( false ); // b/c no item is selected yet
@@ -229,20 +229,20 @@ CompletionOrderEditor::CompletionOrderEditor( KPIM::LdapSearch* ldapSearch,
mDownButton->setEnabled( false ); // b/c no item is selected yet
mDownButton->setFocusPolicy( StrongFocus );
- QWidget* spacer = new QWidget( upDownBox );
+ TQWidget* spacer = new TQWidget( upDownBox );
upDownBox->setStretchFactor( spacer, 100 );
- connect( mListView, SIGNAL( selectionChanged( QListViewItem* ) ),
- SLOT( slotSelectionChanged( QListViewItem* ) ) );
- connect( mUpButton, SIGNAL( clicked() ), this, SLOT( slotMoveUp() ) );
- connect( mDownButton, SIGNAL( clicked() ), this, SLOT( slotMoveDown() ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ TQT_SLOT( slotSelectionChanged( TQListViewItem* ) ) );
+ connect( mUpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveUp() ) );
+ connect( mDownButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveDown() ) );
}
CompletionOrderEditor::~CompletionOrderEditor()
{
}
-void CompletionOrderEditor::slotSelectionChanged( QListViewItem *item )
+void CompletionOrderEditor::slotSelectionChanged( TQListViewItem *item )
{
mDownButton->setEnabled( item && item->itemBelow() );
mUpButton->setEnabled( item && item->itemAbove() );
@@ -283,7 +283,7 @@ void CompletionOrderEditor::slotOk()
{
if ( mDirty ) {
int w = 100;
- for ( QListViewItem* it = mListView->firstChild(); it; it = it->nextSibling() ) {
+ for ( TQListViewItem* it = mListView->firstChild(); it; it = it->nextSibling() ) {
CompletionViewItem *item = static_cast<CompletionViewItem *>( it );
item->item()->setCompletionWeight( w );
item->item()->save( this );
@@ -294,7 +294,7 @@ void CompletionOrderEditor::slotOk()
// Emit DCOP signal
// The emitter is always set to KPIM::IMAPCompletionOrder, so that the connect works
// This is why we can't use k_dcop_signals here, but need to use emitDCOPSignal
- kapp->dcopClient()->emitDCOPSignal( "KPIM::IMAPCompletionOrder", "orderChanged()", QByteArray() );
+ kapp->dcopClient()->emitDCOPSignal( "KPIM::IMAPCompletionOrder", "orderChanged()", TQByteArray() );
}
KDialogBase::slotOk();
}
diff --git a/libkdepim/completionordereditor.h b/libkdepim/completionordereditor.h
index e48f72728..0e17a5342 100644
--- a/libkdepim/completionordereditor.h
+++ b/libkdepim/completionordereditor.h
@@ -46,32 +46,32 @@ class CompletionItem
{
public:
virtual ~CompletionItem() {}
- virtual QString label() const = 0;
+ virtual TQString label() const = 0;
virtual int completionWeight() const = 0;
virtual void setCompletionWeight( int weight ) = 0;
virtual void save( CompletionOrderEditor* ) = 0;
};
-// I don't like QPtrList much, but it has compareItems, which QValueList doesn't
-class CompletionItemList : public QPtrList<CompletionItem>
+// I don't like TQPtrList much, but it has compareItems, which TQValueList doesn't
+class CompletionItemList : public TQPtrList<CompletionItem>
{
public:
CompletionItemList() {}
- virtual int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 );
+ virtual int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 );
};
class CompletionOrderEditor : public KDialogBase {
Q_OBJECT
public:
- CompletionOrderEditor( KPIM::LdapSearch* ldapSearch, QWidget* parent, const char* name = 0 );
+ CompletionOrderEditor( KPIM::LdapSearch* ldapSearch, TQWidget* parent, const char* name = 0 );
~CompletionOrderEditor();
KConfig* configFile() { return &mConfig; }
private slots:
- void slotSelectionChanged( QListViewItem* );
+ void slotSelectionChanged( TQListViewItem* );
void slotMoveUp();
void slotMoveDown();
virtual void slotOk();
diff --git a/libkdepim/configmanager.cpp b/libkdepim/configmanager.cpp
index ccf268242..64b4562fc 100644
--- a/libkdepim/configmanager.cpp
+++ b/libkdepim/configmanager.cpp
@@ -21,8 +21,8 @@
using namespace KPIM;
-ConfigManager::ConfigManager( QObject * parent, const char * name )
- : QObject( parent, name )
+ConfigManager::ConfigManager( TQObject * parent, const char * name )
+ : TQObject( parent, name )
{
}
diff --git a/libkdepim/configmanager.h b/libkdepim/configmanager.h
index ef3b9848b..44a170bcc 100644
--- a/libkdepim/configmanager.h
+++ b/libkdepim/configmanager.h
@@ -17,7 +17,7 @@
#ifndef _KMAIL_CONFIGMANAGER_H_
#define _KMAIL_CONFIGMANAGER_H_
-#include <qobject.h>
+#include <tqobject.h>
#include <kdepimmacros.h>
@@ -29,7 +29,7 @@ namespace KPIM {
* @short Class for managing a set of config options.
* @author Marc Mutz <mutz@kde.org>
**/
-class KDE_EXPORT ConfigManager : public QObject {
+class KDE_EXPORT ConfigManager : public TQObject {
Q_OBJECT
public:
/** Commit changes to disk and emit changed() if necessary. */
@@ -45,7 +45,7 @@ signals:
void changed();
protected:
- ConfigManager( QObject * parent=0, const char * name=0 );
+ ConfigManager( TQObject * parent=0, const char * name=0 );
virtual ~ConfigManager();
};
diff --git a/libkdepim/csshelper.cpp b/libkdepim/csshelper.cpp
index 2e2c11379..b65713dd2 100644
--- a/libkdepim/csshelper.cpp
+++ b/libkdepim/csshelper.cpp
@@ -36,61 +36,61 @@
#include <kdebug.h>
#include <kglobal.h>
-#include <qstring.h>
-#include <qapplication.h>
+#include <tqstring.h>
+#include <tqapplication.h>
namespace KPIM {
namespace {
- // some QColor manipulators that hide the ugly QColor API w.r.t. HSV:
- inline QColor darker( const QColor & c ) {
+ // some TQColor manipulators that hide the ugly TQColor API w.r.t. HSV:
+ inline TQColor darker( const TQColor & c ) {
int h, s, v;
c.hsv( &h, &s, &v );
- return QColor( h, s, v*4/5, QColor::Hsv );
+ return TQColor( h, s, v*4/5, TQColor::Hsv );
}
- inline QColor desaturate( const QColor & c ) {
+ inline TQColor desaturate( const TQColor & c ) {
int h, s, v;
c.hsv( &h, &s, &v );
- return QColor( h, s/8, v, QColor::Hsv );
+ return TQColor( h, s/8, v, TQColor::Hsv );
}
- inline QColor fixValue( const QColor & c, int newV ) {
+ inline TQColor fixValue( const TQColor & c, int newV ) {
int h, s, v;
c.hsv( &h, &s, &v );
- return QColor( h, s, newV, QColor::Hsv );
+ return TQColor( h, s, newV, TQColor::Hsv );
}
- inline int getValueOf( const QColor & c ) {
+ inline int getValueOf( const TQColor & c ) {
int h, s, v;
c.hsv( &h, &s, &v );
return v;
}
}
- CSSHelper::CSSHelper( const QPaintDeviceMetrics &pdm ) :
+ CSSHelper::CSSHelper( const TQPaintDeviceMetrics &pdm ) :
mShrinkQuotes( false ),
mMetrics( pdm )
{
// initialize with defaults - should match the corresponding application defaults
- mForegroundColor = QApplication::palette().active().text();
+ mForegroundColor = TQApplication::palette().active().text();
mLinkColor = KGlobalSettings::linkColor();
mVisitedLinkColor = KGlobalSettings::visitedLinkColor();
- mBackgroundColor = QApplication::palette().active().base();
- cHtmlWarning = QColor( 0xFF, 0x40, 0x40 ); // warning frame color: light red
+ mBackgroundColor = TQApplication::palette().active().base();
+ cHtmlWarning = TQColor( 0xFF, 0x40, 0x40 ); // warning frame color: light red
- cPgpEncrH = QColor( 0x00, 0x80, 0xFF ); // light blue
- cPgpOk1H = QColor( 0x40, 0xFF, 0x40 ); // light green
- cPgpOk0H = QColor( 0xFF, 0xFF, 0x40 ); // light yellow
- cPgpWarnH = QColor( 0xFF, 0xFF, 0x40 ); // light yellow
+ cPgpEncrH = TQColor( 0x00, 0x80, 0xFF ); // light blue
+ cPgpOk1H = TQColor( 0x40, 0xFF, 0x40 ); // light green
+ cPgpOk0H = TQColor( 0xFF, 0xFF, 0x40 ); // light yellow
+ cPgpWarnH = TQColor( 0xFF, 0xFF, 0x40 ); // light yellow
cPgpErrH = Qt::red;
for ( int i = 0 ; i < 3 ; ++i )
- mQuoteColor[i] = QColor( 0x00, 0x80 - i * 0x10, 0x00 ); // shades of green
+ mQuoteColor[i] = TQColor( 0x00, 0x80 - i * 0x10, 0x00 ); // shades of green
mRecycleQuoteColors = false;
- QFont defaultFont = KGlobalSettings::generalFont();
- QFont defaultFixedFont = KGlobalSettings::fixedFont();
+ TQFont defaultFont = KGlobalSettings::generalFont();
+ TQFont defaultFixedFont = KGlobalSettings::fixedFont();
mBodyFont = mPrintFont = defaultFont;
mFixedFont = mFixedPrintFont = defaultFixedFont;
defaultFont.setItalic( true );
@@ -153,7 +153,7 @@ namespace KPIM {
}
}
- QString CSSHelper::cssDefinitions( bool fixed ) const {
+ TQString CSSHelper::cssDefinitions( bool fixed ) const {
return
commonCssDefinitions()
+
@@ -169,14 +169,14 @@ namespace KPIM {
"}\n";
}
- QString CSSHelper::htmlHead( bool /*fixed*/ ) const {
+ TQString CSSHelper::htmlHead( bool /*fixed*/ ) const {
return
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
"<html><head><title></title></head>\n"
"<body>\n";
}
- QString CSSHelper::quoteFontTag( int level ) const {
+ TQString CSSHelper::quoteFontTag( int level ) const {
if ( level < 0 )
level = 0;
static const int numQuoteLevels = sizeof mQuoteFont / sizeof *mQuoteFont;
@@ -184,16 +184,16 @@ namespace KPIM {
? level % numQuoteLevels + 1
: kMin( level + 1, numQuoteLevels ) ;
if ( level >= numQuoteLevels )
- return QString( "<div class=\"deepquotelevel%1\">" ).arg( effectiveLevel );
+ return TQString( "<div class=\"deepquotelevel%1\">" ).arg( effectiveLevel );
else
- return QString( "<div class=\"quotelevel%1\">" ).arg( effectiveLevel );
+ return TQString( "<div class=\"quotelevel%1\">" ).arg( effectiveLevel );
}
- QString CSSHelper::nonQuotedFontTag() const {
+ TQString CSSHelper::nonQuotedFontTag() const {
return "<div class=\"noquote\">";
}
- QFont CSSHelper::bodyFont( bool fixed, bool print ) const {
+ TQFont CSSHelper::bodyFont( bool fixed, bool print ) const {
return fixed ? ( print ? mFixedPrintFont : mFixedFont )
: ( print ? mPrintFont : mBodyFont );
}
@@ -204,22 +204,22 @@ namespace KPIM {
namespace {
- int pointsToPixel( const QPaintDeviceMetrics & metrics, int pointSize ) {
+ int pointsToPixel( const TQPaintDeviceMetrics & metrics, int pointSize ) {
return ( pointSize * metrics.logicalDpiY() + 36 ) / 72 ;
}
}
static const char * const quoteFontSizes[] = { "85", "80", "75" };
- QString CSSHelper::printCssDefinitions( bool fixed ) const {
- const QString headerFont = QString( " font-family: \"%1\" ! important;\n"
+ TQString CSSHelper::printCssDefinitions( bool fixed ) const {
+ const TQString headerFont = TQString( " font-family: \"%1\" ! important;\n"
" font-size: %2pt ! important;\n" )
.arg( mPrintFont.family() )
.arg( mPrintFont.pointSize() );
- const QColorGroup & cg = QApplication::palette().active();
+ const TQColorGroup & cg = TQApplication::palette().active();
- const QFont printFont = bodyFont( fixed, true /* print */ );
- QString quoteCSS;
+ const TQFont printFont = bodyFont( fixed, true /* print */ );
+ TQString quoteCSS;
if ( printFont.italic() )
quoteCSS += " font-style: italic ! important;\n";
if ( printFont.bold() )
@@ -228,16 +228,16 @@ namespace KPIM {
quoteCSS = "div.noquote {\n" + quoteCSS + "}\n\n";
return
- QString( "body {\n"
+ TQString( "body {\n"
" font-family: \"%1\" ! important;\n"
" font-size: %2pt ! important;\n"
" color: #000000 ! important;\n"
" background-color: #ffffff ! important\n"
"}\n\n" )
.arg( printFont.family(),
- QString::number( printFont.pointSize() ) )
+ TQString::number( printFont.pointSize() ) )
+
- QString( "tr.textAtmH,\n"
+ TQString( "tr.textAtmH,\n"
"tr.rfc822H,\n"
"tr.encrH,\n"
"tr.signOkKeyOkH,\n"
@@ -293,23 +293,23 @@ namespace KPIM {
+ quoteCSS;
}
- QString CSSHelper::screenCssDefinitions( const CSSHelper * helper, bool fixed ) const {
- const QString fgColor = mForegroundColor.name();
- const QString bgColor = mBackgroundColor.name();
- const QString linkColor = mLinkColor.name();
- const QString headerFont = QString(" font-family: \"%1\" ! important;\n"
+ TQString CSSHelper::screenCssDefinitions( const CSSHelper * helper, bool fixed ) const {
+ const TQString fgColor = mForegroundColor.name();
+ const TQString bgColor = mBackgroundColor.name();
+ const TQString linkColor = mLinkColor.name();
+ const TQString headerFont = TQString(" font-family: \"%1\" ! important;\n"
" font-size: %2px ! important;\n")
.arg( mBodyFont.family() )
.arg( pointsToPixel( helper->mMetrics, mBodyFont.pointSize() ) );
- const QString background = ( mBackingPixmapOn
- ? QString( " background-image:url(file://%1) ! important;\n" )
+ const TQString background = ( mBackingPixmapOn
+ ? TQString( " background-image:url(file://%1) ! important;\n" )
.arg( mBackingPixmapStr )
- : QString( " background-color: %1 ! important;\n" )
+ : TQString( " background-color: %1 ! important;\n" )
.arg( bgColor ) );
- const QString bodyFontSize = QString::number( pointsToPixel( helper->mMetrics, fontSize( fixed ) ) ) + "px" ;
- const QColorGroup & cg = QApplication::palette().active();
+ const TQString bodyFontSize = TQString::number( pointsToPixel( helper->mMetrics, fontSize( fixed ) ) ) + "px" ;
+ const TQColorGroup & cg = TQApplication::palette().active();
- QString quoteCSS;
+ TQString quoteCSS;
if ( bodyFont( fixed ).italic() )
quoteCSS += " font-style: italic ! important;\n";
if ( bodyFont( fixed ).bold() )
@@ -319,24 +319,24 @@ namespace KPIM {
// CSS definitions for quote levels 1-3
for ( int i = 0 ; i < 3 ; ++i ) {
- quoteCSS += QString( "div.quotelevel%1 {\n"
+ quoteCSS += TQString( "div.quotelevel%1 {\n"
" color: %2 ! important;\n" )
- .arg( QString::number(i+1), mQuoteColor[i].name() );
+ .arg( TQString::number(i+1), mQuoteColor[i].name() );
if ( mQuoteFont[i].italic() )
quoteCSS += " font-style: italic ! important;\n";
if ( mQuoteFont[i].bold() )
quoteCSS += " font-weight: bold ! important;\n";
if ( mShrinkQuotes )
- quoteCSS += " font-size: " + QString::fromLatin1( quoteFontSizes[i] )
+ quoteCSS += " font-size: " + TQString::fromLatin1( quoteFontSizes[i] )
+ "% ! important;\n";
quoteCSS += "}\n\n";
}
// CSS definitions for quote levels 4+
for ( int i = 0 ; i < 3 ; ++i ) {
- quoteCSS += QString( "div.deepquotelevel%1 {\n"
+ quoteCSS += TQString( "div.deepquotelevel%1 {\n"
" color: %2 ! important;\n" )
- .arg( QString::number(i+1), mQuoteColor[i].name() );
+ .arg( TQString::number(i+1), mQuoteColor[i].name() );
if ( mQuoteFont[i].italic() )
quoteCSS += " font-style: italic ! important;\n";
if ( mQuoteFont[i].bold() )
@@ -347,7 +347,7 @@ namespace KPIM {
}
return
- QString( "body {\n"
+ TQString( "body {\n"
" font-family: \"%1\" ! important;\n"
" font-size: %2 ! important;\n"
" color: %3 ! important;\n"
@@ -358,7 +358,7 @@ namespace KPIM {
fgColor,
background )
+
- QString( "a {\n"
+ TQString( "a {\n"
" color: %1 ! important;\n"
" text-decoration: none ! important;\n"
"}\n\n"
@@ -387,7 +387,7 @@ namespace KPIM {
"}\n\n" )
.arg( linkColor, fgColor, bgColor, headerFont )
+
- QString( "table.encr {\n"
+ TQString( "table.encr {\n"
" background-color: %1 ! important;\n"
"}\n\n"
@@ -402,7 +402,7 @@ namespace KPIM {
headerFont,
cPgpEncrB.name() )
+
- QString( "table.signOkKeyOk {\n"
+ TQString( "table.signOkKeyOk {\n"
" background-color: %1 ! important;\n"
"}\n\n"
@@ -417,7 +417,7 @@ namespace KPIM {
headerFont,
cPgpOk1B.name() )
+
- QString( "table.signOkKeyBad {\n"
+ TQString( "table.signOkKeyBad {\n"
" background-color: %1 ! important;\n"
"}\n\n"
@@ -432,7 +432,7 @@ namespace KPIM {
headerFont,
cPgpOk0B.name() )
+
- QString( "table.signWarn {\n"
+ TQString( "table.signWarn {\n"
" background-color: %1 ! important;\n"
"}\n\n"
@@ -447,7 +447,7 @@ namespace KPIM {
headerFont,
cPgpWarnB.name() )
+
- QString( "table.signErr {\n"
+ TQString( "table.signErr {\n"
" background-color: %1 ! important;\n"
"}\n\n"
@@ -462,12 +462,12 @@ namespace KPIM {
headerFont,
cPgpErrB.name() )
+
- QString( "div.htmlWarn {\n"
+ TQString( "div.htmlWarn {\n"
" border: 2px solid %1 ! important;\n"
"}\n\n" )
.arg( cHtmlWarning.name() )
+
- QString( "div.header {\n"
+ TQString( "div.header {\n"
"%1"
"}\n\n"
@@ -521,7 +521,7 @@ namespace KPIM {
+ quoteCSS;
}
- QString CSSHelper::commonCssDefinitions() const {
+ TQString CSSHelper::commonCssDefinitions() const {
return
"div.header {\n"
" margin-bottom: 10pt ! important;\n"
@@ -620,12 +620,12 @@ namespace KPIM {
}
- void CSSHelper::setBodyFont( const QFont& font )
+ void CSSHelper::setBodyFont( const TQFont& font )
{
mBodyFont = font;
}
- void CSSHelper::setPrintFont( const QFont& font )
+ void CSSHelper::setPrintFont( const TQFont& font )
{
mPrintFont = font;
}
diff --git a/libkdepim/csshelper.h b/libkdepim/csshelper.h
index 93b8fc8d8..87455cd13 100644
--- a/libkdepim/csshelper.h
+++ b/libkdepim/csshelper.h
@@ -32,9 +32,9 @@
#ifndef KPIM_CSSHELPER_H
#define KPIM_CSSHELPER_H
-#include <qcolor.h>
-#include <qfont.h>
-#include <qpaintdevicemetrics.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqpaintdevicemetrics.h>
class QString;
@@ -46,26 +46,26 @@ class CSSHelper {
default values.
Sub-Classes should put their config loading here.
*/
- CSSHelper( const QPaintDeviceMetrics &pdm );
+ CSSHelper( const TQPaintDeviceMetrics &pdm );
/** @return HTML head including style sheet definitions and the
&gt;body&lt; tag */
- QString htmlHead( bool fixedFont = false ) const;
+ TQString htmlHead( bool fixedFont = false ) const;
/** @return The collected CSS definitions as a string */
- QString cssDefinitions( bool fixedFont = false ) const;
+ TQString cssDefinitions( bool fixedFont = false ) const;
/** @return a &lt;div&gt; start tag with embedded style
information suitable for quoted text with quote level @p level */
- QString quoteFontTag( int level ) const;
+ TQString quoteFontTag( int level ) const;
/** @return a &lt;div&gt; start tag with embedded style
information suitable for non-quoted text */
- QString nonQuotedFontTag() const;
+ TQString nonQuotedFontTag() const;
- QFont bodyFont( bool fixedFont = false, bool printing = false ) const;
+ TQFont bodyFont( bool fixedFont = false, bool printing = false ) const;
- void setBodyFont( const QFont& font );
- void setPrintFont( const QFont& font );
+ void setBodyFont( const TQFont& font );
+ void setPrintFont( const TQFont& font );
protected:
/** Recalculate PGP frame and body colors (should be called after changing
@@ -73,34 +73,34 @@ class CSSHelper {
void recalculatePGPColors();
protected:
- QFont mBodyFont, mPrintFont, mFixedFont, mFixedPrintFont;
- QFont mQuoteFont[3];
- QColor mQuoteColor[3];
+ TQFont mBodyFont, mPrintFont, mFixedFont, mFixedPrintFont;
+ TQFont mQuoteFont[3];
+ TQColor mQuoteColor[3];
bool mRecycleQuoteColors;
bool mBackingPixmapOn;
bool mShrinkQuotes;
- QString mBackingPixmapStr;
- QColor mForegroundColor, mLinkColor, mVisitedLinkColor, mBackgroundColor;
+ TQString mBackingPixmapStr;
+ TQColor mForegroundColor, mLinkColor, mVisitedLinkColor, mBackgroundColor;
// colors for PGP (Frame, Header, Body)
- QColor cPgpOk1F, cPgpOk1H, cPgpOk1B,
+ TQColor cPgpOk1F, cPgpOk1H, cPgpOk1B,
cPgpOk0F, cPgpOk0H, cPgpOk0B,
cPgpWarnF, cPgpWarnH, cPgpWarnB,
cPgpErrF, cPgpErrH, cPgpErrB,
cPgpEncrF, cPgpEncrH, cPgpEncrB;
// color of frame of warning preceding the source of HTML messages
- QColor cHtmlWarning;
+ TQColor cHtmlWarning;
private:
int fontSize( bool fixed, bool print = false ) const;
// returns CSS rules specific to the print media type
- QString printCssDefinitions( bool fixed ) const;
+ TQString printCssDefinitions( bool fixed ) const;
// returns CSS rules specific to the screen media type
- QString screenCssDefinitions( const CSSHelper * helper, bool fixed ) const;
+ TQString screenCssDefinitions( const CSSHelper * helper, bool fixed ) const;
// returns CSS rules common to both screen and print media types
- QString commonCssDefinitions() const;
+ TQString commonCssDefinitions() const;
private:
- const QPaintDeviceMetrics mMetrics;
+ const TQPaintDeviceMetrics mMetrics;
};
diff --git a/libkdepim/designerfields.cpp b/libkdepim/designerfields.cpp
index 8073bf885..ba78df0ea 100644
--- a/libkdepim/designerfields.cpp
+++ b/libkdepim/designerfields.cpp
@@ -20,15 +20,15 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdatetimeedit.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qspinbox.h>
-#include <qregexp.h>
-#include <qtextedit.h>
-#include <qwidgetfactory.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdatetimeedit.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqspinbox.h>
+#include <tqregexp.h>
+#include <tqtextedit.h>
+#include <tqwidgetfactory.h>
#include <kdatepicker.h>
#include <kdatetimewidget.h>
@@ -41,18 +41,18 @@
using namespace KPIM;
-DesignerFields::DesignerFields( const QString &uiFile, QWidget *parent,
+DesignerFields::DesignerFields( const TQString &uiFile, TQWidget *parent,
const char *name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
initGUI( uiFile );
}
-void DesignerFields::initGUI( const QString &uiFile )
+void DesignerFields::initGUI( const TQString &uiFile )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
- QWidget *wdg = QWidgetFactory::create( uiFile, 0, this );
+ TQWidget *wdg = TQWidgetFactory::create( uiFile, 0, this );
if ( !wdg ) {
kdError() << "No ui file found" << endl;
return;
@@ -63,15 +63,15 @@ void DesignerFields::initGUI( const QString &uiFile )
layout->addWidget( wdg );
- QObjectList *list = wdg->queryList( "QWidget" );
- QObjectListIt it( *list );
+ TQObjectList *list = wdg->queryList( "TQWidget" );
+ TQObjectListIt it( *list );
- QStringList allowedTypes;
- allowedTypes << "QLineEdit"
- << "QTextEdit"
- << "QSpinBox"
- << "QCheckBox"
- << "QComboBox"
+ TQStringList allowedTypes;
+ allowedTypes << "TQLineEdit"
+ << "TQTextEdit"
+ << "TQSpinBox"
+ << "TQCheckBox"
+ << "TQComboBox"
<< "QDateTimeEdit"
<< "KLineEdit"
<< "KDateTimeWidget"
@@ -79,38 +79,38 @@ void DesignerFields::initGUI( const QString &uiFile )
while ( it.current() ) {
if ( allowedTypes.contains( it.current()->className() ) ) {
- QString name = it.current()->name();
+ TQString name = it.current()->name();
if ( name.startsWith( "X_" ) ) {
name = name.mid( 2 );
- QWidget *widget = static_cast<QWidget*>( it.current() );
+ TQWidget *widget = static_cast<TQWidget*>( it.current() );
if ( !name.isEmpty() )
mWidgets.insert( name, widget );
- if ( it.current()->inherits( "QLineEdit" ) )
- connect( it.current(), SIGNAL( textChanged( const QString& ) ),
- SIGNAL( modified() ) );
- else if ( it.current()->inherits( "QSpinBox" ) )
- connect( it.current(), SIGNAL( valueChanged( int ) ),
- SIGNAL( modified() ) );
- else if ( it.current()->inherits( "QCheckBox" ) )
- connect( it.current(), SIGNAL( toggled( bool ) ),
- SIGNAL( modified() ) );
- else if ( it.current()->inherits( "QComboBox" ) )
- connect( it.current(), SIGNAL( activated( const QString& ) ),
- SIGNAL( modified() ) );
+ if ( it.current()->inherits( "TQLineEdit" ) )
+ connect( it.current(), TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SIGNAL( modified() ) );
+ else if ( it.current()->inherits( "TQSpinBox" ) )
+ connect( it.current(), TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SIGNAL( modified() ) );
+ else if ( it.current()->inherits( "TQCheckBox" ) )
+ connect( it.current(), TQT_SIGNAL( toggled( bool ) ),
+ TQT_SIGNAL( modified() ) );
+ else if ( it.current()->inherits( "TQComboBox" ) )
+ connect( it.current(), TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SIGNAL( modified() ) );
else if ( it.current()->inherits( "QDateTimeEdit" ) )
- connect( it.current(), SIGNAL( valueChanged( const QDateTime& ) ),
- SIGNAL( modified() ) );
+ connect( it.current(), TQT_SIGNAL( valueChanged( const TQDateTime& ) ),
+ TQT_SIGNAL( modified() ) );
else if ( it.current()->inherits( "KDateTimeWidget" ) )
- connect( it.current(), SIGNAL( valueChanged( const QDateTime& ) ),
- SIGNAL( modified() ) );
+ connect( it.current(), TQT_SIGNAL( valueChanged( const TQDateTime& ) ),
+ TQT_SIGNAL( modified() ) );
else if ( it.current()->inherits( "KDatePicker" ) )
- connect( it.current(), SIGNAL( dateChanged( QDate ) ),
- SIGNAL( modified() ) );
- else if ( it.current()->inherits( "QTextEdit" ) )
- connect( it.current(), SIGNAL( textChanged() ),
- SIGNAL( modified() ) );
+ connect( it.current(), TQT_SIGNAL( dateChanged( TQDate ) ),
+ TQT_SIGNAL( modified() ) );
+ else if ( it.current()->inherits( "TQTextEdit" ) )
+ connect( it.current(), TQT_SIGNAL( textChanged() ),
+ TQT_SIGNAL( modified() ) );
if ( !widget->isEnabled() )
mDisabledWidgets.append( widget );
@@ -123,82 +123,82 @@ void DesignerFields::initGUI( const QString &uiFile )
delete list;
}
-QString DesignerFields::identifier() const
+TQString DesignerFields::identifier() const
{
return mIdentifier;
}
-QString DesignerFields::title() const
+TQString DesignerFields::title() const
{
return mTitle;
}
void DesignerFields::load( DesignerFields::Storage *storage )
{
- QStringList keys = storage->keys();
+ TQStringList keys = storage->keys();
// clear all custom page widgets
// we can't do this in the following loop, as it works on the
// custom fields of the vcard, which may not be set.
- QMap<QString, QWidget *>::ConstIterator widIt;
+ TQMap<TQString, TQWidget *>::ConstIterator widIt;
for ( widIt = mWidgets.begin(); widIt != mWidgets.end(); ++widIt ) {
- QString value;
- if ( widIt.data()->inherits( "QLineEdit" ) ) {
- QLineEdit *wdg = static_cast<QLineEdit*>( widIt.data() );
- wdg->setText( QString::null );
- } else if ( widIt.data()->inherits( "QSpinBox" ) ) {
- QSpinBox *wdg = static_cast<QSpinBox*>( widIt.data() );
+ TQString value;
+ if ( widIt.data()->inherits( "TQLineEdit" ) ) {
+ TQLineEdit *wdg = static_cast<TQLineEdit*>( widIt.data() );
+ wdg->setText( TQString::null );
+ } else if ( widIt.data()->inherits( "TQSpinBox" ) ) {
+ TQSpinBox *wdg = static_cast<TQSpinBox*>( widIt.data() );
wdg->setValue( wdg->minValue() );
- } else if ( widIt.data()->inherits( "QCheckBox" ) ) {
- QCheckBox *wdg = static_cast<QCheckBox*>( widIt.data() );
+ } else if ( widIt.data()->inherits( "TQCheckBox" ) ) {
+ TQCheckBox *wdg = static_cast<TQCheckBox*>( widIt.data() );
wdg->setChecked( false );
} else if ( widIt.data()->inherits( "QDateTimeEdit" ) ) {
QDateTimeEdit *wdg = static_cast<QDateTimeEdit*>( widIt.data() );
- wdg->setDateTime( QDateTime::currentDateTime() );
+ wdg->setDateTime( TQDateTime::currentDateTime() );
} else if ( widIt.data()->inherits( "KDateTimeWidget" ) ) {
KDateTimeWidget *wdg = static_cast<KDateTimeWidget*>( widIt.data() );
- wdg->setDateTime( QDateTime::currentDateTime() );
+ wdg->setDateTime( TQDateTime::currentDateTime() );
} else if ( widIt.data()->inherits( "KDatePicker" ) ) {
KDatePicker *wdg = static_cast<KDatePicker*>( widIt.data() );
- wdg->setDate( QDate::currentDate() );
- } else if ( widIt.data()->inherits( "QComboBox" ) ) {
- QComboBox *wdg = static_cast<QComboBox*>( widIt.data() );
+ wdg->setDate( TQDate::currentDate() );
+ } else if ( widIt.data()->inherits( "TQComboBox" ) ) {
+ TQComboBox *wdg = static_cast<TQComboBox*>( widIt.data() );
wdg->setCurrentItem( 0 );
- } else if ( widIt.data()->inherits( "QTextEdit" ) ) {
- QTextEdit *wdg = static_cast<QTextEdit*>( widIt.data() );
- wdg->setText( QString::null );
+ } else if ( widIt.data()->inherits( "TQTextEdit" ) ) {
+ TQTextEdit *wdg = static_cast<TQTextEdit*>( widIt.data() );
+ wdg->setText( TQString::null );
}
}
- QStringList::ConstIterator it2;
+ TQStringList::ConstIterator it2;
for ( it2 = keys.begin(); it2 != keys.end(); ++it2 ) {
- QString value = storage->read( *it2 );
+ TQString value = storage->read( *it2 );
- QMap<QString, QWidget *>::ConstIterator it = mWidgets.find( *it2 );
+ TQMap<TQString, TQWidget *>::ConstIterator it = mWidgets.find( *it2 );
if ( it != mWidgets.end() ) {
- if ( it.data()->inherits( "QLineEdit" ) ) {
- QLineEdit *wdg = static_cast<QLineEdit*>( it.data() );
+ if ( it.data()->inherits( "TQLineEdit" ) ) {
+ TQLineEdit *wdg = static_cast<TQLineEdit*>( it.data() );
wdg->setText( value );
- } else if ( it.data()->inherits( "QSpinBox" ) ) {
- QSpinBox *wdg = static_cast<QSpinBox*>( it.data() );
+ } else if ( it.data()->inherits( "TQSpinBox" ) ) {
+ TQSpinBox *wdg = static_cast<TQSpinBox*>( it.data() );
wdg->setValue( value.toInt() );
- } else if ( it.data()->inherits( "QCheckBox" ) ) {
- QCheckBox *wdg = static_cast<QCheckBox*>( it.data() );
+ } else if ( it.data()->inherits( "TQCheckBox" ) ) {
+ TQCheckBox *wdg = static_cast<TQCheckBox*>( it.data() );
wdg->setChecked( value == "true" || value == "1" );
} else if ( it.data()->inherits( "QDateTimeEdit" ) ) {
QDateTimeEdit *wdg = static_cast<QDateTimeEdit*>( it.data() );
- wdg->setDateTime( QDateTime::fromString( value, Qt::ISODate ) );
+ wdg->setDateTime( TQDateTime::fromString( value, Qt::ISODate ) );
} else if ( it.data()->inherits( "KDateTimeWidget" ) ) {
KDateTimeWidget *wdg = static_cast<KDateTimeWidget*>( it.data() );
- wdg->setDateTime( QDateTime::fromString( value, Qt::ISODate ) );
+ wdg->setDateTime( TQDateTime::fromString( value, Qt::ISODate ) );
} else if ( it.data()->inherits( "KDatePicker" ) ) {
KDatePicker *wdg = static_cast<KDatePicker*>( it.data() );
- wdg->setDate( QDate::fromString( value, Qt::ISODate ) );
- } else if ( it.data()->inherits( "QComboBox" ) ) {
- QComboBox *wdg = static_cast<QComboBox*>( it.data() );
+ wdg->setDate( TQDate::fromString( value, Qt::ISODate ) );
+ } else if ( it.data()->inherits( "TQComboBox" ) ) {
+ TQComboBox *wdg = static_cast<TQComboBox*>( it.data() );
wdg->setCurrentText( value );
- } else if ( it.data()->inherits( "QTextEdit" ) ) {
- QTextEdit *wdg = static_cast<QTextEdit*>( it.data() );
+ } else if ( it.data()->inherits( "TQTextEdit" ) ) {
+ TQTextEdit *wdg = static_cast<TQTextEdit*>( it.data() );
wdg->setText( value );
}
}
@@ -207,17 +207,17 @@ void DesignerFields::load( DesignerFields::Storage *storage )
void DesignerFields::save( DesignerFields::Storage *storage )
{
- QMap<QString, QWidget*>::Iterator it;
+ TQMap<TQString, TQWidget*>::Iterator it;
for ( it = mWidgets.begin(); it != mWidgets.end(); ++it ) {
- QString value;
- if ( it.data()->inherits( "QLineEdit" ) ) {
- QLineEdit *wdg = static_cast<QLineEdit*>( it.data() );
+ TQString value;
+ if ( it.data()->inherits( "TQLineEdit" ) ) {
+ TQLineEdit *wdg = static_cast<TQLineEdit*>( it.data() );
value = wdg->text();
- } else if ( it.data()->inherits( "QSpinBox" ) ) {
- QSpinBox *wdg = static_cast<QSpinBox*>( it.data() );
- value = QString::number( wdg->value() );
- } else if ( it.data()->inherits( "QCheckBox" ) ) {
- QCheckBox *wdg = static_cast<QCheckBox*>( it.data() );
+ } else if ( it.data()->inherits( "TQSpinBox" ) ) {
+ TQSpinBox *wdg = static_cast<TQSpinBox*>( it.data() );
+ value = TQString::number( wdg->value() );
+ } else if ( it.data()->inherits( "TQCheckBox" ) ) {
+ TQCheckBox *wdg = static_cast<TQCheckBox*>( it.data() );
value = ( wdg->isChecked() ? "true" : "false" );
} else if ( it.data()->inherits( "QDateTimeEdit" ) ) {
QDateTimeEdit *wdg = static_cast<QDateTimeEdit*>( it.data() );
@@ -228,11 +228,11 @@ void DesignerFields::save( DesignerFields::Storage *storage )
} else if ( it.data()->inherits( "KDatePicker" ) ) {
KDatePicker *wdg = static_cast<KDatePicker*>( it.data() );
value = wdg->date().toString( Qt::ISODate );
- } else if ( it.data()->inherits( "QComboBox" ) ) {
- QComboBox *wdg = static_cast<QComboBox*>( it.data() );
+ } else if ( it.data()->inherits( "TQComboBox" ) ) {
+ TQComboBox *wdg = static_cast<TQComboBox*>( it.data() );
value = wdg->currentText();
- } else if ( it.data()->inherits( "QTextEdit" ) ) {
- QTextEdit *wdg = static_cast<QTextEdit*>( it.data() );
+ } else if ( it.data()->inherits( "TQTextEdit" ) ) {
+ TQTextEdit *wdg = static_cast<TQTextEdit*>( it.data() );
value = wdg->text();
}
@@ -242,7 +242,7 @@ void DesignerFields::save( DesignerFields::Storage *storage )
void DesignerFields::setReadOnly( bool readOnly )
{
- QMap<QString, QWidget*>::Iterator it;
+ TQMap<TQString, TQWidget*>::Iterator it;
for ( it = mWidgets.begin(); it != mWidgets.end(); ++it )
if ( mDisabledWidgets.find( it.data() ) == mDisabledWidgets.end() )
it.data()->setEnabled( !readOnly );
diff --git a/libkdepim/designerfields.h b/libkdepim/designerfields.h
index 5cba78772..2d5db2b12 100644
--- a/libkdepim/designerfields.h
+++ b/libkdepim/designerfields.h
@@ -24,9 +24,9 @@
#include <klocale.h>
-#include <qmap.h>
-#include <qpair.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqpair.h>
+#include <tqstringlist.h>
#include <kdepimmacros.h>
@@ -36,7 +36,7 @@ class KDE_EXPORT DesignerFields : public QWidget
{
Q_OBJECT
public:
- DesignerFields( const QString &uiFile, QWidget *parent,
+ DesignerFields( const TQString &uiFile, TQWidget *parent,
const char *name = 0 );
class Storage
@@ -44,9 +44,9 @@ class KDE_EXPORT DesignerFields : public QWidget
public:
virtual ~Storage() {}
- virtual QStringList keys() = 0;
- virtual QString read( const QString &key ) = 0;
- virtual void write( const QString &key, const QString &value ) = 0;
+ virtual TQStringList keys() = 0;
+ virtual TQString read( const TQString &key ) = 0;
+ virtual void write( const TQString &key, const TQString &value ) = 0;
};
void load( Storage * );
@@ -54,19 +54,19 @@ class KDE_EXPORT DesignerFields : public QWidget
void setReadOnly( bool readOnly );
- QString identifier() const;
- QString title() const;
+ TQString identifier() const;
+ TQString title() const;
signals:
void modified();
private:
- void initGUI( const QString& );
+ void initGUI( const TQString& );
- QMap<QString, QWidget *> mWidgets;
- QValueList<QWidget *> mDisabledWidgets;
- QString mTitle;
- QString mIdentifier;
+ TQMap<TQString, TQWidget *> mWidgets;
+ TQValueList<TQWidget *> mDisabledWidgets;
+ TQString mTitle;
+ TQString mIdentifier;
};
}
diff --git a/libkdepim/diffalgo.cpp b/libkdepim/diffalgo.cpp
index 92d9db1f5..21c476861 100644
--- a/libkdepim/diffalgo.cpp
+++ b/libkdepim/diffalgo.cpp
@@ -25,50 +25,50 @@ using namespace KPIM;
void DiffAlgo::begin()
{
- QValueList<DiffAlgoDisplay*>::Iterator it;
+ TQValueList<DiffAlgoDisplay*>::Iterator it;
for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
(*it)->begin();
}
void DiffAlgo::end()
{
- QValueList<DiffAlgoDisplay*>::Iterator it;
+ TQValueList<DiffAlgoDisplay*>::Iterator it;
for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
(*it)->end();
}
-void DiffAlgo::setLeftSourceTitle( const QString &title )
+void DiffAlgo::setLeftSourceTitle( const TQString &title )
{
- QValueList<DiffAlgoDisplay*>::Iterator it;
+ TQValueList<DiffAlgoDisplay*>::Iterator it;
for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
(*it)->setLeftSourceTitle( title );
}
-void DiffAlgo::setRightSourceTitle( const QString &title )
+void DiffAlgo::setRightSourceTitle( const TQString &title )
{
- QValueList<DiffAlgoDisplay*>::Iterator it;
+ TQValueList<DiffAlgoDisplay*>::Iterator it;
for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
(*it)->setRightSourceTitle( title );
}
-void DiffAlgo::additionalLeftField( const QString &id, const QString &value )
+void DiffAlgo::additionalLeftField( const TQString &id, const TQString &value )
{
- QValueList<DiffAlgoDisplay*>::Iterator it;
+ TQValueList<DiffAlgoDisplay*>::Iterator it;
for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
(*it)->additionalLeftField( id, value );
}
-void DiffAlgo::additionalRightField( const QString &id, const QString &value )
+void DiffAlgo::additionalRightField( const TQString &id, const TQString &value )
{
- QValueList<DiffAlgoDisplay*>::Iterator it;
+ TQValueList<DiffAlgoDisplay*>::Iterator it;
for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
(*it)->additionalRightField( id, value );
}
-void DiffAlgo::conflictField( const QString &id, const QString &leftValue,
- const QString &rightValue )
+void DiffAlgo::conflictField( const TQString &id, const TQString &leftValue,
+ const TQString &rightValue )
{
- QValueList<DiffAlgoDisplay*>::Iterator it;
+ TQValueList<DiffAlgoDisplay*>::Iterator it;
for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
(*it)->conflictField( id, leftValue, rightValue );
}
diff --git a/libkdepim/diffalgo.h b/libkdepim/diffalgo.h
index cf341bfe8..927ba14f3 100644
--- a/libkdepim/diffalgo.h
+++ b/libkdepim/diffalgo.h
@@ -22,7 +22,7 @@
#ifndef DIFFALGO_H
#define DIFFALGO_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdepimmacros.h>
namespace KPIM {
@@ -51,28 +51,28 @@ class DiffAlgoDisplay
/**
Sets the title of the left data source.
*/
- virtual void setLeftSourceTitle( const QString &title ) = 0;
+ virtual void setLeftSourceTitle( const TQString &title ) = 0;
/**
Sets the title of the right data source.
*/
- virtual void setRightSourceTitle( const QString &title ) = 0;
+ virtual void setRightSourceTitle( const TQString &title ) = 0;
/**
Adds a field which is only available in the left data source.
*/
- virtual void additionalLeftField( const QString &id, const QString &value ) = 0;
+ virtual void additionalLeftField( const TQString &id, const TQString &value ) = 0;
/**
Adds a field which is only available in the right data source.
*/
- virtual void additionalRightField( const QString &id, const QString &value ) = 0;
+ virtual void additionalRightField( const TQString &id, const TQString &value ) = 0;
/**
Adds a conflict between two fields.
*/
- virtual void conflictField( const QString &id, const QString &leftValue,
- const QString &rightValue ) = 0;
+ virtual void conflictField( const TQString &id, const TQString &leftValue,
+ const TQString &rightValue ) = 0;
};
@@ -102,35 +102,35 @@ class KDE_EXPORT DiffAlgo
/**
Sets the title of the left data source.
*/
- void setLeftSourceTitle( const QString &title );
+ void setLeftSourceTitle( const TQString &title );
/**
Sets the title of the right data source.
*/
- void setRightSourceTitle( const QString &title );
+ void setRightSourceTitle( const TQString &title );
/**
Adds a field which is only available in the left data source.
*/
- void additionalLeftField( const QString &id, const QString &value );
+ void additionalLeftField( const TQString &id, const TQString &value );
/**
Adds a field which is only available in the right data source.
*/
- void additionalRightField( const QString &id, const QString &value );
+ void additionalRightField( const TQString &id, const TQString &value );
/**
Adds a conflict between two fields.
*/
- void conflictField( const QString &id, const QString &leftValue,
- const QString &rightValue );
+ void conflictField( const TQString &id, const TQString &leftValue,
+ const TQString &rightValue );
void addDisplay( DiffAlgoDisplay *display );
void removeDisplay( DiffAlgoDisplay *display );
private:
- QValueList<DiffAlgoDisplay*> mDisplays;
+ TQValueList<DiffAlgoDisplay*> mDisplays;
};
}
diff --git a/libkdepim/distributionlist.cpp b/libkdepim/distributionlist.cpp
index 64f56a209..e70b77b57 100644
--- a/libkdepim/distributionlist.cpp
+++ b/libkdepim/distributionlist.cpp
@@ -14,7 +14,7 @@ KPIM::DistributionList::DistributionList( const KABC::Addressee& addr )
{
}
-void KPIM::DistributionList::setName( const QString &name )
+void KPIM::DistributionList::setName( const TQString &name )
{
// We can't use Addressee::setName, the name isn't saved/loaded in the vcard (fixed in 3.4)
Addressee::setFormattedName( name );
@@ -28,21 +28,21 @@ void KPIM::DistributionList::setName( const QString &name )
// Helper function, to parse the contents of the custom field
// Returns a list of { uid, email }
-typedef QValueList<QPair<QString, QString> > ParseList;
-static ParseList parseCustom( const QString& str )
+typedef TQValueList<QPair<TQString, TQString> > ParseList;
+static ParseList parseCustom( const TQString& str )
{
ParseList res;
- const QStringList lst = QStringList::split( ';', str );
- for( QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ const TQStringList lst = TQStringList::split( ';', str );
+ for( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
if ( (*it).isEmpty() )
continue;
// parse "uid,email"
- QStringList helpList = QStringList::split( ',', (*it) );
+ TQStringList helpList = TQStringList::split( ',', (*it) );
Q_ASSERT( !helpList.isEmpty() );
if ( helpList.isEmpty() )
continue;
- const QString uid = helpList.first();
- QString email;
+ const TQString uid = helpList.first();
+ TQString email;
Q_ASSERT( helpList.count() < 3 ); // 1 or 2 items, but not more
if ( helpList.count() == 2 )
email = helpList.last();
@@ -51,38 +51,38 @@ static ParseList parseCustom( const QString& str )
return res;
}
-void KPIM::DistributionList::insertEntry( const Addressee& addr, const QString& email )
+void KPIM::DistributionList::insertEntry( const Addressee& addr, const TQString& email )
{
// insertEntry will removeEntry(uid), but not with formattedName
removeEntry( addr.formattedName(), email );
insertEntry( addr.uid(), email );
}
-void KPIM::DistributionList::insertEntry( const QString& uid, const QString& email )
+void KPIM::DistributionList::insertEntry( const TQString& uid, const TQString& email )
{
Q_ASSERT( !email.isEmpty() || email.isNull() ); // hopefully never called with "", would lead to confusion
removeEntry( uid, email ); // avoid duplicates
- QString str = custom( "KADDRESSBOOK", s_customFieldName );
+ TQString str = custom( "KADDRESSBOOK", s_customFieldName );
// Assumption: UIDs don't contain ; nor ,
str += ";" + uid + "," + email;
insertCustom( "KADDRESSBOOK", s_customFieldName, str ); // replace old value
}
-void KPIM::DistributionList::removeEntry( const Addressee& addr, const QString& email )
+void KPIM::DistributionList::removeEntry( const Addressee& addr, const TQString& email )
{
removeEntry( addr.uid(), email );
// Also remove entries with the full name as uid (for the kolab thing)
removeEntry( addr.formattedName(), email );
}
-void KPIM::DistributionList::removeEntry( const QString& uid, const QString& email )
+void KPIM::DistributionList::removeEntry( const TQString& uid, const TQString& email )
{
Q_ASSERT( !email.isEmpty() || email.isNull() ); // hopefully never called with "", would lead to confusion
ParseList parseList = parseCustom( custom( "KADDRESSBOOK", s_customFieldName ) );
- QString str;
+ TQString str;
for( ParseList::ConstIterator it = parseList.begin(); it != parseList.end(); ++it ) {
- const QString thisUid = (*it).first;
- const QString thisEmail = (*it).second;
+ const TQString thisUid = (*it).first;
+ const TQString thisEmail = (*it).second;
if ( thisUid == uid && thisEmail == email ) {
continue; // remove that one
}
@@ -95,13 +95,13 @@ void KPIM::DistributionList::removeEntry( const QString& uid, const QString& ema
bool KPIM::DistributionList::isDistributionList( const KABC::Addressee& addr )
{
- const QString str = addr.custom( "KADDRESSBOOK", s_customFieldName );
+ const TQString str = addr.custom( "KADDRESSBOOK", s_customFieldName );
return !str.isEmpty();
}
// ###### KDE4: add findByFormattedName to KABC::AddressBook
static KABC::Addressee::List findByFormattedName( KABC::AddressBook* book,
- const QString& name,
+ const TQString& name,
bool caseSensitive = true )
{
KABC::Addressee::List res;
@@ -117,7 +117,7 @@ static KABC::Addressee::List findByFormattedName( KABC::AddressBook* book,
}
KPIM::DistributionList KPIM::DistributionList::findByName( KABC::AddressBook* book,
- const QString& name,
+ const TQString& name,
bool caseSensitive )
{
KABC::AddressBook::Iterator abIt;
@@ -133,7 +133,7 @@ KPIM::DistributionList KPIM::DistributionList::findByName( KABC::AddressBook* bo
return DistributionList();
}
-static KABC::Addressee findByUidOrName( KABC::AddressBook* book, const QString& uidOrName, const QString& email )
+static KABC::Addressee findByUidOrName( KABC::AddressBook* book, const TQString& uidOrName, const TQString& email )
{
KABC::Addressee a = book->findByUid( uidOrName );
if ( a.isEmpty() ) {
@@ -166,11 +166,11 @@ static KABC::Addressee findByUidOrName( KABC::AddressBook* book, const QString&
KPIM::DistributionList::Entry::List KPIM::DistributionList::entries( KABC::AddressBook* book ) const
{
Entry::List res;
- const QString str = custom( "KADDRESSBOOK", s_customFieldName );
+ const TQString str = custom( "KADDRESSBOOK", s_customFieldName );
const ParseList parseList = parseCustom( str );
for( ParseList::ConstIterator it = parseList.begin(); it != parseList.end(); ++it ) {
- const QString uid = (*it).first;
- const QString email = (*it).second;
+ const TQString uid = (*it).first;
+ const TQString email = (*it).second;
// look up contact
KABC::Addressee a = findByUidOrName( book, uid, email );
if ( a.isEmpty() ) {
@@ -183,15 +183,15 @@ KPIM::DistributionList::Entry::List KPIM::DistributionList::entries( KABC::Addre
return res;
}
-QStringList KPIM::DistributionList::emails( KABC::AddressBook* book ) const
+TQStringList KPIM::DistributionList::emails( KABC::AddressBook* book ) const
{
- QStringList emails;
+ TQStringList emails;
- const QString str = custom( "KADDRESSBOOK", s_customFieldName );
+ const TQString str = custom( "KADDRESSBOOK", s_customFieldName );
ParseList parseList = parseCustom( str );
for( ParseList::ConstIterator it = parseList.begin(); it != parseList.end(); ++it ) {
- const QString thisUid = (*it).first;
- const QString thisEmail = (*it).second;
+ const TQString thisUid = (*it).first;
+ const TQString thisEmail = (*it).second;
// look up contact
KABC::Addressee a = findByUidOrName( book, thisUid, thisEmail );
@@ -200,7 +200,7 @@ QStringList KPIM::DistributionList::emails( KABC::AddressBook* book ) const
continue;
}
- const QString email = thisEmail.isEmpty() ? a.fullEmail() :
+ const TQString email = thisEmail.isEmpty() ? a.fullEmail() :
a.fullEmail( thisEmail );
if ( !email.isEmpty() ) {
emails.append( email );
@@ -210,10 +210,10 @@ QStringList KPIM::DistributionList::emails( KABC::AddressBook* book ) const
return emails;
}
-QValueList<KPIM::DistributionList>
+TQValueList<KPIM::DistributionList>
KPIM::DistributionList::allDistributionLists( KABC::AddressBook* book )
{
- QValueList<KPIM::DistributionList> lst;
+ TQValueList<KPIM::DistributionList> lst;
KABC::AddressBook::Iterator abIt;
for ( abIt = book->begin(); abIt != book->end(); ++abIt )
{
diff --git a/libkdepim/distributionlist.h b/libkdepim/distributionlist.h
index 74ba0b4a4..06b720b03 100644
--- a/libkdepim/distributionlist.h
+++ b/libkdepim/distributionlist.h
@@ -52,17 +52,17 @@ class DistributionList : public KABC::Addressee
*/
struct Entry
{
- typedef QValueList<Entry> List;
+ typedef TQValueList<Entry> List;
Entry() {}
- Entry( const Addressee &_addressee, const QString &_email ) :
+ Entry( const Addressee &_addressee, const TQString &_email ) :
addressee( _addressee ), email( _email ) {}
Addressee addressee;
- QString email;
+ TQString email;
};
- typedef QValueList<DistributionList> List;
+ typedef TQValueList<DistributionList> List;
/**
* Create a distribution list.
@@ -80,27 +80,27 @@ class DistributionList : public KABC::Addressee
~DistributionList() {}
/// HACK: reimplemented from Addressee, but it's NOT virtual there
- void setName( const QString &name );
+ void setName( const TQString &name );
/// HACK: reimplemented from Addressee, but it's NOT virtual there
- QString name() const { return formattedName(); }
+ TQString name() const { return formattedName(); }
/**
Insert an entry into this distribution list. If the entry already exists
nothing happens.
*/
- void insertEntry( const Addressee &, const QString &email=QString::null );
+ void insertEntry( const Addressee &, const TQString &email=TQString::null );
/**
Remove an entry from this distribution list. If the entry doesn't exist
nothing happens.
*/
- void removeEntry( const Addressee &, const QString &email=QString::null );
+ void removeEntry( const Addressee &, const TQString &email=TQString::null );
/// Overload, used by resources to avoid looking up the addressee
- void insertEntry( const QString& uid, const QString& email=QString::null );
+ void insertEntry( const TQString& uid, const TQString& email=TQString::null );
/// Overload, used by resources to avoid looking up the addressee
- void removeEntry( const QString& uid, const QString& email=QString::null );
+ void removeEntry( const TQString& uid, const TQString& email=TQString::null );
/**
@@ -108,7 +108,7 @@ class DistributionList : public KABC::Addressee
These addresses can be directly used by e.g. a mail client.
@param book necessary to look up entries
*/
- QStringList emails( KABC::AddressBook* book ) const;
+ TQStringList emails( KABC::AddressBook* book ) const;
/**
Return list of entries belonging to this distribution list. This function
@@ -122,12 +122,12 @@ class DistributionList : public KABC::Addressee
// KDE4: should be a method of AddressBook
static DistributionList findByName( KABC::AddressBook* book,
- const QString& name,
+ const TQString& name,
bool caseSensitive = true );
// KDE4: should be a method of AddressBook
// A bit slow (but no more than findByName).
// From KAddressbook, use Core::distributionLists() instead.
- static QValueList<DistributionList> allDistributionLists( KABC::AddressBook* book );
+ static TQValueList<DistributionList> allDistributionLists( KABC::AddressBook* book );
private:
diff --git a/libkdepim/embeddedurlpage.cpp b/libkdepim/embeddedurlpage.cpp
index 1a48b8666..d01205742 100644
--- a/libkdepim/embeddedurlpage.cpp
+++ b/libkdepim/embeddedurlpage.cpp
@@ -27,23 +27,23 @@
#include <kparts/part.h>
#include <kmimetype.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
using namespace KPIM;
-EmbeddedURLPage::EmbeddedURLPage( const QString &url, const QString &mimetype,
- QWidget *parent, const char *name )
- : QWidget( parent, name ), mUri(url), mMimeType( mimetype ), mPart( 0 )
+EmbeddedURLPage::EmbeddedURLPage( const TQString &url, const TQString &mimetype,
+ TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mUri(url), mMimeType( mimetype ), mPart( 0 )
{
initGUI( url, mimetype );
}
-void EmbeddedURLPage::initGUI( const QString &url, const QString &/*mimetype*/ )
+void EmbeddedURLPage::initGUI( const TQString &url, const TQString &/*mimetype*/ )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
layout->setAutoAdd( true );
- new QLabel( i18n("Showing URL %1").arg( url ), this );
+ new TQLabel( i18n("Showing URL %1").arg( url ), this );
}
void EmbeddedURLPage::loadContents()
@@ -51,20 +51,20 @@ void EmbeddedURLPage::loadContents()
if ( !mPart ) {
if ( mMimeType.isEmpty() || mUri.isEmpty() )
return;
- QString mimetype = mMimeType;
+ TQString mimetype = mMimeType;
if ( mimetype == "auto" )
mimetype == KMimeType::findByURL( mUri )->name();
// "this" is both the parent widget and the parent object
- mPart = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, QString::null, this, 0, this, 0 );
+ mPart = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, TQString::null, this, 0, this, 0 );
if ( mPart ) {
mPart->openURL( mUri );
mPart->widget()->show();
}
//void KParts::BrowserExtension::openURLRequestDelayed( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() )
KParts::BrowserExtension* be = KParts::BrowserExtension::childObject( mPart );
- connect( be, SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ),
-// mPart, SLOT( openURL( const KURL & ) ) );
- this, SIGNAL( openURL( const KURL & ) ) );
+ connect( be, TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ),
+// mPart, TQT_SLOT( openURL( const KURL & ) ) );
+ this, TQT_SIGNAL( openURL( const KURL & ) ) );
}
}
diff --git a/libkdepim/embeddedurlpage.h b/libkdepim/embeddedurlpage.h
index 4e79e966d..61f8933ad 100644
--- a/libkdepim/embeddedurlpage.h
+++ b/libkdepim/embeddedurlpage.h
@@ -21,7 +21,7 @@
#ifndef KPIM_EMBEDDEDURLPAGE_H
#define KPIM_EMBEDDEDURLPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdepimmacros.h>
#include <kurl.h>
@@ -33,18 +33,18 @@ class KDE_EXPORT EmbeddedURLPage : public QWidget
{
Q_OBJECT
public:
- EmbeddedURLPage( const QString &url, const QString &mimetype,
- QWidget *parent, const char *name = 0 );
+ EmbeddedURLPage( const TQString &url, const TQString &mimetype,
+ TQWidget *parent, const char *name = 0 );
public slots:
void loadContents();
signals:
void openURL( const KURL &url );
private:
- void initGUI( const QString &url, const QString &mimetype );
+ void initGUI( const TQString &url, const TQString &mimetype );
- QString mUri;
- QString mMimeType;
+ TQString mUri;
+ TQString mMimeType;
KParts::ReadOnlyPart* mPart;
};
diff --git a/libkdepim/htmldiffalgodisplay.cpp b/libkdepim/htmldiffalgodisplay.cpp
index 9ebfab51a..2c6af164b 100644
--- a/libkdepim/htmldiffalgodisplay.cpp
+++ b/libkdepim/htmldiffalgodisplay.cpp
@@ -25,17 +25,17 @@
using namespace KPIM;
-static QString textToHTML( const QString &text )
+static TQString textToHTML( const TQString &text )
{
- return QStyleSheet::convertFromPlainText( text );
+ return TQStyleSheet::convertFromPlainText( text );
}
-HTMLDiffAlgoDisplay::HTMLDiffAlgoDisplay( QWidget *parent )
+HTMLDiffAlgoDisplay::HTMLDiffAlgoDisplay( TQWidget *parent )
: KTextBrowser( parent )
{
- setWrapPolicy( QTextEdit::AtWordBoundary );
- setVScrollBarMode( QScrollView::AlwaysOff );
- setHScrollBarMode( QScrollView::AlwaysOff );
+ setWrapPolicy( TQTextEdit::AtWordBoundary );
+ setVScrollBarMode( TQScrollView::AlwaysOff );
+ setHScrollBarMode( TQScrollView::AlwaysOff );
}
void HTMLDiffAlgoDisplay::begin()
@@ -44,12 +44,12 @@ void HTMLDiffAlgoDisplay::begin()
mText = "";
mText.append( "<html>" );
- mText.append( QString( "<body text=\"%1\" bgcolor=\"%2\">" )
+ mText.append( TQString( "<body text=\"%1\" bgcolor=\"%2\">" )
.arg( KGlobalSettings::textColor().name() )
.arg( KGlobalSettings::baseColor().name() ) );
mText.append( "<center><table>" );
- mText.append( QString( "<tr><th></th><th align=\"center\">%1</th><td> </td><th align=\"center\">%2</th></tr>" )
+ mText.append( TQString( "<tr><th></th><th align=\"center\">%1</th><td> </td><th align=\"center\">%2</th></tr>" )
.arg( mLeftTitle )
.arg( mRightTitle ) );
}
@@ -63,34 +63,34 @@ void HTMLDiffAlgoDisplay::end()
setText( mText );
}
-void HTMLDiffAlgoDisplay::setLeftSourceTitle( const QString &title )
+void HTMLDiffAlgoDisplay::setLeftSourceTitle( const TQString &title )
{
mLeftTitle = title;
}
-void HTMLDiffAlgoDisplay::setRightSourceTitle( const QString &title )
+void HTMLDiffAlgoDisplay::setRightSourceTitle( const TQString &title )
{
mRightTitle = title;
}
-void HTMLDiffAlgoDisplay::additionalLeftField( const QString &id, const QString &value )
+void HTMLDiffAlgoDisplay::additionalLeftField( const TQString &id, const TQString &value )
{
- mText.append( QString( "<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#9cff83\">%2</td><td></td><td></td></tr>" )
+ mText.append( TQString( "<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#9cff83\">%2</td><td></td><td></td></tr>" )
.arg( id )
.arg( textToHTML( value ) ) );
}
-void HTMLDiffAlgoDisplay::additionalRightField( const QString &id, const QString &value )
+void HTMLDiffAlgoDisplay::additionalRightField( const TQString &id, const TQString &value )
{
- mText.append( QString( "<tr><td align=\"right\"><b>%1:</b></td><td></td><td></td><td bgcolor=\"#9cff83\">%2</td></tr>" )
+ mText.append( TQString( "<tr><td align=\"right\"><b>%1:</b></td><td></td><td></td><td bgcolor=\"#9cff83\">%2</td></tr>" )
.arg( id )
.arg( textToHTML( value ) ) );
}
-void HTMLDiffAlgoDisplay::conflictField( const QString &id, const QString &leftValue,
- const QString &rightValue )
+void HTMLDiffAlgoDisplay::conflictField( const TQString &id, const TQString &leftValue,
+ const TQString &rightValue )
{
- mText.append( QString( "<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#ff8686\">%2</td><td></td><td bgcolor=\"#ff8686\">%3</td></tr>" )
+ mText.append( TQString( "<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#ff8686\">%2</td><td></td><td bgcolor=\"#ff8686\">%3</td></tr>" )
.arg( id )
.arg( textToHTML( leftValue ) )
.arg( textToHTML( rightValue ) ) );
diff --git a/libkdepim/htmldiffalgodisplay.h b/libkdepim/htmldiffalgodisplay.h
index 3d34a7a46..23da21f4c 100644
--- a/libkdepim/htmldiffalgodisplay.h
+++ b/libkdepim/htmldiffalgodisplay.h
@@ -31,21 +31,21 @@ namespace KPIM {
class KDE_EXPORT HTMLDiffAlgoDisplay : virtual public DiffAlgoDisplay, public KTextBrowser
{
public:
- HTMLDiffAlgoDisplay( QWidget *parent );
+ HTMLDiffAlgoDisplay( TQWidget *parent );
void begin();
void end();
- void setLeftSourceTitle( const QString &title );
- void setRightSourceTitle( const QString &title );
- void additionalLeftField( const QString &id, const QString &value );
- void additionalRightField( const QString &id, const QString &value );
- void conflictField( const QString &id, const QString &leftValue,
- const QString &rightValue );
+ void setLeftSourceTitle( const TQString &title );
+ void setRightSourceTitle( const TQString &title );
+ void additionalLeftField( const TQString &id, const TQString &value );
+ void additionalRightField( const TQString &id, const TQString &value );
+ void conflictField( const TQString &id, const TQString &leftValue,
+ const TQString &rightValue );
private:
- QString mLeftTitle;
- QString mRightTitle;
- QString mText;
+ TQString mLeftTitle;
+ TQString mRightTitle;
+ TQString mText;
};
}
diff --git a/libkdepim/infoextension.cpp b/libkdepim/infoextension.cpp
index 9fb5e7e02..55cb35683 100644
--- a/libkdepim/infoextension.cpp
+++ b/libkdepim/infoextension.cpp
@@ -21,13 +21,13 @@
#include "infoextension.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kparts/part.h>
using namespace KParts;
InfoExtension::InfoExtension( KParts::ReadOnlyPart *parent, const char* name)
-: QObject(parent, name), d(0)
+: TQObject(parent, name), d(0)
{
}
diff --git a/libkdepim/infoextension.h b/libkdepim/infoextension.h
index a231edb54..752ad9913 100644
--- a/libkdepim/infoextension.h
+++ b/libkdepim/infoextension.h
@@ -22,7 +22,7 @@
#ifndef INFOEXTENSION_H
#define INFOEXTENSION_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdepimmacros.h>
class QWidget;
@@ -54,8 +54,8 @@ namespace KParts
InfoExtensionPrivate *d;
signals:
- void textChanged( const QString& );
- void iconChanged( const QPixmap& );
+ void textChanged( const TQString& );
+ void iconChanged( const TQPixmap& );
};
}
#endif // INFOEXTENSION_H
diff --git a/libkdepim/interfaces/AddressBookServiceIface.h b/libkdepim/interfaces/AddressBookServiceIface.h
index 5dae9da52..bff304322 100644
--- a/libkdepim/interfaces/AddressBookServiceIface.h
+++ b/libkdepim/interfaces/AddressBookServiceIface.h
@@ -25,8 +25,8 @@
#include <dcopobject.h>
#include <dcopref.h>
#include <kurl.h>
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kdepimmacros.h>
namespace KPIM {
@@ -43,7 +43,7 @@ namespace KPIM {
@param vCard The vCard in string representation.
*/
- virtual void importVCardFromData( const QString& vCard ) = 0;
+ virtual void importVCardFromData( const TQString& vCard ) = 0;
/**
This method will add a vcard to the address book.
diff --git a/libkdepim/interfaces/MailTransportServiceIface.h b/libkdepim/interfaces/MailTransportServiceIface.h
index d0ced70ae..99228d25a 100644
--- a/libkdepim/interfaces/MailTransportServiceIface.h
+++ b/libkdepim/interfaces/MailTransportServiceIface.h
@@ -25,8 +25,8 @@
#include <dcopobject.h>
#include <dcopref.h>
#include <kurl.h>
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kdepimmacros.h>
@@ -46,23 +46,23 @@ namespace KPim {
*
* @return true when the message was send successfully, false on failure.
**/
- virtual bool sendMessage( const QString& from, const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
+ virtual bool sendMessage( const TQString& from, const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
const KURL::List& attachments ) = 0;
/**
* This method basically behaves like the one above, but takes only one
- * attachment as QByteArray. This is useful if you want to attach simple
+ * attachment as TQByteArray. This is useful if you want to attach simple
* text files (e.g. a vCalendar). The mimetype is determined using
* mime magic.
*
* @return true when the message was send successfully, false on failure.
**/
- virtual bool sendMessage( const QString& from, const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
- const QByteArray& attachment ) = 0;
+ virtual bool sendMessage( const TQString& from, const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
+ const TQByteArray& attachment ) = 0;
k_dcop_hidden:
/**
@@ -70,9 +70,9 @@ namespace KPim {
* additional parameter from instead.
**/
// FIXME KDE 4.0: Remove this.
- virtual bool sendMessage( const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
+ virtual bool sendMessage( const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
const KURL::List& attachments ) = 0;
/**
@@ -80,10 +80,10 @@ namespace KPim {
* additional parameter from instead.
**/
// FIXME KDE 4.0: Remove this.
- virtual bool sendMessage( const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
- const QByteArray& attachment ) = 0;
+ virtual bool sendMessage( const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
+ const TQByteArray& attachment ) = 0;
};
diff --git a/libkdepim/kabcresourcecached.cpp b/libkdepim/kabcresourcecached.cpp
index 334ac4f22..88d83dcf8 100644
--- a/libkdepim/kabcresourcecached.cpp
+++ b/libkdepim/kabcresourcecached.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kabc/vcardconverter.h>
#include <kdebug.h>
@@ -88,13 +88,13 @@ void ResourceCached::loadCache()
mIdMapper.load();
// load cache
- QFile file( cacheFile() );
+ TQFile file( cacheFile() );
if ( !file.open( IO_ReadOnly ) )
return;
KABC::VCardConverter converter;
- KABC::Addressee::List list = converter.parseVCards( QString::fromUtf8( file.readAll() ) );
+ KABC::Addressee::List list = converter.parseVCards( TQString::fromUtf8( file.readAll() ) );
KABC::Addressee::List::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
@@ -112,14 +112,14 @@ void ResourceCached::saveCache()
mIdMapper.save();
// save cache
- QFile file( cacheFile() );
+ TQFile file( cacheFile() );
if ( !file.open( IO_WriteOnly ) )
return;
KABC::Addressee::List list = mAddrMap.values();
KABC::VCardConverter converter;
- QString vCard = converter.createVCards( list );
+ TQString vCard = converter.createVCards( list );
file.writeBlock( vCard.utf8(), vCard.utf8().length() );
file.close();
}
@@ -133,13 +133,13 @@ void ResourceCached::clearCache()
void ResourceCached::cleanUpCache( const KABC::Addressee::List &addrList )
{
// load cache
- QFile file( cacheFile() );
+ TQFile file( cacheFile() );
if ( !file.open( IO_ReadOnly ) )
return;
KABC::VCardConverter converter;
- KABC::Addressee::List list = converter.parseVCards( QString::fromUtf8( file.readAll() ) );
+ KABC::Addressee::List list = converter.parseVCards( TQString::fromUtf8( file.readAll() ) );
KABC::Addressee::List::Iterator cacheIt;
KABC::Addressee::List::ConstIterator it;
@@ -185,7 +185,7 @@ void ResourceCached::clearChange( const KABC::Addressee &addr )
mDeletedAddressees.remove( addr.uid() );
}
-void ResourceCached::clearChange( const QString &uid )
+void ResourceCached::clearChange( const TQString &uid )
{
mAddedAddressees.remove( uid );
mChangedAddressees.remove( uid );
@@ -207,19 +207,19 @@ KABC::Addressee::List ResourceCached::deletedAddressees() const
return mDeletedAddressees.values();
}
-QString ResourceCached::cacheFile() const
+TQString ResourceCached::cacheFile() const
{
return locateLocal( "cache", "kabc/kresources/" + identifier() );
}
-QString ResourceCached::changesCacheFile( const QString &type ) const
+TQString ResourceCached::changesCacheFile( const TQString &type ) const
{
return locateLocal( "cache", "kabc/changescache/" + identifier() + "_" + type );
}
-void ResourceCached::saveChangesCache( const QMap<QString, KABC::Addressee> &map, const QString &type )
+void ResourceCached::saveChangesCache( const TQMap<TQString, KABC::Addressee> &map, const TQString &type )
{
- QFile file( changesCacheFile( type ) );
+ TQFile file( changesCacheFile( type ) );
const KABC::Addressee::List list = map.values();
if ( list.isEmpty() ) {
@@ -231,8 +231,8 @@ void ResourceCached::saveChangesCache( const QMap<QString, KABC::Addressee> &map
}
KABC::VCardConverter converter;
- const QString vCards = converter.createVCards( list );
- QCString content = vCards.utf8();
+ const TQString vCards = converter.createVCards( list );
+ TQCString content = vCards.utf8();
file.writeBlock( content, content.length() );
}
}
@@ -244,15 +244,15 @@ void ResourceCached::saveChangesCache()
saveChangesCache( mChangedAddressees, "changed" );
}
-void ResourceCached::loadChangesCache( QMap<QString, KABC::Addressee> &map, const QString &type )
+void ResourceCached::loadChangesCache( TQMap<TQString, KABC::Addressee> &map, const TQString &type )
{
- QFile file( changesCacheFile( type ) );
+ TQFile file( changesCacheFile( type ) );
if ( !file.open( IO_ReadOnly ) )
return;
KABC::VCardConverter converter;
- const KABC::Addressee::List list = converter.parseVCards( QString::fromUtf8( file.readAll() ) );
+ const KABC::Addressee::List list = converter.parseVCards( TQString::fromUtf8( file.readAll() ) );
KABC::Addressee::List::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it )
map.insert( (*it).uid(), *it );
diff --git a/libkdepim/kabcresourcecached.h b/libkdepim/kabcresourcecached.h
index e650eec6c..c7ea30fe4 100644
--- a/libkdepim/kabcresourcecached.h
+++ b/libkdepim/kabcresourcecached.h
@@ -64,22 +64,22 @@ class KDE_EXPORT ResourceCached : public Resource
bool hasChanges() const;
void clearChanges();
void clearChange( const KABC::Addressee& );
- void clearChange( const QString& );
+ void clearChange( const TQString& );
KABC::Addressee::List addedAddressees() const;
KABC::Addressee::List changedAddressees() const;
KABC::Addressee::List deletedAddressees() const;
protected:
- virtual QString cacheFile() const;
+ virtual TQString cacheFile() const;
/**
Functions for keeping the changes persistent.
*/
- virtual QString changesCacheFile( const QString& ) const;
- void loadChangesCache( QMap<QString, KABC::Addressee>&, const QString& );
+ virtual TQString changesCacheFile( const TQString& ) const;
+ void loadChangesCache( TQMap<TQString, KABC::Addressee>&, const TQString& );
void loadChangesCache();
- void saveChangesCache( const QMap<QString, KABC::Addressee>&, const QString& );
+ void saveChangesCache( const TQMap<TQString, KABC::Addressee>&, const TQString& );
void saveChangesCache();
void setIdMapperIdentifier();
@@ -87,9 +87,9 @@ class KDE_EXPORT ResourceCached : public Resource
private:
KPIM::IdMapper mIdMapper;
- QMap<QString, KABC::Addressee> mAddedAddressees;
- QMap<QString, KABC::Addressee> mChangedAddressees;
- QMap<QString, KABC::Addressee> mDeletedAddressees;
+ TQMap<TQString, KABC::Addressee> mAddedAddressees;
+ TQMap<TQString, KABC::Addressee> mChangedAddressees;
+ TQMap<TQString, KABC::Addressee> mDeletedAddressees;
class ResourceCachedPrivate;
ResourceCachedPrivate *d;
diff --git a/libkdepim/kaccount.cpp b/libkdepim/kaccount.cpp
index e15a85f6f..9aab7cfec 100644
--- a/libkdepim/kaccount.cpp
+++ b/libkdepim/kaccount.cpp
@@ -34,14 +34,14 @@
#include <kconfig.h>
-KAccount::KAccount( const uint id, const QString &name, const Type type )
+KAccount::KAccount( const uint id, const TQString &name, const Type type )
: mId( id ), mName( name ), mType( type )
{
}
-void KAccount::writeConfig( KConfig &config, const QString &group )
+void KAccount::writeConfig( KConfig &config, const TQString &group )
{
- QString oldGroup = config.group();
+ TQString oldGroup = config.group();
if (!group.isEmpty())
config.setGroup(group);
config.writeEntry("Id", mId);
@@ -50,9 +50,9 @@ void KAccount::writeConfig( KConfig &config, const QString &group )
config.setGroup(oldGroup);
}
-void KAccount::readConfig( KConfig &config, const QString &group )
+void KAccount::readConfig( KConfig &config, const TQString &group )
{
- QString oldGroup = config.group();
+ TQString oldGroup = config.group();
if (!group.isEmpty())
config.setGroup(group);
mId = config.readUnsignedNumEntry("Id", 0);
diff --git a/libkdepim/kaccount.h b/libkdepim/kaccount.h
index 765c5ae70..d81182767 100644
--- a/libkdepim/kaccount.h
+++ b/libkdepim/kaccount.h
@@ -32,7 +32,7 @@
#ifndef __KACCOUNT
#define __KACCOUNT
-#include <qstring.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
class KConfig;
@@ -50,14 +50,14 @@ class KDE_EXPORT KAccount
Other
};
- KAccount( const uint id = 0, const QString &name = QString::null,
+ KAccount( const uint id = 0, const TQString &name = TQString::null,
const Type type = Other );
/**
* Get/Set name
*/
- QString name() const { return mName; }
- void setName( const QString& name ) { mName = name; }
+ TQString name() const { return mName; }
+ void setName( const TQString& name ) { mName = name; }
/**
* Get/Set id
@@ -75,17 +75,17 @@ class KDE_EXPORT KAccount
* Save the settings
* If the group is empty it must be preset in the KConfig
*/
- void writeConfig( KConfig &config, const QString &group = QString::null );
+ void writeConfig( KConfig &config, const TQString &group = TQString::null );
/**
* Read the settings
* If the group is empty it must be preset in the KConfig
*/
- void readConfig( KConfig &config, const QString &group = QString::null );
+ void readConfig( KConfig &config, const TQString &group = TQString::null );
protected:
uint mId;
- QString mName;
+ TQString mName;
Type mType;
};
diff --git a/libkdepim/kaddrbook.cpp b/libkdepim/kaddrbook.cpp
index 45c34863e..ade6ef706 100644
--- a/libkdepim/kaddrbook.cpp
+++ b/libkdepim/kaddrbook.cpp
@@ -26,15 +26,15 @@
#include <dcopref.h>
#include <dcopclient.h>
-#include <qeventloop.h>
-#include <qregexp.h>
+#include <tqeventloop.h>
+#include <tqregexp.h>
#include <unistd.h>
//-----------------------------------------------------------------------------
-void KAddrBookExternal::openEmail( const QString &addr, QWidget *parent ) {
- QString email;
- QString name;
+void KAddrBookExternal::openEmail( const TQString &addr, TQWidget *parent ) {
+ TQString email;
+ TQString name;
KABC::Addressee::parseEmailAddress( addr, name, email );
@@ -49,7 +49,7 @@ void KAddrBookExternal::openEmail( const QString &addr, QWidget *parent ) {
#if KDE_IS_VERSION(3,4,89)
// This ugly hack will be removed in 4.0
while ( !ab->loadingHasFinished() ) {
- QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput );
+ TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
// use sleep here to reduce cpu usage
usleep( 100 );
@@ -69,23 +69,23 @@ void KAddrBookExternal::openEmail( const QString &addr, QWidget *parent ) {
}
DCOPRef call( "kaddressbook", "KAddressBookIface" );
- call.send( "showContactEditor(QString)", addressees.first().uid() );
+ call.send( "showContactEditor(TQString)", addressees.first().uid() );
} else {
//TODO: Enable the better message at the next string unfreeze
#if 0
- QString text = i18n("<qt>The email address <b>%1</b> cannot be "
+ TQString text = i18n("<qt>The email address <b>%1</b> cannot be "
"found in your addressbook.</qt>").arg( email );
#else
- QString text = email + " " + i18n( "is not in address book" );
+ TQString text = email + " " + i18n( "is not in address book" );
#endif
- KMessageBox::information( parent, text, QString::null, "notInAddressBook" );
+ KMessageBox::information( parent, text, TQString::null, "notInAddressBook" );
}
}
//-----------------------------------------------------------------------------
-void KAddrBookExternal::addEmail( const QString& addr, QWidget *parent) {
- QString email;
- QString name;
+void KAddrBookExternal::addEmail( const TQString& addr, TQWidget *parent) {
+ TQString email;
+ TQString name;
KABC::Addressee::parseEmailAddress( addr, name, email );
@@ -102,7 +102,7 @@ void KAddrBookExternal::addEmail( const QString& addr, QWidget *parent) {
#if KDE_IS_VERSION(3,4,89)
// This ugly hack will be removed in 4.0
while ( !ab->loadingHasFinished() ) {
- QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput );
+ TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
// use sleep here to reduce cpu usage
usleep( 100 );
@@ -121,7 +121,7 @@ void KAddrBookExternal::addEmail( const QString& addr, QWidget *parent) {
config.setGroup( "General" );
int type = config.readNumEntry( "FormattedNameType", 1 );
- QString name;
+ TQString name;
switch ( type ) {
case 1:
name = a.givenName() + " " + a.familyName();
@@ -148,32 +148,32 @@ void KAddrBookExternal::addEmail( const QString& addr, QWidget *parent) {
}
if ( KAddrBookExternal::addAddressee( a ) ) {
- QString text = i18n("<qt>The email address <b>%1</b> was added to your "
+ TQString text = i18n("<qt>The email address <b>%1</b> was added to your "
"addressbook; you can add more information to this "
"entry by opening the addressbook.</qt>").arg( addr );
- KMessageBox::information( parent, text, QString::null, "addedtokabc" );
+ KMessageBox::information( parent, text, TQString::null, "addedtokabc" );
}
} else {
- QString text = i18n("<qt>The email address <b>%1</b> is already in your "
+ TQString text = i18n("<qt>The email address <b>%1</b> is already in your "
"addressbook.</qt>").arg( addr );
- KMessageBox::information( parent, text, QString::null,
+ KMessageBox::information( parent, text, TQString::null,
"alreadyInAddressBook" );
}
ab->setErrorHandler( 0 );
}
-void KAddrBookExternal::openAddressBook(QWidget *) {
+void KAddrBookExternal::openAddressBook(TQWidget *) {
kapp->startServiceByDesktopName( "kaddressbook" );
}
-void KAddrBookExternal::addNewAddressee( QWidget* )
+void KAddrBookExternal::addNewAddressee( TQWidget* )
{
kapp->startServiceByDesktopName("kaddressbook");
DCOPRef call("kaddressbook", "KAddressBookIface");
call.send("newContact()");
}
-bool KAddrBookExternal::addVCard( const KABC::Addressee& addressee, QWidget *parent )
+bool KAddrBookExternal::addVCard( const KABC::Addressee& addressee, TQWidget *parent )
{
KABC::AddressBook *ab = KABC::StdAddressBook::self( true );
bool inserted = false;
@@ -185,14 +185,14 @@ bool KAddrBookExternal::addVCard( const KABC::Addressee& addressee, QWidget *par
if ( addressees.isEmpty() ) {
if ( KAddrBookExternal::addAddressee( addressee ) ) {
- QString text = i18n("The VCard was added to your addressbook; "
+ TQString text = i18n("The VCard was added to your addressbook; "
"you can add more information to this "
"entry by opening the addressbook.");
- KMessageBox::information( parent, text, QString::null, "addedtokabc" );
+ KMessageBox::information( parent, text, TQString::null, "addedtokabc" );
inserted = true;
}
} else {
- QString text = i18n("The VCard's primary email address is already in "
+ TQString text = i18n("The VCard's primary email address is already in "
"your addressbook; however, you may save the VCard "
"into a file and import it into the addressbook "
"manually.");
@@ -211,7 +211,7 @@ bool KAddrBookExternal::addAddressee( const KABC::Addressee& addr )
#if KDE_IS_VERSION(3,4,89)
// This ugly hack will be removed in 4.0
while ( !addressBook->loadingHasFinished() ) {
- QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput );
+ TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
// use sleep here to reduce cpu usage
usleep( 100 );
@@ -219,10 +219,10 @@ bool KAddrBookExternal::addAddressee( const KABC::Addressee& addr )
#endif
// Select a resource
- QPtrList<KABC::Resource> kabcResources = addressBook->resources();
+ TQPtrList<KABC::Resource> kabcResources = addressBook->resources();
- QPtrList<KRES::Resource> kresResources;
- QPtrListIterator<KABC::Resource> resIt( kabcResources );
+ TQPtrList<KRES::Resource> kresResources;
+ TQPtrListIterator<KABC::Resource> resIt( kabcResources );
KABC::Resource *kabcResource;
while ( ( kabcResource = resIt.current() ) != 0 ) {
++resIt;
@@ -251,12 +251,12 @@ bool KAddrBookExternal::addAddressee( const KABC::Addressee& addr )
return saved;
}
-QString KAddrBookExternal::expandDistributionList( const QString& listName )
+TQString KAddrBookExternal::expandDistributionList( const TQString& listName )
{
if ( listName.isEmpty() )
- return QString::null;
+ return TQString::null;
- const QString lowerListName = listName.lower();
+ const TQString lowerListName = listName.lower();
KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );
#ifdef KDEPIM_NEW_DISTRLISTS
KPIM::DistributionList distrList = KPIM::DistributionList::findByName( addressBook, lowerListName, false );
@@ -266,15 +266,15 @@ QString KAddrBookExternal::expandDistributionList( const QString& listName )
#else
KABC::DistributionListManager manager( addressBook );
manager.load();
- const QStringList listNames = manager.listNames();
+ const TQStringList listNames = manager.listNames();
- for ( QStringList::ConstIterator it = listNames.begin();
+ for ( TQStringList::ConstIterator it = listNames.begin();
it != listNames.end(); ++it) {
if ( (*it).lower() == lowerListName ) {
- const QStringList addressList = manager.list( *it )->emails();
+ const TQStringList addressList = manager.list( *it )->emails();
return addressList.join( ", " );
}
}
#endif
- return QString::null;
+ return TQString::null;
}
diff --git a/libkdepim/kaddrbook.h b/libkdepim/kaddrbook.h
index 7c2666e0f..32adac1b5 100644
--- a/libkdepim/kaddrbook.h
+++ b/libkdepim/kaddrbook.h
@@ -5,7 +5,7 @@
#ifndef KAddrBook_h
#define KAddrBook_h
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdeversion.h>
#include <kabc/addressee.h>
@@ -15,14 +15,14 @@ class QWidget;
class KDE_EXPORT KAddrBookExternal {
public:
- static void addEmail( const QString &addr, QWidget *parent );
- static void addNewAddressee( QWidget* );
- static void openEmail( const QString &addr, QWidget *parent );
- static void openAddressBook( QWidget *parent );
+ static void addEmail( const TQString &addr, TQWidget *parent );
+ static void addNewAddressee( TQWidget* );
+ static void openEmail( const TQString &addr, TQWidget *parent );
+ static void openAddressBook( TQWidget *parent );
- static bool addVCard( const KABC::Addressee& addressee, QWidget *parent );
+ static bool addVCard( const KABC::Addressee& addressee, TQWidget *parent );
- static QString expandDistributionList( const QString& listName );
+ static TQString expandDistributionList( const TQString& listName );
private:
static bool addAddressee( const KABC::Addressee& addressee );
};
diff --git a/libkdepim/kcmdesignerfields.cpp b/libkdepim/kcmdesignerfields.cpp
index 8e18efc47..79a570ae5 100644
--- a/libkdepim/kcmdesignerfields.cpp
+++ b/libkdepim/kcmdesignerfields.cpp
@@ -22,17 +22,17 @@
#include <unistd.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
-#include <qgroupbox.h>
-#include <qwidgetfactory.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
+#include <tqgroupbox.h>
+#include <tqwidgetfactory.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kaboutdata.h>
#include <kdebug.h>
@@ -56,29 +56,29 @@ using namespace KPIM;
class PageItem : public QCheckListItem
{
public:
- PageItem( QListView *parent, const QString &path )
- : QCheckListItem( parent, "", QCheckListItem::CheckBox ),
+ PageItem( TQListView *parent, const TQString &path )
+ : TQCheckListItem( parent, "", TQCheckListItem::CheckBox ),
mPath( path ), mIsActive( false )
{
mName = path.mid( path.findRev( '/' ) + 1 );
- QWidget *wdg = QWidgetFactory::create( mPath, 0, 0 );
+ TQWidget *wdg = TQWidgetFactory::create( mPath, 0, 0 );
if ( wdg ) {
setText( 0, wdg->caption() );
- QPixmap pm = QPixmap::grabWidget( wdg );
- QImage img = pm.convertToImage().smoothScale( 300, 300, QImage::ScaleMin );
+ TQPixmap pm = TQPixmap::grabWidget( wdg );
+ TQImage img = pm.convertToImage().smoothScale( 300, 300, TQImage::ScaleMin );
mPreview = img;
- QObjectList *list = wdg->queryList( "QWidget" );
- QObjectListIt it( *list );
+ TQObjectList *list = wdg->queryList( "TQWidget" );
+ TQObjectListIt it( *list );
- QMap<QString, QString> allowedTypes;
- allowedTypes.insert( "QLineEdit", i18n( "Text" ) );
- allowedTypes.insert( "QTextEdit", i18n( "Text" ) );
- allowedTypes.insert( "QSpinBox", i18n( "Numeric Value" ) );
- allowedTypes.insert( "QCheckBox", i18n( "Boolean" ) );
- allowedTypes.insert( "QComboBox", i18n( "Selection" ) );
+ TQMap<TQString, TQString> allowedTypes;
+ allowedTypes.insert( "TQLineEdit", i18n( "Text" ) );
+ allowedTypes.insert( "TQTextEdit", i18n( "Text" ) );
+ allowedTypes.insert( "TQSpinBox", i18n( "Numeric Value" ) );
+ allowedTypes.insert( "TQCheckBox", i18n( "Boolean" ) );
+ allowedTypes.insert( "TQComboBox", i18n( "Selection" ) );
allowedTypes.insert( "QDateTimeEdit", i18n( "Date & Time" ) );
allowedTypes.insert( "KLineEdit", i18n( "Text" ) );
allowedTypes.insert( "KDateTimeWidget", i18n( "Date & Time" ) );
@@ -86,12 +86,12 @@ class PageItem : public QCheckListItem
while ( it.current() ) {
if ( allowedTypes.find( it.current()->className() ) != allowedTypes.end() ) {
- QString name = it.current()->name();
+ TQString name = it.current()->name();
if ( name.startsWith( "X_" ) ) {
- new QListViewItem( this, name,
+ new TQListViewItem( this, name,
allowedTypes[ it.current()->className() ],
it.current()->className(),
- QWhatsThis::textFor( static_cast<QWidget*>( it.current() ) ) );
+ TQWhatsThis::textFor( static_cast<TQWidget*>( it.current() ) ) );
}
}
@@ -102,10 +102,10 @@ class PageItem : public QCheckListItem
}
}
- QString name() const { return mName; }
- QString path() const { return mPath; }
+ TQString name() const { return mName; }
+ TQString path() const { return mPath; }
- QPixmap preview()
+ TQPixmap preview()
{
return mPreview;
}
@@ -114,22 +114,22 @@ class PageItem : public QCheckListItem
bool isActive() const { return mIsActive; }
protected:
- void paintBranches( QPainter *p, const QColorGroup & cg, int w, int y, int h )
+ void paintBranches( TQPainter *p, const TQColorGroup & cg, int w, int y, int h )
{
- QListViewItem::paintBranches( p, cg, w, y, h );
+ TQListViewItem::paintBranches( p, cg, w, y, h );
}
private:
- QString mName;
- QString mPath;
- QPixmap mPreview;
+ TQString mName;
+ TQString mPath;
+ TQPixmap mPreview;
bool mIsActive;
};
-KCMDesignerFields::KCMDesignerFields( QWidget *parent, const char *name )
+KCMDesignerFields::KCMDesignerFields( TQWidget *parent, const char *name )
: KCModule( parent, name )
{
- QTimer::singleShot( 0, this, SLOT( delayedInit() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( delayedInit() ) );
KAboutData *about = new KAboutData( I18N_NOOP( "KCMDesignerfields" ),
I18N_NOOP( "Qt Designer Fields Dialog" ),
@@ -147,31 +147,31 @@ void KCMDesignerFields::delayedInit()
initGUI();
- connect( mPageView, SIGNAL( selectionChanged( QListViewItem* ) ),
- this, SLOT( updatePreview( QListViewItem* ) ) );
- connect( mPageView, SIGNAL( clicked( QListViewItem* ) ),
- this, SLOT( itemClicked( QListViewItem* ) ) );
+ connect( mPageView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ this, TQT_SLOT( updatePreview( TQListViewItem* ) ) );
+ connect( mPageView, TQT_SIGNAL( clicked( TQListViewItem* ) ),
+ this, TQT_SLOT( itemClicked( TQListViewItem* ) ) );
- connect( mDeleteButton, SIGNAL( clicked() ),
- this, SLOT( deleteFile() ) );
- connect( mImportButton, SIGNAL( clicked() ),
- this, SLOT( importFile() ) );
- connect( mDesignerButton, SIGNAL( clicked() ),
- this, SLOT( startDesigner() ) );
+ connect( mDeleteButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( deleteFile() ) );
+ connect( mImportButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( importFile() ) );
+ connect( mDesignerButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( startDesigner() ) );
load();
// Install a dirwatcher that will detect newly created or removed designer files
KDirWatch *dw = new KDirWatch( this );
dw->addDir( localUiDir(), true );
- connect( dw, SIGNAL( created(const QString&) ), SLOT( rebuildList() ) );
- connect( dw, SIGNAL( deleted(const QString&) ), SLOT( rebuildList() ) );
- connect( dw, SIGNAL( dirty(const QString&) ), SLOT( rebuildList() ) );
+ connect( dw, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( rebuildList() ) );
+ connect( dw, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( rebuildList() ) );
+ connect( dw, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( rebuildList() ) );
}
void KCMDesignerFields::deleteFile()
{
- QListViewItem *item = mPageView->selectedItem();
+ TQListViewItem *item = mPageView->selectedItem();
if ( item ) {
PageItem *pageItem = static_cast<PageItem*>( item->parent() ? item->parent() : item );
if (KMessageBox::warningContinueCancel(this,
@@ -184,7 +184,7 @@ void KCMDesignerFields::deleteFile()
void KCMDesignerFields::importFile()
{
- KURL src = KFileDialog::getOpenFileName( QDir::homeDirPath(), i18n("*.ui|Designer Files"),
+ KURL src = KFileDialog::getOpenFileName( TQDir::homeDirPath(), i18n("*.ui|Designer Files"),
this, i18n("Import Page") );
KURL dest = localUiDir();
dest.setFileName(src.fileName());
@@ -195,24 +195,24 @@ void KCMDesignerFields::importFile()
void KCMDesignerFields::loadUiFiles()
{
- QStringList list = KGlobal::dirs()->findAllResources( "data", uiPath() + "/*.ui", true, true );
- for ( QStringList::iterator it = list.begin(); it != list.end(); ++it ) {
+ TQStringList list = KGlobal::dirs()->findAllResources( "data", uiPath() + "/*.ui", true, true );
+ for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it ) {
new PageItem( mPageView, *it );
}
}
void KCMDesignerFields::rebuildList()
{
- QStringList ai = saveActivePages();
+ TQStringList ai = saveActivePages();
updatePreview( 0 );
mPageView->clear();
loadUiFiles();
loadActivePages(ai);
}
-void KCMDesignerFields::loadActivePages(const QStringList& ai)
+void KCMDesignerFields::loadActivePages(const TQStringList& ai)
{
- QListViewItemIterator it( mPageView );
+ TQListViewItemIterator it( mPageView );
while ( it.current() ) {
if ( it.current()->parent() == 0 ) {
PageItem *item = static_cast<PageItem*>( it.current() );
@@ -231,12 +231,12 @@ void KCMDesignerFields::load()
loadActivePages( readActivePages() );
}
-QStringList KCMDesignerFields::saveActivePages()
+TQStringList KCMDesignerFields::saveActivePages()
{
- QListViewItemIterator it( mPageView, QListViewItemIterator::Checked |
- QListViewItemIterator::Selectable );
+ TQListViewItemIterator it( mPageView, TQListViewItemIterator::Checked |
+ TQListViewItemIterator::Selectable );
- QStringList activePages;
+ TQStringList activePages;
while ( it.current() ) {
if ( it.current()->parent() == 0 ) {
PageItem *item = static_cast<PageItem*>( it.current() );
@@ -260,21 +260,21 @@ void KCMDesignerFields::defaults()
void KCMDesignerFields::initGUI()
{
- QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
bool noDesigner = KStandardDirs::findExe("designer").isEmpty();
if ( noDesigner )
{
- QString txt =
+ TQString txt =
i18n("<qt><b>Warning:</b> Qt Designer could not be found. It is probably not "
"installed. You will only be able to import existing designer files.</qt>");
- QLabel *lbl = new QLabel( txt, this );
+ TQLabel *lbl = new TQLabel( txt, this );
layout->addWidget( lbl );
}
- QHBoxLayout *hbox = new QHBoxLayout( layout, KDialog::spacingHint() );
+ TQHBoxLayout *hbox = new TQHBoxLayout( layout, KDialog::spacingHint() );
mPageView = new KListView( this );
mPageView->addColumn( i18n( "Available Pages" ) );
@@ -283,20 +283,20 @@ void KCMDesignerFields::initGUI()
mPageView->setFullWidth( true );
hbox->addWidget( mPageView );
- QGroupBox *box = new QGroupBox(1, Qt::Horizontal, i18n("Preview of Selected Page"), this );
+ TQGroupBox *box = new TQGroupBox(1, Qt::Horizontal, i18n("Preview of Selected Page"), this );
- mPagePreview = new QLabel( box );
+ mPagePreview = new TQLabel( box );
mPagePreview->setMinimumWidth( 300 );
- mPageDetails = new QLabel( box );
+ mPageDetails = new TQLabel( box );
hbox->addWidget( box );
loadUiFiles();
- hbox = new QHBoxLayout( layout, KDialog::spacingHint() );
+ hbox = new TQHBoxLayout( layout, KDialog::spacingHint() );
- QString cwHowto = i18n("<qt><p>This section allows you to add your own GUI"
+ TQString cwHowto = i18n("<qt><p>This section allows you to add your own GUI"
" Elements ('<i>Widgets</i>') to store your own values"
" into %1. Proceed as described below:</p>"
"<ol>"
@@ -322,16 +322,16 @@ void KCMDesignerFields::initGUI()
hbox->addWidget( activeLabel );
// ### why is this needed? Looks like a KActiveLabel bug...
- activeLabel->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum );
+ activeLabel->setSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Maximum );
hbox->addStretch( 1 );
- mDeleteButton = new QPushButton( i18n( "Delete Page" ), this);
+ mDeleteButton = new TQPushButton( i18n( "Delete Page" ), this);
mDeleteButton->setEnabled( false );
hbox->addWidget( mDeleteButton );
- mImportButton = new QPushButton( i18n( "Import Page..." ), this);
+ mImportButton = new TQPushButton( i18n( "Import Page..." ), this);
hbox->addWidget( mImportButton );
- mDesignerButton = new QPushButton( i18n( "Edit with Qt Designer..." ), this );
+ mDesignerButton = new TQPushButton( i18n( "Edit with Qt Designer..." ), this );
hbox->addWidget( mDesignerButton );
if ( noDesigner )
@@ -347,13 +347,13 @@ void KCMDesignerFields::initGUI()
mDesignerButton->show();
}
-void KCMDesignerFields::updatePreview( QListViewItem *item )
+void KCMDesignerFields::updatePreview( TQListViewItem *item )
{
bool widgetItemSelected = false;
if ( item ) {
if ( item->parent() ) {
- QString details = QString( "<qt><table>"
+ TQString details = TQString( "<qt><table>"
"<tr><td align=\"right\"><b>%1</b></td><td>%2</td></tr>"
"<tr><td align=\"right\"><b>%3</b></td><td>%4</td></tr>"
"<tr><td align=\"right\"><b>%5</b></td><td>%6</td></tr>"
@@ -373,7 +373,7 @@ void KCMDesignerFields::updatePreview( QListViewItem *item )
PageItem *pageItem = static_cast<PageItem*>( item->parent() );
mPagePreview->setPixmap( pageItem->preview() );
} else {
- mPageDetails->setText( QString::null );
+ mPageDetails->setText( TQString::null );
PageItem *pageItem = static_cast<PageItem*>( item );
mPagePreview->setPixmap( pageItem->preview() );
@@ -381,17 +381,17 @@ void KCMDesignerFields::updatePreview( QListViewItem *item )
widgetItemSelected = true;
}
- mPagePreview->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mPagePreview->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
} else {
- mPagePreview->setPixmap( QPixmap() );
+ mPagePreview->setPixmap( TQPixmap() );
mPagePreview->setFrameStyle( 0 );
- mPageDetails->setText( QString::null );
+ mPageDetails->setText( TQString::null );
}
mDeleteButton->setEnabled( widgetItemSelected );
}
-void KCMDesignerFields::itemClicked( QListViewItem *item )
+void KCMDesignerFields::itemClicked( TQListViewItem *item )
{
if ( !item || item->parent() != 0 )
return;
@@ -406,10 +406,10 @@ void KCMDesignerFields::itemClicked( QListViewItem *item )
void KCMDesignerFields::startDesigner()
{
- QString cmdLine = "designer";
+ TQString cmdLine = "designer";
// check if path exists and create one if not.
- QString cepPath = localUiDir();
+ TQString cepPath = localUiDir();
if( !KGlobal::dirs()->exists(cepPath) ) {
KIO::NetAccess::mkdir( cepPath, this );
}
@@ -417,7 +417,7 @@ void KCMDesignerFields::startDesigner()
// finally jump there
chdir(cepPath.local8Bit());
- QListViewItem *item = mPageView->selectedItem();
+ TQListViewItem *item = mPageView->selectedItem();
if ( item ) {
PageItem *pageItem = static_cast<PageItem*>( item->parent() ? item->parent() : item );
cmdLine += " " + KProcess::quote( pageItem->path() );
diff --git a/libkdepim/kcmdesignerfields.h b/libkdepim/kcmdesignerfields.h
index 20036a8ec..98c54b5c3 100644
--- a/libkdepim/kcmdesignerfields.h
+++ b/libkdepim/kcmdesignerfields.h
@@ -38,7 +38,7 @@ class KDE_EXPORT KCMDesignerFields : public KCModule
Q_OBJECT
public:
- KCMDesignerFields( QWidget *parent = 0, const char *name = 0 );
+ KCMDesignerFields( TQWidget *parent = 0, const char *name = 0 );
virtual void load();
virtual void save();
@@ -46,18 +46,18 @@ class KDE_EXPORT KCMDesignerFields : public KCModule
protected:
void loadUiFiles();
- void loadActivePages(const QStringList&);
- QStringList saveActivePages();
+ void loadActivePages(const TQStringList&);
+ TQStringList saveActivePages();
- virtual QString localUiDir() = 0;
- virtual QString uiPath() = 0;
- virtual void writeActivePages( const QStringList & ) = 0;
- virtual QStringList readActivePages() = 0;
- virtual QString applicationName() = 0;
+ virtual TQString localUiDir() = 0;
+ virtual TQString uiPath() = 0;
+ virtual void writeActivePages( const TQStringList & ) = 0;
+ virtual TQStringList readActivePages() = 0;
+ virtual TQString applicationName() = 0;
private slots:
- void updatePreview( QListViewItem* );
- void itemClicked( QListViewItem* );
+ void updatePreview( TQListViewItem* );
+ void itemClicked( TQListViewItem* );
void startDesigner();
void rebuildList();
void deleteFile();
@@ -68,11 +68,11 @@ class KDE_EXPORT KCMDesignerFields : public KCModule
void initGUI();
KListView *mPageView;
- QLabel *mPagePreview;
- QLabel *mPageDetails;
- QPushButton *mDeleteButton;
- QPushButton *mImportButton;
- QPushButton *mDesignerButton;
+ TQLabel *mPagePreview;
+ TQLabel *mPageDetails;
+ TQPushButton *mDeleteButton;
+ TQPushButton *mImportButton;
+ TQPushButton *mDesignerButton;
};
}
diff --git a/libkdepim/kconfigpropagator.cpp b/libkdepim/kconfigpropagator.cpp
index 81615b06e..0f59c2a00 100644
--- a/libkdepim/kconfigpropagator.cpp
+++ b/libkdepim/kconfigpropagator.cpp
@@ -28,8 +28,8 @@
#include <kstringhandler.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
KConfigPropagator::Change::~Change()
{
@@ -41,12 +41,12 @@ KConfigPropagator::ChangeConfig::ChangeConfig()
{
}
-QString KConfigPropagator::ChangeConfig::arg1() const
+TQString KConfigPropagator::ChangeConfig::arg1() const
{
return file + "/" + group + "/" + name;
}
-QString KConfigPropagator::ChangeConfig::arg2() const
+TQString KConfigPropagator::ChangeConfig::arg2() const
{
if ( hideValue ) return "*";
else return value;
@@ -68,7 +68,7 @@ KConfigPropagator::KConfigPropagator()
}
KConfigPropagator::KConfigPropagator( KConfigSkeleton *skeleton,
- const QString &kcfgFile )
+ const TQString &kcfgFile )
: mSkeleton( skeleton ), mKcfgFile( kcfgFile )
{
init();
@@ -83,15 +83,15 @@ void KConfigPropagator::init()
void KConfigPropagator::readKcfgFile()
{
- QString filename = locate( "kcfg", mKcfgFile );
+ TQString filename = locate( "kcfg", mKcfgFile );
if ( filename.isEmpty() ) {
kdError() << "Unable to find kcfg file '" << mKcfgFile << "'" << endl;
return;
}
- QFile input( filename );
- QDomDocument doc;
- QString errorMsg;
+ TQFile input( filename );
+ TQDomDocument doc;
+ TQString errorMsg;
int errorRow;
int errorCol;
if ( !doc.setContent( &input, &errorMsg, &errorRow, &errorCol ) ) {
@@ -99,7 +99,7 @@ void KConfigPropagator::readKcfgFile()
return;
}
- QDomElement cfgElement = doc.documentElement();
+ TQDomElement cfgElement = doc.documentElement();
if ( cfgElement.isNull() ) {
kdError() << "No document in kcfg file" << endl;
@@ -108,20 +108,20 @@ void KConfigPropagator::readKcfgFile()
mRules.clear();
- QDomNode n;
+ TQDomNode n;
for ( n = cfgElement.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
- QString tag = e.tagName();
+ TQString tag = e.tagName();
if ( tag == "propagation" ) {
Rule rule = parsePropagation( e );
mRules.append( rule );
} else if ( tag == "condition" ) {
Condition condition = parseCondition( e );
- QDomNode n2;
+ TQDomNode n2;
for( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if ( e2.tagName() == "propagation" ) {
Rule rule = parsePropagation( e2 );
rule.condition = condition;
@@ -134,14 +134,14 @@ void KConfigPropagator::readKcfgFile()
}
}
-KConfigPropagator::Rule KConfigPropagator::parsePropagation( const QDomElement &e )
+KConfigPropagator::Rule KConfigPropagator::parsePropagation( const TQDomElement &e )
{
Rule r;
- QString source = e.attribute( "source" );
+ TQString source = e.attribute( "source" );
parseConfigEntryPath( source, r.sourceFile, r.sourceGroup, r.sourceEntry );
- QString target = e.attribute( "target" );
+ TQString target = e.attribute( "target" );
parseConfigEntryPath( target, r.targetFile, r.targetGroup, r.targetEntry );
r.hideValue = e.hasAttribute( "hidevalue" ) &&
@@ -150,18 +150,18 @@ KConfigPropagator::Rule KConfigPropagator::parsePropagation( const QDomElement &
return r;
}
-void KConfigPropagator::parseConfigEntryPath( const QString &path,
- QString &file,
- QString &group,
- QString &entry )
+void KConfigPropagator::parseConfigEntryPath( const TQString &path,
+ TQString &file,
+ TQString &group,
+ TQString &entry )
{
- QStringList p = QStringList::split( "/", path );
+ TQStringList p = TQStringList::split( "/", path );
if ( p.count() != 3 ) {
kdError() << "Path has to be of form file/group/entry" << endl;
- file = QString::null;
- group = QString::null;
- entry = QString::null;
+ file = TQString::null;
+ group = TQString::null;
+ entry = TQString::null;
return;
}
@@ -172,11 +172,11 @@ void KConfigPropagator::parseConfigEntryPath( const QString &path,
return;
}
-KConfigPropagator::Condition KConfigPropagator::parseCondition( const QDomElement &e )
+KConfigPropagator::Condition KConfigPropagator::parseCondition( const TQDomElement &e )
{
Condition c;
- QString key = e.attribute( "key" );
+ TQString key = e.attribute( "key" );
parseConfigEntryPath( key, c.file, c.group, c.key );
@@ -197,8 +197,8 @@ void KConfigPropagator::commit()
}
}
-KConfigSkeletonItem *KConfigPropagator::findItem( const QString &group,
- const QString &name )
+KConfigSkeletonItem *KConfigPropagator::findItem( const TQString &group,
+ const TQString &name )
{
// kdDebug() << "KConfigPropagator::findItem()" << endl;
@@ -217,11 +217,11 @@ KConfigSkeletonItem *KConfigPropagator::findItem( const QString &group,
else return *it;
}
-QString KConfigPropagator::itemValueAsString( KConfigSkeletonItem *item )
+TQString KConfigPropagator::itemValueAsString( KConfigSkeletonItem *item )
{
- QVariant p = item->property();
+ TQVariant p = item->property();
- if ( p.type() == QVariant::Bool ) {
+ if ( p.type() == TQVariant::Bool ) {
if ( p.toBool() ) return "true";
else return "false";
}
@@ -243,7 +243,7 @@ void KConfigPropagator::updateChanges()
if ( !item ) {
kdError() << " Item not found." << endl;
} else {
- QString value = itemValueAsString( item );
+ TQString value = itemValueAsString( item );
kdDebug() << " Value: " << value << endl;
if ( value != c.value ) {
continue;
@@ -257,11 +257,11 @@ void KConfigPropagator::updateChanges()
<< " not found." << endl;
continue;
}
- QString value = itemValueAsString( item );
+ TQString value = itemValueAsString( item );
KConfig target( r.targetFile );
target.setGroup( r.targetGroup );
- QString targetValue = target.readEntry( r.targetEntry );
+ TQString targetValue = target.readEntry( r.targetEntry );
if ( r.hideValue ) targetValue = KStringHandler::obscure( targetValue );
if ( targetValue != value ) {
ChangeConfig *change = new ChangeConfig();
diff --git a/libkdepim/kconfigpropagator.h b/libkdepim/kconfigpropagator.h
index 7c5c92cc5..9b3c1a6f6 100644
--- a/libkdepim/kconfigpropagator.h
+++ b/libkdepim/kconfigpropagator.h
@@ -21,10 +21,10 @@
#ifndef KCONFIGPROPAGATOR_H
#define KCONFIGPROPAGATOR_H
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qdom.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
#include <kdepimmacros.h>
@@ -45,7 +45,7 @@ class KDE_EXPORT KConfigPropagator
@param skeleton KConfigSkeleton object used as source for the propagation
@param kcfgFile file name of kcfg file containing the propagation rules
*/
- KConfigPropagator( KConfigSkeleton *skeleton, const QString &kcfgFile );
+ KConfigPropagator( KConfigSkeleton *skeleton, const TQString &kcfgFile );
virtual ~KConfigPropagator() {}
KConfigSkeleton *skeleton() { return mSkeleton; }
@@ -60,10 +60,10 @@ class KDE_EXPORT KConfigPropagator
public:
Condition() : isValid( false ) {}
- QString file;
- QString group;
- QString key;
- QString value;
+ TQString file;
+ TQString group;
+ TQString key;
+ TQString value;
bool isValid;
};
@@ -71,17 +71,17 @@ class KDE_EXPORT KConfigPropagator
class KDE_EXPORT Rule
{
public:
- typedef QValueList<Rule> List;
+ typedef TQValueList<Rule> List;
Rule() : hideValue( false ) {}
- QString sourceFile;
- QString sourceGroup;
- QString sourceEntry;
+ TQString sourceFile;
+ TQString sourceGroup;
+ TQString sourceEntry;
- QString targetFile;
- QString targetGroup;
- QString targetEntry;
+ TQString targetFile;
+ TQString targetGroup;
+ TQString targetEntry;
Condition condition;
@@ -91,21 +91,21 @@ class KDE_EXPORT KConfigPropagator
class KDE_EXPORT Change
{
public:
- typedef QPtrList<Change> List;
+ typedef TQPtrList<Change> List;
- Change( const QString &title ) : mTitle( title ) {}
+ Change( const TQString &title ) : mTitle( title ) {}
virtual ~Change();
- void setTitle( const QString &title ) { mTitle = title; }
- QString title() const { return mTitle; }
+ void setTitle( const TQString &title ) { mTitle = title; }
+ TQString title() const { return mTitle; }
- virtual QString arg1() const { return QString::null; }
- virtual QString arg2() const { return QString::null; }
+ virtual TQString arg1() const { return TQString::null; }
+ virtual TQString arg2() const { return TQString::null; }
virtual void apply() = 0;
private:
- QString mTitle;
+ TQString mTitle;
};
class KDE_EXPORT ChangeConfig : public Change
@@ -114,16 +114,16 @@ class KDE_EXPORT KConfigPropagator
ChangeConfig();
~ChangeConfig() {}
- QString arg1() const;
- QString arg2() const;
+ TQString arg1() const;
+ TQString arg2() const;
void apply();
- QString file;
- QString group;
- QString name;
- QString label;
- QString value;
+ TQString file;
+ TQString group;
+ TQString name;
+ TQString label;
+ TQString value;
bool hideValue;
};
@@ -142,21 +142,21 @@ class KDE_EXPORT KConfigPropagator
*/
virtual void addCustomChanges( Change::List & ) {}
- KConfigSkeletonItem *findItem( const QString &group, const QString &name );
+ KConfigSkeletonItem *findItem( const TQString &group, const TQString &name );
- QString itemValueAsString( KConfigSkeletonItem * );
+ TQString itemValueAsString( KConfigSkeletonItem * );
void readKcfgFile();
- Rule parsePropagation( const QDomElement &e );
- Condition parseCondition( const QDomElement &e );
+ Rule parsePropagation( const TQDomElement &e );
+ Condition parseCondition( const TQDomElement &e );
- void parseConfigEntryPath( const QString &path, QString &file,
- QString &group, QString &entry );
+ void parseConfigEntryPath( const TQString &path, TQString &file,
+ TQString &group, TQString &entry );
private:
KConfigSkeleton *mSkeleton;
- QString mKcfgFile;
+ TQString mKcfgFile;
Rule::List mRules;
Change::List mChanges;
diff --git a/libkdepim/kconfigwizard.cpp b/libkdepim/kconfigwizard.cpp
index 3e0a18b10..6db0f9992 100644
--- a/libkdepim/kconfigwizard.cpp
+++ b/libkdepim/kconfigwizard.cpp
@@ -27,11 +27,11 @@
#include <kmessagebox.h>
#include <kapplication.h>
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
-KConfigWizard::KConfigWizard( QWidget *parent,
+KConfigWizard::KConfigWizard( TQWidget *parent,
char *name, bool modal )
: KDialogBase( TreeList, i18n("Configuration Wizard"), Ok|Cancel, Ok, parent,
name, modal ),
@@ -40,7 +40,7 @@ KConfigWizard::KConfigWizard( QWidget *parent,
init();
}
-KConfigWizard::KConfigWizard( KConfigPropagator *propagator, QWidget *parent,
+KConfigWizard::KConfigWizard( KConfigPropagator *propagator, TQWidget *parent,
char *name, bool modal )
: KDialogBase( TreeList, i18n("Configuration Wizard"), Ok|Cancel, Ok, parent,
name, modal ),
@@ -56,10 +56,10 @@ KConfigWizard::~KConfigWizard()
void KConfigWizard::init()
{
- connect( this, SIGNAL( aboutToShowPage( QWidget * ) ),
- SLOT( slotAboutToShowPage( QWidget * ) ) );
+ connect( this, TQT_SIGNAL( aboutToShowPage( TQWidget * ) ),
+ TQT_SLOT( slotAboutToShowPage( TQWidget * ) ) );
- QTimer::singleShot( 0, this, SLOT( readConfig() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( readConfig() ) );
}
void KConfigWizard::setPropagator( KConfigPropagator *p )
@@ -67,24 +67,24 @@ void KConfigWizard::setPropagator( KConfigPropagator *p )
mPropagator = p;
}
-void KConfigWizard::slotAboutToShowPage( QWidget *page )
+void KConfigWizard::slotAboutToShowPage( TQWidget *page )
{
if ( page == mChangesPage ) {
updateChanges();
}
}
-QFrame *KConfigWizard::createWizardPage( const QString &title )
+TQFrame *KConfigWizard::createWizardPage( const TQString &title )
{
return addPage( title );
}
void KConfigWizard::setupRulesPage()
{
- QFrame *topFrame = addPage( i18n("Rules") );
- QVBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQFrame *topFrame = addPage( i18n("Rules") );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( topFrame );
- mRuleView = new QListView( topFrame );
+ mRuleView = new TQListView( topFrame );
topLayout->addWidget( mRuleView );
mRuleView->addColumn( i18n("Source") );
@@ -107,25 +107,25 @@ void KConfigWizard::updateRules()
KConfigPropagator::Rule::List::ConstIterator it;
for( it = rules.begin(); it != rules.end(); ++it ) {
KConfigPropagator::Rule r = *it;
- QString source = r.sourceFile + "/" + r.sourceGroup + "/" +
+ TQString source = r.sourceFile + "/" + r.sourceGroup + "/" +
r.sourceEntry;
- QString target = r.targetFile + "/" + r.targetGroup + "/" +
+ TQString target = r.targetFile + "/" + r.targetGroup + "/" +
r.targetEntry;
- QString condition;
+ TQString condition;
KConfigPropagator::Condition c = r.condition;
if ( c.isValid ) {
condition = c.file + "/" + c.group + "/" + c.key + " = " + c.value;
}
- new QListViewItem( mRuleView, source, target, condition );
+ new TQListViewItem( mRuleView, source, target, condition );
}
}
void KConfigWizard::setupChangesPage()
{
- QFrame *topFrame = addPage( i18n("Changes") );
- QVBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQFrame *topFrame = addPage( i18n("Changes") );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( topFrame );
- mChangeView = new QListView( topFrame );
+ mChangeView = new TQListView( topFrame );
topLayout->addWidget( mChangeView );
mChangeView->addColumn( i18n("Action") );
@@ -154,7 +154,7 @@ void KConfigWizard::updateChanges()
KConfigPropagator::Change::List changes = mPropagator->changes();
KConfigPropagator::Change *c;
for( c = changes.first(); c; c = changes.next() ) {
- new QListViewItem( mChangeView, mChangeView->lastItem(), c->title(), c->arg1(), c->arg2() );
+ new TQListViewItem( mChangeView, mChangeView->lastItem(), c->title(), c->arg1(), c->arg2() );
}
}
@@ -174,7 +174,7 @@ void KConfigWizard::readConfig()
void KConfigWizard::slotOk()
{
- QString error = validate();
+ TQString error = validate();
if ( error.isNull() ) {
usrWriteConfig();
diff --git a/libkdepim/kconfigwizard.h b/libkdepim/kconfigwizard.h
index 293c7b9a0..23dfb9ee8 100644
--- a/libkdepim/kconfigwizard.h
+++ b/libkdepim/kconfigwizard.h
@@ -37,12 +37,12 @@ class KDE_EXPORT KConfigWizard : public KDialogBase
/**
Create wizard. You have to set a propgator with setPropagator() later.
*/
- KConfigWizard( QWidget *parent = 0, char *name = 0, bool modal = false );
+ KConfigWizard( TQWidget *parent = 0, char *name = 0, bool modal = false );
/**
Create wizard for given KConfigPropagator. The wizard takes ownership of
the propagator.
*/
- KConfigWizard( KConfigPropagator *propagator, QWidget *parent = 0,
+ KConfigWizard( KConfigPropagator *propagator, TQWidget *parent = 0,
char *name = 0, bool modal = false );
/**
Destructor.
@@ -61,7 +61,7 @@ class KDE_EXPORT KConfigWizard : public KDialogBase
/**
Create wizard page with given title.
*/
- QFrame *createWizardPage( const QString &title );
+ TQFrame *createWizardPage( const TQString &title );
/**
Use this function to read the configuration from the KConfigSkeleton
@@ -78,16 +78,16 @@ class KDE_EXPORT KConfigWizard : public KDialogBase
/**
Validates the supplied data. Returns a appropiate error when some data
- is invalid. Return QString::null if all data is valid.
+ is invalid. Return TQString::null if all data is valid.
*/
- virtual QString validate() { return QString::null; }
+ virtual TQString validate() { return TQString::null; }
protected slots:
void readConfig();
void slotOk();
- void slotAboutToShowPage( QWidget *page );
+ void slotAboutToShowPage( TQWidget *page );
protected:
void init();
@@ -100,10 +100,10 @@ class KDE_EXPORT KConfigWizard : public KDialogBase
private:
KConfigPropagator *mPropagator;
- QListView *mRuleView;
- QListView *mChangeView;
+ TQListView *mRuleView;
+ TQListView *mChangeView;
- QWidget *mChangesPage;
+ TQWidget *mChangesPage;
};
#endif
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp
index 29b65279d..1791d4dab 100644
--- a/libkdepim/kdateedit.cpp
+++ b/libkdepim/kdateedit.cpp
@@ -22,10 +22,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qvalidator.h>
+#include <tqapplication.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqvalidator.h>
#include <kcalendarsystem.h>
#include <kglobal.h>
@@ -37,11 +37,11 @@
class DateValidator : public QValidator
{
public:
- DateValidator( const QStringList &keywords, QWidget* parent, const char* name = 0 )
- : QValidator( parent, name ), mKeywords( keywords )
+ DateValidator( const TQStringList &keywords, TQWidget* parent, const char* name = 0 )
+ : TQValidator( parent, name ), mKeywords( keywords )
{}
- virtual State validate( QString &str, int& ) const
+ virtual State validate( TQString &str, int& ) const
{
int length = str.length();
@@ -61,36 +61,36 @@ class DateValidator : public QValidator
}
private:
- QStringList mKeywords;
+ TQStringList mKeywords;
};
-KDateEdit::KDateEdit( QWidget *parent, const char *name )
- : QComboBox( true, parent, name ),
+KDateEdit::KDateEdit( TQWidget *parent, const char *name )
+ : TQComboBox( true, parent, name ),
mReadOnly( false ),
mDiscardNextMousePress( false )
{
// need at least one entry for popup to work
setMaxCount( 1 );
- mDate = QDate::currentDate();
- QString today = KGlobal::locale()->formatDate( mDate, true );
+ mDate = TQDate::currentDate();
+ TQString today = KGlobal::locale()->formatDate( mDate, true );
insertItem( today );
setCurrentItem( 0 );
changeItem( today, 0 );
setMinimumSize( sizeHint() );
- connect( lineEdit(), SIGNAL( returnPressed() ),
- this, SLOT( lineEnterPressed() ) );
- connect( this, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotTextChanged( const QString& ) ) );
+ connect( lineEdit(), TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( lineEnterPressed() ) );
+ connect( this, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotTextChanged( const TQString& ) ) );
mPopup = new KDatePickerPopup( KDatePickerPopup::DatePicker | KDatePickerPopup::Words );
mPopup->hide();
mPopup->installEventFilter( this );
- connect( mPopup, SIGNAL( dateChanged( QDate ) ),
- SLOT( dateSelected( QDate ) ) );
+ connect( mPopup, TQT_SIGNAL( dateChanged( TQDate ) ),
+ TQT_SLOT( dateSelected( TQDate ) ) );
// handle keyword entry
setupKeywords();
@@ -107,13 +107,13 @@ KDateEdit::~KDateEdit()
mPopup = 0;
}
-void KDateEdit::setDate( const QDate& date )
+void KDateEdit::setDate( const TQDate& date )
{
assignDate( date );
updateView();
}
-QDate KDateEdit::date() const
+TQDate KDateEdit::date() const
{
return mDate;
}
@@ -134,9 +134,9 @@ void KDateEdit::popup()
if ( mReadOnly )
return;
- QRect desk = KGlobalSettings::desktopGeometry( this );
+ TQRect desk = KGlobalSettings::desktopGeometry( this );
- QPoint popupPoint = mapToGlobal( QPoint( 0,0 ) );
+ TQPoint popupPoint = mapToGlobal( TQPoint( 0,0 ) );
int dateFrameHeight = mPopup->sizeHint().height();
if ( popupPoint.y() + height() + dateFrameHeight > desk.bottom() )
@@ -157,26 +157,26 @@ void KDateEdit::popup()
if ( mDate.isValid() )
mPopup->setDate( mDate );
else
- mPopup->setDate( QDate::currentDate() );
+ mPopup->setDate( TQDate::currentDate() );
mPopup->popup( popupPoint );
// The combo box is now shown pressed. Make it show not pressed again
// by causing its (invisible) list box to emit a 'selected' signal.
// First, ensure that the list box contains the date currently displayed.
- QDate date = parseDate();
+ TQDate date = parseDate();
assignDate( date );
updateView();
// Now, simulate an Enter to unpress it
- QListBox *lb = listBox();
+ TQListBox *lb = listBox();
if (lb) {
lb->setCurrentItem(0);
- QKeyEvent* keyEvent = new QKeyEvent(QEvent::KeyPress, Qt::Key_Enter, 0, 0);
- QApplication::postEvent(lb, keyEvent);
+ TQKeyEvent* keyEvent = new TQKeyEvent(TQEvent::KeyPress, Qt::Key_Enter, 0, 0);
+ TQApplication::postEvent(lb, keyEvent);
}
}
-void KDateEdit::dateSelected( QDate date )
+void KDateEdit::dateSelected( TQDate date )
{
if (assignDate( date ) ) {
updateView();
@@ -193,7 +193,7 @@ void KDateEdit::lineEnterPressed()
{
bool replaced = false;
- QDate date = parseDate( &replaced );
+ TQDate date = parseDate( &replaced );
if (assignDate( date ) ) {
if ( replaced )
@@ -204,18 +204,18 @@ void KDateEdit::lineEnterPressed()
}
}
-QDate KDateEdit::parseDate( bool *replaced ) const
+TQDate KDateEdit::parseDate( bool *replaced ) const
{
- QString text = currentText();
- QDate result;
+ TQString text = currentText();
+ TQDate result;
if ( replaced )
(*replaced) = false;
if ( text.isEmpty() )
- result = QDate();
+ result = TQDate();
else if ( mKeywordMap.contains( text.lower() ) ) {
- QDate today = QDate::currentDate();
+ TQDate today = TQDate::currentDate();
int i = mKeywordMap[ text.lower() ];
if ( i >= 100 ) {
/* A day name has been entered. Convert to offset from today.
@@ -244,17 +244,17 @@ QDate KDateEdit::parseDate( bool *replaced ) const
return result;
}
-bool KDateEdit::eventFilter( QObject *object, QEvent *event )
+bool KDateEdit::eventFilter( TQObject *object, TQEvent *event )
{
if ( object == lineEdit() ) {
// We only process the focus out event if the text has changed
// since we got focus
- if ( (event->type() == QEvent::FocusOut) && mTextChanged ) {
+ if ( (event->type() == TQEvent::FocusOut) && mTextChanged ) {
lineEnterPressed();
mTextChanged = false;
- } else if ( event->type() == QEvent::KeyPress ) {
+ } else if ( event->type() == TQEvent::KeyPress ) {
// Up and down arrow keys step the date
- QKeyEvent* keyEvent = (QKeyEvent*)event;
+ TQKeyEvent* keyEvent = (TQKeyEvent*)event;
if ( keyEvent->key() == Qt::Key_Return ) {
lineEnterPressed();
@@ -268,7 +268,7 @@ bool KDateEdit::eventFilter( QObject *object, QEvent *event )
step = -1;
// TODO: If it's not an input key, but something like Return, Enter, Tab, etc..., don't eat the keypress, but handle it through to the default eventfilter!
if ( step && !mReadOnly ) {
- QDate date = parseDate();
+ TQDate date = parseDate();
if ( date.isValid() ) {
date = date.addDays( step );
if ( assignDate( date ) ) {
@@ -283,12 +283,12 @@ bool KDateEdit::eventFilter( QObject *object, QEvent *event )
} else {
// It's a date picker event
switch ( event->type() ) {
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseButtonPress: {
- QMouseEvent *mouseEvent = (QMouseEvent*)event;
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonPress: {
+ TQMouseEvent *mouseEvent = (TQMouseEvent*)event;
if ( !mPopup->rect().contains( mouseEvent->pos() ) ) {
- QPoint globalPos = mPopup->mapToGlobal( mouseEvent->pos() );
- if ( QApplication::widgetAt( globalPos, true ) == this ) {
+ TQPoint globalPos = mPopup->mapToGlobal( mouseEvent->pos() );
+ if ( TQApplication::widgetAt( globalPos, true ) == this ) {
// The date picker is being closed by a click on the
// KDateEdit widget. Avoid popping it up again immediately.
mDiscardNextMousePress = true;
@@ -305,19 +305,19 @@ bool KDateEdit::eventFilter( QObject *object, QEvent *event )
return false;
}
-void KDateEdit::mousePressEvent( QMouseEvent *event )
+void KDateEdit::mousePressEvent( TQMouseEvent *event )
{
if ( event->button() == Qt::LeftButton && mDiscardNextMousePress ) {
mDiscardNextMousePress = false;
return;
}
- QComboBox::mousePressEvent( event );
+ TQComboBox::mousePressEvent( event );
}
-void KDateEdit::slotTextChanged( const QString& )
+void KDateEdit::slotTextChanged( const TQString& )
{
- QDate date = parseDate();
+ TQDate date = parseDate();
if ( assignDate( date ) )
emit dateChanged( date );
@@ -333,14 +333,14 @@ void KDateEdit::setupKeywords()
mKeywordMap.insert( i18n( "today" ), 0 );
mKeywordMap.insert( i18n( "yesterday" ), -1 );
- QString dayName;
+ TQString dayName;
for ( int i = 1; i <= 7; ++i ) {
dayName = KGlobal::locale()->calendar()->weekDayName( i ).lower();
mKeywordMap.insert( dayName, i + 100 );
}
}
-bool KDateEdit::assignDate( const QDate& date )
+bool KDateEdit::assignDate( const TQDate& date )
{
mDate = date;
mTextChanged = false;
@@ -349,7 +349,7 @@ bool KDateEdit::assignDate( const QDate& date )
void KDateEdit::updateView()
{
- QString dateString;
+ TQString dateString;
if ( mDate.isValid() )
dateString = KGlobal::locale()->formatDate( mDate, true );
diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h
index 962e2a8a8..6fc04bd58 100644
--- a/libkdepim/kdateedit.h
+++ b/libkdepim/kdateedit.h
@@ -24,9 +24,9 @@
#ifndef KDATEEDIT_H
#define KDATEEDIT_H
-#include <qcombobox.h>
-#include <qdatetime.h>
-#include <qmap.h>
+#include <tqcombobox.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
#include <kdepimmacros.h>
@@ -56,14 +56,14 @@ class KDE_EXPORT KDateEdit : public QComboBox
Q_OBJECT
public:
- KDateEdit( QWidget *parent = 0, const char *name = 0 );
+ KDateEdit( TQWidget *parent = 0, const char *name = 0 );
virtual ~KDateEdit();
/**
@return The date entered. This date could be invalid,
you have to check validity yourself.
*/
- QDate date() const;
+ TQDate date() const;
/**
Sets whether the widget is read-only for the user. If read-only,
@@ -87,13 +87,13 @@ class KDE_EXPORT KDateEdit : public QComboBox
the signal is not emitted until focus leaves the line edit field.
The passed date can be invalid.
*/
- void dateEntered( const QDate &date );
+ void dateEntered( const TQDate &date );
/**
This signal is emitted whenever the user modifies the date.
The passed date can be invalid.
*/
- void dateChanged( const QDate &date );
+ void dateChanged( const TQDate &date );
public slots:
/**
@@ -102,29 +102,29 @@ class KDE_EXPORT KDateEdit : public QComboBox
@param date The new date to display. This date must be valid or
it will not be set
*/
- void setDate( const QDate &date );
+ void setDate( const TQDate &date );
protected slots:
void lineEnterPressed();
- void slotTextChanged( const QString& );
- void dateSelected( QDate );
+ void slotTextChanged( const TQString& );
+ void dateSelected( TQDate );
protected:
- virtual bool eventFilter( QObject*, QEvent* );
- virtual void mousePressEvent( QMouseEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
+ virtual void mousePressEvent( TQMouseEvent* );
/**
Sets the date, without altering the display.
This method is used internally to set the widget's date value.
As a virtual method, it allows derived classes to perform additional validation
on the date value before it is set. Derived classes should return true if
- QDate::isValid(@p date) returns false.
+ TQDate::isValid(@p date) returns false.
@param date The new date to set.
@return True if the date was set, false if it was considered invalid and
remains unchanged.
*/
- virtual bool assignDate( const QDate &date );
+ virtual bool assignDate( const TQDate &date );
/**
Fills the keyword map. Reimplement it if you want additional
@@ -133,17 +133,17 @@ class KDE_EXPORT KDateEdit : public QComboBox
void setupKeywords();
private:
- QDate parseDate( bool* = 0 ) const;
+ TQDate parseDate( bool* = 0 ) const;
void updateView();
KDatePickerPopup *mPopup;
- QDate mDate;
+ TQDate mDate;
bool mReadOnly;
bool mTextChanged;
bool mDiscardNextMousePress;
- QMap<QString, int> mKeywordMap;
+ TQMap<TQString, int> mKeywordMap;
};
#endif
diff --git a/libkdepim/kdatepickerpopup.cpp b/libkdepim/kdatepickerpopup.cpp
index 55715a6a7..2e28dd831 100644
--- a/libkdepim/kdatepickerpopup.cpp
+++ b/libkdepim/kdatepickerpopup.cpp
@@ -19,26 +19,26 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
-#include <qpopupmenu.h>
+#include <tqdatetime.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include "kdatepickerpopup.h"
-KDatePickerPopup::KDatePickerPopup( int items, const QDate &date, QWidget *parent,
+KDatePickerPopup::KDatePickerPopup( int items, const TQDate &date, TQWidget *parent,
const char *name )
- : QPopupMenu( parent, name )
+ : TQPopupMenu( parent, name )
{
mItems = items;
mDatePicker = new KDatePicker( this );
mDatePicker->setCloseButton( false );
- connect( mDatePicker, SIGNAL( dateEntered( QDate ) ),
- SLOT( slotDateChanged( QDate ) ) );
- connect( mDatePicker, SIGNAL( dateSelected( QDate ) ),
- SLOT( slotDateChanged( QDate ) ) );
+ connect( mDatePicker, TQT_SIGNAL( dateEntered( TQDate ) ),
+ TQT_SLOT( slotDateChanged( TQDate ) ) );
+ connect( mDatePicker, TQT_SIGNAL( dateSelected( TQDate ) ),
+ TQT_SLOT( slotDateChanged( TQDate ) ) );
mDatePicker->setDate( date );
@@ -58,17 +58,17 @@ void KDatePickerPopup::buildMenu()
}
if ( mItems & Words ) {
- insertItem( i18n("&Today"), this, SLOT( slotToday() ) );
- insertItem( i18n("To&morrow"), this, SLOT( slotTomorrow() ) );
- insertItem( i18n("Next &Week"), this, SLOT( slotNextWeek() ) );
- insertItem( i18n("Next M&onth"), this, SLOT( slotNextMonth() ) );
+ insertItem( i18n("&Today"), this, TQT_SLOT( slotToday() ) );
+ insertItem( i18n("To&morrow"), this, TQT_SLOT( slotTomorrow() ) );
+ insertItem( i18n("Next &Week"), this, TQT_SLOT( slotNextWeek() ) );
+ insertItem( i18n("Next M&onth"), this, TQT_SLOT( slotNextMonth() ) );
if ( mItems & NoDate )
insertSeparator();
}
if ( mItems & NoDate )
- insertItem( i18n("No Date"), this, SLOT( slotNoDate() ) );
+ insertItem( i18n("No Date"), this, TQT_SLOT( slotNoDate() ) );
}
KDatePicker *KDatePickerPopup::datePicker() const
@@ -76,7 +76,7 @@ KDatePicker *KDatePickerPopup::datePicker() const
return mDatePicker;
}
-void KDatePickerPopup::setDate( const QDate &date )
+void KDatePickerPopup::setDate( const TQDate &date )
{
mDatePicker->setDate( date );
}
@@ -89,7 +89,7 @@ void KDatePickerPopup::setItems( int items )
}
#endif
-void KDatePickerPopup::slotDateChanged( QDate date )
+void KDatePickerPopup::slotDateChanged( TQDate date )
{
emit dateChanged( date );
hide();
@@ -97,27 +97,27 @@ void KDatePickerPopup::slotDateChanged( QDate date )
void KDatePickerPopup::slotToday()
{
- emit dateChanged( QDate::currentDate() );
+ emit dateChanged( TQDate::currentDate() );
}
void KDatePickerPopup::slotTomorrow()
{
- emit dateChanged( QDate::currentDate().addDays( 1 ) );
+ emit dateChanged( TQDate::currentDate().addDays( 1 ) );
}
void KDatePickerPopup::slotNoDate()
{
- emit dateChanged( QDate() );
+ emit dateChanged( TQDate() );
}
void KDatePickerPopup::slotNextWeek()
{
- emit dateChanged( QDate::currentDate().addDays( 7 ) );
+ emit dateChanged( TQDate::currentDate().addDays( 7 ) );
}
void KDatePickerPopup::slotNextMonth()
{
- emit dateChanged( QDate::currentDate().addMonths( 1 ) );
+ emit dateChanged( TQDate::currentDate().addMonths( 1 ) );
}
#include "kdatepickerpopup.moc"
diff --git a/libkdepim/kdatepickerpopup.h b/libkdepim/kdatepickerpopup.h
index 5b5aefcbb..080bf4988 100644
--- a/libkdepim/kdatepickerpopup.h
+++ b/libkdepim/kdatepickerpopup.h
@@ -21,8 +21,8 @@
#ifndef KDATEPICKERPOPUP_H
#define KDATEPICKERPOPUP_H
-#include <qdatetime.h>
-#include <qpopupmenu.h>
+#include <tqdatetime.h>
+#include <tqpopupmenu.h>
#include <kdepimmacros.h>
#include <kdatepicker.h>
@@ -34,7 +34,7 @@
The available items are:
- @li NoDate: A menu-item with "No Date". If choosen, the datepicker will emit a null QDate.
+ @li NoDate: A menu-item with "No Date". If choosen, the datepicker will emit a null TQDate.
@li DatePicker: Show a KDatePicker-widget.
@li Words: Show items like "Today", "Tomorrow" or "Next Week".
@@ -56,8 +56,8 @@ class KDE_EXPORT KDatePickerPopup: public QPopupMenu
@param parent The object's parent.
@param name The object's name.
*/
- KDatePickerPopup( int items = DatePicker, const QDate &date = QDate::currentDate(),
- QWidget *parent = 0, const char *name = 0 );
+ KDatePickerPopup( int items = DatePicker, const TQDate &date = TQDate::currentDate(),
+ TQWidget *parent = 0, const char *name = 0 );
/**
@return A pointer to the private variable mDatePicker, an instance of
@@ -65,7 +65,7 @@ class KDE_EXPORT KDatePickerPopup: public QPopupMenu
*/
KDatePicker *datePicker() const;
- void setDate( const QDate &date );
+ void setDate( const TQDate &date );
#if 0
/** Set items which should be shown and rebuilds the menu afterwards. Only if the menu is not visible.
@@ -82,10 +82,10 @@ class KDE_EXPORT KDatePickerPopup: public QPopupMenu
This signal emits the new date (selected with datepicker or other
menu-items).
*/
- void dateChanged ( QDate );
+ void dateChanged ( TQDate );
protected slots:
- void slotDateChanged ( QDate );
+ void slotDateChanged ( TQDate );
void slotToday();
void slotTomorrow();
diff --git a/libkdepim/kfileio.cpp b/libkdepim/kfileio.cpp
index f601bc6d6..4d49c1148 100644
--- a/libkdepim/kfileio.cpp
+++ b/libkdepim/kfileio.cpp
@@ -10,14 +10,14 @@
#include <kdebug.h>
#include <assert.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <klocale.h>
#include <kstdguiitem.h>
-#include <qwidget.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqwidget.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -26,20 +26,20 @@
namespace KPIM {
//-----------------------------------------------------------------------------
-static void msgDialog(const QString &msg)
+static void msgDialog(const TQString &msg)
{
KMessageBox::sorry(0, msg, i18n("File I/O Error"));
}
//-----------------------------------------------------------------------------
-KDE_EXPORT QCString kFileToString(const QString &aFileName, bool aEnsureNL, bool aVerbose)
+KDE_EXPORT TQCString kFileToString(const TQString &aFileName, bool aEnsureNL, bool aVerbose)
{
- QCString result;
- QFileInfo info(aFileName);
+ TQCString result;
+ TQFileInfo info(aFileName);
unsigned int readLen;
unsigned int len = info.size();
- QFile file(aFileName);
+ TQFile file(aFileName);
//assert(aFileName!=0);
if( aFileName.isEmpty() )
@@ -49,22 +49,22 @@ KDE_EXPORT QCString kFileToString(const QString &aFileName, bool aEnsureNL, bool
{
if (aVerbose)
msgDialog(i18n("The specified file does not exist:\n%1").arg(aFileName));
- return QCString();
+ return TQCString();
}
if (info.isDir())
{
if (aVerbose)
msgDialog(i18n("This is a folder and not a file:\n%1").arg(aFileName));
- return QCString();
+ return TQCString();
}
if (!info.isReadable())
{
if (aVerbose)
msgDialog(i18n("You do not have read permissions "
"to the file:\n%1").arg(aFileName));
- return QCString();
+ return TQCString();
}
- if (len <= 0) return QCString();
+ if (len <= 0) return TQCString();
if (!file.open(IO_Raw|IO_ReadOnly))
{
@@ -79,7 +79,7 @@ KDE_EXPORT QCString kFileToString(const QString &aFileName, bool aEnsureNL, bool
default:
msgDialog(i18n("Error while reading file:\n%1").arg(aFileName));
}
- return QCString();
+ return TQCString();
}
result.resize(len + (int)aEnsureNL + 1);
@@ -93,10 +93,10 @@ KDE_EXPORT QCString kFileToString(const QString &aFileName, bool aEnsureNL, bool
if (readLen < len)
{
- QString msg = i18n("Could only read %1 bytes of %2.")
+ TQString msg = i18n("Could only read %1 bytes of %2.")
.arg(readLen).arg(len);
msgDialog(msg);
- return QCString();
+ return TQCString();
}
return result;
@@ -104,13 +104,13 @@ KDE_EXPORT QCString kFileToString(const QString &aFileName, bool aEnsureNL, bool
//-----------------------------------------------------------------------------
#if 0 // unused
-QByteArray kFileToBytes(const QString &aFileName, bool aVerbose)
+TQByteArray kFileToBytes(const TQString &aFileName, bool aVerbose)
{
- QByteArray result;
- QFileInfo info(aFileName);
+ TQByteArray result;
+ TQFileInfo info(aFileName);
unsigned int readLen;
unsigned int len = info.size();
- QFile file(aFileName);
+ TQFile file(aFileName);
//assert(aFileName!=0);
if( aFileName.isEmpty() )
@@ -157,11 +157,11 @@ QByteArray kFileToBytes(const QString &aFileName, bool aVerbose)
result.resize(len);
readLen = file.readBlock(result.data(), len);
- kdDebug(5300) << QString( "len %1" ).arg(len) << endl;
+ kdDebug(5300) << TQString( "len %1" ).arg(len) << endl;
if (readLen < len)
{
- QString msg;
+ TQString msg;
msg = i18n("Could only read %1 bytes of %2.")
.arg(readLen).arg(len);
msgDialog(msg);
@@ -174,11 +174,11 @@ QByteArray kFileToBytes(const QString &aFileName, bool aVerbose)
//-----------------------------------------------------------------------------
KDE_EXPORT bool kBytesToFile(const char* aBuffer, int len,
- const QString &aFileName,
+ const TQString &aFileName,
bool aAskIfExists, bool aBackup, bool aVerbose)
{
// TODO: use KSaveFile
- QFile file(aFileName);
+ TQFile file(aFileName);
int writeLen, rc;
//assert(aFileName!=0);
@@ -189,7 +189,7 @@ KDE_EXPORT bool kBytesToFile(const char* aBuffer, int len,
{
if (aAskIfExists)
{
- QString str;
+ TQString str;
str = i18n("File %1 exists.\nDo you want to replace it?")
.arg(aFileName);
rc = KMessageBox::warningContinueCancel(0,
@@ -200,10 +200,10 @@ KDE_EXPORT bool kBytesToFile(const char* aBuffer, int len,
{
// make a backup copy
// TODO: use KSaveFile::backupFile()
- QString bakName = aFileName;
+ TQString bakName = aFileName;
bakName += '~';
- QFile::remove(bakName);
- if( !QDir::current().rename(aFileName, bakName) )
+ TQFile::remove(bakName);
+ if( !TQDir::current().rename(aFileName, bakName) )
{
// failed to rename file
if (!aVerbose) return FALSE;
@@ -243,7 +243,7 @@ KDE_EXPORT bool kBytesToFile(const char* aBuffer, int len,
}
else if (writeLen < len)
{
- QString msg = i18n("Could only write %1 bytes of %2.")
+ TQString msg = i18n("Could only write %1 bytes of %2.")
.arg(writeLen).arg(len);
if (aVerbose)
msgDialog(msg);
@@ -253,14 +253,14 @@ KDE_EXPORT bool kBytesToFile(const char* aBuffer, int len,
return TRUE;
}
-KDE_EXPORT bool kCStringToFile(const QCString& aBuffer, const QString &aFileName,
+KDE_EXPORT bool kCStringToFile(const TQCString& aBuffer, const TQString &aFileName,
bool aAskIfExists, bool aBackup, bool aVerbose)
{
return kBytesToFile(aBuffer, aBuffer.length(), aFileName, aAskIfExists,
aBackup, aVerbose);
}
-KDE_EXPORT bool kByteArrayToFile(const QByteArray& aBuffer, const QString &aFileName,
+KDE_EXPORT bool kByteArrayToFile(const TQByteArray& aBuffer, const TQString &aFileName,
bool aAskIfExists, bool aBackup, bool aVerbose)
{
return kBytesToFile(aBuffer, aBuffer.size(), aFileName, aAskIfExists,
@@ -268,17 +268,17 @@ KDE_EXPORT bool kByteArrayToFile(const QByteArray& aBuffer, const QString &aFile
}
-QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
+TQString checkAndCorrectPermissionsIfPossible( const TQString &toCheck,
const bool recursive, const bool wantItReadable,
const bool wantItWritable )
{
// First we have to find out which type the toCheck is. This can be
// a directory (follow if recursive) or a file (check permissions).
// Symlinks are followed as expected.
- QFileInfo fiToCheck(toCheck);
+ TQFileInfo fiToCheck(toCheck);
fiToCheck.setCaching(false);
- QCString toCheckEnc = QFile::encodeName(toCheck);
- QString error;
+ TQCString toCheckEnc = TQFile::encodeName(toCheck);
+ TQString error;
struct stat statbuffer;
if ( !fiToCheck.exists() ) {
@@ -291,7 +291,7 @@ QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
if ( stat( toCheckEnc,&statbuffer ) != 0 ) {
kdDebug() << "wantItA: Can't read perms of " << toCheck << endl;
}
- QDir g( toCheck );
+ TQDir g( toCheck );
if ( !g.isReadable() ) {
if ( chmod( toCheckEnc, statbuffer.st_mode + S_IXUSR ) != 0 ) {
error.append( i18n("%1 is not accessible and that is "
@@ -342,7 +342,7 @@ QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
// If it is a folder and recursive is true, then we check the contents of
// the folder.
if ( fiToCheck.isDir() && recursive ){
- QDir g(toCheck);
+ TQDir g(toCheck);
// First check if the folder is readable for us. If not, we get
// some ugly crashes.
if ( !g.isReadable() ){
@@ -350,10 +350,10 @@ QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
} else {
const QFileInfoList *list = g.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ((fi = it.current()) != 0) {
- QString newToCheck = toCheck + "/" + fi->fileName();
- QFileInfo fiNewToCheck(newToCheck);
+ TQString newToCheck = toCheck + "/" + fi->fileName();
+ TQFileInfo fiNewToCheck(newToCheck);
if ( fi->fileName() != "." && fi->fileName() != ".." ) {
error.append ( checkAndCorrectPermissionsIfPossible( newToCheck,
recursive, wantItReadable, wantItWritable) );
@@ -365,11 +365,11 @@ QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
return error;
}
-bool checkAndCorrectPermissionsIfPossibleWithErrorHandling( QWidget *parent,
- const QString &toCheck, const bool recursive, const bool wantItReadable,
+bool checkAndCorrectPermissionsIfPossibleWithErrorHandling( TQWidget *parent,
+ const TQString &toCheck, const bool recursive, const bool wantItReadable,
const bool wantItWritable )
{
- QString error = checkAndCorrectPermissionsIfPossible(toCheck, recursive,
+ TQString error = checkAndCorrectPermissionsIfPossible(toCheck, recursive,
wantItReadable, wantItWritable);
// There is no KMessageBox with Retry, Cancel and Details.
// so, I can't provide a functionality to recheck. So it now
diff --git a/libkdepim/kfileio.h b/libkdepim/kfileio.h
index f6f17a1fa..e3dcc976a 100644
--- a/libkdepim/kfileio.h
+++ b/libkdepim/kfileio.h
@@ -8,8 +8,8 @@
#ifndef kpim_kfileio_h
#define kpim_kfileio_h
-#include <qcstring.h>
-#include <qwidget.h>
+#include <tqcstring.h>
+#include <tqwidget.h>
#include <kdepimmacros.h>
@@ -25,11 +25,11 @@ namespace KPIM {
* byte longer than the file itself.
* If ensureNewline is TRUE the string will always have a trailing newline.
*/
-QCString kFileToString(const QString &fileName, bool ensureNewline=true,
+TQCString kFileToString(const TQString &fileName, bool ensureNewline=true,
bool withDialogs=true) KDE_EXPORT;
// unused
-//QByteArray kFileToBytes(const QString &fileName, bool withDialogs=true);
+//TQByteArray kFileToBytes(const TQString &fileName, bool withDialogs=true);
/** Save a file. If withDialogs is FALSE no warning dialogs are opened if
@@ -38,14 +38,14 @@ QCString kFileToString(const QString &fileName, bool ensureNewline=true,
* Makes a copy if the file exists to filename~ if createBackup==TRUE.
*/
bool kBytesToFile(const char* aBuffer, int len,
- const QString &aFileName,
+ const TQString &aFileName,
bool aAskIfExists, bool aBackup, bool aVerbose) KDE_EXPORT;
-bool kCStringToFile(const QCString& buffer, const QString &fileName,
+bool kCStringToFile(const TQCString& buffer, const TQString &fileName,
bool askIfExists=false, bool createBackup=true,
bool withDialogs=true) KDE_EXPORT;
/** Does not stop at NUL */
-KDE_EXPORT bool kByteArrayToFile(const QByteArray& buffer, const QString &fileName,
+KDE_EXPORT bool kByteArrayToFile(const TQByteArray& buffer, const TQString &fileName,
bool askIfExists=false, bool createBackup=true,
bool withDialogs=true) KDE_EXPORT;
@@ -69,7 +69,7 @@ KDE_EXPORT bool kByteArrayToFile(const QByteArray& buffer, const QString &fileNa
* @return It will return a string with all files and folders which do not
* have the right permissions. If empty, then all permissions are ok.
*/
-QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
+TQString checkAndCorrectPermissionsIfPossible( const TQString &toCheck,
const bool recursive, const bool wantItReadable,
const bool wantItWritable );
@@ -97,8 +97,8 @@ QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
* then the permissions are not ok and it was not possible to correct
* all errors.
*/
-bool checkAndCorrectPermissionsIfPossibleWithErrorHandling( QWidget *parent,
- const QString &toCheck, const bool recursive, const bool wantItReadable,
+bool checkAndCorrectPermissionsIfPossibleWithErrorHandling( TQWidget *parent,
+ const TQString &toCheck, const bool recursive, const bool wantItReadable,
const bool wantItWritable );
}
diff --git a/libkdepim/kfoldertree.cpp b/libkdepim/kfoldertree.cpp
index 64c4457dc..5e2636738 100644
--- a/libkdepim/kfoldertree.cpp
+++ b/libkdepim/kfoldertree.cpp
@@ -6,13 +6,13 @@
#include <kiconloader.h>
#include <kdebug.h>
#include <kstringhandler.h>
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qheader.h>
-#include <qstyle.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqheader.h>
+#include <tqstyle.h>
//-----------------------------------------------------------------------------
-KFolderTreeItem::KFolderTreeItem( KFolderTree *parent, const QString & label,
+KFolderTreeItem::KFolderTreeItem( KFolderTree *parent, const TQString & label,
Protocol protocol, Type type )
: KListViewItem( parent, label ), mProtocol( protocol ), mType( type ),
mUnread(-1), mTotal(0), mSize(0), mFolderIsCloseToQuota( false )
@@ -21,7 +21,7 @@ KFolderTreeItem::KFolderTreeItem( KFolderTree *parent, const QString & label,
//-----------------------------------------------------------------------------
KFolderTreeItem::KFolderTreeItem( KFolderTreeItem *parent,
- const QString & label, Protocol protocol, Type type,
+ const TQString & label, Protocol protocol, Type type,
int unread, int total )
: KListViewItem( parent, label ), mProtocol( protocol ), mType( type ),
mUnread( unread ), mTotal( total ), mSize(0), mFolderIsCloseToQuota( false )
@@ -82,7 +82,7 @@ int KFolderTreeItem::typeSortingKey() const
}
//-----------------------------------------------------------------------------
-int KFolderTreeItem::compare( QListViewItem * i, int col, bool ) const
+int KFolderTreeItem::compare( TQListViewItem * i, int col, bool ) const
{
KFolderTreeItem* other = static_cast<KFolderTreeItem*>( i );
@@ -149,7 +149,7 @@ void KFolderTreeItem::setUnreadCount( int aUnread )
mUnread = aUnread;
- QString unread = QString::null;
+ TQString unread = TQString::null;
if (mUnread == 0)
unread = "- ";
else {
@@ -168,7 +168,7 @@ void KFolderTreeItem::setTotalCount( int aTotal )
mTotal = aTotal;
- QString total = QString::null;
+ TQString total = TQString::null;
if (mTotal == 0)
total = "- ";
else {
@@ -187,7 +187,7 @@ void KFolderTreeItem::setFolderSize( Q_INT64 aSize )
mSize = aSize;
- QString size;
+ TQString size;
if (mType != Root) {
if (mSize == 0 && (childCount() == 0 || isOpen() ) )
size = "- ";
@@ -198,7 +198,7 @@ void KFolderTreeItem::setFolderSize( Q_INT64 aSize )
Q_INT64 recursiveSize = recursiveFolderSize();
if ( recursiveSize != mSize ) {
if ( mType != Root )
- size += QString::fromLatin1(" + %1").arg( KIO::convertSize( recursiveSize - mSize ) );
+ size += TQString::fromLatin1(" + %1").arg( KIO::convertSize( recursiveSize - mSize ) );
else
size = KIO::convertSize( recursiveSize );
}
@@ -213,7 +213,7 @@ Q_INT64 KFolderTreeItem::recursiveFolderSize() const
{
Q_INT64 size = mSize;
- for ( QListViewItem *item = firstChild() ;
+ for ( TQListViewItem *item = firstChild() ;
item ; item = item->nextSibling() )
{
size += static_cast<KFolderTreeItem*>(item)->recursiveFolderSize();
@@ -228,7 +228,7 @@ int KFolderTreeItem::countUnreadRecursive()
{
int count = (mUnread > 0) ? mUnread : 0;
- for ( QListViewItem *item = firstChild() ;
+ for ( TQListViewItem *item = firstChild() ;
item ; item = item->nextSibling() )
{
count += static_cast<KFolderTreeItem*>(item)->countUnreadRecursive();
@@ -238,7 +238,7 @@ int KFolderTreeItem::countUnreadRecursive()
}
//-----------------------------------------------------------------------------
-void KFolderTreeItem::paintCell( QPainter * p, const QColorGroup & cg,
+void KFolderTreeItem::paintCell( TQPainter * p, const TQColorGroup & cg,
int column, int width, int align )
{
KFolderTree *ft = static_cast<KFolderTree*>(listView());
@@ -248,10 +248,10 @@ void KFolderTreeItem::paintCell( QPainter * p, const QColorGroup & cg,
// use a special color for folders which are close to their quota
- QColorGroup mycg = cg;
+ TQColorGroup mycg = cg;
if ( ( column == 0 || column == ft->sizeIndex() ) && folderIsCloseToQuota() )
{
- mycg.setColor( QColorGroup::Text, ft->paintInfo().colCloseToQuota );
+ mycg.setColor( TQColorGroup::Text, ft->paintInfo().colCloseToQuota );
}
// use a bold-font for the folder- and the unread-columns
@@ -259,8 +259,8 @@ void KFolderTreeItem::paintCell( QPainter * p, const QColorGroup & cg,
&& ( unreadCount > 0
|| ( !isOpen() && unreadRecursiveCount > 0 ) ) )
{
- QFont f = p->font();
- f.setWeight(QFont::Bold);
+ TQFont f = p->font();
+ f.setWeight(TQFont::Bold);
p->setFont(f);
}
@@ -276,8 +276,8 @@ void KFolderTreeItem::paintCell( QPainter * p, const QColorGroup & cg,
if ( ft->isUnreadActive() || column != 0 ) {
KListViewItem::paintCell( p, mycg, column, width, align );
} else {
- QListView *lv = listView();
- QString oldText = text(column);
+ TQListView *lv = listView();
+ TQString oldText = text(column);
// set an empty text so that we can have our own implementation (see further down)
// but still benefit from KListView::paintCell
@@ -285,7 +285,7 @@ void KFolderTreeItem::paintCell( QPainter * p, const QColorGroup & cg,
KListViewItem::paintCell( p, mycg, column, width, align );
- const QPixmap *icon = pixmap( column );
+ const TQPixmap *icon = pixmap( column );
int marg = lv ? lv->itemMargin() : 1;
int r = marg;
@@ -293,35 +293,35 @@ void KFolderTreeItem::paintCell( QPainter * p, const QColorGroup & cg,
if ( isSelected() )
p->setPen( mycg.highlightedText() );
else
- p->setPen( mycg.color( QColorGroup::Text ) );
+ p->setPen( mycg.color( TQColorGroup::Text ) );
if ( icon ) {
r += icon->width() + marg;
}
- QString t = text( column );
+ TQString t = text( column );
if (t.isEmpty())
return;
// draw the unread-count if the unread-column is not active
- QString unread;
+ TQString unread;
if ( unreadCount > 0 || ( !isOpen() && unreadRecursiveCount > 0 ) ) {
if ( isOpen() )
- unread = " (" + QString::number( unreadCount ) + ")";
+ unread = " (" + TQString::number( unreadCount ) + ")";
else if ( unreadRecursiveCount == unreadCount || mType == Root )
- unread = " (" + QString::number( unreadRecursiveCount ) + ")";
+ unread = " (" + TQString::number( unreadRecursiveCount ) + ")";
else
- unread = " (" + QString::number( unreadCount ) + " + " +
- QString::number( unreadRecursiveCount-unreadCount ) + ")";
+ unread = " (" + TQString::number( unreadCount ) + " + " +
+ TQString::number( unreadRecursiveCount-unreadCount ) + ")";
}
// check if the text needs to be squeezed
- QFontMetrics fm( p->fontMetrics() );
+ TQFontMetrics fm( p->fontMetrics() );
int unreadWidth = fm.width( unread );
if ( fm.width( t ) + marg + r + unreadWidth > width )
t = squeezeFolderName( t, fm, width - marg - r - unreadWidth );
- QRect br;
+ TQRect br;
p->drawText( r, 0, width-marg-r, height(),
align | AlignVCenter, t, -1, &br );
@@ -335,8 +335,8 @@ void KFolderTreeItem::paintCell( QPainter * p, const QColorGroup & cg,
}
-QString KFolderTreeItem::squeezeFolderName( const QString &text,
- const QFontMetrics &fm,
+TQString KFolderTreeItem::squeezeFolderName( const TQString &text,
+ const TQFontMetrics &fm,
uint width ) const
{
return KStringHandler::rPixelSqueeze( text, fm, width );
@@ -359,7 +359,7 @@ void KFolderTreeItem::setFolderIsCloseToQuota( bool v )
//=============================================================================
-KFolderTree::KFolderTree( QWidget *parent, const char* name )
+KFolderTree::KFolderTree( TQWidget *parent, const char* name )
: KListView( parent, name ), mUnreadIndex(-1), mTotalIndex(-1), mSizeIndex(-1)
{
// GUI-options
@@ -372,7 +372,7 @@ KFolderTree::KFolderTree( QWidget *parent, const char* name )
setItemsRenameable(false);
setRootIsDecorated(true);
setSelectionModeExt(Extended);
- setAlternateBackground(QColor());
+ setAlternateBackground(TQColor());
#if KDE_IS_VERSION( 3, 3, 90 )
setShadeSortColumn ( false );
#endif
@@ -380,9 +380,9 @@ KFolderTree::KFolderTree( QWidget *parent, const char* name )
disableAutoSelection();
setColumnWidth( 0, 120 ); //reasonable default size
- disconnect( header(), SIGNAL( sizeChange( int, int, int ) ) );
- connect( header(), SIGNAL( sizeChange( int, int, int ) ),
- SLOT( slotSizeChanged( int, int, int ) ) );
+ disconnect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ) );
+ connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ),
+ TQT_SLOT( slotSizeChanged( int, int, int ) ) );
}
//-----------------------------------------------------------------------------
@@ -391,9 +391,9 @@ void KFolderTree::setStyleDependantFrameWidth()
// set the width of the frame to a reasonable value for the current GUI style
int frameWidth;
if( style().isA("KeramikStyle") )
- frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth ) - 1;
+ frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
else
- frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth );
+ frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth );
if ( frameWidth < 0 )
frameWidth = 0;
if ( frameWidth != lineWidth() )
@@ -401,14 +401,14 @@ void KFolderTree::setStyleDependantFrameWidth()
}
//-----------------------------------------------------------------------------
-void KFolderTree::styleChange( QStyle& oldStyle )
+void KFolderTree::styleChange( TQStyle& oldStyle )
{
setStyleDependantFrameWidth();
KListView::styleChange( oldStyle );
}
//-----------------------------------------------------------------------------
-void KFolderTree::drawContentsOffset( QPainter * p, int ox, int oy,
+void KFolderTree::drawContentsOffset( TQPainter * p, int ox, int oy,
int cx, int cy, int cw, int ch )
{
bool oldUpdatesEnabled = isUpdatesEnabled();
@@ -418,14 +418,14 @@ void KFolderTree::drawContentsOffset( QPainter * p, int ox, int oy,
}
//-----------------------------------------------------------------------------
-void KFolderTree::contentsMousePressEvent( QMouseEvent *e )
+void KFolderTree::contentsMousePressEvent( TQMouseEvent *e )
{
setSelectionModeExt(Single);
KListView::contentsMousePressEvent(e);
}
//-----------------------------------------------------------------------------
-void KFolderTree::contentsMouseReleaseEvent( QMouseEvent *e )
+void KFolderTree::contentsMouseReleaseEvent( TQMouseEvent *e )
{
KListView::contentsMouseReleaseEvent(e);
setSelectionModeExt(Extended);
@@ -443,9 +443,9 @@ void KFolderTree::addAcceptableDropMimetype( const char *mimeType, bool outsideO
}
//-----------------------------------------------------------------------------
-bool KFolderTree::acceptDrag( QDropEvent* event ) const
+bool KFolderTree::acceptDrag( TQDropEvent* event ) const
{
- QListViewItem* item = itemAt(contentsToViewport(event->pos()));
+ TQListViewItem* item = itemAt(contentsToViewport(event->pos()));
for (uint i = 0; i < mAcceptableDropMimetypes.size(); i++)
{
@@ -461,7 +461,7 @@ bool KFolderTree::acceptDrag( QDropEvent* event ) const
}
//-----------------------------------------------------------------------------
-void KFolderTree::addUnreadColumn( const QString & name, int width )
+void KFolderTree::addUnreadColumn( const TQString & name, int width )
{
mUnreadIndex = addColumn( name, width );
setColumnAlignment( mUnreadIndex, qApp->reverseLayout() ? Qt::AlignLeft : Qt::AlignRight );
@@ -469,7 +469,7 @@ void KFolderTree::addUnreadColumn( const QString & name, int width )
}
//-----------------------------------------------------------------------------
-void KFolderTree::addTotalColumn( const QString & name, int width )
+void KFolderTree::addTotalColumn( const TQString & name, int width )
{
mTotalIndex = addColumn( name, width );
setColumnAlignment( mTotalIndex, qApp->reverseLayout() ? Qt::AlignLeft : Qt::AlignRight );
@@ -504,7 +504,7 @@ void KFolderTree::removeTotalColumn()
}
//-----------------------------------------------------------------------------
-void KFolderTree::addSizeColumn( const QString & name, int width )
+void KFolderTree::addSizeColumn( const TQString & name, int width )
{
mSizeIndex = addColumn( name, width );
setColumnAlignment( mSizeIndex, qApp->reverseLayout() ? Qt::AlignLeft : Qt::AlignRight );
diff --git a/libkdepim/kfoldertree.h b/libkdepim/kfoldertree.h
index 5946435b8..e09cd7833 100644
--- a/libkdepim/kfoldertree.h
+++ b/libkdepim/kfoldertree.h
@@ -22,10 +22,10 @@
#ifndef __KFOLDERTREE
#define __KFOLDERTREE
-#include <qpixmap.h>
-#include <qbitarray.h>
-#include <qdragobject.h>
-#include <qcolor.h>
+#include <tqpixmap.h>
+#include <tqbitarray.h>
+#include <tqdragobject.h>
+#include <tqcolor.h>
#include <klistview.h>
#include <kdepimmacros.h>
@@ -88,14 +88,14 @@ struct KPaintInfo {
{}
bool pixmapOn;
- QPixmap pixmap;
- QColor colFore;
- QColor colBack;
- QColor colNew;
- QColor colUnread;
- QColor colFlag;
- QColor colTodo;
- QColor colCloseToQuota;
+ TQPixmap pixmap;
+ TQColor colFore;
+ TQColor colBack;
+ TQColor colNew;
+ TQColor colUnread;
+ TQColor colFlag;
+ TQColor colTodo;
+ TQColor colCloseToQuota;
bool showSize;
bool showAttachment;
@@ -164,15 +164,15 @@ class KDE_EXPORT KFolderTreeItem : public KListViewItem
};
/** constructs a root-item */
- KFolderTreeItem( KFolderTree *parent, const QString & label=QString::null,
+ KFolderTreeItem( KFolderTree *parent, const TQString & label=TQString::null,
Protocol protocol=NONE, Type type=Root );
/** constructs a child-item */
- KFolderTreeItem( KFolderTreeItem *parent, const QString & label=QString::null,
+ KFolderTreeItem( KFolderTreeItem *parent, const TQString & label=TQString::null,
Protocol protocol=NONE, Type type=Other, int unread=0, int total=0 );
/** compare */
- virtual int compare( QListViewItem * i, int col,
+ virtual int compare( TQListViewItem * i, int col,
bool ascending ) const;
/** set/get the unread-count */
@@ -201,11 +201,11 @@ class KDE_EXPORT KFolderTreeItem : public KListViewItem
virtual Q_INT64 recursiveFolderSize() const;
/** paints the cell */
- virtual void paintCell( QPainter * p, const QColorGroup & cg,
+ virtual void paintCell( TQPainter * p, const TQColorGroup & cg,
int column, int width, int align );
/** dnd */
- virtual bool acceptDrag(QDropEvent* ) const { return true; }
+ virtual bool acceptDrag(TQDropEvent* ) const { return true; }
void setFolderIsCloseToQuota( bool );
bool folderIsCloseToQuota() const;
@@ -218,8 +218,8 @@ class KDE_EXPORT KFolderTreeItem : public KListViewItem
protected:
/** reimplement to use special squeezing algorithm for the folder name */
- virtual QString squeezeFolderName( const QString &text,
- const QFontMetrics &fm,
+ virtual TQString squeezeFolderName( const TQString &text,
+ const TQFontMetrics &fm,
uint width ) const;
Protocol mProtocol;
@@ -237,7 +237,7 @@ class KDE_EXPORT KFolderTree : public KListView
Q_OBJECT
public:
- KFolderTree( QWidget *parent, const char *name=0 );
+ KFolderTree( TQWidget *parent, const char *name=0 );
/** registers MIMETypes that are handled
@param mimeType the name of the MIMEType
@@ -246,17 +246,17 @@ class KDE_EXPORT KFolderTree : public KListView
virtual void addAcceptableDropMimetype( const char *mimeType, bool outsideOk );
/** checks if the drag is acceptable */
- virtual bool acceptDrag( QDropEvent* event ) const;
+ virtual bool acceptDrag( TQDropEvent* event ) const;
/** returns the KPaintInfo */
KPaintInfo paintInfo() const { return mPaintInfo; }
/** add/remove unread/total-columns */
- virtual void addUnreadColumn( const QString & name, int width=70 );
+ virtual void addUnreadColumn( const TQString & name, int width=70 );
virtual void removeUnreadColumn();
- virtual void addTotalColumn( const QString & name, int width=70 );
+ virtual void addTotalColumn( const TQString & name, int width=70 );
virtual void removeTotalColumn();
- virtual void addSizeColumn( const QString & name, int width=70 );
+ virtual void addSizeColumn( const TQString & name, int width=70 );
virtual void removeSizeColumn();
@@ -276,21 +276,21 @@ class KDE_EXPORT KFolderTree : public KListView
protected:
/** reimplemented in order to update the frame width in case of a changed
GUI style */
- void styleChange( QStyle& oldStyle );
+ void styleChange( TQStyle& oldStyle );
/** Set the width of the frame to a reasonable value for the current GUI
style */
void setStyleDependantFrameWidth();
- virtual void drawContentsOffset( QPainter * p, int ox, int oy,
+ virtual void drawContentsOffset( TQPainter * p, int ox, int oy,
int cx, int cy, int cw, int ch );
- virtual void contentsMousePressEvent( QMouseEvent *e );
- virtual void contentsMouseReleaseEvent( QMouseEvent *e );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
+ virtual void contentsMouseReleaseEvent( TQMouseEvent *e );
/** for mimetypes */
- QMemArray<const char*> mAcceptableDropMimetypes;
- QBitArray mAcceptOutside;
+ TQMemArray<const char*> mAcceptableDropMimetypes;
+ TQBitArray mAcceptOutside;
/** shared information */ // ### why isn't it then static? ;-)
KPaintInfo mPaintInfo;
@@ -303,7 +303,7 @@ class KDE_EXPORT KFolderTree : public KListView
private slots:
/** repaints the complete column (instead of only parts of it as done in
- QListView) if the size has changed */
+ TQListView) if the size has changed */
void slotSizeChanged( int section, int oldSize, int newSize );
};
diff --git a/libkdepim/kimportdialog.cpp b/libkdepim/kimportdialog.cpp
index d270ae6eb..ffccd5008 100644
--- a/libkdepim/kimportdialog.cpp
+++ b/libkdepim/kimportdialog.cpp
@@ -24,17 +24,17 @@
// class. Application specific code should go to a subclass provided by the
// application using this dialog.
-#include <qbuttongroup.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qradiobutton.h>
-#include <qregexp.h>
-#include <qtable.h>
-#include <qtextstream.h>
-#include <qvbox.h>
+#include <tqbuttongroup.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqradiobutton.h>
+#include <tqregexp.h>
+#include <tqtable.h>
+#include <tqtextstream.h>
+#include <tqvbox.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -51,7 +51,7 @@
#include "kimportdialog.h"
#include "kimportdialog.moc"
-KImportColumn::KImportColumn(KImportDialog *dlg,const QString &header, int count)
+KImportColumn::KImportColumn(KImportDialog *dlg,const TQString &header, int count)
: m_maxCount(count),
m_refCount(0),
m_header(header),
@@ -66,12 +66,12 @@ KImportColumn::KImportColumn(KImportDialog *dlg,const QString &header, int count
mDialog->addColumn(this);
}
-QValueList<int> KImportColumn::formats()
+TQValueList<int> KImportColumn::formats()
{
return mFormats;
}
-QString KImportColumn::formatName(int format)
+TQString KImportColumn::formatName(int format)
{
switch (format) {
case FormatPlain:
@@ -90,7 +90,7 @@ int KImportColumn::defaultFormat()
return mDefaultFormat;
}
-QString KImportColumn::preview(const QString &value, int format)
+TQString KImportColumn::preview(const TQString &value, int format)
{
if (format == FormatBracketed) {
return "(" + value + ")";
@@ -115,22 +115,22 @@ void KImportColumn::removeColId(int id)
mColIds.remove(id);
}
-QValueList<int> KImportColumn::colIdList()
+TQValueList<int> KImportColumn::colIdList()
{
return mColIds;
}
-QString KImportColumn::convert()
+TQString KImportColumn::convert()
{
- QValueList<int>::ConstIterator it = mColIds.begin();
+ TQValueList<int>::ConstIterator it = mColIds.begin();
if (it == mColIds.end()) return "";
else return mDialog->cell(*it);
}
-class ColumnItem : public QListViewItem {
+class ColumnItem : public TQListViewItem {
public:
- ColumnItem(KImportColumn *col,QListView *parent) : QListViewItem(parent), mColumn(col)
+ ColumnItem(KImportColumn *col,TQListView *parent) : TQListViewItem(parent), mColumn(col)
{
setText(0,mColumn->header());
}
@@ -148,36 +148,36 @@ class ColumnItem : public QListViewItem {
data objects, this class has to be inherited by a special class, which
reimplements the convertRow() function.
*/
-KImportDialog::KImportDialog(QWidget* parent)
+KImportDialog::KImportDialog(TQWidget* parent)
: KDialogBase(parent,"importdialog",true,i18n("Import Text File"),Ok|Cancel),
mSeparator(","),
mCurrentRow(0)
{
mData.setAutoDelete( true );
- QVBox *topBox = new QVBox(this);
+ TQVBox *topBox = new TQVBox(this);
setMainWidget(topBox);
topBox->setSpacing(spacingHint());
- QHBox *fileBox = new QHBox(topBox);
+ TQHBox *fileBox = new TQHBox(topBox);
fileBox->setSpacing(spacingHint());
- new QLabel(i18n("File to import:"),fileBox);
+ new TQLabel(i18n("File to import:"),fileBox);
KURLRequester *urlRequester = new KURLRequester(fileBox);
urlRequester->setFilter( "*.csv" );
- connect(urlRequester,SIGNAL(returnPressed(const QString &)),
- SLOT(setFile(const QString &)));
- connect(urlRequester,SIGNAL(urlSelected(const QString &)),
- SLOT(setFile(const QString &)));
- connect(urlRequester->lineEdit(),SIGNAL(textChanged ( const QString & )),
- SLOT(slotUrlChanged(const QString & )));
- mTable = new QTable(5,5,topBox);
+ connect(urlRequester,TQT_SIGNAL(returnPressed(const TQString &)),
+ TQT_SLOT(setFile(const TQString &)));
+ connect(urlRequester,TQT_SIGNAL(urlSelected(const TQString &)),
+ TQT_SLOT(setFile(const TQString &)));
+ connect(urlRequester->lineEdit(),TQT_SIGNAL(textChanged ( const TQString & )),
+ TQT_SLOT(slotUrlChanged(const TQString & )));
+ mTable = new TQTable(5,5,topBox);
mTable->setMinimumHeight( 150 );
- connect(mTable,SIGNAL(selectionChanged()),SLOT(tableSelected()));
+ connect(mTable,TQT_SIGNAL(selectionChanged()),TQT_SLOT(tableSelected()));
- QHBox *separatorBox = new QHBox( topBox );
+ TQHBox *separatorBox = new TQHBox( topBox );
separatorBox->setSpacing( spacingHint() );
- new QLabel( i18n( "Separator:" ), separatorBox );
+ new TQLabel( i18n( "Separator:" ), separatorBox );
mSeparatorCombo = new KComboBox( separatorBox );
mSeparatorCombo->insertItem( "," );
@@ -185,75 +185,75 @@ KImportDialog::KImportDialog(QWidget* parent)
mSeparatorCombo->insertItem( i18n( "Space" ) );
mSeparatorCombo->insertItem( "=" );
mSeparatorCombo->insertItem( ";" );
- connect(mSeparatorCombo, SIGNAL( activated(int) ),
- this, SLOT( separatorClicked(int) ) );
+ connect(mSeparatorCombo, TQT_SIGNAL( activated(int) ),
+ this, TQT_SLOT( separatorClicked(int) ) );
mSeparatorCombo->setCurrentItem( 0 );
- QHBox *rowsBox = new QHBox( topBox );
+ TQHBox *rowsBox = new TQHBox( topBox );
rowsBox->setSpacing( spacingHint() );
- new QLabel( i18n( "Import starts at row:" ), rowsBox );
- mStartRow = new QSpinBox( rowsBox );
+ new TQLabel( i18n( "Import starts at row:" ), rowsBox );
+ mStartRow = new TQSpinBox( rowsBox );
mStartRow->setMinValue( 1 );
/*
- new QLabel( i18n( "And ends at row:" ), rowsBox );
- mEndRow = new QSpinBox( rowsBox );
+ new TQLabel( i18n( "And ends at row:" ), rowsBox );
+ mEndRow = new TQSpinBox( rowsBox );
mEndRow->setMinValue( 1 );
*/
- QVBox *assignBox = new QVBox(topBox);
+ TQVBox *assignBox = new TQVBox(topBox);
assignBox->setSpacing(spacingHint());
- QHBox *listsBox = new QHBox(assignBox);
+ TQHBox *listsBox = new TQHBox(assignBox);
listsBox->setSpacing(spacingHint());
- mHeaderList = new QListView(listsBox);
+ mHeaderList = new TQListView(listsBox);
mHeaderList->addColumn(i18n("Header"));
- connect(mHeaderList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(headerSelected(QListViewItem*)));
- connect(mHeaderList,SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(assignColumn(QListViewItem *)));
+ connect(mHeaderList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(headerSelected(TQListViewItem*)));
+ connect(mHeaderList,TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(assignColumn(TQListViewItem *)));
mFormatCombo = new KComboBox( listsBox );
mFormatCombo->setDuplicatesEnabled( false );
- QPushButton *assignButton = new QPushButton(i18n("Assign to Selected Column"),
+ TQPushButton *assignButton = new TQPushButton(i18n("Assign to Selected Column"),
assignBox);
- connect(assignButton,SIGNAL(clicked()),SLOT(assignColumn()));
+ connect(assignButton,TQT_SIGNAL(clicked()),TQT_SLOT(assignColumn()));
- QPushButton *removeButton = new QPushButton(i18n("Remove Assignment From Selected Column"),
+ TQPushButton *removeButton = new TQPushButton(i18n("Remove Assignment From Selected Column"),
assignBox);
- connect(removeButton,SIGNAL(clicked()),SLOT(removeColumn()));
+ connect(removeButton,TQT_SIGNAL(clicked()),TQT_SLOT(removeColumn()));
- QPushButton *assignTemplateButton = new QPushButton(i18n("Assign with Template..."),
+ TQPushButton *assignTemplateButton = new TQPushButton(i18n("Assign with Template..."),
assignBox);
- connect(assignTemplateButton,SIGNAL(clicked()),SLOT(assignTemplate()));
+ connect(assignTemplateButton,TQT_SIGNAL(clicked()),TQT_SLOT(assignTemplate()));
- QPushButton *saveTemplateButton = new QPushButton(i18n("Save Current Template"),
+ TQPushButton *saveTemplateButton = new TQPushButton(i18n("Save Current Template"),
assignBox);
- connect(saveTemplateButton,SIGNAL(clicked()),SLOT(saveTemplate()));
+ connect(saveTemplateButton,TQT_SIGNAL(clicked()),TQT_SLOT(saveTemplate()));
resize(500,300);
- connect(this,SIGNAL(okClicked()),SLOT(applyConverter()));
- connect(this,SIGNAL(applyClicked()),SLOT(applyConverter()));
+ connect(this,TQT_SIGNAL(okClicked()),TQT_SLOT(applyConverter()));
+ connect(this,TQT_SIGNAL(applyClicked()),TQT_SLOT(applyConverter()));
enableButtonOK(!urlRequester->lineEdit()->text().isEmpty());
}
-void KImportDialog::slotUrlChanged(const QString & text)
+void KImportDialog::slotUrlChanged(const TQString & text)
{
enableButtonOK(!text.isEmpty());
}
-bool KImportDialog::setFile(const QString& file)
+bool KImportDialog::setFile(const TQString& file)
{
enableButtonOK(!file.isEmpty());
kdDebug(5300) << "KImportDialog::setFile(): " << file << endl;
- QFile f(file);
+ TQFile f(file);
if (f.open(IO_ReadOnly)) {
mFile = "";
- QTextStream t(&f);
+ TQTextStream t(&f);
mFile = t.read();
// while (!t.eof()) mFile.append(t.readLine());
f.close();
@@ -271,7 +271,7 @@ bool KImportDialog::setFile(const QString& file)
void KImportDialog::registerColumns()
{
- QPtrListIterator<KImportColumn> colIt(mColumns);
+ TQPtrListIterator<KImportColumn> colIt(mColumns);
for (; colIt.current(); ++colIt) {
new ColumnItem(*colIt,mHeaderList);
}
@@ -289,7 +289,7 @@ void KImportDialog::fillTable()
mTable->clearCell(row, column);
for ( row = 0; row < int(mData.count()); ++row ) {
- QValueVector<QString> *rowVector = mData[ row ];
+ TQValueVector<TQString> *rowVector = mData[ row ];
for( column = 0; column < int(rowVector->size()); ++column ) {
setCellText( row, column, rowVector->at( column ) );
}
@@ -306,15 +306,15 @@ void KImportDialog::readFile( int rows )
enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD,
S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;
- QChar m_textquote = '"';
+ TQChar m_textquote = '"';
int m_startline = 0;
- QChar x;
- QString field = "";
+ TQChar x;
+ TQString field = "";
row = column = 0;
- QTextStream inputStream(mFile, IO_ReadOnly);
- inputStream.setEncoding(QTextStream::Locale);
+ TQTextStream inputStream(mFile, IO_ReadOnly);
+ inputStream.setEncoding(TQTextStream::Locale);
KProgressDialog pDialog(this, 0, i18n("Loading Progress"),
i18n("Please wait while the file is loaded."), true);
@@ -436,7 +436,7 @@ void KImportDialog::readFile( int rows )
fillTable();
}
-void KImportDialog::setCellText(int row, int col, const QString& text)
+void KImportDialog::setCellText(int row, int col, const TQString& text)
{
if (row < 0) return;
@@ -444,18 +444,18 @@ void KImportDialog::setCellText(int row, int col, const QString& text)
if ((mTable->numCols() - 1) < col) mTable->setNumCols(col + 1);
KImportColumn *c = mColumnDict.find(col);
- QString formattedText;
+ TQString formattedText;
if (c) formattedText = c->preview(text,findFormat(col));
else formattedText = text;
mTable->setText(row, col, formattedText);
}
-void KImportDialog::formatSelected(QListViewItem*)
+void KImportDialog::formatSelected(TQListViewItem*)
{
// kdDebug(5300) << "KImportDialog::formatSelected()" << endl;
}
-void KImportDialog::headerSelected(QListViewItem* item)
+void KImportDialog::headerSelected(TQListViewItem* item)
{
KImportColumn *col = ((ColumnItem *)item)->column();
@@ -463,16 +463,16 @@ void KImportDialog::headerSelected(QListViewItem* item)
mFormatCombo->clear();
- QValueList<int> formats = col->formats();
+ TQValueList<int> formats = col->formats();
- QValueList<int>::ConstIterator it = formats.begin();
- QValueList<int>::ConstIterator end = formats.end();
+ TQValueList<int>::ConstIterator it = formats.begin();
+ TQValueList<int>::ConstIterator end = formats.end();
while(it != end) {
mFormatCombo->insertItem( col->formatName(*it), *it - 1 );
++it;
}
- QTableSelection selection = mTable->selection(mTable->currentSelection());
+ TQTableSelection selection = mTable->selection(mTable->currentSelection());
updateFormatSelection(selection.leftCol());
}
@@ -489,9 +489,9 @@ void KImportDialog::updateFormatSelection(int column)
void KImportDialog::tableSelected()
{
- QTableSelection selection = mTable->selection(mTable->currentSelection());
+ TQTableSelection selection = mTable->selection(mTable->currentSelection());
- QListViewItem *item = mHeaderList->firstChild();
+ TQListViewItem *item = mHeaderList->firstChild();
KImportColumn *col = mColumnDict.find(selection.leftCol());
if (col) {
while(item) {
@@ -534,7 +534,7 @@ void KImportDialog::separatorClicked(int id)
readFile();
}
-void KImportDialog::assignColumn(QListViewItem *item)
+void KImportDialog::assignColumn(TQListViewItem *item)
{
if (!item) return;
@@ -543,7 +543,7 @@ void KImportDialog::assignColumn(QListViewItem *item)
ColumnItem *colItem = (ColumnItem *)item;
- QTableSelection selection = mTable->selection(mTable->currentSelection());
+ TQTableSelection selection = mTable->selection(mTable->currentSelection());
// kdDebug(5300) << " l: " << selection.leftCol() << " r: " << selection.rightCol() << endl;
@@ -567,15 +567,15 @@ void KImportDialog::assignColumn()
void KImportDialog::assignTemplate()
{
- QMap<uint,int> columnMap;
- QMap<QString, QString> fileMap;
- QStringList templates;
+ TQMap<uint,int> columnMap;
+ TQMap<TQString, TQString> fileMap;
+ TQStringList templates;
// load all template files
- QStringList list = KGlobal::dirs()->findAllResources( "data" , QString( kapp->name() ) +
+ TQStringList list = KGlobal::dirs()->findAllResources( "data" , TQString( kapp->name() ) +
"/csv-templates/*.desktop", true, true );
- for ( QStringList::iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it )
{
KSimpleConfig config( *it, true );
@@ -589,7 +589,7 @@ void KImportDialog::assignTemplate()
// let the user chose, what to take
bool ok = false;
- QString tmp;
+ TQString tmp;
tmp = KInputDialog::getItem( i18n( "Template Selection" ),
i18n( "Please select a template, that matches the CSV file:" ),
templates, 0, false, &ok, this );
@@ -605,7 +605,7 @@ void KImportDialog::assignTemplate()
// create the column map
config.setGroup( "csv column map" );
for ( uint i = 0; i < numColumns; ++i ) {
- int col = config.readNumEntry( QString::number( i ) );
+ int col = config.readNumEntry( TQString::number( i ) );
columnMap.insert( i, col );
}
@@ -626,13 +626,13 @@ void KImportDialog::assignTemplate()
void KImportDialog::removeColumn()
{
- QTableSelection selection = mTable->selection(mTable->currentSelection());
+ TQTableSelection selection = mTable->selection(mTable->currentSelection());
// kdDebug(5300) << " l: " << selection.leftCol() << " r: " << selection.rightCol() << endl;
for(int i=selection.leftCol();i<=selection.rightCol();++i) {
if (i >= 0) {
- mTable->horizontalHeader()->setLabel(i,QString::number(i+1));
+ mTable->horizontalHeader()->setLabel(i,TQString::number(i+1));
KImportColumn *col = mColumnDict.find(i);
if (col) {
mColumnDict.remove(i);
@@ -674,7 +674,7 @@ void KImportDialog::applyConverter()
int KImportDialog::findFormat(int column)
{
- QMap<int,int>::ConstIterator formatIt = mFormats.find(column);
+ TQMap<int,int>::ConstIterator formatIt = mFormats.find(column);
int format;
if (formatIt == mFormats.end()) format = KImportColumn::FormatUndefined;
else format = *formatIt;
@@ -684,7 +684,7 @@ int KImportDialog::findFormat(int column)
return format;
}
-QString KImportDialog::cell(uint col)
+TQString KImportDialog::cell(uint col)
{
if ( col >= mData[ mCurrentRow ]->size() ) return "";
else return data( mCurrentRow, col );
@@ -695,18 +695,18 @@ void KImportDialog::addColumn(KImportColumn *col)
mColumns.append(col);
}
-void KImportDialog::setData( uint row, uint col, const QString &value )
+void KImportDialog::setData( uint row, uint col, const TQString &value )
{
- QString val = value;
+ TQString val = value;
val.replace( "\\n", "\n" );
if ( row >= mData.count() ) {
mData.resize( row + 1 );
}
- QValueVector<QString> *rowVector = mData[ row ];
+ TQValueVector<TQString> *rowVector = mData[ row ];
if ( !rowVector ) {
- rowVector = new QValueVector<QString>;
+ rowVector = new TQValueVector<TQString>;
mData.insert( row, rowVector );
}
if ( col >= rowVector->size() ) {
@@ -720,15 +720,15 @@ void KImportDialog::setData( uint row, uint col, const QString &value )
rowVector->at( col ) = val;
}
-QString KImportDialog::data( uint row, uint col )
+TQString KImportDialog::data( uint row, uint col )
{
return mData[ row ]->at( col );
}
void KImportDialog::saveTemplate()
{
- QString fileName = KFileDialog::getSaveFileName(
- locateLocal( "data", QString( kapp->name() ) + "/csv-templates/" ),
+ TQString fileName = KFileDialog::getSaveFileName(
+ locateLocal( "data", TQString( kapp->name() ) + "/csv-templates/" ),
"*.desktop", this );
if ( fileName.isEmpty() )
@@ -737,7 +737,7 @@ void KImportDialog::saveTemplate()
if ( !fileName.contains( ".desktop" ) )
fileName += ".desktop";
- QString name = KInputDialog::getText( i18n( "Template Name" ), i18n( "Please enter a name for the template:" ) );
+ TQString name = KInputDialog::getText( i18n( "Template Name" ), i18n( "Please enter a name for the template:" ) );
if ( name.isEmpty() )
return;
@@ -755,11 +755,11 @@ void KImportDialog::saveTemplate()
KImportColumn *column;
uint counter = 0;
for ( column = mColumns.first(); column; column = mColumns.next() ) {
- QValueList<int> list = column->colIdList();
+ TQValueList<int> list = column->colIdList();
if ( list.count() > 0 )
- config.writeEntry( QString::number( counter ), list[ 0 ] );
+ config.writeEntry( TQString::number( counter ), list[ 0 ] );
else
- config.writeEntry( QString::number( counter ), -1 );
+ config.writeEntry( TQString::number( counter ), -1 );
counter++;
}
diff --git a/libkdepim/kimportdialog.h b/libkdepim/kimportdialog.h
index b372e6bfb..153da0347 100644
--- a/libkdepim/kimportdialog.h
+++ b/libkdepim/kimportdialog.h
@@ -22,11 +22,11 @@
#ifndef KIMPORTDIALOG_H
#define KIMPORTDIALOG_H
-#include <qintdict.h>
-#include <qstringlist.h>
-#include <qspinbox.h>
-#include <qptrvector.h>
-#include <qvaluevector.h>
+#include <tqintdict.h>
+#include <tqstringlist.h>
+#include <tqspinbox.h>
+#include <tqptrvector.h>
+#include <tqvaluevector.h>
#include <kdialogbase.h>
@@ -41,34 +41,34 @@ class KImportColumn
public:
enum { FormatUndefined = 0, FormatPlain, FormatUnquoted, FormatBracketed, FormatLast };
- KImportColumn(KImportDialog *dlg, const QString &header, int count = 0);
+ KImportColumn(KImportDialog *dlg, const TQString &header, int count = 0);
virtual ~KImportColumn() {}
- QString header() const { return m_header; }
+ TQString header() const { return m_header; }
- QValueList<int> formats();
- QString formatName(int format);
+ TQValueList<int> formats();
+ TQString formatName(int format);
int defaultFormat();
- QString convert();
-// virtual void convert(const QString &value,int format) = 0;
- QString preview(const QString &value,int format);
+ TQString convert();
+// virtual void convert(const TQString &value,int format) = 0;
+ TQString preview(const TQString &value,int format);
void addColId(int i);
void removeColId(int i);
- QValueList<int> colIdList();
+ TQValueList<int> colIdList();
protected:
private:
int m_maxCount, m_refCount;
- QString m_header;
- QValueList<int> mFormats;
+ TQString m_header;
+ TQValueList<int> mFormats;
int mDefaultFormat;
- QValueList<int> mColIds;
+ TQValueList<int> mColIds;
KImportDialog *mDialog;
};
@@ -77,12 +77,12 @@ class KImportDialog : public KDialogBase
{
Q_OBJECT
public:
- KImportDialog(QWidget* parent);
+ KImportDialog(TQWidget* parent);
public slots:
- bool setFile(const QString& file);
+ bool setFile(const TQString& file);
- QString cell(uint row);
+ TQString cell(uint row);
void addColumn(KImportColumn *);
@@ -97,40 +97,40 @@ class KImportDialog : public KDialogBase
protected slots:
void separatorClicked(int id);
- void formatSelected(QListViewItem* item);
- void headerSelected(QListViewItem* item);
- void assignColumn(QListViewItem *);
+ void formatSelected(TQListViewItem* item);
+ void headerSelected(TQListViewItem* item);
+ void assignColumn(TQListViewItem *);
void assignColumn();
void assignTemplate();
void removeColumn();
void applyConverter();
void tableSelected();
- void slotUrlChanged(const QString & );
+ void slotUrlChanged(const TQString & );
void saveTemplate();
private:
void updateFormatSelection(int column);
- void setCellText(int row, int col, const QString& text);
+ void setCellText(int row, int col, const TQString& text);
- void setData( uint row, uint col, const QString &text );
- QString data( uint row, uint col );
+ void setData( uint row, uint col, const TQString &text );
+ TQString data( uint row, uint col );
- QListView *mHeaderList;
- QSpinBox *mStartRow;
- QSpinBox *mEndRow;
- QTable *mTable;
+ TQListView *mHeaderList;
+ TQSpinBox *mStartRow;
+ TQSpinBox *mEndRow;
+ TQTable *mTable;
KComboBox *mFormatCombo;
KComboBox *mSeparatorCombo;
- QString mSeparator;
+ TQString mSeparator;
int mCurrentRow;
- QString mFile;
- QIntDict<KImportColumn> mColumnDict;
- QIntDict<uint> mTemplateDict;
- QMap<int,int> mFormats;
- QPtrList<KImportColumn> mColumns;
- QPtrVector<QValueVector<QString> > mData;
+ TQString mFile;
+ TQIntDict<KImportColumn> mColumnDict;
+ TQIntDict<uint> mTemplateDict;
+ TQMap<int,int> mFormats;
+ TQPtrList<KImportColumn> mColumns;
+ TQPtrVector<TQValueVector<TQString> > mData;
};
#endif
diff --git a/libkdepim/kincidencechooser.cpp b/libkdepim/kincidencechooser.cpp
index 0708cb4c4..53f72c886 100644
--- a/libkdepim/kincidencechooser.cpp
+++ b/libkdepim/kincidencechooser.cpp
@@ -22,17 +22,17 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qscrollview.h>
-#include <qtextbrowser.h>
-#include <qapplication.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqscrollview.h>
+#include <tqtextbrowser.h>
+#include <tqapplication.h>
#include <klocale.h>
@@ -44,81 +44,81 @@
int KIncidenceChooser::chooseMode = KIncidenceChooser::ask ;
-KIncidenceChooser::KIncidenceChooser(QWidget *parent, char *name) :
+KIncidenceChooser::KIncidenceChooser(TQWidget *parent, char *name) :
KDialog(parent,name,true)
{
KDialog *topFrame = this;
- QGridLayout *topLayout = new QGridLayout(topFrame,5,3);
+ TQGridLayout *topLayout = new TQGridLayout(topFrame,5,3);
int iii = 0;
setCaption( i18n("Conflict Detected"));
- QLabel * lab;
- lab = new QLabel( i18n(
+ TQLabel * lab;
+ lab = new TQLabel( i18n(
"<qt>A conflict was detected. This probably means someone edited the same entry on the server while you changed it locally."
"<br/>NOTE: You have to check mail again to apply your changes to the server.</qt>"), topFrame);
topLayout->addMultiCellWidget(lab, iii,iii,0,2);
++iii;
- QHBox * b_box = new QHBox( topFrame );
+ TQHBox * b_box = new TQHBox( topFrame );
topLayout->addMultiCellWidget(b_box, iii,iii,0,2);
++iii;
- QPushButton* button = new QPushButton( i18n("Take Local"), b_box );
- connect ( button, SIGNAL( clicked()), this, SLOT (takeIncidence1() ) );
- button = new QPushButton( i18n("Take New"), b_box );
- connect ( button, SIGNAL( clicked()), this, SLOT (takeIncidence2() ) );
- button = new QPushButton( i18n("Take Both"), b_box );
- connect ( button, SIGNAL( clicked()), this, SLOT (takeBoth() ) );
+ TQPushButton* button = new TQPushButton( i18n("Take Local"), b_box );
+ connect ( button, TQT_SIGNAL( clicked()), this, TQT_SLOT (takeIncidence1() ) );
+ button = new TQPushButton( i18n("Take New"), b_box );
+ connect ( button, TQT_SIGNAL( clicked()), this, TQT_SLOT (takeIncidence2() ) );
+ button = new TQPushButton( i18n("Take Both"), b_box );
+ connect ( button, TQT_SIGNAL( clicked()), this, TQT_SLOT (takeBoth() ) );
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
// text is not translated, because text has to be set later
- mInc1lab = new QLabel ( i18n("Local incidence"), topFrame);
+ mInc1lab = new TQLabel ( i18n("Local incidence"), topFrame);
topLayout->addWidget(mInc1lab ,iii,0);
- mInc1Sumlab = new QLabel ( i18n("Local incidence summary"), topFrame);
+ mInc1Sumlab = new TQLabel ( i18n("Local incidence summary"), topFrame);
topLayout->addMultiCellWidget(mInc1Sumlab, iii,iii,1,2);
++iii;
- topLayout->addWidget( new QLabel ( i18n("Last modified:"), topFrame) ,iii,0);
- mMod1lab = new QLabel ( "Set Last modified", topFrame);
+ topLayout->addWidget( new TQLabel ( i18n("Last modified:"), topFrame) ,iii,0);
+ mMod1lab = new TQLabel ( "Set Last modified", topFrame);
topLayout->addWidget(mMod1lab,iii,1);
- showDetails1 = new QPushButton( i18n("Show Details"),topFrame );
- connect ( showDetails1, SIGNAL( clicked()), this, SLOT (showIncidence1() ) );
+ showDetails1 = new TQPushButton( i18n("Show Details"),topFrame );
+ connect ( showDetails1, TQT_SIGNAL( clicked()), this, TQT_SLOT (showIncidence1() ) );
topLayout->addWidget(showDetails1,iii,2);
++iii;
- mInc2lab = new QLabel ( "Local incidence", topFrame);
+ mInc2lab = new TQLabel ( "Local incidence", topFrame);
topLayout->addWidget(mInc2lab,iii,0);
- mInc2Sumlab = new QLabel ( "Local incidence summary", topFrame);
+ mInc2Sumlab = new TQLabel ( "Local incidence summary", topFrame);
topLayout->addMultiCellWidget(mInc2Sumlab, iii,iii,1,2);
++iii;
- topLayout->addWidget( new QLabel ( i18n("Last modified:"), topFrame) ,iii,0);
- mMod2lab = new QLabel ( "Set Last modified", topFrame);
+ topLayout->addWidget( new TQLabel ( i18n("Last modified:"), topFrame) ,iii,0);
+ mMod2lab = new TQLabel ( "Set Last modified", topFrame);
topLayout->addWidget(mMod2lab,iii,1);
- showDetails2 = new QPushButton( i18n("Show Details"), topFrame);
- connect ( showDetails2, SIGNAL( clicked()), this, SLOT (showIncidence2() ) );
+ showDetails2 = new TQPushButton( i18n("Show Details"), topFrame);
+ connect ( showDetails2, TQT_SIGNAL( clicked()), this, TQT_SLOT (showIncidence2() ) );
topLayout->addWidget(showDetails2,iii,2);
++iii;
//
#if 0
// commented out for now, because the diff code has too many bugs
- diffBut = new QPushButton( i18n("Show Differences"), topFrame );
- connect ( diffBut, SIGNAL( clicked()), this, SLOT ( showDiff() ) );
+ diffBut = new TQPushButton( i18n("Show Differences"), topFrame );
+ connect ( diffBut, TQT_SIGNAL( clicked()), this, TQT_SLOT ( showDiff() ) );
topLayout->addMultiCellWidget(diffBut, iii,iii,0,2);
++iii;
#else
diffBut = 0;
#endif
- mBg = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync Preferences"), topFrame);
+ mBg = new TQButtonGroup ( 1, Qt::Horizontal, i18n("Sync Preferences"), topFrame);
topLayout->addMultiCellWidget(mBg, iii,iii,0,2);
++iii;
- mBg->insert( new QRadioButton ( i18n("Take local entry on conflict"), mBg ), KIncidenceChooser::local);
- mBg->insert( new QRadioButton ( i18n("Take new (remote) entry on conflict"), mBg ), KIncidenceChooser::remote);
- mBg->insert( new QRadioButton ( i18n("Take newest entry on conflict"), mBg ), KIncidenceChooser::newest );
- mBg->insert( new QRadioButton ( i18n("Ask for every entry on conflict"), mBg ),KIncidenceChooser::ask );
- mBg->insert( new QRadioButton ( i18n("Take both on conflict"), mBg ), KIncidenceChooser::both );
+ mBg->insert( new TQRadioButton ( i18n("Take local entry on conflict"), mBg ), KIncidenceChooser::local);
+ mBg->insert( new TQRadioButton ( i18n("Take new (remote) entry on conflict"), mBg ), KIncidenceChooser::remote);
+ mBg->insert( new TQRadioButton ( i18n("Take newest entry on conflict"), mBg ), KIncidenceChooser::newest );
+ mBg->insert( new TQRadioButton ( i18n("Ask for every entry on conflict"), mBg ),KIncidenceChooser::ask );
+ mBg->insert( new TQRadioButton ( i18n("Take both on conflict"), mBg ), KIncidenceChooser::both );
mBg->setButton ( chooseMode );
mTbL = 0;
mTbN = 0;
mDisplayDiff = 0;
choosedIncidence = 0;
- button = new QPushButton( i18n("Apply This to All Conflicts of This Sync"), topFrame );
- connect ( button, SIGNAL( clicked()), this, SLOT ( setSyncMode() ) );
+ button = new TQPushButton( i18n("Apply This to All Conflicts of This Sync"), topFrame );
+ connect ( button, TQT_SIGNAL( clicked()), this, TQT_SLOT ( setSyncMode() ) );
topLayout->addMultiCellWidget(button, iii,iii,0,2);
}
@@ -165,21 +165,21 @@ void KIncidenceChooser::setSyncMode()
{
chooseMode = mBg->selectedId ();
if ( chooseMode != KIncidenceChooser::ask )
- QDialog::accept();
+ TQDialog::accept();
}
void KIncidenceChooser::useGlobalMode()
{
if ( chooseMode != KIncidenceChooser::ask )
- QDialog::reject();
+ TQDialog::reject();
}
void KIncidenceChooser::setLabels()
{
KCal::Incidence* inc = mInc1;
- QLabel* des = mInc1lab;
- QLabel * sum = mInc1Sumlab;
+ TQLabel* des = mInc1lab;
+ TQLabel * sum = mInc1Sumlab;
if ( inc->type() == "Event" ) {
@@ -237,8 +237,8 @@ void KIncidenceChooser::showIncidence1()
}
mTbL = new KDialogBase( this, "", false /*not modal*/, mInc1lab->text(), KDialogBase::Ok );
mTbL->setEscapeButton( KDialogBase::Ok );
- connect( mTbL, SIGNAL( okClicked() ), this, SLOT( detailsDialogClosed() ) );
- QTextBrowser* textBrowser = new QTextBrowser( mTbL );
+ connect( mTbL, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( detailsDialogClosed() ) );
+ TQTextBrowser* textBrowser = new TQTextBrowser( mTbL );
mTbL->setMainWidget( textBrowser );
textBrowser->setText( KCal::IncidenceFormatter::extensiveDisplayString( mInc1 ) );
mTbL->setMinimumSize( 400, 400 );
@@ -249,7 +249,7 @@ void KIncidenceChooser::showIncidence1()
void KIncidenceChooser::detailsDialogClosed()
{
- KDialogBase* dialog = static_cast<KDialogBase *>( const_cast<QObject *>( sender() ) );
+ KDialogBase* dialog = static_cast<KDialogBase *>( const_cast<TQObject *>( sender() ) );
if ( dialog == mTbL )
showDetails1->setText( i18n( "Show details..." ) );
else
@@ -293,8 +293,8 @@ void KIncidenceChooser::showIncidence2()
}
mTbN = new KDialogBase( this, "", false /*not modal*/, mInc2lab->text(), KDialogBase::Ok );
mTbN->setEscapeButton( KDialogBase::Ok );
- connect( mTbN, SIGNAL( okClicked() ), this, SLOT( detailsDialogClosed() ) );
- QTextBrowser* textBrowser = new QTextBrowser( mTbN );
+ connect( mTbN, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( detailsDialogClosed() ) );
+ TQTextBrowser* textBrowser = new TQTextBrowser( mTbN );
mTbN->setMainWidget( textBrowser );
textBrowser->setText( KCal::IncidenceFormatter::extensiveDisplayString( mInc2 ) );
mTbN->setMinimumSize( 400, 400 );
@@ -306,20 +306,20 @@ void KIncidenceChooser::showIncidence2()
void KIncidenceChooser::takeIncidence1()
{
choosedIncidence = mInc1;
- QDialog::accept();
+ TQDialog::accept();
}
void KIncidenceChooser::takeIncidence2()
{
choosedIncidence = mInc2;
- QDialog::accept();
+ TQDialog::accept();
}
void KIncidenceChooser::takeBoth()
{
choosedIncidence = 0;
- QDialog::accept();
+ TQDialog::accept();
}
diff --git a/libkdepim/kincidencechooser.h b/libkdepim/kincidencechooser.h
index 31ea47bb5..9ecf4cc58 100644
--- a/libkdepim/kincidencechooser.h
+++ b/libkdepim/kincidencechooser.h
@@ -26,8 +26,8 @@
#include <kdialogbase.h>
-#include <qptrlist.h>
-#include <qmutex.h>
+#include <tqptrlist.h>
+#include <tqmutex.h>
#include <kdepimmacros.h>
#include <libkcal/incidence.h>
@@ -51,9 +51,9 @@ class KDE_EXPORT KIncidenceChooser : public KDialog
public:
enum mode { local, remote, newest, ask, both };
/** Initialize dialog and pages */
- KIncidenceChooser(QWidget *parent=0,char *name=0);
+ KIncidenceChooser(TQWidget *parent=0,char *name=0);
~KIncidenceChooser();
- //void setChooseText( QString );
+ //void setChooseText( TQString );
void setIncidence( KCal::Incidence*,KCal::Incidence*);
KCal::Incidence* getIncidence();
static int chooseMode;
@@ -79,9 +79,9 @@ private:
KDialogBase* mTbL, *mTbN;
KCal::Incidence* choosedIncidence;
KCal::Incidence* mInc1, *mInc2;
- QButtonGroup *mBg;
- QPushButton *diffBut,*showDetails1,*showDetails2;
- QLabel* mInc1lab, *mInc2lab,* mInc1Sumlab, *mInc2Sumlab,*mMod1lab,*mMod2lab;
+ TQButtonGroup *mBg;
+ TQPushButton *diffBut,*showDetails1,*showDetails2;
+ TQLabel* mInc1lab, *mInc2lab,* mInc1Sumlab, *mInc2Sumlab,*mMod1lab,*mMod2lab;
};
diff --git a/libkdepim/kmailcompletion.cpp b/libkdepim/kmailcompletion.cpp
index 41d2f2ce8..b7c37852c 100644
--- a/libkdepim/kmailcompletion.cpp
+++ b/libkdepim/kmailcompletion.cpp
@@ -22,7 +22,7 @@
#include "kmailcompletion.h"
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KPIM;
@@ -37,22 +37,22 @@ void KMailCompletion::clear()
KCompletion::clear();
}
-QString KMailCompletion::makeCompletion( const QString &string )
+TQString KMailCompletion::makeCompletion( const TQString &string )
{
- QString match = KCompletion::makeCompletion( string );
+ TQString match = KCompletion::makeCompletion( string );
// this should be in postProcessMatch, but postProcessMatch is const and will not allow nextMatch
if ( !match.isEmpty() ){
- const QString firstMatch( match );
- while ( match.find( QRegExp( "(@)|(<.*>)" ) ) == -1 ) {
+ const TQString firstMatch( match );
+ while ( match.find( TQRegExp( "(@)|(<.*>)" ) ) == -1 ) {
/* local email do not require @domain part, if match is an address we'll find
* last+first <match> in m_keyMap and we'll know that match is already a valid email.
*
* Distribution list do not have last+first <match> entry, they will be in mailAddr
*/
- const QStringList &mailAddr = m_keyMap[ match ]; //get all mailAddr for this keyword
+ const TQStringList &mailAddr = m_keyMap[ match ]; //get all mailAddr for this keyword
bool isEmail = false;
- for ( QStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit )
+ for ( TQStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit )
if ( (*sit).find( "<" + match + ">" ) != -1 || (*sit) == match ) {
isEmail = true;
break;
@@ -62,7 +62,7 @@ QString KMailCompletion::makeCompletion( const QString &string )
// match is a keyword, skip it and try to find match <email@domain>
match = nextMatch();
if ( firstMatch == match ){
- match = QString::null;
+ match = TQString::null;
break;
}
} else
@@ -72,29 +72,29 @@ QString KMailCompletion::makeCompletion( const QString &string )
return match;
}
-void KMailCompletion::addItemWithKeys( const QString& email, int weight, const QStringList* keyWords)
+void KMailCompletion::addItemWithKeys( const TQString& email, int weight, const TQStringList* keyWords)
{
Q_ASSERT( keyWords != 0 );
- for ( QStringList::ConstIterator it( keyWords->begin() ); it != keyWords->end(); ++it ) {
- QStringList &emailList = m_keyMap[ (*it) ]; //lookup email-list for given keyword
+ for ( TQStringList::ConstIterator it( keyWords->begin() ); it != keyWords->end(); ++it ) {
+ TQStringList &emailList = m_keyMap[ (*it) ]; //lookup email-list for given keyword
if ( emailList.find( email ) == emailList.end() ) //add email if not there
emailList.append( email );
addItem( (*it),weight ); //inform KCompletion about keyword
}
}
-void KMailCompletion::postProcessMatches( QStringList * pMatches )const
+void KMailCompletion::postProcessMatches( TQStringList * pMatches )const
{
Q_ASSERT( pMatches != 0 );
if ( pMatches->isEmpty() )
return;
//KCompletion has found the keywords for us, we can now map them to mail-addr
- QMap< QString, bool > mailAddrDistinct; //TODO replace with QSet in KDE4
- for ( QStringList::ConstIterator sit ( pMatches->begin() ), sEnd( pMatches->end() ); sit != sEnd; ++sit ) {
- const QStringList &mailAddr = m_keyMap[ (*sit) ]; //get all mailAddr for this keyword
- for ( QStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit ) {
- mailAddrDistinct[ (*sit) ] = true; //store mailAddr, QMap will make them unique
+ TQMap< TQString, bool > mailAddrDistinct; //TODO replace with QSet in KDE4
+ for ( TQStringList::ConstIterator sit ( pMatches->begin() ), sEnd( pMatches->end() ); sit != sEnd; ++sit ) {
+ const TQStringList &mailAddr = m_keyMap[ (*sit) ]; //get all mailAddr for this keyword
+ for ( TQStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit ) {
+ mailAddrDistinct[ (*sit) ] = true; //store mailAddr, TQMap will make them unique
}
}
pMatches->clear(); //delete keywords
diff --git a/libkdepim/kmailcompletion.h b/libkdepim/kmailcompletion.h
index c8db7bea3..e56eb77cd 100644
--- a/libkdepim/kmailcompletion.h
+++ b/libkdepim/kmailcompletion.h
@@ -22,8 +22,8 @@
#ifndef KPIM_KMAILCOMPLETION_H
#define KPIM_KMAILCOMPLETION_H
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include "kcompletion.h"
@@ -51,7 +51,7 @@ class KMailCompletion : public KCompletion
*
* @returns email address
*/
- QString makeCompletion( const QString &string );
+ TQString makeCompletion( const TQString &string );
/**
* Specify keywords for email.
@@ -62,15 +62,15 @@ class KMailCompletion : public KCompletion
* \li contains <email>
* or if they have also been added with this function.
*/
- void addItemWithKeys( const QString& email, int weight, const QStringList * keyWords);
+ void addItemWithKeys( const TQString& email, int weight, const TQStringList * keyWords);
/**
* Uses an internal map to replace all keywords in pMatches whith corrsesponding email addresses.
*/
- virtual void postProcessMatches( QStringList * pMatches )const;
+ virtual void postProcessMatches( TQStringList * pMatches )const;
private:
- QMap< QString, QStringList > m_keyMap;
+ TQMap< TQString, TQStringList > m_keyMap;
};
}
diff --git a/libkdepim/komposer/core/attachment.cpp b/libkdepim/komposer/core/attachment.cpp
index f5b936c0c..f8240380e 100644
--- a/libkdepim/komposer/core/attachment.cpp
+++ b/libkdepim/komposer/core/attachment.cpp
@@ -26,24 +26,24 @@ using namespace Komposer;
class Attachment::Private
{
public:
- QString name;
- QCString cte;
- QByteArray data;
- QCString type;
- QCString subType;
- QCString paramAttr;
- QString paramValue;
- QCString contDisp;
+ TQString name;
+ TQCString cte;
+ TQByteArray data;
+ TQCString type;
+ TQCString subType;
+ TQCString paramAttr;
+ TQString paramValue;
+ TQCString contDisp;
};
-Attachment::Attachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp )
+Attachment::Attachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp )
: d( new Private )
{
d->name = name;
diff --git a/libkdepim/komposer/core/attachment.h b/libkdepim/komposer/core/attachment.h
index fc19fb2da..5c4e1ebf2 100644
--- a/libkdepim/komposer/core/attachment.h
+++ b/libkdepim/komposer/core/attachment.h
@@ -22,9 +22,9 @@
#ifndef KOMPOSER_ATTACHMENT_H
#define KOMPOSER_ATTACHMENT_H
-#include <qstring.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
namespace Komposer
{
@@ -32,30 +32,30 @@ namespace Komposer
class Attachment
{
public:
- Attachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp );
+ Attachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp );
~Attachment();
- QString name() const;
- QCString cte() const;
- QByteArray data() const;
- QCString type() const;
- QCString subType() const;
- QCString paramAttr() const;
- QString paramValue() const;
- QCString contentDisposition() const;
+ TQString name() const;
+ TQCString cte() const;
+ TQByteArray data() const;
+ TQCString type() const;
+ TQCString subType() const;
+ TQCString paramAttr() const;
+ TQString paramValue() const;
+ TQCString contentDisposition() const;
private:
class Private;
Private *d;
};
- typedef QValueList<Attachment> AttachmentList;
+ typedef TQValueList<Attachment> AttachmentList;
}
#endif
diff --git a/libkdepim/komposer/core/core.cpp b/libkdepim/komposer/core/core.cpp
index 6a14fdb38..f93e59cc9 100644
--- a/libkdepim/komposer/core/core.cpp
+++ b/libkdepim/komposer/core/core.cpp
@@ -47,13 +47,13 @@
#include <kstdaccel.h>
#include <kdebug.h>
-#include <qwidgetstack.h>
-#include <qhbox.h>
-#include <qwidget.h>
+#include <tqwidgetstack.h>
+#include <tqhbox.h>
+#include <tqwidget.h>
using namespace Komposer;
-Core::Core( QWidget *parent, const char *name )
+Core::Core( TQWidget *parent, const char *name )
: KomposerIface( "KomposerIface" ),
KMainWindow( parent, name ), m_currentEditor( 0 )
{
@@ -118,9 +118,9 @@ Core::slotPluginLoaded( Plugin *plugin )
void
Core::slotAllPluginsLoaded()
{
- QValueList<KPluginInfo*> plugins = m_pluginManager->availablePlugins();
+ TQValueList<KPluginInfo*> plugins = m_pluginManager->availablePlugins();
kdDebug()<<"Number of available plugins is "<< plugins.count() <<endl;
- for ( QValueList<KPluginInfo*>::iterator it = plugins.begin(); it != plugins.end(); ++it ) {
+ for ( TQValueList<KPluginInfo*>::iterator it = plugins.begin(); it != plugins.end(); ++it ) {
KPluginInfo *i = ( *it );
kdDebug()<<"\tAvailable plugin "<< i->pluginName()
<<", comment = "<< i->comment() <<endl;
@@ -156,13 +156,13 @@ Core::selectEditor( Komposer::Editor *editor )
editor->select();
- QPtrList<KParts::Part> *partList = const_cast<QPtrList<KParts::Part>*>(
+ TQPtrList<KParts::Part> *partList = const_cast<TQPtrList<KParts::Part>*>(
m_partManager->parts() );
if ( partList->find( part ) == -1 )
addPart( part );
m_partManager->setActivePart( part );
- QWidget *view = part->widget();
+ TQWidget *view = part->widget();
Q_ASSERT( view );
kdDebug()<<"Raising view "<<view<<endl;
@@ -176,7 +176,7 @@ Core::selectEditor( Komposer::Editor *editor )
}
void
-Core::selectEditor( const QString &editorName )
+Core::selectEditor( const TQString &editorName )
{
}
@@ -217,19 +217,19 @@ void
Core::initWidgets()
{
statusBar()->show();
- QHBox *topWidget = new QHBox( this );
+ TQHBox *topWidget = new TQHBox( this );
setCentralWidget( topWidget );
- m_stack = new QWidgetStack( topWidget );
+ m_stack = new TQWidgetStack( topWidget );
}
void
Core::initCore()
{
m_pluginManager = new PluginManager( this );
- connect( m_pluginManager, SIGNAL(pluginLoaded(Plugin*)),
- SLOT(slotPluginLoaded(Plugin*)) );
- connect( m_pluginManager, SIGNAL(allPluginsLoaded()),
- SLOT(slotAllPluginsLoaded()) );
+ connect( m_pluginManager, TQT_SIGNAL(pluginLoaded(Plugin*)),
+ TQT_SLOT(slotPluginLoaded(Plugin*)) );
+ connect( m_pluginManager, TQT_SIGNAL(allPluginsLoaded()),
+ TQT_SLOT(slotAllPluginsLoaded()) );
m_pluginManager->loadAllPlugins();
@@ -239,39 +239,39 @@ Core::initCore()
void
Core::initConnections()
{
- connect( kapp, SIGNAL(shutDown()),
- SLOT(slotQuit()) );
+ connect( kapp, TQT_SIGNAL(shutDown()),
+ TQT_SLOT(slotQuit()) );
}
void
Core::createActions()
{
- KStdAction::close( this, SLOT(slotClose()), actionCollection() );
+ KStdAction::close( this, TQT_SLOT(slotClose()), actionCollection() );
(void) new KAction( i18n( "&Send" ), "mail_send", CTRL+Key_Return,
- this, SLOT(slotSendNow()), actionCollection(),
+ this, TQT_SLOT(slotSendNow()), actionCollection(),
"send_default" );
(void) new KAction( i18n( "&Queue" ), "queue", 0,
- this, SLOT(slotSendLater()),
+ this, TQT_SLOT(slotSendLater()),
actionCollection(), "send_alternative" );
(void) new KAction( i18n( "Save in &Drafts Folder" ), "filesave", 0,
- this, SLOT(slotSaveDraft()),
+ this, TQT_SLOT(slotSaveDraft()),
actionCollection(), "save_in_drafts" );
(void) new KAction( i18n( "&Insert File..." ), "fileopen", 0,
- this, SLOT(slotInsertFile()),
+ this, TQT_SLOT(slotInsertFile()),
actionCollection(), "insert_file" );
(void) new KAction( i18n( "&Address Book" ), "contents",0,
- this, SLOT(slotAddrBook()),
+ this, TQT_SLOT(slotAddrBook()),
actionCollection(), "addressbook" );
(void) new KAction( i18n( "&New Composer" ), "mail_new",
KStdAccel::shortcut( KStdAccel::New ),
- this, SLOT(slotNewComposer()),
+ this, TQT_SLOT(slotNewComposer()),
actionCollection(), "new_composer" );
(void) new KAction( i18n( "&Attach File..." ), "attach",
- 0, this, SLOT(slotAttachFile()),
+ 0, this, TQT_SLOT(slotAttachFile()),
actionCollection(), "attach_file" );
}
@@ -330,26 +330,26 @@ Core::send( int how )
}
void
-Core::addAttachment( const KURL &url, const QString &comment )
+Core::addAttachment( const KURL &url, const TQString &comment )
{
}
void
-Core::setBody( const QString &body )
+Core::setBody( const TQString &body )
{
m_currentEditor->setText( body );
}
void
-Core::addAttachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp )
+Core::addAttachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp )
{
}
diff --git a/libkdepim/komposer/core/core.h b/libkdepim/komposer/core/core.h
index 0c5149610..3719b912c 100644
--- a/libkdepim/komposer/core/core.h
+++ b/libkdepim/komposer/core/core.h
@@ -25,7 +25,7 @@
#include "komposerIface.h"
#include <kmainwindow.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
namespace KSettings {
class Dialog;
@@ -46,21 +46,21 @@ namespace Komposer
{
Q_OBJECT
public:
- Core( QWidget *parentWidget = 0, const char *name = 0 );
+ Core( TQWidget *parentWidget = 0, const char *name = 0 );
virtual ~Core();
public slots:
virtual void send( int how );
- virtual void addAttachment( const KURL &url, const QString &comment );
- virtual void setBody( const QString &body );
- virtual void addAttachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp );
+ virtual void addAttachment( const KURL &url, const TQString &comment );
+ virtual void setBody( const TQString &body );
+ virtual void addAttachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp );
@@ -92,7 +92,7 @@ namespace Komposer
void addPlugin( Komposer::Plugin *plugin );
private:
- QWidgetStack *m_stack;
+ TQWidgetStack *m_stack;
Editor *m_currentEditor;
PluginManager *m_pluginManager;
diff --git a/libkdepim/komposer/core/corewidget.cpp b/libkdepim/komposer/core/corewidget.cpp
index 74fa92375..c65893766 100644
--- a/libkdepim/komposer/core/corewidget.cpp
+++ b/libkdepim/komposer/core/corewidget.cpp
@@ -24,8 +24,8 @@
using namespace Komposer;
-CoreWidget::CoreWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+CoreWidget::CoreWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
}
diff --git a/libkdepim/komposer/core/corewidget.h b/libkdepim/komposer/core/corewidget.h
index b4166d8a0..8b07a0a7a 100644
--- a/libkdepim/komposer/core/corewidget.h
+++ b/libkdepim/komposer/core/corewidget.h
@@ -24,7 +24,7 @@
#include "attachment.h"
-#include <qwidget.h>
+#include <tqwidget.h>
namespace Komposer
{
@@ -33,14 +33,14 @@ namespace Komposer
{
Q_OBJECT
public:
- CoreWidget( QWidget *parent, const char *name=0 );
+ CoreWidget( TQWidget *parent, const char *name=0 );
- virtual QString subject() const =0;
- virtual QStringList to() const =0;
- virtual QStringList cc() const =0;
- virtual QStringList bcc() const =0;
- virtual QString from() const =0;
- virtual QString replyTo() const =0;
+ virtual TQString subject() const =0;
+ virtual TQStringList to() const =0;
+ virtual TQStringList cc() const =0;
+ virtual TQStringList bcc() const =0;
+ virtual TQString from() const =0;
+ virtual TQString replyTo() const =0;
virtual AttachmentList attachments() const =0;
};
}
diff --git a/libkdepim/komposer/core/editor.cpp b/libkdepim/komposer/core/editor.cpp
index 2e3bfd51b..5dada393f 100644
--- a/libkdepim/komposer/core/editor.cpp
+++ b/libkdepim/komposer/core/editor.cpp
@@ -27,10 +27,10 @@ namespace Komposer {
class Editor::Private {
public:
- QString id;
+ TQString id;
};
-Editor::Editor( QObject *parent, const char *name, const QStringList &args )
+Editor::Editor( TQObject *parent, const char *name, const TQStringList &args )
: Plugin( parent, name, args ), d( new Private )
{
}
diff --git a/libkdepim/komposer/core/editor.h b/libkdepim/komposer/core/editor.h
index 3b8d601a5..a5b78915d 100644
--- a/libkdepim/komposer/core/editor.h
+++ b/libkdepim/komposer/core/editor.h
@@ -25,7 +25,7 @@
#include "plugin.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KParts {
class Part;
@@ -50,14 +50,14 @@ namespace Komposer {
* This is the magic function that all derivatives have to reimplement.
* It returns the actual editor component.
*/
- virtual QWidget *widget() =0;
+ virtual TQWidget *widget() =0;
int supportedTextFormats() const;
/**
* Returns the full text inside the editor.
*/
- virtual QString text() const =0;
+ virtual TQString text() const =0;
/**
* This function is called when the plugin is selected by the user before the
@@ -66,7 +66,7 @@ namespace Komposer {
virtual void select();
/**
- * Reimplement this method and return a @ref QStringList of all config
+ * Reimplement this method and return a @ref TQStringList of all config
* modules your application part should offer via Komposer. Note that the
* part and the module will have to take care for config syncing themselves.
* Usually @p DCOP used for that purpose.
@@ -74,7 +74,7 @@ namespace Komposer {
* @note Make sure you offer the modules in the form:
* <code>"pathrelativetosettings/mysettings.desktop"</code>
*/
- virtual QStringList configModules() const { return QStringList(); }
+ virtual TQStringList configModules() const { return TQStringList(); }
public slots:
@@ -83,16 +83,16 @@ namespace Komposer {
* Most commonly used on replaying.
* If any text is present if will be deleted.
*/
- virtual void setText( const QString &txt ) =0;
+ virtual void setText( const TQString &txt ) =0;
/**
* Changes currently used signature. If no signature is present
* a new one should be appened.
*/
- virtual void changeSignature( const QString &txt ) =0;
+ virtual void changeSignature( const TQString &txt ) =0;
protected:
- Editor( QObject *parent, const char *name, const QStringList &args );
+ Editor( TQObject *parent, const char *name, const TQStringList &args );
private:
class Private;
diff --git a/libkdepim/komposer/core/komposerIface.h b/libkdepim/komposer/core/komposerIface.h
index bf8877c6a..eecab2f3a 100644
--- a/libkdepim/komposer/core/komposerIface.h
+++ b/libkdepim/komposer/core/komposerIface.h
@@ -47,12 +47,12 @@ k_dcop:
/**
Add url as attachment with a user-defined comment.
*/
- virtual void addAttachment( const KURL &url, const QString &comment) = 0;
+ virtual void addAttachment( const KURL &url, const TQString &comment) = 0;
/**
Set message body.
*/
- virtual void setBody( const QString &body ) = 0;
+ virtual void setBody( const TQString &body ) = 0;
/**
Add attachment.
@@ -66,14 +66,14 @@ k_dcop:
@param paramValue Value of parameter of content type
@param contDisp Content disposition
*/
- virtual void addAttachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp ) = 0;
+ virtual void addAttachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp ) = 0;
public:
KomposerIface( const char *name )
: DCOPObject( name )
diff --git a/libkdepim/komposer/core/plugin.cpp b/libkdepim/komposer/core/plugin.cpp
index 5706b0d08..41af47cd9 100644
--- a/libkdepim/komposer/core/plugin.cpp
+++ b/libkdepim/komposer/core/plugin.cpp
@@ -24,7 +24,7 @@
#include "core.h"
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace Komposer
{
@@ -35,8 +35,8 @@ public:
//Core* core;
};
-Plugin::Plugin( QObject *parent, const char *name, const QStringList & )
- : QObject( parent, name ), d( new Private )
+Plugin::Plugin( TQObject *parent, const char *name, const TQStringList & )
+ : TQObject( parent, name ), d( new Private )
{
//d->core = core;
}
diff --git a/libkdepim/komposer/core/plugin.h b/libkdepim/komposer/core/plugin.h
index 402a7bc81..2dddd09f4 100644
--- a/libkdepim/komposer/core/plugin.h
+++ b/libkdepim/komposer/core/plugin.h
@@ -22,14 +22,14 @@
#ifndef KOMPOSER_PLUGIN_H
#define KOMPOSER_PLUGIN_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
namespace Komposer
{
class Core;
- class Plugin : public QObject,
+ class Plugin : public TQObject,
virtual public KXMLGUIClient
{
Q_OBJECT
@@ -37,7 +37,7 @@ namespace Komposer
virtual ~Plugin();
signals:
- void statusMessage( const QString & );
+ void statusMessage( const TQString & );
void readyForUnload();
protected slots:
@@ -63,7 +63,7 @@ namespace Komposer
Core *core() const;
protected:
friend class PluginManager;
- Plugin( QObject *parent, const char *name, const QStringList& args = QStringList() );
+ Plugin( TQObject *parent, const char *name, const TQStringList& args = TQStringList() );
private:
class Private;
diff --git a/libkdepim/komposer/core/pluginmanager.cpp b/libkdepim/komposer/core/pluginmanager.cpp
index 82e7f0e9b..c7cf74927 100644
--- a/libkdepim/komposer/core/pluginmanager.cpp
+++ b/libkdepim/komposer/core/pluginmanager.cpp
@@ -24,11 +24,11 @@
#include "plugin.h"
-#include <qapplication.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qvaluestack.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqvaluestack.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -48,11 +48,11 @@ class PluginManager::Private
{
public:
// All available plugins, regardless of category, and loaded or not
- QValueList<KPluginInfo*> plugins;
+ TQValueList<KPluginInfo*> plugins;
// Dict of all currently loaded plugins, mapping the KPluginInfo to
// a plugin
- QMap<KPluginInfo*, Plugin*> loadedPlugins;
+ TQMap<KPluginInfo*, Plugin*> loadedPlugins;
// The plugin manager's mode. The mode is StartingUp until loadAllPlugins()
// has finished loading the plugins, after which it is set to Running.
@@ -63,11 +63,11 @@ public:
KSharedConfig::Ptr config;
// Plugins pending for loading
- QValueStack<QString> pluginsToLoad;
+ TQValueStack<TQString> pluginsToLoad;
};
-PluginManager::PluginManager( QObject *parent )
- : QObject( parent )
+PluginManager::PluginManager( TQObject *parent )
+ : TQObject( parent )
{
d = new Private;
@@ -79,11 +79,11 @@ PluginManager::PluginManager( QObject *parent )
d->shutdownMode = Private::StartingUp;
KSettings::Dispatcher::self()->registerInstance( KGlobal::instance(),
- this, SLOT( loadAllPlugins() ) );
+ this, TQT_SLOT( loadAllPlugins() ) );
d->plugins = KPluginInfo::fromServices(
- KTrader::self()->query( QString::fromLatin1( "Komposer/Plugin" ),
- QString::fromLatin1( "[X-Komposer-Version] == 1" ) ) );
+ KTrader::self()->query( TQString::fromLatin1( "Komposer/Plugin" ),
+ TQString::fromLatin1( "[X-Komposer-Version] == 1" ) ) );
}
PluginManager::~PluginManager()
@@ -100,11 +100,11 @@ PluginManager::~PluginManager()
}
// Quick cleanup of the remaining plugins, hope it helps
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); /* EMPTY */ )
{
// Remove causes the iterator to become invalid, so pre-increment first
- QMap<KPluginInfo*, Plugin*>::ConstIterator nextIt( it );
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator nextIt( it );
++nextIt;
kdWarning() << k_funcinfo << "Deleting stale plugin '"
<< it.data()->name() << "'" << endl;
@@ -115,14 +115,14 @@ PluginManager::~PluginManager()
delete d;
}
-QValueList<KPluginInfo*>
-PluginManager::availablePlugins( const QString &category ) const
+TQValueList<KPluginInfo*>
+PluginManager::availablePlugins( const TQString &category ) const
{
if ( category.isEmpty() )
return d->plugins;
- QValueList<KPluginInfo*> result;
- QValueList<KPluginInfo*>::ConstIterator it;
+ TQValueList<KPluginInfo*> result;
+ TQValueList<KPluginInfo*>::ConstIterator it;
for ( it = d->plugins.begin(); it != d->plugins.end(); ++it )
{
if ( ( *it )->category() == category )
@@ -132,11 +132,11 @@ PluginManager::availablePlugins( const QString &category ) const
return result;
}
-QMap<KPluginInfo*, Plugin*>
-PluginManager::loadedPlugins( const QString &category ) const
+TQMap<KPluginInfo*, Plugin*>
+PluginManager::loadedPlugins( const TQString &category ) const
{
- QMap<KPluginInfo*, Plugin*> result;
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*> result;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( category.isEmpty() || it.key()->category() == category )
@@ -158,27 +158,27 @@ PluginManager::shutdown()
if ( d->loadedPlugins.empty() ) {
d->shutdownMode = Private::DoneShutdown;
} else {
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); /* EMPTY */ )
{
// Remove causes the iterator to become invalid, so pre-increment first
- QMap<KPluginInfo*, Plugin*>::ConstIterator nextIt( it );
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator nextIt( it );
++nextIt;
it.data()->aboutToUnload();
it = nextIt;
}
}
- QTimer::singleShot( 3000, this, SLOT(slotShutdownTimeout()) );
+ TQTimer::singleShot( 3000, this, TQT_SLOT(slotShutdownTimeout()) );
}
void
PluginManager::slotPluginReadyForUnload()
{
- // Using QObject::sender() is on purpose here, because otherwise all
+ // Using TQObject::sender() is on purpose here, because otherwise all
// plugins would have to pass 'this' as parameter, which makes the API
// less clean for plugin authors
- Plugin* plugin = dynamic_cast<Plugin*>( const_cast<QObject*>( sender() ) );
+ Plugin* plugin = dynamic_cast<Plugin*>( const_cast<TQObject*>( sender() ) );
if ( !plugin )
{
kdWarning() << k_funcinfo << "Calling object is not a plugin!" << endl;
@@ -198,14 +198,14 @@ PluginManager::slotShutdownTimeout()
return;
#ifndef NDEBUG
- QStringList remaining;
- for ( QMap<KPluginInfo*, Plugin*>::ConstIterator it = d->loadedPlugins.begin();
+ TQStringList remaining;
+ for ( TQMap<KPluginInfo*, Plugin*>::ConstIterator it = d->loadedPlugins.begin();
it != d->loadedPlugins.end(); ++it )
remaining.append( it.key()->pluginName() );
kdWarning() << k_funcinfo << "Some plugins didn't shutdown in time!" << endl
<< "Remaining plugins: "
- << remaining.join( QString::fromLatin1( ", " ) ) << endl
+ << remaining.join( TQString::fromLatin1( ", " ) ) << endl
<< "Forcing Komposer shutdown now." << endl;
#endif
@@ -228,19 +228,19 @@ PluginManager::loadAllPlugins()
if ( !d->config )
d->config = KSharedConfig::openConfig( "komposerrc" );
- QMap<QString, QString> entries = d->config->entryMap(
- QString::fromLatin1( "Plugins" ) );
+ TQMap<TQString, TQString> entries = d->config->entryMap(
+ TQString::fromLatin1( "Plugins" ) );
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString>::Iterator it;
for ( it = entries.begin(); it != entries.end(); ++it )
{
- QString key = it.key();
- if ( key.endsWith( QString::fromLatin1( "Enabled" ) ) )
+ TQString key = it.key();
+ if ( key.endsWith( TQString::fromLatin1( "Enabled" ) ) )
{
key.setLength( key.length() - 7 );
//kdDebug() << k_funcinfo << "Set " << key << " to " << it.data() << endl;
- if ( it.data() == QString::fromLatin1( "true" ) )
+ if ( it.data() == TQString::fromLatin1( "true" ) )
{
if ( !plugin( key ) )
d->pluginsToLoad.push( key );
@@ -257,7 +257,7 @@ PluginManager::loadAllPlugins()
}
// Schedule the plugins to load
- QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) );
}
void PluginManager::slotLoadNextPlugin()
@@ -272,31 +272,31 @@ void PluginManager::slotLoadNextPlugin()
return;
}
- QString key = d->pluginsToLoad.pop();
+ TQString key = d->pluginsToLoad.pop();
loadPluginInternal( key );
// Schedule the next run unconditionally to avoid code duplication on the
// allPluginsLoaded() signal's handling. This has the added benefit that
// the signal is delayed one event loop, so the accounts are more likely
// to be instantiated.
- QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) );
}
Plugin*
-PluginManager::loadPlugin( const QString &pluginId,
+PluginManager::loadPlugin( const TQString &pluginId,
PluginLoadMode mode /* = LoadSync */ )
{
if ( mode == LoadSync ) {
return loadPluginInternal( pluginId );
} else {
d->pluginsToLoad.push( pluginId );
- QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) );
return 0;
}
}
Plugin*
-PluginManager::loadPluginInternal( const QString &pluginId )
+PluginManager::loadPluginInternal( const TQString &pluginId )
{
KPluginInfo* info = infoForPluginId( pluginId );
if ( !info ) {
@@ -310,18 +310,18 @@ PluginManager::loadPluginInternal( const QString &pluginId )
int error = 0;
Plugin *plugin = KParts::ComponentFactory::createInstanceFromQuery<Komposer::Plugin>(
- QString::fromLatin1( "Komposer/Plugin" ),
- QString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ),
- this, 0, QStringList(), &error );
+ TQString::fromLatin1( "Komposer/Plugin" ),
+ TQString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ),
+ this, 0, TQStringList(), &error );
if ( plugin ) {
d->loadedPlugins.insert( info, plugin );
info->setPluginEnabled( true );
- connect( plugin, SIGNAL(destroyed(QObject*)),
- this, SLOT(slotPluginDestroyed(QObject*)) );
- connect( plugin, SIGNAL(readyForUnload()),
- this, SLOT(slotPluginReadyForUnload()) );
+ connect( plugin, TQT_SIGNAL(destroyed(TQObject*)),
+ this, TQT_SLOT(slotPluginDestroyed(TQObject*)) );
+ connect( plugin, TQT_SIGNAL(readyForUnload()),
+ this, TQT_SLOT(slotPluginReadyForUnload()) );
kdDebug() << k_funcinfo << "Successfully loaded plugin '"
<< pluginId << "'" << endl;
@@ -365,9 +365,9 @@ PluginManager::loadPluginInternal( const QString &pluginId )
}
bool
-PluginManager::unloadPlugin( const QString &spec )
+PluginManager::unloadPlugin( const TQString &spec )
{
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.key()->pluginName() == spec )
@@ -381,9 +381,9 @@ PluginManager::unloadPlugin( const QString &spec )
}
void
-PluginManager::slotPluginDestroyed( QObject *plugin )
+PluginManager::slotPluginDestroyed( TQObject *plugin )
{
- QMap<KPluginInfo*, Plugin*>::Iterator it;
+ TQMap<KPluginInfo*, Plugin*>::Iterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.data() == plugin )
@@ -397,12 +397,12 @@ PluginManager::slotPluginDestroyed( QObject *plugin )
{
// Use a timer to make sure any pending deleteLater() calls have
// been handled first
- QTimer::singleShot( 0, this, SLOT(slotShutdownDone()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotShutdownDone()) );
}
}
Plugin*
-PluginManager::plugin( const QString &pluginId ) const
+PluginManager::plugin( const TQString &pluginId ) const
{
KPluginInfo *info = infoForPluginId( pluginId );
if ( !info )
@@ -417,46 +417,46 @@ PluginManager::plugin( const QString &pluginId ) const
QString
PluginManager::pluginName( const Plugin *plugin ) const
{
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.data() == plugin )
return it.key()->name();
}
- return QString::fromLatin1( "Unknown" );
+ return TQString::fromLatin1( "Unknown" );
}
QString
PluginManager::pluginId( const Plugin *plugin ) const
{
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.data() == plugin )
return it.key()->pluginName();
}
- return QString::fromLatin1( "unknown" );
+ return TQString::fromLatin1( "unknown" );
}
QString
PluginManager::pluginIcon( const Plugin *plugin ) const
{
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.data() == plugin )
return it.key()->icon();
}
- return QString::fromLatin1( "Unknown" );
+ return TQString::fromLatin1( "Unknown" );
}
KPluginInfo*
-PluginManager::infoForPluginId( const QString &pluginId ) const
+PluginManager::infoForPluginId( const TQString &pluginId ) const
{
- QValueList<KPluginInfo*>::ConstIterator it;
+ TQValueList<KPluginInfo*>::ConstIterator it;
for ( it = d->plugins.begin(); it != d->plugins.end(); ++it )
{
if ( ( *it )->pluginName() == pluginId )
@@ -467,7 +467,7 @@ PluginManager::infoForPluginId( const QString &pluginId ) const
}
bool
-PluginManager::setPluginEnabled( const QString &pluginId, bool enabled /* = true */ )
+PluginManager::setPluginEnabled( const TQString &pluginId, bool enabled /* = true */ )
{
if ( !d->config )
d->config = KSharedConfig::openConfig( "komposerrc" );
@@ -478,7 +478,7 @@ PluginManager::setPluginEnabled( const QString &pluginId, bool enabled /* = true
if ( !infoForPluginId( pluginId ) )
return false;
- d->config->writeEntry( pluginId + QString::fromLatin1( "Enabled" ), enabled );
+ d->config->writeEntry( pluginId + TQString::fromLatin1( "Enabled" ), enabled );
d->config->sync();
return true;
diff --git a/libkdepim/komposer/core/pluginmanager.h b/libkdepim/komposer/core/pluginmanager.h
index b19f8ad27..179cf48de 100644
--- a/libkdepim/komposer/core/pluginmanager.h
+++ b/libkdepim/komposer/core/pluginmanager.h
@@ -24,11 +24,11 @@
#ifndef KOMPOSER_PLUGINMANAGER_H
#define KOMPOSER_PLUGINMANAGER_H
-#include <qmap.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
class KPluginInfo;
@@ -42,7 +42,7 @@ namespace Komposer
Q_OBJECT
public:
- PluginManager( QObject * );
+ PluginManager( TQObject * );
~PluginManager();
@@ -56,16 +56,16 @@ namespace Komposer
* You can query all information on the plugins through the @ref KPluginInfo
* interface.
*/
- QValueList<KPluginInfo*> availablePlugins( const QString &category
- = QString::null ) const;
+ TQValueList<KPluginInfo*> availablePlugins( const TQString &category
+ = TQString::null ) const;
/**
* Returns a list of all plugins that are actually loaded.
* If you omit the category you get all, otherwise it's a filtered list.
* See also @ref availablePlugins().
*/
- QMap<KPluginInfo*, Plugin*> loadedPlugins( const QString &category
- = QString::null ) const;
+ TQMap<KPluginInfo*, Plugin*> loadedPlugins( const TQString &category
+ = TQString::null ) const;
/**
* @brief Search by plugin name. This is the key used as X-KDE-PluginInfo-Name
@@ -78,7 +78,7 @@ namespace Komposer
* which returns
* the pointer to the plugin if it's already loaded.
*/
- Plugin* plugin( const QString &pluginName ) const;
+ Plugin* plugin( const TQString &pluginName ) const;
/**
* @brief Return the short user-visible name of the plugin.
@@ -87,7 +87,7 @@ namespace Komposer
*
* @return The name of the protocol, in the user's locale.
*/
- QString pluginName( const Plugin *plugin ) const;
+ TQString pluginName( const Plugin *plugin ) const;
/**
* @brief Return the internal name of the plugin.
@@ -97,12 +97,12 @@ namespace Komposer
*
* @return The name of the protocol, in the user's locale.
*/
- QString pluginId( const Plugin *plugin ) const;
+ TQString pluginId( const Plugin *plugin ) const;
/**
* @brief Unload the plugin specified by @p pluginName
*/
- bool unloadPlugin( const QString &pluginName );
+ bool unloadPlugin( const TQString &pluginName );
/**
* @brief Retrieve the name of the icon for a @ref Plugin.
@@ -110,7 +110,7 @@ namespace Komposer
* @return An empty string if the given plugin is not loaded
* or the filename of the icon to use.
*/
- QString pluginIcon( const Plugin *plugin ) const;
+ TQString pluginIcon( const Plugin *plugin ) const;
/**
* Shuts down the plugin manager on Komposer shutdown, but first
@@ -138,7 +138,7 @@ namespace Komposer
*
* Returns false when no appropriate plugin can be found.
*/
- bool setPluginEnabled( const QString &name, bool enabled = true );
+ bool setPluginEnabled( const TQString &name, bool enabled = true );
/**
* Plugin loading mode. Used by @loadPlugin. Code that doesn't want to block
@@ -158,7 +158,7 @@ namespace Komposer
*
* See also @ref plugin().
*/
- Plugin* loadPlugin( const QString &pluginId, PluginLoadMode mode = LoadSync );
+ Plugin* loadPlugin( const TQString &pluginId, PluginLoadMode mode = LoadSync );
/**
* @brief Loads all the enabled plugins. Also used to reread the
@@ -197,7 +197,7 @@ namespace Komposer
/**
* @brief Cleans up some references if the plugin is destroyed
*/
- void slotPluginDestroyed( QObject *plugin );
+ void slotPluginDestroyed( TQObject *plugin );
/**
* shutdown() starts a timer, when it fires we force all plugins
@@ -231,7 +231,7 @@ namespace Komposer
* Called by @ref loadPlugin directly or through the queue for async plugin
* loading.
*/
- Plugin *loadPluginInternal( const QString &pluginId );
+ Plugin *loadPluginInternal( const TQString &pluginId );
/**
* @internal
@@ -240,7 +240,7 @@ namespace Komposer
*
* Returns a null pointer when no plugin info is found.
*/
- KPluginInfo *infoForPluginId( const QString &pluginId ) const;
+ KPluginInfo *infoForPluginId( const TQString &pluginId ) const;
private:
class Private;
Private *d;
diff --git a/libkdepim/komposer/core/prefsmodule.cpp b/libkdepim/komposer/core/prefsmodule.cpp
index b907154c4..7dd1673e9 100644
--- a/libkdepim/komposer/core/prefsmodule.cpp
+++ b/libkdepim/komposer/core/prefsmodule.cpp
@@ -27,24 +27,24 @@
#include <klocale.h>
#include <ktrader.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
#include <kdepimmacros.h>
extern "C"
{
- KDE_EXPORT KCModule *create_komposerconfig( QWidget *parent, const char * ) {
+ KDE_EXPORT KCModule *create_komposerconfig( TQWidget *parent, const char * ) {
return new Komposer::PrefsModule( parent, "komposerprefs" );
}
}
using namespace Komposer;
-PrefsModule::PrefsModule( QWidget *parent, const char *name )
+PrefsModule::PrefsModule( TQWidget *parent, const char *name )
: KPrefsModule( Komposer::Prefs::self(), parent, name )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this );
EditorSelection *editors = new EditorSelection( i18n( "Editors" ),
Komposer::Prefs::self()->m_activeEditor,
@@ -70,26 +70,26 @@ PrefsModule::aboutData() const
}
-EditorSelection::EditorSelection( const QString &text, QString &reference,
- QWidget *parent )
+EditorSelection::EditorSelection( const TQString &text, TQString &reference,
+ TQWidget *parent )
: m_reference( reference )
{
- m_box = new QGroupBox( 0, Qt::Vertical, text, parent );
- QVBoxLayout *boxLayout = new QVBoxLayout( m_box->layout() );
+ m_box = new TQGroupBox( 0, Qt::Vertical, text, parent );
+ TQVBoxLayout *boxLayout = new TQVBoxLayout( m_box->layout() );
boxLayout->setAlignment( Qt::AlignTop );
m_editorsCombo = new KComboBox( m_box );
boxLayout->addWidget( m_editorsCombo );
- connect( m_editorsCombo, SIGNAL(activated(const QString&)),
- SLOT(slotActivated(const QString&)) );
+ connect( m_editorsCombo, TQT_SIGNAL(activated(const TQString&)),
+ TQT_SLOT(slotActivated(const TQString&)) );
}
EditorSelection::~EditorSelection()
{
}
-QGroupBox*
+TQGroupBox*
EditorSelection::groupBox() const
{
return m_box;
@@ -101,14 +101,14 @@ EditorSelection::readConfig()
m_editorsCombo->clear();
KTrader::OfferList editors = KTrader::self()->query(
- QString::fromLatin1( "Komposer/Editor" ) );
+ TQString::fromLatin1( "Komposer/Editor" ) );
KTrader::OfferList::ConstIterator it;
int i = 0;
for ( it = editors.begin(); it != editors.end(); ++it, ++i ) {
- if ( !(*it)->hasServiceType( QString::fromLatin1( "Komposer/Editor" ) ) )
+ if ( !(*it)->hasServiceType( TQString::fromLatin1( "Komposer/Editor" ) ) )
continue;
- QString name = (*it)->property( "X-KDE-KomposerIdentifier" ).toString();
+ TQString name = (*it)->property( "X-KDE-KomposerIdentifier" ).toString();
m_editorsCombo->insertItem( name );
if ( m_reference.contains( name ) )
m_editorsCombo->setCurrentItem( i );
@@ -122,14 +122,14 @@ void EditorSelection::writeConfig()
}
void
-EditorSelection::slotActivated( const QString &editor )
+EditorSelection::slotActivated( const TQString &editor )
{
if ( !editor.isEmpty() )
emit changed();
}
void
-EditorSelection::setItem( const QString &str )
+EditorSelection::setItem( const TQString &str )
{
for ( int i = 0; i < m_editorsCombo->count(); ++i ) {
if ( m_editorsCombo->text( i ) == str ) {
diff --git a/libkdepim/komposer/core/prefsmodule.h b/libkdepim/komposer/core/prefsmodule.h
index 95ad3eef4..640bb0f10 100644
--- a/libkdepim/komposer/core/prefsmodule.h
+++ b/libkdepim/komposer/core/prefsmodule.h
@@ -23,7 +23,7 @@
#include <kprefsdialog.h>
#include <kservice.h>
-#include <qmap.h>
+#include <tqmap.h>
class QGroupBox;
class QListViewItem;
@@ -36,7 +36,7 @@ namespace Komposer {
{
Q_OBJECT
public:
- PrefsModule( QWidget *parent=0, const char *name=0 );
+ PrefsModule( TQWidget *parent=0, const char *name=0 );
virtual const KAboutData *aboutData() const;
};
@@ -45,25 +45,25 @@ namespace Komposer {
Q_OBJECT
public:
- EditorSelection( const QString &text, QString &reference, QWidget *parent );
+ EditorSelection( const TQString &text, TQString &reference, TQWidget *parent );
~EditorSelection();
void readConfig();
void writeConfig();
- QGroupBox *groupBox() const;
+ TQGroupBox *groupBox() const;
private slots:
- void slotActivated( const QString & );
+ void slotActivated( const TQString & );
private:
- void setItem( const QString & );
+ void setItem( const TQString & );
private:
- QString &m_reference;
+ TQString &m_reference;
- QGroupBox *m_box;
+ TQGroupBox *m_box;
KComboBox *m_editorsCombo;
- QMap<QString, KService::Ptr> m_services;
+ TQMap<TQString, KService::Ptr> m_services;
};
}
diff --git a/libkdepim/komposer/core/tests/managertest.cpp b/libkdepim/komposer/core/tests/managertest.cpp
index feec64599..487a84c59 100644
--- a/libkdepim/komposer/core/tests/managertest.cpp
+++ b/libkdepim/komposer/core/tests/managertest.cpp
@@ -23,8 +23,8 @@
#include "pluginmanager.h"
using namespace Komposer;
-ManagerTest::ManagerTest( QObject* parent )
- : QObject( parent )
+ManagerTest::ManagerTest( TQObject* parent )
+ : TQObject( parent )
{
m_manager = new PluginManager( this );
}
diff --git a/libkdepim/komposer/core/tests/managertest.h b/libkdepim/komposer/core/tests/managertest.h
index 0148b29a8..397bfaf01 100644
--- a/libkdepim/komposer/core/tests/managertest.h
+++ b/libkdepim/komposer/core/tests/managertest.h
@@ -21,19 +21,19 @@
#ifndef MANAGERTEST_H
#define MANAGERTEST_H
-#include <qobject.h>
+#include <tqobject.h>
#include "tester.h"
namespace Komposer {
class PluginManager;
}
-class ManagerTest : public QObject,
+class ManagerTest : public TQObject,
public Tester
{
Q_OBJECT
public:
- ManagerTest( QObject* parent = 0 );
+ ManagerTest( TQObject* parent = 0 );
public slots:
void allTests();
diff --git a/libkdepim/komposer/core/tests/tester.cpp b/libkdepim/komposer/core/tests/tester.cpp
index 7fe8a90b2..b32c89644 100644
--- a/libkdepim/komposer/core/tests/tester.cpp
+++ b/libkdepim/komposer/core/tests/tester.cpp
@@ -21,8 +21,8 @@
#include "tester.h"
-Tester::Tester( QObject* parent )
- : QObject( parent )
+Tester::Tester( TQObject* parent )
+ : TQObject( parent )
{
}
diff --git a/libkdepim/komposer/core/tests/tester.h b/libkdepim/komposer/core/tests/tester.h
index 74ebd80d0..5981d681d 100644
--- a/libkdepim/komposer/core/tests/tester.h
+++ b/libkdepim/komposer/core/tests/tester.h
@@ -22,7 +22,7 @@
#define TESTER_H
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#define CHECK( x, y ) check( __FILE__, __LINE__, #x, x, y )
@@ -42,7 +42,7 @@ public:
int testsFailed() const {
return m_errorList.count();
}
- QStringList errorList() const {
+ TQStringList errorList() const {
return m_errorList;
}
@@ -52,8 +52,8 @@ protected:
const T& result, const T& expectedResult )
{
if ( result != expectedResult ) {
- QString error;
- QTextStream ts( &error, IO_WriteOnly );
+ TQString error;
+ TQTextStream ts( &error, IO_WriteOnly );
ts << file << "["<< line <<"]:"
<<" failed on \""<< str <<"\""
<< "\ntests:\t\t result = "
@@ -64,7 +64,7 @@ protected:
++m_tests;
}
private:
- QStringList m_errorList;
+ TQStringList m_errorList;
int m_tests;
};
diff --git a/libkdepim/komposer/core/tests/testfactory.h b/libkdepim/komposer/core/tests/testfactory.h
index 588941d8e..9354e52ad 100644
--- a/libkdepim/komposer/core/tests/testfactory.h
+++ b/libkdepim/komposer/core/tests/testfactory.h
@@ -23,7 +23,7 @@
#include "managertest.h"
-#include <qasciidict.h>
+#include <tqasciidict.h>
#define ADD_TEST(x) addTest( #x, new x )
@@ -40,15 +40,15 @@ public:
{
int result = 0;
kdDebug()<<"Running tests..."<<endl;
- QAsciiDictIterator<Tester> it( m_tests );
+ TQAsciiDictIterator<Tester> it( m_tests );
for( ; it.current(); ++it ) {
Tester* test = it.current();
test->allTests();
- QStringList errorList = test->errorList();
+ TQStringList errorList = test->errorList();
if ( !errorList.empty() ) {
++result;
kdDebug()<< it.currentKey() <<" errors:" << endl;
- for ( QStringList::Iterator itr = errorList.begin();
+ for ( TQStringList::Iterator itr = errorList.begin();
itr != errorList.end(); ++itr ) {
kdDebug()<< "\t" << (*itr).latin1() <<endl;;
}
@@ -65,7 +65,7 @@ public:
m_tests.insert( name, test );
}
private:
- QAsciiDict<Tester> m_tests;
+ TQAsciiDict<Tester> m_tests;
};
#endif
diff --git a/libkdepim/komposer/core/tests/testmanager.cpp b/libkdepim/komposer/core/tests/testmanager.cpp
index d73fb6e8c..8895cfe9e 100644
--- a/libkdepim/komposer/core/tests/testmanager.cpp
+++ b/libkdepim/komposer/core/tests/testmanager.cpp
@@ -11,19 +11,19 @@
using namespace Komposer;
-TestManager::TestManager( QObject *parent )
- : QObject( parent )
+TestManager::TestManager( TQObject *parent )
+ : TQObject( parent )
{
m_manager = new PluginManager( this );
- connect( m_manager, SIGNAL(pluginLoaded(Plugin*)),
- SLOT(slotPluginLoaded(Plugin*)) );
- connect( m_manager, SIGNAL(allPluginsLoaded()),
- SLOT(slotAllPluginsLoaded()) );
+ connect( m_manager, TQT_SIGNAL(pluginLoaded(Plugin*)),
+ TQT_SLOT(slotPluginLoaded(Plugin*)) );
+ connect( m_manager, TQT_SIGNAL(allPluginsLoaded()),
+ TQT_SLOT(slotAllPluginsLoaded()) );
m_manager->loadAllPlugins();
- QValueList<KPluginInfo*> plugins = m_manager->availablePlugins();
+ TQValueList<KPluginInfo*> plugins = m_manager->availablePlugins();
kdDebug()<<"Number of available plugins is "<< plugins.count() <<endl;
- for ( QValueList<KPluginInfo*>::iterator it = plugins.begin(); it != plugins.end(); ++it ) {
+ for ( TQValueList<KPluginInfo*>::iterator it = plugins.begin(); it != plugins.end(); ++it ) {
KPluginInfo *i = ( *it );
kdDebug()<<"\tAvailable plugin "<< i->name()
<<", comment = "<< i->comment() <<endl;
diff --git a/libkdepim/komposer/core/tests/testmanager.h b/libkdepim/komposer/core/tests/testmanager.h
index 3bb805966..c5ff8517d 100644
--- a/libkdepim/komposer/core/tests/testmanager.h
+++ b/libkdepim/komposer/core/tests/testmanager.h
@@ -1,7 +1,7 @@
#ifndef TESTMANAGER_H
#define TESTMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
namespace Komposer {
class Plugin;
@@ -13,7 +13,7 @@ class TestManager : public QObject
{
Q_OBJECT
public:
- TestManager( QObject *parent );
+ TestManager( TQObject *parent );
public slots:
void slotPluginLoaded( Plugin *plugin );
diff --git a/libkdepim/komposer/plugins/default/defaulteditor.cpp b/libkdepim/komposer/plugins/default/defaulteditor.cpp
index d08fbee5e..b8abf17be 100644
--- a/libkdepim/komposer/plugins/default/defaulteditor.cpp
+++ b/libkdepim/komposer/plugins/default/defaulteditor.cpp
@@ -39,19 +39,19 @@
#include <kreplacedialog.h>
#include <kreplace.h>
-#include <qtextedit.h>
-#include <qwidget.h>
+#include <tqtextedit.h>
+#include <tqwidget.h>
typedef KGenericFactory<DefaultEditor> DefaultEditorFactory;
K_EXPORT_COMPONENT_FACTORY( libkomposer_defaulteditor,
DefaultEditorFactory( "komposer_defaulteditor" ) )
-DefaultEditor::DefaultEditor( QObject *parent, const char *name, const QStringList &args )
+DefaultEditor::DefaultEditor( TQObject *parent, const char *name, const TQStringList &args )
: Editor( parent, name, args ), m_textEdit( 0 )
{
setInstance( DefaultEditorFactory::instance() );
- m_textEdit = new QTextEdit( 0 );
+ m_textEdit = new TQTextEdit( 0 );
createActions( actionCollection() );
@@ -63,7 +63,7 @@ DefaultEditor::~DefaultEditor()
}
-QWidget*
+TQWidget*
DefaultEditor::widget()
{
return m_textEdit;
@@ -76,18 +76,18 @@ DefaultEditor::text() const
}
void
-DefaultEditor::setText( const QString &text )
+DefaultEditor::setText( const TQString &text )
{
m_textEdit->setText( text );
}
void
-DefaultEditor::changeSignature( const QString &sig )
+DefaultEditor::changeSignature( const TQString &sig )
{
- QString text = m_textEdit->text();
+ TQString text = m_textEdit->text();
int sigStart = text.findRev( "-- " );
- QString sigText = QString( "-- \n%1" ).arg( sig );
+ TQString sigText = TQString( "-- \n%1" ).arg( sig );
text.replace( sigStart, text.length(), sigText );
}
@@ -98,71 +98,71 @@ DefaultEditor::createActions( KActionCollection *ac )
//
// File Actions
//
- (void) KStdAction::open( this, SLOT(open()), ac );
- (void) KStdAction::openRecent( this, SLOT(openURL(const KURL &)), ac );
- (void) KStdAction::save( this, SLOT(save()), ac );
- (void) KStdAction::saveAs( this, SLOT(saveAs()), ac );
+ (void) KStdAction::open( this, TQT_SLOT(open()), ac );
+ (void) KStdAction::openRecent( this, TQT_SLOT(openURL(const KURL &)), ac );
+ (void) KStdAction::save( this, TQT_SLOT(save()), ac );
+ (void) KStdAction::saveAs( this, TQT_SLOT(saveAs()), ac );
//
// Edit Actions
//
- KAction *actionUndo = KStdAction::undo( m_textEdit, SLOT(undo()), ac );
+ KAction *actionUndo = KStdAction::undo( m_textEdit, TQT_SLOT(undo()), ac );
actionUndo->setEnabled( false );
- connect( m_textEdit, SIGNAL(undoAvailable(bool)),
- actionUndo, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(undoAvailable(bool)),
+ actionUndo, TQT_SLOT(setEnabled(bool)) );
- KAction *actionRedo = KStdAction::redo( m_textEdit, SLOT(redo()), ac );
+ KAction *actionRedo = KStdAction::redo( m_textEdit, TQT_SLOT(redo()), ac );
actionRedo->setEnabled( false );
- connect( m_textEdit, SIGNAL(redoAvailable(bool)),
- actionRedo, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(redoAvailable(bool)),
+ actionRedo, TQT_SLOT(setEnabled(bool)) );
- KAction *action_cut = KStdAction::cut( m_textEdit, SLOT(cut()), ac );
+ KAction *action_cut = KStdAction::cut( m_textEdit, TQT_SLOT(cut()), ac );
action_cut->setEnabled( false );
- connect( m_textEdit, SIGNAL(copyAvailable(bool)),
- action_cut, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(copyAvailable(bool)),
+ action_cut, TQT_SLOT(setEnabled(bool)) );
- KAction *action_copy = KStdAction::copy( m_textEdit, SLOT(copy()), ac );
+ KAction *action_copy = KStdAction::copy( m_textEdit, TQT_SLOT(copy()), ac );
action_copy->setEnabled( false );
- connect( m_textEdit, SIGNAL(copyAvailable(bool)),
- action_copy, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(copyAvailable(bool)),
+ action_copy, TQT_SLOT(setEnabled(bool)) );
- (void) KStdAction::print( this, SLOT(print()), ac );
+ (void) KStdAction::print( this, TQT_SLOT(print()), ac );
- (void) KStdAction::paste( m_textEdit, SLOT(paste()), ac );
+ (void) KStdAction::paste( m_textEdit, TQT_SLOT(paste()), ac );
(void) new KAction( i18n( "C&lear" ), 0,
- m_textEdit, SLOT(removeSelectedText()),
+ m_textEdit, TQT_SLOT(removeSelectedText()),
ac, "edit_clear" );
- (void) KStdAction::selectAll( m_textEdit, SLOT(selectAll()), ac );
+ (void) KStdAction::selectAll( m_textEdit, TQT_SLOT(selectAll()), ac );
//
// View Actions
//
- (void) KStdAction::zoomIn( m_textEdit, SLOT(zoomIn()), ac );
- (void) KStdAction::zoomOut( m_textEdit, SLOT(zoomOut()), ac );
+ (void) KStdAction::zoomIn( m_textEdit, TQT_SLOT(zoomIn()), ac );
+ (void) KStdAction::zoomOut( m_textEdit, TQT_SLOT(zoomOut()), ac );
//
// Character Formatting
//
m_actionBold = new KToggleAction( i18n("&Bold"), "text_bold", CTRL+Key_B,
ac, "format_bold" );
- connect( m_actionBold, SIGNAL(toggled(bool)),
- m_textEdit, SLOT(setBold(bool)) );
+ connect( m_actionBold, TQT_SIGNAL(toggled(bool)),
+ m_textEdit, TQT_SLOT(setBold(bool)) );
m_actionItalic = new KToggleAction( i18n("&Italic"), "text_italic", CTRL+Key_I,
ac, "format_italic" );
- connect( m_actionItalic, SIGNAL(toggled(bool)),
- m_textEdit, SLOT(setItalic(bool) ));
+ connect( m_actionItalic, TQT_SIGNAL(toggled(bool)),
+ m_textEdit, TQT_SLOT(setItalic(bool) ));
m_actionUnderline = new KToggleAction( i18n("&Underline"), "text_under", CTRL+Key_U,
ac, "format_underline" );
- connect( m_actionUnderline, SIGNAL(toggled(bool)),
- m_textEdit, SLOT(setUnderline(bool)) );
+ connect( m_actionUnderline, TQT_SIGNAL(toggled(bool)),
+ m_textEdit, TQT_SLOT(setUnderline(bool)) );
(void) new KAction( i18n("Text &Color..."), "colorpicker", 0,
- this, SLOT(formatColor()),
+ this, TQT_SLOT(formatColor()),
ac, "format_color" );
//
@@ -170,37 +170,37 @@ DefaultEditor::createActions( KActionCollection *ac )
//
m_actionFont = new KFontAction( i18n("&Font"), 0,
ac, "format_font" );
- connect( m_actionFont, SIGNAL(activated(const QString &)),
- m_textEdit, SLOT(setFamily(const QString &)) );
+ connect( m_actionFont, TQT_SIGNAL(activated(const TQString &)),
+ m_textEdit, TQT_SLOT(setFamily(const TQString &)) );
m_actionFontSize = new KFontSizeAction( i18n("Font &Size"), 0,
ac, "format_font_size" );
- connect( m_actionFontSize, SIGNAL(fontSizeChanged(int)),
- m_textEdit, SLOT(setPointSize(int)) );
+ connect( m_actionFontSize, TQT_SIGNAL(fontSizeChanged(int)),
+ m_textEdit, TQT_SLOT(setPointSize(int)) );
//
// Alignment
//
m_actionAlignLeft = new KToggleAction( i18n("Align &Left"), "text_left", 0,
ac, "format_align_left" );
- connect( m_actionAlignLeft, SIGNAL(toggled(bool)),
- this, SLOT(setAlignLeft(bool)) );
+ connect( m_actionAlignLeft, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignLeft(bool)) );
m_actionAlignCenter = new KToggleAction( i18n("Align &Center"), "text_center", 0,
ac, "format_align_center" );
- connect( m_actionAlignCenter, SIGNAL(toggled(bool)),
- this, SLOT(setAlignCenter(bool)) );
+ connect( m_actionAlignCenter, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignCenter(bool)) );
m_actionAlignRight = new KToggleAction( i18n("Align &Right"), "text_right", 0,
ac, "format_align_right" );
- connect( m_actionAlignRight, SIGNAL(toggled(bool)),
- this, SLOT(setAlignRight(bool)) );
+ connect( m_actionAlignRight, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignRight(bool)) );
m_actionAlignJustify = new KToggleAction( i18n("&Justify"), "text_block", 0,
ac, "format_align_justify" );
- connect( m_actionAlignJustify, SIGNAL(toggled(bool)),
- this, SLOT(setAlignJustify(bool)) );
+ connect( m_actionAlignJustify, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignJustify(bool)) );
m_actionAlignLeft->setExclusiveGroup( "alignment" );
m_actionAlignCenter->setExclusiveGroup( "alignment" );
@@ -210,19 +210,19 @@ DefaultEditor::createActions( KActionCollection *ac )
//
// Tools
//
- (void) KStdAction::spelling( this, SLOT(checkSpelling()), ac );
+ (void) KStdAction::spelling( this, TQT_SLOT(checkSpelling()), ac );
//
// Setup enable/disable
//
updateActions();
- connect( m_textEdit, SIGNAL(currentFontChanged(const QFont &)),
- this, SLOT( updateFont() ) );
- connect( m_textEdit, SIGNAL(currentFontChanged(const QFont &)),
- this, SLOT(updateCharFmt()) );
- connect( m_textEdit, SIGNAL(cursorPositionChanged(int, int)),
- this, SLOT(updateAligment()) );
+ connect( m_textEdit, TQT_SIGNAL(currentFontChanged(const TQFont &)),
+ this, TQT_SLOT( updateFont() ) );
+ connect( m_textEdit, TQT_SIGNAL(currentFontChanged(const TQFont &)),
+ this, TQT_SLOT(updateCharFmt()) );
+ connect( m_textEdit, TQT_SIGNAL(cursorPositionChanged(int, int)),
+ this, TQT_SLOT(updateAligment()) );
}
void
@@ -275,10 +275,10 @@ DefaultEditor::updateFont()
void
DefaultEditor::formatColor()
{
- QColor col;
+ TQColor col;
int s = KColorDialog::getColor( col, m_textEdit->color(), m_textEdit );
- if ( s != QDialog::Accepted )
+ if ( s != TQDialog::Accepted )
return;
m_textEdit->setColor( col );
@@ -343,7 +343,7 @@ DefaultEditor::saveAs()
void
DefaultEditor::checkSpelling()
{
- QString s;
+ TQString s;
if ( m_textEdit->hasSelectedText() )
s = m_textEdit->selectedText();
else
diff --git a/libkdepim/komposer/plugins/default/defaulteditor.h b/libkdepim/komposer/plugins/default/defaulteditor.h
index 18f47d147..158109e1e 100644
--- a/libkdepim/komposer/plugins/default/defaulteditor.h
+++ b/libkdepim/komposer/plugins/default/defaulteditor.h
@@ -35,14 +35,14 @@ class DefaultEditor : public Komposer::Editor
{
Q_OBJECT
public:
- DefaultEditor( QObject *parent, const char *name, const QStringList &args );
+ DefaultEditor( TQObject *parent, const char *name, const TQStringList &args );
~DefaultEditor();
- virtual QWidget *widget();
- virtual QString text() const;
+ virtual TQWidget *widget();
+ virtual TQString text() const;
public slots:
- virtual void setText( const QString &txt );
- virtual void changeSignature( const QString &txt );
+ virtual void setText( const TQString &txt );
+ virtual void changeSignature( const TQString &txt );
/**
* Displays a file dialog and loads the selected file.
@@ -99,7 +99,7 @@ protected slots:
void updateAligment();
private:
- QTextEdit *m_textEdit;
+ TQTextEdit *m_textEdit;
KToggleAction *m_actionBold;
KToggleAction *m_actionItalic;
diff --git a/libkdepim/komposer/test/test.cpp b/libkdepim/komposer/test/test.cpp
index 28c3344ce..5d4544d2a 100644
--- a/libkdepim/komposer/test/test.cpp
+++ b/libkdepim/komposer/test/test.cpp
@@ -27,7 +27,7 @@
#include <klocale.h>
#include <kuniqueapplication.h>
-#include <qlabel.h>
+#include <tqlabel.h>
static const char description[] =
I18N_NOOP( "KDE mail editing manager" );
diff --git a/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp b/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp
index 834418d2c..b615c40b8 100644
--- a/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp
+++ b/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp
@@ -22,14 +22,14 @@
#include <kparts/componentfactory.h>
#include <kparts/part.h>
#include <kmimetype.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kdepimmacros.h>
-KPartsGenericPart::KPartsGenericPart( QWidget* parentWidget, const char* name )
- : QWidget( parentWidget, name ), m_part( 0 )
+KPartsGenericPart::KPartsGenericPart( TQWidget* parentWidget, const char* name )
+ : TQWidget( parentWidget, name ), m_part( 0 )
{
- QVBoxLayout* layout = new QVBoxLayout( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
layout->setAutoAdd( true );
}
@@ -41,14 +41,14 @@ void KPartsGenericPart::load()
// Not sure why - but it's not really needed anyway.
if ( !kapp )
return;
- QString mimetype = m_mimetype;
+ TQString mimetype = m_mimetype;
if ( mimetype == "auto" )
mimetype == KMimeType::findByURL( m_url )->name();
if ( m_part ) {
delete m_part;
}
// "this" is both the parent widget and the parent object
- m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, QString::null, this, 0, this, 0 );
+ m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, TQString::null, this, 0, this, 0 );
if ( m_part ) {
m_part->openURL( m_url );
m_part->widget()->show();
@@ -59,47 +59,47 @@ void KPartsGenericPart::load()
static const char* mykey = "KPartsGenericPart";
-QStringList KPartsWidgetPlugin::keys() const {
- return QStringList() << mykey;
+TQStringList KPartsWidgetPlugin::keys() const {
+ return TQStringList() << mykey;
}
-QWidget * KPartsWidgetPlugin::create( const QString & key, QWidget * parent, const char * name ) {
+TQWidget * KPartsWidgetPlugin::create( const TQString & key, TQWidget * parent, const char * name ) {
if ( key == mykey )
return new KPartsGenericPart( parent, name );
return 0;
}
-QString KPartsWidgetPlugin::group( const QString & key ) const {
+TQString KPartsWidgetPlugin::group( const TQString & key ) const {
if ( key == mykey )
return "Display (KDE)";
- return QString::null;
+ return TQString::null;
}
#if 0
-QIconSet KPartsWidgetPlugin::iconSet( const QString & key ) const {
- return QIconSet();
+TQIconSet KPartsWidgetPlugin::iconSet( const TQString & key ) const {
+ return TQIconSet();
}
#endif
-QString KPartsWidgetPlugin::includeFile( const QString & key ) const {
+TQString KPartsWidgetPlugin::includeFile( const TQString & key ) const {
if ( key == mykey )
return "partplugin.h";
- return QString::null;
+ return TQString::null;
}
-QString KPartsWidgetPlugin::toolTip( const QString & key ) const {
+TQString KPartsWidgetPlugin::toolTip( const TQString & key ) const {
if ( key == mykey )
return "Generic KParts viewer";
- return QString::null;
+ return TQString::null;
}
-QString KPartsWidgetPlugin::whatsThis( const QString & key ) const {
+TQString KPartsWidgetPlugin::whatsThis( const TQString & key ) const {
if ( key == mykey )
return "A widget to embed any KParts viewer, given a url and optionally a mimetype";
- return QString::null;
+ return TQString::null;
}
-bool KPartsWidgetPlugin::isContainer( const QString & /*key*/ ) const {
+bool KPartsWidgetPlugin::isContainer( const TQString & /*key*/ ) const {
return false;
}
diff --git a/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h b/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h
index 798053cac..5df3db240 100644
--- a/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h
+++ b/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h
@@ -21,50 +21,50 @@
#ifndef DESIGNER_PARTPLUGIN_H
#define DESIGNER_PARTPLUGIN_H
-#include <qwidgetplugin.h>
-#include <qwidget.h>
+#include <tqwidgetplugin.h>
+#include <tqwidget.h>
namespace KParts { class ReadOnlyPart; }
/**
* Generic part loader, able to view any kind of file for which
* a KParts::ReadOnlyPart is available
*/
-class KPartsGenericPart : public QWidget {
+class KPartsGenericPart : public TQWidget {
Q_OBJECT
- Q_PROPERTY( QString url READ url WRITE setURL )
- Q_PROPERTY( QString mimetype READ mimetype WRITE setMimetype )
+ Q_PROPERTY( TQString url READ url WRITE setURL )
+ Q_PROPERTY( TQString mimetype READ mimetype WRITE setMimetype )
public:
- KPartsGenericPart( QWidget* parentWidget, const char* name );
+ KPartsGenericPart( TQWidget* parentWidget, const char* name );
- QString url() const { return m_url; }
- void setURL( const QString& url ) { m_url = url; load(); }
+ TQString url() const { return m_url; }
+ void setURL( const TQString& url ) { m_url = url; load(); }
// The mimetype, or "auto" if unknown
- QString mimetype() const { return m_mimetype; }
- void setMimetype( const QString& mimetype ) { m_mimetype = mimetype; load(); }
+ TQString mimetype() const { return m_mimetype; }
+ void setMimetype( const TQString& mimetype ) { m_mimetype = mimetype; load(); }
private:
void load();
private:
- QString m_mimetype;
- QString m_url;
+ TQString m_mimetype;
+ TQString m_url;
KParts::ReadOnlyPart* m_part;
};
/**
* Qt designer plugin for embedding a KParts using KPartsGenericPart
*/
-class KPartsWidgetPlugin : public QWidgetPlugin {
+class KPartsWidgetPlugin : public TQWidgetPlugin {
public:
- QStringList keys() const;
- QWidget * create( const QString & key, QWidget * parent, const char * name );
- QString group( const QString & key ) const;
- //QIconSet iconSet( const QString & key ) const;
- QString includeFile( const QString & key ) const;
- QString toolTip( const QString & key ) const;
- QString whatsThis( const QString & key ) const;
- bool isContainer( const QString & key ) const;
+ TQStringList keys() const;
+ TQWidget * create( const TQString & key, TQWidget * parent, const char * name );
+ TQString group( const TQString & key ) const;
+ //TQIconSet iconSet( const TQString & key ) const;
+ TQString includeFile( const TQString & key ) const;
+ TQString toolTip( const TQString & key ) const;
+ TQString whatsThis( const TQString & key ) const;
+ bool isContainer( const TQString & key ) const;
};
#endif
diff --git a/libkdepim/kpimprefs.cpp b/libkdepim/kpimprefs.cpp
index 1de00f921..730ed8f52 100644
--- a/libkdepim/kpimprefs.cpp
+++ b/libkdepim/kpimprefs.cpp
@@ -25,7 +25,7 @@
#include <unistd.h>
#include <stdlib.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kstandarddirs.h>
#include <kglobal.h>
@@ -35,7 +35,7 @@
#include "kpimprefs.h"
-KPimPrefs::KPimPrefs( const QString &name )
+KPimPrefs::KPimPrefs( const TQString &name )
: KConfigSkeleton( name )
{
}
@@ -59,14 +59,14 @@ void KPimPrefs::usrReadConfig()
mCustomCategories.sort();
}
-const QString KPimPrefs::timezone()
+const TQString KPimPrefs::timezone()
{
- QString zone = "";
+ TQString zone = "";
// Read TimeZoneId from korganizerrc.
KConfig korgcfg( locate( "config", "korganizerrc" ) );
korgcfg.setGroup( "Time & Date" );
- QString tz( korgcfg.readEntry( "TimeZoneId" ) );
+ TQString tz( korgcfg.readEntry( "TimeZoneId" ) );
if ( !tz.isEmpty() ) {
zone = tz;
kdDebug(5300) << "timezone from korganizerrc is " << zone << endl;
@@ -78,7 +78,7 @@ const QString KPimPrefs::timezone()
int len = readlink( "/etc/localtime", zonefilebuf, PATH_MAX );
if ( len > 0 && len < PATH_MAX ) {
- zone = QString::fromLocal8Bit( zonefilebuf, len );
+ zone = TQString::fromLocal8Bit( zonefilebuf, len );
zone = zone.mid( zone.find( "zoneinfo/" ) + 9 );
kdDebug(5300) << "system timezone from /etc/localtime is " << zone
<< endl;
@@ -92,10 +92,10 @@ const QString KPimPrefs::timezone()
return( zone );
}
-QDateTime KPimPrefs::utcToLocalTime( const QDateTime &_dt,
- const QString &timeZoneId )
+TQDateTime KPimPrefs::utcToLocalTime( const TQDateTime &_dt,
+ const TQString &timeZoneId )
{
- QDateTime dt(_dt);
+ TQDateTime dt(_dt);
// kdDebug() << "--- UTC: " << dt.toString() << endl;
int yearCorrection = 0;
@@ -112,7 +112,7 @@ QDateTime KPimPrefs::utcToLocalTime( const QDateTime &_dt,
// kdDebug() << "--- Adjusted UTC: " << dt.toString() << endl;
}
- QCString origTz = getenv("TZ");
+ TQCString origTz = getenv("TZ");
setenv( "TZ", "UTC", 1 );
time_t utcTime = dt.toTime_t();
@@ -127,18 +127,18 @@ QDateTime KPimPrefs::utcToLocalTime( const QDateTime &_dt,
}
tzset();
- QDateTime result( QDate( local->tm_year + 1900 - yearCorrection,
+ TQDateTime result( TQDate( local->tm_year + 1900 - yearCorrection,
local->tm_mon + 1, local->tm_mday ),
- QTime( local->tm_hour, local->tm_min, local->tm_sec ) );
+ TQTime( local->tm_hour, local->tm_min, local->tm_sec ) );
// kdDebug() << "--- LOCAL: " << result.toString() << endl;
return result;
}
-QDateTime KPimPrefs::localTimeToUtc( const QDateTime &_dt,
- const QString &timeZoneId )
+TQDateTime KPimPrefs::localTimeToUtc( const TQDateTime &_dt,
+ const TQString &timeZoneId )
{
- QDateTime dt(_dt);
+ TQDateTime dt(_dt);
// kdDebug() << "--- LOCAL: " << dt.toString() << endl;
int yearCorrection = 0;
@@ -156,7 +156,7 @@ QDateTime KPimPrefs::localTimeToUtc( const QDateTime &_dt,
// kdDebug() << "--- Adjusted LOCAL: " << dt.toString() << endl;
}
- QCString origTz = getenv("TZ");
+ TQCString origTz = getenv("TZ");
setenv( "TZ", timeZoneId.local8Bit(), 1 );
time_t localTime = dt.toTime_t();
@@ -171,9 +171,9 @@ QDateTime KPimPrefs::localTimeToUtc( const QDateTime &_dt,
}
tzset();
- QDateTime result( QDate( utc->tm_year + 1900 - yearCorrection,
+ TQDateTime result( TQDate( utc->tm_year + 1900 - yearCorrection,
utc->tm_mon + 1, utc->tm_mday ),
- QTime( utc->tm_hour, utc->tm_min, utc->tm_sec ) );
+ TQTime( utc->tm_hour, utc->tm_min, utc->tm_sec ) );
// kdDebug() << "--- UTC: " << result.toString() << endl;
diff --git a/libkdepim/kpimprefs.h b/libkdepim/kpimprefs.h
index 086c37524..7fcfbd0f8 100644
--- a/libkdepim/kpimprefs.h
+++ b/libkdepim/kpimprefs.h
@@ -21,7 +21,7 @@
#ifndef KPIMPREFS_H
#define KPIMPREFS_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kconfigskeleton.h>
#include <kdepimmacros.h>
@@ -31,7 +31,7 @@ class QString;
class KDE_EXPORT KPimPrefs : public KConfigSkeleton
{
public:
- KPimPrefs( const QString &name = QString::null );
+ KPimPrefs( const TQString &name = TQString::null );
virtual ~KPimPrefs();
@@ -60,24 +60,24 @@ class KDE_EXPORT KPimPrefs : public KConfigSkeleton
*
* @see Calendar
*/
- static const QString timezone();
+ static const TQString timezone();
/**
Convert time given in UTC to local time at timezone specified by given
timezone id.
*/
- static QDateTime utcToLocalTime( const QDateTime &dt,
- const QString &timeZoneId );
+ static TQDateTime utcToLocalTime( const TQDateTime &dt,
+ const TQString &timeZoneId );
/**
Convert time given in local time at timezone specified by given
timezone id to UTC.
*/
- static QDateTime localTimeToUtc( const QDateTime &dt,
- const QString &timeZoneId );
+ static TQDateTime localTimeToUtc( const TQDateTime &dt,
+ const TQString &timeZoneId );
public:
- QStringList mCustomCategories;
+ TQStringList mCustomCategories;
protected:
virtual void setCategoryDefaults() {}
diff --git a/libkdepim/kpimurlrequesterdlg.cpp b/libkdepim/kpimurlrequesterdlg.cpp
index 6982d1f51..553ca659f 100644
--- a/libkdepim/kpimurlrequesterdlg.cpp
+++ b/libkdepim/kpimurlrequesterdlg.cpp
@@ -24,8 +24,8 @@
#include <klocale.h>
// KDE3.4 or KDE4.0: FIXME: Move to kdelibs!
-KURL KPimURLRequesterDlg::getURL( const QString& dir, const QString &label,
- QWidget *parent, const QString& caption )
+KURL KPimURLRequesterDlg::getURL( const TQString& dir, const TQString &label,
+ TQWidget *parent, const TQString& caption )
{
KURLRequesterDlg dlg(dir, label, parent, "filedialog", true);
diff --git a/libkdepim/kpimurlrequesterdlg.h b/libkdepim/kpimurlrequesterdlg.h
index 714183cd7..c770fd24d 100644
--- a/libkdepim/kpimurlrequesterdlg.h
+++ b/libkdepim/kpimurlrequesterdlg.h
@@ -22,7 +22,7 @@
#include <kdepimmacros.h>
#include <kurl.h>
-#include <qstring.h>
+#include <tqstring.h>
class QWidget;
@@ -37,10 +37,10 @@ class KDE_EXPORT KPimURLRequesterDlg
* @param text The text to be shown on the label.
* @param parent The widget the dialog will be centered on initially.
*/
- static KURL getURL( const QString &url = QString::null,
- const QString &text = QString::null,
- QWidget *parent = 0,
- const QString &caption = QString::null );
+ static KURL getURL( const TQString &url = TQString::null,
+ const TQString &text = TQString::null,
+ TQWidget *parent = 0,
+ const TQString &caption = TQString::null );
};
#endif // KPIMURLREQUESTDLG_H_INCLUDED
diff --git a/libkdepim/kpixmapregionselectordialog.cpp b/libkdepim/kpixmapregionselectordialog.cpp
index e701566f3..4766a4521 100644
--- a/libkdepim/kpixmapregionselectordialog.cpp
+++ b/libkdepim/kpixmapregionselectordialog.cpp
@@ -21,18 +21,18 @@
#include "kpixmapregionselectordialog.h"
#include <kdialogbase.h>
-#include <qdialog.h>
-#include <qdesktopwidget.h>
+#include <tqdialog.h>
+#include <tqdesktopwidget.h>
#include <klocale.h>
#include <kdialog.h>
using namespace KPIM;
-KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(QWidget *parent,
+KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(TQWidget *parent,
const char *name, bool modal ) : KDialogBase(parent, name, modal, i18n("Select Region of Image"), Help|Ok|Cancel, Ok, true )
{
- QVBox *vbox=new QVBox(this);
- new QLabel(i18n("Please click and drag on the image to select the region of interest:"), vbox);
+ TQVBox *vbox=new TQVBox(this);
+ new TQLabel(i18n("Please click and drag on the image to select the region of interest:"), vbox);
m_pixmapSelectorWidget= new KPixmapRegionSelectorWidget(vbox);
vbox->setSpacing( KDialog::spacingHint() );
@@ -44,86 +44,86 @@ KPixmapRegionSelectorDialog::~KPixmapRegionSelectorDialog()
{
}
-QRect KPixmapRegionSelectorDialog::getSelectedRegion(const QPixmap &pixmap, QWidget *parent )
+TQRect KPixmapRegionSelectorDialog::getSelectedRegion(const TQPixmap &pixmap, TQWidget *parent )
{
KPixmapRegionSelectorDialog dialog(parent);
dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap);
- QDesktopWidget desktopWidget;
- QRect screen=desktopWidget.availableGeometry();
+ TQDesktopWidget desktopWidget;
+ TQRect screen=desktopWidget.availableGeometry();
dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize(
(int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5));
int result = dialog.exec();
- QRect rect;
+ TQRect rect;
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
rect = dialog.pixmapRegionSelectorWidget()->unzoomedSelectedRegion();
return rect;
}
-QRect KPixmapRegionSelectorDialog::getSelectedRegion(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent )
+TQRect KPixmapRegionSelectorDialog::getSelectedRegion(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent )
{
KPixmapRegionSelectorDialog dialog(parent);
dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap);
dialog.pixmapRegionSelectorWidget()->setSelectionAspectRatio(aspectRatioWidth,aspectRatioHeight);
- QDesktopWidget desktopWidget;
- QRect screen=desktopWidget.availableGeometry();
+ TQDesktopWidget desktopWidget;
+ TQRect screen=desktopWidget.availableGeometry();
dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize(
(int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5));
int result = dialog.exec();
- QRect rect;
+ TQRect rect;
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
rect = dialog.pixmapRegionSelectorWidget()->unzoomedSelectedRegion();
return rect;
}
-QImage KPixmapRegionSelectorDialog::getSelectedImage(const QPixmap &pixmap, QWidget *parent )
+TQImage KPixmapRegionSelectorDialog::getSelectedImage(const TQPixmap &pixmap, TQWidget *parent )
{
KPixmapRegionSelectorDialog dialog(parent);
dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap);
- QDesktopWidget desktopWidget;
- QRect screen=desktopWidget.availableGeometry();
+ TQDesktopWidget desktopWidget;
+ TQRect screen=desktopWidget.availableGeometry();
dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize(
(int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5));
int result = dialog.exec();
- QImage image;
+ TQImage image;
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
image = dialog.pixmapRegionSelectorWidget()->selectedImage();
return image;
}
-QImage KPixmapRegionSelectorDialog::getSelectedImage(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent )
+TQImage KPixmapRegionSelectorDialog::getSelectedImage(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent )
{
KPixmapRegionSelectorDialog dialog(parent);
dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap);
dialog.pixmapRegionSelectorWidget()->setSelectionAspectRatio(aspectRatioWidth,aspectRatioHeight);
- QDesktopWidget desktopWidget;
- QRect screen=desktopWidget.availableGeometry();
+ TQDesktopWidget desktopWidget;
+ TQRect screen=desktopWidget.availableGeometry();
dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize(
(int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5));
int result = dialog.exec();
- QImage image;
+ TQImage image;
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
image = dialog.pixmapRegionSelectorWidget()->selectedImage();
return image;
diff --git a/libkdepim/kpixmapregionselectordialog.h b/libkdepim/kpixmapregionselectordialog.h
index 1108d17ef..7cc08e32a 100644
--- a/libkdepim/kpixmapregionselectordialog.h
+++ b/libkdepim/kpixmapregionselectordialog.h
@@ -24,7 +24,7 @@
#include <kdialogbase.h>
#include <libkdepim/kpixmapregionselectorwidget.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <kdepimmacros.h>
namespace KPIM {
@@ -51,7 +51,7 @@ public:
* later the setPixmap method of the KPixmapRegionSelectorWidget widget of
* the new object.
*/
- KPixmapRegionSelectorDialog(QWidget *parent=0L, const char *name=0L,
+ KPixmapRegionSelectorDialog(TQWidget *parent=0L, const char *name=0L,
bool modal = false );
/**
* The destructor of the dialog
@@ -72,7 +72,7 @@ public:
* @returns the selected rectangle, or an invalid rectangle if the user
* pressed the Cancel button.
*/
- static QRect getSelectedRegion(const QPixmap &pixmap, QWidget *parent = 0L );
+ static TQRect getSelectedRegion(const TQPixmap &pixmap, TQWidget *parent = 0L );
/**
* Creates a modal dialog, lets the user to select a region of the @p pixmap
@@ -82,7 +82,7 @@ public:
* @returns the selected rectangle, or an invalid rectangle if the user
* pressed the Cancel button.
*/
- static QRect getSelectedRegion(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent = 0L );
+ static TQRect getSelectedRegion(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = 0L );
/**
* Creates a modal dialog, lets the user to select a region of the @p pixmap
@@ -91,7 +91,7 @@ public:
* @returns the selected image, or an invalid image if the user
* pressed the Cancel button.
*/
- static QImage getSelectedImage(const QPixmap &pixmap, QWidget *parent = 0L );
+ static TQImage getSelectedImage(const TQPixmap &pixmap, TQWidget *parent = 0L );
/**
* Creates a modal dialog, lets the user to select a region of the @p pixmap
@@ -101,7 +101,7 @@ public:
* @returns the selected image, or an invalid image if the user
* pressed the Cancel button.
*/
- static QImage getSelectedImage(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent = 0L );
+ static TQImage getSelectedImage(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = 0L );
protected:
KPIM::KPixmapRegionSelectorWidget *m_pixmapSelectorWidget;
diff --git a/libkdepim/kpixmapregionselectorwidget.cpp b/libkdepim/kpixmapregionselectorwidget.cpp
index e4806da89..918d3b84c 100644
--- a/libkdepim/kpixmapregionselectorwidget.cpp
+++ b/libkdepim/kpixmapregionselectorwidget.cpp
@@ -26,31 +26,31 @@
*/
#include "kpixmapregionselectorwidget.h"
-#include <qpainter.h>
-#include <qcolor.h>
-#include <qimage.h>
-#include <qlayout.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
+#include <tqimage.h>
+#include <tqlayout.h>
#include <kimageeffect.h>
#include <kdebug.h>
#include <klocale.h>
#include <kpopupmenu.h>
#include <kaction.h>
#include <stdlib.h>
-#include <qcursor.h>
-#include <qapplication.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
using namespace KPIM;
-KPixmapRegionSelectorWidget::KPixmapRegionSelectorWidget( QWidget *parent,
- const char *name) : QWidget( parent, name)
+KPixmapRegionSelectorWidget::KPixmapRegionSelectorWidget( TQWidget *parent,
+ const char *name) : TQWidget( parent, name)
{
- QHBoxLayout * hboxLayout=new QHBoxLayout( this );
+ TQHBoxLayout * hboxLayout=new TQHBoxLayout( this );
hboxLayout->addStretch();
- QVBoxLayout * vboxLayout=new QVBoxLayout( hboxLayout );
+ TQVBoxLayout * vboxLayout=new TQVBoxLayout( hboxLayout );
vboxLayout->addStretch();
- m_label = new QLabel(this, "pixmapHolder");
+ m_label = new TQLabel(this, "pixmapHolder");
m_label->setBackgroundMode( Qt::NoBackground );
m_label->installEventFilter( this );
@@ -68,7 +68,7 @@ KPixmapRegionSelectorWidget::~KPixmapRegionSelectorWidget()
{
}
-void KPixmapRegionSelectorWidget::setPixmap( const QPixmap &pixmap )
+void KPixmapRegionSelectorWidget::setPixmap( const TQPixmap &pixmap )
{
Q_ASSERT(!pixmap.isNull()); //This class isn't designed to deal with null pixmaps.
m_originalPixmap = pixmap;
@@ -83,12 +83,12 @@ void KPixmapRegionSelectorWidget::resetSelection()
updatePixmap();
}
-QRect KPixmapRegionSelectorWidget::selectedRegion() const
+TQRect KPixmapRegionSelectorWidget::selectedRegion() const
{
return m_selectedRegion;
}
-void KPixmapRegionSelectorWidget::setSelectedRegion(const QRect &rect)
+void KPixmapRegionSelectorWidget::setSelectedRegion(const TQRect &rect)
{
if (!rect.isValid()) resetSelection();
else
@@ -96,7 +96,7 @@ void KPixmapRegionSelectorWidget::setSelectedRegion(const QRect &rect)
m_selectedRegion=rect;
updatePixmap();
- QRect r=unzoomedSelectedRegion();
+ TQRect r=unzoomedSelectedRegion();
}
}
@@ -106,7 +106,7 @@ void KPixmapRegionSelectorWidget::updatePixmap()
if (m_selectedRegion.width()>m_originalPixmap.width()) m_selectedRegion.setWidth( m_originalPixmap.width() );
if (m_selectedRegion.height()>m_originalPixmap.height()) m_selectedRegion.setHeight( m_originalPixmap.height() );
- QPainter painter;
+ TQPainter painter;
if (m_linedPixmap.isNull())
{
m_linedPixmap = m_originalPixmap;
@@ -114,21 +114,21 @@ void KPixmapRegionSelectorWidget::updatePixmap()
painter.begin(&m_linedPixmap);
painter.setRasterOp( Qt::XorROP );
painter.fillRect(0,0,m_linedPixmap.width(), m_linedPixmap.height(),
- QBrush( QColor(255,255,255), Qt::BDiagPattern) );
+ TQBrush( TQColor(255,255,255), Qt::BDiagPattern) );
painter.end();
- QImage image=m_linedPixmap.convertToImage();
- image=KImageEffect::fade(image, 0.4, QColor(0,0,0));
+ TQImage image=m_linedPixmap.convertToImage();
+ image=KImageEffect::fade(image, 0.4, TQColor(0,0,0));
m_linedPixmap.convertFromImage(image);
}
- QPixmap pixmap = m_linedPixmap;
+ TQPixmap pixmap = m_linedPixmap;
painter.begin(&pixmap);
painter.drawPixmap( m_selectedRegion.topLeft(),
m_originalPixmap, m_selectedRegion );
- painter.setPen( QColor(255,255,255) );
+ painter.setPen( TQColor(255,255,255) );
painter.setRasterOp( Qt::XorROP );
painter.drawRect( m_selectedRegion );
@@ -144,12 +144,12 @@ KPopupMenu *KPixmapRegionSelectorWidget::createPopupMenu()
popup->insertTitle(i18n("Image Operations"));
KAction *action = new KAction(i18n("&Rotate Clockwise"), "rotate_cw",
- 0, this, SLOT(rotateClockwise()),
+ 0, this, TQT_SLOT(rotateClockwise()),
popup, "rotateclockwise");
action->plug(popup);
action = new KAction(i18n("Rotate &Counterclockwise"), "rotate_ccw",
- 0, this, SLOT(rotateCounterclockwise()),
+ 0, this, TQT_SLOT(rotateCounterclockwise()),
popup, "rotatecounterclockwise");
action->plug(popup);
@@ -164,7 +164,7 @@ void KPixmapRegionSelectorWidget::rotate(KImageEffect::RotateDirection direction
{
int w=m_originalPixmap.width();
int h=m_originalPixmap.height();
- QImage img=m_unzoomedPixmap.convertToImage();
+ TQImage img=m_unzoomedPixmap.convertToImage();
img= KImageEffect::rotate(img, direction);
m_unzoomedPixmap.convertFromImage(img);
@@ -172,7 +172,7 @@ void KPixmapRegionSelectorWidget::rotate(KImageEffect::RotateDirection direction
img= KImageEffect::rotate(img, direction);
m_originalPixmap.convertFromImage(img);
- m_linedPixmap=QPixmap();
+ m_linedPixmap=TQPixmap();
if (m_forcedAspectRatio>0 && m_forcedAspectRatio!=1)
resetSelection();
@@ -211,12 +211,12 @@ void KPixmapRegionSelectorWidget::rotateCounterclockwise()
-bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev)
+bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev)
{
- if ( ev->type() == QEvent::MouseButtonPress )
+ if ( ev->type() == TQEvent::MouseButtonPress )
{
- QMouseEvent *mev= (QMouseEvent *)(ev);
- //kdDebug() << QString("click at %1,%2").arg( mev->x() ).arg( mev->y() ) << endl;
+ TQMouseEvent *mev= (TQMouseEvent *)(ev);
+ //kdDebug() << TQString("click at %1,%2").arg( mev->x() ).arg( mev->y() ) << endl;
if ( mev->button() == RightButton )
{
@@ -226,30 +226,30 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev)
return TRUE;
};
- QCursor cursor;
+ TQCursor cursor;
if ( m_selectedRegion.contains( mev->pos() )
&& m_selectedRegion!=m_originalPixmap.rect() )
{
m_state=Moving;
- cursor=QCursor(Qt::SizeAllCursor);
+ cursor=TQCursor(Qt::SizeAllCursor);
}
else
{
m_state=Resizing;
- cursor=QCursor(Qt::CrossCursor);
+ cursor=TQCursor(Qt::CrossCursor);
}
- QApplication::setOverrideCursor(cursor);
+ TQApplication::setOverrideCursor(cursor);
m_tempFirstClick=mev->pos();
return TRUE;
}
- if ( ev->type() == QEvent::MouseMove )
+ if ( ev->type() == TQEvent::MouseMove )
{
- QMouseEvent *mev= (QMouseEvent *)(ev);
+ TQMouseEvent *mev= (TQMouseEvent *)(ev);
- //kdDebug() << QString("move to %1,%2").arg( mev->x() ).arg( mev->y() ) << endl;
+ //kdDebug() << TQString("move to %1,%2").arg( mev->x() ).arg( mev->y() ) << endl;
if ( m_state == Resizing )
{
@@ -303,26 +303,26 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev)
return TRUE;
}
- if ( ev->type() == QEvent::MouseButtonRelease )
+ if ( ev->type() == TQEvent::MouseButtonRelease )
{
- QMouseEvent *mev= (QMouseEvent *)(ev);
+ TQMouseEvent *mev= (TQMouseEvent *)(ev);
if ( m_state == Resizing && mev->pos() == m_tempFirstClick)
resetSelection();
m_state=None;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return TRUE;
}
- QWidget::eventFilter(obj, ev);
+ TQWidget::eventFilter(obj, ev);
return FALSE;
}
-QRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const QPoint & startPoint, const QPoint & _endPoint )
+TQRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const TQPoint & startPoint, const TQPoint & _endPoint )
{
- QPoint endPoint = _endPoint;
+ TQPoint endPoint = _endPoint;
if ( endPoint.x() < 0 ) endPoint.setX(0);
else if ( endPoint.x() > m_originalPixmap.width() ) endPoint.setX(m_originalPixmap.width());
if ( endPoint.y() < 0 ) endPoint.setY(0);
@@ -385,20 +385,20 @@ QRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const QPoint & startP
x=startPoint.x()-w;
}
- return QRect(x,y,w,h);
+ return TQRect(x,y,w,h);
}
-QRect KPixmapRegionSelectorWidget::unzoomedSelectedRegion() const
+TQRect KPixmapRegionSelectorWidget::unzoomedSelectedRegion() const
{
- return QRect((int)(m_selectedRegion.x()/m_zoomFactor),
+ return TQRect((int)(m_selectedRegion.x()/m_zoomFactor),
(int)(m_selectedRegion.y()/m_zoomFactor),
(int)(m_selectedRegion.width()/m_zoomFactor),
(int)(m_selectedRegion.height()/m_zoomFactor));
}
-QImage KPixmapRegionSelectorWidget::selectedImage() const
+TQImage KPixmapRegionSelectorWidget::selectedImage() const
{
- QImage origImage=m_unzoomedPixmap.convertToImage();
+ TQImage origImage=m_unzoomedPixmap.convertToImage();
return origImage.copy(unzoomedSelectedRegion());
}
@@ -418,18 +418,18 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height)
m_maxHeight=height;
m_originalPixmap=m_unzoomedPixmap;
- if (m_selectedRegion == m_originalPixmap.rect()) m_selectedRegion=QRect();
+ if (m_selectedRegion == m_originalPixmap.rect()) m_selectedRegion=TQRect();
-// kdDebug() << QString(" original Pixmap :") << m_originalPixmap.rect() << endl;
-// kdDebug() << QString(" unzoomed Pixmap : %1 x %2 ").arg(m_unzoomedPixmap.width()).arg(m_unzoomedPixmap.height()) << endl;
+// kdDebug() << TQString(" original Pixmap :") << m_originalPixmap.rect() << endl;
+// kdDebug() << TQString(" unzoomed Pixmap : %1 x %2 ").arg(m_unzoomedPixmap.width()).arg(m_unzoomedPixmap.height()) << endl;
if ( !m_originalPixmap.isNull() &&
( m_originalPixmap.width() > m_maxWidth ||
m_originalPixmap.height() > m_maxHeight ) )
{
/* We have to resize the pixmap to get it complete on the screen */
- QImage image=m_originalPixmap.convertToImage();
- m_originalPixmap.convertFromImage( image.smoothScale( width, height, QImage::ScaleMin ) );
+ TQImage image=m_originalPixmap.convertToImage();
+ m_originalPixmap.convertFromImage( image.smoothScale( width, height, TQImage::ScaleMin ) );
//m_originalPixmap.convertFromImage( KImageEffect::sample( image, width, height ) );
double oldZoomFactor = m_zoomFactor;
m_zoomFactor=m_originalPixmap.width()/(double)m_unzoomedPixmap.width();
@@ -437,7 +437,7 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height)
if (m_selectedRegion.isValid())
{
m_selectedRegion=
- QRect((int)(m_selectedRegion.x()*m_zoomFactor/oldZoomFactor),
+ TQRect((int)(m_selectedRegion.x()*m_zoomFactor/oldZoomFactor),
(int)(m_selectedRegion.y()*m_zoomFactor/oldZoomFactor),
(int)(m_selectedRegion.width()*m_zoomFactor/oldZoomFactor),
(int)(m_selectedRegion.height()*m_zoomFactor/oldZoomFactor) );
@@ -446,7 +446,7 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height)
if (!m_selectedRegion.isValid()) m_selectedRegion = m_originalPixmap.rect();
- m_linedPixmap=QPixmap();
+ m_linedPixmap=TQPixmap();
updatePixmap();
resize(m_label->width(), m_label->height());
}
diff --git a/libkdepim/kpixmapregionselectorwidget.h b/libkdepim/kpixmapregionselectorwidget.h
index c9637bcec..4d92869da 100644
--- a/libkdepim/kpixmapregionselectorwidget.h
+++ b/libkdepim/kpixmapregionselectorwidget.h
@@ -22,10 +22,10 @@
#ifndef __KPIXMAPREGIONSELECTORWIDGET_H__
#define __KPIXMAPREGIONSELECTORWIDGET_H__
-#include <qvbox.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qlabel.h>
+#include <tqvbox.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqlabel.h>
#include <kimageeffect.h>
class KPopupMenu;
@@ -52,7 +52,7 @@ public:
/**
* Constructor for a KPixmapRegionSelectorWidget.
*/
- KPixmapRegionSelectorWidget( QWidget *parent = 0L, const char *name=0L);
+ KPixmapRegionSelectorWidget( TQWidget *parent = 0L, const char *name=0L);
/**
* Destructor for a KPixmapRegionSelectorWidget
@@ -63,28 +63,28 @@ public:
* Sets the pixmap which will be shown for the user to select a region from.
* @param pixmap The pixmap. Must be non-null.
*/
- void setPixmap( const QPixmap &pixmap );
+ void setPixmap( const TQPixmap &pixmap );
/**
* @return the original whole pixmap that we're using in this widget as the
* pixmap the user is selecting a region from.
*/
- QPixmap pixmap() const { return m_unzoomedPixmap; }
+ TQPixmap pixmap() const { return m_unzoomedPixmap; }
/**
* Sets the selected region to be @p rect (in zoomed pixmap coordinates)
*/
- void setSelectedRegion(const QRect &rect);
+ void setSelectedRegion(const TQRect &rect);
/**
* Returns the selected region ( in zoomed pixmap coordinates )
*/
- QRect selectedRegion() const;
+ TQRect selectedRegion() const;
/**
* Returns the selected region ( in unzoomed, original pixmap coordinates )
*/
- QRect unzoomedSelectedRegion() const;
+ TQRect unzoomedSelectedRegion() const;
/**
* Resets the selection to use the whole image
@@ -92,10 +92,10 @@ public:
void resetSelection();
/**
- * @returns a QImage object with just the region the user selected from the
+ * @returns a TQImage object with just the region the user selected from the
* image
*/
- QImage selectedImage() const;
+ TQImage selectedImage() const;
/**
* Sets the aspect ration that the selected subimage should have. The way to
@@ -144,7 +144,7 @@ protected:
private:
- bool eventFilter(QObject *obj, QEvent *ev);
+ bool eventFilter(TQObject *obj, TQEvent *ev);
/**
* Recalculates the pixmap that is shown based on the current selected area,
@@ -152,18 +152,18 @@ private:
*/
void updatePixmap();
- QRect calcSelectionRectangle( const QPoint &startPoint, const QPoint & endPoint );
+ TQRect calcSelectionRectangle( const TQPoint &startPoint, const TQPoint & endPoint );
enum CursorState { None=0, Resizing, Moving };
CursorState m_state;
- QPixmap m_unzoomedPixmap;
- QPixmap m_originalPixmap;
- QPixmap m_linedPixmap;
- QRect m_selectedRegion;
- QLabel *m_label;
+ TQPixmap m_unzoomedPixmap;
+ TQPixmap m_originalPixmap;
+ TQPixmap m_linedPixmap;
+ TQRect m_selectedRegion;
+ TQLabel *m_label;
- QPoint m_tempFirstClick;
+ TQPoint m_tempFirstClick;
double m_forcedAspectRatio;
int m_maxWidth, m_maxHeight;
diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp
index 5ab022c34..9aef645e6 100644
--- a/libkdepim/kprefsdialog.cpp
+++ b/libkdepim/kprefsdialog.cpp
@@ -21,19 +21,19 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
-#include <qlineedit.h>
-#include <qfont.h>
-#include <qspinbox.h>
-#include <qframe.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qdatetimeedit.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
+#include <tqlineedit.h>
+#include <tqfont.h>
+#include <tqspinbox.h>
+#include <tqframe.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqdatetimeedit.h>
+#include <tqwhatsthis.h>
#include <kcolorbutton.h>
#include <kdebug.h>
@@ -50,7 +50,7 @@
namespace KPrefsWidFactory {
-KPrefsWid *create( KConfigSkeletonItem *item, QWidget *parent )
+KPrefsWid *create( KConfigSkeletonItem *item, TQWidget *parent )
{
KConfigSkeleton::ItemBool *boolItem =
dynamic_cast<KConfigSkeleton::ItemBool *>( item );
@@ -67,13 +67,13 @@ KPrefsWid *create( KConfigSkeletonItem *item, QWidget *parent )
KConfigSkeleton::ItemEnum *enumItem =
dynamic_cast<KConfigSkeleton::ItemEnum *>( item );
if ( enumItem ) {
- QValueList<KConfigSkeleton::ItemEnum::Choice> choices = enumItem->choices();
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> choices = enumItem->choices();
if ( choices.isEmpty() ) {
kdError() << "KPrefsWidFactory::create(): Enum has no choices." << endl;
return 0;
} else {
KPrefsWidRadios *radios = new KPrefsWidRadios( enumItem, parent );
- QValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
+ TQValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
for( it = choices.begin(); it != choices.end(); ++it ) {
radios->addRadio( (*it).label );
}
@@ -93,19 +93,19 @@ KPrefsWid *create( KConfigSkeletonItem *item, QWidget *parent )
}
-QValueList<QWidget *> KPrefsWid::widgets() const
+TQValueList<TQWidget *> KPrefsWid::widgets() const
{
- return QValueList<QWidget *>();
+ return TQValueList<TQWidget *>();
}
-KPrefsWidBool::KPrefsWidBool( KConfigSkeleton::ItemBool *item, QWidget *parent )
+KPrefsWidBool::KPrefsWidBool( KConfigSkeleton::ItemBool *item, TQWidget *parent )
: mItem( item )
{
- mCheck = new QCheckBox( item->label(), parent);
- connect( mCheck, SIGNAL( clicked() ), SIGNAL( changed() ) );
+ mCheck = new TQCheckBox( item->label(), parent);
+ connect( mCheck, TQT_SIGNAL( clicked() ), TQT_SIGNAL( changed() ) );
if ( !item->whatsThis().isNull() ) {
- QWhatsThis::add( mCheck, item->whatsThis() );
+ TQWhatsThis::add( mCheck, item->whatsThis() );
}
}
@@ -119,37 +119,37 @@ void KPrefsWidBool::writeConfig()
mItem->setValue( mCheck->isChecked() );
}
-QCheckBox *KPrefsWidBool::checkBox()
+TQCheckBox *KPrefsWidBool::checkBox()
{
return mCheck;
}
-QValueList<QWidget *> KPrefsWidBool::widgets() const
+TQValueList<TQWidget *> KPrefsWidBool::widgets() const
{
- QValueList<QWidget *> widgets;
+ TQValueList<TQWidget *> widgets;
widgets.append( mCheck );
return widgets;
}
KPrefsWidInt::KPrefsWidInt( KConfigSkeleton::ItemInt *item,
- QWidget *parent )
+ TQWidget *parent )
: mItem( item )
{
- mLabel = new QLabel( mItem->label()+':', parent );
- mSpin = new QSpinBox( parent );
+ mLabel = new TQLabel( mItem->label()+':', parent );
+ mSpin = new TQSpinBox( parent );
if ( !item->minValue().isNull() ) {
mSpin->setMinValue( item->minValue().toInt() );
}
if ( !item->maxValue().isNull() ) {
mSpin->setMaxValue( item->maxValue().toInt() );
}
- connect( mSpin, SIGNAL( valueChanged( int ) ), SIGNAL( changed() ) );
+ connect( mSpin, TQT_SIGNAL( valueChanged( int ) ), TQT_SIGNAL( changed() ) );
mLabel->setBuddy( mSpin );
- QString whatsThis = mItem->whatsThis();
+ TQString whatsThis = mItem->whatsThis();
if ( !whatsThis.isEmpty() ) {
- QWhatsThis::add( mLabel, whatsThis );
- QWhatsThis::add( mSpin, whatsThis );
+ TQWhatsThis::add( mLabel, whatsThis );
+ TQWhatsThis::add( mSpin, whatsThis );
}
}
@@ -163,19 +163,19 @@ void KPrefsWidInt::writeConfig()
mItem->setValue( mSpin->value() );
}
-QLabel *KPrefsWidInt::label()
+TQLabel *KPrefsWidInt::label()
{
return mLabel;
}
-QSpinBox *KPrefsWidInt::spinBox()
+TQSpinBox *KPrefsWidInt::spinBox()
{
return mSpin;
}
-QValueList<QWidget *> KPrefsWidInt::widgets() const
+TQValueList<TQWidget *> KPrefsWidInt::widgets() const
{
- QValueList<QWidget *> widgets;
+ TQValueList<TQWidget *> widgets;
widgets.append( mLabel );
widgets.append( mSpin );
return widgets;
@@ -183,16 +183,16 @@ QValueList<QWidget *> KPrefsWidInt::widgets() const
KPrefsWidColor::KPrefsWidColor( KConfigSkeleton::ItemColor *item,
- QWidget *parent )
+ TQWidget *parent )
: mItem( item )
{
mButton = new KColorButton( parent );
- connect( mButton, SIGNAL( changed( const QColor & ) ), SIGNAL( changed() ) );
- mLabel = new QLabel( mButton, mItem->label()+':', parent );
+ connect( mButton, TQT_SIGNAL( changed( const TQColor & ) ), TQT_SIGNAL( changed() ) );
+ mLabel = new TQLabel( mButton, mItem->label()+':', parent );
mLabel->setBuddy( mButton );
- QString whatsThis = mItem->whatsThis();
+ TQString whatsThis = mItem->whatsThis();
if (!whatsThis.isNull()) {
- QWhatsThis::add(mButton, whatsThis);
+ TQWhatsThis::add(mButton, whatsThis);
}
}
@@ -211,7 +211,7 @@ void KPrefsWidColor::writeConfig()
mItem->setValue( mButton->color() );
}
-QLabel *KPrefsWidColor::label()
+TQLabel *KPrefsWidColor::label()
{
return mLabel;
}
@@ -223,20 +223,20 @@ KColorButton *KPrefsWidColor::button()
KPrefsWidFont::KPrefsWidFont( KConfigSkeleton::ItemFont *item,
- QWidget *parent, const QString &sampleText )
+ TQWidget *parent, const TQString &sampleText )
: mItem( item )
{
- mLabel = new QLabel( mItem->label()+':', parent );
+ mLabel = new TQLabel( mItem->label()+':', parent );
- mPreview = new QLabel( sampleText, parent );
- mPreview->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mPreview = new TQLabel( sampleText, parent );
+ mPreview->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- mButton = new QPushButton( i18n("Choose..."), parent );
- connect( mButton, SIGNAL( clicked() ), SLOT( selectFont() ) );
- QString whatsThis = mItem->whatsThis();
+ mButton = new TQPushButton( i18n("Choose..."), parent );
+ connect( mButton, TQT_SIGNAL( clicked() ), TQT_SLOT( selectFont() ) );
+ TQString whatsThis = mItem->whatsThis();
if (!whatsThis.isNull()) {
- QWhatsThis::add(mPreview, whatsThis);
- QWhatsThis::add(mButton, whatsThis);
+ TQWhatsThis::add(mPreview, whatsThis);
+ TQWhatsThis::add(mButton, whatsThis);
}
}
@@ -254,24 +254,24 @@ void KPrefsWidFont::writeConfig()
mItem->setValue( mPreview->font() );
}
-QLabel *KPrefsWidFont::label()
+TQLabel *KPrefsWidFont::label()
{
return mLabel;
}
-QFrame *KPrefsWidFont::preview()
+TQFrame *KPrefsWidFont::preview()
{
return mPreview;
}
-QPushButton *KPrefsWidFont::button()
+TQPushButton *KPrefsWidFont::button()
{
return mButton;
}
void KPrefsWidFont::selectFont()
{
- QFont myFont(mPreview->font());
+ TQFont myFont(mPreview->font());
int result = KFontDialog::getFont(myFont);
if (result == KFontDialog::Accepted) {
mPreview->setFont(myFont);
@@ -281,16 +281,16 @@ void KPrefsWidFont::selectFont()
KPrefsWidTime::KPrefsWidTime( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent )
+ TQWidget *parent )
: mItem( item )
{
- mLabel = new QLabel( mItem->label()+':', parent );
+ mLabel = new TQLabel( mItem->label()+':', parent );
mTimeEdit = new KTimeEdit( parent );
mLabel->setBuddy( mTimeEdit );
- connect( mTimeEdit, SIGNAL( timeChanged( QTime ) ), SIGNAL( changed() ) );
- QString whatsThis = mItem->whatsThis();
+ connect( mTimeEdit, TQT_SIGNAL( timeChanged( TQTime ) ), TQT_SIGNAL( changed() ) );
+ TQString whatsThis = mItem->whatsThis();
if ( !whatsThis.isNull() ) {
- QWhatsThis::add( mTimeEdit, whatsThis );
+ TQWhatsThis::add( mTimeEdit, whatsThis );
}
}
@@ -301,14 +301,14 @@ void KPrefsWidTime::readConfig()
void KPrefsWidTime::writeConfig()
{
- // Don't overwrite the date value of the QDateTime, so we can use a
+ // Don't overwrite the date value of the TQDateTime, so we can use a
// KPrefsWidTime and a KPrefsWidDate on the same config entry!
- QDateTime dt( mItem->value() );
+ TQDateTime dt( mItem->value() );
dt.setTime( mTimeEdit->getTime() );
mItem->setValue( dt );
}
-QLabel *KPrefsWidTime::label()
+TQLabel *KPrefsWidTime::label()
{
return mLabel;
}
@@ -320,20 +320,20 @@ KTimeEdit *KPrefsWidTime::timeEdit()
KPrefsWidDuration::KPrefsWidDuration( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent )
+ TQWidget *parent )
: mItem( item )
{
- mLabel = new QLabel( mItem->label()+':', parent );
+ mLabel = new TQLabel( mItem->label()+':', parent );
mTimeEdit = new QTimeEdit( parent );
mLabel->setBuddy( mTimeEdit );
mTimeEdit->setAutoAdvance( true );
mTimeEdit->setDisplay( QTimeEdit::Hours | QTimeEdit::Minutes );
- mTimeEdit->setRange( QTime( 0, 1 ), QTime( 24, 0 ) ); // [1min, 24hr]
+ mTimeEdit->setRange( TQTime( 0, 1 ), TQTime( 24, 0 ) ); // [1min, 24hr]
connect( mTimeEdit,
- SIGNAL( valueChanged( const QTime & ) ), SIGNAL( changed() ) );
- QString whatsThis = mItem->whatsThis();
+ TQT_SIGNAL( valueChanged( const TQTime & ) ), TQT_SIGNAL( changed() ) );
+ TQString whatsThis = mItem->whatsThis();
if ( !whatsThis.isNull() ) {
- QWhatsThis::add( mTimeEdit, whatsThis );
+ TQWhatsThis::add( mTimeEdit, whatsThis );
}
}
@@ -344,12 +344,12 @@ void KPrefsWidDuration::readConfig()
void KPrefsWidDuration::writeConfig()
{
- QDateTime dt( mItem->value() );
+ TQDateTime dt( mItem->value() );
dt.setTime( mTimeEdit->time() );
mItem->setValue( dt );
}
-QLabel *KPrefsWidDuration::label()
+TQLabel *KPrefsWidDuration::label()
{
return mLabel;
}
@@ -361,16 +361,16 @@ QTimeEdit *KPrefsWidDuration::timeEdit()
KPrefsWidDate::KPrefsWidDate( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent )
+ TQWidget *parent )
: mItem( item )
{
- mLabel = new QLabel( mItem->label()+':', parent );
+ mLabel = new TQLabel( mItem->label()+':', parent );
mDateEdit = new KDateEdit( parent );
mLabel->setBuddy( mDateEdit );
- connect( mDateEdit, SIGNAL( dateChanged( const QDate& ) ), SIGNAL( changed() ) );
- QString whatsThis = mItem->whatsThis();
+ connect( mDateEdit, TQT_SIGNAL( dateChanged( const TQDate& ) ), TQT_SIGNAL( changed() ) );
+ TQString whatsThis = mItem->whatsThis();
if ( !whatsThis.isNull() ) {
- QWhatsThis::add( mDateEdit, whatsThis );
+ TQWhatsThis::add( mDateEdit, whatsThis );
}
}
@@ -381,12 +381,12 @@ void KPrefsWidDate::readConfig()
void KPrefsWidDate::writeConfig()
{
- QDateTime dt( mItem->value() );
+ TQDateTime dt( mItem->value() );
dt.setDate( mDateEdit->date() );
mItem->setValue( dt );
}
-QLabel *KPrefsWidDate::label()
+TQLabel *KPrefsWidDate::label()
{
return mLabel;
}
@@ -398,26 +398,26 @@ KDateEdit *KPrefsWidDate::dateEdit()
KPrefsWidRadios::KPrefsWidRadios( KConfigSkeleton::ItemEnum *item,
- QWidget *parent )
+ TQWidget *parent )
: mItem( item )
{
- mBox = new QButtonGroup( 1, Qt::Horizontal, mItem->label(), parent );
- connect( mBox, SIGNAL( clicked( int ) ), SIGNAL( changed() ) );
+ mBox = new TQButtonGroup( 1, Qt::Horizontal, mItem->label(), parent );
+ connect( mBox, TQT_SIGNAL( clicked( int ) ), TQT_SIGNAL( changed() ) );
}
KPrefsWidRadios::~KPrefsWidRadios()
{
}
-void KPrefsWidRadios::addRadio(const QString &text, const QString &whatsThis)
+void KPrefsWidRadios::addRadio(const TQString &text, const TQString &whatsThis)
{
- QRadioButton *r = new QRadioButton(text,mBox);
+ TQRadioButton *r = new TQRadioButton(text,mBox);
if (!whatsThis.isNull()) {
- QWhatsThis::add(r, whatsThis);
+ TQWhatsThis::add(r, whatsThis);
}
}
-QButtonGroup *KPrefsWidRadios::groupBox()
+TQButtonGroup *KPrefsWidRadios::groupBox()
{
return mBox;
}
@@ -432,21 +432,21 @@ void KPrefsWidRadios::writeConfig()
mItem->setValue( mBox->id( mBox->selected() ) );
}
-QValueList<QWidget *> KPrefsWidRadios::widgets() const
+TQValueList<TQWidget *> KPrefsWidRadios::widgets() const
{
- QValueList<QWidget *> w;
+ TQValueList<TQWidget *> w;
w.append( mBox );
return w;
}
KPrefsWidCombo::KPrefsWidCombo( KConfigSkeleton::ItemEnum *item,
- QWidget *parent )
+ TQWidget *parent )
: mItem( item )
{
- QHBox *hbox = new QHBox(parent);
- new QLabel( mItem->label(), hbox );
- mCombo = new QComboBox( hbox );
- connect( mCombo, SIGNAL( activated( int ) ), SIGNAL( changed() ) );
+ TQHBox *hbox = new TQHBox(parent);
+ new TQLabel( mItem->label(), hbox );
+ mCombo = new TQComboBox( hbox );
+ connect( mCombo, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( changed() ) );
}
KPrefsWidCombo::~KPrefsWidCombo()
@@ -463,32 +463,32 @@ void KPrefsWidCombo::writeConfig()
mItem->setValue( mCombo->currentItem() );
}
-QValueList<QWidget *> KPrefsWidCombo::widgets() const
+TQValueList<TQWidget *> KPrefsWidCombo::widgets() const
{
- QValueList<QWidget *> w;
+ TQValueList<TQWidget *> w;
w.append( mCombo );
return w;
}
-QComboBox* KPrefsWidCombo::comboBox()
+TQComboBox* KPrefsWidCombo::comboBox()
{
return mCombo;
}
KPrefsWidString::KPrefsWidString( KConfigSkeleton::ItemString *item,
- QWidget *parent,
- QLineEdit::EchoMode echomode )
+ TQWidget *parent,
+ TQLineEdit::EchoMode echomode )
: mItem( item )
{
- mLabel = new QLabel( mItem->label()+':', parent );
- mEdit = new QLineEdit( parent );
+ mLabel = new TQLabel( mItem->label()+':', parent );
+ mEdit = new TQLineEdit( parent );
mLabel->setBuddy( mEdit );
- connect( mEdit, SIGNAL( textChanged( const QString & ) ),
- SIGNAL( changed() ) );
+ connect( mEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SIGNAL( changed() ) );
mEdit->setEchoMode( echomode );
- QString whatsThis = mItem->whatsThis();
+ TQString whatsThis = mItem->whatsThis();
if ( !whatsThis.isNull() ) {
- QWhatsThis::add( mEdit, whatsThis );
+ TQWhatsThis::add( mEdit, whatsThis );
}
}
@@ -506,39 +506,39 @@ void KPrefsWidString::writeConfig()
mItem->setValue( mEdit->text() );
}
-QLabel *KPrefsWidString::label()
+TQLabel *KPrefsWidString::label()
{
return mLabel;
}
-QLineEdit *KPrefsWidString::lineEdit()
+TQLineEdit *KPrefsWidString::lineEdit()
{
return mEdit;
}
-QValueList<QWidget *> KPrefsWidString::widgets() const
+TQValueList<TQWidget *> KPrefsWidString::widgets() const
{
- QValueList<QWidget *> widgets;
+ TQValueList<TQWidget *> widgets;
widgets.append( mLabel );
widgets.append( mEdit );
return widgets;
}
-KPrefsWidPath::KPrefsWidPath( KConfigSkeleton::ItemPath *item, QWidget *parent,
- const QString &filter, uint mode )
+KPrefsWidPath::KPrefsWidPath( KConfigSkeleton::ItemPath *item, TQWidget *parent,
+ const TQString &filter, uint mode )
: mItem( item )
{
- mLabel = new QLabel( mItem->label()+':', parent );
+ mLabel = new TQLabel( mItem->label()+':', parent );
mURLRequester = new KURLRequester( parent );
mLabel->setBuddy( mURLRequester );
mURLRequester->setMode( mode );
mURLRequester->setFilter( filter );
- connect( mURLRequester, SIGNAL( textChanged( const QString & ) ),
- SIGNAL( changed() ) );
- QString whatsThis = mItem->whatsThis();
+ connect( mURLRequester, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SIGNAL( changed() ) );
+ TQString whatsThis = mItem->whatsThis();
if ( !whatsThis.isNull() ) {
- QWhatsThis::add( mURLRequester, whatsThis );
+ TQWhatsThis::add( mURLRequester, whatsThis );
}
}
@@ -556,7 +556,7 @@ void KPrefsWidPath::writeConfig()
mItem->setValue( mURLRequester->url() );
}
-QLabel *KPrefsWidPath::label()
+TQLabel *KPrefsWidPath::label()
{
return mLabel;
}
@@ -566,9 +566,9 @@ KURLRequester *KPrefsWidPath::urlRequester()
return mURLRequester;
}
-QValueList<QWidget *> KPrefsWidPath::widgets() const
+TQValueList<TQWidget *> KPrefsWidPath::widgets() const
{
- QValueList<QWidget *> widgets;
+ TQValueList<TQWidget *> widgets;
widgets.append( mLabel );
widgets.append( mURLRequester );
return widgets;
@@ -590,7 +590,7 @@ void KPrefsWidManager::addWid( KPrefsWid *wid )
}
KPrefsWidBool *KPrefsWidManager::addWidBool( KConfigSkeleton::ItemBool *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidBool *w = new KPrefsWidBool( item, parent );
addWid( w );
@@ -598,7 +598,7 @@ KPrefsWidBool *KPrefsWidManager::addWidBool( KConfigSkeleton::ItemBool *item,
}
KPrefsWidTime *KPrefsWidManager::addWidTime( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidTime *w = new KPrefsWidTime( item, parent );
addWid( w );
@@ -606,7 +606,7 @@ KPrefsWidTime *KPrefsWidManager::addWidTime( KConfigSkeleton::ItemDateTime *item
}
KPrefsWidDuration *KPrefsWidManager::addWidDuration( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidDuration *w = new KPrefsWidDuration( item, parent );
addWid( w );
@@ -614,7 +614,7 @@ KPrefsWidDuration *KPrefsWidManager::addWidDuration( KConfigSkeleton::ItemDateTi
}
KPrefsWidDate *KPrefsWidManager::addWidDate( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidDate *w = new KPrefsWidDate( item, parent );
addWid( w );
@@ -622,7 +622,7 @@ KPrefsWidDate *KPrefsWidManager::addWidDate( KConfigSkeleton::ItemDateTime *item
}
KPrefsWidColor *KPrefsWidManager::addWidColor( KConfigSkeleton::ItemColor *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidColor *w = new KPrefsWidColor( item, parent );
addWid( w );
@@ -630,12 +630,12 @@ KPrefsWidColor *KPrefsWidManager::addWidColor( KConfigSkeleton::ItemColor *item,
}
KPrefsWidRadios *KPrefsWidManager::addWidRadios( KConfigSkeleton::ItemEnum *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidRadios *w = new KPrefsWidRadios( item, parent );
- QValueList<KConfigSkeleton::ItemEnum::Choice> choices;
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> choices;
choices = item->choices();
- QValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
+ TQValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
for( it = choices.begin(); it != choices.end(); ++it ) {
w->addRadio( (*it).label, (*it).whatsThis );
}
@@ -644,12 +644,12 @@ KPrefsWidRadios *KPrefsWidManager::addWidRadios( KConfigSkeleton::ItemEnum *item
}
KPrefsWidCombo *KPrefsWidManager::addWidCombo( KConfigSkeleton::ItemEnum *item,
- QWidget* parent )
+ TQWidget* parent )
{
KPrefsWidCombo *w = new KPrefsWidCombo( item, parent );
- QValueList<KConfigSkeleton::ItemEnum::Choice> choices;
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> choices;
choices = item->choices();
- QValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
+ TQValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
for( it = choices.begin(); it != choices.end(); ++it ) {
w->comboBox()->insertItem( (*it).label, -1 );
}
@@ -658,16 +658,16 @@ KPrefsWidCombo *KPrefsWidManager::addWidCombo( KConfigSkeleton::ItemEnum *item,
}
KPrefsWidString *KPrefsWidManager::addWidString( KConfigSkeleton::ItemString *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidString *w = new KPrefsWidString( item, parent,
- QLineEdit::Normal );
+ TQLineEdit::Normal );
addWid( w );
return w;
}
KPrefsWidPath *KPrefsWidManager::addWidPath( KConfigSkeleton::ItemPath *item,
- QWidget *parent, const QString &filter, uint mode )
+ TQWidget *parent, const TQString &filter, uint mode )
{
KPrefsWidPath *w = new KPrefsWidPath( item, parent, filter, mode );
addWid( w );
@@ -675,16 +675,16 @@ KPrefsWidPath *KPrefsWidManager::addWidPath( KConfigSkeleton::ItemPath *item,
}
KPrefsWidString *KPrefsWidManager::addWidPassword( KConfigSkeleton::ItemString *item,
- QWidget *parent )
+ TQWidget *parent )
{
- KPrefsWidString *w = new KPrefsWidString( item, parent, QLineEdit::Password );
+ KPrefsWidString *w = new KPrefsWidString( item, parent, TQLineEdit::Password );
addWid( w );
return w;
}
KPrefsWidFont *KPrefsWidManager::addWidFont( KConfigSkeleton::ItemFont *item,
- QWidget *parent,
- const QString &sampleText )
+ TQWidget *parent,
+ const TQString &sampleText )
{
KPrefsWidFont *w = new KPrefsWidFont( item, parent, sampleText );
addWid( w );
@@ -692,7 +692,7 @@ KPrefsWidFont *KPrefsWidManager::addWidFont( KConfigSkeleton::ItemFont *item,
}
KPrefsWidInt *KPrefsWidManager::addWidInt( KConfigSkeleton::ItemInt *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidInt *w = new KPrefsWidInt( item, parent );
addWid( w );
@@ -733,7 +733,7 @@ void KPrefsWidManager::writeWidConfig()
}
-KPrefsDialog::KPrefsDialog( KConfigSkeleton *prefs, QWidget *parent, char *name,
+KPrefsDialog::KPrefsDialog( KConfigSkeleton *prefs, TQWidget *parent, char *name,
bool modal )
: KDialogBase(IconList,i18n("Preferences"),Ok|Apply|Cancel|Default,Ok,parent,
name,modal,true),
@@ -742,8 +742,8 @@ KPrefsDialog::KPrefsDialog( KConfigSkeleton *prefs, QWidget *parent, char *name,
// TODO: This seems to cause a crash on exit. Investigate later.
// mPrefsWids.setAutoDelete(true);
-// connect(this,SIGNAL(defaultClicked()),SLOT(setDefaults()));
- connect(this,SIGNAL(cancelClicked()),SLOT(reject()));
+// connect(this,TQT_SIGNAL(defaultClicked()),TQT_SLOT(setDefaults()));
+ connect(this,TQT_SIGNAL(cancelClicked()),TQT_SLOT(reject()));
}
KPrefsDialog::~KPrefsDialog()
@@ -754,23 +754,23 @@ void KPrefsDialog::autoCreate()
{
KConfigSkeletonItem::List items = prefs()->items();
- QMap<QString,QWidget *> mGroupPages;
- QMap<QString,QGridLayout *> mGroupLayouts;
- QMap<QString,int> mCurrentRows;
+ TQMap<TQString,TQWidget *> mGroupPages;
+ TQMap<TQString,TQGridLayout *> mGroupLayouts;
+ TQMap<TQString,int> mCurrentRows;
KConfigSkeletonItem::List::ConstIterator it;
for( it = items.begin(); it != items.end(); ++it ) {
- QString group = (*it)->group();
- QString name = (*it)->name();
+ TQString group = (*it)->group();
+ TQString name = (*it)->name();
kdDebug() << "ITEMS: " << (*it)->name() << endl;
- QWidget *page;
- QGridLayout *layout;
+ TQWidget *page;
+ TQGridLayout *layout;
int currentRow;
if ( !mGroupPages.contains( group ) ) {
page = addPage( group );
- layout = new QGridLayout( page );
+ layout = new TQGridLayout( page );
mGroupPages.insert( group, page );
mGroupLayouts.insert( group, layout );
currentRow = 0;
@@ -784,7 +784,7 @@ void KPrefsDialog::autoCreate()
KPrefsWid *wid = KPrefsWidFactory::create( *it, page );
if ( wid ) {
- QValueList<QWidget *> widgets = wid->widgets();
+ TQValueList<TQWidget *> widgets = wid->widgets();
if ( widgets.count() == 1 ) {
layout->addMultiCellWidget( widgets[ 0 ],
currentRow, currentRow, 0, 1 );
@@ -796,7 +796,7 @@ void KPrefsDialog::autoCreate()
}
if ( (*it)->isImmutable() ) {
- QValueList<QWidget *>::Iterator it2;
+ TQValueList<TQWidget *>::Iterator it2;
for( it2 = widgets.begin(); it2 != widgets.end(); ++it2 ) {
(*it2)->setEnabled( false );
}
@@ -857,7 +857,7 @@ void KPrefsDialog::slotDefault()
}
-KPrefsModule::KPrefsModule( KConfigSkeleton *prefs, QWidget *parent,
+KPrefsModule::KPrefsModule( KConfigSkeleton *prefs, TQWidget *parent,
const char *name )
: KCModule( parent, name ),
KPrefsWidManager( prefs )
@@ -869,7 +869,7 @@ void KPrefsModule::addWid( KPrefsWid *wid )
{
KPrefsWidManager::addWid( wid );
- connect( wid, SIGNAL( changed() ), SLOT( slotWidChanged() ) );
+ connect( wid, TQT_SIGNAL( changed() ), TQT_SLOT( slotWidChanged() ) );
}
void KPrefsModule::slotWidChanged()
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h
index 7408d19eb..2b3d06c22 100644
--- a/libkdepim/kprefsdialog.h
+++ b/libkdepim/kprefsdialog.h
@@ -23,10 +23,10 @@
#ifndef KPREFSDIALOG_H
#define KPREFSDIALOG_H
-#include <qptrlist.h>
-#include <qlineedit.h>
-#include <qvaluelist.h>
-#include <qdatetimeedit.h>
+#include <tqptrlist.h>
+#include <tqlineedit.h>
+#include <tqvaluelist.h>
+#include <tqdatetimeedit.h>
#include <kdialogbase.h>
#include <kcmodule.h>
@@ -73,7 +73,7 @@ class KDE_EXPORT KPrefsWid : public QObject
/**
Return a list of widgets used by this control element.
*/
- virtual QValueList<QWidget *> widgets() const;
+ virtual TQValueList<TQWidget *> widgets() const;
signals:
/**
@@ -97,22 +97,22 @@ class KDE_EXPORT KPrefsWidBool : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidBool( KConfigSkeleton::ItemBool *item, QWidget *parent );
+ KPrefsWidBool( KConfigSkeleton::ItemBool *item, TQWidget *parent );
/**
Return the QCheckbox used by this control element.
*/
- QCheckBox *checkBox();
+ TQCheckBox *checkBox();
void readConfig();
void writeConfig();
- QValueList<QWidget *> widgets() const;
+ TQValueList<TQWidget *> widgets() const;
private:
KConfigSkeleton::ItemBool *mItem;
- QCheckBox *mCheck;
+ TQCheckBox *mCheck;
};
/**
@@ -132,28 +132,28 @@ class KDE_EXPORT KPrefsWidInt : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidInt( KConfigSkeleton::ItemInt *item, QWidget *parent );
+ KPrefsWidInt( KConfigSkeleton::ItemInt *item, TQWidget *parent );
/**
- Return QLabel used by this control element.
+ Return TQLabel used by this control element.
*/
- QLabel *label();
+ TQLabel *label();
/**
- Return the QSpinBox used by this control element.
+ Return the TQSpinBox used by this control element.
*/
- QSpinBox *spinBox();
+ TQSpinBox *spinBox();
void readConfig();
void writeConfig();
- QValueList<QWidget *> widgets() const;
+ TQValueList<TQWidget *> widgets() const;
private:
KConfigSkeleton::ItemInt *mItem;
- QLabel *mLabel;
- QSpinBox *mSpin;
+ TQLabel *mLabel;
+ TQSpinBox *mSpin;
};
/**
@@ -172,14 +172,14 @@ class KDE_EXPORT KPrefsWidTime : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidTime( KConfigSkeleton::ItemDateTime *item, QWidget *parent );
+ KPrefsWidTime( KConfigSkeleton::ItemDateTime *item, TQWidget *parent );
/**
- Return QLabel used by this widget.
+ Return TQLabel used by this widget.
*/
- QLabel *label();
+ TQLabel *label();
/**
- Return QSpinBox used by this widget.
+ Return TQSpinBox used by this widget.
*/
KTimeEdit *timeEdit();
@@ -189,7 +189,7 @@ class KDE_EXPORT KPrefsWidTime : public KPrefsWid
private:
KConfigSkeleton::ItemDateTime *mItem;
- QLabel *mLabel;
+ TQLabel *mLabel;
KTimeEdit *mTimeEdit;
};
@@ -210,14 +210,14 @@ class KDE_EXPORT KPrefsWidDuration : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidDuration( KConfigSkeleton::ItemDateTime *item, QWidget *parent );
+ KPrefsWidDuration( KConfigSkeleton::ItemDateTime *item, TQWidget *parent );
/**
- Return QLabel used by this widget.
+ Return TQLabel used by this widget.
*/
- QLabel *label();
+ TQLabel *label();
/**
- Return QSpinBox used by this widget.
+ Return TQSpinBox used by this widget.
*/
QTimeEdit *timeEdit();
@@ -227,7 +227,7 @@ class KDE_EXPORT KPrefsWidDuration : public KPrefsWid
private:
KConfigSkeleton::ItemDateTime *mItem;
- QLabel *mLabel;
+ TQLabel *mLabel;
QTimeEdit *mTimeEdit;
};
@@ -247,14 +247,14 @@ class KDE_EXPORT KPrefsWidDate : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidDate( KConfigSkeleton::ItemDateTime *item, QWidget *parent );
+ KPrefsWidDate( KConfigSkeleton::ItemDateTime *item, TQWidget *parent );
/**
- Return QLabel used by this widget.
+ Return TQLabel used by this widget.
*/
- QLabel *label();
+ TQLabel *label();
/**
- Return QSpinBox used by this widget.
+ Return TQSpinBox used by this widget.
*/
KDateEdit *dateEdit();
@@ -264,7 +264,7 @@ class KDE_EXPORT KPrefsWidDate : public KPrefsWid
private:
KConfigSkeleton::ItemDateTime *mItem;
- QLabel *mLabel;
+ TQLabel *mLabel;
KDateEdit *mDateEdit;
};
@@ -286,16 +286,16 @@ class KDE_EXPORT KPrefsWidColor : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidColor( KConfigSkeleton::ItemColor *item, QWidget *parent );
+ KPrefsWidColor( KConfigSkeleton::ItemColor *item, TQWidget *parent );
/**
Destruct color setting widget.
*/
~KPrefsWidColor();
/**
- Return QLabel for the button
+ Return TQLabel for the button
*/
- QLabel *label();
+ TQLabel *label();
/**
Return button opening the color dialog.
*/
@@ -307,7 +307,7 @@ class KDE_EXPORT KPrefsWidColor : public KPrefsWid
private:
KConfigSkeleton::ItemColor *mItem;
- QLabel *mLabel;
+ TQLabel *mLabel;
KColorButton *mButton;
};
@@ -330,24 +330,24 @@ class KDE_EXPORT KPrefsWidFont : public KPrefsWid
@param sampleText Sample text for previewing the selected font.
*/
KPrefsWidFont( KConfigSkeleton::ItemFont *item,
- QWidget *parent, const QString &sampleText );
+ TQWidget *parent, const TQString &sampleText );
/**
Destruct font setting widget.
*/
~KPrefsWidFont();
/**
- Return QLabel.
+ Return TQLabel.
*/
- QLabel *label();
+ TQLabel *label();
/**
- Return QFrame used as preview field.
+ Return TQFrame used as preview field.
*/
- QFrame *preview();
+ TQFrame *preview();
/**
Return button opening the font dialog.
*/
- QPushButton *button();
+ TQPushButton *button();
void readConfig();
void writeConfig();
@@ -358,9 +358,9 @@ class KDE_EXPORT KPrefsWidFont : public KPrefsWid
private:
KConfigSkeleton::ItemFont *mItem;
- QLabel *mLabel;
- QLabel *mPreview;
- QPushButton *mButton;
+ TQLabel *mLabel;
+ TQLabel *mPreview;
+ TQPushButton *mButton;
};
/**
@@ -384,7 +384,7 @@ class KDE_EXPORT KPrefsWidRadios : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidRadios( KConfigSkeleton::ItemEnum *item, QWidget *parent );
+ KPrefsWidRadios( KConfigSkeleton::ItemEnum *item, TQWidget *parent );
virtual ~KPrefsWidRadios();
/**
@@ -393,23 +393,23 @@ class KDE_EXPORT KPrefsWidRadios : public KPrefsWid
@param text Text of the button.
@param whatsThis What's This help for the button.
*/
- void addRadio( const QString &text,
- const QString &whatsThis = QString::null );
+ void addRadio( const TQString &text,
+ const TQString &whatsThis = TQString::null );
/**
Return the box widget used by this widget.
*/
- QButtonGroup *groupBox();
+ TQButtonGroup *groupBox();
void readConfig();
void writeConfig();
- QValueList<QWidget *> widgets() const;
+ TQValueList<TQWidget *> widgets() const;
private:
KConfigSkeleton::ItemEnum *mItem;
- QButtonGroup *mBox;
+ TQButtonGroup *mBox;
};
/**
@@ -432,18 +432,18 @@ class KDE_EXPORT KPrefsWidCombo : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidCombo( KConfigSkeleton::ItemEnum *item, QWidget *parent );
+ KPrefsWidCombo( KConfigSkeleton::ItemEnum *item, TQWidget *parent );
virtual ~KPrefsWidCombo();
void readConfig();
void writeConfig();
- QComboBox *comboBox();
- QValueList<QWidget *> widgets() const;
+ TQComboBox *comboBox();
+ TQValueList<TQWidget *> widgets() const;
private:
KConfigSkeleton::ItemEnum *mItem;
- QComboBox *mCombo;
+ TQComboBox *mCombo;
};
@@ -466,32 +466,32 @@ class KDE_EXPORT KPrefsWidString : public KPrefsWid
@param parent Parent widget.
@param echomode Describes how a line edit should display its contents.
*/
- KPrefsWidString( KConfigSkeleton::ItemString *item, QWidget *parent,
- QLineEdit::EchoMode echomode=QLineEdit::Normal );
+ KPrefsWidString( KConfigSkeleton::ItemString *item, TQWidget *parent,
+ TQLineEdit::EchoMode echomode=TQLineEdit::Normal );
/**
Destructor.
*/
virtual ~KPrefsWidString();
/**
- Return QLabel used by this widget.
+ Return TQLabel used by this widget.
*/
- QLabel *label();
+ TQLabel *label();
/**
- Return QLineEdit used by this widget.
+ Return TQLineEdit used by this widget.
*/
- QLineEdit *lineEdit();
+ TQLineEdit *lineEdit();
void readConfig();
void writeConfig();
- QValueList<QWidget *> widgets() const;
+ TQValueList<TQWidget *> widgets() const;
private:
KConfigSkeleton::ItemString *mItem;
- QLabel *mLabel;
- QLineEdit *mEdit;
+ TQLabel *mLabel;
+ TQLineEdit *mEdit;
};
@@ -514,31 +514,31 @@ class KDE_EXPORT KPrefsWidPath : public KPrefsWid
@param filter URLRequester filter
@param mode Describes how a line edit should display its contents.
*/
- KPrefsWidPath( KConfigSkeleton::ItemPath *item, QWidget *parent,
- const QString &filter = QString::null, uint mode = KFile::File );
+ KPrefsWidPath( KConfigSkeleton::ItemPath *item, TQWidget *parent,
+ const TQString &filter = TQString::null, uint mode = KFile::File );
/**
Destructor.
*/
virtual ~KPrefsWidPath();
/**
- Return QLabel used by this widget.
+ Return TQLabel used by this widget.
*/
- QLabel *label();
+ TQLabel *label();
/**
- Return QLineEdit used by this widget.
+ Return TQLineEdit used by this widget.
*/
KURLRequester *urlRequester();
void readConfig();
void writeConfig();
- QValueList<QWidget *> widgets() const;
+ TQValueList<TQWidget *> widgets() const;
private:
KConfigSkeleton::ItemPath *mItem;
- QLabel *mLabel;
+ TQLabel *mLabel;
KURLRequester *mURLRequester;
};
@@ -579,7 +579,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidBool *addWidBool( KConfigSkeleton::ItemBool *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidInt object.
@@ -588,7 +588,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidInt *addWidInt( KConfigSkeleton::ItemInt *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidDate object.
@@ -597,7 +597,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidDate *addWidDate( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidTime object.
@@ -606,7 +606,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidTime *addWidTime( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidDuration object.
@@ -615,7 +615,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidDuration *addWidDuration( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidColor object.
@@ -624,7 +624,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidColor *addWidColor( KConfigSkeleton::ItemColor *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidRadios object. The choices represented by the
@@ -634,7 +634,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidRadios *addWidRadios( KConfigSkeleton::ItemEnum *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidCombo object. The choices represented by the
@@ -644,7 +644,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidCombo *addWidCombo( KConfigSkeleton::ItemEnum *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidString object.
@@ -653,7 +653,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidString *addWidString( KConfigSkeleton::ItemString *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a path @ref KPrefsWidPath object.
@@ -663,18 +663,18 @@ class KDE_EXPORT KPrefsWidManager
@param filter URLRequester filter
@param mode URLRequester mode
*/
- KPrefsWidPath *addWidPath ( KConfigSkeleton::ItemPath *item, QWidget *parent,
- const QString &filter = QString::null,
+ KPrefsWidPath *addWidPath ( KConfigSkeleton::ItemPath *item, TQWidget *parent,
+ const TQString &filter = TQString::null,
uint mode = KFile::File );
/**
- Register a password @ref KPrefsWidString object, with echomode set to QLineEdit::Password.
+ Register a password @ref KPrefsWidString object, with echomode set to TQLineEdit::Password.
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
KPrefsWidString *addWidPassword ( KConfigSkeleton::ItemString *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidFont object.
@@ -685,7 +685,7 @@ class KDE_EXPORT KPrefsWidManager
@param sampleText Sample text for previewing the selected font.
*/
KPrefsWidFont *addWidFont( KConfigSkeleton::ItemFont *item,
- QWidget *parent, const QString &sampleText );
+ TQWidget *parent, const TQString &sampleText );
/** Set all widgets to default values. */
void setWidDefaults();
@@ -699,7 +699,7 @@ class KDE_EXPORT KPrefsWidManager
private:
KConfigSkeleton *mPrefs;
- QPtrList<KPrefsWid> mPrefsWids;
+ TQPtrList<KPrefsWid> mPrefsWids;
};
@@ -727,7 +727,7 @@ class KDE_EXPORT KPrefsDialog : public KDialogBase, public KPrefsWidManager
@param name Widget name.
@param modal true, if dialog has to be modal, false for non-modal.
*/
- KPrefsDialog( KConfigSkeleton *prefs, QWidget *parent = 0, char *name = 0,
+ KPrefsDialog( KConfigSkeleton *prefs, TQWidget *parent = 0, char *name = 0,
bool modal = false );
/**
Destructor.
@@ -772,7 +772,7 @@ class KDE_EXPORT KPrefsModule : public KCModule, public KPrefsWidManager
{
Q_OBJECT
public:
- KPrefsModule( KConfigSkeleton *, QWidget *parent = 0, const char *name = 0 );
+ KPrefsModule( KConfigSkeleton *, TQWidget *parent = 0, const char *name = 0 );
virtual void addWid( KPrefsWid * );
diff --git a/libkdepim/kregexp3.cpp b/libkdepim/kregexp3.cpp
index a14b446f6..6bb519e56 100644
--- a/libkdepim/kregexp3.cpp
+++ b/libkdepim/kregexp3.cpp
@@ -37,22 +37,22 @@
#include <kdebug.h>
#endif
-QString KRegExp3::replace( const QString & str,
- const QString & replacementStr,
+TQString KRegExp3::replace( const TQString & str,
+ const TQString & replacementStr,
int start, bool global )
{
int oldpos, pos;
//-------- parsing the replacementStr into
//-------- literal parts and backreferences:
- QStringList literalStrs;
- QValueList<int> backRefs;
+ TQStringList literalStrs;
+ TQValueList<int> backRefs;
// Due to LTS: The regexp in unquoted form and with spaces:
// \\ (\d) | \$ (\d) | \$ \{ (\d+) \}
- QRegExp rx( "\\\\(\\d)|\\$(\\d)|\\$\\{(\\d+)\\}" );
- QRegExp bbrx("\\\\");
- QRegExp brx("\\");
+ TQRegExp rx( "\\\\(\\d)|\\$(\\d)|\\$\\{(\\d+)\\}" );
+ TQRegExp bbrx("\\\\");
+ TQRegExp brx("\\");
#ifdef DEBUG_KREGEXP3
kdDebug() << "Analyzing replacementStr: \"" + replacementStr + "\"" << endl;
@@ -64,7 +64,7 @@ QString KRegExp3::replace( const QString & str,
pos = rx.search( replacementStr, pos );
#ifdef DEBUG_KREGEXP3
- kdDebug() << QString(" Found match at pos %1").arg(pos) << endl;
+ kdDebug() << TQString(" Found match at pos %1").arg(pos) << endl;
#endif
if ( pos < 0 ) {
@@ -80,21 +80,21 @@ QString KRegExp3::replace( const QString & str,
.replace( bbrx, "\\" )
.replace( brx, "" );
#ifdef DEBUG_KREGEXP3
- kdDebug() << QString(" Inserting \"") + literalStrs.last() + "\" as literal." << endl;
+ kdDebug() << TQString(" Inserting \"") + literalStrs.last() + "\" as literal." << endl;
kdDebug() << " Searching for corresponding digit(s):" << endl;
#endif
for ( int i = 1 ; i < 4 ; i++ )
if ( !rx.cap(i).isEmpty() ) {
backRefs << rx.cap(i).toInt();
#ifdef DEBUG_KREGEXP3
- kdDebug() << QString(" Found %1 at position %2 in the capturedTexts.")
+ kdDebug() << TQString(" Found %1 at position %2 in the capturedTexts.")
.arg(backRefs.last()).arg(i) << endl;
#endif
break;
}
pos += rx.matchedLength();
#ifdef DEBUG_KREGEXP3
- kdDebug() << QString(" Setting new pos to %1.").arg(pos) << endl;
+ kdDebug() << TQString(" Setting new pos to %1.").arg(pos) << endl;
#endif
oldpos = pos;
}
@@ -107,12 +107,12 @@ QString KRegExp3::replace( const QString & str,
//-------- actual construction of the
//-------- resulting QString
- QString result = "";
+ TQString result = "";
oldpos = 0;
pos = start;
- QStringList::Iterator sIt;
- QValueList<int>::Iterator iIt;
+ TQStringList::Iterator sIt;
+ TQValueList<int>::Iterator iIt;
if ( start < 0 )
start += str.length();
@@ -125,7 +125,7 @@ QString KRegExp3::replace( const QString & str,
pos = search( str, pos );
#ifdef DEBUG_KREGEXP3
- kdDebug() << QString(" Found match at pos %1").arg(pos) << endl;
+ kdDebug() << TQString(" Found match at pos %1").arg(pos) << endl;
#endif
if ( pos < 0 ) {
@@ -168,7 +168,7 @@ QString KRegExp3::replace( const QString & str,
}
pos += matchedLength();
#ifdef DEBUG_KREGEXP3
- kdDebug() << QString(" Setting new pos to %1.").arg(pos) << endl;
+ kdDebug() << TQString(" Setting new pos to %1.").arg(pos) << endl;
#endif
oldpos = pos;
diff --git a/libkdepim/kregexp3.h b/libkdepim/kregexp3.h
index 34473029a..40c7681d3 100644
--- a/libkdepim/kregexp3.h
+++ b/libkdepim/kregexp3.h
@@ -29,17 +29,17 @@
your version.
*/
-#include <qglobal.h>
-#include <qregexp.h>
+#include <tqglobal.h>
+#include <tqregexp.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
-/** @short A QRegExp (Qt3.x) with a replace() method.
+/** @short A TQRegExp (Qt3.x) with a replace() method.
This class is simply there to provide a namespace for some nice
- enhancements of the mighty QRegExp (Qt3 version) regular
+ enhancements of the mighty TQRegExp (Qt3 version) regular
expression engine, namely the method replace(), which can be
used to do search-and-replace like one is used to from perl or sed.
@@ -80,15 +80,15 @@ class KDE_EXPORT KRegExp3 : public QRegExp
{
public:
KRegExp3()
- : QRegExp() {}
- KRegExp3( const QString & pattern,
+ : TQRegExp() {}
+ KRegExp3( const TQString & pattern,
bool caseSensitive = TRUE,
bool wildcard = FALSE )
- : QRegExp( pattern, caseSensitive, wildcard ) {}
- KRegExp3( const QRegExp & rx )
- : QRegExp( rx ) {}
+ : TQRegExp( pattern, caseSensitive, wildcard ) {}
+ KRegExp3( const TQRegExp & rx )
+ : TQRegExp( rx ) {}
KRegExp3( const KRegExp3 & rx )
- : QRegExp( (QRegExp)rx ) {}
+ : TQRegExp( (TQRegExp)rx ) {}
/** Replaces each matching subpattern in @p str with
@p replacementStr, inserting captured substrings for
@@ -105,7 +105,7 @@ public:
Equivalent to the /g switch to perl's s/// operator.
@return The modified string.
*/
- QString replace( const QString & str,
- const QString & replacementStr,
+ TQString replace( const TQString & str,
+ const TQString & replacementStr,
int start=0, bool global=TRUE );
};
diff --git a/libkdepim/kresourceprefs.cpp b/libkdepim/kresourceprefs.cpp
index 3a745ea41..2a79cf837 100644
--- a/libkdepim/kresourceprefs.cpp
+++ b/libkdepim/kresourceprefs.cpp
@@ -19,16 +19,16 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
+#include <tqstring.h>
#include "kresourceprefs.h"
-KResourcePrefs::KResourcePrefs( const QString &name )
+KResourcePrefs::KResourcePrefs( const TQString &name )
: KConfigSkeleton( name )
{
}
-void KResourcePrefs::addGroupPrefix( const QString &prefix )
+void KResourcePrefs::addGroupPrefix( const TQString &prefix )
{
KConfigSkeletonItem::List itemList = items();
KConfigSkeletonItem::List::Iterator it;
diff --git a/libkdepim/kresourceprefs.h b/libkdepim/kresourceprefs.h
index b42b4952a..d87a55aad 100644
--- a/libkdepim/kresourceprefs.h
+++ b/libkdepim/kresourceprefs.h
@@ -38,12 +38,12 @@ class QString;
class KDE_EXPORT KResourcePrefs : public KConfigSkeleton
{
public:
- KResourcePrefs( const QString &name = QString::null );
+ KResourcePrefs( const TQString &name = TQString::null );
/**
Adds a prefix to all groups of this prefs object.
*/
- void addGroupPrefix( const QString &prefix );
+ void addGroupPrefix( const TQString &prefix );
};
#endif
diff --git a/libkdepim/krsqueezedtextlabel.cpp b/libkdepim/krsqueezedtextlabel.cpp
index 00389a2a0..c61a706b2 100644
--- a/libkdepim/krsqueezedtextlabel.cpp
+++ b/libkdepim/krsqueezedtextlabel.cpp
@@ -20,57 +20,57 @@
#include "krsqueezedtextlabel.h"
#include "kstringhandler.h"
-#include <qtooltip.h>
+#include <tqtooltip.h>
-KRSqueezedTextLabel::KRSqueezedTextLabel( const QString &text , QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
- setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+KRSqueezedTextLabel::KRSqueezedTextLabel( const TQString &text , TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
+ setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
fullText = text;
squeezeTextToLabel();
}
-KRSqueezedTextLabel::KRSqueezedTextLabel( QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
- setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+KRSqueezedTextLabel::KRSqueezedTextLabel( TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
+ setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
}
-void KRSqueezedTextLabel::resizeEvent( QResizeEvent * ) {
+void KRSqueezedTextLabel::resizeEvent( TQResizeEvent * ) {
squeezeTextToLabel();
}
-QSize KRSqueezedTextLabel::minimumSizeHint() const
+TQSize KRSqueezedTextLabel::minimumSizeHint() const
{
- QSize sh = QLabel::minimumSizeHint();
+ TQSize sh = TQLabel::minimumSizeHint();
sh.setWidth(-1);
return sh;
}
-QSize KRSqueezedTextLabel::sizeHint() const
+TQSize KRSqueezedTextLabel::sizeHint() const
{
- return QSize(contentsRect().width(), QLabel::sizeHint().height());
+ return TQSize(contentsRect().width(), TQLabel::sizeHint().height());
}
-void KRSqueezedTextLabel::setText( const QString &text ) {
+void KRSqueezedTextLabel::setText( const TQString &text ) {
fullText = text;
squeezeTextToLabel();
}
void KRSqueezedTextLabel::squeezeTextToLabel() {
- QFontMetrics fm(fontMetrics());
+ TQFontMetrics fm(fontMetrics());
int labelWidth = size().width();
int textWidth = fm.width(fullText);
if (textWidth > labelWidth) {
- QString squeezedText = KStringHandler::rPixelSqueeze(fullText, fm, labelWidth);
- QLabel::setText(squeezedText);
+ TQString squeezedText = KStringHandler::rPixelSqueeze(fullText, fm, labelWidth);
+ TQLabel::setText(squeezedText);
- QToolTip::remove( this );
- QToolTip::add( this, fullText );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, fullText );
} else {
- QLabel::setText(fullText);
+ TQLabel::setText(fullText);
- QToolTip::remove( this );
- QToolTip::hide();
+ TQToolTip::remove( this );
+ TQToolTip::hide();
}
}
@@ -78,8 +78,8 @@ void KRSqueezedTextLabel::squeezeTextToLabel() {
void KRSqueezedTextLabel::setAlignment( int alignment )
{
// save fullText and restore it
- QString tmpFull(fullText);
- QLabel::setAlignment(alignment);
+ TQString tmpFull(fullText);
+ TQLabel::setAlignment(alignment);
fullText = tmpFull;
}
diff --git a/libkdepim/krsqueezedtextlabel.h b/libkdepim/krsqueezedtextlabel.h
index 268c59fba..a5e4e7760 100644
--- a/libkdepim/krsqueezedtextlabel.h
+++ b/libkdepim/krsqueezedtextlabel.h
@@ -21,11 +21,11 @@
#ifndef KRSQUEEZEDTEXTLABEL_H
#define KRSQUEEZEDTEXTLABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdepimmacros.h>
/**
- * @short A replacement for QLabel that squeezes its text
+ * @short A replacement for TQLabel that squeezes its text
*
* A label class that squeezes its text into the label
*
@@ -38,36 +38,36 @@
/*
* QLabel
*/
-class KDE_EXPORT KRSqueezedTextLabel : public QLabel {
+class KDE_EXPORT KRSqueezedTextLabel : public TQLabel {
Q_OBJECT
public:
/**
* Default constructor.
*/
- KRSqueezedTextLabel( QWidget *parent, const char *name = 0 );
- KRSqueezedTextLabel( const QString &text, QWidget *parent, const char *name = 0 );
+ KRSqueezedTextLabel( TQWidget *parent, const char *name = 0 );
+ KRSqueezedTextLabel( const TQString &text, TQWidget *parent, const char *name = 0 );
- virtual QSize minimumSizeHint() const;
- virtual QSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* Overridden for internal reasons; the API remains unaffected.
*/
virtual void setAlignment( int );
public slots:
- void setText( const QString & );
+ void setText( const TQString & );
protected:
/**
* used when widget is resized
*/
- void resizeEvent( QResizeEvent * );
+ void resizeEvent( TQResizeEvent * );
/**
* does the dirty work
*/
void squeezeTextToLabel();
- QString fullText;
+ TQString fullText;
};
diff --git a/libkdepim/kscoring.cpp b/libkdepim/kscoring.cpp
index 583133896..17dd1d439 100644
--- a/libkdepim/kscoring.cpp
+++ b/libkdepim/kscoring.cpp
@@ -22,12 +22,12 @@
#include <iostream>
-#include <qfile.h>
-#include <qdom.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qtextview.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqtextview.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -40,9 +40,9 @@
//----------------------------------------------------------------------------
// a small function to encode attribute values, code stolen from QDom
-static QString toXml(const QString& str)
+static TQString toXml(const TQString& str)
{
- QString tmp(str);
+ TQString tmp(str);
uint len = tmp.length();
uint i = 0;
while ( i < len ) {
@@ -75,18 +75,18 @@ static QString toXml(const QString& str)
NotifyDialog* NotifyDialog::me = 0;
NotifyDialog::NotesMap NotifyDialog::dict;
-NotifyDialog::NotifyDialog(QWidget* p)
+NotifyDialog::NotifyDialog(TQWidget* p)
: KDialogBase(p,"notify action dialog",true,"Notify Message",Close,Close,true)
{
- QFrame *f = makeMainWidget();
- QVBoxLayout *topL = new QVBoxLayout(f);
- note = new QLabel(f);
+ TQFrame *f = makeMainWidget();
+ TQVBoxLayout *topL = new TQVBoxLayout(f);
+ note = new TQLabel(f);
note->setTextFormat(RichText);
topL->addWidget(note);
- QCheckBox *check = new QCheckBox(i18n("Do not show this message again"),f);
+ TQCheckBox *check = new TQCheckBox(i18n("Do not show this message again"),f);
check->setChecked(true);
topL->addWidget(check);
- connect(check,SIGNAL(toggled(bool)),SLOT(slotShowAgainToggled(bool)));
+ connect(check,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotShowAgainToggled(bool)));
}
void NotifyDialog::slotShowAgainToggled(bool flag)
@@ -95,7 +95,7 @@ void NotifyDialog::slotShowAgainToggled(bool flag)
kdDebug(5100) << "note \"" << note << "\" will popup again: " << flag << endl;
}
-void NotifyDialog::display(ScorableArticle& a, const QString& s)
+void NotifyDialog::display(ScorableArticle& a, const TQString& s)
{
kdDebug(5100) << "displaying message" << endl;
if (!me) me = new NotifyDialog();
@@ -103,7 +103,7 @@ void NotifyDialog::display(ScorableArticle& a, const QString& s)
NotesMap::Iterator i = dict.find(s);
if (i == dict.end() || i.data()) {
- QString msg = i18n("Article\n<b>%1</b><br><b>%2</b><br>caused the following"
+ TQString msg = i18n("Article\n<b>%1</b><br><b>%2</b><br>caused the following"
" note to appear:<br>%3").
arg(a.from()).
arg(a.subject()).
@@ -121,7 +121,7 @@ ScorableArticle::~ScorableArticle()
{
}
-void ScorableArticle::displayMessage(const QString& note)
+void ScorableArticle::displayMessage(const TQString& note)
{
NotifyDialog::display(*this,note);
}
@@ -143,9 +143,9 @@ ActionBase::~ActionBase()
}
-QStringList ActionBase::userNames()
+TQStringList ActionBase::userNames()
{
- QStringList l;
+ TQStringList l;
l << userName(SETSCORE);
l << userName(NOTIFY);
l << userName(COLOR);
@@ -153,7 +153,7 @@ QStringList ActionBase::userNames()
return l;
}
-ActionBase* ActionBase::factory(int type, const QString &value)
+ActionBase* ActionBase::factory(int type, const TQString &value)
{
switch (type) {
case SETSCORE: return new ActionSetScore(value);
@@ -166,7 +166,7 @@ ActionBase* ActionBase::factory(int type, const QString &value)
}
}
-QString ActionBase::userName(int type)
+TQString ActionBase::userName(int type)
{
switch (type) {
case SETSCORE: return i18n("Adjust Score");
@@ -179,7 +179,7 @@ QString ActionBase::userName(int type)
}
}
-int ActionBase::getTypeForName(const QString& name)
+int ActionBase::getTypeForName(const TQString& name)
{
if (name == "SETSCORE") return SETSCORE;
else if (name == "NOTIFY") return NOTIFY;
@@ -192,7 +192,7 @@ int ActionBase::getTypeForName(const QString& name)
}
}
-int ActionBase::getTypeForUserName(const QString& name)
+int ActionBase::getTypeForUserName(const TQString& name)
{
if (name == userName(SETSCORE)) return SETSCORE;
else if (name == userName(NOTIFY)) return NOTIFY;
@@ -211,7 +211,7 @@ ActionSetScore::ActionSetScore(short v)
{
}
-ActionSetScore::ActionSetScore(const QString& s)
+ActionSetScore::ActionSetScore(const TQString& s)
{
val = s.toShort();
}
@@ -226,10 +226,10 @@ ActionSetScore::~ActionSetScore()
{
}
-QString ActionSetScore::toString() const
+TQString ActionSetScore::toString() const
{
- QString a;
- a += "<Action type=\"SETSCORE\" value=\"" + QString::number(val) + "\" />";
+ TQString a;
+ a += "<Action type=\"SETSCORE\" value=\"" + TQString::number(val) + "\" />";
return a;
}
@@ -244,12 +244,12 @@ ActionSetScore* ActionSetScore::clone() const
}
// the color action
-ActionColor::ActionColor(const QColor& c)
+ActionColor::ActionColor(const TQColor& c)
: ActionBase(), color(c)
{
}
-ActionColor::ActionColor(const QString& s)
+ActionColor::ActionColor(const TQString& s)
: ActionBase()
{
setValue(s);
@@ -263,9 +263,9 @@ ActionColor::ActionColor(const ActionColor& a)
ActionColor::~ActionColor()
{}
-QString ActionColor::toString() const
+TQString ActionColor::toString() const
{
- QString a;
+ TQString a;
a += "<Action type=\"COLOR\" value=\"" + toXml(color.name()) + "\" />";
return a;
}
@@ -282,7 +282,7 @@ ActionColor* ActionColor::clone() const
// the notify action
-ActionNotify::ActionNotify(const QString& s)
+ActionNotify::ActionNotify(const TQString& s)
{
note = s;
}
@@ -293,7 +293,7 @@ ActionNotify::ActionNotify(const ActionNotify& an)
note = an.note;
}
-QString ActionNotify::toString() const
+TQString ActionNotify::toString() const
{
return "<Action type=\"NOTIFY\" value=\"" + toXml(note) + "\" />";
}
@@ -321,7 +321,7 @@ ActionMarkAsRead::ActionMarkAsRead( const ActionMarkAsRead &action ) :
Q_UNUSED( action );
}
-QString ActionMarkAsRead::toString() const
+TQString ActionMarkAsRead::toString() const
{
return "<Action type=\"MARKASREAD\"/>";
}
@@ -346,7 +346,7 @@ NotifyCollection::~NotifyCollection()
{
}
-void NotifyCollection::addNote(const ScorableArticle& a, const QString& note)
+void NotifyCollection::addNote(const ScorableArticle& a, const TQString& note)
{
article_list *l = notifyList.find(note);
if (!l) {
@@ -359,14 +359,14 @@ void NotifyCollection::addNote(const ScorableArticle& a, const QString& note)
l->append(i);
}
-QString NotifyCollection::collection() const
+TQString NotifyCollection::collection() const
{
- QString notifyCollection = i18n("<h1>List of collected notes</h1>");
+ TQString notifyCollection = i18n("<h1>List of collected notes</h1>");
notifyCollection += "<p><ul>";
// first look thru the notes and create one string
- QDictIterator<article_list> it(notifyList);
+ TQDictIterator<article_list> it(notifyList);
for(;it.current();++it) {
- const QString& note = it.currentKey();
+ const TQString& note = it.currentKey();
notifyCollection += "<li>" + note + "<ul>";
article_list* alist = it.current();
article_list::Iterator ait;
@@ -381,12 +381,12 @@ QString NotifyCollection::collection() const
return notifyCollection;
}
-void NotifyCollection::displayCollection(QWidget *p) const
+void NotifyCollection::displayCollection(TQWidget *p) const
{
//KMessageBox::information(p,collection(),i18n("Collected Notes"));
KDialogBase *dlg = new KDialogBase( p, 0, false, i18n("Collected Notes"),
KDialogBase::Close, KDialogBase::Close );
- QTextView *text = new QTextView(dlg);
+ TQTextView *text = new TQTextView(dlg);
text->setText(collection());
dlg->setMainWidget(text);
dlg->setMinimumWidth(300);
@@ -395,7 +395,7 @@ void NotifyCollection::displayCollection(QWidget *p) const
}
//----------------------------------------------------------------------------
-KScoringExpression::KScoringExpression(const QString& h, const QString& t, const QString& n, const QString& ng)
+KScoringExpression::KScoringExpression(const TQString& h, const TQString& t, const TQString& n, const TQString& ng)
: header(h), expr_str(n)
{
if (t == "MATCH" ) {
@@ -430,7 +430,7 @@ KScoringExpression::KScoringExpression(const QString& h, const QString& t, const
}
// static
-int KScoringExpression::getConditionForName(const QString& s)
+int KScoringExpression::getConditionForName(const TQString& s)
{
if (s == getNameForCondition(CONTAINS)) return CONTAINS;
else if (s == getNameForCondition(MATCH)) return MATCH;
@@ -446,7 +446,7 @@ int KScoringExpression::getConditionForName(const QString& s)
}
// static
-QString KScoringExpression::getNameForCondition(int cond)
+TQString KScoringExpression::getNameForCondition(int cond)
{
switch (cond) {
case CONTAINS: return i18n("Contains Substring");
@@ -463,9 +463,9 @@ QString KScoringExpression::getNameForCondition(int cond)
}
// static
-QStringList KScoringExpression::conditionNames()
+TQStringList KScoringExpression::conditionNames()
{
- QStringList l;
+ TQStringList l;
l << getNameForCondition(CONTAINS);
l << getNameForCondition(MATCH);
l << getNameForCondition(MATCHCS);
@@ -476,9 +476,9 @@ QStringList KScoringExpression::conditionNames()
}
// static
-QStringList KScoringExpression::headerNames()
+TQStringList KScoringExpression::headerNames()
{
- QStringList l;
+ TQStringList l;
l.append("From");
l.append("Message-ID");
l.append("Subject");
@@ -499,7 +499,7 @@ bool KScoringExpression::match(ScorableArticle& a) const
{
//kdDebug(5100) << "matching against header " << c_header << endl;
bool res = true;
- QString head;
+ TQString head;
if (header == "From")
head = a.from();
@@ -536,20 +536,20 @@ bool KScoringExpression::match(ScorableArticle& a) const
return (neg)?!res:res;
}
-void KScoringExpression::write(QTextStream& st) const
+void KScoringExpression::write(TQTextStream& st) const
{
st << toString();
}
-QString KScoringExpression::toString() const
+TQString KScoringExpression::toString() const
{
// kdDebug(5100) << "KScoringExpression::toString() starts" << endl;
// kdDebug(5100) << "header is " << header << endl;
// kdDebug(5100) << "expr is " << expr_str << endl;
// kdDebug(5100) << "neg is " << neg << endl;
// kdDebug(5100) << "type is " << getType() << endl;
- QString e;
- e += "<Expression neg=\"" + QString::number(neg?1:0)
+ TQString e;
+ e += "<Expression neg=\"" + TQString::number(neg?1:0)
+ "\" header=\"" + header
+ "\" type=\"" + getTypeString()
+ "\" expr=\"" + toXml(expr_str)
@@ -558,12 +558,12 @@ QString KScoringExpression::toString() const
return e;
}
-QString KScoringExpression::getTypeString() const
+TQString KScoringExpression::getTypeString() const
{
return KScoringExpression::getTypeString(cond);
}
-QString KScoringExpression::getTypeString(int cond)
+TQString KScoringExpression::getTypeString(int cond)
{
switch (cond) {
case CONTAINS: return "CONTAINS";
@@ -584,7 +584,7 @@ int KScoringExpression::getType() const
}
//----------------------------------------------------------------------------
-KScoringRule::KScoringRule(const QString& n )
+KScoringRule::KScoringRule(const TQString& n )
: name(n), link(AND)
{
expressions.setAutoDelete(true);
@@ -600,7 +600,7 @@ KScoringRule::KScoringRule(const KScoringRule& r)
// copy expressions
expressions.clear();
const ScoreExprList& rexpr = r.expressions;
- QPtrListIterator<KScoringExpression> it(rexpr);
+ TQPtrListIterator<KScoringExpression> it(rexpr);
for ( ; it.current(); ++it ) {
KScoringExpression *t = new KScoringExpression(**it);
expressions.append(t);
@@ -608,7 +608,7 @@ KScoringRule::KScoringRule(const KScoringRule& r)
// copy actions
actions.clear();
const ActionList& ract = r.actions;
- QPtrListIterator<ActionBase> ait(ract);
+ TQPtrListIterator<ActionBase> ait(ract);
for ( ; ait.current(); ++ait ) {
ActionBase *t = *ait;
actions.append(t->clone());
@@ -643,7 +643,7 @@ void KScoringRule::addExpression( KScoringExpression* expr)
expressions.append(expr);
}
-void KScoringRule::addAction(int type, const QString& val)
+void KScoringRule::addAction(int type, const TQString& val)
{
ActionBase *action = ActionBase::factory(type,val);
addAction(action);
@@ -655,16 +655,16 @@ void KScoringRule::addAction(ActionBase* a)
actions.append(a);
}
-void KScoringRule::setLinkMode(const QString& l)
+void KScoringRule::setLinkMode(const TQString& l)
{
if (l == "OR") link = OR;
else link = AND;
}
-void KScoringRule::setExpire(const QString& e)
+void KScoringRule::setExpire(const TQString& e)
{
if (e != "never") {
- QStringList l = QStringList::split("-",e);
+ TQStringList l = TQStringList::split("-",e);
Q_ASSERT( l.count() == 3 );
expires.setYMD( (*(l.at(0))).toInt(),
(*(l.at(1))).toInt(),
@@ -673,10 +673,10 @@ void KScoringRule::setExpire(const QString& e)
kdDebug(5100) << "Rule " << getName() << " expires at " << getExpireDateString() << endl;
}
-bool KScoringRule::matchGroup(const QString& group) const
+bool KScoringRule::matchGroup(const TQString& group) const
{
for(GroupList::ConstIterator i=groups.begin(); i!=groups.end();++i) {
- QRegExp e(*i);
+ TQRegExp e(*i);
if (e.search(group, 0) != -1 &&
(uint)e.matchedLength() == group.length())
return true;
@@ -686,7 +686,7 @@ bool KScoringRule::matchGroup(const QString& group) const
void KScoringRule::applyAction(ScorableArticle& a) const
{
- QPtrListIterator<ActionBase> it(actions);
+ TQPtrListIterator<ActionBase> it(actions);
for(; it.current(); ++it) {
it.current()->apply(a);
}
@@ -700,7 +700,7 @@ void KScoringRule::applyRule(ScorableArticle& a) const
// << endl;
bool oper_and = (link == AND);
bool res = true;
- QPtrListIterator<KScoringExpression> it(expressions);
+ TQPtrListIterator<KScoringExpression> it(expressions);
//kdDebug(5100) << "checking " << expressions.count() << " expressions" << endl;
for (; it.current(); ++it) {
Q_ASSERT( it.current() );
@@ -711,26 +711,26 @@ void KScoringRule::applyRule(ScorableArticle& a) const
if (res) applyAction(a);
}
-void KScoringRule::applyRule(ScorableArticle& a /*, const QString& s*/, const QString& g) const
+void KScoringRule::applyRule(ScorableArticle& a /*, const TQString& s*/, const TQString& g) const
{
// check if one of the groups match
- for (QStringList::ConstIterator i = groups.begin(); i != groups.end(); ++i) {
- if (QRegExp(*i).search(g) != -1) {
+ for (TQStringList::ConstIterator i = groups.begin(); i != groups.end(); ++i) {
+ if (TQRegExp(*i).search(g) != -1) {
applyRule(a);
return;
}
}
}
-void KScoringRule::write(QTextStream& s) const
+void KScoringRule::write(TQTextStream& s) const
{
s << toString();
}
-QString KScoringRule::toString() const
+TQString KScoringRule::toString() const
{
//kdDebug(5100) << "KScoringRule::toString() starts" << endl;
- QString r;
+ TQString r;
r += "<Rule name=\"" + toXml(name) + "\" linkmode=\"" + getLinkModeName();
r += "\" expires=\"" + getExpireDateString() + "\">";
//kdDebug(5100) << "building grouplist..." << endl;
@@ -738,12 +738,12 @@ QString KScoringRule::toString() const
r += "<Group name=\"" + toXml(*i) + "\" />";
}
//kdDebug(5100) << "building expressionlist..." << endl;
- QPtrListIterator<KScoringExpression> eit(expressions);
+ TQPtrListIterator<KScoringExpression> eit(expressions);
for (; eit.current(); ++eit) {
r += eit.current()->toString();
}
//kdDebug(5100) << "building actionlist..." << endl;
- QPtrListIterator<ActionBase> ait(actions);
+ TQPtrListIterator<ActionBase> ait(actions);
for (; ait.current(); ++ait) {
r += ait.current()->toString();
}
@@ -752,7 +752,7 @@ QString KScoringRule::toString() const
return r;
}
-QString KScoringRule::getLinkModeName() const
+TQString KScoringRule::getLinkModeName() const
{
switch (link) {
case AND: return "AND";
@@ -761,25 +761,25 @@ QString KScoringRule::getLinkModeName() const
}
}
-QString KScoringRule::getExpireDateString() const
+TQString KScoringRule::getExpireDateString() const
{
if (expires.isNull()) return "never";
else {
- return QString::number(expires.year()) + QString("-")
- + QString::number(expires.month()) + QString("-")
- + QString::number(expires.day());
+ return TQString::number(expires.year()) + TQString("-")
+ + TQString::number(expires.month()) + TQString("-")
+ + TQString::number(expires.day());
}
}
bool KScoringRule::isExpired() const
{
- return (expires.isValid() && (expires < QDate::currentDate()));
+ return (expires.isValid() && (expires < TQDate::currentDate()));
}
//----------------------------------------------------------------------------
-KScoringManager::KScoringManager(const QString& appName)
+KScoringManager::KScoringManager(const TQString& appName)
: cacheValid(false)//, _s(0)
{
allRules.setAutoDelete(true);
@@ -799,8 +799,8 @@ KScoringManager::~KScoringManager()
void KScoringManager::load()
{
- QDomDocument sdoc("Scorefile");
- QFile f( mFilename );
+ TQDomDocument sdoc("Scorefile");
+ TQFile f( mFilename );
if ( !f.open( IO_ReadOnly ) )
return;
if ( !sdoc.setContent( &f ) ) {
@@ -819,22 +819,22 @@ void KScoringManager::load()
void KScoringManager::save()
{
kdDebug(5100) << "KScoringManager::save() starts" << endl;
- QFile f( mFilename );
+ TQFile f( mFilename );
if ( !f.open( IO_WriteOnly ) )
return;
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::Unicode);
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::Unicode);
kdDebug(5100) << "KScoringManager::save() creating xml" << endl;
createXMLfromInternal().save(stream,2);
kdDebug(5100) << "KScoringManager::save() finished" << endl;
}
-QDomDocument KScoringManager::createXMLfromInternal()
+TQDomDocument KScoringManager::createXMLfromInternal()
{
- // I was'nt able to create a QDomDocument in memory:(
+ // I was'nt able to create a TQDomDocument in memory:(
// so I write the content into a string, which is really stupid
- QDomDocument sdoc("Scorefile");
- QString ss; // scorestring
+ TQDomDocument sdoc("Scorefile");
+ TQString ss; // scorestring
ss += "<?xml version = '1.0'?><!DOCTYPE Scorefile >";
ss += toString();
ss += "</Scorefile>\n";
@@ -843,11 +843,11 @@ QDomDocument KScoringManager::createXMLfromInternal()
return sdoc;
}
-QString KScoringManager::toString() const
+TQString KScoringManager::toString() const
{
- QString s;
+ TQString s;
s += "<Scorefile>\n";
- QPtrListIterator<KScoringRule> it(allRules);
+ TQPtrListIterator<KScoringRule> it(allRules);
for( ; it.current(); ++it) {
s += it.current()->toString();
}
@@ -864,7 +864,7 @@ void KScoringManager::expireRules()
}
}
-void KScoringManager::createInternalFromXML(QDomNode n)
+void KScoringManager::createInternalFromXML(TQDomNode n)
{
static KScoringRule *cR = 0; // the currentRule
// the XML file was parsed and now we simply traverse the resulting tree
@@ -873,16 +873,16 @@ void KScoringManager::createInternalFromXML(QDomNode n)
<< " named " << n.toElement().tagName() << endl;
switch (n.nodeType()) {
- case QDomNode::DocumentNode: {
+ case TQDomNode::DocumentNode: {
// the document itself
break;
}
- case QDomNode::ElementNode: {
+ case TQDomNode::ElementNode: {
// Server, Newsgroup, Rule, Expression, Action
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
//kdDebug(5100) << "The name of the element is "
//<< e.tagName().latin1() << endl;
- QString s = e.tagName();
+ TQString s = e.tagName();
if (s == "Rule") {
cR = new KScoringRule(e.attribute("name"));
cR->setLinkMode(e.attribute("linkmode"));
@@ -909,7 +909,7 @@ void KScoringManager::createInternalFromXML(QDomNode n)
default: // kdDebug(5100) << "unknown DomNode::type" << endl;
;
}
- QDomNodeList nodelist = n.childNodes();
+ TQDomNodeList nodelist = n.childNodes();
unsigned cnt = nodelist.count();
//kdDebug(5100) << "recursive checking " << cnt << " nodes" << endl;
for (unsigned i=0;i<cnt;++i)
@@ -917,7 +917,7 @@ void KScoringManager::createInternalFromXML(QDomNode n)
}
}
-KScoringRule* KScoringManager::addRule(const ScorableArticle& a, QString group, short score)
+KScoringRule* KScoringManager::addRule(const ScorableArticle& a, TQString group, short score)
{
KScoringRule *rule = new KScoringRule(findUniqueName());
rule->addGroup( group );
@@ -925,7 +925,7 @@ KScoringRule* KScoringManager::addRule(const ScorableArticle& a, QString group,
new KScoringExpression("From","CONTAINS",
a.from(),"0"));
if (score) rule->addAction(new ActionSetScore(score));
- rule->setExpireDate(QDate::currentDate().addDays(30));
+ rule->setExpireDate(TQDate::currentDate().addDays(30));
addRule(rule);
KScoringEditor *edit = KScoringEditor::createEditor(this);
edit->setRule(rule);
@@ -975,14 +975,14 @@ void KScoringManager::cancelNewRule(KScoringRule *r)
}
}
-void KScoringManager::setRuleName(KScoringRule *r, const QString& s)
+void KScoringManager::setRuleName(KScoringRule *r, const TQString& s)
{
bool cont = true;
- QString text = s;
- QString oldName = r->getName();
+ TQString text = s;
+ TQString oldName = r->getName();
while (cont) {
cont = false;
- QPtrListIterator<KScoringRule> it(allRules);
+ TQPtrListIterator<KScoringRule> it(allRules);
for (; it.current(); ++it) {
if ( it.current() != r && it.current()->getName() == text ) {
kdDebug(5100) << "rule name " << text << " is not unique" << endl;
@@ -1009,7 +1009,7 @@ void KScoringManager::deleteRule(KScoringRule *r)
}
}
-void KScoringManager::editRule(KScoringRule *e, QWidget *w)
+void KScoringManager::editRule(KScoringRule *e, TQWidget *w)
{
KScoringEditor *edit = KScoringEditor::createEditor(this, w);
edit->setRule(e);
@@ -1061,7 +1061,7 @@ void KScoringManager::applyRules(ScorableGroup* )
kdWarning(5100) << "KScoringManager::applyRules(ScorableGroup* ) isn't implemented" << endl;
}
-void KScoringManager::applyRules(ScorableArticle& article, const QString& group)
+void KScoringManager::applyRules(ScorableArticle& article, const TQString& group)
{
setGroup(group);
applyRules(article);
@@ -1069,17 +1069,17 @@ void KScoringManager::applyRules(ScorableArticle& article, const QString& group)
void KScoringManager::applyRules(ScorableArticle& a)
{
- QPtrListIterator<KScoringRule> it(isCacheValid()? ruleList : allRules);
+ TQPtrListIterator<KScoringRule> it(isCacheValid()? ruleList : allRules);
for( ; it.current(); ++it) {
it.current()->applyRule(a);
}
}
-void KScoringManager::initCache(const QString& g)
+void KScoringManager::initCache(const TQString& g)
{
group = g;
ruleList.clear();
- QPtrListIterator<KScoringRule> it(allRules);
+ TQPtrListIterator<KScoringRule> it(allRules);
for (; it.current(); ++it) {
if ( it.current()->matchGroup(group) ) {
ruleList.append(it.current());
@@ -1090,7 +1090,7 @@ void KScoringManager::initCache(const QString& g)
setCacheValid(true);
}
-void KScoringManager::setGroup(const QString& g)
+void KScoringManager::setGroup(const TQString& g)
{
if (group != g) initCache(g);
}
@@ -1101,19 +1101,19 @@ bool KScoringManager::hasRulesForCurrentGroup()
}
-QStringList KScoringManager::getRuleNames()
+TQStringList KScoringManager::getRuleNames()
{
- QStringList l;
- QPtrListIterator<KScoringRule> it(allRules);
+ TQStringList l;
+ TQPtrListIterator<KScoringRule> it(allRules);
for( ; it.current(); ++it) {
l << it.current()->getName();
}
return l;
}
-KScoringRule* KScoringManager::findRule(const QString& ruleName)
+KScoringRule* KScoringManager::findRule(const TQString& ruleName)
{
- QPtrListIterator<KScoringRule> it(allRules);
+ TQPtrListIterator<KScoringRule> it(allRules);
for (; it.current(); ++it) {
if ( it.current()->getName() == ruleName ) {
return it;
@@ -1129,10 +1129,10 @@ bool KScoringManager::setCacheValid(bool v)
return res;
}
-QString KScoringManager::findUniqueName() const
+TQString KScoringManager::findUniqueName() const
{
int nr = 0;
- QString ret;
+ TQString ret;
bool duplicated=false;
while (nr < 99999999) {
@@ -1140,7 +1140,7 @@ QString KScoringManager::findUniqueName() const
ret = i18n("rule %1").arg(nr);
duplicated=false;
- QPtrListIterator<KScoringRule> it(allRules);
+ TQPtrListIterator<KScoringRule> it(allRules);
for( ; it.current(); ++it) {
if (it.current()->getName() == ret) {
duplicated = true;
@@ -1166,9 +1166,9 @@ bool KScoringManager::hasFeature(int p)
}
}
-QStringList KScoringManager::getDefaultHeaders() const
+TQStringList KScoringManager::getDefaultHeaders() const
{
- QStringList l;
+ TQStringList l;
l.append("Subject");
l.append("From");
l.append("Date");
@@ -1198,7 +1198,7 @@ RuleStack::RuleStack()
RuleStack::~RuleStack()
{}
-void RuleStack::push(QPtrList<KScoringRule>& l)
+void RuleStack::push(TQPtrList<KScoringRule>& l)
{
kdDebug(5100) << "RuleStack::push pushing list with " << l.count() << " rules" << endl;
KScoringManager::ScoringRuleList *l1 = new KScoringManager::ScoringRuleList;
@@ -1209,7 +1209,7 @@ void RuleStack::push(QPtrList<KScoringRule>& l)
kdDebug(5100) << "now there are " << stack.count() << " lists on the stack" << endl;
}
-void RuleStack::pop(QPtrList<KScoringRule>& l)
+void RuleStack::pop(TQPtrList<KScoringRule>& l)
{
top(l);
drop();
@@ -1217,7 +1217,7 @@ void RuleStack::pop(QPtrList<KScoringRule>& l)
kdDebug(5100) << "now there are " << stack.count() << " lists on the stack" << endl;
}
-void RuleStack::top(QPtrList<KScoringRule>& l)
+void RuleStack::top(TQPtrList<KScoringRule>& l)
{
l.clear();
KScoringManager::ScoringRuleList *l1 = stack.top();
diff --git a/libkdepim/kscoring.h b/libkdepim/kscoring.h
index 3252a33ea..a0cdcf0b3 100644
--- a/libkdepim/kscoring.h
+++ b/libkdepim/kscoring.h
@@ -20,19 +20,19 @@
#include <unistd.h>
-#include <qglobal.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
-#include <qregexp.h>
-
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
-#include <qcolor.h>
-#include <qtable.h>
-#include <qmap.h>
-#include <qdict.h>
+#include <tqglobal.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
+#include <tqregexp.h>
+
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
+#include <tqcolor.h>
+#include <tqtable.h>
+#include <tqmap.h>
+#include <tqdict.h>
#include <kdialogbase.h>
#include <klineedit.h>
@@ -67,12 +67,12 @@ public:
virtual ~ScorableArticle();
virtual void addScore(short) {}
- virtual void displayMessage(const QString&);
- virtual void changeColor(const QColor&) {}
+ virtual void displayMessage(const TQString&);
+ virtual void changeColor(const TQColor&) {}
virtual void markAsRead() {}
- virtual QString from() const = 0;
- virtual QString subject() const = 0;
- virtual QString getHeaderByType(const QString&) const = 0;
+ virtual TQString from() const = 0;
+ virtual TQString subject() const = 0;
+ virtual TQString getHeaderByType(const TQString&) const = 0;
//virtual ScorableGroup group() const =0;
};
@@ -85,49 +85,49 @@ class KDE_EXPORT ActionBase {
public:
ActionBase();
virtual ~ActionBase();
- virtual QString toString() const =0;
+ virtual TQString toString() const =0;
virtual void apply(ScorableArticle&) const =0;
virtual ActionBase* clone() const =0;
virtual int getType() const =0;
- virtual QString getValueString() const { return QString(); }
- virtual void setValue(const QString&) {}
- static ActionBase* factory(int type, const QString &value);
- static QStringList userNames();
- static QString userName(int type);
- static int getTypeForName(const QString& name);
- static int getTypeForUserName(const QString& name);
- QString userName() { return userName(getType()); }
+ virtual TQString getValueString() const { return TQString(); }
+ virtual void setValue(const TQString&) {}
+ static ActionBase* factory(int type, const TQString &value);
+ static TQStringList userNames();
+ static TQString userName(int type);
+ static int getTypeForName(const TQString& name);
+ static int getTypeForUserName(const TQString& name);
+ TQString userName() { return userName(getType()); }
enum ActionTypes { SETSCORE, NOTIFY, COLOR, MARKASREAD };
};
class KDE_EXPORT ActionColor : public ActionBase {
public:
- ActionColor(const QColor&);
- ActionColor(const QString&);
+ ActionColor(const TQColor&);
+ ActionColor(const TQString&);
ActionColor(const ActionColor&);
virtual ~ActionColor();
- virtual QString toString() const;
+ virtual TQString toString() const;
virtual int getType() const { return COLOR; }
- virtual QString getValueString() const { return color.name(); }
- virtual void setValue(const QString& s) { color.setNamedColor(s); }
- void setValue(const QColor& c) { color = c; }
- QColor value() const { return color; }
+ virtual TQString getValueString() const { return color.name(); }
+ virtual void setValue(const TQString& s) { color.setNamedColor(s); }
+ void setValue(const TQColor& c) { color = c; }
+ TQColor value() const { return color; }
virtual void apply(ScorableArticle&) const;
virtual ActionColor* clone() const;
private:
- QColor color;
+ TQColor color;
};
class KDE_EXPORT ActionSetScore : public ActionBase {
public:
ActionSetScore(short);
ActionSetScore(const ActionSetScore&);
- ActionSetScore(const QString&);
+ ActionSetScore(const TQString&);
virtual ~ActionSetScore();
- virtual QString toString() const;
+ virtual TQString toString() const;
virtual int getType() const { return SETSCORE; }
- virtual QString getValueString() const { return QString::number(val); }
- virtual void setValue(const QString& s) { val = s.toShort(); }
+ virtual TQString getValueString() const { return TQString::number(val); }
+ virtual void setValue(const TQString& s) { val = s.toShort(); }
void setValue(short v) { val = v; }
short value() const { return val; }
virtual void apply(ScorableArticle&) const;
@@ -138,17 +138,17 @@ class KDE_EXPORT ActionSetScore : public ActionBase {
class KDE_EXPORT ActionNotify : public ActionBase {
public:
- ActionNotify(const QString&);
+ ActionNotify(const TQString&);
ActionNotify(const ActionNotify&);
virtual ~ActionNotify() {}
- virtual QString toString() const;
+ virtual TQString toString() const;
virtual int getType() const { return NOTIFY; }
- virtual QString getValueString() const { return note; }
- virtual void setValue(const QString& s) { note = s; }
+ virtual TQString getValueString() const { return note; }
+ virtual void setValue(const TQString& s) { note = s; }
virtual void apply(ScorableArticle&) const;
virtual ActionNotify* clone() const;
private:
- QString note;
+ TQString note;
};
class KDE_EXPORT ActionMarkAsRead : public ActionBase {
@@ -156,7 +156,7 @@ class KDE_EXPORT ActionMarkAsRead : public ActionBase {
ActionMarkAsRead();
ActionMarkAsRead( const ActionMarkAsRead& );
virtual ~ActionMarkAsRead() {}
- virtual QString toString() const;
+ virtual TQString toString() const;
virtual int getType() const { return MARKASREAD; }
virtual void apply( ScorableArticle &article ) const;
virtual ActionMarkAsRead* clone() const;
@@ -167,16 +167,16 @@ class KDE_EXPORT NotifyCollection
public:
NotifyCollection();
~NotifyCollection();
- void addNote(const ScorableArticle&, const QString&);
- QString collection() const;
- void displayCollection(QWidget *p=0) const;
+ void addNote(const ScorableArticle&, const TQString&);
+ TQString collection() const;
+ void displayCollection(TQWidget *p=0) const;
private:
struct article_info {
- QString from;
- QString subject;
+ TQString from;
+ TQString subject;
};
- typedef QValueList<article_info> article_list;
- typedef QDict<article_list> note_list;
+ typedef TQValueList<article_info> article_list;
+ typedef TQDict<article_list> note_list;
note_list notifyList;
};
@@ -188,31 +188,31 @@ class KDE_EXPORT KScoringExpression
public:
enum Condition { CONTAINS, MATCH, EQUALS, SMALLER, GREATER, MATCHCS };
- KScoringExpression(const QString&,const QString&,const QString&, const QString&);
+ KScoringExpression(const TQString&,const TQString&,const TQString&, const TQString&);
~KScoringExpression();
bool match(ScorableArticle& a) const ;
- QString getTypeString() const;
- static QString getTypeString(int);
+ TQString getTypeString() const;
+ static TQString getTypeString(int);
int getType() const;
- QString toString() const;
- void write(QTextStream& ) const;
+ TQString toString() const;
+ void write(TQTextStream& ) const;
bool isNeg() const { return neg; }
Condition getCondition() const { return cond; }
- QString getExpression() const { return expr_str; }
- QString getHeader() const { return header; }
- static QStringList conditionNames();
- static QStringList headerNames();
- static int getConditionForName(const QString&);
- static QString getNameForCondition(int);
+ TQString getExpression() const { return expr_str; }
+ TQString getHeader() const { return header; }
+ static TQStringList conditionNames();
+ static TQStringList headerNames();
+ static int getConditionForName(const TQString&);
+ static TQString getNameForCondition(int);
private:
bool neg;
- QString header;
+ TQString header;
const char* c_header;
Condition cond;
- QRegExp expr;
- QString expr_str;
+ TQRegExp expr;
+ TQString expr_str;
int expr_int;
};
@@ -221,59 +221,59 @@ class KDE_EXPORT KScoringRule
{
friend class KScoringManager;
public:
- KScoringRule(const QString& name);
+ KScoringRule(const TQString& name);
KScoringRule(const KScoringRule& r);
~KScoringRule();
- typedef QPtrList<KScoringExpression> ScoreExprList;
- typedef QPtrList<ActionBase> ActionList;
- typedef QStringList GroupList;
+ typedef TQPtrList<KScoringExpression> ScoreExprList;
+ typedef TQPtrList<ActionBase> ActionList;
+ typedef TQStringList GroupList;
enum LinkMode { AND, OR };
- QString getName() const { return name; }
- QStringList getGroups() const { return groups; }
- void setGroups(const QStringList &l) { groups = l; }
+ TQString getName() const { return name; }
+ TQStringList getGroups() const { return groups; }
+ void setGroups(const TQStringList &l) { groups = l; }
LinkMode getLinkMode() const { return link; }
- QString getLinkModeName() const;
- QString getExpireDateString() const;
- QDate getExpireDate() const { return expires; }
- void setExpireDate(const QDate &d) { expires = d; }
+ TQString getLinkModeName() const;
+ TQString getExpireDateString() const;
+ TQDate getExpireDate() const { return expires; }
+ void setExpireDate(const TQDate &d) { expires = d; }
bool isExpired() const;
ScoreExprList getExpressions() const { return expressions; }
ActionList getActions() const { return actions; }
void cleanExpressions();
void cleanActions();
- bool matchGroup(const QString& group) const ;
+ bool matchGroup(const TQString& group) const ;
void applyRule(ScorableArticle& a) const;
- void applyRule(ScorableArticle& a, const QString& group) const;
+ void applyRule(ScorableArticle& a, const TQString& group) const;
void applyAction(ScorableArticle& a) const;
- void setLinkMode(const QString& link);
+ void setLinkMode(const TQString& link);
void setLinkMode(LinkMode m) { link = m; }
- void setExpire(const QString& exp);
+ void setExpire(const TQString& exp);
void addExpression( KScoringExpression* );
- void addGroup( const QString& group) { groups.append(group); }
- //void addServer(const QString& server) { servers.append(server); }
- void addAction(int, const QString& );
+ void addGroup( const TQString& group) { groups.append(group); }
+ //void addServer(const TQString& server) { servers.append(server); }
+ void addAction(int, const TQString& );
void addAction(ActionBase*);
- void updateXML(QDomElement& e, QDomDocument& d);
- QString toString() const;
+ void updateXML(TQDomElement& e, TQDomDocument& d);
+ TQString toString() const;
// writes the rule in XML format into the textstream
- void write(QTextStream& ) const;
+ void write(TQTextStream& ) const;
protected:
//! assert that the name is unique
- void setName(const QString &n) { name = n; }
+ void setName(const TQString &n) { name = n; }
private:
- QString name;
+ TQString name;
GroupList groups;
//ServerList servers;
LinkMode link;
ScoreExprList expressions;
ActionList actions;
- QDate expires;
+ TQDate expires;
};
/** this helper class implements a stack for lists of lists of rules.
@@ -286,16 +286,16 @@ public:
RuleStack();
~RuleStack();
//! puts the list on the stack, doesn't change the list
- void push(QPtrList<KScoringRule>&);
+ void push(TQPtrList<KScoringRule>&);
//! clears the argument list and copy the content of the TOS into it
//! after that the TOS gets dropped
- void pop(QPtrList<KScoringRule>&);
+ void pop(TQPtrList<KScoringRule>&);
//! like pop but without dropping the TOS
- void top(QPtrList<KScoringRule>&);
+ void top(TQPtrList<KScoringRule>&);
//! drops the TOS
void drop();
private:
- QPtrStack< QPtrList<KScoringRule> > stack;
+ TQPtrStack< TQPtrList<KScoringRule> > stack;
};
//----------------------------------------------------------------------------
@@ -306,20 +306,20 @@ class KDE_EXPORT KScoringManager : public QObject
public:
//* this is the container for all rules
- typedef QPtrList<KScoringRule> ScoringRuleList;
+ typedef TQPtrList<KScoringRule> ScoringRuleList;
- KScoringManager(const QString& appName = QString::null);
+ KScoringManager(const TQString& appName = TQString::null);
virtual ~KScoringManager();
//* returns a list of all available groups, must be overridden
- virtual QStringList getGroups() const =0;
+ virtual TQStringList getGroups() const =0;
//! returns a list of common (or available) headers
//! defaults to returning { Subject, From, Message-ID, Date }
- virtual QStringList getDefaultHeaders() const;
+ virtual TQStringList getDefaultHeaders() const;
//* setting current server and group and calling applyRules(ScorableArticle&)
- void applyRules(ScorableArticle& article, const QString& group/*, const QString& server*/);
+ void applyRules(ScorableArticle& article, const TQString& group/*, const TQString& server*/);
//* assuming a properly set group
void applyRules(ScorableArticle&);
//* same as above
@@ -335,33 +335,33 @@ class KDE_EXPORT KScoringManager : public QObject
void removeTOS();
KScoringRule* addRule(KScoringRule *);
- KScoringRule* addRule(const ScorableArticle&, QString group, short =0);
+ KScoringRule* addRule(const ScorableArticle&, TQString group, short =0);
KScoringRule* addRule();
void cancelNewRule(KScoringRule *);
void deleteRule(KScoringRule *);
- void editRule(KScoringRule *e, QWidget *w=0);
+ void editRule(KScoringRule *e, TQWidget *w=0);
KScoringRule* copyRule(KScoringRule *);
void moveRuleAbove( KScoringRule *above, KScoringRule *below );
void moveRuleBelow( KScoringRule *below, KScoringRule *above );
- void setGroup(const QString& g);
+ void setGroup(const TQString& g);
// has to be called after setGroup() or initCache()
bool hasRulesForCurrentGroup();
- QString findUniqueName() const;
+ TQString findUniqueName() const;
/** called from an editor whenever it finishes editing the rule base,
causes the finishedEditing signal to be emitted */
void editorReady();
ScoringRuleList getAllRules() const { return allRules; }
- KScoringRule *findRule(const QString&);
- QStringList getRuleNames();
- void setRuleName(KScoringRule *, const QString&);
+ KScoringRule *findRule(const TQString&);
+ TQStringList getRuleNames();
+ void setRuleName(KScoringRule *, const TQString&);
int getRuleCount() const { return allRules.count(); }
- QString toString() const;
+ TQString toString() const;
bool setCacheValid(bool v);
bool isCacheValid() { return cacheValid; }
- void initCache(const QString& group/*, const QString& server*/);
+ void initCache(const TQString& group/*, const TQString& server*/);
void load();
void save();
@@ -375,15 +375,15 @@ class KDE_EXPORT KScoringManager : public QObject
signals:
void changedRules();
- void changedRuleName(const QString& oldName, const QString& newName);
+ void changedRuleName(const TQString& oldName, const TQString& newName);
void finishedEditing();
private:
void addRuleInternal(KScoringRule *e);
void expireRules();
- QDomDocument createXMLfromInternal();
- void createInternalFromXML(QDomNode);
+ TQDomDocument createXMLfromInternal();
+ void createInternalFromXML(TQDomNode);
// list of all Rules
ScoringRuleList allRules;
@@ -395,13 +395,13 @@ class KDE_EXPORT KScoringManager : public QObject
bool cacheValid;
// current rule set, ie the cache
ScoringRuleList ruleList;
- //QString server;
- QString group;
+ //TQString server;
+ TQString group;
//ScorableServer* _s;
// filename of the scorefile
- QString mFilename;
+ TQString mFilename;
};
@@ -410,16 +410,16 @@ class KDE_EXPORT NotifyDialog : public KDialogBase
{
Q_OBJECT
public:
- static void display(ScorableArticle&,const QString&);
+ static void display(ScorableArticle&,const TQString&);
protected slots:
void slotShowAgainToggled(bool);
private:
- NotifyDialog(QWidget* p =0);
+ NotifyDialog(TQWidget* p =0);
static NotifyDialog *me;
- QLabel *note;
- QString msg;
- typedef QMap<QString,bool> NotesMap;
+ TQLabel *note;
+ TQString msg;
+ typedef TQMap<TQString,bool> NotesMap;
static NotesMap dict;
};
diff --git a/libkdepim/kscoringeditor.cpp b/libkdepim/kscoringeditor.cpp
index 4ead5b8d6..6c469f49a 100644
--- a/libkdepim/kscoringeditor.cpp
+++ b/libkdepim/kscoringeditor.cpp
@@ -30,20 +30,20 @@
#include <kparts/componentfactory.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qwidgetstack.h>
-#include <qapplication.h>
-#include <qtimer.h>
-#include <qhbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqwidgetstack.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
+#include <tqhbox.h>
// works for both ListBox and ComboBox
-template <class T> static int setCurrentItem(T *box, const QString& s)
+template <class T> static int setCurrentItem(T *box, const TQString& s)
{
int cnt = box->count();
for (int i=0;i<cnt;++i) {
@@ -61,37 +61,37 @@ template <class T> static int setCurrentItem(T *box, const QString& s)
// class SingleConditionWidget (editor for one condition, used in ConditionEditWidget)
//
//============================================================================
-SingleConditionWidget::SingleConditionWidget(KScoringManager *m,QWidget *p, const char *n)
- : QFrame(p,n), manager(m)
+SingleConditionWidget::SingleConditionWidget(KScoringManager *m,TQWidget *p, const char *n)
+ : TQFrame(p,n), manager(m)
{
- QBoxLayout *topL = new QVBoxLayout(this,5);
- QBoxLayout *firstRow = new QHBoxLayout(topL);
- neg = new QCheckBox(i18n("Not"),this);
- QToolTip::add(neg,i18n("Negate this condition"));
+ TQBoxLayout *topL = new TQVBoxLayout(this,5);
+ TQBoxLayout *firstRow = new TQHBoxLayout(topL);
+ neg = new TQCheckBox(i18n("Not"),this);
+ TQToolTip::add(neg,i18n("Negate this condition"));
firstRow->addWidget(neg);
headers = new KComboBox(this);
headers->insertStringList(manager->getDefaultHeaders());
headers->setEditable( true );
- QToolTip::add(headers,i18n("Select the header to match this condition against"));
+ TQToolTip::add(headers,i18n("Select the header to match this condition against"));
firstRow->addWidget(headers,1);
matches = new KComboBox(this);
matches->insertStringList(KScoringExpression::conditionNames());
- QToolTip::add(matches,i18n("Select the type of match"));
+ TQToolTip::add(matches,i18n("Select the type of match"));
firstRow->addWidget(matches,1);
- connect( matches, SIGNAL( activated( int ) ), SLOT( toggleRegExpButton( int ) ) );
- QHBoxLayout *secondRow = new QHBoxLayout( topL );
+ connect( matches, TQT_SIGNAL( activated( int ) ), TQT_SLOT( toggleRegExpButton( int ) ) );
+ TQHBoxLayout *secondRow = new TQHBoxLayout( topL );
secondRow->setSpacing( 1 );
expr = new KLineEdit( this );
- QToolTip::add(expr,i18n("The condition for the match"));
+ TQToolTip::add(expr,i18n("The condition for the match"));
// reserve space for at least 20 characters
expr->setMinimumWidth(fontMetrics().maxWidth()*20);
secondRow->addWidget( expr );
- regExpButton = new QPushButton( i18n("Edit..."), this );
+ regExpButton = new TQPushButton( i18n("Edit..."), this );
secondRow->addWidget( regExpButton );
- connect( regExpButton, SIGNAL( clicked() ), SLOT( showRegExpDialog() ) );
+ connect( regExpButton, TQT_SIGNAL( clicked() ), TQT_SLOT( showRegExpDialog() ) );
// occupy at much width as possible
- setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed));
+ setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Fixed));
setFrameStyle(Box | Sunken);
setLineWidth(1);
}
@@ -110,12 +110,12 @@ void SingleConditionWidget::setCondition(KScoringExpression *e)
KScoringExpression* SingleConditionWidget::createCondition() const
{
- QString head = headers->currentText();
- QString match = matches->currentText();
+ TQString head = headers->currentText();
+ TQString match = matches->currentText();
int condType = KScoringExpression::getConditionForName(match);
match = KScoringExpression::getTypeString(condType);
- QString cond = expr->text();
- QString negs = (neg->isChecked())?"1":"0";
+ TQString cond = expr->text();
+ TQString negs = (neg->isChecked())?"1":"0";
return new KScoringExpression(head,match,cond,negs);
}
@@ -135,7 +135,7 @@ void SingleConditionWidget::toggleRegExpButton( int selected )
void SingleConditionWidget::showRegExpDialog()
{
- QDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor" );
+ TQDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
if ( editorDialog ) {
KRegExpEditorInterface *editor = static_cast<KRegExpEditorInterface *>( editorDialog->qt_cast( "KRegExpEditorInterface" ) );
Q_ASSERT( editor ); // This should not fail!
@@ -150,7 +150,7 @@ void SingleConditionWidget::showRegExpDialog()
// class ConditionEditWidget (the widget to edit the conditions of a rule)
//
//============================================================================
-ConditionEditWidget::ConditionEditWidget(KScoringManager *m, QWidget *p, const char *n)
+ConditionEditWidget::ConditionEditWidget(KScoringManager *m, TQWidget *p, const char *n)
: KWidgetLister(1,8,p,n), manager(m)
{
// create one initial widget
@@ -160,12 +160,12 @@ ConditionEditWidget::ConditionEditWidget(KScoringManager *m, QWidget *p, const c
ConditionEditWidget::~ConditionEditWidget()
{}
-QWidget* ConditionEditWidget::createWidget(QWidget *parent)
+TQWidget* ConditionEditWidget::createWidget(TQWidget *parent)
{
return new SingleConditionWidget(manager,parent);
}
-void ConditionEditWidget::clearWidget(QWidget *w)
+void ConditionEditWidget::clearWidget(TQWidget *w)
{
Q_ASSERT( w->isA("SingleConditionWidget") );
SingleConditionWidget *sw = dynamic_cast<SingleConditionWidget*>(w);
@@ -194,7 +194,7 @@ void ConditionEditWidget::slotEditRule(KScoringRule *rule)
void ConditionEditWidget::updateRule(KScoringRule *rule)
{
rule->cleanExpressions();
- for(QWidget *w = mWidgetList.first(); w; w = mWidgetList.next()) {
+ for(TQWidget *w = mWidgetList.first(); w; w = mWidgetList.next()) {
if (! w->isA("SingleConditionWidget")) {
kdWarning(5100) << "there is a widget in ConditionEditWidget "
<< "which isn't a SingleConditionWidget" << endl;
@@ -211,29 +211,29 @@ void ConditionEditWidget::updateRule(KScoringRule *rule)
// class SingleActionWidget (editor for one action, used in ActionEditWidget)
//
//============================================================================
-SingleActionWidget::SingleActionWidget(KScoringManager *m,QWidget *p, const char *n)
- : QWidget(p,n), notifyEditor(0), scoreEditor(0), colorEditor(0),manager(m)
+SingleActionWidget::SingleActionWidget(KScoringManager *m,TQWidget *p, const char *n)
+ : TQWidget(p,n), notifyEditor(0), scoreEditor(0), colorEditor(0),manager(m)
{
- QHBoxLayout *topL = new QHBoxLayout(this,0,5);
+ TQHBoxLayout *topL = new TQHBoxLayout(this,0,5);
types = new KComboBox(this);
types->setEditable(false);
topL->addWidget(types);
- stack = new QWidgetStack(this);
+ stack = new TQWidgetStack(this);
topL->addWidget(stack);
- dummyLabel = new QLabel(i18n("Select an action."), stack);
+ dummyLabel = new TQLabel(i18n("Select an action."), stack);
stack->addWidget(dummyLabel, 0);
// init widget stack and the types combo box
int index = 1;
- types->insertItem(QString::null);
- QStringList l = ActionBase::userNames();
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
- QString name = *it;
+ types->insertItem(TQString::null);
+ TQStringList l = ActionBase::userNames();
+ for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
+ TQString name = *it;
int feature = ActionBase::getTypeForUserName(name);
if (manager->hasFeature(feature)) {
types->insertItem(name);
- QWidget *w=0;
+ TQWidget *w=0;
switch (feature) {
case ActionBase::SETSCORE:
w = scoreEditor = new KIntSpinBox(-99999,99999,1,0,10, stack);
@@ -245,7 +245,7 @@ SingleActionWidget::SingleActionWidget(KScoringManager *m,QWidget *p, const char
w = colorEditor = new KColorCombo(stack);
break;
case ActionBase::MARKASREAD:
- w = new QLabel( stack ); // empty dummy
+ w = new TQLabel( stack ); // empty dummy
break;
}
if ( w )
@@ -253,7 +253,7 @@ SingleActionWidget::SingleActionWidget(KScoringManager *m,QWidget *p, const char
}
}
- connect(types,SIGNAL(activated(int)),stack,SLOT(raiseWidget(int)));
+ connect(types,TQT_SIGNAL(activated(int)),stack,TQT_SLOT(raiseWidget(int)));
// raise the dummy label
types->setCurrentItem(0);
@@ -278,7 +278,7 @@ void SingleActionWidget::setAction(ActionBase *act)
notifyEditor->setText(act->getValueString());
break;
case ActionBase::COLOR:
- colorEditor->setColor(QColor(act->getValueString()));
+ colorEditor->setColor(TQColor(act->getValueString()));
break;
case ActionBase::MARKASREAD:
// nothing
@@ -324,7 +324,7 @@ void SingleActionWidget::clear()
// class ActionEditWidget (the widget to edit the actions of a rule)
//
//============================================================================
-ActionEditWidget::ActionEditWidget(KScoringManager *m,QWidget *p, const char *n)
+ActionEditWidget::ActionEditWidget(KScoringManager *m,TQWidget *p, const char *n)
: KWidgetLister(1,8,p,n), manager(m)
{
// create one initial widget
@@ -334,7 +334,7 @@ ActionEditWidget::ActionEditWidget(KScoringManager *m,QWidget *p, const char *n)
ActionEditWidget::~ActionEditWidget()
{}
-QWidget* ActionEditWidget::createWidget( QWidget *parent )
+TQWidget* ActionEditWidget::createWidget( TQWidget *parent )
{
return new SingleActionWidget(manager,parent);
}
@@ -360,7 +360,7 @@ void ActionEditWidget::slotEditRule(KScoringRule *rule)
void ActionEditWidget::updateRule(KScoringRule *rule)
{
rule->cleanActions();
- for(QWidget *w = mWidgetList.first(); w; w = mWidgetList.next()) {
+ for(TQWidget *w = mWidgetList.first(); w; w = mWidgetList.next()) {
if (! w->isA("SingleActionWidget")) {
kdWarning(5100) << "there is a widget in ActionEditWidget "
<< "which isn't a SingleActionWidget" << endl;
@@ -376,7 +376,7 @@ void ActionEditWidget::updateRule(KScoringRule *rule)
}
}
-void ActionEditWidget::clearWidget(QWidget *w)
+void ActionEditWidget::clearWidget(TQWidget *w)
{
Q_ASSERT( w->isA("SingleActionWidget") );
SingleActionWidget *sw = dynamic_cast<SingleActionWidget*>(w);
@@ -389,86 +389,86 @@ void ActionEditWidget::clearWidget(QWidget *w)
// class RuleEditWidget (the widget to edit one rule)
//
//============================================================================
-RuleEditWidget::RuleEditWidget(KScoringManager *m,QWidget *p, const char *n)
- : QWidget(p,n), dirty(false), manager(m), oldRuleName(QString::null)
+RuleEditWidget::RuleEditWidget(KScoringManager *m,TQWidget *p, const char *n)
+ : TQWidget(p,n), dirty(false), manager(m), oldRuleName(TQString::null)
{
kdDebug(5100) << "RuleEditWidget::RuleEditWidget()" << endl;
if ( !n ) setName( "RuleEditWidget" );
- QVBoxLayout *topLayout = new QVBoxLayout( this, 5, KDialog::spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, 5, KDialog::spacingHint() );
//------------- Name, Servers, Groups ---------------------
- QGroupBox *groupB = new QGroupBox(i18n("Properties"),this);
+ TQGroupBox *groupB = new TQGroupBox(i18n("Properties"),this);
topLayout->addWidget(groupB);
- QGridLayout* groupL = new QGridLayout(groupB, 6,2, 8,5);
+ TQGridLayout* groupL = new TQGridLayout(groupB, 6,2, 8,5);
groupL->addRowSpacing(0, fontMetrics().lineSpacing()-4);
// name
ruleNameEdit = new KLineEdit( groupB, "ruleNameEdit" );
groupL->addWidget( ruleNameEdit, 1, 1 );
- QLabel *ruleNameLabel = new QLabel(ruleNameEdit, i18n("&Name:"), groupB, "ruleNameLabel");
+ TQLabel *ruleNameLabel = new TQLabel(ruleNameEdit, i18n("&Name:"), groupB, "ruleNameLabel");
groupL->addWidget( ruleNameLabel, 1, 0 );
// groups
groupsEdit = new KLineEdit( groupB, "groupsEdit" );
groupL->addWidget( groupsEdit, 2, 1 );
- QLabel *groupsLabel = new QLabel(groupsEdit, i18n("&Groups:"), groupB, "groupsLabel");
+ TQLabel *groupsLabel = new TQLabel(groupsEdit, i18n("&Groups:"), groupB, "groupsLabel");
groupL->addWidget( groupsLabel, 2, 0 );
- QPushButton *groupsBtn = new QPushButton(i18n("A&dd Group"), groupB);
- connect(groupsBtn,SIGNAL(clicked()),SLOT(slotAddGroup()));
+ TQPushButton *groupsBtn = new TQPushButton(i18n("A&dd Group"), groupB);
+ connect(groupsBtn,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddGroup()));
groupL->addWidget( groupsBtn, 3, 0 );
groupsBox = new KComboBox( false, groupB, "groupsBox" );
groupsBox->setDuplicatesEnabled(false);
groupsBox->insertStringList(manager->getGroups());
- groupsBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
+ groupsBox->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed));
groupL->addWidget( groupsBox, 3, 1 );
// expires
- expireCheck = new QCheckBox(i18n("&Expire rule automatically"), groupB);
+ expireCheck = new TQCheckBox(i18n("&Expire rule automatically"), groupB);
groupL->addMultiCellWidget( expireCheck, 4,4, 0,1 );
expireEdit = new KIntSpinBox(1,99999,1,30,10, groupB, "expireWidget");
//Init suffix
slotExpireEditChanged(30);
- connect(expireEdit, SIGNAL(valueChanged(int)), SLOT(slotExpireEditChanged(int)));
+ connect(expireEdit, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotExpireEditChanged(int)));
groupL->addWidget( expireEdit, 5, 1 );
- expireLabel = new QLabel(expireEdit, i18n("&Rule is valid for:"), groupB, "expireLabel");
+ expireLabel = new TQLabel(expireEdit, i18n("&Rule is valid for:"), groupB, "expireLabel");
groupL->addWidget( expireLabel, 5, 0 );
expireLabel->setEnabled(false);
expireEdit->setEnabled(false);
- connect(expireCheck, SIGNAL(toggled(bool)), expireLabel, SLOT(setEnabled(bool)));
- connect(expireCheck, SIGNAL(toggled(bool)), expireEdit, SLOT(setEnabled(bool)));
+ connect(expireCheck, TQT_SIGNAL(toggled(bool)), expireLabel, TQT_SLOT(setEnabled(bool)));
+ connect(expireCheck, TQT_SIGNAL(toggled(bool)), expireEdit, TQT_SLOT(setEnabled(bool)));
//------------- Conditions ---------------------
- QGroupBox *groupConds = new QGroupBox(i18n("Conditions"), this);
+ TQGroupBox *groupConds = new TQGroupBox(i18n("Conditions"), this);
topLayout->addWidget(groupConds);
- QGridLayout *condL = new QGridLayout(groupConds, 3,2, 8,5);
+ TQGridLayout *condL = new TQGridLayout(groupConds, 3,2, 8,5);
condL->addRowSpacing(0, fontMetrics().lineSpacing()-4);
- QButtonGroup *buttonGroup = new QButtonGroup(groupConds);
+ TQButtonGroup *buttonGroup = new TQButtonGroup(groupConds);
buttonGroup->hide();
- linkModeAnd = new QRadioButton(i18n("Match a&ll conditions"), groupConds);
+ linkModeAnd = new TQRadioButton(i18n("Match a&ll conditions"), groupConds);
buttonGroup->insert(linkModeAnd);
condL->addWidget(linkModeAnd, 1,0);
- linkModeOr = new QRadioButton(i18n("Matc&h any condition"), groupConds);
+ linkModeOr = new TQRadioButton(i18n("Matc&h any condition"), groupConds);
buttonGroup->insert(linkModeOr);
condL->addWidget(linkModeOr, 1,1);
linkModeAnd->setChecked(true);
condEditor = new ConditionEditWidget(manager,groupConds);
condL->addMultiCellWidget(condEditor, 2,2, 0,1);
- connect(condEditor,SIGNAL(widgetRemoved()),this,SLOT(slotShrink()));
+ connect(condEditor,TQT_SIGNAL(widgetRemoved()),this,TQT_SLOT(slotShrink()));
//------------- Actions ---------------------
- QGroupBox *groupActions = new QGroupBox(i18n("Actions"), this);
+ TQGroupBox *groupActions = new TQGroupBox(i18n("Actions"), this);
topLayout->addWidget(groupActions);
- QBoxLayout *actionL = new QVBoxLayout(groupActions,8,5);
+ TQBoxLayout *actionL = new TQVBoxLayout(groupActions,8,5);
actionL->addSpacing(fontMetrics().lineSpacing()-4);
actionEditor = new ActionEditWidget(manager,groupActions);
actionL->addWidget(actionEditor);
- connect(actionEditor,SIGNAL(widgetRemoved()),this,SLOT(slotShrink()));
+ connect(actionEditor,TQT_SIGNAL(widgetRemoved()),this,TQT_SLOT(slotShrink()));
topLayout->addStretch(1);
@@ -479,7 +479,7 @@ RuleEditWidget::~RuleEditWidget()
{
}
-void RuleEditWidget::slotEditRule(const QString& ruleName)
+void RuleEditWidget::slotEditRule(const TQString& ruleName)
{
kdDebug(5100) << "RuleEditWidget::slotEditRule(" << ruleName << ")" << endl;
// // first update the old rule if there is one
@@ -508,7 +508,7 @@ void RuleEditWidget::slotEditRule(const QString& ruleName)
expireEdit->setEnabled(b);
expireLabel->setEnabled(b);
if (b)
- expireEdit->setValue(QDate::currentDate().daysTo(rule->getExpireDate()));
+ expireEdit->setValue(TQDate::currentDate().daysTo(rule->getExpireDate()));
else
expireEdit->setValue(30);
if (rule->getLinkMode() == KScoringRule::AND) {
@@ -533,22 +533,22 @@ void RuleEditWidget::clearContents()
expireEdit->setEnabled(false);
condEditor->slotEditRule(0);
actionEditor->slotEditRule(0);
- oldRuleName = QString::null;
+ oldRuleName = TQString::null;
}
void RuleEditWidget::updateRule(KScoringRule *rule)
{
- oldRuleName = QString::null;
- QString groups = groupsEdit->text();
+ oldRuleName = TQString::null;
+ TQString groups = groupsEdit->text();
if (groups.isEmpty())
- rule->setGroups(QStringList(".*"));
+ rule->setGroups(TQStringList(".*"));
else
- rule->setGroups(QStringList::split(";",groups));
+ rule->setGroups(TQStringList::split(";",groups));
bool b = expireCheck->isChecked();
if (b)
- rule->setExpireDate(QDate::currentDate().addDays(expireEdit->value()));
+ rule->setExpireDate(TQDate::currentDate().addDays(expireEdit->value()));
else
- rule->setExpireDate(QDate());
+ rule->setExpireDate(TQDate());
actionEditor->updateRule(rule);
rule->setLinkMode(linkModeAnd->isChecked()?KScoringRule::AND:KScoringRule::OR);
condEditor->updateRule(rule);
@@ -564,10 +564,10 @@ void RuleEditWidget::updateRule()
void RuleEditWidget::slotAddGroup()
{
- QString grp = groupsBox->currentText();
+ TQString grp = groupsBox->currentText();
if ( grp.isEmpty() )
return;
- QString txt = groupsEdit->text().stripWhiteSpace();
+ TQString txt = groupsEdit->text().stripWhiteSpace();
if ( txt == ".*" || txt.isEmpty() ) groupsEdit->setText(grp);
else groupsEdit->setText(txt + ";" + grp);
}
@@ -594,79 +594,79 @@ void RuleEditWidget::slotExpireEditChanged(int value)
// class RuleListWidget (the widget for managing a list of rules)
//
//============================================================================
-RuleListWidget::RuleListWidget(KScoringManager *m, bool standalone, QWidget *p, const char *n)
- : QWidget(p,n), alone(standalone), manager(m)
+RuleListWidget::RuleListWidget(KScoringManager *m, bool standalone, TQWidget *p, const char *n)
+ : TQWidget(p,n), alone(standalone), manager(m)
{
kdDebug(5100) << "RuleListWidget::RuleListWidget()" << endl;
if (!n) setName("RuleListWidget");
- QVBoxLayout *topL = new QVBoxLayout(this,standalone? 0:5,KDialog::spacingHint());
+ TQVBoxLayout *topL = new TQVBoxLayout(this,standalone? 0:5,KDialog::spacingHint());
ruleList = new KListBox(this);
if (standalone) {
- connect(ruleList,SIGNAL(doubleClicked(QListBoxItem*)),
- this,SLOT(slotEditRule(QListBoxItem*)));
- connect(ruleList,SIGNAL(returnPressed(QListBoxItem*)),
- this,SLOT(slotEditRule(QListBoxItem*)));
+ connect(ruleList,TQT_SIGNAL(doubleClicked(TQListBoxItem*)),
+ this,TQT_SLOT(slotEditRule(TQListBoxItem*)));
+ connect(ruleList,TQT_SIGNAL(returnPressed(TQListBoxItem*)),
+ this,TQT_SLOT(slotEditRule(TQListBoxItem*)));
}
- connect(ruleList, SIGNAL(currentChanged(QListBoxItem*)),
- this, SLOT(slotRuleSelected(QListBoxItem*)));
+ connect(ruleList, TQT_SIGNAL(currentChanged(TQListBoxItem*)),
+ this, TQT_SLOT(slotRuleSelected(TQListBoxItem*)));
topL->addWidget(ruleList);
- QHBoxLayout *btnL = new QHBoxLayout( topL, KDialog::spacingHint() );
- mRuleUp = new QPushButton( this );
+ TQHBoxLayout *btnL = new TQHBoxLayout( topL, KDialog::spacingHint() );
+ mRuleUp = new TQPushButton( this );
mRuleUp->setPixmap( BarIcon( "up", KIcon::SizeSmall ) );
- QToolTip::add( mRuleUp, i18n("Move rule up") );
+ TQToolTip::add( mRuleUp, i18n("Move rule up") );
btnL->addWidget( mRuleUp );
- connect( mRuleUp, SIGNAL( clicked() ), SLOT( slotRuleUp() ) );
- mRuleDown = new QPushButton( this );
+ connect( mRuleUp, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRuleUp() ) );
+ mRuleDown = new TQPushButton( this );
mRuleDown->setPixmap( BarIcon( "down", KIcon::SizeSmall ) );
- QToolTip::add( mRuleDown, i18n("Move rule down") );
+ TQToolTip::add( mRuleDown, i18n("Move rule down") );
btnL->addWidget( mRuleDown );
- connect( mRuleDown, SIGNAL( clicked() ), SLOT( slotRuleDown() ) );
+ connect( mRuleDown, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRuleDown() ) );
- btnL = new QHBoxLayout( topL, KDialog::spacingHint() );
+ btnL = new TQHBoxLayout( topL, KDialog::spacingHint() );
editRule=0L;
- newRule = new QPushButton(this);
+ newRule = new TQPushButton(this);
newRule->setPixmap( BarIcon( "filenew", KIcon::SizeSmall ) );
- QToolTip::add(newRule,i18n("New rule")),
+ TQToolTip::add(newRule,i18n("New rule")),
btnL->addWidget(newRule);
- connect(newRule, SIGNAL(clicked()), this, SLOT(slotNewRule()));
+ connect(newRule, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewRule()));
// if we're standalone, we need an additional edit button
if (standalone) {
- editRule = new QPushButton(this);
+ editRule = new TQPushButton(this);
editRule->setIconSet( BarIconSet("edit", KIcon::SizeSmall) );
- QToolTip::add(editRule,i18n("Edit rule"));
+ TQToolTip::add(editRule,i18n("Edit rule"));
btnL->addWidget(editRule);
- connect(editRule,SIGNAL(clicked()),this,SLOT(slotEditRule()));
+ connect(editRule,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotEditRule()));
}
- delRule = new QPushButton(this);
+ delRule = new TQPushButton(this);
delRule->setIconSet( BarIconSet( "editdelete", KIcon::SizeSmall ) );
- QToolTip::add(delRule,i18n("Remove rule"));
+ TQToolTip::add(delRule,i18n("Remove rule"));
btnL->addWidget(delRule);
- connect(delRule, SIGNAL(clicked()), this, SLOT(slotDelRule()));
- copyRule = new QPushButton(this);
+ connect(delRule, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDelRule()));
+ copyRule = new TQPushButton(this);
copyRule->setIconSet(BarIconSet("editcopy", KIcon::SizeSmall));
- QToolTip::add(copyRule,i18n("Copy rule"));
+ TQToolTip::add(copyRule,i18n("Copy rule"));
btnL->addWidget(copyRule);
- connect(copyRule, SIGNAL(clicked()), this, SLOT(slotCopyRule()));
+ connect(copyRule, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCopyRule()));
// the group filter
- QBoxLayout *filterL = new QVBoxLayout(topL,KDialog::spacingHint());
+ TQBoxLayout *filterL = new TQVBoxLayout(topL,KDialog::spacingHint());
KComboBox *filterBox = new KComboBox(this);
- QStringList l = m->getGroups();
+ TQStringList l = m->getGroups();
filterBox->insertItem(i18n("<all groups>"));
filterBox->insertStringList(l);
- filterBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
- connect(filterBox,SIGNAL(activated(const QString&)),
- this,SLOT(slotGroupFilter(const QString&)));
+ filterBox->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed));
+ connect(filterBox,TQT_SIGNAL(activated(const TQString&)),
+ this,TQT_SLOT(slotGroupFilter(const TQString&)));
slotGroupFilter(i18n("<all groups>"));
- QLabel *lab = new QLabel(filterBox,i18n("Sho&w only rules for group:"),this);
+ TQLabel *lab = new TQLabel(filterBox,i18n("Sho&w only rules for group:"),this);
filterL->addWidget(lab);
filterL->addWidget(filterBox);
- connect(manager,SIGNAL(changedRules()),
- this,SLOT(updateRuleList()));
- connect(manager,SIGNAL(changedRuleName(const QString&,const QString&)),
- this,SLOT(slotRuleNameChanged(const QString&,const QString&)));
+ connect(manager,TQT_SIGNAL(changedRules()),
+ this,TQT_SLOT(updateRuleList()));
+ connect(manager,TQT_SIGNAL(changedRuleName(const TQString&,const TQString&)),
+ this,TQT_SLOT(slotRuleNameChanged(const TQString&,const TQString&)));
updateRuleList();
updateButton();
@@ -684,7 +684,7 @@ void RuleListWidget::updateButton()
delRule->setEnabled(state);
copyRule->setEnabled(state);
- QListBoxItem *item = ruleList->item( ruleList->currentItem() );
+ TQListBoxItem *item = ruleList->item( ruleList->currentItem() );
if ( item ) {
mRuleUp->setEnabled( item->prev() != 0 );
mRuleDown->setEnabled( item->next() != 0 );
@@ -695,10 +695,10 @@ void RuleListWidget::updateRuleList()
{
emit leavingRule();
kdDebug(5100) << "RuleListWidget::updateRuleList()" << endl;
- QString curr = ruleList->currentText();
+ TQString curr = ruleList->currentText();
ruleList->clear();
if (group == i18n("<all groups>")) {
- QStringList l = manager->getRuleNames();
+ TQStringList l = manager->getRuleNames();
ruleList->insertStringList(l);
} else {
KScoringManager::ScoringRuleList l = manager->getAllRules();
@@ -719,12 +719,12 @@ void RuleListWidget::updateRuleList()
void RuleListWidget::updateRuleList(const KScoringRule *rule)
{
kdDebug(5100) << "RuleListWidget::updateRuleList(" << rule->getName() << ")" << endl;
- QString name = rule->getName();
+ TQString name = rule->getName();
updateRuleList();
slotRuleSelected(name);
}
-void RuleListWidget::slotRuleNameChanged(const QString& oldName, const QString& newName)
+void RuleListWidget::slotRuleNameChanged(const TQString& oldName, const TQString& newName)
{
int ind = ruleList->currentItem();
for (uint i=0;i<ruleList->count();++i)
@@ -735,7 +735,7 @@ void RuleListWidget::slotRuleNameChanged(const QString& oldName, const QString&
}
}
-void RuleListWidget::slotEditRule(const QString& s)
+void RuleListWidget::slotEditRule(const TQString& s)
{
emit ruleEdited(s);
}
@@ -746,21 +746,21 @@ void RuleListWidget::slotEditRule()
emit ruleEdited(ruleList->currentText());
}
else if (ruleList->count() == 0)
- emit ruleEdited(QString::null);
+ emit ruleEdited(TQString::null);
}
-void RuleListWidget::slotEditRule(QListBoxItem* item)
+void RuleListWidget::slotEditRule(TQListBoxItem* item)
{
slotEditRule(item->text());
}
-void RuleListWidget::slotGroupFilter(const QString& s)
+void RuleListWidget::slotGroupFilter(const TQString& s)
{
group = s;
updateRuleList();
}
-void RuleListWidget::slotRuleSelected(const QString& ruleName)
+void RuleListWidget::slotRuleSelected(const TQString& ruleName)
{
emit leavingRule();
kdDebug(5100) << "RuleListWidget::slotRuleSelected(" << ruleName << ")" << endl;
@@ -771,10 +771,10 @@ void RuleListWidget::slotRuleSelected(const QString& ruleName)
emit ruleSelected(ruleName);
}
-void RuleListWidget::slotRuleSelected(QListBoxItem *item)
+void RuleListWidget::slotRuleSelected(TQListBoxItem *item)
{
if (!item) return;
- QString ruleName = item->text();
+ TQString ruleName = item->text();
slotRuleSelected(ruleName);
}
@@ -782,7 +782,7 @@ void RuleListWidget::slotRuleSelected(int index)
{
uint idx = index;
if (idx >= ruleList->count()) return;
- QString ruleName = ruleList->text(index);
+ TQString ruleName = ruleList->text(index);
slotRuleSelected(ruleName);
}
@@ -808,7 +808,7 @@ void RuleListWidget::slotDelRule()
void RuleListWidget::slotCopyRule()
{
emit leavingRule();
- QString ruleName = ruleList->currentText();
+ TQString ruleName = ruleList->currentText();
KScoringRule *rule = manager->findRule(ruleName);
if (rule) {
KScoringRule *nrule = manager->copyRule(rule);
@@ -821,7 +821,7 @@ void RuleListWidget::slotCopyRule()
void RuleListWidget::slotRuleUp()
{
KScoringRule *rule = 0, *below = 0;
- QListBoxItem *item = ruleList->item( ruleList->currentItem() );
+ TQListBoxItem *item = ruleList->item( ruleList->currentItem() );
if ( item ) {
rule = manager->findRule( item->text() );
item = item->prev();
@@ -837,7 +837,7 @@ void RuleListWidget::slotRuleUp()
void RuleListWidget::slotRuleDown()
{
KScoringRule *rule = 0, *above = 0;
- QListBoxItem *item = ruleList->item( ruleList->currentItem() );
+ TQListBoxItem *item = ruleList->item( ruleList->currentItem() );
if ( item ) {
rule = manager->findRule( item->text() );
item = item->next();
@@ -858,7 +858,7 @@ void RuleListWidget::slotRuleDown()
KScoringEditor* KScoringEditor::scoreEditor = 0;
KScoringEditor::KScoringEditor(KScoringManager* m,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KDialogBase(parent,name,false,i18n("Rule Editor"),Ok|Apply|Cancel,Ok,true), manager(m)
{
manager->pushRuleList();
@@ -867,26 +867,26 @@ KScoringEditor::KScoringEditor(KScoringManager* m,
if (!name) setName("KScoringEditor");
// the left side gives an overview about all rules, the right side
// shows a detailed view of an selected rule
- QWidget *w = new QWidget(this);
+ TQWidget *w = new TQWidget(this);
setMainWidget(w);
- QHBoxLayout *hbl = new QHBoxLayout(w,0,spacingHint());
+ TQHBoxLayout *hbl = new TQHBoxLayout(w,0,spacingHint());
ruleLister = new RuleListWidget(manager,false,w);
hbl->addWidget(ruleLister);
ruleEditor = new RuleEditWidget(manager,w);
hbl->addWidget(ruleEditor);
- connect(ruleLister,SIGNAL(ruleSelected(const QString&)),
- ruleEditor, SLOT(slotEditRule(const QString&)));
- connect(ruleLister, SIGNAL(leavingRule()),
- ruleEditor, SLOT(updateRule()));
- connect(ruleEditor, SIGNAL(shrink()), SLOT(slotShrink()));
- connect(this,SIGNAL(finished()),SLOT(slotFinished()));
+ connect(ruleLister,TQT_SIGNAL(ruleSelected(const TQString&)),
+ ruleEditor, TQT_SLOT(slotEditRule(const TQString&)));
+ connect(ruleLister, TQT_SIGNAL(leavingRule()),
+ ruleEditor, TQT_SLOT(updateRule()));
+ connect(ruleEditor, TQT_SIGNAL(shrink()), TQT_SLOT(slotShrink()));
+ connect(this,TQT_SIGNAL(finished()),TQT_SLOT(slotFinished()));
ruleLister->slotRuleSelected(0);
resize(550, sizeHint().height());
}
void KScoringEditor::setDirty()
{
- QPushButton *applyBtn = actionButton(Apply);
+ TQPushButton *applyBtn = actionButton(Apply);
applyBtn->setEnabled(true);
}
@@ -896,7 +896,7 @@ KScoringEditor::~KScoringEditor()
}
KScoringEditor* KScoringEditor::createEditor(KScoringManager* m,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
{
if (scoreEditor) return scoreEditor;
else return new KScoringEditor(m,parent,name);
@@ -905,25 +905,25 @@ KScoringEditor* KScoringEditor::createEditor(KScoringManager* m,
void KScoringEditor::setRule(KScoringRule* r)
{
kdDebug(5100) << "KScoringEditor::setRule(" << r->getName() << ")" << endl;
- QString ruleName = r->getName();
+ TQString ruleName = r->getName();
ruleLister->slotRuleSelected(ruleName);
}
void KScoringEditor::slotShrink()
{
- QTimer::singleShot(5, this, SLOT(slotDoShrink()));
+ TQTimer::singleShot(5, this, TQT_SLOT(slotDoShrink()));
}
void KScoringEditor::slotDoShrink()
{
updateGeometry();
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
resize(width(),sizeHint().height());
}
void KScoringEditor::slotApply()
{
- QString ruleName = ruleLister->currentRule();
+ TQString ruleName = ruleLister->currentRule();
KScoringRule *rule = manager->findRule(ruleName);
if (rule) {
ruleEditor->updateRule(rule);
@@ -957,16 +957,16 @@ void KScoringEditor::slotFinished()
// class KScoringEditorWidgetDialog (a dialog for the KScoringEditorWidget)
//
//============================================================================
-KScoringEditorWidgetDialog::KScoringEditorWidgetDialog(KScoringManager *m, const QString& r, QWidget *p, const char *n)
+KScoringEditorWidgetDialog::KScoringEditorWidgetDialog(KScoringManager *m, const TQString& r, TQWidget *p, const char *n)
: KDialogBase(p,n,true,i18n("Edit Rule"),
KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Close,
KDialogBase::Ok,true),
manager(m), ruleName(r)
{
- QFrame *f = makeMainWidget();
- QBoxLayout *topL = new QVBoxLayout(f);
+ TQFrame *f = makeMainWidget();
+ TQBoxLayout *topL = new TQVBoxLayout(f);
ruleEditor = new RuleEditWidget(manager,f);
- connect(ruleEditor, SIGNAL(shrink()), SLOT(slotShrink()));
+ connect(ruleEditor, TQT_SIGNAL(shrink()), TQT_SLOT(slotShrink()));
topL->addWidget(ruleEditor);
ruleEditor->slotEditRule(ruleName);
resize(0,0);
@@ -989,13 +989,13 @@ void KScoringEditorWidgetDialog::slotOk()
void KScoringEditorWidgetDialog::slotShrink()
{
- QTimer::singleShot(5, this, SLOT(slotDoShrink()));
+ TQTimer::singleShot(5, this, TQT_SLOT(slotDoShrink()));
}
void KScoringEditorWidgetDialog::slotDoShrink()
{
updateGeometry();
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
resize(width(),sizeHint().height());
}
@@ -1004,14 +1004,14 @@ void KScoringEditorWidgetDialog::slotDoShrink()
// class KScoringEditorWidget (a reusable widget for config dialog...)
//
//============================================================================
-KScoringEditorWidget::KScoringEditorWidget(KScoringManager *m,QWidget *p, const char *n)
- : QWidget(p,n), manager(m)
+KScoringEditorWidget::KScoringEditorWidget(KScoringManager *m,TQWidget *p, const char *n)
+ : TQWidget(p,n), manager(m)
{
- QBoxLayout *topL = new QVBoxLayout(this);
+ TQBoxLayout *topL = new TQVBoxLayout(this);
ruleLister = new RuleListWidget(manager,true,this);
topL->addWidget(ruleLister);
- connect(ruleLister,SIGNAL(ruleEdited(const QString&)),
- this,SLOT(slotRuleEdited(const QString &)));
+ connect(ruleLister,TQT_SIGNAL(ruleEdited(const TQString&)),
+ this,TQT_SLOT(slotRuleEdited(const TQString &)));
}
KScoringEditorWidget::~KScoringEditorWidget()
@@ -1019,7 +1019,7 @@ KScoringEditorWidget::~KScoringEditorWidget()
manager->editorReady();
}
-void KScoringEditorWidget::slotRuleEdited(const QString& ruleName)
+void KScoringEditorWidget::slotRuleEdited(const TQString& ruleName)
{
KScoringEditorWidgetDialog dlg(manager,ruleName,this);
dlg.exec();
diff --git a/libkdepim/kscoringeditor.h b/libkdepim/kscoringeditor.h
index 5fc919f86..1f201be95 100644
--- a/libkdepim/kscoringeditor.h
+++ b/libkdepim/kscoringeditor.h
@@ -18,10 +18,10 @@
#ifndef SCOREEDITWIDGET_H
#define SCOREEDITWIDGET_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kdialogbase.h>
-#include <qtable.h>
-#include <qframe.h>
+#include <tqtable.h>
+#include <tqframe.h>
#include "kwidgetlister.h"
@@ -54,7 +54,7 @@ class KDE_EXPORT SingleConditionWidget : public QFrame
Q_OBJECT
friend class ConditionEditWidget;
public:
- SingleConditionWidget(KScoringManager *,QWidget *p =0, const char *n =0);
+ SingleConditionWidget(KScoringManager *,TQWidget *p =0, const char *n =0);
~SingleConditionWidget();
void setCondition(KScoringExpression*);
KScoringExpression *createCondition() const;
@@ -66,7 +66,7 @@ protected slots:
private:
/** marks a condition as negated */
- QCheckBox *neg;
+ TQCheckBox *neg;
/** list of possible headers */
KComboBox *headers;
/** list of match types */
@@ -74,7 +74,7 @@ private:
/** the expression which will be matched */
KLineEdit *expr;
/** the button to open the regexp-editor */
- QPushButton *regExpButton;
+ TQPushButton *regExpButton;
KScoringManager *manager;
};
@@ -85,11 +85,11 @@ class ConditionEditWidget: public KWidgetLister
{
Q_OBJECT
public:
- ConditionEditWidget(KScoringManager *,QWidget *p =0, const char *n =0);
+ ConditionEditWidget(KScoringManager *,TQWidget *p =0, const char *n =0);
~ConditionEditWidget();
- QWidget* createWidget(QWidget*);
+ TQWidget* createWidget(TQWidget*);
void updateRule(KScoringRule*);
- void clearWidget(QWidget*);
+ void clearWidget(TQWidget*);
public slots:
void slotEditRule(KScoringRule*);
private:
@@ -104,7 +104,7 @@ class SingleActionWidget : public QWidget
Q_OBJECT
friend class ActionEditWidget;
public:
- SingleActionWidget(KScoringManager *m,QWidget *p =0, const char *n =0);
+ SingleActionWidget(KScoringManager *m,TQWidget *p =0, const char *n =0);
~SingleActionWidget();
void setAction(ActionBase*);
ActionBase *createAction() const;
@@ -113,7 +113,7 @@ private:
/** the list of available action */
KComboBox *types;
/** the stack of the edit widgets for each action type */
- QWidgetStack *stack;
+ TQWidgetStack *stack;
/** the notify action editor */
KLineEdit *notifyEditor;
/** the score acton editor */
@@ -121,7 +121,7 @@ private:
/** the color action editor */
KColorCombo *colorEditor;
/** the dummy label */
- QLabel *dummyLabel;
+ TQLabel *dummyLabel;
KScoringManager *manager;
};
@@ -132,11 +132,11 @@ class KDE_EXPORT ActionEditWidget : public KWidgetLister
{
Q_OBJECT
public:
- ActionEditWidget(KScoringManager *m,QWidget *p =0, const char *n =0);
+ ActionEditWidget(KScoringManager *m,TQWidget *p =0, const char *n =0);
~ActionEditWidget();
- QWidget* createWidget(QWidget *parent);
+ TQWidget* createWidget(TQWidget *parent);
void updateRule(KScoringRule*);
- void clearWidget(QWidget *);
+ void clearWidget(TQWidget *);
public slots:
void slotEditRule(KScoringRule *);
private:
@@ -149,11 +149,11 @@ class RuleEditWidget : public QWidget
{
Q_OBJECT
public:
- RuleEditWidget(KScoringManager *m,QWidget *p =0, const char *n =0);
+ RuleEditWidget(KScoringManager *m,TQWidget *p =0, const char *n =0);
~RuleEditWidget();
public slots:
void setDirty();
- void slotEditRule(const QString&);
+ void slotEditRule(const TQString&);
void updateRule(KScoringRule*);
void updateRule();
signals:
@@ -174,13 +174,13 @@ private:
/** list of all available groups */
KComboBox *groupsBox;
/** the expire enable */
- QCheckBox *expireCheck;
+ TQCheckBox *expireCheck;
/** the label to the expireCheck */
- QLabel *expireLabel;
+ TQLabel *expireLabel;
/** the expire delay */
KIntSpinBox *expireEdit;
/** the link modes of the conditions */
- QRadioButton *linkModeOr, *linkModeAnd;
+ TQRadioButton *linkModeOr, *linkModeAnd;
/** the actions editor */
ActionEditWidget *actionEditor;
/** the conditions editor */
@@ -189,7 +189,7 @@ private:
KScoringManager *manager;
// the old name of the current rule
- QString oldRuleName;
+ TQString oldRuleName;
};
/** This widget shows a list of rules with buttons for
@@ -199,27 +199,27 @@ class KDE_EXPORT RuleListWidget : public QWidget
{
Q_OBJECT
public:
- RuleListWidget(KScoringManager *m, bool =false, QWidget *p =0, const char *n =0);
+ RuleListWidget(KScoringManager *m, bool =false, TQWidget *p =0, const char *n =0);
~RuleListWidget();
- QString currentRule() const { return ruleList->currentText(); }
+ TQString currentRule() const { return ruleList->currentText(); }
protected:
void updateButton();
signals:
- void ruleSelected(const QString&);
- void ruleEdited(const QString&);
+ void ruleSelected(const TQString&);
+ void ruleEdited(const TQString&);
void leavingRule();
public slots:
- void slotRuleSelected(const QString&);
- void slotRuleSelected(QListBoxItem *);
+ void slotRuleSelected(const TQString&);
+ void slotRuleSelected(TQListBoxItem *);
void slotRuleSelected(int);
void updateRuleList();
void updateRuleList(const KScoringRule*);
- void slotRuleNameChanged(const QString&,const QString&);
+ void slotRuleNameChanged(const TQString&,const TQString&);
protected slots:
- void slotGroupFilter(const QString&);
- void slotEditRule(QListBoxItem*);
- void slotEditRule(const QString&);
+ void slotGroupFilter(const TQString&);
+ void slotEditRule(TQListBoxItem*);
+ void slotEditRule(const TQString&);
void slotEditRule();
void slotDelRule();
void slotNewRule();
@@ -231,18 +231,18 @@ private:
/** the list of rules */
KListBox *ruleList;
/** the current group */
- QString group;
+ TQString group;
/** marks if we're alone or together with the edit widget */
bool alone;
KScoringManager *manager;
- QPushButton *editRule;
- QPushButton *newRule;
- QPushButton *delRule;
- QPushButton *copyRule;
- QPushButton *mRuleUp;
- QPushButton *mRuleDown;
+ TQPushButton *editRule;
+ TQPushButton *newRule;
+ TQPushButton *delRule;
+ TQPushButton *copyRule;
+ TQPushButton *mRuleUp;
+ TQPushButton *mRuleDown;
};
class KDE_EXPORT KScoringEditor : public KDialogBase
@@ -251,11 +251,11 @@ class KDE_EXPORT KScoringEditor : public KDialogBase
public:
~KScoringEditor();
void setRule(KScoringRule*);
- static KScoringEditor *createEditor(KScoringManager* m, QWidget *parent=0, const char *name=0);
+ static KScoringEditor *createEditor(KScoringManager* m, TQWidget *parent=0, const char *name=0);
static KScoringEditor *editor() { return scoreEditor; }
void setDirty();
protected:
- KScoringEditor(KScoringManager* m, QWidget *parent=0, const char *name=0);
+ KScoringEditor(KScoringManager* m, TQWidget *parent=0, const char *name=0);
private:
/** the editor for the current rule */
RuleEditWidget* ruleEditor;
@@ -279,7 +279,7 @@ class KScoringEditorWidgetDialog : public KDialogBase
{
Q_OBJECT
public:
- KScoringEditorWidgetDialog(KScoringManager *m, const QString& rName, QWidget *parent=0, const char *name=0);
+ KScoringEditorWidgetDialog(KScoringManager *m, const TQString& rName, TQWidget *parent=0, const char *name=0);
protected slots:
void slotApply();
void slotOk();
@@ -288,17 +288,17 @@ protected slots:
private:
RuleEditWidget *ruleEditor;
KScoringManager *manager;
- QString ruleName;
+ TQString ruleName;
};
class KDE_EXPORT KScoringEditorWidget : public QWidget
{
Q_OBJECT
public:
- KScoringEditorWidget(KScoringManager *m,QWidget *p =0, const char *n =0);
+ KScoringEditorWidget(KScoringManager *m,TQWidget *p =0, const char *n =0);
~KScoringEditorWidget();
protected slots:
- void slotRuleEdited(const QString&);
+ void slotRuleEdited(const TQString&);
private:
RuleListWidget *ruleLister;
KScoringManager *manager;
diff --git a/libkdepim/ksubscription.cpp b/libkdepim/ksubscription.cpp
index c0745189e..f61b633ca 100644
--- a/libkdepim/ksubscription.cpp
+++ b/libkdepim/ksubscription.cpp
@@ -13,12 +13,12 @@
#include "ksubscription.h"
#include "kaccount.h"
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qheader.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqheader.h>
+#include <tqtoolbutton.h>
#include <kseparator.h>
#include <kapplication.h>
@@ -30,9 +30,9 @@
//=============================================================================
-KGroupInfo::KGroupInfo(const QString &name, const QString &description,
+KGroupInfo::KGroupInfo(const TQString &name, const TQString &description,
bool newGroup, bool subscribed,
- Status status, QString path)
+ Status status, TQString path)
: name(name), description(description),
newGroup(newGroup), subscribed(subscribed),
status(status), path(path)
@@ -53,9 +53,9 @@ bool KGroupInfo::operator< (const KGroupInfo &gi2)
//=============================================================================
-GroupItem::GroupItem( QListView *v, const KGroupInfo &gi, KSubscription* browser,
+GroupItem::GroupItem( TQListView *v, const KGroupInfo &gi, KSubscription* browser,
bool isCheckItem )
- : QCheckListItem( v, gi.name, isCheckItem ? CheckBox : CheckBoxController ),
+ : TQCheckListItem( v, gi.name, isCheckItem ? CheckBox : CheckBoxController ),
mInfo( gi ), mBrowser( browser ), mIsCheckItem( isCheckItem ),
mIgnoreStateChange( false )
{
@@ -64,9 +64,9 @@ GroupItem::GroupItem( QListView *v, const KGroupInfo &gi, KSubscription* browser
}
//-----------------------------------------------------------------------------
-GroupItem::GroupItem( QListViewItem *i, const KGroupInfo &gi, KSubscription* browser,
+GroupItem::GroupItem( TQListViewItem *i, const KGroupInfo &gi, KSubscription* browser,
bool isCheckItem )
- : QCheckListItem( i, gi.name, isCheckItem ? CheckBox : CheckBoxController ),
+ : TQCheckListItem( i, gi.name, isCheckItem ? CheckBox : CheckBoxController ),
mInfo( gi ), mBrowser( browser ), mIsCheckItem( isCheckItem ),
mIgnoreStateChange( false )
{
@@ -99,7 +99,7 @@ void GroupItem::setOn( bool on )
mInfo.subscribed = on;
}
if (isCheckItem())
- QCheckListItem::setOn(on);
+ TQCheckListItem::setOn(on);
}
//------------------------------------------------------------------------------
@@ -115,7 +115,7 @@ void GroupItem::setVisible( bool b )
{
if (b)
{
- QListViewItem::setVisible(b);
+ TQListViewItem::setVisible(b);
setEnabled(true);
}
else
@@ -123,14 +123,14 @@ void GroupItem::setVisible( bool b )
if (isCheckItem())
{
bool setInvisible = true;
- for (QListViewItem * lvchild = firstChild(); lvchild != 0;
+ for (TQListViewItem * lvchild = firstChild(); lvchild != 0;
lvchild = lvchild->nextSibling())
{
if (lvchild->isVisible()) // item has a visible child
setInvisible = false;
}
if (setInvisible)
- QListViewItem::setVisible(b);
+ TQListViewItem::setVisible(b);
else
{
// leave it visible so that children remain visible
@@ -141,9 +141,9 @@ void GroupItem::setVisible( bool b )
else
{
// non-checkable item
- QPtrList<QListViewItem> moveItems;
+ TQPtrList<TQListViewItem> moveItems;
- for (QListViewItem * lvchild = firstChild(); lvchild != 0;
+ for (TQListViewItem * lvchild = firstChild(); lvchild != 0;
lvchild = lvchild->nextSibling())
{
if (static_cast<GroupItem*>(lvchild)->isCheckItem())
@@ -152,62 +152,62 @@ void GroupItem::setVisible( bool b )
moveItems.append(lvchild);
}
}
- QPtrListIterator<QListViewItem> it( moveItems );
+ TQPtrListIterator<TQListViewItem> it( moveItems );
for ( ; it.current(); ++it)
{
// move the checkitem to top
- QListViewItem* parent = it.current()->parent();
+ TQListViewItem* parent = it.current()->parent();
if (parent) parent->takeItem(it.current());
listView()->insertItem(it.current());
}
- QListViewItem::setVisible(false);
+ TQListViewItem::setVisible(false);
}
}
}
//-----------------------------------------------------------------------------
-void GroupItem::paintCell( QPainter * p, const QColorGroup & cg,
+void GroupItem::paintCell( TQPainter * p, const TQColorGroup & cg,
int column, int width, int align )
{
if (mIsCheckItem)
- return QCheckListItem::paintCell( p, cg, column, width, align );
+ return TQCheckListItem::paintCell( p, cg, column, width, align );
else
- return QListViewItem::paintCell( p, cg, column, width, align );
+ return TQListViewItem::paintCell( p, cg, column, width, align );
}
//-----------------------------------------------------------------------------
-void GroupItem::paintFocus( QPainter * p, const QColorGroup & cg,
- const QRect & r )
+void GroupItem::paintFocus( TQPainter * p, const TQColorGroup & cg,
+ const TQRect & r )
{
if (mIsCheckItem)
- QCheckListItem::paintFocus(p, cg, r);
+ TQCheckListItem::paintFocus(p, cg, r);
else
- QListViewItem::paintFocus(p, cg, r);
+ TQListViewItem::paintFocus(p, cg, r);
}
//-----------------------------------------------------------------------------
-int GroupItem::width( const QFontMetrics& fm, const QListView* lv, int column) const
+int GroupItem::width( const TQFontMetrics& fm, const TQListView* lv, int column) const
{
if (mIsCheckItem)
- return QCheckListItem::width(fm, lv, column);
+ return TQCheckListItem::width(fm, lv, column);
else
- return QListViewItem::width(fm, lv, column);
+ return TQListViewItem::width(fm, lv, column);
}
//-----------------------------------------------------------------------------
void GroupItem::setup()
{
if (mIsCheckItem)
- QCheckListItem::setup();
+ TQCheckListItem::setup();
else
- QListViewItem::setup();
+ TQListViewItem::setup();
}
//=============================================================================
-KSubscription::KSubscription( QWidget *parent, const QString &caption,
- KAccount * acct, int buttons, const QString &user1, bool descriptionColumn )
+KSubscription::KSubscription( TQWidget *parent, const TQString &caption,
+ KAccount * acct, int buttons, const TQString &user1, bool descriptionColumn )
: KDialogBase( parent, 0, true, caption, buttons | Help | Ok | Cancel, Ok,
true, i18n("Reload &List"), user1 ),
mAcct( acct )
@@ -216,35 +216,35 @@ KSubscription::KSubscription( QWidget *parent, const QString &caption,
setWFlags( getWFlags() | WDestructiveClose );
// create Widgets
- page = new QWidget(this);
+ page = new TQWidget(this);
setMainWidget(page);
- QLabel *comment = new QLabel("<p>"+
+ TQLabel *comment = new TQLabel("<p>"+
i18n("Manage which mail folders you want to see in your folder view") + "</p>", page);
- QToolButton *clearButton = new QToolButton( page );
+ TQToolButton *clearButton = new TQToolButton( page );
clearButton->setIconSet( KGlobal::iconLoader()->loadIconSet(
KApplication::reverseLayout() ? "clear_left":"locationbar_erase", KIcon::Small, 0 ) );
filterEdit = new KLineEdit(page);
- QLabel *l = new QLabel(filterEdit,i18n("S&earch:"), page);
- connect( clearButton, SIGNAL( clicked() ), filterEdit, SLOT( clear() ) );
+ TQLabel *l = new TQLabel(filterEdit,i18n("S&earch:"), page);
+ connect( clearButton, TQT_SIGNAL( clicked() ), filterEdit, TQT_SLOT( clear() ) );
// checkboxes
- noTreeCB = new QCheckBox(i18n("Disable &tree view"), page);
+ noTreeCB = new TQCheckBox(i18n("Disable &tree view"), page);
noTreeCB->setChecked(false);
- subCB = new QCheckBox(i18n("&Subscribed only"), page);
+ subCB = new TQCheckBox(i18n("&Subscribed only"), page);
subCB->setChecked(false);
- newCB = new QCheckBox(i18n("&New only"), page);
+ newCB = new TQCheckBox(i18n("&New only"), page);
newCB->setChecked(false);
KSeparator *sep = new KSeparator(KSeparator::HLine, page);
// init the labels
- QFont fnt = font();
+ TQFont fnt = font();
fnt.setBold(true);
- leftLabel = new QLabel(i18n("Loading..."), page);
- rightLabel = new QLabel(i18n("Current changes:"), page);
+ leftLabel = new TQLabel(i18n("Loading..."), page);
+ rightLabel = new TQLabel(i18n("Current changes:"), page);
leftLabel->setFont(fnt);
rightLabel->setFont(fnt);
@@ -252,9 +252,9 @@ KSubscription::KSubscription( QWidget *parent, const QString &caption,
pmRight = BarIconSet("forward");
pmLeft = BarIconSet("back");
- arrowBtn1 = new QPushButton(page);
+ arrowBtn1 = new TQPushButton(page);
arrowBtn1->setEnabled(false);
- arrowBtn2 = new QPushButton(page);
+ arrowBtn2 = new TQPushButton(page);
arrowBtn2->setEnabled(false);
arrowBtn1->setIconSet(pmRight);
arrowBtn2->setIconSet(pmRight);
@@ -262,7 +262,7 @@ KSubscription::KSubscription( QWidget *parent, const QString &caption,
arrowBtn2->setFixedSize(35,30);
// the main listview
- groupView = new QListView(page);
+ groupView = new TQListView(page);
groupView->setRootIsDecorated(true);
groupView->addColumn(i18n("Name"));
groupView->setAllColumnsShowFocus(true);
@@ -272,10 +272,10 @@ KSubscription::KSubscription( QWidget *parent, const QString &caption,
groupView->header()->setStretchEnabled(true, 0);
// layout
- QGridLayout *topL = new QGridLayout(page,4,1,0, KDialog::spacingHint());
- QHBoxLayout *filterL = new QHBoxLayout(KDialog::spacingHint());
- QVBoxLayout *arrL = new QVBoxLayout(KDialog::spacingHint());
- listL = new QGridLayout(2, 3, KDialog::spacingHint());
+ TQGridLayout *topL = new TQGridLayout(page,4,1,0, KDialog::spacingHint());
+ TQHBoxLayout *filterL = new TQHBoxLayout(KDialog::spacingHint());
+ TQVBoxLayout *arrL = new TQVBoxLayout(KDialog::spacingHint());
+ listL = new TQGridLayout(2, 3, KDialog::spacingHint());
topL->addWidget(comment, 0,0);
topL->addLayout(filterL, 1,0);
@@ -301,14 +301,14 @@ KSubscription::KSubscription( QWidget *parent, const QString &caption,
arrL->addWidget(arrowBtn2, AlignCenter);
// listviews
- subView = new QListView(page);
+ subView = new TQListView(page);
subView->addColumn(i18n("Subscribe To"));
subView->header()->setStretchEnabled(true, 0);
- unsubView = new QListView(page);
+ unsubView = new TQListView(page);
unsubView->addColumn(i18n("Unsubscribe From"));
unsubView->header()->setStretchEnabled(true, 0);
- QVBoxLayout *protL = new QVBoxLayout(3);
+ TQVBoxLayout *protL = new TQVBoxLayout(3);
listL->addLayout(protL, 1,2);
protL->addWidget(subView);
protL->addWidget(unsubView);
@@ -323,29 +323,29 @@ KSubscription::KSubscription( QWidget *parent, const QString &caption,
filterEdit->setFocus();
// items clicked
- connect(groupView, SIGNAL(clicked(QListViewItem *)),
- this, SLOT(slotChangeButtonState(QListViewItem*)));
- connect(subView, SIGNAL(clicked(QListViewItem *)),
- this, SLOT(slotChangeButtonState(QListViewItem*)));
- connect(unsubView, SIGNAL(clicked(QListViewItem *)),
- this, SLOT(slotChangeButtonState(QListViewItem*)));
+ connect(groupView, TQT_SIGNAL(clicked(TQListViewItem *)),
+ this, TQT_SLOT(slotChangeButtonState(TQListViewItem*)));
+ connect(subView, TQT_SIGNAL(clicked(TQListViewItem *)),
+ this, TQT_SLOT(slotChangeButtonState(TQListViewItem*)));
+ connect(unsubView, TQT_SIGNAL(clicked(TQListViewItem *)),
+ this, TQT_SLOT(slotChangeButtonState(TQListViewItem*)));
// connect buttons
- connect(arrowBtn1, SIGNAL(clicked()), SLOT(slotButton1()));
- connect(arrowBtn2, SIGNAL(clicked()), SLOT(slotButton2()));
- connect(this, SIGNAL(user1Clicked()), SLOT(slotLoadFolders()));
+ connect(arrowBtn1, TQT_SIGNAL(clicked()), TQT_SLOT(slotButton1()));
+ connect(arrowBtn2, TQT_SIGNAL(clicked()), TQT_SLOT(slotButton2()));
+ connect(this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(slotLoadFolders()));
// connect checkboxes
- connect(subCB, SIGNAL(clicked()), SLOT(slotCBToggled()));
- connect(newCB, SIGNAL(clicked()), SLOT(slotCBToggled()));
- connect(noTreeCB, SIGNAL(clicked()), SLOT(slotCBToggled()));
+ connect(subCB, TQT_SIGNAL(clicked()), TQT_SLOT(slotCBToggled()));
+ connect(newCB, TQT_SIGNAL(clicked()), TQT_SLOT(slotCBToggled()));
+ connect(noTreeCB, TQT_SIGNAL(clicked()), TQT_SLOT(slotCBToggled()));
// connect textfield
- connect(filterEdit, SIGNAL(textChanged(const QString&)),
- SLOT(slotFilterTextChanged(const QString&)));
+ connect(filterEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotFilterTextChanged(const TQString&)));
// update status
- connect(this, SIGNAL(listChanged()), SLOT(slotUpdateStatusLabel()));
+ connect(this, TQT_SIGNAL(listChanged()), TQT_SLOT(slotUpdateStatusLabel()));
}
//-----------------------------------------------------------------------------
@@ -356,7 +356,7 @@ KSubscription::~KSubscription()
//-----------------------------------------------------------------------------
void KSubscription::setStartItem( const KGroupInfo &info )
{
- QListViewItemIterator it(groupView);
+ TQListViewItemIterator it(groupView);
for ( ; it.current(); ++it)
{
@@ -369,10 +369,10 @@ void KSubscription::setStartItem( const KGroupInfo &info )
}
//-----------------------------------------------------------------------------
-void KSubscription::removeListItem( QListView *view, const KGroupInfo &gi )
+void KSubscription::removeListItem( TQListView *view, const KGroupInfo &gi )
{
if(!view) return;
- QListViewItemIterator it(view);
+ TQListViewItemIterator it(view);
for ( ; it.current(); ++it)
{
@@ -387,10 +387,10 @@ void KSubscription::removeListItem( QListView *view, const KGroupInfo &gi )
}
//-----------------------------------------------------------------------------
-QListViewItem* KSubscription::getListItem( QListView *view, const KGroupInfo &gi )
+TQListViewItem* KSubscription::getListItem( TQListView *view, const KGroupInfo &gi )
{
if(!view) return 0;
- QListViewItemIterator it(view);
+ TQListViewItemIterator it(view);
for ( ; it.current(); ++it)
{
@@ -401,10 +401,10 @@ QListViewItem* KSubscription::getListItem( QListView *view, const KGroupInfo &gi
}
//-----------------------------------------------------------------------------
-bool KSubscription::itemInListView( QListView *view, const KGroupInfo &gi )
+bool KSubscription::itemInListView( TQListView *view, const KGroupInfo &gi )
{
if(!view) return false;
- QListViewItemIterator it(view);
+ TQListViewItemIterator it(view);
for ( ; it.current(); ++it)
if (static_cast<GroupItem*>(it.current())->info() == gi)
@@ -445,7 +445,7 @@ void KSubscription::changeItemState( GroupItem* item, bool on )
{
if (!itemInListView(unsubView, item->info()))
{
- QListViewItem *p = item->parent();
+ TQListViewItem *p = item->parent();
while (p)
{
// make sure all parents are subscribed
@@ -477,7 +477,7 @@ void KSubscription::changeItemState( GroupItem* item, bool on )
}
//------------------------------------------------------------------------------
-void KSubscription::filterChanged( QListViewItem* item, const QString & text )
+void KSubscription::filterChanged( TQListViewItem* item, const TQString & text )
{
if ( !item && groupView )
item = groupView->firstChild();
@@ -538,7 +538,7 @@ void KSubscription::filterChanged( QListViewItem* item, const QString & text )
//------------------------------------------------------------------------------
uint KSubscription::activeItemCount()
{
- QListViewItemIterator it(groupView);
+ TQListViewItemIterator it(groupView);
uint count = 0;
for ( ; it.current(); ++it)
@@ -554,11 +554,11 @@ uint KSubscription::activeItemCount()
//------------------------------------------------------------------------------
void KSubscription::restoreOriginalParent()
{
- QPtrList<QListViewItem> move;
- QListViewItemIterator it(groupView);
+ TQPtrList<TQListViewItem> move;
+ TQListViewItemIterator it(groupView);
for ( ; it.current(); ++it)
{
- QListViewItem* origParent = static_cast<GroupItem*>(it.current())->
+ TQListViewItem* origParent = static_cast<GroupItem*>(it.current())->
originalParent();
if (origParent && origParent != it.current()->parent())
{
@@ -566,11 +566,11 @@ void KSubscription::restoreOriginalParent()
move.append(it.current());
}
}
- QPtrListIterator<QListViewItem> it2( move );
+ TQPtrListIterator<TQListViewItem> it2( move );
for ( ; it2.current(); ++it2)
{
// restore the original parent
- QListViewItem* origParent = static_cast<GroupItem*>(it2.current())->
+ TQListViewItem* origParent = static_cast<GroupItem*>(it2.current())->
originalParent();
groupView->takeItem(it2.current());
origParent->insertItem(it2.current());
@@ -580,7 +580,7 @@ void KSubscription::restoreOriginalParent()
//-----------------------------------------------------------------------------
void KSubscription::saveOpenStates()
{
- QListViewItemIterator it(groupView);
+ TQListViewItemIterator it(groupView);
for ( ; it.current(); ++it)
{
@@ -592,7 +592,7 @@ void KSubscription::saveOpenStates()
//-----------------------------------------------------------------------------
void KSubscription::restoreOpenStates()
{
- QListViewItemIterator it(groupView);
+ TQListViewItemIterator it(groupView);
for ( ; it.current(); ++it)
{
@@ -613,7 +613,7 @@ void KSubscription::slotLoadingComplete()
subCB->setEnabled(true);
// remember the correct parent
- QListViewItemIterator it(groupView);
+ TQListViewItemIterator it(groupView);
for ( ; it.current(); ++it)
{
static_cast<GroupItem*>(it.current())->
@@ -624,7 +624,7 @@ void KSubscription::slotLoadingComplete()
}
//------------------------------------------------------------------------------
-void KSubscription::slotChangeButtonState( QListViewItem *item )
+void KSubscription::slotChangeButtonState( TQListViewItem *item )
{
if (!item ||
(item->listView() == groupView &&
@@ -636,7 +636,7 @@ void KSubscription::slotChangeButtonState( QListViewItem *item )
return;
}
// set the direction of the buttons and enable/disable them
- QListView* currentView = item->listView();
+ TQListView* currentView = item->listView();
if (currentView == groupView)
{
setDirectionButton1(Right);
@@ -686,7 +686,7 @@ void KSubscription::slotButton1()
{
GroupItem* item = static_cast<GroupItem*>(subView->currentItem());
// get the corresponding item from the groupView
- QListViewItem* listitem = getListItem(groupView, item->info());
+ TQListViewItem* listitem = getListItem(groupView, item->info());
if (listitem)
{
// deactivate
@@ -715,7 +715,7 @@ void KSubscription::slotButton2()
{
GroupItem* item = static_cast<GroupItem*>(unsubView->currentItem());
// get the corresponding item from the groupView
- QListViewItem* listitem = getListItem(groupView, item->info());
+ TQListViewItem* listitem = getListItem(groupView, item->info());
if (listitem)
{
// activate
@@ -739,7 +739,7 @@ void KSubscription::slotCBToggled()
}
//------------------------------------------------------------------------------
-void KSubscription::slotFilterTextChanged( const QString & text )
+void KSubscription::slotFilterTextChanged( const TQString & text )
{
// remember is the items are open
if (mLastText.isEmpty())
@@ -749,7 +749,7 @@ void KSubscription::slotFilterTextChanged( const QString & text )
{
// reset
restoreOriginalParent();
- QListViewItemIterator it(groupView);
+ TQListViewItemIterator it(groupView);
for ( ; it.current(); ++it)
{
it.current()->setVisible(true);
@@ -769,7 +769,7 @@ void KSubscription::slotFilterTextChanged( const QString & text )
//------------------------------------------------------------------------------
void KSubscription::slotUpdateStatusLabel()
{
- QString text;
+ TQString text;
if (mLoading)
text = i18n("Loading... (1 matching)", "Loading... (%n matching)",
activeItemCount());
diff --git a/libkdepim/ksubscription.h b/libkdepim/ksubscription.h
index 55ed5bd25..f72455b3f 100644
--- a/libkdepim/ksubscription.h
+++ b/libkdepim/ksubscription.h
@@ -25,8 +25,8 @@
#ifndef __KSUBSCRIPTION
#define __KSUBSCRIPTION
-#include <qlistview.h>
-#include <qcheckbox.h>
+#include <tqlistview.h>
+#include <tqcheckbox.h>
#include <kdialogbase.h>
#include <kdepimmacros.h>
@@ -52,14 +52,14 @@ class KDE_EXPORT KGroupInfo
moderated
};
- KGroupInfo( const QString &name, const QString &description = QString::null,
+ KGroupInfo( const TQString &name, const TQString &description = TQString::null,
bool newGroup = false, bool subscribed = false,
- Status status = unknown, QString path = QString::null );
+ Status status = unknown, TQString path = TQString::null );
- QString name, description;
+ TQString name, description;
bool newGroup, subscribed;
Status status;
- QString path;
+ TQString path;
bool operator== (const KGroupInfo &gi2);
bool operator< (const KGroupInfo &gi2);
@@ -72,9 +72,9 @@ class KDE_EXPORT KGroupInfo
class KDE_EXPORT GroupItem : public QCheckListItem
{
public:
- GroupItem( QListView *v, const KGroupInfo &gi, KSubscription* browser,
+ GroupItem( TQListView *v, const KGroupInfo &gi, KSubscription* browser,
bool isCheckItem = false );
- GroupItem( QListViewItem *i, const KGroupInfo &gi, KSubscription* browser,
+ GroupItem( TQListViewItem *i, const KGroupInfo &gi, KSubscription* browser,
bool isCheckItem = false );
/**
@@ -86,8 +86,8 @@ class KDE_EXPORT GroupItem : public QCheckListItem
/**
* Get/Set the original parent
*/
- QListViewItem* originalParent() { return mOriginalParent; }
- void setOriginalParent( QListViewItem* parent ) { mOriginalParent = parent; }
+ TQListViewItem* originalParent() { return mOriginalParent; }
+ void setOriginalParent( TQListViewItem* parent ) { mOriginalParent = parent; }
/**
* Get/Set the last open state
@@ -132,27 +132,27 @@ class KDE_EXPORT GroupItem : public QCheckListItem
/**
* Reimplemented
- * Calls QListViewItem or QCheckListItem
+ * Calls TQListViewItem or QCheckListItem
*/
- virtual void paintCell( QPainter * p, const QColorGroup & cg,
+ virtual void paintCell( TQPainter * p, const TQColorGroup & cg,
int column, int width, int align );
/**
* Reimplemented
- * Calls QListViewItem or QCheckListItem
+ * Calls TQListViewItem or QCheckListItem
*/
- virtual void paintFocus( QPainter *, const QColorGroup & cg,
- const QRect & r );
+ virtual void paintFocus( TQPainter *, const TQColorGroup & cg,
+ const TQRect & r );
/**
* Reimplemented
- * Calls QListViewItem or QCheckListItem
+ * Calls TQListViewItem or QCheckListItem
*/
- virtual int width( const QFontMetrics&, const QListView*, int column) const;
+ virtual int width( const TQFontMetrics&, const TQListView*, int column) const;
/**
* Reimplemented
- * Calls QListViewItem or QCheckListItem
+ * Calls TQListViewItem or QCheckListItem
*/
virtual void setup();
@@ -162,7 +162,7 @@ class KDE_EXPORT GroupItem : public QCheckListItem
protected:
KGroupInfo mInfo;
KSubscription* mBrowser;
- QListViewItem* mOriginalParent;
+ TQListViewItem* mOriginalParent;
// remember last open state
bool mLastOpenState;
// is this a checkable item
@@ -198,8 +198,8 @@ class KDE_EXPORT KSubscription : public KDialogBase
Right
};
- KSubscription( QWidget *parent, const QString &caption, KAccount* acct,
- int buttons = 0, const QString &user1 = QString::null,
+ KSubscription( TQWidget *parent, const TQString &caption, KAccount* acct,
+ int buttons = 0, const TQString &user1 = TQString::null,
bool descriptionColumn = true );
~KSubscription();
@@ -213,7 +213,7 @@ class KDE_EXPORT KSubscription : public KDialogBase
/**
* Access to the treewidget that holds the GroupItems
*/
- QListView* folderTree() { return groupView; }
+ TQListView* folderTree() { return groupView; }
/**
* Access to the searchfield
@@ -228,18 +228,18 @@ class KDE_EXPORT KSubscription : public KDialogBase
/**
* Removes the item from the listview
*/
- void removeListItem( QListView *view, const KGroupInfo &gi );
+ void removeListItem( TQListView *view, const KGroupInfo &gi );
/**
* Gets the item from the listview
* Returns 0 if the item can't be found
*/
- QListViewItem* getListItem( QListView *view, const KGroupInfo &gi );
+ TQListViewItem* getListItem( TQListView *view, const KGroupInfo &gi );
/**
* Is the item in the given listview
*/
- bool itemInListView( QListView *view, const KGroupInfo &gi );
+ bool itemInListView( TQListView *view, const KGroupInfo &gi );
/**
* Makes all changes after an item is toggled
@@ -279,8 +279,8 @@ class KDE_EXPORT KSubscription : public KDialogBase
* Update the item-states (visible, enabled) when a filter
* criteria changed
*/
- void filterChanged( QListViewItem* item = 0,
- const QString & text = QString::null );
+ void filterChanged( TQListViewItem* item = 0,
+ const TQString & text = TQString::null );
/**
* The amount of items that are visible and enabled
@@ -312,7 +312,7 @@ class KDE_EXPORT KSubscription : public KDialogBase
/**
* Changes the current state of the buttons
*/
- void slotChangeButtonState( QListViewItem* );
+ void slotChangeButtonState( TQListViewItem* );
/**
* Buttons are clicked
@@ -339,7 +339,7 @@ class KDE_EXPORT KSubscription : public KDialogBase
/**
* Filter text changed
*/
- void slotFilterTextChanged( const QString & text );
+ void slotFilterTextChanged( const TQString & text );
signals:
/**
@@ -354,15 +354,15 @@ class KDE_EXPORT KSubscription : public KDialogBase
KAccount* mAcct;
// widgets
- QWidget *page;
- QListView *groupView;
- QListView *subView, *unsubView;
+ TQWidget *page;
+ TQListView *groupView;
+ TQListView *subView, *unsubView;
KLineEdit *filterEdit;
- QCheckBox *noTreeCB, *subCB, *newCB;
- QPushButton *arrowBtn1, *arrowBtn2;
- QIconSet pmRight, pmLeft;
- QGridLayout *listL;
- QLabel *leftLabel, *rightLabel;
+ TQCheckBox *noTreeCB, *subCB, *newCB;
+ TQPushButton *arrowBtn1, *arrowBtn2;
+ TQIconSet pmRight, pmLeft;
+ TQGridLayout *listL;
+ TQLabel *leftLabel, *rightLabel;
// false if all items are loaded
bool mLoading;
@@ -372,7 +372,7 @@ class KDE_EXPORT KSubscription : public KDialogBase
Direction mDirButton2;
// remember last searchtext
- QString mLastText;
+ TQString mLastText;
// remember description column
int mDescrColumn;
diff --git a/libkdepim/ktimeedit.cpp b/libkdepim/ktimeedit.cpp
index e9758110b..15d318418 100644
--- a/libkdepim/ktimeedit.cpp
+++ b/libkdepim/ktimeedit.cpp
@@ -24,10 +24,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qkeycode.h>
-#include <qcombobox.h>
-#include <qdatetime.h>
-#include <qlineedit.h>
+#include <tqkeycode.h>
+#include <tqcombobox.h>
+#include <tqdatetime.h>
+#include <tqlineedit.h>
#include <kmessagebox.h>
#include <kglobal.h>
@@ -35,7 +35,7 @@
#include <klocale.h>
#include "ktimeedit.h"
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include "ktimeedit.moc"
// Validator for a time value with only hours and minutes (no seconds)
@@ -43,9 +43,9 @@
class KOTimeValidator : public QValidator
{
public:
- KOTimeValidator(QWidget* parent, const char* name=0) : QValidator(parent, name) {}
+ KOTimeValidator(TQWidget* parent, const char* name=0) : TQValidator(parent, name) {}
- virtual State validate(QString& str, int& /*cursorPos*/) const
+ virtual State validate(TQString& str, int& /*cursorPos*/) const
{
int length = str.length();
// empty string is intermediate so one can clear the edit line and start from scratch
@@ -53,7 +53,7 @@ public:
return Intermediate;
bool ok = false;
- /*QTime time =*/ KGlobal::locale()->readTime(str, KLocale::WithoutSeconds, &ok);
+ /*TQTime time =*/ KGlobal::locale()->readTime(str, KLocale::WithoutSeconds, &ok);
if ( ok )
return Acceptable;
// kdDebug(5300)<<"Time "<<str<<" not directly acceptable, trying military format "<<endl;
@@ -69,19 +69,19 @@ public:
// readTime doesn't help knowing when the string is "Intermediate".
// HACK. Not fully locale aware etc. (esp. the separator is '.' in sv_SE...)
- QChar sep = ':';
+ TQChar sep = ':';
// I want to allow "HH:", ":MM" and ":" to make editing easier
if ( str[0] == sep )
{
if ( length == 1 ) // just ":"
return Intermediate;
- QString minutes = str.mid(1);
+ TQString minutes = str.mid(1);
int m = minutes.toInt(&ok);
if ( ok && m >= 0 && m < 60 )
return Intermediate;
} else if ( str[str.length()-1] == sep )
{
- QString hours = str.left(length-1);
+ TQString hours = str.left(length-1);
int h = hours.toInt(&ok);
if ( ok && h >= 0 && h < 24 )
return Intermediate;
@@ -89,14 +89,14 @@ public:
// return Invalid;
return Intermediate;
}
- virtual void fixup ( QString & input ) const {
+ virtual void fixup ( TQString & input ) const {
bool ok = false;
KGlobal::locale()->readTime( input, KLocale::WithoutSeconds, &ok );
if ( !ok ) {
// Also try to accept times in "military format", i.e. no delimiter, like 1200
int tm = input.toInt( &ok );
if ( ( 0 <= tm ) && ( tm < 2400 ) && ( tm%100 < 60 ) && ok ) {
- input = KGlobal::locale()->formatTime( QTime( tm / 100, tm % 100, 0 ) );
+ input = KGlobal::locale()->formatTime( TQTime( tm / 100, tm % 100, 0 ) );
}
}
}
@@ -104,9 +104,9 @@ public:
// KTimeWidget/QTimeEdit provide nicer editing, but don't provide a combobox.
// Difficult to get all in one...
-// But Qt-3.2 will offer QLineEdit::setMask, so a "99:99" mask would help.
-KTimeEdit::KTimeEdit( QWidget *parent, QTime qt, const char *name )
- : QComboBox( true, parent, name )
+// But Qt-3.2 will offer TQLineEdit::setMask, so a "99:99" mask would help.
+KTimeEdit::KTimeEdit( TQWidget *parent, TQTime qt, const char *name )
+ : TQComboBox( true, parent, name )
{
setInsertionPolicy( NoInsertion );
setValidator( new KOTimeValidator( this ) );
@@ -117,20 +117,20 @@ KTimeEdit::KTimeEdit( QWidget *parent, QTime qt, const char *name )
// insertItem( mNoTimeString );
// Fill combo box with selection of times in localized format.
- QTime timeEntry(0,0,0);
+ TQTime timeEntry(0,0,0);
do {
insertItem(KGlobal::locale()->formatTime(timeEntry));
timeEntry = timeEntry.addSecs(60*15);
} while (!timeEntry.isNull());
// Add end of day.
- insertItem( KGlobal::locale()->formatTime( QTime( 23, 59, 59 ) ) );
+ insertItem( KGlobal::locale()->formatTime( TQTime( 23, 59, 59 ) ) );
updateText();
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
- connect(this, SIGNAL(activated(int)), this, SLOT(active(int)));
- connect(this, SIGNAL(highlighted(int)), this, SLOT(hilit(int)));
- connect(this, SIGNAL(textChanged(const QString&)),this,SLOT(changedText()));
+ connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(active(int)));
+ connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(hilit(int)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(changedText()));
}
KTimeEdit::~KTimeEdit()
@@ -146,12 +146,12 @@ bool KTimeEdit::hasTime() const
return true; // always
}
-QTime KTimeEdit::getTime() const
+TQTime KTimeEdit::getTime() const
{
//kdDebug(5300) << "KTimeEdit::getTime(), currentText() = " << currentText() << endl;
// TODO use KLocale::WithoutSeconds in HEAD
bool ok = false;
- QTime time = KGlobal::locale()->readTime( currentText(), KLocale::WithoutSeconds, &ok );
+ TQTime time = KGlobal::locale()->readTime( currentText(), KLocale::WithoutSeconds, &ok );
if ( !ok ) {
// Also try to accept times in "military format", i.e. no delimiter, like 1200
int tm = currentText().toInt( &ok );
@@ -165,16 +165,16 @@ QTime KTimeEdit::getTime() const
return time;
}
-QSizePolicy KTimeEdit::sizePolicy() const
+TQSizePolicy KTimeEdit::sizePolicy() const
{
// Set size policy to Fixed, because edit cannot contain more text than the
// string representing the time. It doesn't make sense to provide more space.
- QSizePolicy sizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
+ TQSizePolicy sizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Fixed);
return sizePolicy;
}
-void KTimeEdit::setTime(QTime newTime)
+void KTimeEdit::setTime(TQTime newTime)
{
if ( mTime != newTime )
{
@@ -189,9 +189,9 @@ void KTimeEdit::active(int i)
{
// The last entry, 23:59, is a special case
if( i == count() - 1 )
- mTime = QTime( 23, 59, 0 );
+ mTime = TQTime( 23, 59, 0 );
else
- mTime = QTime(0,0,0).addSecs(i*15*60);
+ mTime = TQTime(0,0,0).addSecs(i*15*60);
emit timeChanged(mTime);
}
@@ -200,7 +200,7 @@ void KTimeEdit::hilit(int )
// we don't currently need to do anything here.
}
-void KTimeEdit::addTime(QTime qt)
+void KTimeEdit::addTime(TQTime qt)
{
// Calculate the new time.
mTime = qt.addSecs(mTime.minute()*60+mTime.hour()*3600);
@@ -208,12 +208,12 @@ void KTimeEdit::addTime(QTime qt)
emit timeChanged(mTime);
}
-void KTimeEdit::subTime(QTime qt)
+void KTimeEdit::subTime(TQTime qt)
{
int h, m;
// Note that we cannot use the same method for determining the new
- // time as we did in addTime, because QTime does not handle adding
+ // time as we did in addTime, because TQTime does not handle adding
// negative seconds well at all.
h = mTime.hour()-qt.hour();
m = mTime.minute()-qt.minute();
@@ -233,23 +233,23 @@ void KTimeEdit::subTime(QTime qt)
emit timeChanged(mTime);
}
-void KTimeEdit::keyPressEvent(QKeyEvent *qke)
+void KTimeEdit::keyPressEvent(TQKeyEvent *qke)
{
switch(qke->key()) {
case Key_Down:
- addTime(QTime(0,1,0));
+ addTime(TQTime(0,1,0));
break;
case Key_Up:
- subTime(QTime(0,1,0));
+ subTime(TQTime(0,1,0));
break;
case Key_Prior:
- subTime(QTime(1,0,0));
+ subTime(TQTime(1,0,0));
break;
case Key_Next:
- addTime(QTime(1,0,0));
+ addTime(TQTime(1,0,0));
break;
default:
- QComboBox::keyPressEvent(qke);
+ TQComboBox::keyPressEvent(qke);
break;
} // switch
}
@@ -257,9 +257,9 @@ void KTimeEdit::keyPressEvent(QKeyEvent *qke)
void KTimeEdit::updateText()
{
// kdDebug(5300) << "KTimeEdit::updateText() " << endl;
- QString s = KGlobal::locale()->formatTime(mTime);
+ TQString s = KGlobal::locale()->formatTime(mTime);
// Set the text but without emitting signals, nor losing the cursor position
- QLineEdit *line = lineEdit();
+ TQLineEdit *line = lineEdit();
line->blockSignals(true);
int pos = line->cursorPosition();
@@ -277,8 +277,8 @@ void KTimeEdit::updateText()
bool KTimeEdit::inputIsValid() const
{
int cursorPos = lineEdit()->cursorPosition();
- QString str = currentText();
- return validator()->validate( str, cursorPos ) == QValidator::Acceptable;
+ TQString str = currentText();
+ return validator()->validate( str, cursorPos ) == TQValidator::Acceptable;
}
void KTimeEdit::changedText()
diff --git a/libkdepim/ktimeedit.h b/libkdepim/ktimeedit.h
index be50a40b8..609c64007 100644
--- a/libkdepim/ktimeedit.h
+++ b/libkdepim/ktimeedit.h
@@ -25,11 +25,11 @@
#ifndef _KTIMEEDIT_H
#define _KTIMEEDIT_H
-#include <qevent.h>
-#include <qkeycode.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qcombobox.h>
+#include <tqevent.h>
+#include <tqkeycode.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqcombobox.h>
#include <kapplication.h>
#include <kdepimmacros.h>
@@ -46,7 +46,7 @@ class KDE_EXPORT KTimeEdit : public QComboBox
Q_OBJECT
public:
/** constructs a new time edit. */
- KTimeEdit(QWidget *parent=0, QTime qt=QTime(12,0), const char *name=0);
+ KTimeEdit(TQWidget *parent=0, TQTime qt=TQTime(12,0), const char *name=0);
virtual ~KTimeEdit();
@@ -56,10 +56,10 @@ class KDE_EXPORT KTimeEdit : public QComboBox
bool hasTime() const;
/** returns the time that is currently set in the timeLineEdit. */
- QTime getTime() const;
+ TQTime getTime() const;
/** returns the preferred size policy of the KTimeEdit */
- QSizePolicy sizePolicy() const;
+ TQSizePolicy sizePolicy() const;
/** return true if input is a valid time and false if not */
bool inputIsValid() const;
@@ -69,11 +69,11 @@ class KDE_EXPORT KTimeEdit : public QComboBox
Emitted every time the time displayed changes. "newt" is the new
time.
*/
- void timeChanged(QTime newt);
+ void timeChanged(TQTime newt);
public slots:
/** used to set the time which is displayed to a specific value. */
- void setTime(QTime qt);
+ void setTime(TQTime qt);
protected slots:
void active(int);
@@ -81,15 +81,15 @@ class KDE_EXPORT KTimeEdit : public QComboBox
void changedText();
protected:
- virtual void keyPressEvent(QKeyEvent *qke);
- void addTime(QTime qt);
- void subTime(QTime qt);
+ virtual void keyPressEvent(TQKeyEvent *qke);
+ void addTime(TQTime qt);
+ void subTime(TQTime qt);
// Update the lineedit text from mTime
void updateText();
private:
- QTime mTime; // the widget's displayed time.
- //QString mNoTimeString;
+ TQTime mTime; // the widget's displayed time.
+ //TQString mNoTimeString;
};
#endif
diff --git a/libkdepim/kvcarddrag.cpp b/libkdepim/kvcarddrag.cpp
index 4a568451e..2008f7a92 100644
--- a/libkdepim/kvcarddrag.cpp
+++ b/libkdepim/kvcarddrag.cpp
@@ -25,36 +25,36 @@
static const char vcard_mime_string[] = "text/x-vcard";
-KVCardDrag::KVCardDrag( const QString &content, QWidget *dragsource,
+KVCardDrag::KVCardDrag( const TQString &content, TQWidget *dragsource,
const char *name )
- : QStoredDrag( vcard_mime_string, dragsource, name )
+ : TQStoredDrag( vcard_mime_string, dragsource, name )
{
setVCard( content );
}
-KVCardDrag::KVCardDrag( QWidget *dragsource, const char *name )
- : QStoredDrag( vcard_mime_string, dragsource, name )
+KVCardDrag::KVCardDrag( TQWidget *dragsource, const char *name )
+ : TQStoredDrag( vcard_mime_string, dragsource, name )
{
- setVCard( QString::null );
+ setVCard( TQString::null );
}
-void KVCardDrag::setVCard( const QString &content )
+void KVCardDrag::setVCard( const TQString &content )
{
setEncodedData( content.utf8() );
}
-bool KVCardDrag::canDecode( QMimeSource *e )
+bool KVCardDrag::canDecode( TQMimeSource *e )
{
return e->provides( vcard_mime_string );
}
-bool KVCardDrag::decode( QMimeSource *e, QString &content )
+bool KVCardDrag::decode( TQMimeSource *e, TQString &content )
{
- content = QString::fromUtf8( e->encodedData( vcard_mime_string ) );
+ content = TQString::fromUtf8( e->encodedData( vcard_mime_string ) );
return true;
}
-bool KVCardDrag::decode( QMimeSource *e, KABC::Addressee::List& addressees )
+bool KVCardDrag::decode( TQMimeSource *e, KABC::Addressee::List& addressees )
{
addressees = KABC::VCardConverter().parseVCards( e->encodedData( vcard_mime_string ) );
return true;
diff --git a/libkdepim/kvcarddrag.h b/libkdepim/kvcarddrag.h
index c97fd8aeb..55b3ef188 100644
--- a/libkdepim/kvcarddrag.h
+++ b/libkdepim/kvcarddrag.h
@@ -22,8 +22,8 @@
#ifndef KVCARDDRAG_H
#define KVCARDDRAG_H
-#include <qdragobject.h>
-#include <qstring.h>
+#include <tqdragobject.h>
+#include <tqstring.h>
#include <kabc/addressee.h>
#include <kdepimmacros.h>
@@ -44,33 +44,33 @@ class KDE_EXPORT KVCardDrag : public QStoredDrag
/**
* Constructs an empty vcard drag.
*/
- KVCardDrag( QWidget *dragsource = 0, const char *name = 0 );
+ KVCardDrag( TQWidget *dragsource = 0, const char *name = 0 );
/**
* Constructs a vcard drag with the @p addressee.
*/
- KVCardDrag( const QString &content, QWidget *dragsource = 0, const char *name = 0 );
+ KVCardDrag( const TQString &content, TQWidget *dragsource = 0, const char *name = 0 );
virtual ~KVCardDrag() {}
/**
* Sets the vcard of the drag to @p content.
*/
- void setVCard( const QString &content );
+ void setVCard( const TQString &content );
/**
* Returns true if the MIME source @p e contains a vcard object.
*/
- static bool canDecode( QMimeSource *e );
+ static bool canDecode( TQMimeSource *e );
/**
* Decodes the MIME source @p e and puts the resulting vcard into @p content.
*/
- static bool decode( QMimeSource *e, QString &content );
+ static bool decode( TQMimeSource *e, TQString &content );
/**
* Decodes the MIME source @p e and puts the resulting vcard into @p addresseess.
*/
- static bool decode( QMimeSource *e, KABC::Addressee::List& addressees );
+ static bool decode( TQMimeSource *e, KABC::Addressee::List& addressees );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/libkdepim/kwidgetlister.cpp b/libkdepim/kwidgetlister.cpp
index 6bee7def4..e26b05300 100644
--- a/libkdepim/kwidgetlister.cpp
+++ b/libkdepim/kwidgetlister.cpp
@@ -34,17 +34,17 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qhbox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
#include <assert.h>
#include <kguiitem.h>
#include <kpushbutton.h>
#include <kdialog.h>
-KWidgetLister::KWidgetLister( int minWidgets, int maxWidgets, QWidget *parent, const char* name )
- : QWidget( parent, name )
+KWidgetLister::KWidgetLister( int minWidgets, int maxWidgets, TQWidget *parent, const char* name )
+ : TQWidget( parent, name )
{
mWidgetList.setAutoDelete(TRUE);
@@ -52,8 +52,8 @@ KWidgetLister::KWidgetLister( int minWidgets, int maxWidgets, QWidget *parent, c
mMaxWidgets = QMAX( maxWidgets, mMinWidgets + 1 );
//--------- the button box
- mLayout = new QVBoxLayout(this, 0, 4);
- mButtonBox = new QHBox(this);
+ mLayout = new TQVBoxLayout(this, 0, 4);
+ mButtonBox = new TQHBox(this);
mButtonBox->setSpacing( KDialog::spacingHint() );
mLayout->addWidget( mButtonBox );
@@ -63,7 +63,7 @@ KWidgetLister::KWidgetLister( int minWidgets, int maxWidgets, QWidget *parent, c
mBtnFewer = new KPushButton( KGuiItem( i18n( "fewer widgets", "Fewer" ), "button_fewer" ), mButtonBox );
mButtonBox->setStretchFactor( mBtnFewer, 0 );
- QWidget *spacer = new QWidget( mButtonBox );
+ TQWidget *spacer = new TQWidget( mButtonBox );
mButtonBox->setStretchFactor( spacer, 1 );
// FIXME: We need a KStdGuiItem::clear here and in other locations to be automagically RTL aware - Martijn
@@ -71,12 +71,12 @@ KWidgetLister::KWidgetLister( int minWidgets, int maxWidgets, QWidget *parent, c
mButtonBox->setStretchFactor( mBtnClear, 0 );
//---------- connect everything
- connect( mBtnMore, SIGNAL(clicked()),
- this, SLOT(slotMore()) );
- connect( mBtnFewer, SIGNAL(clicked()),
- this, SLOT(slotFewer()) );
- connect( mBtnClear, SIGNAL(clicked()),
- this, SLOT(slotClear()) );
+ connect( mBtnMore, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotMore()) );
+ connect( mBtnFewer, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotFewer()) );
+ connect( mBtnClear, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClear()) );
enableControls();
}
@@ -112,7 +112,7 @@ void KWidgetLister::slotClear()
setNumberOfShownWidgetsTo( mMinWidgets );
// clear remaining widgets
- QPtrListIterator<QWidget> it( mWidgetList );
+ TQPtrListIterator<TQWidget> it( mWidgetList );
for ( it.toFirst() ; it.current() ; ++it )
clearWidget( (*it) );
@@ -121,7 +121,7 @@ void KWidgetLister::slotClear()
emit clearWidgets();
}
-void KWidgetLister::addWidgetAtEnd(QWidget *w)
+void KWidgetLister::addWidgetAtEnd(TQWidget *w)
{
if (!w) w = this->createWidget(this);
@@ -142,13 +142,13 @@ void KWidgetLister::removeLastWidget()
emit widgetRemoved();
}
-void KWidgetLister::clearWidget( QWidget* /*aWidget*/ )
+void KWidgetLister::clearWidget( TQWidget* /*aWidget*/ )
{
}
-QWidget* KWidgetLister::createWidget( QWidget* parent )
+TQWidget* KWidgetLister::createWidget( TQWidget* parent )
{
- return new QWidget( parent );
+ return new TQWidget( parent );
}
void KWidgetLister::setNumberOfShownWidgetsTo( int aNum )
diff --git a/libkdepim/kwidgetlister.h b/libkdepim/kwidgetlister.h
index 86a3b68b9..472dfc8df 100644
--- a/libkdepim/kwidgetlister.h
+++ b/libkdepim/kwidgetlister.h
@@ -32,8 +32,8 @@
#ifndef _KWIDGETLISTER_H_
#define _KWIDGETLISTER_H_
-#include <qwidget.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
#include <kdepimmacros.h>
class QPushButton;
@@ -66,7 +66,7 @@ class KDE_EXPORT KWidgetLister : public QWidget
{
Q_OBJECT
public:
- KWidgetLister( int minWidgets=1, int maxWidgets=8, QWidget* parent=0, const char* name=0 );
+ KWidgetLister( int minWidgets=1, int maxWidgets=8, TQWidget* parent=0, const char* name=0 );
virtual ~KWidgetLister();
protected slots:
@@ -99,8 +99,8 @@ protected:
when showing it on screen. Make sure you call this
implementaion, though, since you cannot put the widget on screen
from derived classes (@p mLayout is private).
- Make sure the parent of the QWidget to add is this KWidgetLister. */
- virtual void addWidgetAtEnd(QWidget *w =0);
+ Make sure the parent of the TQWidget to add is this KWidgetLister. */
+ virtual void addWidgetAtEnd(TQWidget *w =0);
/** Removes a single (always the last) widget. Doesn't care if there
are still only @ref mMinWidgets left on screen and whether it
should enable/disable any controls. It simply does what it is
@@ -111,12 +111,12 @@ protected:
virtual void removeLastWidget();
/** Called to clear a given widget. The default implementation does
nothing. */
- virtual void clearWidget( QWidget* );
+ virtual void clearWidget( TQWidget* );
/** Because QT 2.x does not support signals/slots in template
classes, we are forced to emulate this by forcing the
implementers of subclasses of KWidgetLister to reimplement this
function which replaces the "@p new @p T" call. */
- virtual QWidget* createWidget( QWidget *parent );
+ virtual TQWidget* createWidget( TQWidget *parent );
/** Sets the number of widgets on scrren to exactly @p aNum. Doesn't
check if @p aNum is inside the range @p
[mMinWidgets,mMaxWidgets]. */
@@ -124,7 +124,7 @@ protected:
/** The list of widgets. Note that this list is set to auto-delete,
meaning that widgets that are removed from the screen by either
@ref slotFewer or @ref slotClear will be destroyed! */
- QPtrList<QWidget> mWidgetList;
+ TQPtrList<TQWidget> mWidgetList;
/** The minimum number of widgets that are to stay on screen. */
int mMinWidgets;
/** The maximum number of widgets that are to be shown on screen. */
@@ -134,7 +134,7 @@ signals:
/** This signal is emitted whenever a widget was added */
void widgetAdded();
/** This signal is emitted whenever a widget was added */
- void widgetAdded(QWidget *);
+ void widgetAdded(TQWidget *);
/** This signal is emitted whenever a widget was removed */
void widgetRemoved();
/** This signal is emitted whenever the clear button is clicked */
@@ -143,9 +143,9 @@ signals:
private:
void enableControls();
- QPushButton *mBtnMore, *mBtnFewer, *mBtnClear;
- QVBoxLayout *mLayout;
- QHBox *mButtonBox;
+ TQPushButton *mBtnMore, *mBtnFewer, *mBtnClear;
+ TQVBoxLayout *mLayout;
+ TQHBox *mButtonBox;
};
diff --git a/libkdepim/kxface.cpp b/libkdepim/kxface.cpp
index 574a0aa9d..ecd24bc24 100644
--- a/libkdepim/kxface.cpp
+++ b/libkdepim/kxface.cpp
@@ -27,12 +27,12 @@
#include <kdebug.h>
-#include <qbuffer.h>
-#include <qcstring.h>
-#include <qimage.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qpainter.h>
+#include <tqbuffer.h>
+#include <tqcstring.h>
+#include <tqimage.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqpainter.h>
#include <stdlib.h>
#include <string.h>
@@ -83,17 +83,17 @@ KXFace::~KXFace()
{
}
-QString KXFace::fromImage( const QImage &image )
+TQString KXFace::fromImage( const TQImage &image )
{
if( image.isNull() )
- return QString::null;
+ return TQString::null;
- QImage scaledImg = image.smoothScale( 48, 48 );
- QByteArray ba;
- QBuffer buffer( ba );
+ TQImage scaledImg = image.smoothScale( 48, 48 );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
scaledImg.save( &buffer, "XBM" );
- QString xbm( ba );
+ TQString xbm( ba );
xbm.remove( 0, xbm.find( "{" ) + 1 );
xbm.truncate( xbm.find( "}" ) );
xbm.remove( " " );
@@ -101,7 +101,7 @@ QString KXFace::fromImage( const QImage &image )
xbm.remove( "0x" );
xbm.remove( "\n" );
xbm.truncate( 576 );
- QCString tmp = QCString( xbm.latin1() );
+ TQCString tmp = TQCString( xbm.latin1() );
uint len = tmp.length();
for( uint i=0; i<len; ++i )
{
@@ -132,8 +132,8 @@ QString KXFace::fromImage( const QImage &image )
tmp[i-1] = t;
}
}
- tmp.replace( QRegExp( "(\\w{12})" ), "\\1\n" );
- tmp.replace( QRegExp( "(\\w{4})" ), "0x\\1," );
+ tmp.replace( TQRegExp( "(\\w{12})" ), "\\1\n" );
+ tmp.replace( TQRegExp( "(\\w{4})" ), "0x\\1," );
len = tmp.length();
char *fbuf = (char *)malloc( len + 1 );
strncpy( fbuf, (const char *)tmp, len );
@@ -144,21 +144,21 @@ QString KXFace::fromImage( const QImage &image )
GenFace();
CompAll( fbuf );
}
- QString ret( fbuf );
+ TQString ret( fbuf );
free( fbuf );
return ret;
}
-QImage KXFace::toImage(const QString &xface)
+TQImage KXFace::toImage(const TQString &xface)
{
if ( xface.length() > MAX_XFACE_LENGTH )
- return QImage();
+ return TQImage();
char *fbuf = (char *)malloc( MAX_XFACE_LENGTH );
memset( fbuf, '\0', MAX_XFACE_LENGTH );
strncpy( fbuf, xface.latin1(), xface.length() );
- QCString img;
+ TQCString img;
if ( !( status = setjmp( comp_env ) ) )
{
UnCompAll( fbuf );/* compress otherwise */
@@ -166,7 +166,7 @@ QImage KXFace::toImage(const QString &xface)
img = WriteFace();
}
free( fbuf );
- QImage p;
+ TQImage p;
p.loadFromData( img, "XBM" );
return p;
@@ -327,13 +327,13 @@ void KXFace::BigClear()
B.b_words = 0;
}
-QCString KXFace::WriteFace()
+TQCString KXFace::WriteFace()
{
register char *s;
register int i, j, bits, digits, words;
int digsperword = DIGSPERWORD;
int wordsperline = WORDSPERLINE;
- QCString t( "#define noname_width 48\n#define noname_height 48\nstatic char noname_bits[] = {\n " );
+ TQCString t( "#define noname_width 48\n#define noname_height 48\nstatic char noname_bits[] = {\n " );
j = t.length() - 1;
s = F;
diff --git a/libkdepim/kxface.h b/libkdepim/kxface.h
index bd18b88f6..51e76fd89 100644
--- a/libkdepim/kxface.h
+++ b/libkdepim/kxface.h
@@ -27,7 +27,7 @@
#define __KXFACE_H
-#include <qobject.h>
+#include <tqobject.h>
#include <setjmp.h>
#include <kdepimmacros.h>
@@ -530,12 +530,12 @@ namespace KPIM {
/**
* generates the xface string from @p image
*/
- QString fromImage(const QImage &image);
+ TQString fromImage(const TQImage &image);
/**
* creates a pixmap from @p xface
*/
- QImage toImage(const QString &xface);
+ TQImage toImage(const TQString &xface);
private:
@@ -570,7 +570,7 @@ namespace KPIM {
void BigAdd(unsigned char a);
void BigClear();
- QCString WriteFace();
+ TQCString WriteFace();
void UnCompAll(char *fbuf);
void UnCompress(register char *f, register int wid, register int hei, register int lev);
void BigWrite(register char *fbuf);
diff --git a/libkdepim/ldapclient.cpp b/libkdepim/ldapclient.cpp
index 34e8044fb..359e03568 100644
--- a/libkdepim/ldapclient.cpp
+++ b/libkdepim/ldapclient.cpp
@@ -22,12 +22,12 @@
-#include <qfile.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qtextstream.h>
-#include <qurl.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqtextstream.h>
+#include <tqurl.h>
#include <kabc/ldapurl.h>
#include <kabc/ldif.h>
@@ -47,13 +47,13 @@ using namespace KPIM;
KConfig *KPIM::LdapSearch::s_config = 0L;
static KStaticDeleter<KConfig> configDeleter;
-QString LdapObject::toString() const
+TQString LdapObject::toString() const
{
- QString result = QString::fromLatin1( "\ndn: %1\n" ).arg( dn );
+ TQString result = TQString::fromLatin1( "\ndn: %1\n" ).arg( dn );
for ( LdapAttrMap::ConstIterator it = attrs.begin(); it != attrs.end(); ++it ) {
- QString attr = it.key();
+ TQString attr = it.key();
for ( LdapAttrValue::ConstIterator it2 = (*it).begin(); it2 != (*it).end(); ++it2 ) {
- result += QString::fromUtf8( KABC::LDIF::assembleLine( attr, *it2, 76 ) ) + "\n";
+ result += TQString::fromUtf8( KABC::LDIF::assembleLine( attr, *it2, 76 ) ) + "\n";
}
}
@@ -62,8 +62,8 @@ QString LdapObject::toString() const
void LdapObject::clear()
{
- dn = QString::null;
- objectClass = QString::null;
+ dn = TQString::null;
+ objectClass = TQString::null;
attrs.clear();
}
@@ -76,8 +76,8 @@ void LdapObject::assign( const LdapObject& that )
}
}
-LdapClient::LdapClient( int clientNumber, QObject* parent, const char* name )
- : QObject( parent, name ), mJob( 0 ), mActive( false ), mReportObjectClass( false )
+LdapClient::LdapClient( int clientNumber, TQObject* parent, const char* name )
+ : TQObject( parent, name ), mJob( 0 ), mActive( false ), mReportObjectClass( false )
{
// d = new LdapClientPrivate;
mClientNumber = clientNumber;
@@ -90,10 +90,10 @@ LdapClient::~LdapClient()
// delete d; d = 0;
}
-void LdapClient::setAttrs( const QStringList& attrs )
+void LdapClient::setAttrs( const TQStringList& attrs )
{
mAttrs = attrs;
- for ( QStringList::Iterator it = mAttrs.begin(); it != mAttrs.end(); ++it )
+ for ( TQStringList::Iterator it = mAttrs.begin(); it != mAttrs.end(); ++it )
if( (*it).lower() == "objectclass" ){
mReportObjectClass = true;
return;
@@ -102,7 +102,7 @@ void LdapClient::setAttrs( const QStringList& attrs )
mReportObjectClass = false;
}
-void LdapClient::startQuery( const QString& filter )
+void LdapClient::startQuery( const TQString& filter )
{
cancelQuery();
KABC::LDAPUrl url;
@@ -114,7 +114,7 @@ void LdapClient::startQuery( const QString& filter )
}
url.setHost( mServer.host() );
url.setPort( mServer.port() );
- url.setExtension( "x-ver", QString::number( mServer.version() ) );
+ url.setExtension( "x-ver", TQString::number( mServer.version() ) );
url.setDn( mServer.baseDN() );
url.setDn( mServer.baseDN() );
if ( mServer.security() == LdapServer::TLS ) url.setExtension( "x-tls","" );
@@ -124,9 +124,9 @@ void LdapClient::startQuery( const QString& filter )
if ( !mServer.mech().isEmpty() ) url.setExtension( "x-mech", mServer.mech() );
}
if ( mServer.timeLimit() != 0 ) url.setExtension( "x-timelimit",
- QString::number( mServer.timeLimit() ) );
+ TQString::number( mServer.timeLimit() ) );
if ( mServer.sizeLimit() != 0 ) url.setExtension( "x-sizelimit",
- QString::number( mServer.sizeLimit() ) );
+ TQString::number( mServer.sizeLimit() ) );
url.setAttributes( mAttrs );
url.setScope( mScope == "one" ? KABC::LDAPUrl::One : KABC::LDAPUrl::Sub );
@@ -137,12 +137,12 @@ void LdapClient::startQuery( const QString& filter )
startParseLDIF();
mActive = true;
mJob = KIO::get( url, false, false );
- connect( mJob, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) );
- connect( mJob, SIGNAL( infoMessage( KIO::Job*, const QString& ) ),
- this, SLOT( slotInfoMessage( KIO::Job*, const QString& ) ) );
- connect( mJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotDone() ) );
+ connect( mJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) );
+ connect( mJob, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ),
+ this, TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString& ) ) );
+ connect( mJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotDone() ) );
}
void LdapClient::cancelQuery()
@@ -155,12 +155,12 @@ void LdapClient::cancelQuery()
mActive = false;
}
-void LdapClient::slotData( KIO::Job*, const QByteArray& data )
+void LdapClient::slotData( KIO::Job*, const TQByteArray& data )
{
parseLDIF( data );
}
-void LdapClient::slotInfoMessage( KIO::Job*, const QString & )
+void LdapClient::slotInfoMessage( KIO::Job*, const TQString & )
{
//qDebug("Job said \"%s\"", info.latin1());
}
@@ -170,7 +170,7 @@ void LdapClient::slotDone()
endParseLDIF();
mActive = false;
#if 0
- for ( QValueList<LdapObject>::Iterator it = mObjects.begin(); it != mObjects.end(); ++it ) {
+ for ( TQValueList<LdapObject>::Iterator it = mObjects.begin(); it != mObjects.end(); ++it ) {
qDebug( (*it).toString().latin1() );
}
#endif
@@ -194,14 +194,14 @@ void LdapClient::endParseLDIF()
void LdapClient::finishCurrentObject()
{
mCurrentObject.dn = mLdif.dn();
- const QString sClass( mCurrentObject.objectClass.lower() );
+ const TQString sClass( mCurrentObject.objectClass.lower() );
if( sClass == "groupofnames" || sClass == "kolabgroupofnames" ){
LdapAttrMap::ConstIterator it = mCurrentObject.attrs.find("mail");
if( it == mCurrentObject.attrs.end() ){
// No explicit mail address found so far?
// Fine, then we use the address stored in the DN.
- QString sMail;
- QStringList lMail = QStringList::split(",dc=", mCurrentObject.dn);
+ TQString sMail;
+ TQStringList lMail = TQStringList::split(",dc=", mCurrentObject.dn);
const int n = lMail.count();
if( n ){
if( lMail.first().lower().startsWith("cn=") ){
@@ -223,9 +223,9 @@ void LdapClient::finishCurrentObject()
mCurrentObject.clear();
}
-void LdapClient::parseLDIF( const QByteArray& data )
+void LdapClient::parseLDIF( const TQByteArray& data )
{
- //kdDebug(5300) << "LdapClient::parseLDIF( " << QCString(data.data(), data.size()+1) << " )" << endl;
+ //kdDebug(5300) << "LdapClient::parseLDIF( " << TQCString(data.data(), data.size()+1) << " )" << endl;
if ( data.size() ) {
mLdif.setLDIF( data );
} else {
@@ -233,21 +233,21 @@ void LdapClient::parseLDIF( const QByteArray& data )
}
KABC::LDIF::ParseVal ret;
- QString name;
+ TQString name;
do {
ret = mLdif.nextItem();
switch ( ret ) {
case KABC::LDIF::Item:
{
name = mLdif.attr();
- // Must make a copy! QByteArray is explicitely shared
- QByteArray value = mLdif.val().copy();
+ // Must make a copy! TQByteArray is explicitely shared
+ TQByteArray value = mLdif.val().copy();
bool bIsObjectClass = name.lower() == "objectclass";
if( bIsObjectClass )
- mCurrentObject.objectClass = QString::fromUtf8( value, value.size() );
+ mCurrentObject.objectClass = TQString::fromUtf8( value, value.size() );
if( mReportObjectClass || !bIsObjectClass )
mCurrentObject.attrs[ name ].append( value );
- //kdDebug(5300) << "LdapClient::parseLDIF(): name=" << name << " value=" << QCString(value.data(), value.size()+1) << endl;
+ //kdDebug(5300) << "LdapClient::parseLDIF(): name=" << name << " value=" << TQCString(value.data(), value.size()+1) << endl;
}
break;
case KABC::LDIF::EndEntry:
@@ -276,55 +276,55 @@ void LdapClient::setCompletionWeight( int weight )
void LdapSearch::readConfig( LdapServer &server, KConfig *config, int j, bool active )
{
- QString prefix;
+ TQString prefix;
if ( active ) prefix = "Selected";
- QString host = config->readEntry( prefix + QString( "Host%1" ).arg( j ), "" ).stripWhiteSpace();
+ TQString host = config->readEntry( prefix + TQString( "Host%1" ).arg( j ), "" ).stripWhiteSpace();
if ( !host.isEmpty() )
server.setHost( host );
- int port = config->readNumEntry( prefix + QString( "Port%1" ).arg( j ), 389 );
+ int port = config->readNumEntry( prefix + TQString( "Port%1" ).arg( j ), 389 );
server.setPort( port );
- QString base = config->readEntry( prefix + QString( "Base%1" ).arg( j ), "" ).stripWhiteSpace();
+ TQString base = config->readEntry( prefix + TQString( "Base%1" ).arg( j ), "" ).stripWhiteSpace();
if ( !base.isEmpty() )
server.setBaseDN( base );
- QString user = config->readEntry( prefix + QString( "User%1" ).arg( j ) ).stripWhiteSpace();
+ TQString user = config->readEntry( prefix + TQString( "User%1" ).arg( j ) ).stripWhiteSpace();
if ( !user.isEmpty() )
server.setUser( user );
- QString bindDN = config->readEntry( prefix + QString( "Bind%1" ).arg( j ) ).stripWhiteSpace();
+ TQString bindDN = config->readEntry( prefix + TQString( "Bind%1" ).arg( j ) ).stripWhiteSpace();
if ( !bindDN.isEmpty() )
server.setBindDN( bindDN );
- QString pwdBindDN = config->readEntry( prefix + QString( "PwdBind%1" ).arg( j ) );
+ TQString pwdBindDN = config->readEntry( prefix + TQString( "PwdBind%1" ).arg( j ) );
if ( !pwdBindDN.isEmpty() )
server.setPwdBindDN( pwdBindDN );
- server.setTimeLimit( config->readNumEntry( prefix + QString( "TimeLimit%1" ).arg( j ) ) );
- server.setSizeLimit( config->readNumEntry( prefix + QString( "SizeLimit%1" ).arg( j ) ) );
- server.setVersion( config->readNumEntry( prefix + QString( "Version%1" ).arg( j ), 3 ) );
- server.setSecurity( config->readNumEntry( prefix + QString( "Security%1" ).arg( j ) ) );
- server.setAuth( config->readNumEntry( prefix + QString( "Auth%1" ).arg( j ) ) );
- server.setMech( config->readEntry( prefix + QString( "Mech%1" ).arg( j ) ) );
+ server.setTimeLimit( config->readNumEntry( prefix + TQString( "TimeLimit%1" ).arg( j ) ) );
+ server.setSizeLimit( config->readNumEntry( prefix + TQString( "SizeLimit%1" ).arg( j ) ) );
+ server.setVersion( config->readNumEntry( prefix + TQString( "Version%1" ).arg( j ), 3 ) );
+ server.setSecurity( config->readNumEntry( prefix + TQString( "Security%1" ).arg( j ) ) );
+ server.setAuth( config->readNumEntry( prefix + TQString( "Auth%1" ).arg( j ) ) );
+ server.setMech( config->readEntry( prefix + TQString( "Mech%1" ).arg( j ) ) );
}
void LdapSearch::writeConfig( const LdapServer &server, KConfig *config, int j, bool active )
{
- QString prefix;
+ TQString prefix;
if ( active ) prefix = "Selected";
- config->writeEntry( prefix + QString( "Host%1" ).arg( j ), server.host() );
- config->writeEntry( prefix + QString( "Port%1" ).arg( j ), server.port() );
- config->writeEntry( prefix + QString( "Base%1" ).arg( j ), server.baseDN() );
- config->writeEntry( prefix + QString( "User%1" ).arg( j ), server.user() );
- config->writeEntry( prefix + QString( "Bind%1" ).arg( j ), server.bindDN() );
- config->writeEntry( prefix + QString( "PwdBind%1" ).arg( j ), server.pwdBindDN() );
- config->writeEntry( prefix + QString( "TimeLimit%1" ).arg( j ), server.timeLimit() );
- config->writeEntry( prefix + QString( "SizeLimit%1" ).arg( j ), server.sizeLimit() );
- config->writeEntry( prefix + QString( "Version%1" ).arg( j ), server.version() );
- config->writeEntry( prefix + QString( "Security%1" ).arg( j ), server.security() );
- config->writeEntry( prefix + QString( "Auth%1" ).arg( j ), server.auth() );
- config->writeEntry( prefix + QString( "Mech%1" ).arg( j ), server.mech() );
+ config->writeEntry( prefix + TQString( "Host%1" ).arg( j ), server.host() );
+ config->writeEntry( prefix + TQString( "Port%1" ).arg( j ), server.port() );
+ config->writeEntry( prefix + TQString( "Base%1" ).arg( j ), server.baseDN() );
+ config->writeEntry( prefix + TQString( "User%1" ).arg( j ), server.user() );
+ config->writeEntry( prefix + TQString( "Bind%1" ).arg( j ), server.bindDN() );
+ config->writeEntry( prefix + TQString( "PwdBind%1" ).arg( j ), server.pwdBindDN() );
+ config->writeEntry( prefix + TQString( "TimeLimit%1" ).arg( j ), server.timeLimit() );
+ config->writeEntry( prefix + TQString( "SizeLimit%1" ).arg( j ), server.sizeLimit() );
+ config->writeEntry( prefix + TQString( "Version%1" ).arg( j ), server.version() );
+ config->writeEntry( prefix + TQString( "Security%1" ).arg( j ), server.security() );
+ config->writeEntry( prefix + TQString( "Auth%1" ).arg( j ), server.auth() );
+ config->writeEntry( prefix + TQString( "Mech%1" ).arg( j ), server.mech() );
}
KConfig* LdapSearch::config()
@@ -345,14 +345,14 @@ LdapSearch::LdapSearch()
}
readConfig();
- connect(KDirWatch::self(), SIGNAL(dirty (const QString&)),this,
- SLOT(slotFileChanged(const QString&)));
+ connect(KDirWatch::self(), TQT_SIGNAL(dirty (const TQString&)),this,
+ TQT_SLOT(slotFileChanged(const TQString&)));
}
void LdapSearch::readConfig()
{
cancelSearch();
- QValueList< LdapClient* >::Iterator it;
+ TQValueList< LdapClient* >::Iterator it;
for ( it = mClients.begin(); it != mClients.end(); ++it )
delete *it;
mClients.clear();
@@ -371,38 +371,38 @@ void LdapSearch::readConfig()
if ( !server.host().isEmpty() ) mNoLDAPLookup = false;
ldapClient->setServer( server );
- int completionWeight = config->readNumEntry( QString( "SelectedCompletionWeight%1" ).arg( j ), -1 );
+ int completionWeight = config->readNumEntry( TQString( "SelectedCompletionWeight%1" ).arg( j ), -1 );
if ( completionWeight != -1 )
ldapClient->setCompletionWeight( completionWeight );
- QStringList attrs;
+ TQStringList attrs;
// note: we need "objectClass" to detect distribution lists
attrs << "cn" << "mail" << "givenname" << "sn" << "objectClass";
ldapClient->setAttrs( attrs );
- connect( ldapClient, SIGNAL( result( const KPIM::LdapObject& ) ),
- this, SLOT( slotLDAPResult( const KPIM::LdapObject& ) ) );
- connect( ldapClient, SIGNAL( done() ),
- this, SLOT( slotLDAPDone() ) );
- connect( ldapClient, SIGNAL( error( const QString& ) ),
- this, SLOT( slotLDAPError( const QString& ) ) );
+ connect( ldapClient, TQT_SIGNAL( result( const KPIM::LdapObject& ) ),
+ this, TQT_SLOT( slotLDAPResult( const KPIM::LdapObject& ) ) );
+ connect( ldapClient, TQT_SIGNAL( done() ),
+ this, TQT_SLOT( slotLDAPDone() ) );
+ connect( ldapClient, TQT_SIGNAL( error( const TQString& ) ),
+ this, TQT_SLOT( slotLDAPError( const TQString& ) ) );
mClients.append( ldapClient );
}
- connect( &mDataTimer, SIGNAL( timeout() ), SLOT( slotDataTimer() ) );
+ connect( &mDataTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDataTimer() ) );
}
mConfigFile = locateLocal( "config", "kabldaprc" );
KDirWatch::self()->addFile( mConfigFile );
}
-void LdapSearch::slotFileChanged( const QString& file )
+void LdapSearch::slotFileChanged( const TQString& file )
{
if ( file == mConfigFile )
readConfig();
}
-void LdapSearch::startSearch( const QString& txt )
+void LdapSearch::startSearch( const TQString& txt )
{
if ( mNoLDAPLookup )
return;
@@ -427,10 +427,10 @@ void LdapSearch::startSearch( const QString& txt )
* This allows both resource accounts with an email address which are not a person and
* person entries without an email address to show up, while still not showing things
* like structural entries in the ldap tree. */
- QString filter = QString( "&(|(objectclass=person)(objectclass=groupOfNames)(mail=*))(|(cn=%1*)(mail=%2*)(mail=*@%3*)(givenName=%4*)(sn=%5*))" )
+ TQString filter = TQString( "&(|(objectclass=person)(objectclass=groupOfNames)(mail=*))(|(cn=%1*)(mail=%2*)(mail=*@%3*)(givenName=%4*)(sn=%5*))" )
.arg( mSearchText ).arg( mSearchText ).arg( mSearchText ).arg( mSearchText ).arg( mSearchText );
- QValueList< LdapClient* >::Iterator it;
+ TQValueList< LdapClient* >::Iterator it;
for ( it = mClients.begin(); it != mClients.end(); ++it ) {
(*it)->startQuery( filter );
kdDebug(5300) << "LdapSearch::startSearch() " << filter << endl;
@@ -440,7 +440,7 @@ void LdapSearch::startSearch( const QString& txt )
void LdapSearch::cancelSearch()
{
- QValueList< LdapClient* >::Iterator it;
+ TQValueList< LdapClient* >::Iterator it;
for ( it = mClients.begin(); it != mClients.end(); ++it )
(*it)->cancelQuery();
@@ -455,7 +455,7 @@ void LdapSearch::slotLDAPResult( const KPIM::LdapObject& obj )
mDataTimer.start( 500, true );
}
-void LdapSearch::slotLDAPError( const QString& )
+void LdapSearch::slotLDAPError( const TQString& )
{
slotLDAPDone();
}
@@ -470,7 +470,7 @@ void LdapSearch::slotLDAPDone()
void LdapSearch::slotDataTimer()
{
- QStringList lst;
+ TQStringList lst;
LdapResultList reslist;
makeSearchData( lst, reslist );
if ( !lst.isEmpty() )
@@ -487,14 +487,14 @@ void LdapSearch::finish()
emit searchDone();
}
-void LdapSearch::makeSearchData( QStringList& ret, LdapResultList& resList )
+void LdapSearch::makeSearchData( TQStringList& ret, LdapResultList& resList )
{
- QString search_text_upper = mSearchText.upper();
+ TQString search_text_upper = mSearchText.upper();
- QValueList< KPIM::LdapObject >::ConstIterator it1;
+ TQValueList< KPIM::LdapObject >::ConstIterator it1;
for ( it1 = mResults.begin(); it1 != mResults.end(); ++it1 ) {
- QString name, mail, givenname, sn;
- QStringList mails;
+ TQString name, mail, givenname, sn;
+ TQStringList mails;
bool isDistributionList = false;
bool wasCN = false;
bool wasDC = false;
@@ -503,11 +503,11 @@ void LdapSearch::makeSearchData( QStringList& ret, LdapResultList& resList )
LdapAttrMap::ConstIterator it2;
for ( it2 = (*it1).attrs.begin(); it2 != (*it1).attrs.end(); ++it2 ) {
- QByteArray val = (*it2).first();
+ TQByteArray val = (*it2).first();
int len = val.size();
if( len > 0 && '\0' == val[len-1] )
--len;
- const QString tmp = QString::fromUtf8( val, len );
+ const TQString tmp = TQString::fromUtf8( val, len );
kdDebug(5300) << " key: \"" << it2.key() << "\" value: \"" << tmp << "\"" << endl;
if ( it2.key() == "cn" ) {
name = tmp;
@@ -536,7 +536,7 @@ void LdapSearch::makeSearchData( QStringList& ret, LdapResultList& resList )
mail = tmp;
LdapAttrValue::ConstIterator it3 = it2.data().begin();
for ( ; it3 != it2.data().end(); ++it3 ) {
- mails.append( QString::fromUtf8( (*it3).data(), (*it3).size() ) );
+ mails.append( TQString::fromUtf8( (*it3).data(), (*it3).size() ) );
}
} else if( it2.key() == "givenName" )
givenname = tmp;
@@ -576,7 +576,7 @@ void LdapSearch::makeSearchData( QStringList& ret, LdapResultList& resList )
ret.append( mail );
} else {
kdDebug(5300) << "LdapSearch::makeSearchData() name: \"" << name << "\" mail: \"" << mail << "\"" << endl;
- ret.append( QString( "%1 <%2>" ).arg( name ).arg( mail ) );
+ ret.append( TQString( "%1 <%2>" ).arg( name ).arg( mail ) );
}
LdapResult sr;
diff --git a/libkdepim/ldapclient.h b/libkdepim/ldapclient.h
index 5be00e85c..5167660e2 100644
--- a/libkdepim/ldapclient.h
+++ b/libkdepim/ldapclient.h
@@ -23,13 +23,13 @@
#define KPIM_LDAPCLIENT_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstringlist.h>
-#include <qmemarray.h>
-#include <qguardedptr.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
+#include <tqmemarray.h>
+#include <tqguardedptr.h>
+#include <tqtimer.h>
#include <kio/job.h>
#include <kabc/ldif.h>
@@ -40,8 +40,8 @@
namespace KPIM {
class LdapClient;
-typedef QValueList<QByteArray> LdapAttrValue;
-typedef QMap<QString,LdapAttrValue > LdapAttrMap;
+typedef TQValueList<TQByteArray> LdapAttrValue;
+typedef TQMap<TQString,LdapAttrValue > LdapAttrMap;
class LdapServer
{
@@ -57,40 +57,40 @@ class LdapServer
enum Security{ Sec_None, TLS, SSL };
enum Auth{ Anonymous, Simple, SASL };
- QString host() const { return mHost; }
+ TQString host() const { return mHost; }
int port() const { return mPort; }
- const QString &baseDN() const { return mBaseDN; }
- const QString &user() const { return mUser; }
- const QString &bindDN() const { return mBindDN; }
- const QString &pwdBindDN() const { return mPwdBindDN; }
+ const TQString &baseDN() const { return mBaseDN; }
+ const TQString &user() const { return mUser; }
+ const TQString &bindDN() const { return mBindDN; }
+ const TQString &pwdBindDN() const { return mPwdBindDN; }
int timeLimit() const { return mTimeLimit; }
int sizeLimit() const { return mSizeLimit; }
int version() const { return mVersion; }
int security() const { return mSecurity; }
int auth() const { return mAuth; }
- const QString &mech() const { return mMech; }
+ const TQString &mech() const { return mMech; }
- void setHost( const QString &host ) { mHost = host; }
+ void setHost( const TQString &host ) { mHost = host; }
void setPort( int port ) { mPort = port; }
- void setBaseDN( const QString &baseDN ) { mBaseDN = baseDN; }
- void setUser( const QString &user ) { mUser = user; }
- void setBindDN( const QString &bindDN ) { mBindDN = bindDN; }
- void setPwdBindDN( const QString &pwdBindDN ) { mPwdBindDN = pwdBindDN; }
+ void setBaseDN( const TQString &baseDN ) { mBaseDN = baseDN; }
+ void setUser( const TQString &user ) { mUser = user; }
+ void setBindDN( const TQString &bindDN ) { mBindDN = bindDN; }
+ void setPwdBindDN( const TQString &pwdBindDN ) { mPwdBindDN = pwdBindDN; }
void setTimeLimit( int timelimit ) { mTimeLimit = timelimit; }
void setSizeLimit( int sizelimit ) { mSizeLimit = sizelimit; }
void setVersion( int version ) { mVersion = version; }
void setSecurity( int security ) { mSecurity = security; } //0-No, 1-TLS, 2-SSL - KDE4: add an enum to Lda
void setAuth( int auth ) { mAuth = auth; } //0-Anonymous, 1-simple, 2-SASL - KDE4: add an enum to LdapCon
- void setMech( const QString &mech ) { mMech = mech; }
+ void setMech( const TQString &mech ) { mMech = mech; }
private:
- QString mHost;
+ TQString mHost;
int mPort;
- QString mBaseDN;
- QString mUser;
- QString mBindDN;
- QString mPwdBindDN;
- QString mMech;
+ TQString mBaseDN;
+ TQString mUser;
+ TQString mBindDN;
+ TQString mPwdBindDN;
+ TQString mMech;
int mTimeLimit, mSizeLimit, mVersion, mSecurity, mAuth;
};
@@ -106,8 +106,8 @@ class LdapObject
{
public:
LdapObject()
- : dn( QString::null ), client( 0 ) {}
- explicit LdapObject( const QString& _dn, LdapClient* _cl ) : dn( _dn ), client( _cl ) {}
+ : dn( TQString::null ), client( 0 ) {}
+ explicit LdapObject( const TQString& _dn, LdapClient* _cl ) : dn( _dn ), client( _cl ) {}
LdapObject( const LdapObject& that ) { assign( that ); }
LdapObject& operator=( const LdapObject& that )
@@ -116,12 +116,12 @@ class LdapObject
return *this;
}
- QString toString() const;
+ TQString toString() const;
void clear();
- QString dn;
- QString objectClass;
+ TQString dn;
+ TQString objectClass;
LdapAttrMap attrs;
LdapClient* client;
@@ -144,7 +144,7 @@ class KDE_EXPORT LdapClient : public QObject
Q_OBJECT
public:
- LdapClient( int clientNumber, QObject* parent = 0, const char* name = 0 );
+ LdapClient( int clientNumber, TQObject* parent = 0, const char* name = 0 );
virtual ~LdapClient();
/*! returns true if there is a query running */
@@ -160,14 +160,14 @@ class KDE_EXPORT LdapClient : public QObject
* returned, or an empty list if
* all attributes are wanted
*/
- QStringList attrs() const { return mAttrs; }
+ TQStringList attrs() const { return mAttrs; }
signals:
/*! Emitted when the query is done */
void done();
/*! Emitted in case of error */
- void error( const QString& );
+ void error( const TQString& );
/*! Emitted once for each object returned
* from the query
@@ -179,14 +179,14 @@ class KDE_EXPORT LdapClient : public QObject
* returned, or an empty list if
* all attributes are wanted
*/
- void setAttrs( const QStringList& attrs );
+ void setAttrs( const TQStringList& attrs );
- void setScope( const QString scope ) { mScope = scope; }
+ void setScope( const TQString scope ) { mScope = scope; }
/*!
* Start the query with filter filter
*/
- void startQuery( const QString& filter );
+ void startQuery( const TQString& filter );
/*!
* Abort a running query
@@ -194,21 +194,21 @@ class KDE_EXPORT LdapClient : public QObject
void cancelQuery();
protected slots:
- void slotData( KIO::Job*, const QByteArray &data );
- void slotInfoMessage( KIO::Job*, const QString &info );
+ void slotData( KIO::Job*, const TQByteArray &data );
+ void slotInfoMessage( KIO::Job*, const TQString &info );
void slotDone();
protected:
void startParseLDIF();
- void parseLDIF( const QByteArray& data );
+ void parseLDIF( const TQByteArray& data );
void endParseLDIF();
void finishCurrentObject();
LdapServer mServer;
- QString mScope;
- QStringList mAttrs;
+ TQString mScope;
+ TQStringList mAttrs;
- QGuardedPtr<KIO::SimpleJob> mJob;
+ TQGuardedPtr<KIO::SimpleJob> mJob;
bool mActive;
bool mReportObjectClass;
@@ -227,12 +227,12 @@ class KDE_EXPORT LdapClient : public QObject
* Structure describing one result returned by a LDAP query
*/
struct LdapResult {
- QString name; ///< full name
- QStringList email; ///< emails
+ TQString name; ///< full name
+ TQStringList email; ///< emails
int clientNumber; ///< for sorting in a ldap-only lookup
int completionWeight; ///< for sorting in a completion list
};
-typedef QValueList<LdapResult> LdapResultList;
+typedef TQValueList<LdapResult> LdapResultList;
/**
@@ -253,16 +253,16 @@ class KDE_EXPORT LdapSearch : public QObject
static void readConfig( LdapServer &server, KConfig *config, int num, bool active );
static void writeConfig( const LdapServer &server, KConfig *config, int j, bool active );
- void startSearch( const QString& txt );
+ void startSearch( const TQString& txt );
void cancelSearch();
bool isAvailable() const;
- QValueList< LdapClient* > clients() const { return mClients; }
+ TQValueList< LdapClient* > clients() const { return mClients; }
signals:
/// Results, assembled as "Full Name <email>"
/// (This signal can be emitted many times)
- void searchData( const QStringList& );
+ void searchData( const TQStringList& );
/// Another form for the results, with separate fields
/// (This signal can be emitted many times)
void searchData( const KPIM::LdapResultList& );
@@ -270,22 +270,22 @@ class KDE_EXPORT LdapSearch : public QObject
private slots:
void slotLDAPResult( const KPIM::LdapObject& );
- void slotLDAPError( const QString& );
+ void slotLDAPError( const TQString& );
void slotLDAPDone();
void slotDataTimer();
- void slotFileChanged( const QString& );
+ void slotFileChanged( const TQString& );
private:
void readConfig();
void finish();
- void makeSearchData( QStringList& ret, LdapResultList& resList );
- QValueList< LdapClient* > mClients;
- QString mSearchText;
- QTimer mDataTimer;
+ void makeSearchData( TQStringList& ret, LdapResultList& resList );
+ TQValueList< LdapClient* > mClients;
+ TQString mSearchText;
+ TQTimer mDataTimer;
int mActiveClients;
bool mNoLDAPLookup;
- QValueList< LdapObject > mResults;
- QString mConfigFile;
+ TQValueList< LdapObject > mResults;
+ TQString mConfigFile;
private:
static KConfig *s_config;
diff --git a/libkdepim/ldapsearchdialog.cpp b/libkdepim/ldapsearchdialog.cpp
index 57abef23c..72011966a 100644
--- a/libkdepim/ldapsearchdialog.cpp
+++ b/libkdepim/ldapsearchdialog.cpp
@@ -21,13 +21,13 @@
#include "ldapsearchdialog.h"
#include "ldapclient.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
#include <kabc/addresslineedit.h>
#include <kapplication.h>
@@ -39,23 +39,23 @@
using namespace KPIM;
-static QString asUtf8( const QByteArray &val )
+static TQString asUtf8( const TQByteArray &val )
{
if ( val.isEmpty() )
- return QString::null;
+ return TQString::null;
const char *data = val.data();
- //QString::fromUtf8() bug workaround
+ //TQString::fromUtf8() bug workaround
if ( data[ val.size() - 1 ] == '\0' )
- return QString::fromUtf8( data, val.size() - 1 );
+ return TQString::fromUtf8( data, val.size() - 1 );
else
- return QString::fromUtf8( data, val.size() );
+ return TQString::fromUtf8( data, val.size() );
}
-static QString join( const KPIM::LdapAttrValue& lst, const QString& sep )
+static TQString join( const KPIM::LdapAttrValue& lst, const TQString& sep )
{
- QString res;
+ TQString res;
bool alredy = false;
for ( KPIM::LdapAttrValue::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
if ( alredy )
@@ -66,9 +66,9 @@ static QString join( const KPIM::LdapAttrValue& lst, const QString& sep )
return res;
}
-static QMap<QString, QString>& adrbookattr2ldap()
+static TQMap<TQString, TQString>& adrbookattr2ldap()
{
- static QMap<QString, QString> keys;
+ static TQMap<TQString, TQString> keys;
if ( keys.isEmpty() ) {
keys[ i18n( "Title" ) ] = "title";
@@ -97,46 +97,46 @@ static QMap<QString, QString>& adrbookattr2ldap()
class ContactListItem : public QListViewItem
{
public:
- ContactListItem( QListView* parent, const KPIM::LdapAttrMap& attrs )
- : QListViewItem( parent ), mAttrs( attrs )
+ ContactListItem( TQListView* parent, const KPIM::LdapAttrMap& attrs )
+ : TQListViewItem( parent ), mAttrs( attrs )
{ }
KPIM::LdapAttrMap mAttrs;
- virtual QString text( int col ) const
+ virtual TQString text( int col ) const
{
// Look up a suitable attribute for column col
- const QString colName = listView()->columnText( col );
- const QString ldapAttrName = adrbookattr2ldap()[ colName ];
+ const TQString colName = listView()->columnText( col );
+ const TQString ldapAttrName = adrbookattr2ldap()[ colName ];
return join( mAttrs[ ldapAttrName ], ", " );
}
};
-LDAPSearchDialog::LDAPSearchDialog( QWidget* parent, const char* name )
+LDAPSearchDialog::LDAPSearchDialog( TQWidget* parent, const char* name )
: KDialogBase( Plain, i18n( "Search for Addresses in Directory" ), Help | User1 |
User2 | User3 | Cancel, Default, parent, name, false, true )
{
setButtonCancel( KStdGuiItem::close() );
- QFrame *page = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout( page, marginHint(), spacingHint() );
+ TQFrame *page = plainPage();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, marginHint(), spacingHint() );
- QGroupBox *groupBox = new QGroupBox( i18n( "Search for Addresses in Directory" ),
+ TQGroupBox *groupBox = new TQGroupBox( i18n( "Search for Addresses in Directory" ),
page );
- groupBox->setFrameShape( QGroupBox::Box );
- groupBox->setFrameShadow( QGroupBox::Sunken );
+ groupBox->setFrameShape( TQGroupBox::Box );
+ groupBox->setFrameShadow( TQGroupBox::Sunken );
groupBox->setColumnLayout( 0, Qt::Vertical );
- QGridLayout *boxLayout = new QGridLayout( groupBox->layout(), 2,
+ TQGridLayout *boxLayout = new TQGridLayout( groupBox->layout(), 2,
5, spacingHint() );
boxLayout->setColStretch( 1, 1 );
- QLabel *label = new QLabel( i18n( "Search for:" ), groupBox );
+ TQLabel *label = new TQLabel( i18n( "Search for:" ), groupBox );
boxLayout->addWidget( label, 0, 0 );
mSearchEdit = new KLineEdit( groupBox );
boxLayout->addWidget( mSearchEdit, 0, 1 );
label->setBuddy( mSearchEdit );
- label = new QLabel( i18n( "in" ), groupBox );
+ label = new TQLabel( i18n( "in" ), groupBox );
boxLayout->addWidget( label, 0, 2 );
mFilterCombo = new KComboBox( groupBox );
@@ -146,8 +146,8 @@ LDAPSearchDialog::LDAPSearchDialog( QWidget* parent, const char* name )
mFilterCombo->insertItem( i18n( "Work Number" ) );
boxLayout->addWidget( mFilterCombo, 0, 3 );
- QSize buttonSize;
- mSearchButton = new QPushButton( i18n( "Stop" ), groupBox );
+ TQSize buttonSize;
+ mSearchButton = new TQPushButton( i18n( "Stop" ), groupBox );
buttonSize = mSearchButton->sizeHint();
mSearchButton->setText( i18n( "Search" ) );
if ( buttonSize.width() < mSearchButton->sizeHint().width() )
@@ -157,7 +157,7 @@ LDAPSearchDialog::LDAPSearchDialog( QWidget* parent, const char* name )
mSearchButton->setDefault( true );
boxLayout->addWidget( mSearchButton, 0, 4 );
- mRecursiveCheckbox = new QCheckBox( i18n( "Recursive search" ), groupBox );
+ mRecursiveCheckbox = new TQCheckBox( i18n( "Recursive search" ), groupBox );
mRecursiveCheckbox->setChecked( true );
boxLayout->addMultiCellWidget( mRecursiveCheckbox, 1, 1, 0, 4 );
@@ -168,13 +168,13 @@ LDAPSearchDialog::LDAPSearchDialog( QWidget* parent, const char* name )
topLayout->addWidget( groupBox );
- mResultListView = new QListView( page );
- mResultListView->setSelectionMode( QListView::Multi );
+ mResultListView = new TQListView( page );
+ mResultListView->setSelectionMode( TQListView::Multi );
mResultListView->setAllColumnsShowFocus( true );
mResultListView->setShowSortIndicator( true );
topLayout->addWidget( mResultListView );
- resize( QSize( 600, 400).expandedTo( minimumSizeHint() ) );
+ resize( TQSize( 600, 400).expandedTo( minimumSizeHint() ) );
setButtonText( User1, i18n( "Unselect All" ) );
setButtonText( User2, i18n( "Select All" ) );
@@ -183,10 +183,10 @@ LDAPSearchDialog::LDAPSearchDialog( QWidget* parent, const char* name )
mNumHosts = 0;
mIsOK = false;
- connect( mRecursiveCheckbox, SIGNAL( toggled( bool ) ),
- this, SLOT( slotSetScope( bool ) ) );
- connect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStartSearch() ) );
+ connect( mRecursiveCheckbox, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotSetScope( bool ) ) );
+ connect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStartSearch() ) );
setTabOrder(mSearchEdit, mFilterCombo);
setTabOrder(mFilterCombo, mSearchButton);
@@ -226,42 +226,42 @@ void LDAPSearchDialog::restoreSettings()
for ( int j = 0; j < mNumHosts; ++j ) {
KPIM::LdapServer ldapServer;
- QString host = config->readEntry( QString( "SelectedHost%1" ).arg( j ), "" );
+ TQString host = config->readEntry( TQString( "SelectedHost%1" ).arg( j ), "" );
if ( !host.isEmpty() )
ldapServer.setHost( host );
- int port = config->readUnsignedNumEntry( QString( "SelectedPort%1" ).arg( j ) );
+ int port = config->readUnsignedNumEntry( TQString( "SelectedPort%1" ).arg( j ) );
if ( port )
ldapServer.setPort( port );
- QString base = config->readEntry( QString( "SelectedBase%1" ).arg( j ), "" );
+ TQString base = config->readEntry( TQString( "SelectedBase%1" ).arg( j ), "" );
if ( !base.isEmpty() )
ldapServer.setBaseDN( base );
- QString bindDN = config->readEntry( QString( "SelectedBind%1" ).arg( j ), "" );
+ TQString bindDN = config->readEntry( TQString( "SelectedBind%1" ).arg( j ), "" );
if ( !bindDN.isEmpty() )
ldapServer.setBindDN( bindDN );
- QString pwdBindDN = config->readEntry( QString( "SelectedPwdBind%1" ).arg( j ), "" );
+ TQString pwdBindDN = config->readEntry( TQString( "SelectedPwdBind%1" ).arg( j ), "" );
if ( !pwdBindDN.isEmpty() )
ldapServer.setPwdBindDN( pwdBindDN );
KPIM::LdapClient* ldapClient = new KPIM::LdapClient( 0, this, "ldapclient" );
ldapClient->setServer( ldapServer );
- QStringList attrs;
+ TQStringList attrs;
- for ( QMap<QString,QString>::Iterator it = adrbookattr2ldap().begin(); it != adrbookattr2ldap().end(); ++it )
+ for ( TQMap<TQString,TQString>::Iterator it = adrbookattr2ldap().begin(); it != adrbookattr2ldap().end(); ++it )
attrs << *it;
ldapClient->setAttrs( attrs );
- connect( ldapClient, SIGNAL( result( const KPIM::LdapObject& ) ),
- this, SLOT( slotAddResult( const KPIM::LdapObject& ) ) );
- connect( ldapClient, SIGNAL( done() ),
- this, SLOT( slotSearchDone() ) );
- connect( ldapClient, SIGNAL( error( const QString& ) ),
- this, SLOT( slotError( const QString& ) ) );
+ connect( ldapClient, TQT_SIGNAL( result( const KPIM::LdapObject& ) ),
+ this, TQT_SLOT( slotAddResult( const KPIM::LdapObject& ) ) );
+ connect( ldapClient, TQT_SIGNAL( done() ),
+ this, TQT_SLOT( slotSearchDone() ) );
+ connect( ldapClient, TQT_SIGNAL( error( const TQString& ) ),
+ this, TQT_SLOT( slotError( const TQString& ) ) );
mLdapClientList.append( ldapClient );
}
@@ -324,7 +324,7 @@ void LDAPSearchDialog::slotSetScope( bool rec )
}
}
-QString LDAPSearchDialog::makeFilter( const QString& query, const QString& attr,
+TQString LDAPSearchDialog::makeFilter( const TQString& query, const TQString& attr,
bool startsWith )
{
/* The reasoning behind this filter is:
@@ -333,7 +333,7 @@ QString LDAPSearchDialog::makeFilter( const QString& query, const QString& attr,
* This allows both resource accounts with an email address which are not a person and
* person entries without an email address to show up, while still not showing things
* like structural entries in the ldap tree. */
- QString result( "&(|(objectclass=person)(objectclass=groupofnames)(mail=*))(" );
+ TQString result( "&(|(objectclass=person)(objectclass=groupofnames)(mail=*))(" );
if( query.isEmpty() )
// Return a filter that matches everything
return result + "|(cn=*)(sn=*)" + ")";
@@ -351,7 +351,7 @@ QString LDAPSearchDialog::makeFilter( const QString& query, const QString& attr,
result = result.arg( "telephoneNumber" ).arg( query );
} else {
// Error?
- result = QString::null;
+ result = TQString::null;
return result;
}
}
@@ -363,17 +363,17 @@ void LDAPSearchDialog::slotStartSearch()
{
cancelQuery();
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( Qt::waitCursor );
mSearchButton->setText( i18n( "Stop" ) );
- disconnect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStartSearch() ) );
- connect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStopSearch() ) );
+ disconnect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStartSearch() ) );
+ connect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStopSearch() ) );
bool startsWith = (mSearchType->currentItem() == 1);
- QString filter = makeFilter( mSearchEdit->text().stripWhiteSpace(), mFilterCombo->currentText(), startsWith );
+ TQString filter = makeFilter( mSearchEdit->text().stripWhiteSpace(), mFilterCombo->currentText(), startsWith );
// loop in the list and run the KPIM::LdapClients
mResultListView->clear();
@@ -398,22 +398,22 @@ void LDAPSearchDialog::slotSearchDone()
return;
}
- disconnect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStopSearch() ) );
- connect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStartSearch() ) );
+ disconnect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStopSearch() ) );
+ connect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStartSearch() ) );
mSearchButton->setText( i18n( "Search" ) );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
-void LDAPSearchDialog::slotError( const QString& error )
+void LDAPSearchDialog::slotError( const TQString& error )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
KMessageBox::error( this, error );
}
-void LDAPSearchDialog::closeEvent( QCloseEvent* e )
+void LDAPSearchDialog::closeEvent( TQCloseEvent* e )
{
slotStopSearch();
e->accept();
@@ -423,15 +423,15 @@ void LDAPSearchDialog::closeEvent( QCloseEvent* e )
* Returns a ", " separated list of email addresses that were
* checked by the user
*/
-QString LDAPSearchDialog::selectedEMails() const
+TQString LDAPSearchDialog::selectedEMails() const
{
- QStringList result;
+ TQStringList result;
ContactListItem* cli = static_cast<ContactListItem*>( mResultListView->firstChild() );
while ( cli ) {
if ( cli->isSelected() ) {
- QString email = asUtf8( cli->mAttrs[ "mail" ].first() ).stripWhiteSpace();
+ TQString email = asUtf8( cli->mAttrs[ "mail" ].first() ).stripWhiteSpace();
if ( !email.isEmpty() ) {
- QString name = asUtf8( cli->mAttrs[ "cn" ].first() ).stripWhiteSpace();
+ TQString name = asUtf8( cli->mAttrs[ "cn" ].first() ).stripWhiteSpace();
if ( name.isEmpty() ) {
result << email;
} else {
diff --git a/libkdepim/ldapsearchdialog.h b/libkdepim/ldapsearchdialog.h
index e97385bb0..fc6a6c8e4 100644
--- a/libkdepim/ldapsearchdialog.h
+++ b/libkdepim/ldapsearchdialog.h
@@ -21,7 +21,7 @@
#ifndef LDAPSEARCHDIALOG_H
#define LDAPSEARCHDIALOG_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <ldapclient.h>
#include <kdialogbase.h>
@@ -40,15 +40,15 @@ class LDAPSearchDialog : public KDialogBase
Q_OBJECT
public:
- LDAPSearchDialog( QWidget* parent, const char* name = 0 );
+ LDAPSearchDialog( TQWidget* parent, const char* name = 0 );
~LDAPSearchDialog();
bool isOK() const { return mIsOK; }
void restoreSettings();
- void setSearchText( const QString &text ) { mSearchEdit->setText( text ); }
- QString selectedEMails() const;
+ void setSearchText( const TQString &text ) { mSearchEdit->setText( text ); }
+ TQString selectedEMails() const;
signals:
void addresseesAdded();
@@ -58,7 +58,7 @@ class LDAPSearchDialog : public KDialogBase
void slotStartSearch();
void slotStopSearch();
void slotSearchDone();
- void slotError( const QString& );
+ void slotError( const TQString& );
virtual void slotHelp();
virtual void slotUser1();
virtual void slotUser2();
@@ -66,25 +66,25 @@ class LDAPSearchDialog : public KDialogBase
protected:
- virtual void closeEvent( QCloseEvent* );
+ virtual void closeEvent( TQCloseEvent* );
private:
void saveSettings();
- QString makeFilter( const QString& query, const QString& attr, bool startsWith );
+ TQString makeFilter( const TQString& query, const TQString& attr, bool startsWith );
void cancelQuery();
int mNumHosts;
- QPtrList<KPIM::LdapClient> mLdapClientList;
+ TQPtrList<KPIM::LdapClient> mLdapClientList;
bool mIsOK;
KComboBox* mFilterCombo;
KComboBox* mSearchType;
KLineEdit* mSearchEdit;
- QCheckBox* mRecursiveCheckbox;
- QListView* mResultListView;
- QPushButton* mSearchButton;
+ TQCheckBox* mRecursiveCheckbox;
+ TQListView* mResultListView;
+ TQPushButton* mSearchButton;
};
diff --git a/libkdepim/linklocator.cpp b/libkdepim/linklocator.cpp
index 6058392a0..0ea0fa680 100644
--- a/libkdepim/linklocator.cpp
+++ b/libkdepim/linklocator.cpp
@@ -28,19 +28,19 @@
#include <kmdcodec.h>
#include <kdebug.h>
-#include <qstylesheet.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqstylesheet.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <limits.h>
-QMap<QString, QString> *LinkLocator::s_smileyEmoticonNameMap = 0;
-QMap<QString, QString> *LinkLocator::s_smileyEmoticonHTMLCache = 0;
+TQMap<TQString, TQString> *LinkLocator::s_smileyEmoticonNameMap = 0;
+TQMap<TQString, TQString> *LinkLocator::s_smileyEmoticonHTMLCache = 0;
-static KStaticDeleter< QMap<QString, QString> > smileyMapDeleter;
-static KStaticDeleter< QMap<QString, QString> > smileyCacheDeleter;
+static KStaticDeleter< TQMap<TQString, TQString> > smileyMapDeleter;
+static KStaticDeleter< TQMap<TQString, TQString> > smileyCacheDeleter;
-LinkLocator::LinkLocator(const QString& text, int pos)
+LinkLocator::LinkLocator(const TQString& text, int pos)
: mText(text), mPos(pos), mMaxUrlLen(4096), mMaxAddressLen(255)
{
// If you change either of the above values for maxUrlLen or
@@ -51,9 +51,9 @@ LinkLocator::LinkLocator(const QString& text, int pos)
if ( !s_smileyEmoticonNameMap ) {
smileyMapDeleter.setObject( s_smileyEmoticonNameMap,
- new QMap<QString, QString>() );
+ new TQMap<TQString, TQString>() );
for ( int i = 0; i < EmotIcons::EnumSindex::COUNT; ++i ) {
- QString imageName( EmotIcons::EnumSindex::enumToString[i] );
+ TQString imageName( EmotIcons::EnumSindex::enumToString[i] );
imageName.truncate( imageName.length() - 2 ); //remove the _0 bit
s_smileyEmoticonNameMap->insert( EmotIcons::smiley(i), imageName );
}
@@ -61,7 +61,7 @@ LinkLocator::LinkLocator(const QString& text, int pos)
if ( !s_smileyEmoticonHTMLCache )
smileyCacheDeleter.setObject( s_smileyEmoticonHTMLCache,
- new QMap<QString, QString>() );
+ new TQMap<TQString, TQString>() );
}
void LinkLocator::setMaxUrlLen(int length)
@@ -84,20 +84,20 @@ int LinkLocator::maxAddressLen() const
return mMaxAddressLen;
}
-QString LinkLocator::getUrl()
+TQString LinkLocator::getUrl()
{
- QString url;
+ TQString url;
if(atUrl())
{
// handle cases like this: <link>http://foobar.org/</link>
int start = mPos;
while(mPos < (int)mText.length() && mText[mPos] > ' ' && mText[mPos] != '"' &&
- QString("<>()[]").find(mText[mPos]) == -1)
+ TQString("<>()[]").find(mText[mPos]) == -1)
{
++mPos;
}
/* some URLs really end with: # / & - _ */
- const QString allowedSpecialChars = QString("#/&-_");
+ const TQString allowedSpecialChars = TQString("#/&-_");
while(mPos > start && mText[mPos-1].isPunct() &&
allowedSpecialChars.find(mText[mPos-1]) == -1 )
{
@@ -123,7 +123,7 @@ bool LinkLocator::atUrl() const
{
// the following characters are allowed in a dot-atom (RFC 2822):
// a-z A-Z 0-9 . ! # $ % & ' * + - / = ? ^ _ ` { | } ~
- const QString allowedSpecialChars = QString(".!#$%&'*+-/=?^_`{|}~");
+ const TQString allowedSpecialChars = TQString(".!#$%&'*+-/=?^_`{|}~");
// the character directly before the URL must not be a letter, a number or
// any other character allowed in a dot-atom (RFC 2822).
@@ -131,7 +131,7 @@ bool LinkLocator::atUrl() const
( allowedSpecialChars.find( mText[mPos-1] ) != -1 ) ) )
return false;
- QChar ch = mText[mPos];
+ TQChar ch = mText[mPos];
return (ch=='h' && ( mText.mid(mPos, 7) == "http://" ||
mText.mid(mPos, 8) == "https://") ) ||
(ch=='v' && mText.mid(mPos, 6) == "vnc://") ||
@@ -147,7 +147,7 @@ bool LinkLocator::atUrl() const
// note: no "file:" for security reasons
}
-bool LinkLocator::isEmptyUrl(const QString& url)
+bool LinkLocator::isEmptyUrl(const TQString& url)
{
return url.isEmpty() ||
url == "http://" ||
@@ -165,14 +165,14 @@ bool LinkLocator::isEmptyUrl(const QString& url)
url == "news://";
}
-QString LinkLocator::getEmailAddress()
+TQString LinkLocator::getEmailAddress()
{
- QString address;
+ TQString address;
if ( mText[mPos] == '@' ) {
// the following characters are allowed in a dot-atom (RFC 2822):
// a-z A-Z 0-9 . ! # $ % & ' * + - / = ? ^ _ ` { | } ~
- const QString allowedSpecialChars = QString(".!#$%&'*+-/=?^_`{|}~");
+ const TQString allowedSpecialChars = TQString(".!#$%&'*+-/=?^_`{|}~");
// determine the local part of the email address
int start = mPos - 1;
@@ -181,7 +181,7 @@ QString LinkLocator::getEmailAddress()
mText[start] == '@' || // allow @ to find invalid email addresses
allowedSpecialChars.find( mText[start] ) != -1 ) ) {
if ( mText[start] == '@' )
- return QString(); // local part contains '@' -> no email address
+ return TQString(); // local part contains '@' -> no email address
--start;
}
++start;
@@ -189,7 +189,7 @@ QString LinkLocator::getEmailAddress()
while ( ( start < mPos ) && !mText[start].isLetterOrNumber() )
++start;
if ( start == mPos )
- return QString(); // local part is empty -> no email address
+ return TQString(); // local part is empty -> no email address
// determine the domain part of the email address
int dotPos = INT_MAX;
@@ -200,7 +200,7 @@ QString LinkLocator::getEmailAddress()
mText[end] == '.' ||
mText[end] == '-' ) ) {
if ( mText[end] == '@' )
- return QString(); // domain part contains '@' -> no email address
+ return TQString(); // domain part contains '@' -> no email address
if ( mText[end] == '.' )
dotPos = QMIN( dotPos, end ); // remember index of first dot in domain
++end;
@@ -209,12 +209,12 @@ QString LinkLocator::getEmailAddress()
while ( ( end > mPos ) && !mText[end - 1].isLetterOrNumber() )
--end;
if ( end == mPos )
- return QString(); // domain part is empty -> no email address
+ return TQString(); // domain part is empty -> no email address
if ( dotPos >= end )
- return QString(); // domain part doesn't contain a dot
+ return TQString(); // domain part doesn't contain a dot
if ( end - start > maxAddressLen() )
- return QString(); // too long -> most likely no email address
+ return TQString(); // too long -> most likely no email address
address = mText.mid( start, end - start );
mPos = end - 1;
@@ -222,19 +222,19 @@ QString LinkLocator::getEmailAddress()
return address;
}
-QString LinkLocator::convertToHtml(const QString& plainText, int flags,
+TQString LinkLocator::convertToHtml(const TQString& plainText, int flags,
int maxUrlLen, int maxAddressLen)
{
LinkLocator locator(plainText);
locator.setMaxUrlLen(maxUrlLen);
locator.setMaxAddressLen(maxAddressLen);
- QString str;
- QString result((QChar*)0, (int)locator.mText.length() * 2);
- QChar ch;
+ TQString str;
+ TQString result((TQChar*)0, (int)locator.mText.length() * 2);
+ TQChar ch;
int x;
bool startOfLine = true;
- QString emoticon;
+ TQString emoticon;
for (locator.mPos = 0, x = 0; locator.mPos < (int)locator.mText.length(); locator.mPos++, x++)
{
@@ -297,7 +297,7 @@ QString LinkLocator::convertToHtml(const QString& plainText, int flags,
str = locator.getUrl();
if (!str.isEmpty())
{
- QString hyperlink;
+ TQString hyperlink;
if(str.left(4) == "www.")
hyperlink = "http://" + str;
else if(str.left(4) == "ftp.")
@@ -315,7 +315,7 @@ QString LinkLocator::convertToHtml(const QString& plainText, int flags,
{
// len is the length of the local part
int len = str.find('@');
- QString localPart = str.left(len);
+ TQString localPart = str.left(len);
// remove the local part from the result (as '&'s have been expanded to
// &amp; we have to take care of the 4 additional characters per '&')
@@ -350,32 +350,32 @@ QString LinkLocator::convertToHtml(const QString& plainText, int flags,
return result;
}
-QString LinkLocator::pngToDataUrl( const QString & iconPath )
+TQString LinkLocator::pngToDataUrl( const TQString & iconPath )
{
if ( iconPath.isEmpty() )
- return QString::null;
+ return TQString::null;
- QFile pngFile( iconPath );
+ TQFile pngFile( iconPath );
if ( !pngFile.open( IO_ReadOnly | IO_Raw ) )
- return QString::null;
+ return TQString::null;
- QByteArray ba = pngFile.readAll();
+ TQByteArray ba = pngFile.readAll();
pngFile.close();
- return QString::fromLatin1("data:image/png;base64,%1")
+ return TQString::fromLatin1("data:image/png;base64,%1")
.arg( KCodecs::base64Encode( ba ) );
}
-QString LinkLocator::getEmoticon()
+TQString LinkLocator::getEmoticon()
{
// smileys have to be prepended by whitespace
if ( ( mPos > 0 ) && !mText[mPos-1].isSpace() )
- return QString::null;
+ return TQString::null;
// since smileys start with ':', ';', '(' or '8' short circuit method
- const QChar ch = mText[mPos];
+ const TQChar ch = mText[mPos];
if ( ch !=':' && ch != ';' && ch != '(' && ch != '8' )
- return QString::null;
+ return TQString::null;
// find the end of the smiley (a smiley is at most 4 chars long and ends at
// lineend or whitespace)
@@ -387,44 +387,44 @@ QString LinkLocator::getEmoticon()
!mText[mPos+smileyLen].isSpace() )
smileyLen++;
if ( smileyLen < MinSmileyLen || smileyLen > MaxSmileyLen )
- return QString::null;
+ return TQString::null;
- const QString smiley = mText.mid( mPos, smileyLen );
+ const TQString smiley = mText.mid( mPos, smileyLen );
if ( !s_smileyEmoticonNameMap->contains( smiley ) )
- return QString::null; // that's not a (known) smiley
+ return TQString::null; // that's not a (known) smiley
- QString htmlRep;
+ TQString htmlRep;
if ( s_smileyEmoticonHTMLCache->contains( smiley ) ) {
htmlRep = (*s_smileyEmoticonHTMLCache)[smiley];
}
else {
- const QString imageName = (*s_smileyEmoticonNameMap)[smiley];
+ const TQString imageName = (*s_smileyEmoticonNameMap)[smiley];
#if KDE_IS_VERSION( 3, 3, 91 )
- const QString iconPath = locate( "emoticons",
+ const TQString iconPath = locate( "emoticons",
EmotIcons::theme() +
- QString::fromLatin1( "/" ) +
- imageName + QString::fromLatin1(".png") );
+ TQString::fromLatin1( "/" ) +
+ imageName + TQString::fromLatin1(".png") );
#else
- const QString iconPath = locate( "data",
- QString::fromLatin1( "kopete/pics/emoticons/" )+
+ const TQString iconPath = locate( "data",
+ TQString::fromLatin1( "kopete/pics/emoticons/" )+
EmotIcons::theme() +
- QString::fromLatin1( "/" ) +
- imageName + QString::fromLatin1(".png") );
+ TQString::fromLatin1( "/" ) +
+ imageName + TQString::fromLatin1(".png") );
#endif
- const QString dataUrl = pngToDataUrl( iconPath );
+ const TQString dataUrl = pngToDataUrl( iconPath );
if ( dataUrl.isEmpty() ) {
- htmlRep = QString::null;
+ htmlRep = TQString::null;
}
else {
// create an image tag (the text in attribute alt is used
// for copy & paste) representing the smiley
- htmlRep = QString("<img class=\"pimsmileyimg\" src=\"%1\" "
+ htmlRep = TQString("<img class=\"pimsmileyimg\" src=\"%1\" "
"alt=\"%2\" title=\"%3\" width=\"16\" height=\"16\"/>")
.arg( dataUrl,
- QStyleSheet::escape( smiley ),
- QStyleSheet::escape( smiley ) );
+ TQStyleSheet::escape( smiley ),
+ TQStyleSheet::escape( smiley ) );
}
s_smileyEmoticonHTMLCache->insert( smiley, htmlRep );
}
@@ -435,22 +435,22 @@ QString LinkLocator::getEmoticon()
return htmlRep;
}
-QString LinkLocator::highlightedText()
+TQString LinkLocator::highlightedText()
{
// formating symbols must be prepended with a whitespace
if ( ( mPos > 0 ) && !mText[mPos-1].isSpace() )
- return QString::null;
+ return TQString::null;
- const QChar ch = mText[mPos];
+ const TQChar ch = mText[mPos];
if ( ch != '/' && ch != '*' && ch != '_' )
- return QString::null;
+ return TQString::null;
- QRegExp re = QRegExp( QString("\\%1([0-9A-Za-z]+)\\%2").arg( ch ).arg( ch ) );
+ TQRegExp re = TQRegExp( TQString("\\%1([0-9A-Za-z]+)\\%2").arg( ch ).arg( ch ) );
if ( re.search( mText, mPos ) == mPos ) {
uint length = re.matchedLength();
// there must be a whitespace after the closing formating symbol
if ( mPos + length < mText.length() && !mText[mPos + length].isSpace() )
- return QString::null;
+ return TQString::null;
mPos += length - 1;
switch ( ch.latin1() ) {
case '*':
@@ -461,6 +461,6 @@ QString LinkLocator::highlightedText()
return "<i>" + re.cap( 1 ) + "</i>";
}
}
- return QString::null;
+ return TQString::null;
}
diff --git a/libkdepim/linklocator.h b/libkdepim/linklocator.h
index 2c7fdbb19..6078fed16 100644
--- a/libkdepim/linklocator.h
+++ b/libkdepim/linklocator.h
@@ -23,8 +23,8 @@
#ifndef LINKLOCATOR_H_INCLUDED
#define LINKLOCATOR_H_INCLUDED
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <kdepimmacros.h>
@@ -49,7 +49,7 @@ public:
* @param pos An index into 'text' from where the search
* should begin.
*/
- LinkLocator(const QString& text, int pos = 0);
+ LinkLocator(const TQString& text, int pos = 0);
/**
* Sets the maximum length of URLs that will be matched by
@@ -98,7 +98,7 @@ public:
*
* @return The URL at the current scan position, or an empty string.
*/
- QString getUrl();
+ TQString getUrl();
/**
* Attempts to grab an email address. If there is an @ symbol at the
@@ -111,7 +111,7 @@ public:
* @return The email address at the current scan position, or an empty
* string.
*/
- QString getEmailAddress();
+ TQString getEmailAddress();
/**
* Converts plaintext into html. The following characters are converted to HTML
@@ -136,7 +136,7 @@ public:
* @return An HTML version of the text supplied in the 'plainText' parameter,
* suitable for inclusion in the BODY of an HTML document.
*/
- static QString convertToHtml(const QString& plainText, int flags = 0,
+ static TQString convertToHtml(const TQString& plainText, int flags = 0,
int maxUrlLen = 4096, int maxAddressLen = 255);
static const int PreserveSpaces = 0x01;
@@ -146,15 +146,15 @@ public:
/** Embed the given PNG image into a data URL.
* @param iconPath path to the PNG image
- * @return A data URL, QString::null if the image could not be read.
+ * @return A data URL, TQString::null if the image could not be read.
*/
- static QString pngToDataUrl( const QString & iconPath );
+ static TQString pngToDataUrl( const TQString & iconPath );
protected:
/**
* The plaintext string being scanned for URLs and email addresses.
*/
- QString mText;
+ TQString mText;
/**
* The current scan position.
*/
@@ -162,7 +162,7 @@ protected:
private:
bool atUrl() const;
- bool isEmptyUrl(const QString& url);
+ bool isEmptyUrl(const TQString& url);
/**
* Replaces smiley text with an <img> tag containing the relevant image.
@@ -170,20 +170,20 @@ private:
* "(^|\s+)text(\s+|$)"
* @return An HTML String with <img> for an emoticon
*/
- QString getEmoticon();
+ TQString getEmoticon();
/**
* Highlight text according to *bold*, /italic/ and _underlined_ markup.
* @return A HTML string.
*/
- QString highlightedText();
+ TQString highlightedText();
int mMaxUrlLen;
int mMaxAddressLen;
// maps the smiley text to the corresponding emoticon name
- static QMap<QString, QString> *s_smileyEmoticonNameMap;
+ static TQMap<TQString, TQString> *s_smileyEmoticonNameMap;
// cache for the HTML representation of a smiley
- static QMap<QString, QString> *s_smileyEmoticonHTMLCache;
+ static TQMap<TQString, TQString> *s_smileyEmoticonHTMLCache;
};
#endif // LINKLOCATOR_H_INCLUDED
diff --git a/libkdepim/maillistdrag.cpp b/libkdepim/maillistdrag.cpp
index 2fb28328a..434ef5ecc 100644
--- a/libkdepim/maillistdrag.cpp
+++ b/libkdepim/maillistdrag.cpp
@@ -21,17 +21,17 @@
*/
#include "maillistdrag.h"
-#include <qbuffer.h>
-#include <qdatastream.h>
-#include <qeventloop.h>
+#include <tqbuffer.h>
+#include <tqdatastream.h>
+#include <tqeventloop.h>
#include <kapplication.h>
#include <klocale.h>
#include <kprogress.h>
using namespace KPIM;
-MailSummary::MailSummary( Q_UINT32 serialNumber, QString messageId,
- QString subject, QString from, QString to,
+MailSummary::MailSummary( Q_UINT32 serialNumber, TQString messageId,
+ TQString subject, TQString from, TQString to,
time_t date )
: mSerialNumber( serialNumber ), mMessageId( messageId ),
mSubject( subject ), mFrom( from ), mTo( to ), mDate( date )
@@ -42,22 +42,22 @@ Q_UINT32 MailSummary::serialNumber() const
return mSerialNumber;
}
-QString MailSummary::messageId()
+TQString MailSummary::messageId()
{
return mMessageId;
}
-QString MailSummary::subject()
+TQString MailSummary::subject()
{
return mSubject;
}
-QString MailSummary::from()
+TQString MailSummary::from()
{
return mFrom;
}
-QString MailSummary::to()
+TQString MailSummary::to()
{
return mTo;
}
@@ -67,8 +67,8 @@ time_t MailSummary::date()
return mDate;
}
-void MailSummary::set( Q_UINT32 serialNumber, QString messageId,
- QString subject, QString from, QString to, time_t date )
+void MailSummary::set( Q_UINT32 serialNumber, TQString messageId,
+ TQString subject, TQString from, TQString to, time_t date )
{
mSerialNumber = serialNumber;
mMessageId = messageId;
@@ -78,8 +78,8 @@ void MailSummary::set( Q_UINT32 serialNumber, QString messageId,
mDate = date;
}
-MailListDrag::MailListDrag( MailList mailList, QWidget * parent, MailTextSource *src )
- : QStoredDrag( MailListDrag::format(), parent ), _src(src)
+MailListDrag::MailListDrag( MailList mailList, TQWidget * parent, MailTextSource *src )
+ : TQStoredDrag( MailListDrag::format(), parent ), _src(src)
{
setMailList( mailList );
}
@@ -95,13 +95,13 @@ const char* MailListDrag::format()
return "x-kmail-drag/message-list";
}
-bool MailListDrag::canDecode( QMimeSource *e )
+bool MailListDrag::canDecode( TQMimeSource *e )
{
return e->provides( MailListDrag::format() );
}
// Have to define before use
-QDataStream& operator<< ( QDataStream &s, MailSummary &d )
+TQDataStream& operator<< ( TQDataStream &s, MailSummary &d )
{
s << d.serialNumber();
s << d.messageId();
@@ -112,10 +112,10 @@ QDataStream& operator<< ( QDataStream &s, MailSummary &d )
return s;
}
-QDataStream& operator>> ( QDataStream &s, MailSummary &d )
+TQDataStream& operator>> ( TQDataStream &s, MailSummary &d )
{
Q_UINT32 serialNumber;
- QString messageId, subject, from, to;
+ TQString messageId, subject, from, to;
time_t date;
s >> serialNumber;
s >> messageId;
@@ -127,7 +127,7 @@ QDataStream& operator>> ( QDataStream &s, MailSummary &d )
return s;
}
-QDataStream& operator<< ( QDataStream &s, MailList &mailList )
+TQDataStream& operator<< ( TQDataStream &s, MailList &mailList )
{
MailList::iterator it;
for (it = mailList.begin(); it != mailList.end(); ++it) {
@@ -137,7 +137,7 @@ QDataStream& operator<< ( QDataStream &s, MailList &mailList )
return s;
}
-QDataStream& operator>> ( QDataStream &s, MailList &mailList )
+TQDataStream& operator>> ( TQDataStream &s, MailList &mailList )
{
mailList.clear();
MailSummary mailDrag;
@@ -148,10 +148,10 @@ QDataStream& operator>> ( QDataStream &s, MailList &mailList )
return s;
}
-bool MailListDrag::decode( QDropEvent* e, MailList& mailList )
+bool MailListDrag::decode( TQDropEvent* e, MailList& mailList )
{
- QByteArray payload = e->encodedData( MailListDrag::format() );
- QDataStream buffer( payload, IO_ReadOnly );
+ TQByteArray payload = e->encodedData( MailListDrag::format() );
+ TQDataStream buffer( payload, IO_ReadOnly );
if ( payload.size() ) {
e->accept();
buffer >> mailList;
@@ -160,9 +160,9 @@ bool MailListDrag::decode( QDropEvent* e, MailList& mailList )
return FALSE;
}
-bool MailListDrag::decode( QByteArray& payload, MailList& mailList )
+bool MailListDrag::decode( TQByteArray& payload, MailList& mailList )
{
- QDataStream stream( payload, IO_ReadOnly );
+ TQDataStream stream( payload, IO_ReadOnly );
if ( payload.size() ) {
stream >> mailList;
return TRUE;
@@ -170,14 +170,14 @@ bool MailListDrag::decode( QByteArray& payload, MailList& mailList )
return FALSE;
}
-bool MailListDrag::decode( QDropEvent* e, QByteArray &a )
+bool MailListDrag::decode( TQDropEvent* e, TQByteArray &a )
{
MailList mailList;
if (decode( e, mailList )) {
MailList::iterator it;
- QBuffer buffer( a );
+ TQBuffer buffer( a );
buffer.open( IO_WriteOnly );
- QDataStream stream( &buffer );
+ TQDataStream stream( &buffer );
for (it = mailList.begin(); it != mailList.end(); ++it) {
MailSummary mailDrag = *it;
stream << mailDrag.serialNumber();
@@ -190,10 +190,10 @@ bool MailListDrag::decode( QDropEvent* e, QByteArray &a )
void MailListDrag::setMailList( MailList mailList )
{
- QByteArray array;
- QBuffer buffer( array );
+ TQByteArray array;
+ TQBuffer buffer( array );
buffer.open( IO_WriteOnly);
- QDataStream stream( array, IO_WriteOnly );
+ TQDataStream stream( array, IO_WriteOnly );
stream << mailList;
buffer.close();
setEncodedData( array );
@@ -205,42 +205,42 @@ const char *MailListDrag::format(int i) const
if (i == 0) {
return "message/rfc822";
} else {
- return QStoredDrag::format(i - 1);
+ return TQStoredDrag::format(i - 1);
}
}
- return QStoredDrag::format(i);
+ return TQStoredDrag::format(i);
}
bool MailListDrag::provides(const char *mimeType) const
{
- if (_src && QCString(mimeType) == "message/rfc822") {
+ if (_src && TQCString(mimeType) == "message/rfc822") {
return true;
}
- return QStoredDrag::provides(mimeType);
+ return TQStoredDrag::provides(mimeType);
}
-QByteArray MailListDrag::encodedData(const char *mimeType) const
+TQByteArray MailListDrag::encodedData(const char *mimeType) const
{
- if (QCString(mimeType) != "message/rfc822") {
- return QStoredDrag::encodedData(mimeType);
+ if (TQCString(mimeType) != "message/rfc822") {
+ return TQStoredDrag::encodedData(mimeType);
}
- QByteArray rc;
+ TQByteArray rc;
if (_src) {
MailList ml;
- QByteArray enc = QStoredDrag::encodedData(format());
+ TQByteArray enc = TQStoredDrag::encodedData(format());
decode(enc, ml);
- KProgressDialog *dlg = new KProgressDialog(0, 0, QString::null, i18n("Retrieving and storing messages..."), true);
+ KProgressDialog *dlg = new KProgressDialog(0, 0, TQString::null, i18n("Retrieving and storing messages..."), true);
dlg->setAllowCancel(true);
dlg->progressBar()->setTotalSteps(ml.count());
int i = 0;
dlg->progressBar()->setValue(i);
dlg->show();
- QTextStream *ts = new QTextStream(rc, IO_WriteOnly);
+ TQTextStream *ts = new TQTextStream(rc, IO_WriteOnly);
for (MailList::ConstIterator it = ml.begin(); it != ml.end(); ++it) {
MailSummary mailDrag = *it;
*ts << _src->text(mailDrag.serialNumber());
@@ -248,7 +248,7 @@ QByteArray MailListDrag::encodedData(const char *mimeType) const
break;
}
dlg->progressBar()->setValue(++i);
- kapp->eventLoop()->processEvents(QEventLoop::ExcludeSocketNotifiers);
+ kapp->eventLoop()->processEvents(TQEventLoop::ExcludeSocketNotifiers);
}
delete dlg;
diff --git a/libkdepim/maillistdrag.h b/libkdepim/maillistdrag.h
index cf8918db1..86280826a 100644
--- a/libkdepim/maillistdrag.h
+++ b/libkdepim/maillistdrag.h
@@ -22,9 +22,9 @@
#ifndef maillistdrag_h
#define maillistdrag_h
-#include "qdragobject.h"
-#include "qvaluelist.h"
-#include "qglobal.h"
+#include "tqdragobject.h"
+#include "tqvaluelist.h"
+#include "tqglobal.h"
#include "time.h"
#include <kdepimmacros.h>
@@ -34,7 +34,7 @@
*
* // Code example for drag and drop enabled widget
*
- * void SomeWidget::contentsDropEvent(QDropEvent *e)
+ * void SomeWidget::contentsDropEvent(TQDropEvent *e)
* {
* if (e->provides(MailListDrag::format())) {
* MailList mailList;
@@ -47,40 +47,40 @@ namespace KPIM {
class KDE_EXPORT MailSummary
{
public:
- MailSummary( Q_UINT32 serialNumber, QString messageId, QString subject,
- QString from, QString to, time_t date );
+ MailSummary( Q_UINT32 serialNumber, TQString messageId, TQString subject,
+ TQString from, TQString to, time_t date );
MailSummary() {}
~MailSummary() {}
/*** Set fields for this mail summary ***/
- void set( Q_UINT32, QString, QString, QString, QString, time_t );
+ void set( Q_UINT32, TQString, TQString, TQString, TQString, time_t );
/*** KMail unique identification number ***/
Q_UINT32 serialNumber() const;
/*** MD5 checksum of message identification string ***/
- QString messageId();
+ TQString messageId();
/*** Subject of the message including prefixes ***/
- QString subject();
+ TQString subject();
/*** Simplified from address ***/
- QString from();
+ TQString from();
/** Simplified to address ***/
- QString to();
+ TQString to();
/*** Date the message was sent ***/
time_t date();
private:
Q_UINT32 mSerialNumber;
- QString mMessageId, mSubject, mFrom, mTo;
+ TQString mMessageId, mSubject, mFrom, mTo;
time_t mDate;
};
// List of mail summaries
-typedef QValueList<MailSummary> MailList;
+typedef TQValueList<MailSummary> MailList;
// Object for the drag object to call-back for message fulltext
class KDE_EXPORT MailTextSource {
@@ -88,7 +88,7 @@ public:
MailTextSource() {}
virtual ~MailTextSource() {}
- virtual QCString text(Q_UINT32 serialNumber) const = 0;
+ virtual TQCString text(Q_UINT32 serialNumber) const = 0;
};
// Drag and drop object for mails
@@ -96,14 +96,14 @@ class KDE_EXPORT MailListDrag : public QStoredDrag
{
public:
// Takes ownership of "src" and deletes it when done
- MailListDrag( MailList, QWidget * parent = 0, MailTextSource *src = 0 );
+ MailListDrag( MailList, TQWidget * parent = 0, MailTextSource *src = 0 );
~MailListDrag();
const char *format(int i) const;
bool provides(const char *mimeType) const;
- QByteArray encodedData(const char *) const;
+ TQByteArray encodedData(const char *) const;
/* Reset the list of mail summaries */
void setMailList( MailList );
@@ -113,19 +113,19 @@ public:
/* Returns TRUE if the information in e can be decoded into a QString;
otherwsie returns FALSE */
- static bool canDecode( QMimeSource* e );
+ static bool canDecode( TQMimeSource* e );
/* Attempts to decode the dropped information;
Returns TRUE if successful; otherwise return false */
- static bool decode( QDropEvent* e, MailList& s );
+ static bool decode( TQDropEvent* e, MailList& s );
/* Attempts to decode the serialNumbers of the dropped information;
Returns TRUE if successful; otherwise return false */
- static bool decode( QDropEvent* e, QByteArray& a );
+ static bool decode( TQDropEvent* e, TQByteArray& a );
/* Attempts to decode the encoded MailList;
Returns TRUE if successful; otherwise return false */
- static bool decode( QByteArray& a, MailList& s );
+ static bool decode( TQByteArray& a, MailList& s );
private:
MailTextSource *_src;
diff --git a/libkdepim/overlaywidget.cpp b/libkdepim/overlaywidget.cpp
index d9353fd31..2e6f703cb 100644
--- a/libkdepim/overlaywidget.cpp
+++ b/libkdepim/overlaywidget.cpp
@@ -31,8 +31,8 @@
#include "overlaywidget.h"
using namespace KPIM;
-OverlayWidget::OverlayWidget( QWidget* alignWidget, QWidget* parent, const char* name )
- : QHBox( parent, name ), mAlignWidget( 0 )
+OverlayWidget::OverlayWidget( TQWidget* alignWidget, TQWidget* parent, const char* name )
+ : TQHBox( parent, name ), mAlignWidget( 0 )
{
setAlignWidget( alignWidget );
}
@@ -46,19 +46,19 @@ void OverlayWidget::reposition()
if ( !mAlignWidget )
return;
// p is in the alignWidget's coordinates
- QPoint p;
+ TQPoint p;
// We are always above the alignWidget, right-aligned with it.
p.setX( mAlignWidget->width() - width() );
p.setY( -height() );
// Position in the toplevelwidget's coordinates
- QPoint pTopLevel = mAlignWidget->mapTo( topLevelWidget(), p );
+ TQPoint pTopLevel = mAlignWidget->mapTo( topLevelWidget(), p );
// Position in the widget's parentWidget coordinates
- QPoint pParent = parentWidget()->mapFrom( topLevelWidget(), pTopLevel );
+ TQPoint pParent = parentWidget()->mapFrom( topLevelWidget(), pTopLevel );
// Move 'this' to that position.
move( pParent );
}
-void OverlayWidget::setAlignWidget( QWidget * w )
+void OverlayWidget::setAlignWidget( TQWidget * w )
{
if (w == mAlignWidget)
return;
@@ -74,19 +74,19 @@ void OverlayWidget::setAlignWidget( QWidget * w )
reposition();
}
-bool OverlayWidget::eventFilter( QObject* o, QEvent* e)
+bool OverlayWidget::eventFilter( TQObject* o, TQEvent* e)
{
if ( o == mAlignWidget &&
- ( e->type() == QEvent::Move || e->type() == QEvent::Resize ) ) {
+ ( e->type() == TQEvent::Move || e->type() == TQEvent::Resize ) ) {
reposition();
}
- return QFrame::eventFilter(o,e);
+ return TQFrame::eventFilter(o,e);
}
-void OverlayWidget::resizeEvent( QResizeEvent* ev )
+void OverlayWidget::resizeEvent( TQResizeEvent* ev )
{
reposition();
- QFrame::resizeEvent( ev );
+ TQFrame::resizeEvent( ev );
}
#include "overlaywidget.moc"
diff --git a/libkdepim/overlaywidget.h b/libkdepim/overlaywidget.h
index 0923d9910..d0aed33a8 100644
--- a/libkdepim/overlaywidget.h
+++ b/libkdepim/overlaywidget.h
@@ -30,7 +30,7 @@
#ifndef OVERLAYWIDGET_H
#define OVERLAYWIDGET_H
-#include <qhbox.h>
+#include <tqhbox.h>
namespace KPIM {
@@ -39,28 +39,28 @@ namespace KPIM {
* so that it can actually be on top of other widgets.
* Currently the only supported type of alignment is "right aligned, on top of the other widget".
*
- * OverlayWidget inherits QHBox for convenience purposes (layout, and frame)
+ * OverlayWidget inherits TQHBox for convenience purposes (layout, and frame)
*/
class OverlayWidget : public QHBox
{
Q_OBJECT
public:
- OverlayWidget( QWidget* alignWidget, QWidget* parent, const char* name = 0 );
+ OverlayWidget( TQWidget* alignWidget, TQWidget* parent, const char* name = 0 );
~OverlayWidget();
- QWidget * alignWidget() { return mAlignWidget; }
- void setAlignWidget( QWidget * alignWidget );
+ TQWidget * alignWidget() { return mAlignWidget; }
+ void setAlignWidget( TQWidget * alignWidget );
protected:
- void resizeEvent( QResizeEvent* ev );
- bool eventFilter( QObject* o, QEvent* e);
+ void resizeEvent( TQResizeEvent* ev );
+ bool eventFilter( TQObject* o, TQEvent* e);
private:
void reposition();
private:
- QWidget * mAlignWidget;
+ TQWidget * mAlignWidget;
};
} // namespace
diff --git a/libkdepim/pluginloader.h b/libkdepim/pluginloader.h
index 51f5c1663..5ae0fbf87 100644
--- a/libkdepim/pluginloader.h
+++ b/libkdepim/pluginloader.h
@@ -105,7 +105,7 @@ namespace KPIM {
/** Returns a pointer to a plugin object (of type @p T) or a null
pointer if the type wasn't found. You can extend this method
for when you want to handle builtin types */
- virtual T * createForName( const QString & type ) const {
+ virtual T * createForName( const TQString & type ) const {
void * main_func = mainFunc( type, T_config::mainfunc );
if ( !main_func ) return 0;
diff --git a/libkdepim/pluginloaderbase.cpp b/libkdepim/pluginloaderbase.cpp
index 03c397799..40a4beb2f 100644
--- a/libkdepim/pluginloaderbase.cpp
+++ b/libkdepim/pluginloaderbase.cpp
@@ -28,8 +28,8 @@
#include <kglobal.h>
#include <kdebug.h>
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
static kdbgstream warning() {
return kdWarning( 5300 ) << "PluginLoaderBase: ";
@@ -49,15 +49,15 @@ namespace KPIM {
PluginLoaderBase::~PluginLoaderBase() {}
- QStringList PluginLoaderBase::types() const {
- QStringList result;
- for ( QMap< QString, PluginMetaData >::const_iterator it = mPluginMap.begin();
+ TQStringList PluginLoaderBase::types() const {
+ TQStringList result;
+ for ( TQMap< TQString, PluginMetaData >::const_iterator it = mPluginMap.begin();
it != mPluginMap.end() ; ++it )
result.push_back( it.key() );
return result;
}
- const PluginMetaData * PluginLoaderBase::infoForName( const QString & type ) const {
+ const PluginMetaData * PluginLoaderBase::infoForName( const TQString & type ) const {
return mPluginMap.contains( type ) ? &(mPluginMap[type]) : 0 ;
}
@@ -65,22 +65,22 @@ namespace KPIM {
void PluginLoaderBase::doScan( const char * path ) {
mPluginMap.clear();
- const QStringList list =
+ const TQStringList list =
KGlobal::dirs()->findAllResources( "data", path, true, true );
- for ( QStringList::const_iterator it = list.begin() ;
+ for ( TQStringList::const_iterator it = list.begin() ;
it != list.end() ; ++it ) {
KSimpleConfig config( *it, true );
if ( config.hasGroup( "Misc" ) && config.hasGroup( "Plugin" ) ) {
config.setGroup( "Plugin" );
- const QString type = config.readEntry( "Type" ).lower();
+ const TQString type = config.readEntry( "Type" ).lower();
if ( type.isEmpty() ) {
warning() << "missing or empty [Plugin]Type value in \""
<< *it << "\" - skipping" << endl;
continue;
}
- const QString library = config.readEntry( "X-KDE-Library" );
+ const TQString library = config.readEntry( "X-KDE-Library" );
if ( library.isEmpty() ) {
warning() << "missing or empty [Plugin]X-KDE-Library value in \""
<< *it << "\" - skipping" << endl;
@@ -89,14 +89,14 @@ namespace KPIM {
config.setGroup( "Misc" );
- QString name = config.readEntry( "Name" );
+ TQString name = config.readEntry( "Name" );
if ( name.isEmpty() ) {
warning() << "missing or empty [Misc]Name value in \""
<< *it << "\" - inserting default name" << endl;
name = i18n("Unnamed plugin");
}
- QString comment = config.readEntry( "Comment" );
+ TQString comment = config.readEntry( "Comment" );
if ( comment.isEmpty() ) {
warning() << "missing or empty [Misc]Comment value in \""
<< *it << "\" - inserting default name" << endl;
@@ -112,12 +112,12 @@ namespace KPIM {
}
}
- void * PluginLoaderBase::mainFunc( const QString & type,
+ void * PluginLoaderBase::mainFunc( const TQString & type,
const char * mf_name ) const {
if ( type.isEmpty() || !mPluginMap.contains( type ) )
return 0;
- const QString libName = mPluginMap[ type ].library;
+ const TQString libName = mPluginMap[ type ].library;
if ( libName.isEmpty() )
return 0;
@@ -127,7 +127,7 @@ namespace KPIM {
mPluginMap[ type ].loaded = true;
- const QString factory_name = libName + '_' + mf_name;
+ const TQString factory_name = libName + '_' + mf_name;
if ( !lib->hasSymbol( factory_name.latin1() ) ) {
warning() << "No symbol named \"" << factory_name.latin1() << "\" ("
<< factory_name << ") was found in library \"" << libName
@@ -138,9 +138,9 @@ namespace KPIM {
return lib->symbol( factory_name.latin1() );
}
- const KLibrary * PluginLoaderBase::openLibrary( const QString & libName ) const {
+ const KLibrary * PluginLoaderBase::openLibrary( const TQString & libName ) const {
- const QString path = KLibLoader::findLibrary( QFile::encodeName( libName ) );
+ const TQString path = KLibLoader::findLibrary( TQFile::encodeName( libName ) );
if ( path.isEmpty() ) {
warning() << "No plugin library named \"" << libName
@@ -148,7 +148,7 @@ namespace KPIM {
return 0;
}
- const KLibrary * library = KLibLoader::self()->library( QFile::encodeName( path ) );
+ const KLibrary * library = KLibLoader::self()->library( TQFile::encodeName( path ) );
debug( !library ) << "Could not load library '" << libName << "'" << endl;
diff --git a/libkdepim/pluginloaderbase.h b/libkdepim/pluginloaderbase.h
index fd63cf690..ba7e12fd3 100644
--- a/libkdepim/pluginloaderbase.h
+++ b/libkdepim/pluginloaderbase.h
@@ -22,8 +22,8 @@
#ifndef __LIBKDEPIM_PLUGINLOADERBASE_H__
#define __LIBKDEPIM_PLUGINLOADERBASE_H__
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <kdepimmacros.h>
@@ -35,13 +35,13 @@ namespace KPIM {
class KDE_EXPORT PluginMetaData {
public:
PluginMetaData() {}
- PluginMetaData( const QString & lib, const QString & name,
- const QString & comment )
+ PluginMetaData( const TQString & lib, const TQString & name,
+ const TQString & comment )
: library( lib ), nameLabel( name ),
descriptionLabel( comment ), loaded( false ) {}
- QString library;
- QString nameLabel;
- QString descriptionLabel;
+ TQString library;
+ TQString nameLabel;
+ TQString descriptionLabel;
mutable bool loaded;
};
@@ -52,10 +52,10 @@ namespace KPIM {
public:
/** Returns a list of all available plugin objects (of kind @p T) */
- QStringList types() const;
+ TQStringList types() const;
/** Returns the @ref PluginMetaData structure for a given type */
- const PluginMetaData * infoForName( const QString & type ) const;
+ const PluginMetaData * infoForName( const TQString & type ) const;
/** Overload this method in subclasses to call @ref doScan with
the right @p path argument */
@@ -71,11 +71,11 @@ namespace KPIM {
/** Returns a pointer to symbol @p main_func in the library that
implements the plugin of type @p type */
- void * mainFunc( const QString & type, const char * main_func ) const;
+ void * mainFunc( const TQString & type, const char * main_func ) const;
private:
- const KLibrary * openLibrary( const QString & libName ) const;
- QMap< QString, PluginMetaData > mPluginMap;
+ const KLibrary * openLibrary( const TQString & libName ) const;
+ TQMap< TQString, PluginMetaData > mPluginMap;
class Private;
Private * d;
diff --git a/libkdepim/progressdialog.cpp b/libkdepim/progressdialog.cpp
index 10a0b868d..f35f23909 100644
--- a/libkdepim/progressdialog.cpp
+++ b/libkdepim/progressdialog.cpp
@@ -33,17 +33,17 @@
#include <config.h>
#endif
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qprogressbar.h>
-#include <qtimer.h>
-#include <qheader.h>
-#include <qobject.h>
-#include <qscrollview.h>
-#include <qtoolbutton.h>
-#include <qpushbutton.h>
-#include <qvbox.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqprogressbar.h>
+#include <tqtimer.h>
+#include <tqheader.h>
+#include <tqobject.h>
+#include <tqscrollview.h>
+#include <tqtoolbutton.h>
+#include <tqpushbutton.h>
+#include <tqvbox.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <kdialog.h>
@@ -54,44 +54,44 @@
#include "progressdialog.h"
#include "progressmanager.h"
#include "ssllabel.h"
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
namespace KPIM {
class TransactionItem;
-TransactionItemView::TransactionItemView( QWidget * parent,
+TransactionItemView::TransactionItemView( TQWidget * parent,
const char * name,
WFlags f )
- : QScrollView( parent, name, f ) {
+ : TQScrollView( parent, name, f ) {
setFrameStyle( NoFrame );
- mBigBox = new QVBox( viewport() );
+ mBigBox = new TQVBox( viewport() );
mBigBox->setSpacing( 5 );
addChild( mBigBox );
- setResizePolicy( QScrollView::AutoOneFit ); // Fit so that the box expands horizontally
+ setResizePolicy( TQScrollView::AutoOneFit ); // Fit so that the box expands horizontally
}
TransactionItem* TransactionItemView::addTransactionItem( ProgressItem* item, bool first )
{
TransactionItem *ti = new TransactionItem( mBigBox, item, first );
ti->hide();
- QTimer::singleShot( 1000, ti, SLOT( show() ) );
+ TQTimer::singleShot( 1000, ti, TQT_SLOT( show() ) );
return ti;
}
void TransactionItemView::resizeContents( int w, int h )
{
- // (handling of QEvent::LayoutHint in QScrollView calls this method)
+ // (handling of TQEvent::LayoutHint in TQScrollView calls this method)
//kdDebug(5300) << k_funcinfo << w << "," << h << endl;
- QScrollView::resizeContents( w, h );
+ TQScrollView::resizeContents( w, h );
// Tell the layout in the parent (progressdialog) that our size changed
updateGeometry();
// Resize the parent (progressdialog) - this works but resize horizontally too often
//parentWidget()->adjustSize();
- QApplication::sendPostedEvents( 0, QEvent::ChildInserted );
- QApplication::sendPostedEvents( 0, QEvent::LayoutHint );
- QSize sz = parentWidget()->sizeHint();
+ TQApplication::sendPostedEvents( 0, TQEvent::ChildInserted );
+ TQApplication::sendPostedEvents( 0, TQEvent::LayoutHint );
+ TQSize sz = parentWidget()->sizeHint();
int currentWidth = parentWidget()->width();
// Don't resize to sz.width() every time when it only reduces a little bit
if ( currentWidth < sz.width() || currentWidth > sz.width() + 100 )
@@ -99,19 +99,19 @@ void TransactionItemView::resizeContents( int w, int h )
parentWidget()->resize( currentWidth, sz.height() );
}
-QSize TransactionItemView::sizeHint() const
+TQSize TransactionItemView::sizeHint() const
{
return minimumSizeHint();
}
-QSize TransactionItemView::minimumSizeHint() const
+TQSize TransactionItemView::minimumSizeHint() const
{
int f = 2 * frameWidth();
// Make room for a vertical scrollbar in all cases, to avoid a horizontal one
int vsbExt = verticalScrollBar()->sizeHint().width();
int minw = topLevelWidget()->width() / 3;
int maxh = topLevelWidget()->height() / 2;
- QSize sz( mBigBox->minimumSizeHint() );
+ TQSize sz( mBigBox->minimumSizeHint() );
sz.setWidth( QMAX( sz.width(), minw ) + f + vsbExt );
sz.setHeight( QMIN( sz.height(), maxh ) + f );
return sz;
@@ -124,12 +124,12 @@ void TransactionItemView::slotLayoutFirstItem()
The below relies on some details in Qt's behaviour regarding deleting
objects. This slot is called from the destroyed signal of an item just
going away. That item is at that point still in the list of chilren, but
- since the vtable is already gone, it will have type QObject. The first
+ since the vtable is already gone, it will have type TQObject. The first
one with both the right name and the right class therefor is what will
be the first item very shortly. That's the one we want to remove the
hline for.
*/
- QObject *o = mBigBox->child( "TransactionItem", "KPIM::TransactionItem" );
+ TQObject *o = mBigBox->child( "TransactionItem", "KPIM::TransactionItem" );
TransactionItem *ti = dynamic_cast<TransactionItem*>( o );
if ( ti ) {
ti->hideHLine();
@@ -139,52 +139,52 @@ void TransactionItemView::slotLayoutFirstItem()
// ----------------------------------------------------------------------------
-TransactionItem::TransactionItem( QWidget* parent,
+TransactionItem::TransactionItem( TQWidget* parent,
ProgressItem *item, bool first )
- : QVBox( parent, "TransactionItem" ), mCancelButton( 0 ), mItem( item )
+ : TQVBox( parent, "TransactionItem" ), mCancelButton( 0 ), mItem( item )
{
setSpacing( 2 );
setMargin( 2 );
- setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) );
- mFrame = new QFrame( this );
- mFrame->setFrameShape( QFrame::HLine );
- mFrame->setFrameShadow( QFrame::Raised );
+ mFrame = new TQFrame( this );
+ mFrame->setFrameShape( TQFrame::HLine );
+ mFrame->setFrameShadow( TQFrame::Raised );
mFrame->show();
setStretchFactor( mFrame, 3 );
- QHBox *h = new QHBox( this );
+ TQHBox *h = new TQHBox( this );
h->setSpacing( 5 );
- mItemLabel = new QLabel( item->label(), h );
+ mItemLabel = new TQLabel( item->label(), h );
// always interpret the label text as RichText, but disable word wrapping
mItemLabel->setTextFormat( Qt::RichText );
mItemLabel->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::SingleLine );
- h->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) );
+ h->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) );
- mProgress = new QProgressBar( 100, h );
+ mProgress = new TQProgressBar( 100, h );
mProgress->setProgress( item->progress() );
if ( item->canBeCanceled() ) {
- mCancelButton = new QPushButton( SmallIcon( "cancel" ), QString::null, h );
- QToolTip::add( mCancelButton, i18n("Cancel this operation.") );
- connect ( mCancelButton, SIGNAL( clicked() ),
- this, SLOT( slotItemCanceled() ));
+ mCancelButton = new TQPushButton( SmallIcon( "cancel" ), TQString::null, h );
+ TQToolTip::add( mCancelButton, i18n("Cancel this operation.") );
+ connect ( mCancelButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotItemCanceled() ));
}
- h = new QHBox( this );
+ h = new TQHBox( this );
h->setSpacing( 5 );
- h->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) );
+ h->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) );
mSSLLabel = new SSLLabel( h );
- mSSLLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
- mItemStatus = new QLabel( item->status(), h );
+ mSSLLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
+ mItemStatus = new TQLabel( item->status(), h );
// always interpret the status text as RichText, but disable word wrapping
mItemStatus->setTextFormat( Qt::RichText );
mItemStatus->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::SingleLine );
// richtext leads to sizeHint acting as if wrapping was enabled though,
// so make sure we only ever have the height of one line.
- mItemStatus->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored ) );
+ mItemStatus->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Ignored ) );
mItemStatus->setFixedHeight( mItemLabel->sizeHint().height() );
setCrypto( item->usesCrypto() );
if( first ) hideHLine();
@@ -204,12 +204,12 @@ void TransactionItem::setProgress( int progress )
mProgress->setProgress( progress );
}
-void TransactionItem::setLabel( const QString& label )
+void TransactionItem::setLabel( const TQString& label )
{
mItemLabel->setText( label );
}
-void TransactionItem::setStatus( const QString& status )
+void TransactionItem::setStatus( const TQString& status )
{
mItemStatus->setText( status );
}
@@ -239,10 +239,10 @@ void TransactionItem::addSubTransaction( ProgressItem* /*item*/ )
// ---------------------------------------------------------------------------
-ProgressDialog::ProgressDialog( QWidget* alignWidget, QWidget* parent, const char* name )
+ProgressDialog::ProgressDialog( TQWidget* alignWidget, TQWidget* parent, const char* name )
: OverlayWidget( alignWidget, parent, name ), mWasLastShown( false )
{
- setFrameStyle( QFrame::Panel | QFrame::Sunken ); // QFrame
+ setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); // QFrame
setSpacing( 0 ); // QHBox
setMargin( 1 );
@@ -250,15 +250,15 @@ ProgressDialog::ProgressDialog( QWidget* alignWidget, QWidget* parent, const cha
// No more close button for now, since there is no more autoshow
/*
- QVBox* rightBox = new QVBox( this );
- QToolButton* pbClose = new QToolButton( rightBox );
+ TQVBox* rightBox = new TQVBox( this );
+ TQToolButton* pbClose = new TQToolButton( rightBox );
pbClose->setAutoRaise(true);
- pbClose->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ pbClose->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
pbClose->setFixedSize( 16, 16 );
pbClose->setIconSet( KGlobal::iconLoader()->loadIconSet( "fileclose", KIcon::Small, 14 ) );
- QToolTip::add( pbClose, i18n( "Hide detailed progress window" ) );
- connect(pbClose, SIGNAL(clicked()), this, SLOT(slotClose()));
- QWidget* spacer = new QWidget( rightBox ); // don't let the close button take up all the height
+ TQToolTip::add( pbClose, i18n( "Hide detailed progress window" ) );
+ connect(pbClose, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClose()));
+ TQWidget* spacer = new TQWidget( rightBox ); // don't let the close button take up all the height
rightBox->setStretchFactor( spacer, 100 );
*/
@@ -267,23 +267,23 @@ ProgressDialog::ProgressDialog( QWidget* alignWidget, QWidget* parent, const cha
* appearing and vanishing items.
*/
ProgressManager *pm = ProgressManager::instance();
- connect ( pm, SIGNAL( progressItemAdded( KPIM::ProgressItem* ) ),
- this, SLOT( slotTransactionAdded( KPIM::ProgressItem* ) ) );
- connect ( pm, SIGNAL( progressItemCompleted( KPIM::ProgressItem* ) ),
- this, SLOT( slotTransactionCompleted( KPIM::ProgressItem* ) ) );
- connect ( pm, SIGNAL( progressItemProgress( KPIM::ProgressItem*, unsigned int ) ),
- this, SLOT( slotTransactionProgress( KPIM::ProgressItem*, unsigned int ) ) );
- connect ( pm, SIGNAL( progressItemStatus( KPIM::ProgressItem*, const QString& ) ),
- this, SLOT( slotTransactionStatus( KPIM::ProgressItem*, const QString& ) ) );
- connect ( pm, SIGNAL( progressItemLabel( KPIM::ProgressItem*, const QString& ) ),
- this, SLOT( slotTransactionLabel( KPIM::ProgressItem*, const QString& ) ) );
- connect ( pm, SIGNAL( progressItemUsesCrypto(KPIM::ProgressItem*, bool) ),
- this, SLOT( slotTransactionUsesCrypto( KPIM::ProgressItem*, bool ) ) );
- connect ( pm, SIGNAL( showProgressDialog() ),
- this, SLOT( slotShow() ) );
+ connect ( pm, TQT_SIGNAL( progressItemAdded( KPIM::ProgressItem* ) ),
+ this, TQT_SLOT( slotTransactionAdded( KPIM::ProgressItem* ) ) );
+ connect ( pm, TQT_SIGNAL( progressItemCompleted( KPIM::ProgressItem* ) ),
+ this, TQT_SLOT( slotTransactionCompleted( KPIM::ProgressItem* ) ) );
+ connect ( pm, TQT_SIGNAL( progressItemProgress( KPIM::ProgressItem*, unsigned int ) ),
+ this, TQT_SLOT( slotTransactionProgress( KPIM::ProgressItem*, unsigned int ) ) );
+ connect ( pm, TQT_SIGNAL( progressItemStatus( KPIM::ProgressItem*, const TQString& ) ),
+ this, TQT_SLOT( slotTransactionStatus( KPIM::ProgressItem*, const TQString& ) ) );
+ connect ( pm, TQT_SIGNAL( progressItemLabel( KPIM::ProgressItem*, const TQString& ) ),
+ this, TQT_SLOT( slotTransactionLabel( KPIM::ProgressItem*, const TQString& ) ) );
+ connect ( pm, TQT_SIGNAL( progressItemUsesCrypto(KPIM::ProgressItem*, bool) ),
+ this, TQT_SLOT( slotTransactionUsesCrypto( KPIM::ProgressItem*, bool ) ) );
+ connect ( pm, TQT_SIGNAL( showProgressDialog() ),
+ this, TQT_SLOT( slotShow() ) );
}
-void ProgressDialog::closeEvent( QCloseEvent* e )
+void ProgressDialog::closeEvent( TQCloseEvent* e )
{
e->accept();
hide();
@@ -312,7 +312,7 @@ void ProgressDialog::slotTransactionAdded( ProgressItem *item )
if ( ti )
mTransactionsToListviewItems.replace( item, ti );
if ( first && mWasLastShown )
- QTimer::singleShot( 1000, this, SLOT( slotShow() ) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT( slotShow() ) );
}
}
@@ -323,14 +323,14 @@ void ProgressDialog::slotTransactionCompleted( ProgressItem *item )
TransactionItem *ti = mTransactionsToListviewItems[ item ];
mTransactionsToListviewItems.remove( item );
ti->setItemComplete();
- QTimer::singleShot( 3000, ti, SLOT( deleteLater() ) );
+ TQTimer::singleShot( 3000, ti, TQT_SLOT( deleteLater() ) );
// see the slot for comments as to why that works
- connect ( ti, SIGNAL( destroyed() ),
- mScrollView, SLOT( slotLayoutFirstItem() ) );
+ connect ( ti, TQT_SIGNAL( destroyed() ),
+ mScrollView, TQT_SLOT( slotLayoutFirstItem() ) );
}
// This was the last item, hide.
if ( mTransactionsToListviewItems.empty() )
- QTimer::singleShot( 3000, this, SLOT( slotHide() ) );
+ TQTimer::singleShot( 3000, this, TQT_SLOT( slotHide() ) );
}
void ProgressDialog::slotTransactionCanceled( ProgressItem* )
@@ -347,7 +347,7 @@ void ProgressDialog::slotTransactionProgress( ProgressItem *item,
}
void ProgressDialog::slotTransactionStatus( ProgressItem *item,
- const QString& status )
+ const TQString& status )
{
if ( mTransactionsToListviewItems.contains( item ) ) {
TransactionItem *ti = mTransactionsToListviewItems[ item ];
@@ -356,7 +356,7 @@ void ProgressDialog::slotTransactionStatus( ProgressItem *item,
}
void ProgressDialog::slotTransactionLabel( ProgressItem *item,
- const QString& label )
+ const TQString& label )
{
if ( mTransactionsToListviewItems.contains( item ) ) {
TransactionItem *ti = mTransactionsToListviewItems[ item ];
diff --git a/libkdepim/progressdialog.h b/libkdepim/progressdialog.h
index 8880f4ecc..3daadd365 100644
--- a/libkdepim/progressdialog.h
+++ b/libkdepim/progressdialog.h
@@ -33,10 +33,10 @@
#ifndef __KPIM_PROGRESSDIALOG_H__
#define __KPIM_PROGRESSDIALOG_H__
-#include <qdialog.h>
-#include <qlistview.h>
-#include <qlabel.h>
-#include <qvbox.h>
+#include <tqdialog.h>
+#include <tqlistview.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
#include "overlaywidget.h"
#include <kdepimmacros.h>
@@ -50,10 +50,10 @@ class TransactionItemListView;
class TransactionItem;
class SSLLabel;
-class TransactionItemView : public QScrollView {
+class TransactionItemView : public TQScrollView {
Q_OBJECT
public:
- TransactionItemView( QWidget * parent = 0,
+ TransactionItemView( TQWidget * parent = 0,
const char * name = 0,
WFlags f = 0 );
@@ -62,8 +62,8 @@ public:
TransactionItem* addTransactionItem( ProgressItem *item, bool first );
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
public slots:
void slotLayoutFirstItem();
@@ -71,15 +71,15 @@ protected:
virtual void resizeContents ( int w, int h );
private:
- QVBox * mBigBox;
+ TQVBox * mBigBox;
};
-class TransactionItem : public QVBox {
+class TransactionItem : public TQVBox {
Q_OBJECT
public:
- TransactionItem( QWidget * parent,
+ TransactionItem( TQWidget * parent,
ProgressItem* item, bool first );
~TransactionItem();
@@ -87,8 +87,8 @@ public:
void hideHLine();
void setProgress( int progress );
- void setLabel( const QString& );
- void setStatus( const QString& );
+ void setLabel( const TQString& );
+ void setStatus( const TQString& );
void setCrypto( bool );
ProgressItem* item() const { return mItem; }
@@ -103,11 +103,11 @@ public slots:
void slotItemCanceled();
protected:
- QProgressBar* mProgress;
- QPushButton* mCancelButton;
- QLabel* mItemLabel;
- QLabel* mItemStatus;
- QFrame* mFrame;
+ TQProgressBar* mProgress;
+ TQPushButton* mCancelButton;
+ TQLabel* mItemLabel;
+ TQLabel* mItemStatus;
+ TQFrame* mFrame;
SSLLabel* mSSLLabel;
ProgressItem* mItem;
};
@@ -117,7 +117,7 @@ class KDE_EXPORT ProgressDialog : public OverlayWidget
Q_OBJECT
public:
- ProgressDialog( QWidget* alignWidget, QWidget* parent, const char* name = 0 );
+ ProgressDialog( TQWidget* alignWidget, TQWidget* parent, const char* name = 0 );
~ProgressDialog();
void setVisible( bool b );
@@ -129,8 +129,8 @@ void slotTransactionAdded( KPIM::ProgressItem *item );
void slotTransactionCompleted( KPIM::ProgressItem *item );
void slotTransactionCanceled( KPIM::ProgressItem *item );
void slotTransactionProgress( KPIM::ProgressItem *item, unsigned int progress );
- void slotTransactionStatus( KPIM::ProgressItem *item, const QString& );
- void slotTransactionLabel( KPIM::ProgressItem *item, const QString& );
+ void slotTransactionStatus( KPIM::ProgressItem *item, const TQString& );
+ void slotTransactionLabel( KPIM::ProgressItem *item, const TQString& );
void slotTransactionUsesCrypto( KPIM::ProgressItem *item, bool );
void slotClose();
@@ -141,11 +141,11 @@ signals:
void visibilityChanged( bool );
protected:
- virtual void closeEvent( QCloseEvent* );
+ virtual void closeEvent( TQCloseEvent* );
TransactionItemView* mScrollView;
TransactionItem* mPreviousItem;
- QMap< const ProgressItem*, TransactionItem* > mTransactionsToListviewItems;
+ TQMap< const ProgressItem*, TransactionItem* > mTransactionsToListviewItems;
bool mWasLastShown;
};
diff --git a/libkdepim/progressmanager.cpp b/libkdepim/progressmanager.cpp
index e9d1b0677..0c73e0c55 100644
--- a/libkdepim/progressmanager.cpp
+++ b/libkdepim/progressmanager.cpp
@@ -21,7 +21,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
#include <klocale.h>
@@ -35,8 +35,8 @@ KPIM::ProgressManager * KPIM::ProgressManager::mInstance = 0;
unsigned int KPIM::ProgressManager::uID = 42;
ProgressItem::ProgressItem(
- ProgressItem* parent, const QString& id,
- const QString& label, const QString& status, bool canBeCanceled,
+ ProgressItem* parent, const TQString& id,
+ const TQString& label, const TQString& status, bool canBeCanceled,
bool usesCrypto )
:mId( id ), mLabel( label ), mStatus( status ), mParent( parent ),
mCanBeCanceled( canBeCanceled ), mProgress( 0 ), mTotal( 0 ),
@@ -85,9 +85,9 @@ void ProgressItem::cancel()
kdDebug(5300) << "ProgressItem::cancel() - " << label() << endl;
mCanceled = true;
// Cancel all children.
- QValueList<ProgressItem*> kids = mChildren.keys();
- QValueList<ProgressItem*>::Iterator it( kids.begin() );
- QValueList<ProgressItem*>::Iterator end( kids.end() );
+ TQValueList<ProgressItem*> kids = mChildren.keys();
+ TQValueList<ProgressItem*>::Iterator it( kids.begin() );
+ TQValueList<ProgressItem*>::Iterator end( kids.end() );
for ( ; it != end; it++ ) {
ProgressItem *kid = *it;
if ( kid->canBeCanceled() )
@@ -105,13 +105,13 @@ void ProgressItem::setProgress( unsigned int v )
emit progressItemProgress( this, mProgress );
}
-void ProgressItem::setLabel( const QString& v )
+void ProgressItem::setLabel( const TQString& v )
{
mLabel = v;
emit progressItemLabel( this, mLabel );
}
-void ProgressItem::setStatus( const QString& v )
+void ProgressItem::setStatus( const TQString& v )
{
mStatus = v;
emit progressItemStatus( this, mStatus );
@@ -125,7 +125,7 @@ void ProgressItem::setUsesCrypto( bool v )
// ======================================
-ProgressManager::ProgressManager() :QObject() {
+ProgressManager::ProgressManager() :TQObject() {
mInstance = this;
}
@@ -141,8 +141,8 @@ ProgressManager* ProgressManager::instance()
}
ProgressItem* ProgressManager::createProgressItemImpl(
- ProgressItem* parent, const QString& id,
- const QString &label, const QString &status,
+ ProgressItem* parent, const TQString& id,
+ const TQString &label, const TQString &status,
bool cancellable, bool usesCrypto )
{
ProgressItem *t = 0;
@@ -156,20 +156,20 @@ ProgressItem* ProgressManager::createProgressItemImpl(
}
}
// connect all signals
- connect ( t, SIGNAL( progressItemCompleted(KPIM::ProgressItem*) ),
- this, SLOT( slotTransactionCompleted(KPIM::ProgressItem*) ) );
- connect ( t, SIGNAL( progressItemProgress(KPIM::ProgressItem*, unsigned int) ),
- this, SIGNAL( progressItemProgress(KPIM::ProgressItem*, unsigned int) ) );
- connect ( t, SIGNAL( progressItemAdded(KPIM::ProgressItem*) ),
- this, SIGNAL( progressItemAdded(KPIM::ProgressItem*) ) );
- connect ( t, SIGNAL( progressItemCanceled(KPIM::ProgressItem*) ),
- this, SIGNAL( progressItemCanceled(KPIM::ProgressItem*) ) );
- connect ( t, SIGNAL( progressItemStatus(KPIM::ProgressItem*, const QString&) ),
- this, SIGNAL( progressItemStatus(KPIM::ProgressItem*, const QString&) ) );
- connect ( t, SIGNAL( progressItemLabel(KPIM::ProgressItem*, const QString&) ),
- this, SIGNAL( progressItemLabel(KPIM::ProgressItem*, const QString&) ) );
- connect ( t, SIGNAL( progressItemUsesCrypto(KPIM::ProgressItem*, bool) ),
- this, SIGNAL( progressItemUsesCrypto(KPIM::ProgressItem*, bool) ) );
+ connect ( t, TQT_SIGNAL( progressItemCompleted(KPIM::ProgressItem*) ),
+ this, TQT_SLOT( slotTransactionCompleted(KPIM::ProgressItem*) ) );
+ connect ( t, TQT_SIGNAL( progressItemProgress(KPIM::ProgressItem*, unsigned int) ),
+ this, TQT_SIGNAL( progressItemProgress(KPIM::ProgressItem*, unsigned int) ) );
+ connect ( t, TQT_SIGNAL( progressItemAdded(KPIM::ProgressItem*) ),
+ this, TQT_SIGNAL( progressItemAdded(KPIM::ProgressItem*) ) );
+ connect ( t, TQT_SIGNAL( progressItemCanceled(KPIM::ProgressItem*) ),
+ this, TQT_SIGNAL( progressItemCanceled(KPIM::ProgressItem*) ) );
+ connect ( t, TQT_SIGNAL( progressItemStatus(KPIM::ProgressItem*, const TQString&) ),
+ this, TQT_SIGNAL( progressItemStatus(KPIM::ProgressItem*, const TQString&) ) );
+ connect ( t, TQT_SIGNAL( progressItemLabel(KPIM::ProgressItem*, const TQString&) ),
+ this, TQT_SIGNAL( progressItemLabel(KPIM::ProgressItem*, const TQString&) ) );
+ connect ( t, TQT_SIGNAL( progressItemUsesCrypto(KPIM::ProgressItem*, bool) ),
+ this, TQT_SIGNAL( progressItemUsesCrypto(KPIM::ProgressItem*, bool) ) );
emit progressItemAdded( t );
} else {
@@ -180,8 +180,8 @@ ProgressItem* ProgressManager::createProgressItemImpl(
}
ProgressItem* ProgressManager::createProgressItemImpl(
- const QString& parent, const QString &id,
- const QString &label, const QString& status,
+ const TQString& parent, const TQString &id,
+ const TQString &label, const TQString& status,
bool canBeCanceled, bool usesCrypto )
{
ProgressItem * p = mTransactions[parent];
@@ -210,7 +210,7 @@ void ProgressManager::slotStandardCancelHandler( ProgressItem *item )
ProgressItem* ProgressManager::singleItem() const
{
ProgressItem *item = 0;
- QDictIterator< ProgressItem > it( mTransactions );
+ TQDictIterator< ProgressItem > it( mTransactions );
for ( ; it.current(); ++it ) {
if ( !(*it)->parent() ) { // if it's a top level one, only those count
if ( item )
@@ -224,7 +224,7 @@ ProgressItem* ProgressManager::singleItem() const
void ProgressManager::slotAbortAll()
{
- QDictIterator< ProgressItem > it( mTransactions );
+ TQDictIterator< ProgressItem > it( mTransactions );
for ( ; it.current(); ++it ) {
it.current()->cancel();
}
diff --git a/libkdepim/progressmanager.h b/libkdepim/progressmanager.h
index 977aa5a14..b4233f8df 100644
--- a/libkdepim/progressmanager.h
+++ b/libkdepim/progressmanager.h
@@ -24,9 +24,9 @@
#ifndef __KPIM_PROGRESSMANAGER_H__
#define __KPIM_PROGRESSMANAGER_H__
-#include <qobject.h>
-#include <qdict.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqdict.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
@@ -34,13 +34,13 @@ namespace KPIM {
class ProgressItem;
class ProgressManager;
-typedef QMap<ProgressItem*, bool> ProgressItemMap;
+typedef TQMap<ProgressItem*, bool> ProgressItemMap;
class KDE_EXPORT ProgressItem : public QObject
{
Q_OBJECT
friend class ProgressManager;
- friend class QDict< ProgressItem >; // so it can be deleted from dicts
+ friend class TQDict< ProgressItem >; // so it can be deleted from dicts
public:
@@ -48,7 +48,7 @@ class KDE_EXPORT ProgressItem : public QObject
* @return The id string which uniquely identifies the operation
* represented by this item.
*/
- const QString& id() const { return mId; }
+ const TQString& id() const { return mId; }
/**
* @return The parent item of this one, if there is one.
@@ -58,24 +58,24 @@ class KDE_EXPORT ProgressItem : public QObject
/**
* @return The user visible string to be used to represent this item.
*/
- const QString& label() const { return mLabel; }
+ const TQString& label() const { return mLabel; }
/**
* @param v Set the user visible string identifying this item. @p v will
be interpreted as rich text, so it might have to be escaped.
*/
- void setLabel( const QString& v );
+ void setLabel( const TQString& v );
/**
* @return The string to be used for showing this item's current status.
*/
- const QString& status() const { return mStatus; }
+ const TQString& status() const { return mStatus; }
/**
* Set the string to be used for showing this item's current status.
* @p v will be interpreted as rich text, so it might have to be escaped.
* @param v The status string.
*/
- void setStatus( const QString& v );
+ void setStatus( const TQString& v );
/**
* @return Whether this item can be cancelled.
@@ -119,7 +119,7 @@ class KDE_EXPORT ProgressItem : public QObject
* Reset the progress value of this item to 0 and the status string to
* the empty string.
*/
- void reset() { setProgress( 0 ); setStatus( QString::null ); mCompleted = 0; }
+ void reset() { setProgress( 0 ); setStatus( TQString::null ); mCompleted = 0; }
void cancel();
@@ -176,14 +176,14 @@ signals:
* @param The updated item.
* @param The new message.
*/
- void progressItemStatus( KPIM::ProgressItem*, const QString& );
+ void progressItemStatus( KPIM::ProgressItem*, const TQString& );
/**
* Emitted when the label of an item changed. Should be used by
* progress dialogs to update the label of an item.
* @param The updated item.
* @param The new label.
*/
- void progressItemLabel( KPIM::ProgressItem*, const QString& );
+ void progressItemLabel( KPIM::ProgressItem*, const TQString& );
/**
* Emitted when the crypto status of an item changed. Should be used by
* progress dialogs to update the crypto indicator of an item.
@@ -196,18 +196,18 @@ signals:
protected:
/* Only to be used by our good friend the ProgressManager */
ProgressItem( ProgressItem* parent,
- const QString& id,
- const QString& label,
- const QString& status,
+ const TQString& id,
+ const TQString& label,
+ const TQString& status,
bool isCancellable,
bool usesCrypto );
virtual ~ProgressItem();
private:
- QString mId;
- QString mLabel;
- QString mStatus;
+ TQString mId;
+ TQString mLabel;
+ TQString mStatus;
ProgressItem* mParent;
bool mCanBeCanceled;
unsigned int mProgress;
@@ -259,7 +259,7 @@ class KDE_EXPORT ProgressManager : public QObject
* number as the id string for your progressItem to ensure it is unique.
* @return
*/
- static QString getUniqueID() { return QString::number( ++uID ); }
+ static TQString getUniqueID() { return TQString::number( ++uID ); }
/**
* Creates a ProgressItem with a unique id and the given label.
@@ -269,9 +269,9 @@ class KDE_EXPORT ProgressManager : public QObject
* @param label The text to be displayed by progress handlers. It will be
* interpreted as rich text, so it might have to be escaped.
*/
- static ProgressItem * createProgressItem( const QString &label ) {
+ static ProgressItem * createProgressItem( const TQString &label ) {
return instance()->createProgressItemImpl( 0, getUniqueID(), label,
- QString::null, true, false );
+ TQString::null, true, false );
}
/**
@@ -291,9 +291,9 @@ class KDE_EXPORT ProgressManager : public QObject
* @return The ProgressItem representing the operation.
*/
static ProgressItem * createProgressItem( ProgressItem* parent,
- const QString& id,
- const QString& label,
- const QString& status = QString::null,
+ const TQString& id,
+ const TQString& label,
+ const TQString& status = TQString::null,
bool canBeCanceled = true,
bool usesCrypto = false ) {
return instance()->createProgressItemImpl( parent, id, label, status,
@@ -304,10 +304,10 @@ class KDE_EXPORT ProgressManager : public QObject
* Use this version if you have the id string of the parent and want to
* add a subjob to it.
*/
- static ProgressItem * createProgressItem( const QString& parent,
- const QString& id,
- const QString& label,
- const QString& status = QString::null,
+ static ProgressItem * createProgressItem( const TQString& parent,
+ const TQString& id,
+ const TQString& label,
+ const TQString& status = TQString::null,
bool canBeCanceled = true,
bool usesCrypto = false ) {
return instance()->createProgressItemImpl( parent, id, label,
@@ -317,9 +317,9 @@ class KDE_EXPORT ProgressManager : public QObject
/**
* Version without a parent.
*/
- static ProgressItem * createProgressItem( const QString& id,
- const QString& label,
- const QString& status = QString::null,
+ static ProgressItem * createProgressItem( const TQString& id,
+ const TQString& label,
+ const TQString& status = TQString::null,
bool canBeCanceled = true,
bool usesCrypto = false ) {
return instance()->createProgressItemImpl( 0, id, label, status,
@@ -356,9 +356,9 @@ class KDE_EXPORT ProgressManager : public QObject
/** @see ProgressItem::progressItemCanceled() */
void progressItemCanceled( KPIM::ProgressItem* );
/** @see ProgressItem::progressItemStatus() */
- void progressItemStatus( KPIM::ProgressItem*, const QString& );
+ void progressItemStatus( KPIM::ProgressItem*, const TQString& );
/** @see ProgressItem::progressItemLabel() */
- void progressItemLabel( KPIM::ProgressItem*, const QString& );
+ void progressItemLabel( KPIM::ProgressItem*, const TQString& );
/** @see ProgressItem::progressItemUsesCrypto() */
void progressItemUsesCrypto( KPIM::ProgressItem*, bool );
@@ -390,16 +390,16 @@ class KDE_EXPORT ProgressManager : public QObject
ProgressManager( const ProgressManager& );
virtual ProgressItem* createProgressItemImpl(
- ProgressItem* parent, const QString& id,
- const QString& label, const QString& status,
+ ProgressItem* parent, const TQString& id,
+ const TQString& label, const TQString& status,
bool cancellable, bool usesCrypto );
virtual ProgressItem* createProgressItemImpl(
- const QString& parent, const QString& id,
- const QString& label, const QString& status,
+ const TQString& parent, const TQString& id,
+ const TQString& label, const TQString& status,
bool cancellable, bool usesCrypto );
void emitShowProgressDialogImpl();
- QDict< ProgressItem > mTransactions;
+ TQDict< ProgressItem > mTransactions;
static ProgressManager *mInstance;
static unsigned int uID;
};
diff --git a/libkdepim/qutf7codec.cpp b/libkdepim/qutf7codec.cpp
index 8cc3d4564..11c0db929 100644
--- a/libkdepim/qutf7codec.cpp
+++ b/libkdepim/qutf7codec.cpp
@@ -1,7 +1,7 @@
/*
qutf7codec.cpp
- A QTextCodec for UTF-7 (rfc2152).
+ A TQTextCodec for UTF-7 (rfc2152).
Copyright (c) 2001 Marc Mutz <mutz@kde.org>
See file COPYING for details
@@ -47,11 +47,11 @@ const char* QUtf7Codec::mimeName() const {
return "UTF-7";
}
-bool QUtf7Codec::canEncode( QChar ) const {
+bool QUtf7Codec::canEncode( TQChar ) const {
return TRUE;
}
-bool QUtf7Codec::canEncode( const QString & ) const {
+bool QUtf7Codec::canEncode( const TQString & ) const {
return TRUE;
}
@@ -136,7 +136,7 @@ int QUtf7Codec::heuristicContentMatch(const char* chars, int len) const
return i;
}
-class QUtf7Decoder : public QTextDecoder {
+class QUtf7Decoder : public TQTextDecoder {
// the storage for our unicode char until it's finished
ushort uc;
// the state of the base64 decoding
@@ -170,9 +170,9 @@ private:
}
public:
- QString toUnicode(const char* chars, int len)
+ TQString toUnicode(const char* chars, int len)
{
- QString result = "";
+ TQString result = "";
for (int i=0; i<len; i++) {
uchar ch = chars[i];
@@ -183,7 +183,7 @@ public:
qWarning("QUtf7Decoder: 8bit char found in input. "
"Parser has been re-initialized!");
resetParser();
- result += QChar::replacement;
+ result += TQChar::replacement;
continue;
}
@@ -197,7 +197,7 @@ public:
// a "+-" sequence is a short-circuit encoding
// for just '+':
resetParser();
- result += QChar('+');
+ result += TQChar('+');
// we're already done for this "ch", so
continue;
}
@@ -249,7 +249,7 @@ public:
//
// now we're going to stuff the "bits" bit bucket into
// the right position inside "uc", emitting a resulting
- // QChar if possible.
+ // TQChar if possible.
//
switch (stepNo) {
// "bits" are the 6 msb's of uc
@@ -258,21 +258,21 @@ public:
case 1: uc |= bits << 4; break;
// 4 bits of "bits" complete the first ushort
- case 2: uc |= bits >> 2; result += QChar(uc);
+ case 2: uc |= bits >> 2; result += TQChar(uc);
// 2 bits of "bits" make the msb's of the next ushort
uc = bits << 14; break;
case 3: uc |= bits << 8; break;
case 4: uc |= bits << 2; break;
// 2 bits of "bits" complete the second ushort
- case 5: uc |= bits >> 4; result += QChar(uc);
+ case 5: uc |= bits >> 4; result += TQChar(uc);
// 4 bits of "bits" make the msb's of the next ushort
uc = bits << 12; break;
case 6: uc |= bits << 6; break;
// these 6 bits complete the third ushort
// and also one round of 8 chars -> 3 ushort decoding
- case 7: uc |= bits; result += QChar(uc);
+ case 7: uc |= bits; result += TQChar(uc);
uc = 0; break;
default: ;
} // switch (stepNo)
@@ -302,7 +302,7 @@ public:
rightAfterEscape = TRUE;
} else {
// US-ASCII values are directly used
- result += QChar(ch);
+ result += TQChar(ch);
}
}
@@ -312,13 +312,13 @@ public:
}; // class QUtf7Decoder
-QTextDecoder* QUtf7Codec::makeDecoder() const
+TQTextDecoder* QUtf7Codec::makeDecoder() const
{
return new QUtf7Decoder;
}
-class QUtf7Encoder : public QTextEncoder {
+class QUtf7Encoder : public TQTextEncoder {
uchar dontNeedEncodingSet[16];
ushort outbits;
uint stepNo : 2;
@@ -357,7 +357,7 @@ private:
return '/';
}
- void addToShiftedSequence(QCString::Iterator & t, ushort u) {
+ void addToShiftedSequence(TQCString::Iterator & t, ushort u) {
switch (stepNo) {
// no outbits; use uppermost 6 bits of u
case 0:
@@ -396,7 +396,7 @@ private:
stepNo = (stepNo + 1) % 3;
}
- void endShiftedSequence(QCString::Iterator & t) {
+ void endShiftedSequence(TQCString::Iterator & t) {
switch (stepNo) {
case 1: // four outbits still to be written
case 2: // two outbits still to be written
@@ -418,7 +418,7 @@ private:
( stepNo == 2 && (u & 0xC000) == 0 );
}
- void processDoesntNeedEncoding(QCString::Iterator & t, ushort ch) {
+ void processDoesntNeedEncoding(TQCString::Iterator & t, ushort ch) {
// doesn't need encoding
if (shifted) {
endShiftedSequence(t);
@@ -440,7 +440,7 @@ private:
}
public:
- QCString fromUnicode(const QString & uc, int & len_in_out)
+ TQCString fromUnicode(const TQString & uc, int & len_in_out)
{
// allocate place for worst case:
// len/2 * (5+1) for an alternating sequence of e.g. "A\",
@@ -448,7 +448,7 @@ public:
// + 1 for the trailing \0
//
int maxreslen = 3 * len_in_out + 5;
- QCString result( maxreslen );
+ TQCString result( maxreslen );
#if 0
// if (len_in_out == 1) {
@@ -462,8 +462,8 @@ public:
#endif
// source and destination cursor
- const QChar * s = uc.unicode();
- QCString::Iterator t = result.data();
+ const TQChar * s = uc.unicode();
+ TQCString::Iterator t = result.data();
if ( uc.isNull() ) {
// return to ascii requested:
@@ -539,11 +539,11 @@ public:
}; // class QUtf7Encoder
-QTextEncoder* QUtf7Codec::makeEncoder() const {
+TQTextEncoder* QUtf7Codec::makeEncoder() const {
return new QUtf7Encoder( false, false );
}
-QTextEncoder* QStrictUtf7Codec::makeEncoder() const {
+TQTextEncoder* QStrictUtf7Codec::makeEncoder() const {
return new QUtf7Encoder( true, false );
}
diff --git a/libkdepim/qutf7codec.h b/libkdepim/qutf7codec.h
index b3380b1f0..675692afa 100644
--- a/libkdepim/qutf7codec.h
+++ b/libkdepim/qutf7codec.h
@@ -1,7 +1,7 @@
/*
qutf7codec.h
- A QTextCodec for UTF-7 (rfc2152).
+ A TQTextCodec for UTF-7 (rfc2152).
Copyright (c) 2001 Marc Mutz <mutz@kde.org>
See file COPYING for details
@@ -26,41 +26,41 @@
#define QUTF7CODEC_H
#ifndef QT_H
-#include "qtextcodec.h"
+#include "tqtextcodec.h"
#endif
#include <kdepimmacros.h>
#ifndef QT_NO_TEXTCODEC
-/** @short A QTextCodec for the UTF-7 transformation of Unicode.
+/** @short A TQTextCodec for the UTF-7 transformation of Unicode.
- This is a QTextCodec for the UTF-7 transformation of Unicode,
+ This is a TQTextCodec for the UTF-7 transformation of Unicode,
described in RFC2152.
- Use it as you would use any other QTextCodec. Only if you use the
+ Use it as you would use any other TQTextCodec. Only if you use the
encoder directly (via makeEncoder), you should bear in mind
that if your application needs the encoder to return to ASCII mode
(like it's the case for RFC2047 mail header encoded words), you
have to tell the encoder by requesting the encoding of a @em null
- QString.
+ TQString.
@author Marc Mutz <mutz@kde.org> */
-class KDE_EXPORT QUtf7Codec : public QTextCodec {
+class KDE_EXPORT QUtf7Codec : public TQTextCodec {
bool encOpt, encLwsp;
public:
- QUtf7Codec() : QTextCodec() {}
+ QUtf7Codec() : TQTextCodec() {}
int mibEnum() const;
const char* name() const;
const char* mimeName() const;
- QTextDecoder* makeDecoder() const;
- QTextEncoder* makeEncoder() const;
+ TQTextDecoder* makeDecoder() const;
+ TQTextEncoder* makeEncoder() const;
- bool canEncode( QChar ) const;
- bool canEncode( const QString& ) const;
+ bool canEncode( TQChar ) const;
+ bool canEncode( const TQString& ) const;
int heuristicContentMatch( const char* chars, int len ) const;
};
@@ -90,7 +90,7 @@ public:
const char* name() const;
int mibEnum() const;
- QTextEncoder* makeEncoder() const;
+ TQTextEncoder* makeEncoder() const;
};
#endif // QT_NO_TEXTCODEC
diff --git a/libkdepim/qutf7codecplugin.cpp b/libkdepim/qutf7codecplugin.cpp
index 54fb68c56..0564b4142 100644
--- a/libkdepim/qutf7codecplugin.cpp
+++ b/libkdepim/qutf7codecplugin.cpp
@@ -1,7 +1,7 @@
/*
qutf7codecplugin.cpp
- A QTextCodec for UTF-7 (rfc2152).
+ A TQTextCodec for UTF-7 (rfc2152).
Copyright (c) 2001 Marc Mutz <mutz@kde.org>
See file COPYING for details
@@ -24,26 +24,26 @@
#include "qutf7codec.h"
-#include <qtextcodecplugin.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqtextcodecplugin.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
class QTextCodec;
// ######### This file isn't compiled currently
-class QUtf7CodecPlugin : public QTextCodecPlugin {
+class QUtf7CodecPlugin : public TQTextCodecPlugin {
public:
QUtf7CodecPlugin() {}
- QStringList names() const { return QStringList() << "UTF-7" << "X-QT-UTF-7-STRICT"; }
- QValueList<int> mibEnums() const { return QValueList<int>() << 1012 << -1012; }
- QTextCodec * createForMib( int );
- QTextCodec * createForName( const QString & );
+ TQStringList names() const { return TQStringList() << "UTF-7" << "X-QT-UTF-7-STRICT"; }
+ TQValueList<int> mibEnums() const { return TQValueList<int>() << 1012 << -1012; }
+ TQTextCodec * createForMib( int );
+ TQTextCodec * createForName( const TQString & );
};
-QTextCodec * QUtf7CodecPlugin::createForMib( int mib ) {
+TQTextCodec * QUtf7CodecPlugin::createForMib( int mib ) {
if ( mib == 1012 )
return new QUtf7Codec();
else if ( mib == -1012 )
@@ -51,7 +51,7 @@ QTextCodec * QUtf7CodecPlugin::createForMib( int mib ) {
return 0;
}
-QTextCodec * QUtf7CodecPlugin::createForName( const QString & name ) {
+TQTextCodec * QUtf7CodecPlugin::createForName( const TQString & name ) {
if ( name == "UTF-7" )
return new QUtf7Codec();
else if ( name == "X-QT-UTF-7-STRICT" )
diff --git a/libkdepim/recentaddresses.cpp b/libkdepim/recentaddresses.cpp
index ebac9e3f7..a8e7e76b5 100644
--- a/libkdepim/recentaddresses.cpp
+++ b/libkdepim/recentaddresses.cpp
@@ -39,7 +39,7 @@
#include <keditlistbox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
using namespace KRecentAddress;
@@ -70,15 +70,15 @@ RecentAddresses::~RecentAddresses()
void RecentAddresses::load( KConfig *config )
{
- QStringList addresses;
- QString name;
- QString email;
+ TQStringList addresses;
+ TQString name;
+ TQString email;
m_addresseeList.clear();
KConfigGroupSaver cs( config, "General" );
m_maxCount = config->readNumEntry( "Maximum Recent Addresses", 40 );
addresses = config->readListEntry( "Recent Addresses" );
- for ( QStringList::Iterator it = addresses.begin(); it != addresses.end(); ++it ) {
+ for ( TQStringList::Iterator it = addresses.begin(); it != addresses.end(); ++it ) {
KABC::Addressee::parseEmailAddress( *it, name, email );
if ( !email.isEmpty() ) {
KABC::Addressee addr;
@@ -97,16 +97,16 @@ void RecentAddresses::save( KConfig *config )
config->writeEntry( "Recent Addresses", addresses() );
}
-void RecentAddresses::add( const QString& entry )
+void RecentAddresses::add( const TQString& entry )
{
if ( !entry.isEmpty() && m_maxCount > 0 ) {
- QStringList list = KPIM::splitEmailAddrList( entry );
- for( QStringList::const_iterator e_it = list.begin(); e_it != list.end(); ++e_it ) {
+ TQStringList list = KPIM::splitEmailAddrList( entry );
+ for( TQStringList::const_iterator e_it = list.begin(); e_it != list.end(); ++e_it ) {
KPIM::EmailParseResult errorCode = KPIM::isValidEmailAddress( *e_it );
if ( errorCode != KPIM::AddressOk )
continue;
- QString email;
- QString fullName;
+ TQString email;
+ TQString fullName;
KABC::Addressee addr;
KABC::Addressee::parseEmailAddress( *e_it, fullName, email );
@@ -146,9 +146,9 @@ void RecentAddresses::clear()
adjustSize();
}
-QStringList RecentAddresses::addresses() const
+TQStringList RecentAddresses::addresses() const
{
- QStringList addresses;
+ TQStringList addresses;
for ( KABC::Addressee::List::ConstIterator it = m_addresseeList.begin();
it != m_addresseeList.end(); ++it )
{
@@ -157,25 +157,25 @@ QStringList RecentAddresses::addresses() const
return addresses;
}
-RecentAddressDialog::RecentAddressDialog( QWidget *parent, const char *name )
+RecentAddressDialog::RecentAddressDialog( TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Edit Recent Addresses" ), Ok | Cancel, Ok,
parent, name, true )
{
- QWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page, 0, spacingHint() );
+ TQWidget *page = plainPage();
+ TQVBoxLayout *layout = new TQVBoxLayout( page, 0, spacingHint() );
mEditor = new KEditListBox( i18n( "Recent Addresses" ), page, "", false,
KEditListBox::Add | KEditListBox::Remove );
layout->addWidget( mEditor );
}
-void RecentAddressDialog::setAddresses( const QStringList &addrs )
+void RecentAddressDialog::setAddresses( const TQStringList &addrs )
{
mEditor->clear();
mEditor->insertStringList( addrs );
}
-QStringList RecentAddressDialog::addresses() const
+TQStringList RecentAddressDialog::addresses() const
{
return mEditor->items();
}
diff --git a/libkdepim/recentaddresses.h b/libkdepim/recentaddresses.h
index 917d63fbe..03254031b 100644
--- a/libkdepim/recentaddresses.h
+++ b/libkdepim/recentaddresses.h
@@ -30,7 +30,7 @@
#ifndef RECENTADDRESSES_H
#define RECENTADDRESSES_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kabc/addressee.h>
#include <kdialogbase.h>
@@ -44,9 +44,9 @@ namespace KRecentAddress {
class KDE_EXPORT RecentAddressDialog : public KDialogBase
{
public:
- RecentAddressDialog( QWidget *parent, const char *name = 0 );
- void setAddresses( const QStringList &addrs );
- QStringList addresses() const;
+ RecentAddressDialog( TQWidget *parent, const char *name = 0 );
+ void setAddresses( const TQStringList &addrs );
+ TQStringList addresses() const;
private:
KEditListBox *mEditor;
};
@@ -77,7 +77,7 @@ public:
* Note: an entry doesn't have to be one email address, it can be multiple,
* like "Foo <foo@bar.org>, Bar Baz <bar@baz.org>".
*/
- QStringList addresses() const;
+ TQStringList addresses() const;
const KABC::Addressee::List& kabcAddresses() const { return m_addresseeList; }
/**
@@ -85,7 +85,7 @@ public:
* Note: an entry doesn't have to be one email address, it can be multiple,
* like "Foo <foo@bar.org>, Bar Baz <bar@baz.org>".
*/
- void add( const QString& entry );
+ void add( const TQString& entry );
/**
* Sets the maximum number, the list can hold. The list adjusts to this
diff --git a/libkdepim/resourceabc.h b/libkdepim/resourceabc.h
index dab79d0a2..90abbf72b 100644
--- a/libkdepim/resourceabc.h
+++ b/libkdepim/resourceabc.h
@@ -26,7 +26,7 @@
#define RESOURCEABC_H
#include <kabc/resource.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <kdepimmacros.h>
// This is here because it can't go to kdelibs/kabc yet, but ultimately
@@ -55,58 +55,58 @@ public:
* The returned map has the UID as key and the resource it's in as
* the data.
*/
- virtual QMap<QString, QString> uidToResourceMap() const = 0;
+ virtual TQMap<TQString, TQString> uidToResourceMap() const = 0;
/**
- * If this resource has subresources, return a QStringList of them.
+ * If this resource has subresources, return a TQStringList of them.
* In most cases, resources do not have subresources, so this is
* by default just empty.
*/
- virtual QStringList subresources() const { return QStringList(); }
+ virtual TQStringList subresources() const { return TQStringList(); }
/**
* Is this subresource active or not?
*/
- virtual bool subresourceActive( const QString& ) const { return true; }
+ virtual bool subresourceActive( const TQString& ) const { return true; }
/**
* Is the given subresource writable?
*/
- virtual bool subresourceWritable( const QString& ) const = 0;
+ virtual bool subresourceWritable( const TQString& ) const = 0;
/**
* Completion weight for a given subresource
*/
- virtual int subresourceCompletionWeight( const QString& ) const = 0;
+ virtual int subresourceCompletionWeight( const TQString& ) const = 0;
/**
* Label for a given subresource
*/
- virtual QString subresourceLabel( const QString& ) const = 0;
+ virtual TQString subresourceLabel( const TQString& ) const = 0;
public slots:
/**
* (De-)activate a subresource.
*/
- virtual void setSubresourceActive( const QString &, bool active ) = 0;
+ virtual void setSubresourceActive( const TQString &, bool active ) = 0;
/**
* Set completion weight for a given subresource
*/
- virtual void setSubresourceCompletionWeight( const QString&, int weight ) = 0;
+ virtual void setSubresourceCompletionWeight( const TQString&, int weight ) = 0;
signals:
/**
* This signal is emitted when a subresource is added.
*/
- void signalSubresourceAdded( KPIM::ResourceABC *, const QString &type,
- const QString &subResource );
+ void signalSubresourceAdded( KPIM::ResourceABC *, const TQString &type,
+ const TQString &subResource );
/**
* This signal is emitted when a subresource is removed.
*/
- void signalSubresourceRemoved( KPIM::ResourceABC *, const QString &type,
- const QString &subResource );
+ void signalSubresourceRemoved( KPIM::ResourceABC *, const TQString &type,
+ const TQString &subResource );
};
diff --git a/libkdepim/sendsmsdialog.cpp b/libkdepim/sendsmsdialog.cpp
index 51608f234..93671a347 100644
--- a/libkdepim/sendsmsdialog.cpp
+++ b/libkdepim/sendsmsdialog.cpp
@@ -19,46 +19,46 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtextedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
#include <klocale.h>
#include "sendsmsdialog.h"
-SendSMSDialog::SendSMSDialog( const QString &recipientName, QWidget *parent, const char *name )
+SendSMSDialog::SendSMSDialog( const TQString &recipientName, TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Send SMS" ), Ok | Cancel, Ok, parent, name, true, true )
{
- QWidget *page = plainPage();
+ TQWidget *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 3, 3, marginHint(), spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( page, 3, 3, marginHint(), spacingHint() );
- layout->addWidget( new QLabel( i18n( "Message" ), page ), 0, 0 );
+ layout->addWidget( new TQLabel( i18n( "Message" ), page ), 0, 0 );
- mMessageLength = new QLabel( "0/160", page );
+ mMessageLength = new TQLabel( "0/160", page );
mMessageLength->setAlignment( Qt::AlignRight );
layout->addWidget( mMessageLength, 0, 2 );
- mText = new QTextEdit( page );
+ mText = new TQTextEdit( page );
layout->addMultiCellWidget( mText, 1, 1, 0, 2 );
- layout->addWidget( new QLabel( i18n( "Recipient:" ), page ), 2, 0 );
- layout->addWidget( new QLabel( recipientName, page ), 2, 2 );
+ layout->addWidget( new TQLabel( i18n( "Recipient:" ), page ), 2, 0 );
+ layout->addWidget( new TQLabel( recipientName, page ), 2, 2 );
setButtonText( Ok, i18n( "Send" ) );
- connect( mText, SIGNAL( textChanged() ),
- this, SLOT( updateMessageLength() ) );
- connect( mText, SIGNAL( textChanged() ),
- this, SLOT( updateButtons() ) );
+ connect( mText, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( updateMessageLength() ) );
+ connect( mText, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( updateButtons() ) );
updateButtons();
mText->setFocus();
}
-QString SendSMSDialog::text() const
+TQString SendSMSDialog::text() const
{
return mText->text();
}
@@ -68,13 +68,13 @@ void SendSMSDialog::updateMessageLength()
int length = mText->length();
if( length > 480 )
- mMessageLength->setText( QString( "%1/%2 (%3)" ).arg( length ).arg( 500 ).arg( 4 ) );
+ mMessageLength->setText( TQString( "%1/%2 (%3)" ).arg( length ).arg( 500 ).arg( 4 ) );
else if( length > 320 )
- mMessageLength->setText( QString( "%1/%2 (%3)" ).arg( length ).arg( 480 ).arg( 3 ) );
+ mMessageLength->setText( TQString( "%1/%2 (%3)" ).arg( length ).arg( 480 ).arg( 3 ) );
else if( length > 160 )
- mMessageLength->setText( QString( "%1/%2 (%3)" ).arg( length ).arg( 320 ).arg( 2 ) );
+ mMessageLength->setText( TQString( "%1/%2 (%3)" ).arg( length ).arg( 320 ).arg( 2 ) );
else
- mMessageLength->setText( QString( "%1/%2" ).arg( length ).arg( 160 ) );
+ mMessageLength->setText( TQString( "%1/%2" ).arg( length ).arg( 160 ) );
}
void SendSMSDialog::updateButtons()
diff --git a/libkdepim/sendsmsdialog.h b/libkdepim/sendsmsdialog.h
index e79a08bac..a7ebe3a70 100644
--- a/libkdepim/sendsmsdialog.h
+++ b/libkdepim/sendsmsdialog.h
@@ -32,17 +32,17 @@ class SendSMSDialog : public KDialogBase
Q_OBJECT
public:
- SendSMSDialog( const QString &recipientName, QWidget *parent, const char *name = 0 );
+ SendSMSDialog( const TQString &recipientName, TQWidget *parent, const char *name = 0 );
- QString text() const;
+ TQString text() const;
private slots:
void updateMessageLength();
void updateButtons();
private:
- QLabel *mMessageLength;
- QTextEdit *mText;
+ TQLabel *mMessageLength;
+ TQTextEdit *mText;
};
#endif
diff --git a/libkdepim/sidebarextension.cpp b/libkdepim/sidebarextension.cpp
index a3251ee7d..dc3413ebc 100644
--- a/libkdepim/sidebarextension.cpp
+++ b/libkdepim/sidebarextension.cpp
@@ -21,13 +21,13 @@
#include "sidebarextension.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kparts/part.h>
using namespace KParts;
-SideBarExtension::SideBarExtension(QWidget *exported, KParts::ReadOnlyPart *parent, const char* name)
-: QObject(parent, name), m_exported(exported), d(0)
+SideBarExtension::SideBarExtension(TQWidget *exported, KParts::ReadOnlyPart *parent, const char* name)
+: TQObject(parent, name), m_exported(exported), d(0)
{
}
diff --git a/libkdepim/sidebarextension.h b/libkdepim/sidebarextension.h
index b1f6bccdd..e65d3c94a 100644
--- a/libkdepim/sidebarextension.h
+++ b/libkdepim/sidebarextension.h
@@ -21,7 +21,7 @@
#ifndef SIDEBAREXTENSION_H
#define SIDEBAREXTENSION_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdepimmacros.h>
class QWidget;
@@ -43,21 +43,21 @@ namespace KParts
/**
* Constucts a SideBarExtension.
*
- * @param exported A QWidget derived widget that will be provided for the
+ * @param exported A TQWidget derived widget that will be provided for the
* users of SideBarExtension.
* @param parent The parent widget.
* @param name The name of the class.
**/
- SideBarExtension(QWidget *exported, KParts::ReadOnlyPart *parent, const char* name);
+ SideBarExtension(TQWidget *exported, KParts::ReadOnlyPart *parent, const char* name);
~SideBarExtension();
/**
* Retrieve a pointer to the widget. May be 0 if 0 was passed in the constructor
**/
- QWidget* widget() const { return m_exported; }
+ TQWidget* widget() const { return m_exported; }
private:
- QWidget* m_exported;
+ TQWidget* m_exported;
class SideBarExtensionPrivate;
SideBarExtensionPrivate *d;
diff --git a/libkdepim/spellingfilter.cpp b/libkdepim/spellingfilter.cpp
index d58ab3162..cc94968d4 100644
--- a/libkdepim/spellingfilter.cpp
+++ b/libkdepim/spellingfilter.cpp
@@ -27,9 +27,9 @@
// SpellingFilter implementation
//
-SpellingFilter::SpellingFilter(const QString& text, const QString& quotePrefix,
+SpellingFilter::SpellingFilter(const TQString& text, const TQString& quotePrefix,
UrlFiltering filterUrls, EmailAddressFiltering filterEmailAddresses,
- const QStringList& filterStrings)
+ const TQStringList& filterStrings)
: mOriginal(text)
{
TextCensor c(text);
@@ -43,7 +43,7 @@ SpellingFilter::SpellingFilter(const QString& text, const QString& quotePrefix,
if(filterEmailAddresses)
c.censorEmailAddresses();
- QStringList::const_iterator iter = filterStrings.begin();
+ TQStringList::const_iterator iter = filterStrings.begin();
while(iter != filterStrings.end())
{
c.censorString(*iter);
@@ -53,12 +53,12 @@ SpellingFilter::SpellingFilter(const QString& text, const QString& quotePrefix,
mFiltered = c.censoredText();
}
-QString SpellingFilter::originalText() const
+TQString SpellingFilter::originalText() const
{
return mOriginal;
}
-QString SpellingFilter::filteredText() const
+TQString SpellingFilter::filteredText() const
{
return mFiltered;
}
@@ -67,13 +67,13 @@ QString SpellingFilter::filteredText() const
// SpellingFilter::TextCensor implementation
//
-SpellingFilter::TextCensor::TextCensor(const QString& s)
+SpellingFilter::TextCensor::TextCensor(const TQString& s)
: LinkLocator(s)
{
}
-void SpellingFilter::TextCensor::censorQuotations(const QString& quotePrefix)
+void SpellingFilter::TextCensor::censorQuotations(const TQString& quotePrefix)
{
mPos = 0;
while(mPos < static_cast<int>(mText.length()))
@@ -87,7 +87,7 @@ void SpellingFilter::TextCensor::censorQuotations(const QString& quotePrefix)
// Replace quotation with spaces
int len = mPos - start;
- QString spaces;
+ TQString spaces;
spaces.fill(' ', len);
mText.replace(start, len, spaces);
@@ -103,7 +103,7 @@ void SpellingFilter::TextCensor::censorUrls()
while(mPos < static_cast<int>(mText.length()))
{
// Find start of url
- QString url;
+ TQString url;
while(mPos < static_cast<int>(mText.length()) && url.isEmpty())
{
url = getUrl();
@@ -133,7 +133,7 @@ void SpellingFilter::TextCensor::censorEmailAddresses()
findEmailAddress();
if(mPos < static_cast<int>(mText.length()))
{
- QString address = getEmailAddress();
+ TQString address = getEmailAddress();
++mPos;
if(!address.isEmpty())
{
@@ -150,7 +150,7 @@ void SpellingFilter::TextCensor::censorEmailAddresses()
}
}
-void SpellingFilter::TextCensor::censorString(const QString& s)
+void SpellingFilter::TextCensor::censorString(const TQString& s)
{
mPos = 0;
while(mPos != -1)
@@ -160,7 +160,7 @@ void SpellingFilter::TextCensor::censorString(const QString& s)
if(mPos != -1)
{
// Replace string with spaces
- QString spaces;
+ TQString spaces;
spaces.fill(' ', s.length());
mText.replace(mPos, s.length(), spaces);
mPos += s.length();
@@ -171,7 +171,7 @@ void SpellingFilter::TextCensor::censorString(const QString& s)
}
}
-QString SpellingFilter::TextCensor::censoredText() const
+TQString SpellingFilter::TextCensor::censoredText() const
{
return mText;
}
@@ -194,19 +194,19 @@ void SpellingFilter::TextCensor::skipLine()
++mPos;
}
-bool SpellingFilter::TextCensor::atQuotation(const QString& quotePrefix) const
+bool SpellingFilter::TextCensor::atQuotation(const TQString& quotePrefix) const
{
return atLineStart() &&
mText.mid(mPos, quotePrefix.length()) == quotePrefix;
}
-void SpellingFilter::TextCensor::skipQuotation(const QString& quotePrefix)
+void SpellingFilter::TextCensor::skipQuotation(const TQString& quotePrefix)
{
while(atQuotation(quotePrefix))
skipLine();
}
-void SpellingFilter::TextCensor::findQuotation(const QString& quotePrefix)
+void SpellingFilter::TextCensor::findQuotation(const TQString& quotePrefix)
{
while(mPos < static_cast<int>(mText.length()) && !atQuotation(quotePrefix))
skipLine();
diff --git a/libkdepim/spellingfilter.h b/libkdepim/spellingfilter.h
index 5d33aae88..ac0fe02d7 100644
--- a/libkdepim/spellingfilter.h
+++ b/libkdepim/spellingfilter.h
@@ -23,8 +23,8 @@
#ifndef SPELLINGFILTER_H_INCLUDED
#define SPELLINGFILTER_H_INCLUDED
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "linklocator.h"
#include <kdepimmacros.h>
@@ -35,40 +35,40 @@ public:
enum UrlFiltering { DontFilterUrls, FilterUrls };
enum EmailAddressFiltering { DontFilterEmailAddresses, FilterEmailAddresses };
- SpellingFilter(const QString& text, const QString& quotePrefix,
+ SpellingFilter(const TQString& text, const TQString& quotePrefix,
UrlFiltering filterUrls = FilterUrls,
EmailAddressFiltering filterEmailAddresses = FilterEmailAddresses,
- const QStringList& filterStrings = QStringList());
+ const TQStringList& filterStrings = TQStringList());
- QString originalText() const;
- QString filteredText() const;
+ TQString originalText() const;
+ TQString filteredText() const;
class TextCensor;
private:
- const QString mOriginal;
- QString mFiltered;
+ const TQString mOriginal;
+ TQString mFiltered;
};
class SpellingFilter::TextCensor : public LinkLocator
{
public:
- TextCensor(const QString& s);
+ TextCensor(const TQString& s);
- void censorQuotations(const QString& quotePrefix);
+ void censorQuotations(const TQString& quotePrefix);
void censorUrls();
void censorEmailAddresses();
- void censorString(const QString& s);
+ void censorString(const TQString& s);
- QString censoredText() const;
+ TQString censoredText() const;
private:
bool atLineStart() const;
void skipLine();
- bool atQuotation(const QString& quotePrefix) const;
- void skipQuotation(const QString& quotePrefix);
- void findQuotation(const QString& quotePrefix);
+ bool atQuotation(const TQString& quotePrefix) const;
+ void skipQuotation(const TQString& quotePrefix);
+ void findQuotation(const TQString& quotePrefix);
void findEmailAddress();
};
diff --git a/libkdepim/ssllabel.cpp b/libkdepim/ssllabel.cpp
index c606928da..3ad982390 100644
--- a/libkdepim/ssllabel.cpp
+++ b/libkdepim/ssllabel.cpp
@@ -37,12 +37,12 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
namespace KPIM {
-SSLLabel::SSLLabel( QWidget* parent )
- : QLabel( parent )
+SSLLabel::SSLLabel( TQWidget* parent )
+ : TQLabel( parent )
{
setState( Done );
}
@@ -65,24 +65,24 @@ void SSLLabel::setState( State state )
{
switch( state ) {
case Encrypted:
- QToolTip::remove( this );
- QToolTip::add( this, i18n("Connection is encrypted") );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, i18n("Connection is encrypted") );
setPixmap( SmallIcon( "encrypted", KGlobal::instance() ) );
show();
break;
case Unencrypted:
- QToolTip::remove( this );
- QToolTip::add( this, i18n("Connection is unencrypted") );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, i18n("Connection is unencrypted") );
setPixmap( SmallIcon( "decrypted" ) );
show();
break;
case Done:
- QToolTip::remove( this );
+ TQToolTip::remove( this );
hide();
break;
case Clean:
default:
- QToolTip::remove( this );
+ TQToolTip::remove( this );
hide();
//we return because we do not save the state as the only
//action we want to perform is to hide ourself
diff --git a/libkdepim/ssllabel.h b/libkdepim/ssllabel.h
index 0c4032b8c..06a638606 100644
--- a/libkdepim/ssllabel.h
+++ b/libkdepim/ssllabel.h
@@ -32,7 +32,7 @@
#ifndef SSLLABEL_H
#define SSLLABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
namespace KPIM {
@@ -45,7 +45,7 @@ namespace KPIM {
Clean,
Done
};
- SSLLabel( QWidget* parent );
+ SSLLabel( TQWidget* parent );
void setEncrypted( bool enc=true );
void setState( State state );
diff --git a/libkdepim/statusbarprogresswidget.cpp b/libkdepim/statusbarprogresswidget.cpp
index 3d0229fc5..c6fa807a2 100644
--- a/libkdepim/statusbarprogresswidget.cpp
+++ b/libkdepim/statusbarprogresswidget.cpp
@@ -43,14 +43,14 @@ using KPIM::ProgressManager;
#include <kiconloader.h>
#include <kdebug.h>
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qframe.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqframe.h>
#include "progressdialog.h"
#include "statusbarprogresswidget.h"
@@ -58,36 +58,36 @@ using KPIM::ProgressManager;
using namespace KPIM;
//-----------------------------------------------------------------------------
-StatusbarProgressWidget::StatusbarProgressWidget( ProgressDialog* progressDialog, QWidget* parent, bool button )
- : QFrame( parent ), mCurrentItem( 0 ), mProgressDialog( progressDialog ),
+StatusbarProgressWidget::StatusbarProgressWidget( ProgressDialog* progressDialog, TQWidget* parent, bool button )
+ : TQFrame( parent ), mCurrentItem( 0 ), mProgressDialog( progressDialog ),
mDelayTimer( 0 ), mBusyTimer( 0 )
{
m_bShowButton = button;
int w = fontMetrics().width( " 999.9 kB/s 00:00:01 " ) + 8;
- box = new QHBoxLayout( this, 0, 0 );
+ box = new TQHBoxLayout( this, 0, 0 );
- m_pButton = new QPushButton( this );
- m_pButton->setSizePolicy( QSizePolicy( QSizePolicy::Minimum,
- QSizePolicy::Minimum ) );
+ m_pButton = new TQPushButton( this );
+ m_pButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum,
+ TQSizePolicy::Minimum ) );
m_pButton->setPixmap( SmallIcon( "up" ) );
box->addWidget( m_pButton );
- stack = new QWidgetStack( this );
+ stack = new TQWidgetStack( this );
stack->setMaximumHeight( fontMetrics().height() );
box->addWidget( stack );
m_sslLabel = new SSLLabel( this );
box->addWidget( m_sslLabel );
- QToolTip::add( m_pButton, i18n("Open detailed progress dialog") );
+ TQToolTip::add( m_pButton, i18n("Open detailed progress dialog") );
m_pProgressBar = new KProgress( this );
m_pProgressBar->setLineWidth( 1 );
- m_pProgressBar->setFrameStyle( QFrame::Box );
+ m_pProgressBar->setFrameStyle( TQFrame::Box );
m_pProgressBar->installEventFilter( this );
m_pProgressBar->setMinimumWidth( w );
stack->addWidget( m_pProgressBar, 1 );
- m_pLabel = new QLabel( QString::null, this );
+ m_pLabel = new TQLabel( TQString::null, this );
m_pLabel->setAlignment( AlignHCenter | AlignVCenter );
m_pLabel->installEventFilter( this );
m_pLabel->setMinimumWidth( w );
@@ -98,20 +98,20 @@ StatusbarProgressWidget::StatusbarProgressWidget( ProgressDialog* progressDialog
mode = None;
setMode();
- connect( m_pButton, SIGNAL( clicked() ),
- progressDialog, SLOT( slotToggleVisibility() ) );
+ connect( m_pButton, TQT_SIGNAL( clicked() ),
+ progressDialog, TQT_SLOT( slotToggleVisibility() ) );
- connect ( ProgressManager::instance(), SIGNAL( progressItemAdded( KPIM::ProgressItem * ) ),
- this, SLOT( slotProgressItemAdded( KPIM::ProgressItem * ) ) );
- connect ( ProgressManager::instance(), SIGNAL( progressItemCompleted( KPIM::ProgressItem * ) ),
- this, SLOT( slotProgressItemCompleted( KPIM::ProgressItem * ) ) );
+ connect ( ProgressManager::instance(), TQT_SIGNAL( progressItemAdded( KPIM::ProgressItem * ) ),
+ this, TQT_SLOT( slotProgressItemAdded( KPIM::ProgressItem * ) ) );
+ connect ( ProgressManager::instance(), TQT_SIGNAL( progressItemCompleted( KPIM::ProgressItem * ) ),
+ this, TQT_SLOT( slotProgressItemCompleted( KPIM::ProgressItem * ) ) );
- connect ( progressDialog, SIGNAL( visibilityChanged( bool )),
- this, SLOT( slotProgressDialogVisible( bool ) ) );
+ connect ( progressDialog, TQT_SIGNAL( visibilityChanged( bool )),
+ this, TQT_SLOT( slotProgressDialogVisible( bool ) ) );
- mDelayTimer = new QTimer( this );
- connect ( mDelayTimer, SIGNAL( timeout() ),
- this, SLOT( slotShowItemDelayed() ) );
+ mDelayTimer = new TQTimer( this );
+ connect ( mDelayTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotShowItemDelayed() ) );
}
// There are three cases: no progressitem, one progressitem (connect to it directly),
@@ -130,9 +130,9 @@ void StatusbarProgressWidget::slotProgressItemAdded( ProgressItem *item )
}
else { // N items
if ( !mBusyTimer ) {
- mBusyTimer = new QTimer( this );
- connect( mBusyTimer, SIGNAL( timeout() ),
- this, SLOT( slotBusyIndicator() ) );
+ mBusyTimer = new TQTimer( this );
+ connect( mBusyTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotBusyIndicator() ) );
mDelayTimer->start( 1000, true );
}
}
@@ -144,7 +144,7 @@ void StatusbarProgressWidget::slotProgressItemCompleted( ProgressItem *item )
connectSingleItem(); // if going back to 1 item
if ( ProgressManager::instance()->isEmpty() ) { // No item
// Done. In 5s the progress-widget will close, then we can clean up the statusbar
- QTimer::singleShot( 5000, this, SLOT( slotClean() ) );
+ TQTimer::singleShot( 5000, this, TQT_SLOT( slotClean() ) );
} else if ( mCurrentItem ) { // Exactly one item
delete mBusyTimer;
mBusyTimer = 0;
@@ -155,14 +155,14 @@ void StatusbarProgressWidget::slotProgressItemCompleted( ProgressItem *item )
void StatusbarProgressWidget::connectSingleItem()
{
if ( mCurrentItem ) {
- disconnect ( mCurrentItem, SIGNAL( progressItemProgress( KPIM::ProgressItem *, unsigned int ) ),
- this, SLOT( slotProgressItemProgress( KPIM::ProgressItem *, unsigned int ) ) );
+ disconnect ( mCurrentItem, TQT_SIGNAL( progressItemProgress( KPIM::ProgressItem *, unsigned int ) ),
+ this, TQT_SLOT( slotProgressItemProgress( KPIM::ProgressItem *, unsigned int ) ) );
mCurrentItem = 0;
}
mCurrentItem = ProgressManager::instance()->singleItem();
if ( mCurrentItem ) {
- connect ( mCurrentItem, SIGNAL( progressItemProgress( KPIM::ProgressItem *, unsigned int ) ),
- this, SLOT( slotProgressItemProgress( KPIM::ProgressItem *, unsigned int ) ) );
+ connect ( mCurrentItem, TQT_SIGNAL( progressItemProgress( KPIM::ProgressItem *, unsigned int ) ),
+ this, TQT_SLOT( slotProgressItemProgress( KPIM::ProgressItem *, unsigned int ) ) );
}
}
@@ -254,10 +254,10 @@ void StatusbarProgressWidget::slotClean()
}
}
-bool StatusbarProgressWidget::eventFilter( QObject *, QEvent *ev )
+bool StatusbarProgressWidget::eventFilter( TQObject *, TQEvent *ev )
{
- if ( ev->type() == QEvent::MouseButtonPress ) {
- QMouseEvent *e = (QMouseEvent*)ev;
+ if ( ev->type() == TQEvent::MouseButtonPress ) {
+ TQMouseEvent *e = (TQMouseEvent*)ev;
if ( e->button() == LeftButton && mode != None ) { // toggle view on left mouse button
// Consensus seems to be that we should show/hide the fancy dialog when the user
@@ -274,13 +274,13 @@ void StatusbarProgressWidget::slotProgressDialogVisible( bool b )
// Update the hide/show button when the detailed one is shown/hidden
if ( b ) {
m_pButton->setPixmap( SmallIcon( "down" ) );
- QToolTip::remove( m_pButton );
- QToolTip::add( m_pButton, i18n("Hide detailed progress window") );
+ TQToolTip::remove( m_pButton );
+ TQToolTip::add( m_pButton, i18n("Hide detailed progress window") );
setMode();
} else {
m_pButton->setPixmap( SmallIcon( "up" ) );
- QToolTip::remove( m_pButton );
- QToolTip::add( m_pButton, i18n("Show detailed progress window") );
+ TQToolTip::remove( m_pButton );
+ TQToolTip::add( m_pButton, i18n("Show detailed progress window") );
}
}
diff --git a/libkdepim/statusbarprogresswidget.h b/libkdepim/statusbarprogresswidget.h
index 13d31bb96..ed06b2b85 100644
--- a/libkdepim/statusbarprogresswidget.h
+++ b/libkdepim/statusbarprogresswidget.h
@@ -51,13 +51,13 @@ class SSLLabel;
class ProgressItem;
class ProgressDialog;
-class KDE_EXPORT StatusbarProgressWidget : public QFrame {
+class KDE_EXPORT StatusbarProgressWidget : public TQFrame {
Q_OBJECT
public:
- StatusbarProgressWidget( ProgressDialog* progressDialog, QWidget* parent, bool button = true );
+ StatusbarProgressWidget( ProgressDialog* progressDialog, TQWidget* parent, bool button = true );
public slots:
@@ -78,25 +78,25 @@ protected:
void connectSingleItem();
void activateSingleItemMode();
- virtual bool eventFilter( QObject *, QEvent * );
+ virtual bool eventFilter( TQObject *, TQEvent * );
private:
KProgress* m_pProgressBar;
- QLabel* m_pLabel;
+ TQLabel* m_pLabel;
SSLLabel* m_sslLabel;
- QPushButton* m_pButton;
+ TQPushButton* m_pButton;
enum Mode { None, /*Label,*/ Progress };
uint mode;
bool m_bShowButton;
- QBoxLayout *box;
- QWidgetStack *stack;
+ TQBoxLayout *box;
+ TQWidgetStack *stack;
ProgressItem *mCurrentItem;
ProgressDialog* mProgressDialog;
- QTimer *mDelayTimer;
- QTimer *mBusyTimer;
+ TQTimer *mDelayTimer;
+ TQTimer *mBusyTimer;
};
} // namespace
diff --git a/libkdepim/tests/test_kregexp.cpp b/libkdepim/tests/test_kregexp.cpp
index 96bfc54c6..a44e3be0f 100644
--- a/libkdepim/tests/test_kregexp.cpp
+++ b/libkdepim/tests/test_kregexp.cpp
@@ -9,8 +9,8 @@ main()
// test for http://bugs.kde.org/show_bug.cgi?id=54886
KRegExp3 reg("^");
- QString res = reg.replace(QString::fromLatin1("Fun stuff"),
- QString::fromLatin1("[fun] "));
+ TQString res = reg.replace(TQString::fromLatin1("Fun stuff"),
+ TQString::fromLatin1("[fun] "));
kdDebug() << res << endl;
}
diff --git a/libkdepim/tests/testdateedit.cpp b/libkdepim/tests/testdateedit.cpp
index bc244f13f..993967cb6 100644
--- a/libkdepim/tests/testdateedit.cpp
+++ b/libkdepim/tests/testdateedit.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -31,19 +31,19 @@
#include "testdateedit.h"
-DateEdit::DateEdit( QWidget *parent, const char *name )
- : QWidget( parent, name )
+DateEdit::DateEdit( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
KDateEdit *edit = new KDateEdit( this );
layout->addWidget( edit );
- connect( edit, SIGNAL( dateChanged( const QDate& ) ),
- this, SLOT( dateChanged( const QDate& ) ) );
+ connect( edit, TQT_SIGNAL( dateChanged( const TQDate& ) ),
+ this, TQT_SLOT( dateChanged( const TQDate& ) ) );
}
-void DateEdit::dateChanged( const QDate &date )
+void DateEdit::dateChanged( const TQDate &date )
{
if ( date.isValid() )
qDebug( "%s", date.toString().latin1() );
diff --git a/libkdepim/tests/testdateedit.h b/libkdepim/tests/testdateedit.h
index d6eb14cd0..86a9ea4e8 100644
--- a/libkdepim/tests/testdateedit.h
+++ b/libkdepim/tests/testdateedit.h
@@ -22,17 +22,17 @@
#ifndef TESTDATEEDIT_H
#define TESTDATEEDIT_H
-#include <qwidget.h>
+#include <tqwidget.h>
class DateEdit : public QWidget
{
Q_OBJECT
public:
- DateEdit( QWidget *parent = 0, const char *name = 0 );
+ DateEdit( TQWidget *parent = 0, const char *name = 0 );
public slots:
- void dateChanged( const QDate& );
+ void dateChanged( const TQDate& );
};
#endif
diff --git a/libkdepim/tests/testdistrlist.cpp b/libkdepim/tests/testdistrlist.cpp
index 281c5835b..b446a5a39 100644
--- a/libkdepim/tests/testdistrlist.cpp
+++ b/libkdepim/tests/testdistrlist.cpp
@@ -31,8 +31,8 @@ using KPIM::DistributionList;
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
#include <stdio.h>
#include <stdlib.h>
@@ -43,7 +43,7 @@ int main(int argc, char *argv[])
{
// Use another directory than the real one, just to keep things clean
// KDEHOME needs to be writable though, for a ksycoca database
- setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kde-testdistrlist" ), true );
+ setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kde-testdistrlist" ), true );
setenv( "KDE_FORK_SLAVES", "yes", true ); // simpler, for the final cleanup
KApplication::disableAutoDcopRegistration();
@@ -94,12 +94,12 @@ void TestDistrList::runAll()
testDeleteList();
}
-bool TestDistrList::check(const QString& txt, QString a, QString b)
+bool TestDistrList::check(const TQString& txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -114,18 +114,18 @@ bool TestDistrList::check(const QString& txt, QString a, QString b)
// taken from KMail
#include <sys/types.h>
#include <dirent.h>
-static bool removeDirAndContentsRecursively( const QString & path )
+static bool removeDirAndContentsRecursively( const TQString & path )
{
kdDebug() << k_funcinfo << path << endl;
bool success = true;
- QDir d;
+ TQDir d;
d.setPath( path );
- d.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden );
+ d.setFilter( TQDir::Files | TQDir::Dirs | TQDir::Hidden );
const QFileInfoList *list = d.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ( (fi = it.current()) != 0 ) {
if( fi->isDir() && !fi->isSymLink() ) {
@@ -150,7 +150,7 @@ void TestDistrList::cleanup()
ab->clear();
KABC::StdAddressBook::close();
- QString kdehome = QFile::decodeName( getenv("KDEHOME") );
+ TQString kdehome = TQFile::decodeName( getenv("KDEHOME") );
KURL urlkdehome; urlkdehome.setPath( kdehome );
// don't use KIO::NetAccess here since it needs X
// KIO::NetAccess::del( urlkdehome, 0 )i;
@@ -225,16 +225,16 @@ void TestDistrList::testInsertEntry()
// Test entries()
DistributionList::Entry::List entries = dl.entries( ab );
- check( "entries count", QString::number( entries.count() ), "3" );
+ check( "entries count", TQString::number( entries.count() ), "3" );
check( "first entry", entries[0].addressee.name(), "addr1" );
- check( "first entry", entries[0].email, QString::null );
+ check( "first entry", entries[0].email, TQString::null );
check( "second entry", entries[1].addressee.name(), "addr2" );
check( "second entry", entries[1].email, "addr2-alternate@kde.org" );
check( "third entry", entries[2].addressee.name(), "addr2" );
check( "third entry", entries[2].email, "addr2@kde.org" );
// Test emails()
- QStringList emails = dl.emails( ab );
+ TQStringList emails = dl.emails( ab );
kdDebug() << emails << endl;
assert( emails.count() == 3 );
check( "first email", emails[0], "addr1 <addr1@kde.org>" );
@@ -252,22 +252,22 @@ void TestDistrList::testRemoveEntry()
DistributionList dl = DistributionList::findByName( ab, "foo" );
assert( !dl.isEmpty() );
DistributionList::Entry::List entries = dl.entries( ab );
- check( "entries count before removeEntry", QString::number( entries.count() ), "3" );
+ check( "entries count before removeEntry", TQString::number( entries.count() ), "3" );
// Removing an empty entry shouldn't do anything
dl.removeEntry( KABC::Addressee() );
- check( "entries count after removing empty entry", QString::number( dl.entries(ab).count() ), "3" );
+ check( "entries count after removing empty entry", TQString::number( dl.entries(ab).count() ), "3" );
KABC::Addressee addr1 = ab->findByName( "addr1" ).first();
assert( !addr1.isEmpty() );
// Removing an entry with the wrong email passed, shouldn't do anything
dl.removeEntry( addr1, "foo@foobar.com" );
- check( "entries count after removing entry with invalid email", QString::number( dl.entries(ab).count() ), "3" );
+ check( "entries count after removing entry with invalid email", TQString::number( dl.entries(ab).count() ), "3" );
// Now remove entry correctly
dl.removeEntry( addr1 );
- check( "removeEntry(addr1) worked", QString::number( dl.entries(ab).count() ), "2" );
- QStringList emails = dl.emails( ab );
+ check( "removeEntry(addr1) worked", TQString::number( dl.entries(ab).count() ), "2" );
+ TQStringList emails = dl.emails( ab );
assert( emails.count() == 2 );
check( "first email", emails[0], "addr2 <addr2-alternate@kde.org>" );
@@ -275,13 +275,13 @@ void TestDistrList::testRemoveEntry()
KABC::Addressee addr2 = ab->findByName( "addr2" ).first();
assert( !addr2.isEmpty() );
dl.removeEntry( addr2 );
- check( "entries count after removing entry with no email", QString::number( dl.entries(ab).count() ), "2" );
+ check( "entries count after removing entry with no email", TQString::number( dl.entries(ab).count() ), "2" );
// Now remove addr2 correctly
dl.removeEntry( addr2, "addr2@kde.org" );
- check( "entries count after removing addr2", QString::number( dl.entries(ab).count() ), "1" );
+ check( "entries count after removing addr2", TQString::number( dl.entries(ab).count() ), "1" );
dl.removeEntry( addr2, "addr2-alternate@kde.org" );
- check( "entries count after removing alternate addr2", QString::number( dl.entries(ab).count() ), "0" );
+ check( "entries count after removing alternate addr2", TQString::number( dl.entries(ab).count() ), "0" );
assert( dl.entries(ab).isEmpty() );
assert( dl.emails(ab).isEmpty() );
assert( DistributionList::isDistributionList( dl ) );
diff --git a/libkdepim/tests/testdistrlist.h b/libkdepim/tests/testdistrlist.h
index 0b2a055d2..782c3ec5f 100644
--- a/libkdepim/tests/testdistrlist.h
+++ b/libkdepim/tests/testdistrlist.h
@@ -19,7 +19,7 @@
#ifndef TESTDISTRLIST_H
#define TESTDISTRLIST_H
-#include <qobject.h>
+#include <tqobject.h>
class TestDistrList : public QObject
{
@@ -40,7 +40,7 @@ public:
void testDeleteList();
private:
- bool check(const QString& txt, QString a, QString b);
+ bool check(const TQString& txt, TQString a, TQString b);
};
#endif
diff --git a/libkdepim/tests/testlinklocator.cpp b/libkdepim/tests/testlinklocator.cpp
index b5678fe14..39383d9d1 100644
--- a/libkdepim/tests/testlinklocator.cpp
+++ b/libkdepim/tests/testlinklocator.cpp
@@ -28,7 +28,7 @@
#include <string.h>
#include <assert.h>
-static bool check(const QString& txt, const QString& a, const QString& b)
+static bool check(const TQString& txt, const TQString& a, const TQString& b)
{
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
@@ -40,9 +40,9 @@ static bool check(const QString& txt, const QString& a, const QString& b)
return true;
}
-static bool checkGetEmailAddress( const QString & input,
+static bool checkGetEmailAddress( const TQString & input,
int atPos,
- const QString & expRetVal,
+ const TQString & expRetVal,
bool allowBadAtPos = false )
{
if ( !allowBadAtPos && ( input[atPos] != '@' ) ) {
@@ -51,8 +51,8 @@ static bool checkGetEmailAddress( const QString & input,
exit(1);
}
LinkLocator ll( input, atPos );
- const QString retVal = ll.getEmailAddress();
- check( "getEmailAddress() \"" + input + "\", " + QString::number( atPos ),
+ const TQString retVal = ll.getEmailAddress();
+ check( "getEmailAddress() \"" + input + "\", " + TQString::number( atPos ),
retVal, expRetVal );
return true;
}
@@ -64,38 +64,38 @@ int main(int argc, char *argv[])
KApplication app( false, false );
// empty input
- checkGetEmailAddress( QString(), 0, QString(), true );
+ checkGetEmailAddress( TQString(), 0, TQString(), true );
// no '@' at scan position
- checkGetEmailAddress( "foo@bar.baz", 0, QString(), true );
+ checkGetEmailAddress( "foo@bar.baz", 0, TQString(), true );
// '@' in local part
- checkGetEmailAddress( "foo@bar@bar.baz", 7, QString() );
+ checkGetEmailAddress( "foo@bar@bar.baz", 7, TQString() );
// empty local part
- checkGetEmailAddress( "@bar.baz", 0, QString() );
- checkGetEmailAddress( ".@bar.baz", 1, QString() );
- checkGetEmailAddress( " @bar.baz", 1, QString() );
- checkGetEmailAddress( ".!#$%&'*+-/=?^_`{|}~@bar.baz", strlen(".!#$%&'*+-/=?^_`{|}~"), QString() );
+ checkGetEmailAddress( "@bar.baz", 0, TQString() );
+ checkGetEmailAddress( ".@bar.baz", 1, TQString() );
+ checkGetEmailAddress( " @bar.baz", 1, TQString() );
+ checkGetEmailAddress( ".!#$%&'*+-/=?^_`{|}~@bar.baz", strlen(".!#$%&'*+-/=?^_`{|}~"), TQString() );
// allowed special chars in local part of address
checkGetEmailAddress( "a.!#$%&'*+-/=?^_`{|}~@bar.baz", strlen("a.!#$%&'*+-/=?^_`{|}~"), "a.!#$%&'*+-/=?^_`{|}~@bar.baz" );
// '@' in domain part
- checkGetEmailAddress( "foo@bar@bar.baz", 3, QString() );
+ checkGetEmailAddress( "foo@bar@bar.baz", 3, TQString() );
// domain part without dot
- checkGetEmailAddress( "foo@bar", 3, QString() );
- checkGetEmailAddress( "foo@bar.", 3, QString() );
- checkGetEmailAddress( ".foo@bar", 4, QString() );
- checkGetEmailAddress( "foo@bar ", 3, QString() );
- checkGetEmailAddress( " foo@bar", 4, QString() );
- checkGetEmailAddress( "foo@bar-bar", 3, QString() );
+ checkGetEmailAddress( "foo@bar", 3, TQString() );
+ checkGetEmailAddress( "foo@bar.", 3, TQString() );
+ checkGetEmailAddress( ".foo@bar", 4, TQString() );
+ checkGetEmailAddress( "foo@bar ", 3, TQString() );
+ checkGetEmailAddress( " foo@bar", 4, TQString() );
+ checkGetEmailAddress( "foo@bar-bar", 3, TQString() );
// empty domain part
- checkGetEmailAddress( "foo@", 3, QString() );
- checkGetEmailAddress( "foo@.", 3, QString() );
- checkGetEmailAddress( "foo@-", 3, QString() );
+ checkGetEmailAddress( "foo@", 3, TQString() );
+ checkGetEmailAddress( "foo@.", 3, TQString() );
+ checkGetEmailAddress( "foo@-", 3, TQString() );
// simple address
checkGetEmailAddress( "foo@bar.baz", 3, "foo@bar.baz" );
diff --git a/libkdepim/tests/testutf7decoder.cpp b/libkdepim/tests/testutf7decoder.cpp
index 39ded9201..f6b8f4ada 100644
--- a/libkdepim/tests/testutf7decoder.cpp
+++ b/libkdepim/tests/testutf7decoder.cpp
@@ -1,6 +1,6 @@
#include "qutf7codec.h"
#include "qutf7codec.cpp"
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <string.h>
#include <assert.h>
@@ -8,19 +8,19 @@ int main( int argc, char * argv[] ) {
if ( argc == 1 ) {
(void)new QUtf7Codec;
- QTextCodec * codec = QTextCodec::codecForName("utf-7");
+ TQTextCodec * codec = TQTextCodec::codecForName("utf-7");
assert(codec);
- QTextIStream my_cin(stdin);
+ TQTextIStream my_cin(stdin);
my_cin.setCodec(codec);
- QTextOStream my_cout(stdout);
+ TQTextOStream my_cout(stdout);
- QString buffer = my_cin.read();
+ TQString buffer = my_cin.read();
my_cout << buffer;
} else {
qWarning("usage: testutf7decoder string_to_decode\n");
}
- QTextCodec::deleteAllCodecs();
+ TQTextCodec::deleteAllCodecs();
}
diff --git a/libkdepim/tests/testutf7encoder.cpp b/libkdepim/tests/testutf7encoder.cpp
index 2d635744e..925bab21e 100644
--- a/libkdepim/tests/testutf7encoder.cpp
+++ b/libkdepim/tests/testutf7encoder.cpp
@@ -7,9 +7,9 @@ void main( int argc, char * argv[] ) {
if ( argc == 2 ) {
QUtf7Codec * codec = new QUtf7Codec;
- QTextEncoder * enc;
+ TQTextEncoder * enc;
- QString arg = QString::fromLatin1( argv[1] );
+ TQString arg = TQString::fromLatin1( argv[1] );
int len;
cout << "Original string:\n"
@@ -31,7 +31,7 @@ void main( int argc, char * argv[] ) {
for ( int i = 0 ; i < arg.length() ; i++ ) {
len = 1;
- cout << (enc->fromUnicode( QString(arg[i]), len )).data();
+ cout << (enc->fromUnicode( TQString(arg[i]), len )).data();
}
cout << "\n" << endl;
@@ -79,7 +79,7 @@ void main( int argc, char * argv[] ) {
for ( int i = 0 ; i < arg.length() ; i++ ) {
len = 1;
- cout << (enc->fromUnicode( QString(arg[i]), len )).data();
+ cout << (enc->fromUnicode( TQString(arg[i]), len )).data();
}
cout << "\n" << endl;
diff --git a/libkdepim/tests/testutf7encoder2.cpp b/libkdepim/tests/testutf7encoder2.cpp
index 0661d63c1..57c195662 100644
--- a/libkdepim/tests/testutf7encoder2.cpp
+++ b/libkdepim/tests/testutf7encoder2.cpp
@@ -1,6 +1,6 @@
#include "qutf7codec.h"
#include "qutf7codec.cpp"
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <string.h>
#include <assert.h>
#include <iostream.h>
@@ -9,27 +9,27 @@ int main( int argc, char * argv[] ) {
if ( argc == 1 ) {
(void)new QUtf7Codec;
- QTextCodec * codec = QTextCodec::codecForName("utf-7");
+ TQTextCodec * codec = TQTextCodec::codecForName("utf-7");
assert(codec);
- QTextIStream my_cin(stdin);
+ TQTextIStream my_cin(stdin);
- QTextOStream my_cout(stdout);
+ TQTextOStream my_cout(stdout);
my_cout.setCodec(codec);
- QString buffer = my_cin.read();
+ TQString buffer = my_cin.read();
// qDebug("buffer == " + buffer);
#ifdef USE_STREAM
my_cout << buffer << endl;
#else
- QTextEncoder * enc = codec->makeEncoder();
+ TQTextEncoder * enc = codec->makeEncoder();
#ifdef CHAR_WISE
int len;
for ( int i = 0 ; i < buffer.length() ; i++ ) {
len = 1;
- cout << (enc->fromUnicode(QString(buffer[i]),len)).data();
+ cout << (enc->fromUnicode(TQString(buffer[i]),len)).data();
}
cout << endl;
#else
@@ -41,5 +41,5 @@ int main( int argc, char * argv[] ) {
} else {
qWarning("usage: testutf7encoder2 < infile > outfile\n");
}
- QTextCodec::deleteAllCodecs();
+ TQTextCodec::deleteAllCodecs();
}
diff --git a/libkdepim/tests/testwizard.cpp b/libkdepim/tests/testwizard.cpp
index ce4038909..8db1dd42d 100644
--- a/libkdepim/tests/testwizard.cpp
+++ b/libkdepim/tests/testwizard.cpp
@@ -29,8 +29,8 @@
#include <klocale.h>
#include <kcmdlineargs.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
class TestConfigWizard : public KConfigWizard
{
@@ -39,15 +39,15 @@ class TestConfigWizard : public KConfigWizard
KConfigWizard( new KConfigPropagator( MyConfig::self(),
"propagator_test.kcfg" ) )
{
- QFrame *page = createWizardPage( "My Wizard Page" );
- QBoxLayout *topLayout = new QVBoxLayout( page );
+ TQFrame *page = createWizardPage( "My Wizard Page" );
+ TQBoxLayout *topLayout = new TQVBoxLayout( page );
- mFixKMailCheckBox = new QCheckBox( i18n("Fix KMail"), page );
+ mFixKMailCheckBox = new TQCheckBox( i18n("Fix KMail"), page );
topLayout->addWidget( mFixKMailCheckBox );
mFixKMailCheckBox->setChecked( MyConfig::fixKMail() );
- mBreakKMailCheckBox = new QCheckBox( i18n("Break KMail"), page );
+ mBreakKMailCheckBox = new TQCheckBox( i18n("Break KMail"), page );
topLayout->addWidget( mBreakKMailCheckBox );
mBreakKMailCheckBox->setChecked( MyConfig::breakKMail() );
@@ -71,8 +71,8 @@ class TestConfigWizard : public KConfigWizard
}
private:
- QCheckBox *mFixKMailCheckBox;
- QCheckBox *mBreakKMailCheckBox;
+ TQCheckBox *mFixKMailCheckBox;
+ TQCheckBox *mBreakKMailCheckBox;
};
static const KCmdLineOptions options[] =
diff --git a/libkdepim/weaver.cpp b/libkdepim/weaver.cpp
index fa3ea03ca..20e44df42 100644
--- a/libkdepim/weaver.cpp
+++ b/libkdepim/weaver.cpp
@@ -17,8 +17,8 @@ extern "C" {
#include <signal.h>
}
-#include <qevent.h>
-#include <qapplication.h>
+#include <tqevent.h>
+#include <tqapplication.h>
#include "weaver.h"
@@ -28,10 +28,10 @@ namespace ThreadWeaver {
bool Debug = true;
int DebugLevel = 2;
- Job::Job (QObject* parent, const char* name)
- : QObject (parent, name),
+ Job::Job (TQObject* parent, const char* name)
+ : TQObject (parent, name),
m_finished (false),
- m_mutex (new QMutex (true) ),
+ m_mutex (new TQMutex (true) ),
m_thread (0)
{
}
@@ -66,19 +66,19 @@ namespace ThreadWeaver {
Thread *Job::thread ()
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
return m_thread;
}
bool Job::isFinished() const
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
return m_finished;
}
void Job::setFinished(bool status)
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
m_finished = status;
}
@@ -132,7 +132,7 @@ namespace ThreadWeaver {
void Job::wakeAPR ()
{
- QMutexLocker l(m_mutex);
+ TQMutexLocker l(m_mutex);
if ( m_wc!=0 )
{
m_wc->wakeOne ();
@@ -141,10 +141,10 @@ namespace ThreadWeaver {
}
}
- const int Event::Type = QEvent::User + 1000;
+ const int Event::Type = TQEvent::User + 1000;
Event::Event ( Action action, Thread *thread, Job *job)
- : QCustomEvent ( type () ),
+ : TQCustomEvent ( type () ),
m_action (action),
m_thread (thread),
m_job (job)
@@ -179,7 +179,7 @@ namespace ThreadWeaver {
unsigned int Thread::sm_Id;
Thread::Thread (Weaver *parent)
- : QThread (),
+ : TQThread (),
m_parent ( parent ),
m_id ( makeId() )
{
@@ -191,8 +191,8 @@ namespace ThreadWeaver {
unsigned int Thread::makeId()
{
- static QMutex mutex;
- QMutexLocker l (&mutex);
+ static TQMutex mutex;
+ TQMutexLocker l (&mutex);
return ++sm_Id;
}
@@ -234,19 +234,19 @@ namespace ThreadWeaver {
void Thread::msleep(unsigned long msec)
{
- QThread::msleep(msec);
+ TQThread::msleep(msec);
}
- Weaver::Weaver(QObject* parent, const char* name,
+ Weaver::Weaver(TQObject* parent, const char* name,
int inventoryMin, int inventoryMax)
- : QObject(parent, name),
+ : TQObject(parent, name),
m_active(0),
m_inventoryMin(inventoryMin),
m_inventoryMax(inventoryMax),
m_shuttingDown(false),
m_running (false),
m_suspend (false),
- m_mutex ( new QMutex(true) )
+ m_mutex ( new TQMutex(true) )
{
lock();
@@ -320,7 +320,7 @@ namespace ThreadWeaver {
int Weaver::threads () const
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
return m_inventory.count ();
}
@@ -336,7 +336,7 @@ namespace ThreadWeaver {
assignJobs();
}
- void Weaver::enqueue (QPtrList <Job> jobs)
+ void Weaver::enqueue (TQPtrList <Job> jobs)
{
lock();
@@ -352,13 +352,13 @@ namespace ThreadWeaver {
bool Weaver::dequeue ( Job* job )
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
return m_assignments.remove (job);
}
void Weaver::dequeue ()
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
m_assignments.clear();
}
@@ -389,9 +389,9 @@ namespace ThreadWeaver {
m_jobAvailable.wakeAll();
}
- bool Weaver::event (QEvent *e )
+ bool Weaver::event (TQEvent *e )
{
- if ( e->type() >= QEvent::User )
+ if ( e->type() >= TQEvent::User )
{
if ( e->type() == Event::type() )
@@ -438,19 +438,19 @@ namespace ThreadWeaver {
return true;
} else {
// others - please make sure we are a QObject!
- return QObject::event ( e );
+ return TQObject::event ( e );
}
}
void Weaver::post (Event::Action a, Thread* t, Job* j)
{
Event *e = new Event ( a, t, j);
- QApplication::postEvent (this, e);
+ TQApplication::postEvent (this, e);
}
bool Weaver::isEmpty() const
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
return m_assignments.count()==0;
}
@@ -524,13 +524,13 @@ namespace ThreadWeaver {
int Weaver::queueLength()
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
return m_assignments.count();
}
bool Weaver::isIdle () const
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
return isEmpty() && m_active == 0;
}
diff --git a/libkdepim/weaver.h b/libkdepim/weaver.h
index 00c624d84..929714dfb 100644
--- a/libkdepim/weaver.h
+++ b/libkdepim/weaver.h
@@ -23,12 +23,12 @@ extern "C"
#include <stdio.h>
}
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qthread.h>
-#include <qwaitcondition.h>
-#include <qmutex.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqthread.h>
+#include <tqwaitcondition.h>
+#include <tqmutex.h>
+#include <tqevent.h>
#include <kdepimmacros.h>
@@ -70,8 +70,8 @@ namespace ThreadWeaver {
{
if ( Debug == true && ( severity<=DebugLevel || severity == 0) )
{
- static QMutex mutex;
- QString text;
+ static TQMutex mutex;
+ TQString text;
mutex.lock();
va_list ap;
@@ -166,7 +166,7 @@ namespace ThreadWeaver {
Q_OBJECT
public:
/** Construct a Job object. */
- Job(QObject* parent=0, const char* name=0);
+ Job(TQObject* parent=0, const char* name=0);
/** Destructor. */
virtual ~Job();
@@ -235,11 +235,11 @@ namespace ThreadWeaver {
bool m_finished;
- QMutex *m_mutex;
+ TQMutex *m_mutex;
Thread * m_thread;
- QWaitCondition *m_wc;
+ TQWaitCondition *m_wc;
};
class Weaver;
@@ -268,7 +268,7 @@ namespace ThreadWeaver {
*/
void run();
- /* Provide the msleep() method (protected in QThread) to be
+ /* Provide the msleep() method (protected in TQThread) to be
available for executed jobs. */
void msleep(unsigned long msec);
@@ -297,7 +297,7 @@ namespace ThreadWeaver {
{
Q_OBJECT
public:
- Weaver (QObject* parent=0, const char* name=0,
+ Weaver (TQObject* parent=0, const char* name=0,
int inventoryMin = 4, // minimal number of provided threads
int inventoryMax = 32); // maximum number of provided threads
virtual ~Weaver ();
@@ -311,7 +311,7 @@ namespace ThreadWeaver {
them. Otherwise, when enqueueing your jobs
individually, there is a chance that you receive more than
one finished signal. */
- void enqueue (QPtrList<Job> jobs);
+ void enqueue (TQPtrList<Job> jobs);
/** Remove a job from the queue.
If the job qas queued but not started so far, it is simple
removed from the queue. For now, it is unsupported to
@@ -410,11 +410,11 @@ namespace ThreadWeaver {
void assignJobs();
/** Check incoming events for user defined ones. The threads use user
defined events to communicate with the Weaver. */
- bool event ( QEvent* );
+ bool event ( TQEvent* );
/** The thread inventory. */
- QPtrList<Thread> m_inventory;
+ TQPtrList<Thread> m_inventory;
/** The job queue. */
- QPtrList<Job> m_assignments;
+ TQPtrList<Job> m_assignments;
/** The number of jobs that are assigned to the worker
threads, but not finished. */
int m_active;
@@ -423,9 +423,9 @@ namespace ThreadWeaver {
/** Stored setting . */
int m_inventoryMax;
/** Wait condition all idle or done threads wait for. */
- QWaitCondition m_jobAvailable;
+ TQWaitCondition m_jobAvailable;
/** Wait for a job to finish. */
- QWaitCondition m_jobFinished;
+ TQWaitCondition m_jobFinished;
/** Indicates if the weaver is shutting down and exiting it's
threads. */
bool m_shuttingDown;
@@ -441,7 +441,7 @@ namespace ThreadWeaver {
bool m_suspend;
private:
/** Mutex to serialize operations. */
- QMutex *m_mutex;
+ TQMutex *m_mutex;
};
} // namespace ThreadWeaver
} // namespace KPIM
diff --git a/libkdepim/weaverextensions.cpp b/libkdepim/weaverextensions.cpp
index 6e19d2e78..cb8fe48f2 100644
--- a/libkdepim/weaverextensions.cpp
+++ b/libkdepim/weaverextensions.cpp
@@ -19,21 +19,21 @@
namespace KPIM {
namespace ThreadWeaver {
- WeaverExtension::WeaverExtension ( QObject *parent, const char *name)
- : QObject (parent, name)
+ WeaverExtension::WeaverExtension ( TQObject *parent, const char *name)
+ : TQObject (parent, name)
{
}
void WeaverExtension::attach (Weaver *w)
{
- connect (w, SIGNAL (threadCreated (Thread *) ),
- SLOT (threadCreated (Thread *) ) );
- connect (w, SIGNAL (threadDestroyed (Thread *) ),
- SLOT (threadDestroyed (Thread *) ) );
- connect (w, SIGNAL (threadBusy (Thread *) ),
- SLOT (threadBusy (Thread *) ) );
- connect (w, SIGNAL (threadSuspended (Thread *) ),
- SLOT (threadSuspended (Thread *) ) );
+ connect (w, TQT_SIGNAL (threadCreated (Thread *) ),
+ TQT_SLOT (threadCreated (Thread *) ) );
+ connect (w, TQT_SIGNAL (threadDestroyed (Thread *) ),
+ TQT_SLOT (threadDestroyed (Thread *) ) );
+ connect (w, TQT_SIGNAL (threadBusy (Thread *) ),
+ TQT_SLOT (threadBusy (Thread *) ) );
+ connect (w, TQT_SIGNAL (threadSuspended (Thread *) ),
+ TQT_SLOT (threadSuspended (Thread *) ) );
}
WeaverExtension::~WeaverExtension()
diff --git a/libkdepim/weaverextensions.h b/libkdepim/weaverextensions.h
index 5f19743ba..f737f8a6d 100644
--- a/libkdepim/weaverextensions.h
+++ b/libkdepim/weaverextensions.h
@@ -16,7 +16,7 @@
#ifndef WEAVEREXTENSIONS_H
#define WEAVEREXTENSIONS_H
-#include <qobject.h>
+#include <tqobject.h>
namespace KPIM {
namespace ThreadWeaver {
@@ -34,7 +34,7 @@ namespace ThreadWeaver {
{
Q_OBJECT
public:
- WeaverExtension ( QObject *parent = 0, const char *name = 0);
+ WeaverExtension ( TQObject *parent = 0, const char *name = 0);
/** Attach() is a convenience method that will connect all our
slots to signals emitted by the weaver. It is also possible to
avoid attach() and only connect necessary signals. */
diff --git a/libkdepim/weaverlogger.cpp b/libkdepim/weaverlogger.cpp
index 8aec18476..a91d505e3 100644
--- a/libkdepim/weaverlogger.cpp
+++ b/libkdepim/weaverlogger.cpp
@@ -21,7 +21,7 @@ namespace ThreadWeaver {
extern void debug(int severity, const char * cformat, ...);
- WeaverThreadLogger::WeaverThreadLogger( QObject *parent, const char *name)
+ WeaverThreadLogger::WeaverThreadLogger( TQObject *parent, const char *name)
: WeaverExtension (parent, name)
{
}
diff --git a/libkdepim/weaverlogger.h b/libkdepim/weaverlogger.h
index 47d116380..c0d001b99 100644
--- a/libkdepim/weaverlogger.h
+++ b/libkdepim/weaverlogger.h
@@ -27,7 +27,7 @@ namespace ThreadWeaver {
{
Q_OBJECT
public:
- WeaverThreadLogger( QObject *parent = 0, const char *name = 0);
+ WeaverThreadLogger( TQObject *parent = 0, const char *name = 0);
~WeaverThreadLogger();
void threadCreated (Thread *);
void threadDestroyed (Thread *);