summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/ui/kopetelistview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/libkopete/ui/kopetelistview.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/libkopete/ui/kopetelistview.cpp')
-rw-r--r--kopete/libkopete/ui/kopetelistview.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kopete/libkopete/ui/kopetelistview.cpp b/kopete/libkopete/ui/kopetelistview.cpp
index 594f0920..9630592c 100644
--- a/kopete/libkopete/ui/kopetelistview.cpp
+++ b/kopete/libkopete/ui/kopetelistview.cpp
@@ -22,14 +22,14 @@
#include "kopeteglobal.h"
#include "kopeteprefs.h"
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kglobal.h>
#include <kconfig.h>
#include <kdebug.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qstyle.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
#include <utility>
#include <memory>
@@ -39,25 +39,25 @@ namespace UI {
namespace ListView {
/*
- Custom QToolTip for the list view.
+ Custom TQToolTip for the list view.
The decision whether or not to show tooltips is taken in
- maybeTip(). See also the QListView sources from Qt itself.
+ maybeTip(). See also the TQListView sources from Qt itself.
Delegates to the list view items.
*/
class ToolTip : public QToolTip
{
public:
- ToolTip( QWidget *parent, ListView *lv );
+ ToolTip( TQWidget *parent, ListView *lv );
virtual ~ToolTip();
- void maybeTip( const QPoint &pos );
+ void maybeTip( const TQPoint &pos );
private:
ListView *m_listView;
};
-ToolTip::ToolTip( QWidget *parent, ListView *lv )
- : QToolTip( parent )
+ToolTip::ToolTip( TQWidget *parent, ListView *lv )
+ : TQToolTip( parent )
{
m_listView = lv;
}
@@ -66,14 +66,14 @@ ToolTip::~ToolTip()
{
}
-void ToolTip::maybeTip( const QPoint &pos )
+void ToolTip::maybeTip( const TQPoint &pos )
{
if( !parentWidget() || !m_listView )
return;
if( Item *item = dynamic_cast<Item*>( m_listView->itemAt( pos ) ) )
{
- QRect itemRect = m_listView->itemRect( item );
+ TQRect itemRect = m_listView->itemRect( item );
uint leftMargin = m_listView->treeStepSize() *
( item->depth() + ( m_listView->rootIsDecorated() ? 1 : 0 ) ) +
@@ -81,9 +81,9 @@ void ToolTip::maybeTip( const QPoint &pos )
uint xAdjust = itemRect.left() + leftMargin;
uint yAdjust = itemRect.top();
- QPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust );
+ TQPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust );
- std::pair<QString,QRect> toolTip = item->toolTip( relativePos );
+ std::pair<TQString,TQRect> toolTip = item->toolTip( relativePos );
if ( toolTip.first.isEmpty() )
return;
@@ -96,34 +96,34 @@ void ToolTip::maybeTip( const QPoint &pos )
struct ListView::Private
{
- QTimer sortTimer;
+ TQTimer sortTimer;
std::auto_ptr<ToolTip> toolTip;
//! C-tor
Private() {}
};
-ListView::ListView( QWidget *parent, const char *name )
+ListView::ListView( TQWidget *parent, const char *name )
: KListView( parent, name ), d( new Private )
{
- connect( &d->sortTimer, SIGNAL( timeout() ), this, SLOT( slotSort() ) );
+ connect( &d->sortTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotSort() ) );
- // We have our own tooltips, don't use the default QListView ones
+ // We have our own tooltips, don't use the default TQListView ones
setShowToolTips( false );
d->toolTip.reset( new ToolTip( viewport(), this ) );
- connect( this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ),
- SLOT( slotContextMenu( KListView *, QListViewItem *, const QPoint & ) ) );
- connect( this, SIGNAL( doubleClicked( QListViewItem * ) ),
- SLOT( slotDoubleClicked( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ),
+ TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) );
+ connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ TQT_SLOT( slotDoubleClicked( TQListViewItem * ) ) );
// set up flags for nicer painting
clearWFlags( WStaticContents );
setWFlags( WNoAutoErase );
// clear the appropriate flags from the viewport - qt docs say we have to mask
- // these flags out of the QListView to make weirdly painted list items work, but
+ // these flags out of the TQListView to make weirdly painted list items work, but
// that doesn't do the job. masking them out of the viewport does.
-// class MyWidget : public QWidget { public: using QWidget::clearWFlags; };
+// class MyWidget : public TQWidget { public: using TQWidget::clearWFlags; };
// static_cast<MyWidget*>( viewport() )->clearWFlags( WStaticContents );
// static_cast<MyWidget*>( viewport() )->setWFlags( WNoAutoErase );
@@ -139,7 +139,7 @@ ListView::~ListView()
delete d;
}
-void ListView::slotDoubleClicked( QListViewItem *item )
+void ListView::slotDoubleClicked( TQListViewItem *item )
{
kdDebug( 14000 ) << k_funcinfo << endl;
@@ -148,7 +148,7 @@ void ListView::slotDoubleClicked( QListViewItem *item )
}
void ListView::slotContextMenu( KListView * /*listview*/,
- QListViewItem *item, const QPoint &/*point*/ )
+ TQListViewItem *item, const TQPoint &/*point*/ )
{
if ( item && !item->isSelected() )
{
@@ -179,21 +179,21 @@ void ListView::setShowTreeLines( bool bShowAsTree )
/* This is a small hack ensuring that only F2 triggers inline
* renaming. Won't win a beauty award, but whoever wrote it thinks
- * relying on the fact that QListView intercepts and processes the
+ * relying on the fact that TQListView intercepts and processes the
* F2 event through this event filter is sorta safe.
*
* Also use enter to execute the item since executed is not usually
* called when enter is pressed.
*/
-void ListView::keyPressEvent( QKeyEvent *e )
+void ListView::keyPressEvent( TQKeyEvent *e )
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if ( (e->key() == Qt::Key_F2) && item && item->isVisible() )
rename( item, 0 );
else if ( (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) && item && item->isVisible() )
{
// must provide a point within the item; emitExecute checks for this
- QPoint p = viewport()->mapToGlobal(itemRect(item).center());
+ TQPoint p = viewport()->mapToGlobal(itemRect(item).center());
emitExecute( currentItem(), p, 0 );
}
else