summaryrefslogtreecommitdiffstats
path: root/konq-plugins/sidebar/delicious/mainWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'konq-plugins/sidebar/delicious/mainWidget.cpp')
-rw-r--r--konq-plugins/sidebar/delicious/mainWidget.cpp120
1 files changed, 60 insertions, 60 deletions
diff --git a/konq-plugins/sidebar/delicious/mainWidget.cpp b/konq-plugins/sidebar/delicious/mainWidget.cpp
index 1b76c94..612be03 100644
--- a/konq-plugins/sidebar/delicious/mainWidget.cpp
+++ b/konq-plugins/sidebar/delicious/mainWidget.cpp
@@ -24,12 +24,12 @@
#include "tagListItem.h"
#include "bookmarkListItem.h"
-#include <qlistview.h>
-#include <qdom.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
-#include <qdatetime.h>
+#include <tqlistview.h>
+#include <tqdom.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
#include <kdebug.h>
#include <kio/job.h>
@@ -42,7 +42,7 @@
#include <kconfig.h>
#include <kinputdialog.h>
-MainWidget::MainWidget( KConfig * config, QWidget * parent )
+MainWidget::MainWidget( KConfig * config, TQWidget * parent )
: MainWidget_base( parent ), m_config( config )
{
loadTags();
@@ -53,28 +53,28 @@ MainWidget::MainWidget( KConfig * config, QWidget * parent )
btnRefreshBookmarks->setIconSet( il->loadIconSet( "reload", KIcon::Small ) );
btnNew->setIconSet( il->loadIconSet( "bookmark_add", KIcon::Small ) );
- connect( ( QWidget * ) btnRefreshTags, SIGNAL( clicked() ),
- this, SLOT( slotGetTags() ) );
+ connect( ( TQWidget * ) btnRefreshTags, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotGetTags() ) );
- connect( ( QWidget * ) btnRefreshBookmarks, SIGNAL( clicked() ),
- this, SLOT( slotGetBookmarks() ) );
+ connect( ( TQWidget * ) btnRefreshBookmarks, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotGetBookmarks() ) );
- connect( ( QWidget * ) btnNew, SIGNAL( clicked() ),
- this, SLOT( slotNewBookmark() ) );
+ connect( ( TQWidget * ) btnNew, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotNewBookmark() ) );
- connect( lvBookmarks, SIGNAL( executed( QListViewItem * ) ),
- this, SLOT( slotBookmarkExecuted( QListViewItem * ) ) );
- connect( lvBookmarks, SIGNAL( mouseButtonClicked ( int, QListViewItem *, const QPoint &, int ) ),
- this, SLOT( slotBookmarkClicked( int, QListViewItem *, const QPoint &, int ) ) );
+ connect( lvBookmarks, TQT_SIGNAL( executed( TQListViewItem * ) ),
+ this, TQT_SLOT( slotBookmarkExecuted( TQListViewItem * ) ) );
+ connect( lvBookmarks, TQT_SIGNAL( mouseButtonClicked ( int, TQListViewItem *, const TQPoint &, int ) ),
+ this, TQT_SLOT( slotBookmarkClicked( int, TQListViewItem *, const TQPoint &, int ) ) );
- connect( lvTags, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint &, int ) ),
- this, SLOT( slotTagsContextMenu( QListViewItem *, const QPoint &, int ) ) );
+ connect( lvTags, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ),
+ this, TQT_SLOT( slotTagsContextMenu( TQListViewItem *, const TQPoint &, int ) ) );
- connect( lvBookmarks, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint &, int ) ),
- this, SLOT( slotBookmarksContextMenu( QListViewItem *, const QPoint &, int ) ) );
+ connect( lvBookmarks, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ),
+ this, TQT_SLOT( slotBookmarksContextMenu( TQListViewItem *, const TQPoint &, int ) ) );
- m_updateTimer = new QTimer( this );
- connect( m_updateTimer, SIGNAL( timeout() ), SLOT( slotGetBookmarks() ) );
+ m_updateTimer = new TQTimer( this );
+ connect( m_updateTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotGetBookmarks() ) );
slotGetTags();
}
@@ -94,8 +94,8 @@ void MainWidget::slotGetTags()
kdDebug() << k_funcinfo << endl;
KIO::StoredTransferJob * job = KIO::storedGet( "http://del.icio.us/api/tags/get" );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotFillTags( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotFillTags( KIO::Job * ) ) );
}
void MainWidget::slotFillTags( KIO::Job * job )
@@ -112,17 +112,17 @@ void MainWidget::slotFillTags( KIO::Job * job )
m_tags.clear();
// fill lvTags with job->data()
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( static_cast<KIO::StoredTransferJob *>( job )->data() );
- QDomNodeList tags = doc.elementsByTagName( "tag" );
+ TQDomNodeList tags = doc.elementsByTagName( "tag" );
for ( uint i = 0; i < tags.length(); ++i )
{
- QDomElement tag = tags.item( i ).toElement();
+ TQDomElement tag = tags.item( i ).toElement();
if ( !tag.isNull() )
{
TagListItem *item = new TagListItem( lvTags, tag.attribute( "tag" ), tag.attribute( "count" ).toInt() );
m_tags.append( tag.attribute( "tag" ) );
- connect( item, SIGNAL( signalItemChecked( TagListItem * ) ), SLOT( itemToggled() ) );
+ connect( item, TQT_SIGNAL( signalItemChecked( TagListItem * ) ), TQT_SLOT( itemToggled() ) );
}
}
}
@@ -135,8 +135,8 @@ void MainWidget::slotGetBookmarks()
kdDebug() << k_funcinfo << url.url() << endl;
KIO::StoredTransferJob * job = KIO::storedGet( url );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotFillBookmarks( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotFillBookmarks( KIO::Job * ) ) );
}
void MainWidget::slotFillBookmarks( KIO::Job * job )
@@ -152,13 +152,13 @@ void MainWidget::slotFillBookmarks( KIO::Job * job )
lvBookmarks->clear();
// fill lvBookmarks with job->data()
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( static_cast<KIO::StoredTransferJob *>( job )->data() );
- QDomNodeList posts = doc.elementsByTagName( "post" );
+ TQDomNodeList posts = doc.elementsByTagName( "post" );
for ( uint i = 0; i < posts.length(); ++i )
{
- QDomElement post = posts.item( i ).toElement();
+ TQDomElement post = posts.item( i ).toElement();
if ( !post.isNull() )
{
new BookmarkListItem( lvBookmarks, post.attribute( "href" ), post.attribute( "description" ),
@@ -167,11 +167,11 @@ void MainWidget::slotFillBookmarks( KIO::Job * job )
}
}
-QStringList MainWidget::checkedTags() const
+TQStringList MainWidget::checkedTags() const
{
- QListViewItemIterator it( lvTags, QListViewItemIterator::Visible | QListViewItemIterator::Checked );
+ TQListViewItemIterator it( lvTags, TQListViewItemIterator::Visible | TQListViewItemIterator::Checked );
- QStringList tmp;
+ TQStringList tmp;
while ( it.current() )
{
@@ -182,7 +182,7 @@ QStringList MainWidget::checkedTags() const
return tmp;
}
-void MainWidget::slotBookmarkExecuted( QListViewItem * item )
+void MainWidget::slotBookmarkExecuted( TQListViewItem * item )
{
BookmarkListItem * bookmark = static_cast<BookmarkListItem *>( item );
if ( bookmark )
@@ -192,7 +192,7 @@ void MainWidget::slotBookmarkExecuted( QListViewItem * item )
}
}
-void MainWidget::slotBookmarkClicked( int button, QListViewItem * item, const QPoint &, int )
+void MainWidget::slotBookmarkClicked( int button, TQListViewItem * item, const TQPoint &, int )
{
BookmarkListItem * bookmark = static_cast<BookmarkListItem *>( item );
if ( bookmark && button == Qt::MidButton ) // handle middle click
@@ -202,16 +202,16 @@ void MainWidget::slotBookmarkClicked( int button, QListViewItem * item, const QP
}
}
-QStringList MainWidget::tags() const
+TQStringList MainWidget::tags() const
{
return m_tags;
}
-QStringList MainWidget::bookmarks() const
+TQStringList MainWidget::bookmarks() const
{
- QListViewItemIterator it( lvBookmarks );
+ TQListViewItemIterator it( lvBookmarks );
- QStringList tmp;
+ TQStringList tmp;
while ( it.current() )
{
@@ -222,30 +222,30 @@ QStringList MainWidget::bookmarks() const
return tmp;
}
-void MainWidget::slotTagsContextMenu( QListViewItem *, const QPoint & pos, int )
+void MainWidget::slotTagsContextMenu( TQListViewItem *, const TQPoint & pos, int )
{
if ( lvTags->childCount() == 0 )
return;
- QPopupMenu * tagMenu = new QPopupMenu( this );
+ TQPopupMenu * tagMenu = new TQPopupMenu( this );
Q_CHECK_PTR( tagMenu );
- tagMenu->insertItem( i18n( "Check All" ), this, SLOT( slotCheckAllTags() ) );
- tagMenu->insertItem( i18n( "Uncheck All" ), this, SLOT( slotUncheckAllTags() ) );
- tagMenu->insertItem( i18n( "Toggle All" ), this, SLOT( slotToggleTags() ) );
+ tagMenu->insertItem( i18n( "Check All" ), this, TQT_SLOT( slotCheckAllTags() ) );
+ tagMenu->insertItem( i18n( "Uncheck All" ), this, TQT_SLOT( slotUncheckAllTags() ) );
+ tagMenu->insertItem( i18n( "Toggle All" ), this, TQT_SLOT( slotToggleTags() ) );
tagMenu->insertSeparator();
tagMenu->insertItem( KGlobal::iconLoader()->loadIconSet( "edit", KIcon::Small ),
- i18n( "Rename Tag..." ), this, SLOT( slotRenameTag() ) );
+ i18n( "Rename Tag..." ), this, TQT_SLOT( slotRenameTag() ) );
tagMenu->exec( pos );
}
void MainWidget::slotCheckAllTags()
{
- QListViewItemIterator it( lvTags );
+ TQListViewItemIterator it( lvTags );
while ( it.current() )
{
- QCheckListItem * item = static_cast<QCheckListItem *>( *it );
+ TQCheckListItem * item = static_cast<TQCheckListItem *>( *it );
if ( item )
item->setOn( true );
++it;
@@ -254,10 +254,10 @@ void MainWidget::slotCheckAllTags()
void MainWidget::slotUncheckAllTags()
{
- QListViewItemIterator it( lvTags );
+ TQListViewItemIterator it( lvTags );
while ( it.current() )
{
- QCheckListItem * item = static_cast<QCheckListItem *>( *it );
+ TQCheckListItem * item = static_cast<TQCheckListItem *>( *it );
if ( item )
item->setOn( false );
++it;
@@ -266,10 +266,10 @@ void MainWidget::slotUncheckAllTags()
void MainWidget::slotToggleTags()
{
- QListViewItemIterator it( lvTags );
+ TQListViewItemIterator it( lvTags );
while ( it.current() )
{
- QCheckListItem * item = static_cast<QCheckListItem *>( *it );
+ TQCheckListItem * item = static_cast<TQCheckListItem *>( *it );
if ( item )
item->setOn( !item->isOn() );
++it;
@@ -301,8 +301,8 @@ void MainWidget::slotRenameTag()
TagListItem * tag = static_cast<TagListItem *>( lvTags->currentItem() );
if ( tag )
{
- QString oldName = tag->name();
- QString newName = KInputDialog::getText( i18n( "Rename Tag" ), i18n( "Provide a new name for tag '%1':" ).arg( oldName ) );
+ TQString oldName = tag->name();
+ TQString newName = KInputDialog::getText( i18n( "Rename Tag" ), i18n( "Provide a new name for tag '%1':" ).arg( oldName ) );
if ( !newName.isEmpty() )
{
KURL url( "http://del.icio.us/api/tags/rename" );
@@ -315,16 +315,16 @@ void MainWidget::slotRenameTag()
}
}
-void MainWidget::slotBookmarksContextMenu( QListViewItem *, const QPoint & pos, int )
+void MainWidget::slotBookmarksContextMenu( TQListViewItem *, const TQPoint & pos, int )
{
if ( lvBookmarks->childCount() == 0 )
return;
- QPopupMenu * menu = new QPopupMenu( this );
+ TQPopupMenu * menu = new TQPopupMenu( this );
Q_CHECK_PTR( menu );
menu->insertItem( KGlobal::iconLoader()->loadIconSet( "editdelete", KIcon::Small ),
- i18n( "Delete Bookmark" ), this, SLOT( slotDeleteBookmark() ) );
+ i18n( "Delete Bookmark" ), this, TQT_SLOT( slotDeleteBookmark() ) );
menu->exec( pos );
}