summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/newsticker/summarywidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kontact/plugins/newsticker/summarywidget.cpp')
-rw-r--r--kontact/plugins/newsticker/summarywidget.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/kontact/plugins/newsticker/summarywidget.cpp b/kontact/plugins/newsticker/summarywidget.cpp
index 14b7bc27a..b45f8c7bf 100644
--- a/kontact/plugins/newsticker/summarywidget.cpp
+++ b/kontact/plugins/newsticker/summarywidget.cpp
@@ -21,13 +21,13 @@
without including the source code for Qt in the source distribution.
*/
-#include <qclipboard.h>
-#include <qeventloop.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
+#include <tqclipboard.h>
+#include <tqeventloop.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -41,34 +41,34 @@
#include "summarywidget.h"
-SummaryWidget::SummaryWidget( QWidget *parent, const char *name )
+SummaryWidget::SummaryWidget( TQWidget *parent, const char *name )
: Kontact::Summary( parent, name ),
DCOPObject( "NewsTickerPlugin" ), mLayout( 0 ), mFeedCounter( 0 )
{
- QVBoxLayout *vlay = new QVBoxLayout( this, 3, 3 );
+ TQVBoxLayout *vlay = new TQVBoxLayout( this, 3, 3 );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_news",
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_news",
KIcon::Desktop, KIcon::SizeMedium );
- QWidget *header = createHeader( this, icon, i18n( "News Feeds" ) );
+ TQWidget *header = createHeader( this, icon, i18n( "News Feeds" ) );
vlay->addWidget( header );
- QString error;
- QCString appID;
+ TQString error;
+ TQCString appID;
bool dcopAvailable = true;
if ( !kapp->dcopClient()->isApplicationRegistered( "rssservice" ) ) {
- if ( KApplication::startServiceByDesktopName( "rssservice", QStringList(), &error, &appID ) ) {
- QLabel *label = new QLabel( i18n( "No rss dcop service available.\nYou need rssservice to use this plugin." ), this );
+ if ( KApplication::startServiceByDesktopName( "rssservice", TQStringList(), &error, &appID ) ) {
+ TQLabel *label = new TQLabel( i18n( "No rss dcop service available.\nYou need rssservice to use this plugin." ), this );
vlay->addWidget( label, Qt::AlignHCenter );
dcopAvailable = false;
}
}
- mBaseWidget = new QWidget( this, "baseWidget" );
+ mBaseWidget = new TQWidget( this, "baseWidget" );
vlay->addWidget( mBaseWidget );
- connect( &mTimer, SIGNAL( timeout() ), this, SLOT( updateDocuments() ) );
+ connect( &mTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( updateDocuments() ) );
readConfig();
@@ -77,8 +77,8 @@ SummaryWidget::SummaryWidget( QWidget *parent, const char *name )
if ( dcopAvailable )
initDocuments();
- connectDCOPSignal( 0, 0, "added(QString)", "documentAdded(QString)", false );
- connectDCOPSignal( 0, 0, "removed(QString)", "documentRemoved(QString)", false );
+ connectDCOPSignal( 0, 0, "added(TQString)", "documentAdded(TQString)", false );
+ connectDCOPSignal( 0, 0, "removed(TQString)", "documentRemoved(TQString)", false );
}
int SummaryWidget::summaryHeight() const
@@ -86,12 +86,12 @@ int SummaryWidget::summaryHeight() const
return ( mFeeds.count() == 0 ? 1 : mFeeds.count() );
}
-void SummaryWidget::documentAdded( QString )
+void SummaryWidget::documentAdded( TQString )
{
initDocuments();
}
-void SummaryWidget::documentRemoved( QString )
+void SummaryWidget::documentRemoved( TQString )
{
initDocuments();
}
@@ -117,17 +117,17 @@ void SummaryWidget::initDocuments()
mFeeds.clear();
DCOPRef dcopCall( "rssservice", "RSSService" );
- QStringList urls;
+ TQStringList urls;
dcopCall.call( "list()" ).get( urls );
if ( urls.isEmpty() ) { // add default
urls.append( "http://www.kde.org/dotkdeorg.rdf" );
- dcopCall.send( "add(QString)", urls[ 0 ] );
+ dcopCall.send( "add(TQString)", urls[ 0 ] );
}
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = urls.begin(); it != urls.end(); ++it ) {
- DCOPRef feedRef = dcopCall.call( "document(QString)", *it );
+ DCOPRef feedRef = dcopCall.call( "document(TQString)", *it );
Feed feed;
feed.ref = feedRef;
@@ -141,8 +141,8 @@ void SummaryWidget::initDocuments()
"documentUpdated(DCOPRef)", false );
if ( qApp )
- qApp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput |
- QEventLoop::ExcludeSocketNotifiers );
+ qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput |
+ TQEventLoop::ExcludeSocketNotifiers );
}
updateDocuments();
@@ -166,16 +166,16 @@ void SummaryWidget::documentUpdated( DCOPRef feedRef )
int numArticles = feedRef.call( "count()" );
for ( int i = 0; i < numArticles; ++i ) {
DCOPRef artRef = feedRef.call( "article(int)", i );
- QString title, url;
+ TQString title, url;
if ( qApp )
- qApp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput |
- QEventLoop::ExcludeSocketNotifiers );
+ qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput |
+ TQEventLoop::ExcludeSocketNotifiers );
artRef.call( "title()" ).get( title );
artRef.call( "link()" ).get( url );
- QPair<QString, KURL> article(title, KURL( url ));
+ QPair<TQString, KURL> article(title, KURL( url ));
map.append( article );
}
@@ -205,15 +205,15 @@ void SummaryWidget::updateView()
mLabels.setAutoDelete( false );
delete mLayout;
- mLayout = new QVBoxLayout( mBaseWidget, 3 );
+ mLayout = new TQVBoxLayout( mBaseWidget, 3 );
- QFont boldFont;
+ TQFont boldFont;
boldFont.setBold( true );
boldFont.setPointSize( boldFont.pointSize() + 2 );
FeedList::Iterator it;
for ( it = mFeeds.begin(); it != mFeeds.end(); ++it ) {
- QHBox *hbox = new QHBox( mBaseWidget );
+ TQHBox *hbox = new TQHBox( mBaseWidget );
mLayout->addWidget( hbox );
// icon
@@ -223,13 +223,13 @@ void SummaryWidget::updateView()
urlLabel->setMaximumSize( urlLabel->minimumSizeHint() );
mLabels.append( urlLabel );
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- kapp, SLOT( invokeBrowser( const QString& ) ) );
- connect( urlLabel, SIGNAL( rightClickedURL( const QString& ) ),
- this, SLOT( rmbMenu( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ kapp, TQT_SLOT( invokeBrowser( const TQString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( rightClickedURL( const TQString& ) ),
+ this, TQT_SLOT( rmbMenu( const TQString& ) ) );
// header
- QLabel *label = new QLabel( hbox );
+ TQLabel *label = new TQLabel( hbox );
label->setText( KCharsets::resolveEntities( (*it).title ) );
label->setAlignment( AlignLeft|AlignVCenter );
label->setFont( boldFont );
@@ -252,17 +252,17 @@ void SummaryWidget::updateView()
mLabels.append( urlLabel );
mLayout->addWidget( urlLabel );
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- kapp, SLOT( invokeBrowser( const QString& ) ) );
- connect( urlLabel, SIGNAL( rightClickedURL( const QString& ) ),
- this, SLOT( rmbMenu( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ kapp, TQT_SLOT( invokeBrowser( const TQString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( rightClickedURL( const TQString& ) ),
+ this, TQT_SLOT( rmbMenu( const TQString& ) ) );
numArticles++;
}
}
- for ( QLabel *label = mLabels.first(); label; label = mLabels.next() )
+ for ( TQLabel *label = mLabels.first(); label; label = mLabels.next() )
label->show();
}
@@ -284,7 +284,7 @@ void SummaryWidget::documentUpdateError( DCOPRef feedRef, int errorCode )
}
-QStringList SummaryWidget::configModules() const
+TQStringList SummaryWidget::configModules() const
{
return "kcmkontactknt.desktop";
}
@@ -294,23 +294,23 @@ void SummaryWidget::updateSummary( bool )
updateDocuments();
}
-void SummaryWidget::rmbMenu( const QString& url )
+void SummaryWidget::rmbMenu( const TQString& url )
{
- QPopupMenu menu;
+ TQPopupMenu menu;
menu.insertItem( i18n( "Copy URL to Clipboard" ) );
- int id = menu.exec( QCursor::pos() );
+ int id = menu.exec( TQCursor::pos() );
if ( id != -1 )
kapp->clipboard()->setText( url, QClipboard::Clipboard );
}
-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( label->url() );
- if ( e->type() == QEvent::Leave )
- emit message( QString::null );
+ if ( e->type() == TQEvent::Leave )
+ emit message( TQString::null );
}
return Kontact::Summary::eventFilter( obj, e );