summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/kmail
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 /kontact/plugins/kmail
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 'kontact/plugins/kmail')
-rw-r--r--kontact/plugins/kmail/kcmkmailsummary.cpp44
-rw-r--r--kontact/plugins/kmail/kcmkmailsummary.h8
-rw-r--r--kontact/plugins/kmail/kmail_plugin.cpp36
-rw-r--r--kontact/plugins/kmail/kmail_plugin.h20
-rw-r--r--kontact/plugins/kmail/summarywidget.cpp58
-rw-r--r--kontact/plugins/kmail/summarywidget.h20
6 files changed, 93 insertions, 93 deletions
diff --git a/kontact/plugins/kmail/kcmkmailsummary.cpp b/kontact/plugins/kmail/kcmkmailsummary.cpp
index 02627c0f..656ffe4e 100644
--- a/kontact/plugins/kmail/kcmkmailsummary.cpp
+++ b/kontact/plugins/kmail/kcmkmailsummary.cpp
@@ -21,8 +21,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
#include <dcopref.h>
@@ -41,19 +41,19 @@
extern "C"
{
- KDE_EXPORT KCModule *create_kmailsummary( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_kmailsummary( TQWidget *parent, const char * )
{
return new KCMKMailSummary( parent, "kcmkmailsummary" );
}
}
-KCMKMailSummary::KCMKMailSummary( QWidget *parent, const char *name )
+KCMKMailSummary::KCMKMailSummary( TQWidget *parent, const char *name )
: KCModule( parent, name )
{
initGUI();
- connect( mFolderView, SIGNAL( clicked( QListViewItem* ) ), SLOT( modified() ) );
- connect( mFullPath, SIGNAL( toggled( bool ) ), SLOT( modified() ) );
+ connect( mFolderView, TQT_SIGNAL( clicked( TQListViewItem* ) ), TQT_SLOT( modified() ) );
+ connect( mFullPath, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( modified() ) );
KAcceleratorManager::manage( this );
@@ -75,7 +75,7 @@ void KCMKMailSummary::modified()
void KCMKMailSummary::initGUI()
{
- QVBoxLayout *layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
mFolderView = new KListView( this );
mFolderView->setRootIsDecorated( true );
@@ -83,7 +83,7 @@ void KCMKMailSummary::initGUI()
mFolderView->addColumn( i18n( "Summary" ) );
- mFullPath = new QCheckBox( i18n( "Show full path for folders" ), this );
+ mFullPath = new TQCheckBox( i18n( "Show full path for folders" ), this );
layout->addWidget( mFolderView );
layout->addWidget( mFullPath );
@@ -93,32 +93,32 @@ void KCMKMailSummary::initFolders()
{
DCOPRef kmail( "kmail", "KMailIface" );
- QStringList folderList;
+ TQStringList folderList;
kmail.call( "folderList" ).get( folderList );
mFolderView->clear();
mFolderMap.clear();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = folderList.begin(); it != folderList.end(); ++it ) {
- QString displayName;
+ TQString displayName;
if ( (*it) == "/Local" )
displayName = i18n( "prefix for local folders", "Local" );
else {
- DCOPRef folderRef = kmail.call( "getFolder(QString)", *it );
+ DCOPRef folderRef = kmail.call( "getFolder(TQString)", *it );
folderRef.call( "displayName()" ).get( displayName );
}
if ( (*it).contains( '/' ) == 1 ) {
if ( mFolderMap.find( *it ) == mFolderMap.end() )
- mFolderMap.insert( *it, new QListViewItem( mFolderView,
+ mFolderMap.insert( *it, new TQListViewItem( mFolderView,
displayName ) );
} else {
const int pos = (*it).findRev( '/' );
- const QString parentFolder = (*it).left( pos );
+ const TQString parentFolder = (*it).left( pos );
mFolderMap.insert( *it,
- new QCheckListItem( mFolderMap[ parentFolder ],
+ new TQCheckListItem( mFolderMap[ parentFolder ],
displayName,
- QCheckListItem::CheckBox ) );
+ TQCheckListItem::CheckBox ) );
}
}
}
@@ -128,15 +128,15 @@ void KCMKMailSummary::loadFolders()
KConfig config( "kcmkmailsummaryrc" );
config.setGroup( "General" );
- QStringList folders;
+ TQStringList folders;
if ( !config.hasKey( "ActiveFolders" ) )
folders << "/Local/inbox";
else
folders = config.readListEntry( "ActiveFolders" );
- QMap<QString, QListViewItem*>::Iterator it;
+ TQMap<TQString, TQListViewItem*>::Iterator it;
for ( it = mFolderMap.begin(); it != mFolderMap.end(); ++it ) {
- if ( QCheckListItem *qli = dynamic_cast<QCheckListItem*>( it.data() ) ) {
+ if ( TQCheckListItem *qli = dynamic_cast<TQCheckListItem*>( it.data() ) ) {
if ( folders.contains( it.key() ) ) {
qli->setOn( true );
mFolderView->ensureItemVisible( it.data() );
@@ -153,11 +153,11 @@ void KCMKMailSummary::storeFolders()
KConfig config( "kcmkmailsummaryrc" );
config.setGroup( "General" );
- QStringList folders;
+ TQStringList folders;
- QMap<QString, QListViewItem*>::Iterator it;
+ TQMap<TQString, TQListViewItem*>::Iterator it;
for ( it = mFolderMap.begin(); it != mFolderMap.end(); ++it )
- if ( QCheckListItem *qli = dynamic_cast<QCheckListItem*>( it.data() ) )
+ if ( TQCheckListItem *qli = dynamic_cast<TQCheckListItem*>( it.data() ) )
if ( qli->isOn() )
folders.append( it.key() );
diff --git a/kontact/plugins/kmail/kcmkmailsummary.h b/kontact/plugins/kmail/kcmkmailsummary.h
index e2959dea..da43a0b2 100644
--- a/kontact/plugins/kmail/kcmkmailsummary.h
+++ b/kontact/plugins/kmail/kcmkmailsummary.h
@@ -24,7 +24,7 @@
#ifndef KCMKMAILSUMMARY_H
#define KCMKMAILSUMMARY_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kcmodule.h>
@@ -38,7 +38,7 @@ class KCMKMailSummary : public KCModule
Q_OBJECT
public:
- KCMKMailSummary( QWidget *parent = 0, const char *name = 0 );
+ KCMKMailSummary( TQWidget *parent = 0, const char *name = 0 );
virtual void load();
virtual void save();
@@ -54,8 +54,8 @@ class KCMKMailSummary : public KCModule
void storeFolders();
KListView *mFolderView;
- QCheckBox *mFullPath;
- QMap<QString, QListViewItem*> mFolderMap;
+ TQCheckBox *mFullPath;
+ TQMap<TQString, TQListViewItem*> mFolderMap;
};
#endif
diff --git a/kontact/plugins/kmail/kmail_plugin.cpp b/kontact/plugins/kmail/kmail_plugin.cpp
index 3d9f45be..5a879747 100644
--- a/kontact/plugins/kmail/kmail_plugin.cpp
+++ b/kontact/plugins/kmail/kmail_plugin.cpp
@@ -21,7 +21,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kaction.h>
#include <kapplication.h>
@@ -55,35 +55,35 @@ typedef KGenericFactory<KMailPlugin, Kontact::Core> KMailPluginFactory;
K_EXPORT_COMPONENT_FACTORY( libkontact_kmailplugin,
KMailPluginFactory( "kontact_kmailplugin" ) )
-KMailPlugin::KMailPlugin(Kontact::Core *core, const char *, const QStringList& )
+KMailPlugin::KMailPlugin(Kontact::Core *core, const char *, const TQStringList& )
: Kontact::Plugin( core, core, "kmail" ),
mStub( 0 )
{
setInstance( KMailPluginFactory::instance() );
insertNewAction( new KAction( i18n( "New Message..." ), "mail_new",
- CTRL+SHIFT+Key_M, this, SLOT( slotNewMail() ), actionCollection(),
+ CTRL+SHIFT+Key_M, this, TQT_SLOT( slotNewMail() ), actionCollection(),
"new_mail" ) );
insertSyncAction( new KAction( i18n( "Synchronize Mail" ), "reload",
- 0, this, SLOT( slotSyncFolders() ), actionCollection(),
+ 0, this, TQT_SLOT( slotSyncFolders() ), actionCollection(),
"sync_mail" ) );
mUniqueAppWatcher = new Kontact::UniqueAppWatcher(
new Kontact::UniqueAppHandlerFactory<KMailUniqueAppHandler>(), this );
}
-bool KMailPlugin::canDecodeDrag( QMimeSource *qms )
+bool KMailPlugin::canDecodeDrag( TQMimeSource *qms )
{
return ( ICalDrag::canDecode( qms ) ||
VCalDrag::canDecode( qms ) ||
KVCardDrag::canDecode( qms ) );
}
-void KMailPlugin::processDropEvent( QDropEvent * de )
+void KMailPlugin::processDropEvent( TQDropEvent * de )
{
kdDebug() << k_funcinfo << endl;
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
KABC::Addressee::List list;
if ( VCalDrag::decode( de, &cal ) || ICalDrag::decode( de, &cal ) ) {
@@ -93,7 +93,7 @@ void KMailPlugin::processDropEvent( QDropEvent * de )
}
else if ( KVCardDrag::decode( de, list ) ) {
KABC::Addressee::List::Iterator it;
- QStringList to;
+ TQStringList to;
for ( it = list.begin(); it != list.end(); ++it ) {
to.append( ( *it ).fullEmail() );
}
@@ -114,7 +114,7 @@ void KMailPlugin::openComposer( const KURL& attach )
}
}
-void KMailPlugin::openComposer( const QString& to )
+void KMailPlugin::openComposer( const TQString& to )
{
(void) part(); // ensure part is loaded
Q_ASSERT( mStub );
@@ -125,7 +125,7 @@ void KMailPlugin::openComposer( const QString& to )
void KMailPlugin::slotNewMail()
{
- openComposer( QString::null );
+ openComposer( TQString::null );
}
void KMailPlugin::slotSyncFolders()
@@ -138,7 +138,7 @@ KMailPlugin::~KMailPlugin()
{
}
-bool KMailPlugin::createDCOPInterface( const QString& serviceType )
+bool KMailPlugin::createDCOPInterface( const TQString& serviceType )
{
if ( serviceType == "DCOP/ResourceBackend/IMAP" ) {
if ( part() )
@@ -148,9 +148,9 @@ bool KMailPlugin::createDCOPInterface( const QString& serviceType )
return false;
}
-QString KMailPlugin::tipFile() const
+TQString KMailPlugin::tipFile() const
{
- QString file = ::locate("data", "kmail/tips");
+ TQString file = ::locate("data", "kmail/tips");
return file;
}
@@ -164,9 +164,9 @@ KParts::ReadOnlyPart* KMailPlugin::createPart()
return part;
}
-QStringList KMailPlugin::invisibleToolbarActions() const
+TQStringList KMailPlugin::invisibleToolbarActions() const
{
- return QStringList( "new_message" );
+ return TQStringList( "new_message" );
}
bool KMailPlugin::isRunningStandalone()
@@ -174,7 +174,7 @@ bool KMailPlugin::isRunningStandalone()
return mUniqueAppWatcher->isRunningStandalone();
}
-Kontact::Summary *KMailPlugin::createSummaryWidget( QWidget *parent )
+Kontact::Summary *KMailPlugin::createSummaryWidget( TQWidget *parent )
{
return new SummaryWidget( this, parent );
}
@@ -208,12 +208,12 @@ bool KMailPlugin::queryClose() const {
return canClose;
}
-void KMailPlugin::loadProfile( const QString& profileDirectory ) {
+void KMailPlugin::loadProfile( const TQString& profileDirectory ) {
DCOPRef ref( "kmail", "KMailIface" );
ref.send( "loadProfile", profileDirectory );
}
-void KMailPlugin::saveToProfile( const QString& profileDirectory ) {
+void KMailPlugin::saveToProfile( const TQString& profileDirectory ) {
DCOPRef ref( "kmail", "KMailIface" );
ref.send( "saveToProfile", profileDirectory );
}
diff --git a/kontact/plugins/kmail/kmail_plugin.h b/kontact/plugins/kmail/kmail_plugin.h
index 0d601386..73bb361b 100644
--- a/kontact/plugins/kmail/kmail_plugin.h
+++ b/kontact/plugins/kmail/kmail_plugin.h
@@ -48,30 +48,30 @@ class KMailPlugin : public Kontact::Plugin
Q_OBJECT
public:
- KMailPlugin( Kontact::Core *core, const char *name, const QStringList& );
+ KMailPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~KMailPlugin();
virtual bool isRunningStandalone();
- virtual bool createDCOPInterface( const QString& serviceType );
- virtual Kontact::Summary *createSummaryWidget( QWidget *parent );
- virtual QString tipFile() const;
+ virtual bool createDCOPInterface( const TQString& serviceType );
+ virtual Kontact::Summary *createSummaryWidget( TQWidget *parent );
+ virtual TQString tipFile() const;
int weight() const { return 200; }
- virtual QStringList invisibleToolbarActions() const;
+ virtual TQStringList invisibleToolbarActions() const;
virtual bool queryClose() const;
//override
- void loadProfile( const QString& profileDirectory );
+ void loadProfile( const TQString& profileDirectory );
//override
- void saveToProfile( const QString& profileDirectory );
+ void saveToProfile( const TQString& profileDirectory );
protected:
virtual KParts::ReadOnlyPart* createPart();
void openComposer( const KURL& = KURL() );
- void openComposer( const QString& to );
- bool canDecodeDrag( QMimeSource * );
- void processDropEvent( QDropEvent * );
+ void openComposer( const TQString& to );
+ bool canDecodeDrag( TQMimeSource * );
+ void processDropEvent( TQDropEvent * );
protected slots:
diff --git a/kontact/plugins/kmail/summarywidget.cpp b/kontact/plugins/kmail/summarywidget.cpp
index 79f2f465..43c1e2cb 100644
--- a/kontact/plugins/kmail/summarywidget.cpp
+++ b/kontact/plugins/kmail/summarywidget.cpp
@@ -22,8 +22,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <dcopref.h>
#include <kapplication.h>
@@ -41,17 +41,17 @@
#include <time.h>
-SummaryWidget::SummaryWidget( Kontact::Plugin *plugin, QWidget *parent, const char *name )
+SummaryWidget::SummaryWidget( Kontact::Plugin *plugin, TQWidget *parent, const char *name )
: Kontact::Summary( parent, name ),
- DCOPObject( QCString("MailSummary") ),
+ DCOPObject( TQCString("MailSummary") ),
mPlugin( plugin )
{
- QVBoxLayout *mainLayout = new QVBoxLayout( this, 3, 3 );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 3, 3 );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_mail", KIcon::Desktop,
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_mail", KIcon::Desktop,
KIcon::SizeMedium );
- QWidget *header = createHeader(this, icon, i18n("E-Mail"));
- mLayout = new QGridLayout( 1, 3, 3 );
+ TQWidget *header = createHeader(this, icon, i18n("E-Mail"));
+ mLayout = new TQGridLayout( 1, 3, 3 );
mainLayout->addWidget(header);
mainLayout->addLayout(mLayout);
@@ -61,16 +61,16 @@ SummaryWidget::SummaryWidget( Kontact::Plugin *plugin, QWidget *parent, const ch
false );
}
-void SummaryWidget::selectFolder( const QString& folder )
+void SummaryWidget::selectFolder( const TQString& folder )
{
if ( mPlugin->isRunningStandalone() )
mPlugin->bringToForeground();
else
mPlugin->core()->selectPlugin( mPlugin );
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << folder;
- emitDCOPSignal( "kmailSelectFolder(QString)", data );
+ emitDCOPSignal( "kmailSelectFolder(TQString)", data );
}
void SummaryWidget::updateSummary( bool )
@@ -88,7 +88,7 @@ void SummaryWidget::slotUnreadCountChanged()
DCOPRef kmail( "kmail", "KMailIface" );
DCOPReply reply = kmail.call( "folderList" );
if ( reply.isValid() ) {
- QStringList folderList = reply;
+ TQStringList folderList = reply;
updateFolderList( folderList );
}
else {
@@ -98,7 +98,7 @@ void SummaryWidget::slotUnreadCountChanged()
mTimeOfLastMessageCountUpdate = ::time( 0 );
}
-void SummaryWidget::updateFolderList( const QStringList& folders )
+void SummaryWidget::updateFolderList( const TQStringList& folders )
{
mLabels.setAutoDelete( true );
mLabels.clear();
@@ -107,24 +107,24 @@ void SummaryWidget::updateFolderList( const QStringList& folders )
KConfig config( "kcmkmailsummaryrc" );
config.setGroup( "General" );
- QStringList activeFolders;
+ TQStringList activeFolders;
if ( !config.hasKey( "ActiveFolders" ) )
activeFolders << "/Local/inbox";
else
activeFolders = config.readListEntry( "ActiveFolders" );
int counter = 0;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
DCOPRef kmail( "kmail", "KMailIface" );
for ( it = folders.begin(); it != folders.end(); ++it ) {
if ( activeFolders.contains( *it ) ) {
- DCOPRef folderRef = kmail.call( "getFolder(QString)", *it );
+ DCOPRef folderRef = kmail.call( "getFolder(TQString)", *it );
const int numMsg = folderRef.call( "messages()" );
const int numUnreadMsg = folderRef.call( "unreadMessages()" );
if ( numUnreadMsg == 0 ) continue;
- QString folderPath;
+ TQString folderPath;
if ( config.readBoolEntry( "ShowFullPath", true ) )
folderRef.call( "displayPath()" ).get( folderPath );
else
@@ -134,13 +134,13 @@ void SummaryWidget::updateFolderList( const QStringList& folders )
urlLabel->installEventFilter( this );
urlLabel->setAlignment( AlignLeft );
urlLabel->show();
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- SLOT( selectFolder( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ TQT_SLOT( selectFolder( const TQString& ) ) );
mLayout->addWidget( urlLabel, counter, 0 );
mLabels.append( urlLabel );
- QLabel *label =
- new QLabel( QString( i18n("%1: number of unread messages "
+ TQLabel *label =
+ new TQLabel( TQString( i18n("%1: number of unread messages "
"%2: total number of messages", "%1 / %2") )
.arg( numUnreadMsg ).arg( numMsg ), this );
label->setAlignment( AlignLeft );
@@ -153,7 +153,7 @@ void SummaryWidget::updateFolderList( const QStringList& folders )
}
if ( counter == 0 ) {
- QLabel *label = new QLabel( i18n( "No unread messages in your monitored folders" ), this );
+ TQLabel *label = new TQLabel( i18n( "No unread messages in your monitored folders" ), this );
label->setAlignment( AlignHCenter | AlignVCenter );
mLayout->addMultiCellWidget( label, 0, 0, 0, 2 );
label->show();
@@ -161,22 +161,22 @@ void SummaryWidget::updateFolderList( const QStringList& folders )
}
}
-bool SummaryWidget::eventFilter( QObject *obj, QEvent* e )
+bool SummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
{
if ( obj->inherits( "KURLLabel" ) ) {
KURLLabel* label = static_cast<KURLLabel*>( obj );
- if ( e->type() == QEvent::Enter )
+ if ( e->type() == TQEvent::Enter )
emit message( i18n( "Open Folder: \"%1\"" ).arg( label->text() ) );
- if ( e->type() == QEvent::Leave )
- emit message( QString::null );
+ if ( e->type() == TQEvent::Leave )
+ emit message( TQString::null );
}
return Kontact::Summary::eventFilter( obj, e );
}
-QStringList SummaryWidget::configModules() const
+TQStringList SummaryWidget::configModules() const
{
- return QStringList( "kcmkmailsummary.desktop" );
+ return TQStringList( "kcmkmailsummary.desktop" );
}
#include "summarywidget.moc"
diff --git a/kontact/plugins/kmail/summarywidget.h b/kontact/plugins/kmail/summarywidget.h
index 563a021e..dc058e45 100644
--- a/kontact/plugins/kmail/summarywidget.h
+++ b/kontact/plugins/kmail/summarywidget.h
@@ -24,9 +24,9 @@
#ifndef SUMMARYWIDGET_H
#define SUMMARYWIDGET_H
-#include <qmap.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <dcopobject.h>
#include <kurllabel.h>
@@ -44,28 +44,28 @@ class SummaryWidget : public Kontact::Summary, public DCOPObject
K_DCOP
public:
- SummaryWidget( Kontact::Plugin *plugin, QWidget *parent, const char *name = 0 );
+ SummaryWidget( Kontact::Plugin *plugin, TQWidget *parent, const char *name = 0 );
int summaryHeight() const { return 1; }
- QStringList configModules() const;
+ TQStringList configModules() const;
k_dcop_hidden:
void slotUnreadCountChanged();
protected:
- virtual bool eventFilter( QObject *obj, QEvent* e );
+ virtual bool eventFilter( TQObject *obj, TQEvent* e );
public slots:
virtual void updateSummary( bool force );
private slots:
- void selectFolder( const QString& );
+ void selectFolder( const TQString& );
private:
- void updateFolderList( const QStringList& folders );
+ void updateFolderList( const TQStringList& folders );
- QPtrList<QLabel> mLabels;
- QGridLayout *mLayout;
+ TQPtrList<TQLabel> mLabels;
+ TQGridLayout *mLayout;
Kontact::Plugin *mPlugin;
int mTimeOfLastMessageCountUpdate;
};