diff options
Diffstat (limited to 'kontact/plugins/newsticker')
-rw-r--r-- | kontact/plugins/newsticker/kcmkontactknt.cpp | 144 | ||||
-rw-r--r-- | kontact/plugins/newsticker/kcmkontactknt.h | 26 | ||||
-rw-r--r-- | kontact/plugins/newsticker/newsfeeds.h | 322 | ||||
-rw-r--r-- | kontact/plugins/newsticker/newsticker_plugin.cpp | 4 | ||||
-rw-r--r-- | kontact/plugins/newsticker/newsticker_plugin.h | 4 | ||||
-rw-r--r-- | kontact/plugins/newsticker/summarywidget.cpp | 104 | ||||
-rw-r--r-- | kontact/plugins/newsticker/summarywidget.h | 38 |
7 files changed, 321 insertions, 321 deletions
diff --git a/kontact/plugins/newsticker/kcmkontactknt.cpp b/kontact/plugins/newsticker/kcmkontactknt.cpp index 18f439c8e..13734a8ab 100644 --- a/kontact/plugins/newsticker/kcmkontactknt.cpp +++ b/kontact/plugins/newsticker/kcmkontactknt.cpp @@ -21,12 +21,12 @@ without including the source code for Qt in the source distribution. */ -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qvaluevector.h> -#include <qspinbox.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqvaluevector.h> +#include <tqspinbox.h> #include <dcopref.h> #include <dcopclient.h> @@ -49,41 +49,41 @@ extern "C" { - KDE_EXPORT KCModule *create_kontactknt( QWidget *parent, const char * ) + KDE_EXPORT KCModule *create_kontactknt( TQWidget *parent, const char * ) { return new KCMKontactKNT( parent, "kcmkontactknt" ); } } -NewsEditDialog::NewsEditDialog( const QString& title, const QString& url, QWidget *parent ) +NewsEditDialog::NewsEditDialog( const TQString& title, const TQString& url, TQWidget *parent ) : KDialogBase( Plain, i18n( "New News Feed" ), Ok | Cancel, Ok, parent, 0, true, true ) { - QWidget *page = plainPage(); - QGridLayout *layout = new QGridLayout( page, 2, 3, marginHint(), + TQWidget *page = plainPage(); + TQGridLayout *layout = new TQGridLayout( page, 2, 3, marginHint(), spacingHint() ); - QLabel *label = new QLabel( i18n( "Name:" ), page ); + TQLabel *label = new TQLabel( i18n( "Name:" ), page ); layout->addWidget( label, 0, 0 ); - mTitle = new QLineEdit( page ); + mTitle = new TQLineEdit( page ); label->setBuddy( mTitle ); layout->addMultiCellWidget( mTitle, 0, 0, 1, 2 ); - label = new QLabel( i18n( "URL:" ), page ); + label = new TQLabel( i18n( "URL:" ), page ); layout->addWidget( label, 1, 0 ); - mURL = new QLineEdit( page ); + mURL = new TQLineEdit( page ); label->setBuddy( mURL ); layout->addMultiCellWidget( mURL, 1, 1, 1, 2 ); mTitle->setText( title ); mURL->setText( url ); mTitle->setFocus(); - connect( mTitle, SIGNAL( textChanged( const QString& ) ), - this, SLOT( modified() ) ); - connect( mURL, SIGNAL( textChanged( const QString& ) ), - this, SLOT( modified() ) ); + connect( mTitle, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( modified() ) ); + connect( mURL, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( modified() ) ); modified(); } @@ -93,12 +93,12 @@ void NewsEditDialog::modified() enableButton( KDialogBase::Ok, !title().isEmpty() && !url().isEmpty() ); } -QString NewsEditDialog::title() const +TQString NewsEditDialog::title() const { return mTitle->text(); } -QString NewsEditDialog::url() const +TQString NewsEditDialog::url() const { return mURL->text(); } @@ -106,45 +106,45 @@ QString NewsEditDialog::url() const class NewsItem : public QListViewItem { public: - NewsItem( QListView *parent, const QString& title, const QString& url, bool custom ) - : QListViewItem( parent ), mTitle( title ), mUrl( url ), mCustom( custom ) + NewsItem( TQListView *parent, const TQString& title, const TQString& url, bool custom ) + : TQListViewItem( parent ), mTitle( title ), mUrl( url ), mCustom( custom ) { setText( 0, mTitle ); } - NewsItem( QListViewItem *parent, const QString& title, const QString& url, bool custom ) - : QListViewItem( parent ), mTitle( title ), mUrl( url ), mCustom( custom ) + NewsItem( TQListViewItem *parent, const TQString& title, const TQString& url, bool custom ) + : TQListViewItem( parent ), mTitle( title ), mUrl( url ), mCustom( custom ) { setText( 0, mTitle ); } - QString title() const { return mTitle; } - QString url() const { return mUrl; } + TQString title() const { return mTitle; } + TQString url() const { return mUrl; } bool custom() const { return mCustom; } private: - QString mTitle; - QString mUrl; + TQString mTitle; + TQString mUrl; bool mCustom; }; -KCMKontactKNT::KCMKontactKNT( QWidget *parent, const char *name ) +KCMKontactKNT::KCMKontactKNT( TQWidget *parent, const char *name ) : KCModule( parent, name ) { initGUI(); - connect( mAllNews, SIGNAL( currentChanged( QListViewItem* ) ), - this, SLOT( allCurrentChanged( QListViewItem* ) ) ); - connect( mSelectedNews, SIGNAL( selectionChanged( QListViewItem* ) ), - this, SLOT( selectedChanged( QListViewItem* ) ) ); + connect( mAllNews, TQT_SIGNAL( currentChanged( TQListViewItem* ) ), + this, TQT_SLOT( allCurrentChanged( TQListViewItem* ) ) ); + connect( mSelectedNews, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ), + this, TQT_SLOT( selectedChanged( TQListViewItem* ) ) ); - connect( mUpdateInterval, SIGNAL( valueChanged( int ) ), SLOT( modified() ) ); - connect( mArticleCount, SIGNAL( valueChanged( int ) ), SLOT( modified() ) ); + connect( mUpdateInterval, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( modified() ) ); + connect( mArticleCount, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( modified() ) ); - connect( mAddButton, SIGNAL( clicked() ), this, SLOT( addNews() ) ); - connect( mRemoveButton, SIGNAL( clicked() ), this, SLOT( removeNews() ) ); - connect( mNewButton, SIGNAL( clicked() ), this, SLOT( newFeed() ) ); - connect( mDeleteButton, SIGNAL( clicked() ), this, SLOT( deleteFeed() ) ); + connect( mAddButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addNews() ) ); + connect( mRemoveButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( removeNews() ) ); + connect( mNewButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( newFeed() ) ); + connect( mDeleteButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deleteFeed() ) ); KAcceleratorManager::manage( this ); @@ -153,15 +153,15 @@ KCMKontactKNT::KCMKontactKNT( QWidget *parent, const char *name ) void KCMKontactKNT::loadNews() { - QValueVector<QListViewItem*> parents; - QValueVector<QListViewItem*>::Iterator it; + TQValueVector<TQListViewItem*> parents; + TQValueVector<TQListViewItem*>::Iterator it; - parents.append( new QListViewItem( mAllNews, i18n( "Arts" ) ) ); - parents.append( new QListViewItem( mAllNews, i18n( "Business" ) ) ); - parents.append( new QListViewItem( mAllNews, i18n( "Computers" ) ) ); - parents.append( new QListViewItem( mAllNews, i18n( "Misc" ) ) ); - parents.append( new QListViewItem( mAllNews, i18n( "Recreation" ) ) ); - parents.append( new QListViewItem( mAllNews, i18n( "Society" ) ) ); + parents.append( new TQListViewItem( mAllNews, i18n( "Arts" ) ) ); + parents.append( new TQListViewItem( mAllNews, i18n( "Business" ) ) ); + parents.append( new TQListViewItem( mAllNews, i18n( "Computers" ) ) ); + parents.append( new TQListViewItem( mAllNews, i18n( "Misc" ) ) ); + parents.append( new TQListViewItem( mAllNews, i18n( "Recreation" ) ) ); + parents.append( new TQListViewItem( mAllNews, i18n( "Society" ) ) ); for ( it = parents.begin(); it != parents.end(); ++it ) (*it)->setSelectable( false ); @@ -176,18 +176,18 @@ void KCMKontactKNT::loadNews() void KCMKontactKNT::loadCustomNews() { KConfig config( "kcmkontactkntrc" ); - QMap<QString, QString> customFeeds = config.entryMap( "CustomFeeds" ); + TQMap<TQString, TQString> customFeeds = config.entryMap( "CustomFeeds" ); config.setGroup( "CustomFeeds" ); - mCustomItem = new QListViewItem( mAllNews, i18n( "Custom" ) ); + mCustomItem = new TQListViewItem( mAllNews, i18n( "Custom" ) ); mCustomItem->setSelectable( false ); if ( customFeeds.count() == 0 ) mCustomItem->setVisible( false ); - QMap<QString, QString>::Iterator it; + TQMap<TQString, TQString>::Iterator it; for ( it = customFeeds.begin(); it != customFeeds.end(); ++it ) { - QStringList value = config.readListEntry( it.key() ); + TQStringList value = config.readListEntry( it.key() ); mCustomFeeds.append( new NewsItem( mCustomItem, value[ 0 ], value[ 1 ], true ) ); mFeedMap.insert( value[ 1 ], value[ 0 ] ); mCustomItem->setVisible( true ); @@ -201,11 +201,11 @@ void KCMKontactKNT::storeCustomNews() config.setGroup( "CustomFeeds" ); int counter = 0; - QValueList<NewsItem*>::Iterator it; + TQValueList<NewsItem*>::Iterator it; for ( it = mCustomFeeds.begin(); it != mCustomFeeds.end(); ++it ) { - QStringList value; + TQStringList value; value << (*it)->title() << (*it)->url(); - config.writeEntry( QString::number( counter ), value ); + config.writeEntry( TQString::number( counter ), value ); ++counter; } @@ -223,7 +223,7 @@ void KCMKontactKNT::addNews() return; DCOPRef service( "rssservice", "RSSService" ); - service.send( "add(QString)", item->url() ); + service.send( "add(TQString)", item->url() ); scanNews(); @@ -240,7 +240,7 @@ void KCMKontactKNT::removeNews() return; DCOPRef service( "rssservice", "RSSService" ); - service.send( "remove(QString)", item->url() ); + service.send( "remove(TQString)", item->url() ); scanNews(); @@ -292,24 +292,24 @@ void KCMKontactKNT::scanNews() mSelectedNews->clear(); DCOPRef service( "rssservice", "RSSService" ); - QStringList urls = service.call( "list()" ); + TQStringList urls = service.call( "list()" ); for ( uint i = 0; i < urls.count(); ++i ) { - QString url = urls[ i ]; - QString feedName = mFeedMap[ url ]; + TQString url = urls[ i ]; + TQString feedName = mFeedMap[ url ]; if ( feedName.isEmpty() ) feedName = url; new NewsItem( mSelectedNews, feedName, url, false ); } } -void KCMKontactKNT::selectedChanged( QListViewItem *item ) +void KCMKontactKNT::selectedChanged( TQListViewItem *item ) { mRemoveButton->setEnabled( item && item->isSelected() ); } -void KCMKontactKNT::allCurrentChanged( QListViewItem *item ) +void KCMKontactKNT::allCurrentChanged( TQListViewItem *item ) { NewsItem *newsItem = dynamic_cast<NewsItem*>( item ); @@ -331,7 +331,7 @@ void KCMKontactKNT::modified() void KCMKontactKNT::initGUI() { - QGridLayout *layout = new QGridLayout( this, 2, 3, KDialog::marginHint(), + TQGridLayout *layout = new TQGridLayout( this, 2, 3, KDialog::marginHint(), KDialog::spacingHint() ); mAllNews = new KListView( this ); @@ -340,7 +340,7 @@ void KCMKontactKNT::initGUI() mAllNews->setFullWidth( true ); layout->addWidget( mAllNews, 0, 0 ); - QVBoxLayout *vbox = new QVBoxLayout( layout, KDialog::spacingHint() ); + TQVBoxLayout *vbox = new TQVBoxLayout( layout, KDialog::spacingHint() ); vbox->addStretch(); mAddButton = new KPushButton( i18n( "Add" ), this ); @@ -356,24 +356,24 @@ void KCMKontactKNT::initGUI() mSelectedNews->setFullWidth( true ); layout->addWidget( mSelectedNews, 0, 2 ); - QGroupBox *box = new QGroupBox( 0, Qt::Vertical, + TQGroupBox *box = new TQGroupBox( 0, Qt::Vertical, i18n( "News Feed Settings" ), this ); - QGridLayout *boxLayout = new QGridLayout( box->layout(), 2, 3, + TQGridLayout *boxLayout = new TQGridLayout( box->layout(), 2, 3, KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Refresh time:" ), box ); + TQLabel *label = new TQLabel( i18n( "Refresh time:" ), box ); boxLayout->addWidget( label, 0, 0 ); - mUpdateInterval = new QSpinBox( 1, 3600, 1, box ); + mUpdateInterval = new TQSpinBox( 1, 3600, 1, box ); mUpdateInterval->setSuffix( " sec." ); label->setBuddy( mUpdateInterval ); boxLayout->addWidget( mUpdateInterval, 0, 1 ); - label = new QLabel( i18n( "Number of items shown:" ), box ); + label = new TQLabel( i18n( "Number of items shown:" ), box ); boxLayout->addWidget( label, 1, 0 ); - mArticleCount = new QSpinBox( box ); + mArticleCount = new TQSpinBox( box ); label->setBuddy( mArticleCount ); boxLayout->addWidget( mArticleCount, 1, 1 ); @@ -389,12 +389,12 @@ void KCMKontactKNT::initGUI() bool KCMKontactKNT::dcopActive() const { - QString error; - QCString appID; + TQString error; + TQCString appID; bool isGood = true; DCOPClient *client = kapp->dcopClient(); if ( !client->isApplicationRegistered( "rssservice" ) ) { - if ( KApplication::startServiceByDesktopName( "rssservice", QStringList(), &error, &appID ) ) + if ( KApplication::startServiceByDesktopName( "rssservice", TQStringList(), &error, &appID ) ) isGood = false; } diff --git a/kontact/plugins/newsticker/kcmkontactknt.h b/kontact/plugins/newsticker/kcmkontactknt.h index 7463cf004..c88c94e27 100644 --- a/kontact/plugins/newsticker/kcmkontactknt.h +++ b/kontact/plugins/newsticker/kcmkontactknt.h @@ -40,7 +40,7 @@ class KCMKontactKNT : public KCModule Q_OBJECT public: - KCMKontactKNT( QWidget *parent = 0, const char *name = 0 ); + KCMKontactKNT( TQWidget *parent = 0, const char *name = 0 ); virtual void load(); virtual void save(); @@ -53,8 +53,8 @@ class KCMKontactKNT : public KCModule void newFeed(); void deleteFeed(); - void selectedChanged( QListViewItem *item ); - void allCurrentChanged( QListViewItem *item ); + void selectedChanged( TQListViewItem *item ); + void allCurrentChanged( TQListViewItem *item ); void modified(); @@ -69,17 +69,17 @@ class KCMKontactKNT : public KCModule KListView *mAllNews; KListView *mSelectedNews; - QListViewItem *mCustomItem; + TQListViewItem *mCustomItem; KPushButton *mAddButton; KPushButton *mRemoveButton; KPushButton *mNewButton; KPushButton *mDeleteButton; - QSpinBox *mUpdateInterval; - QSpinBox *mArticleCount; + TQSpinBox *mUpdateInterval; + TQSpinBox *mArticleCount; - QMap<QString, QString> mFeedMap; - QValueList<NewsItem*> mCustomFeeds; + TQMap<TQString, TQString> mFeedMap; + TQValueList<NewsItem*> mCustomFeeds; }; class NewsEditDialog : public KDialogBase @@ -87,16 +87,16 @@ class NewsEditDialog : public KDialogBase Q_OBJECT public: - NewsEditDialog( const QString&, const QString&, QWidget *parent ); - QString title() const; - QString url() const; + NewsEditDialog( const TQString&, const TQString&, TQWidget *parent ); + TQString title() const; + TQString url() const; private slots: void modified(); private: - QLineEdit *mTitle; - QLineEdit *mURL; + TQLineEdit *mTitle; + TQLineEdit *mURL; }; #endif diff --git a/kontact/plugins/newsticker/newsfeeds.h b/kontact/plugins/newsticker/newsfeeds.h index fb5ef4098..66555d4fe 100644 --- a/kontact/plugins/newsticker/newsfeeds.h +++ b/kontact/plugins/newsticker/newsfeeds.h @@ -24,291 +24,291 @@ #ifndef NEWSFEEDS_H #define NEWSFEEDS_H -#include <qvaluelist.h> +#include <tqvaluelist.h> #define DEFAULT_NEWSSOURCES 60 class NewsSourceData { public: - typedef QValueList<NewsSourceData> List; + typedef TQValueList<NewsSourceData> List; enum Category { Arts, Business, Computers, Misc, Recreation, Society }; - NewsSourceData( const QString &name = I18N_NOOP( "Unknown" ), - const QString &url = QString::null, - const QString &icon = QString::null, + NewsSourceData( const TQString &name = I18N_NOOP( "Unknown" ), + const TQString &url = TQString::null, + const TQString &icon = TQString::null, const Category category= Computers ) : mName( name ), mURL( url ), mIcon( icon ), mCategory( category ) { } - QString name() const { return mName; } - QString url() const { return mURL; } - QString icon() const { return mIcon; } + TQString name() const { return mName; } + TQString url() const { return mURL; } + TQString icon() const { return mIcon; } Category category() const { return mCategory; } - QString mName; - QString mURL; - QString mIcon; + TQString mName; + TQString mURL; + TQString mIcon; Category mCategory; }; static NewsSourceData NewsSourceDefault[DEFAULT_NEWSSOURCES] = { // Arts --------------- NewsSourceData( - QString::fromLatin1("Bureau 42"), - QString::fromLatin1("http://www.bureau42.com/rdf/"), - QString::fromLatin1("http://www.bureau42.com/favicon.ico"), + TQString::fromLatin1("Bureau 42"), + TQString::fromLatin1("http://www.bureau42.com/rdf/"), + TQString::fromLatin1("http://www.bureau42.com/favicon.ico"), NewsSourceData::Arts ), NewsSourceData( - QString::fromLatin1("eFilmCritic"), - QString::fromLatin1("http://efilmcritic.com/fo.rdf"), - QString::fromLatin1("http://efilmcritic.com/favicon.ico"), + TQString::fromLatin1("eFilmCritic"), + TQString::fromLatin1("http://efilmcritic.com/fo.rdf"), + TQString::fromLatin1("http://efilmcritic.com/favicon.ico"), NewsSourceData::Arts ), // Business ----------- NewsSourceData( - QString::fromLatin1("Internet.com Business"), - QString::fromLatin1("http://headlines.internet.com/internetnews/bus-news/news.rss"), - QString::null, + TQString::fromLatin1("Internet.com Business"), + TQString::fromLatin1("http://headlines.internet.com/internetnews/bus-news/news.rss"), + TQString::null, NewsSourceData::Business ), NewsSourceData( - QString::fromLatin1("TradeSims"), - QString::fromLatin1("http://www.tradesims.com/AEX.rdf"), - QString::null, + TQString::fromLatin1("TradeSims"), + TQString::fromLatin1("http://www.tradesims.com/AEX.rdf"), + TQString::null, NewsSourceData::Business ), // Computers ---------- NewsSourceData( - QString::fromLatin1("KDE Deutschland"), - QString::fromLatin1("http://www.kde.de/nachrichten/nachrichten.rdf"), - QString::fromLatin1("http://www.kde.de/favicon.ico"), + TQString::fromLatin1("KDE Deutschland"), + TQString::fromLatin1("http://www.kde.de/nachrichten/nachrichten.rdf"), + TQString::fromLatin1("http://www.kde.de/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("KDE France"), - QString::fromLatin1("http://www.kde-france.org/backend-breves.php3"), - QString::null, + TQString::fromLatin1("KDE France"), + TQString::fromLatin1("http://www.kde-france.org/backend-breves.php3"), + TQString::null, NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("FreeBSD Project News"), - QString::fromLatin1("http://www.freebsd.org/news/news.rdf"), - QString::fromLatin1("http://www.freebsd.org/favicon.ico"), + TQString::fromLatin1("FreeBSD Project News"), + TQString::fromLatin1("http://www.freebsd.org/news/news.rdf"), + TQString::fromLatin1("http://www.freebsd.org/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("dot.kde.org"), - QString::fromLatin1("http://www.kde.org/dotkdeorg.rdf"), - QString::fromLatin1("http://www.kde.org/favicon.ico"), + TQString::fromLatin1("dot.kde.org"), + TQString::fromLatin1("http://www.kde.org/dotkdeorg.rdf"), + TQString::fromLatin1("http://www.kde.org/favicon.ico"), NewsSourceData::Computers ), - NewsSourceData( QString::fromLatin1("KDE-Look.org"), - QString::fromLatin1("http://www.kde.org/kde-look-content.rdf"), - QString::fromLatin1("http://kde-look.org/img/favicon-1-1.ico"), + NewsSourceData( TQString::fromLatin1("KDE-Look.org"), + TQString::fromLatin1("http://www.kde.org/kde-look-content.rdf"), + TQString::fromLatin1("http://kde-look.org/img/favicon-1-1.ico"), NewsSourceData::Computers ), - NewsSourceData( QString::fromLatin1("KDE-Apps.org"), - QString::fromLatin1("http://www.kde.org/dot/kde-apps-content.rdf"), - QString::fromLatin1("http://kde-apps.org/img/favicon-1-1.ico"), + NewsSourceData( TQString::fromLatin1("KDE-Apps.org"), + TQString::fromLatin1("http://www.kde.org/dot/kde-apps-content.rdf"), + TQString::fromLatin1("http://kde-apps.org/img/favicon-1-1.ico"), NewsSourceData::Computers ), - NewsSourceData( QString::fromLatin1("DesktopLinux"), - QString::fromLatin1("http://www.desktoplinux.com/backend/index.html"), - QString::fromLatin1("http://www.desktoplinux.com/images/favicon.ico"), + NewsSourceData( TQString::fromLatin1("DesktopLinux"), + TQString::fromLatin1("http://www.desktoplinux.com/backend/index.html"), + TQString::fromLatin1("http://www.desktoplinux.com/images/favicon.ico"), NewsSourceData::Computers ), - NewsSourceData( QString::fromLatin1("DistroWatch"), - QString::fromLatin1("http://distrowatch.com/news/dw.xml"), - QString::fromLatin1("http://distrowatch.com/favicon.ico"), + NewsSourceData( TQString::fromLatin1("DistroWatch"), + TQString::fromLatin1("http://distrowatch.com/news/dw.xml"), + TQString::fromLatin1("http://distrowatch.com/favicon.ico"), NewsSourceData::Computers ), /*URL changed*/ NewsSourceData( - QString::fromLatin1("GNOME News"), - QString::fromLatin1("http://www.gnomedesktop.org/node/feed"), - QString::null, + TQString::fromLatin1("GNOME News"), + TQString::fromLatin1("http://www.gnomedesktop.org/node/feed"), + TQString::null, NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Slashdot"), - QString::fromLatin1("http://slashdot.org/slashdot.rdf"), - QString::fromLatin1("http://slashdot.org/favicon.ico"), + TQString::fromLatin1("Slashdot"), + TQString::fromLatin1("http://slashdot.org/slashdot.rdf"), + TQString::fromLatin1("http://slashdot.org/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Ask Slashdot"), - QString::fromLatin1("http://slashdot.org/askslashdot.rdf"), - QString::fromLatin1("http://slashdot.org/favicon.ico"), + TQString::fromLatin1("Ask Slashdot"), + TQString::fromLatin1("http://slashdot.org/askslashdot.rdf"), + TQString::fromLatin1("http://slashdot.org/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Slashdot: Features"), - QString::fromLatin1("http://slashdot.org/features.rdf"), - QString::fromLatin1("http://slashdot.org/favicon.ico"), + TQString::fromLatin1("Slashdot: Features"), + TQString::fromLatin1("http://slashdot.org/features.rdf"), + TQString::fromLatin1("http://slashdot.org/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Slashdot: Apache"), - QString::fromLatin1("http://slashdot.org/apache.rdf"), - QString::fromLatin1("http://slashdot.org/favicon.ico"), + TQString::fromLatin1("Slashdot: Apache"), + TQString::fromLatin1("http://slashdot.org/apache.rdf"), + TQString::fromLatin1("http://slashdot.org/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Slashdot: Books"), - QString::fromLatin1("http://slashdot.org/books.rdf"), - QString::fromLatin1("http://slashdot.org/favicon.ico"), + TQString::fromLatin1("Slashdot: Books"), + TQString::fromLatin1("http://slashdot.org/books.rdf"), + TQString::fromLatin1("http://slashdot.org/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Jabber News"), - QString::fromLatin1("http://www.jabber.org/news/rss.xml"), - QString::null, + TQString::fromLatin1("Jabber News"), + TQString::fromLatin1("http://www.jabber.org/news/rss.xml"), + TQString::null, NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Freshmeat"), - QString::fromLatin1("http://freshmeat.net/backend/fm.rdf"), - QString::fromLatin1("http://freshmeat.net/favicon.ico"), + TQString::fromLatin1("Freshmeat"), + TQString::fromLatin1("http://freshmeat.net/backend/fm.rdf"), + TQString::fromLatin1("http://freshmeat.net/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Linux Weekly News"), - QString::fromLatin1("http://www.lwn.net/headlines/rss"), - QString::fromLatin1("http://www.lwn.net/favicon.ico"), + TQString::fromLatin1("Linux Weekly News"), + TQString::fromLatin1("http://www.lwn.net/headlines/rss"), + TQString::fromLatin1("http://www.lwn.net/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("heise online news"), - QString::fromLatin1("http://www.heise.de/newsticker/heise.rdf"), - QString::fromLatin1("http://www.heise.de/favicon.ico"), + TQString::fromLatin1("heise online news"), + TQString::fromLatin1("http://www.heise.de/newsticker/heise.rdf"), + TQString::fromLatin1("http://www.heise.de/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("RUS-CERT Ticker"), - QString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert.rdf"), - QString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"), + TQString::fromLatin1("RUS-CERT Ticker"), + TQString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert.rdf"), + TQString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("RUS-CERT Elsewhere"), - QString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert-elsewhere.rdf"), - QString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"), + TQString::fromLatin1("RUS-CERT Elsewhere"), + TQString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert-elsewhere.rdf"), + TQString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Kuro5hin"), - QString::fromLatin1("http://kuro5hin.org/backend.rdf"), - QString::fromLatin1("http://kuro5hin.org/favicon.ico"), + TQString::fromLatin1("Kuro5hin"), + TQString::fromLatin1("http://kuro5hin.org/backend.rdf"), + TQString::fromLatin1("http://kuro5hin.org/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Prolinux"), - QString::fromLatin1("http://www.pl-forum.de/backend/pro-linux.rdf"), - QString::fromLatin1("http://www.prolinux.de/favicon.ico"), + TQString::fromLatin1("Prolinux"), + TQString::fromLatin1("http://www.pl-forum.de/backend/pro-linux.rdf"), + TQString::fromLatin1("http://www.prolinux.de/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("LinuxSecurity.com"), - QString::fromLatin1("http://www.linuxsecurity.com/linuxsecurity_hybrid.rdf"), - QString::fromLatin1("http://www.linuxsecurity.com/favicon.ico"), + TQString::fromLatin1("LinuxSecurity.com"), + TQString::fromLatin1("http://www.linuxsecurity.com/linuxsecurity_hybrid.rdf"), + TQString::fromLatin1("http://www.linuxsecurity.com/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Linux Game Tome"), - QString::fromLatin1("http://happypenguin.org/html/news.rdf"), - QString::null, + TQString::fromLatin1("Linux Game Tome"), + TQString::fromLatin1("http://happypenguin.org/html/news.rdf"), + TQString::null, NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Mozilla"), - QString::fromLatin1("http://www.mozilla.org/news.rdf"), - QString::fromLatin1("http://www.mozillazine.org/favicon.ico"), + TQString::fromLatin1("Mozilla"), + TQString::fromLatin1("http://www.mozilla.org/news.rdf"), + TQString::fromLatin1("http://www.mozillazine.org/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("MozillaZine"), - QString::fromLatin1("http://www.mozillazine.org/contents.rdf"), - QString::fromLatin1("http://www.mozillazine.org/favicon.ico"), + TQString::fromLatin1("MozillaZine"), + TQString::fromLatin1("http://www.mozillazine.org/contents.rdf"), + TQString::fromLatin1("http://www.mozillazine.org/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Daemon News"), - QString::fromLatin1("http://daily.daemonnews.org/ddn.rdf.php3"), - QString::null, + TQString::fromLatin1("Daemon News"), + TQString::fromLatin1("http://daily.daemonnews.org/ddn.rdf.php3"), + TQString::null, NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("use Perl;"), - QString::fromLatin1("http://use.perl.org/useperl.rdf"), - QString::null, + TQString::fromLatin1("use Perl;"), + TQString::fromLatin1("http://use.perl.org/useperl.rdf"), + TQString::null, NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Root prompt"), - QString::fromLatin1("http://www.rootprompt.org/rss/"), - QString::fromLatin1("http://www.rootprompt.org/favicon.ico"), + TQString::fromLatin1("Root prompt"), + TQString::fromLatin1("http://www.rootprompt.org/rss/"), + TQString::fromLatin1("http://www.rootprompt.org/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("SecurityFocus"), - QString::fromLatin1("http://www.securityfocus.com/topnews-rdf.html"), - QString::fromLatin1("http://www.securityfocus.com/favicon.ico"), + TQString::fromLatin1("SecurityFocus"), + TQString::fromLatin1("http://www.securityfocus.com/topnews-rdf.html"), + TQString::fromLatin1("http://www.securityfocus.com/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("Arstechnica"), - QString::fromLatin1("http://arstechnica.com/etc/rdf/ars.rdf"), - QString::fromLatin1("http://arstechnica.com/favicon.ico"), + TQString::fromLatin1("Arstechnica"), + TQString::fromLatin1("http://arstechnica.com/etc/rdf/ars.rdf"), + TQString::fromLatin1("http://arstechnica.com/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("amiga-news.de - deutschsprachige Amiga Nachrichten"), - QString::fromLatin1("http://www.amiga-news.de/de/backends/news/index.rss"), - QString::fromLatin1("http://www.amiga-news.de/favicon.ico"), + TQString::fromLatin1("amiga-news.de - deutschsprachige Amiga Nachrichten"), + TQString::fromLatin1("http://www.amiga-news.de/de/backends/news/index.rss"), + TQString::fromLatin1("http://www.amiga-news.de/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("amiga-news.de - english Amiga news"), - QString::fromLatin1("http://www.amiga-news.de/en/backends/news/index.rss"), - QString::fromLatin1("http://www.amiga-news.de/favicon.ico"), + TQString::fromLatin1("amiga-news.de - english Amiga news"), + TQString::fromLatin1("http://www.amiga-news.de/en/backends/news/index.rss"), + TQString::fromLatin1("http://www.amiga-news.de/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("FreshPorts - the place for ports"), - QString::fromLatin1("http://www.freshports.org/news.php3"), - QString::fromLatin1("http://www.freshports.org/favicon.ico"), + TQString::fromLatin1("FreshPorts - the place for ports"), + TQString::fromLatin1("http://www.freshports.org/news.php3"), + TQString::fromLatin1("http://www.freshports.org/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("zez.org - about code "), - QString::fromLatin1("http://zez.org/article/rssheadlines"), - QString::null, + TQString::fromLatin1("zez.org - about code "), + TQString::fromLatin1("http://zez.org/article/rssheadlines"), + TQString::null, NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("BSDatwork.com"), - QString::fromLatin1("http://BSDatwork.com/backend.php"), - QString::fromLatin1("http://BSDatwork.com/favicon.ico"), + TQString::fromLatin1("BSDatwork.com"), + TQString::fromLatin1("http://BSDatwork.com/backend.php"), + TQString::fromLatin1("http://BSDatwork.com/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("FreshSource - the place for source"), - QString::fromLatin1("http://www.freshsource.org/news.php"), - QString::fromLatin1("http://www.freshsource.org/favicon.ico"), + TQString::fromLatin1("FreshSource - the place for source"), + TQString::fromLatin1("http://www.freshsource.org/news.php"), + TQString::fromLatin1("http://www.freshsource.org/favicon.ico"), NewsSourceData::Computers ), NewsSourceData( - QString::fromLatin1("The FreeBSD Diary"), - QString::fromLatin1("http://www.freebsddiary.org/news.php"), - QString::fromLatin1("http://www.freebsddiary.org/favicon.ico"), + TQString::fromLatin1("The FreeBSD Diary"), + TQString::fromLatin1("http://www.freebsddiary.org/news.php"), + TQString::fromLatin1("http://www.freebsddiary.org/favicon.ico"), NewsSourceData::Computers ), // Miscellaneous ------ NewsSourceData( - QString::fromLatin1("tagesschau.de"), - QString::fromLatin1("http://www.tagesschau.de/newsticker.rdf"), - QString::fromLatin1("http://www.tagesschau.de/favicon.ico"), + TQString::fromLatin1("tagesschau.de"), + TQString::fromLatin1("http://www.tagesschau.de/newsticker.rdf"), + TQString::fromLatin1("http://www.tagesschau.de/favicon.ico"), NewsSourceData::Misc ), NewsSourceData( - QString::fromLatin1("CNN Top Stories"), - QString::fromLatin1("http://rss.cnn.com/rss/cnn_topstories.rss"), - QString::fromLatin1("http://www.cnn.com/favicon.ico"), + TQString::fromLatin1("CNN Top Stories"), + TQString::fromLatin1("http://rss.cnn.com/rss/cnn_topstories.rss"), + TQString::fromLatin1("http://www.cnn.com/favicon.ico"), NewsSourceData::Misc ), /*feed URL changed*/ NewsSourceData( - QString::fromLatin1("HotWired"), - QString::fromLatin1("http://www.wired.com/news/feeds/rss2/0,2610,,00.xml"), - QString::fromLatin1("http://www.hotwired.com/favicon.ico"), + TQString::fromLatin1("HotWired"), + TQString::fromLatin1("http://www.wired.com/news/feeds/rss2/0,2610,,00.xml"), + TQString::fromLatin1("http://www.hotwired.com/favicon.ico"), NewsSourceData::Misc ), NewsSourceData( - QString::fromLatin1("The Register"), - QString::fromLatin1("http://www.theregister.co.uk/headlines.rss"), - QString::fromLatin1("http://www.theregister.co.uk/favicon.ico"), + TQString::fromLatin1("The Register"), + TQString::fromLatin1("http://www.theregister.co.uk/headlines.rss"), + TQString::fromLatin1("http://www.theregister.co.uk/favicon.ico"), NewsSourceData::Misc ), NewsSourceData( - QString::fromLatin1( "Christian Science Monitor" ), - QString::fromLatin1( "http://www.csmonitor.com/rss/csm.rss"), - QString::fromLatin1( "http://www.csmonitor.com/favicon.ico"), + TQString::fromLatin1( "Christian Science Monitor" ), + TQString::fromLatin1( "http://www.csmonitor.com/rss/csm.rss"), + TQString::fromLatin1( "http://www.csmonitor.com/favicon.ico"), NewsSourceData::Misc ), // Recreation // Society NewsSourceData( - QString::fromLatin1("nippon.it"), - QString::fromLatin1("http://www.nippon.it/backend.it.php"), - QString::fromLatin1("http://www.nippon.it/favicon.ico"), + TQString::fromLatin1("nippon.it"), + TQString::fromLatin1("http://www.nippon.it/backend.it.php"), + TQString::fromLatin1("http://www.nippon.it/favicon.ico"), NewsSourceData::Society ), NewsSourceData( - QString::fromLatin1( "gflash" ), - QString::fromLatin1( "http://www.gflash.de/backend.php"), - QString::fromLatin1( "http://www.gflash.de/favicon.ico"), + TQString::fromLatin1( "gflash" ), + TQString::fromLatin1( "http://www.gflash.de/backend.php"), + TQString::fromLatin1( "http://www.gflash.de/favicon.ico"), NewsSourceData::Society ), NewsSourceData( - QString::fromLatin1( "Quintessenz" ), - QString::fromLatin1( "http://quintessenz.at/cgi-bin/rdf"), - QString::fromLatin1( "http://quintessenz.at/favicon.ico"), + TQString::fromLatin1( "Quintessenz" ), + TQString::fromLatin1( "http://quintessenz.at/cgi-bin/rdf"), + TQString::fromLatin1( "http://quintessenz.at/favicon.ico"), NewsSourceData::Society ) }; diff --git a/kontact/plugins/newsticker/newsticker_plugin.cpp b/kontact/plugins/newsticker/newsticker_plugin.cpp index 0bc42bd14..4afb0350d 100644 --- a/kontact/plugins/newsticker/newsticker_plugin.cpp +++ b/kontact/plugins/newsticker/newsticker_plugin.cpp @@ -31,13 +31,13 @@ typedef KGenericFactory< NewsTickerPlugin, Kontact::Core > NewsTickerPluginFacto K_EXPORT_COMPONENT_FACTORY( libkontact_newstickerplugin, NewsTickerPluginFactory( "kontact_newstickerplugin" ) ) -NewsTickerPlugin::NewsTickerPlugin( Kontact::Core *core, const char *name, const QStringList& ) +NewsTickerPlugin::NewsTickerPlugin( Kontact::Core *core, const char *name, const TQStringList& ) : Kontact::Plugin( core, core, name ) { setInstance( NewsTickerPluginFactory::instance() ); } -Kontact::Summary *NewsTickerPlugin::createSummaryWidget( QWidget* parentWidget ) +Kontact::Summary *NewsTickerPlugin::createSummaryWidget( TQWidget* parentWidget ) { return new SummaryWidget( parentWidget ); } diff --git a/kontact/plugins/newsticker/newsticker_plugin.h b/kontact/plugins/newsticker/newsticker_plugin.h index d912da797..b3c0b651d 100644 --- a/kontact/plugins/newsticker/newsticker_plugin.h +++ b/kontact/plugins/newsticker/newsticker_plugin.h @@ -28,10 +28,10 @@ class SummaryWidget; class NewsTickerPlugin : public Kontact::Plugin { public: - NewsTickerPlugin( Kontact::Core *core, const char *name, const QStringList& ); + NewsTickerPlugin( Kontact::Core *core, const char *name, const TQStringList& ); NewsTickerPlugin(); - virtual Kontact::Summary *createSummaryWidget( QWidget* parentWidget ); + virtual Kontact::Summary *createSummaryWidget( TQWidget* parentWidget ); protected: virtual KParts::ReadOnlyPart* createPart() { return 0L; } 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 ); diff --git a/kontact/plugins/newsticker/summarywidget.h b/kontact/plugins/newsticker/summarywidget.h index ad914334b..d6cdefa0e 100644 --- a/kontact/plugins/newsticker/summarywidget.h +++ b/kontact/plugins/newsticker/summarywidget.h @@ -27,10 +27,10 @@ #include <dcopobject.h> #include <dcopref.h> -#include <qmap.h> -#include <qptrlist.h> -#include <qtimer.h> -#include <qwidget.h> +#include <tqmap.h> +#include <tqptrlist.h> +#include <tqtimer.h> +#include <tqwidget.h> #include "summary.h" #include <kurl.h> @@ -41,17 +41,17 @@ class QLabel; class DCOPRef; class KURLLabel; -typedef QValueList< QPair<QString, KURL> > ArticleMap; +typedef TQValueList< QPair<TQString, KURL> > ArticleMap; typedef struct { DCOPRef ref; - QString title; - QString url; - QPixmap logo; + TQString title; + TQString url; + TQPixmap logo; ArticleMap map; } Feed; -typedef QValueList<Feed> FeedList; +typedef TQValueList<Feed> FeedList; class SummaryWidget : public Kontact::Summary, public DCOPObject { @@ -59,10 +59,10 @@ class SummaryWidget : public Kontact::Summary, public DCOPObject K_DCOP public: - SummaryWidget( QWidget *parent, const char *name = 0 ); + SummaryWidget( TQWidget *parent, const char *name = 0 ); int summaryHeight() const; - QStringList configModules() const; + TQStringList configModules() const; k_dcop: /** @@ -72,11 +72,11 @@ class SummaryWidget : public Kontact::Summary, public DCOPObject /** * Inform the newsticker summary widget that a feed has been added. */ - void documentAdded( QString ); + void documentAdded( TQString ); /** * Inform the newsticker summary widget that a feed has been removed. */ - void documentRemoved( QString ); + void documentRemoved( TQString ); /** * Inform the newsticker summary widget that an error occurred while updating a feed. * @param ref DCOPRef to the failing RSSDocument. @@ -90,23 +90,23 @@ class SummaryWidget : public Kontact::Summary, public DCOPObject protected slots: void updateDocuments(); - void rmbMenu( const QString& ); + void rmbMenu( const TQString& ); protected: - virtual bool eventFilter( QObject *obj, QEvent *e ); + virtual bool eventFilter( TQObject *obj, TQEvent *e ); void initDocuments(); void updateView(); void readConfig(); private: - QVBoxLayout *mLayout; - QWidget* mBaseWidget; + TQVBoxLayout *mLayout; + TQWidget* mBaseWidget; - QPtrList<QLabel> mLabels; + TQPtrList<TQLabel> mLabels; FeedList mFeeds; - QTimer mTimer; + TQTimer mTimer; int mUpdateInterval; int mArticleCount; uint mFeedCounter; |