diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kontact/plugins/newsticker/kcmkontactknt.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kontact/plugins/newsticker/kcmkontactknt.cpp')
-rw-r--r-- | kontact/plugins/newsticker/kcmkontactknt.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/kontact/plugins/newsticker/kcmkontactknt.cpp b/kontact/plugins/newsticker/kcmkontactknt.cpp index 0b0a98a33..07a8aebd0 100644 --- a/kontact/plugins/newsticker/kcmkontactknt.cpp +++ b/kontact/plugins/newsticker/kcmkontactknt.cpp @@ -17,8 +17,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include <tqgroupbox.h> @@ -49,15 +49,15 @@ extern "C" { - KDE_EXPORT KCModule *create_kontactknt( TQWidget *parent, const char * ) + KDE_EXPORT KCModule *create_kontactknt( TQWidget *tqparent, const char * ) { - return new KCMKontactKNT( parent, "kcmkontactknt" ); + return new KCMKontactKNT( tqparent, "kcmkontactknt" ); } } -NewsEditDialog::NewsEditDialog( const TQString& title, const TQString& url, TQWidget *parent ) +NewsEditDialog::NewsEditDialog( const TQString& title, const TQString& url, TQWidget *tqparent ) : KDialogBase( Plain, i18n( "New News Feed" ), Ok | Cancel, - Ok, parent, 0, true, true ) + Ok, tqparent, 0, true, true ) { TQWidget *page = plainPage(); TQGridLayout *tqlayout = new TQGridLayout( page, 2, 3, marginHint(), @@ -103,17 +103,17 @@ TQString NewsEditDialog::url() const return mURL->text(); } -class NewsItem : public QListViewItem +class NewsItem : public TQListViewItem { public: - NewsItem( TQListView *parent, const TQString& title, const TQString& url, bool custom ) - : TQListViewItem( parent ), mTitle( title ), mUrl( url ), mCustom( custom ) + NewsItem( TQListView *tqparent, const TQString& title, const TQString& url, bool custom ) + : TQListViewItem( tqparent ), mTitle( title ), mUrl( url ), mCustom( custom ) { setText( 0, mTitle ); } - NewsItem( TQListViewItem *parent, const TQString& title, const TQString& url, bool custom ) - : TQListViewItem( parent ), mTitle( title ), mUrl( url ), mCustom( custom ) + NewsItem( TQListViewItem *tqparent, const TQString& title, const TQString& url, bool custom ) + : TQListViewItem( tqparent ), mTitle( title ), mUrl( url ), mCustom( custom ) { setText( 0, mTitle ); } @@ -128,8 +128,8 @@ class NewsItem : public QListViewItem bool mCustom; }; -KCMKontactKNT::KCMKontactKNT( TQWidget *parent, const char *name ) - : KCModule( parent, name ) +KCMKontactKNT::KCMKontactKNT( TQWidget *tqparent, const char *name ) + : KCModule( tqparent, name ) { initGUI(); @@ -153,22 +153,22 @@ KCMKontactKNT::KCMKontactKNT( TQWidget *parent, const char *name ) void KCMKontactKNT::loadNews() { - TQValueVector<TQListViewItem*> parents; + TQValueVector<TQListViewItem*> tqparents; TQValueVector<TQListViewItem*>::Iterator it; - 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" ) ) ); + tqparents.append( new TQListViewItem( mAllNews, i18n( "Arts" ) ) ); + tqparents.append( new TQListViewItem( mAllNews, i18n( "Business" ) ) ); + tqparents.append( new TQListViewItem( mAllNews, i18n( "Computers" ) ) ); + tqparents.append( new TQListViewItem( mAllNews, i18n( "Misc" ) ) ); + tqparents.append( new TQListViewItem( mAllNews, i18n( "Recreation" ) ) ); + tqparents.append( new TQListViewItem( mAllNews, i18n( "Society" ) ) ); - for ( it = parents.begin(); it != parents.end(); ++it ) + for ( it = tqparents.begin(); it != tqparents.end(); ++it ) (*it)->setSelectable( false ); for ( int i = 0; i < DEFAULT_NEWSSOURCES; ++i ) { NewsSourceData data = NewsSourceDefault[ i ]; - new NewsItem( parents[ data.category() ], data.name(), data.url(), false ); + new NewsItem( tqparents[ data.category() ], data.name(), data.url(), false ); mFeedMap.insert( data.url(), data.name() ); } } @@ -271,7 +271,7 @@ void KCMKontactKNT::deleteFeed() if ( !item ) return; - if ( mCustomFeeds.find( item ) == mCustomFeeds.end() ) + if ( mCustomFeeds.tqfind( item ) == mCustomFeeds.end() ) return; mCustomFeeds.remove( item ); @@ -317,7 +317,7 @@ void KCMKontactKNT::allCurrentChanged( TQListViewItem *item ) bool delState = false; if ( newsItem && newsItem->isSelected() ) { addState = true; - delState = (mCustomFeeds.find( newsItem ) != mCustomFeeds.end()); + delState = (mCustomFeeds.tqfind( newsItem ) != mCustomFeeds.end()); } mAddButton->setEnabled( addState ); @@ -356,7 +356,7 @@ void KCMKontactKNT::initGUI() mSelectedNews->setFullWidth( true ); tqlayout->addWidget( mSelectedNews, 0, 2 ); - TQGroupBox *box = new TQGroupBox( 0, Qt::Vertical, + TQGroupBox *box = new TQGroupBox( 0, TQt::Vertical, i18n( "News Feed Settings" ), this ); TQGridLayout *boxLayout = new TQGridLayout( box->tqlayout(), 2, 3, |