summaryrefslogtreecommitdiffstats
path: root/knode/kncollectionview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /knode/kncollectionview.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knode/kncollectionview.cpp')
-rw-r--r--knode/kncollectionview.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/knode/kncollectionview.cpp b/knode/kncollectionview.cpp
index 2d48a9e5d..63542cad4 100644
--- a/knode/kncollectionview.cpp
+++ b/knode/kncollectionview.cpp
@@ -11,8 +11,8 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qcursor.h>
-#include <qheader.h>
+#include <tqcursor.h>
+#include <tqheader.h>
#include <kiconloader.h>
#include <klistview.h>
@@ -32,7 +32,7 @@
#include "kncollectionview.h"
#include "kncollectionviewitem.h"
-KNCollectionView::KNCollectionView(QWidget *parent, const char* name) :
+KNCollectionView::KNCollectionView(TQWidget *parent, const char* name) :
KFolderTree(parent, name),
mActiveItem( 0 ),
mPopup( 0 )
@@ -49,8 +49,8 @@ KNCollectionView::KNCollectionView(QWidget *parent, const char* name) :
mPopup = new KPopupMenu( this );
mPopup->insertTitle( i18n("View Columns") );
mPopup->setCheckable( true );
- mUnreadPop = mPopup->insertItem( i18n("Unread Column"), this, SLOT(toggleUnreadColumn()) );
- mTotalPop = mPopup->insertItem( i18n("Total Column"), this, SLOT(toggleTotalColumn()) );
+ mUnreadPop = mPopup->insertItem( i18n("Unread Column"), this, TQT_SLOT(toggleUnreadColumn()) );
+ mTotalPop = mPopup->insertItem( i18n("Total Column"), this, TQT_SLOT(toggleTotalColumn()) );
// add unread and total columns if necessary
readConfig();
@@ -61,21 +61,21 @@ KNCollectionView::KNCollectionView(QWidget *parent, const char* name) :
// connect to the account manager
KNAccountManager* am = knGlobals.accountManager();
- connect(am, SIGNAL(accountAdded(KNNntpAccount*)), SLOT(addAccount(KNNntpAccount*)));
- connect(am, SIGNAL(accountRemoved(KNNntpAccount*)), SLOT(removeAccount(KNNntpAccount*)));
- connect(am, SIGNAL(accountModified(KNNntpAccount*)), SLOT(updateAccount(KNNntpAccount*)));
+ connect(am, TQT_SIGNAL(accountAdded(KNNntpAccount*)), TQT_SLOT(addAccount(KNNntpAccount*)));
+ connect(am, TQT_SIGNAL(accountRemoved(KNNntpAccount*)), TQT_SLOT(removeAccount(KNNntpAccount*)));
+ connect(am, TQT_SIGNAL(accountModified(KNNntpAccount*)), TQT_SLOT(updateAccount(KNNntpAccount*)));
// connect to the group manager
KNGroupManager* gm = knGlobals.groupManager();
- connect(gm, SIGNAL(groupAdded(KNGroup*)), SLOT(addGroup(KNGroup*)));
- connect(gm, SIGNAL(groupRemoved(KNGroup*)), SLOT(removeGroup(KNGroup*)));
- connect(gm, SIGNAL(groupUpdated(KNGroup*)), SLOT(updateGroup(KNGroup*)));
+ connect(gm, TQT_SIGNAL(groupAdded(KNGroup*)), TQT_SLOT(addGroup(KNGroup*)));
+ connect(gm, TQT_SIGNAL(groupRemoved(KNGroup*)), TQT_SLOT(removeGroup(KNGroup*)));
+ connect(gm, TQT_SIGNAL(groupUpdated(KNGroup*)), TQT_SLOT(updateGroup(KNGroup*)));
// connect to the folder manager
KNFolderManager* fm = knGlobals.folderManager();
- connect(fm, SIGNAL(folderAdded(KNFolder*)), SLOT(addPendingFolders()));
- connect(fm, SIGNAL(folderRemoved(KNFolder*)), SLOT(removeFolder(KNFolder*)));
- connect(fm, SIGNAL(folderActivated(KNFolder*)), SLOT(activateFolder(KNFolder*)));
+ connect(fm, TQT_SIGNAL(folderAdded(KNFolder*)), TQT_SLOT(addPendingFolders()));
+ connect(fm, TQT_SIGNAL(folderRemoved(KNFolder*)), TQT_SLOT(removeFolder(KNFolder*)));
+ connect(fm, TQT_SIGNAL(folderActivated(KNFolder*)), TQT_SLOT(activateFolder(KNFolder*)));
installEventFilter(this);
}
@@ -118,13 +118,13 @@ void KNCollectionView::readConfig()
KNConfig::Appearance *app = knGlobals.configManager()->appearance();
setFont( app->groupListFont() );
- QPalette p = palette();
- p.setColor( QColorGroup::Base, app->backgroundColor() );
- p.setColor( QColorGroup::Text, app->textColor() );
+ TQPalette p = palette();
+ p.setColor( TQColorGroup::Base, app->backgroundColor() );
+ p.setColor( TQColorGroup::Text, app->textColor() );
setPalette( p );
setAlternateBackground( app->backgroundColor() );
// FIXME: make this configurable
- mPaintInfo.colUnread = QColor( "blue" );
+ mPaintInfo.colUnread = TQColor( "blue" );
mPaintInfo.colFore = app->textColor();
mPaintInfo.colBack = app->backgroundColor();
}
@@ -149,8 +149,8 @@ void KNCollectionView::addAccount(KNNntpAccount *a)
item->setOpen( a->wasOpen() );
// add groups for this account
- QValueList<KNGroup*> groups = knGlobals.groupManager()->groupsOfAccount( a );
- for ( QValueList<KNGroup*>::Iterator it = groups.begin(); it != groups.end(); ++it ) {
+ TQValueList<KNGroup*> groups = knGlobals.groupManager()->groupsOfAccount( a );
+ for ( TQValueList<KNGroup*>::Iterator it = groups.begin(); it != groups.end(); ++it ) {
KNCollectionViewItem *gitem = new KNCollectionViewItem( item, KFolderTreeItem::News );
(*it)->setListItem( gitem );
(*it)->updateListItem();
@@ -179,7 +179,7 @@ void KNCollectionView::updateAccount(KNNntpAccount *a)
void KNCollectionView::reloadAccounts()
{
KNAccountManager* am = knGlobals.accountManager();
- QValueList<KNNntpAccount*>::Iterator it;
+ TQValueList<KNNntpAccount*>::Iterator it;
for ( it = am->begin(); it != am->end(); ++it ) {
removeAccount( *it );
addAccount( *it );
@@ -269,12 +269,12 @@ void KNCollectionView::reloadFolders()
void KNCollectionView::addPendingFolders()
{
- QValueList<KNFolder*> folders = knGlobals.folderManager()->folders();
- for ( QValueList<KNFolder*>::Iterator it = folders.begin(); it != folders.end(); ++it )
+ TQValueList<KNFolder*> folders = knGlobals.folderManager()->folders();
+ for ( TQValueList<KNFolder*>::Iterator it = folders.begin(); it != folders.end(); ++it )
if ( !(*it)->listItem() )
addFolder( (*it) );
// now open the folders if they were open in the last session
- for ( QValueList<KNFolder*>::Iterator it = folders.begin(); it != folders.end(); ++it )
+ for ( TQValueList<KNFolder*>::Iterator it = folders.begin(); it != folders.end(); ++it )
if ( (*it)->listItem())
(*it)->listItem()->setOpen( (*it)->wasOpen() );
}
@@ -299,7 +299,7 @@ void KNCollectionView::reload()
reloadFolders();
}
-void KNCollectionView::setActive( QListViewItem *i )
+void KNCollectionView::setActive( TQListViewItem *i )
{
if (!i || mActiveItem == i)
return;
@@ -328,7 +328,7 @@ void KNCollectionView::prevGroup()
void KNCollectionView::decCurrentFolder()
{
- QListViewItemIterator it( currentItem() );
+ TQListViewItemIterator it( currentItem() );
--it;
KFolderTreeItem* fti = static_cast<KFolderTreeItem*>(it.current());
if (fti) {
@@ -341,7 +341,7 @@ void KNCollectionView::decCurrentFolder()
void KNCollectionView::incCurrentFolder()
{
- QListViewItemIterator it( currentItem() );
+ TQListViewItemIterator it( currentItem() );
++it;
KFolderTreeItem* fti = static_cast<KFolderTreeItem*>(it.current());
if (fti) {
@@ -362,12 +362,12 @@ void KNCollectionView::selectCurrentFolder()
}
-QDragObject* KNCollectionView::dragObject()
+TQDragObject* KNCollectionView::dragObject()
{
KFolderTreeItem *item = static_cast<KFolderTreeItem*>
- (itemAt(viewport()->mapFromGlobal(QCursor::pos())));
+ (itemAt(viewport()->mapFromGlobal(TQCursor::pos())));
if ( item && item->protocol() == KFolderTreeItem::Local && item->type() == KFolderTreeItem::Other ) {
- QDragObject *d = new QStoredDrag( "x-knode-drag/folder", viewport() );
+ TQDragObject *d = new TQStoredDrag( "x-knode-drag/folder", viewport() );
d->setPixmap( SmallIcon("folder") );
return d;
}
@@ -375,10 +375,10 @@ QDragObject* KNCollectionView::dragObject()
}
-void KNCollectionView::contentsDropEvent( QDropEvent *e )
+void KNCollectionView::contentsDropEvent( TQDropEvent *e )
{
cleanItemHighlighter(); // necessary since we overwrite KListView::contentsDropEvent()
- QListViewItem *item = itemAt( contentsToViewport(e->pos()) );
+ TQListViewItem *item = itemAt( contentsToViewport(e->pos()) );
KNCollectionViewItem *fti = static_cast<KNCollectionViewItem*>(item);
if (fti && (fti->coll) && acceptDrag(e)) {
emit folderDrop( e, fti );
@@ -419,20 +419,20 @@ void KNCollectionView::updatePopup() const
-bool KNCollectionView::eventFilter(QObject *o, QEvent *e)
+bool KNCollectionView::eventFilter(TQObject *o, TQEvent *e)
{
- if ((e->type() == QEvent::KeyPress) && (static_cast<QKeyEvent*>(e)->key() == Key_Tab)) {
+ if ((e->type() == TQEvent::KeyPress) && (static_cast<TQKeyEvent*>(e)->key() == Key_Tab)) {
emit(focusChangeRequest(this));
if (!hasFocus()) // focusChangeRequest was successful
return true;
}
// header popup menu
- if ( e->type() == QEvent::MouseButtonPress &&
- static_cast<QMouseEvent*>(e)->button() == RightButton &&
- o->isA("QHeader") )
+ if ( e->type() == TQEvent::MouseButtonPress &&
+ static_cast<TQMouseEvent*>(e)->button() == RightButton &&
+ o->isA("TQHeader") )
{
- mPopup->popup( static_cast<QMouseEvent*>(e)->globalPos() );
+ mPopup->popup( static_cast<TQMouseEvent*>(e)->globalPos() );
return true;
}
@@ -440,16 +440,16 @@ bool KNCollectionView::eventFilter(QObject *o, QEvent *e)
}
-void KNCollectionView::focusInEvent(QFocusEvent *e)
+void KNCollectionView::focusInEvent(TQFocusEvent *e)
{
- QListView::focusInEvent(e);
+ TQListView::focusInEvent(e);
emit focusChanged(e);
}
-void KNCollectionView::focusOutEvent(QFocusEvent *e)
+void KNCollectionView::focusOutEvent(TQFocusEvent *e)
{
- QListView::focusOutEvent(e);
+ TQListView::focusOutEvent(e);
emit focusChanged(e);
}