summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/kmail/summarywidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kontact/plugins/kmail/summarywidget.cpp')
-rw-r--r--kontact/plugins/kmail/summarywidget.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kontact/plugins/kmail/summarywidget.cpp b/kontact/plugins/kmail/summarywidget.cpp
index 79f2f4657..43c1e2cb7 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"