diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-26 00:38:19 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-26 00:38:19 +0000 |
commit | f0296ef9e1f94e23c00d6f490e565d1dc768416d (patch) | |
tree | 7f3fd9f99621c111ff67f2d62feb5960a3371853 /src/part/radialMap/widget.cpp | |
parent | 3098eb909534268622ce776f9a7bb5310d31b3c1 (diff) | |
download | filelight-f0296ef9e1f94e23c00d6f490e565d1dc768416d.tar.gz filelight-f0296ef9e1f94e23c00d6f490e565d1dc768416d.zip |
TQt4 port Filelight
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/filelight@1233561 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/part/radialMap/widget.cpp')
-rw-r--r-- | src/part/radialMap/widget.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/part/radialMap/widget.cpp b/src/part/radialMap/widget.cpp index 9c82c53..66565c0 100644 --- a/src/part/radialMap/widget.cpp +++ b/src/part/radialMap/widget.cpp @@ -4,10 +4,10 @@ #include <kcursor.h> //ctor #include <klocale.h> #include <kurl.h> -#include <qapplication.h> //sendEvent -#include <qbitmap.h> //ctor - finding cursor size -#include <qcursor.h> //slotPostMouseEvent() -#include <qtimer.h> //member +#include <tqapplication.h> //sendEvent +#include <tqbitmap.h> //ctor - finding cursor size +#include <tqcursor.h> //slotPostMouseEvent() +#include <tqtimer.h> //member #include "Config.h" #include "debug.h" @@ -17,23 +17,23 @@ -RadialMap::Widget::Widget( QWidget *parent, const char *name ) - : QWidget( parent, name, Qt::WNoAutoErase ) +RadialMap::Widget::Widget( TQWidget *tqparent, const char *name ) + : TQWidget( tqparent, name, TQt::WNoAutoErase ) , m_tree( 0 ) , m_focus( 0 ) , m_rootSegment( 0 ) //TODO we don't delete it, *shrug* { setAcceptDrops( true ); - setBackgroundColor( Qt::white ); + setBackgroundColor( TQt::white ); const QBitmap *cursor = KCursor::handCursor().bitmap(); m_tip = new SegmentTip(cursor ? cursor->height() : 16); - connect( this, SIGNAL(created( const Directory* )), SLOT(sendFakeMouseEvent()) ); - connect( this, SIGNAL(created( const Directory* )), SLOT(update()) ); - connect( &m_timer, SIGNAL(timeout()), SLOT(resizeTimeout()) ); + connect( this, TQT_SIGNAL(created( const Directory* )), TQT_SLOT(sendFakeMouseEvent()) ); + connect( this, TQT_SIGNAL(created( const Directory* )), TQT_SLOT(update()) ); + connect( &m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(resizeTimeout()) ); } -QString +TQString RadialMap::Widget::path() const { return m_tree->fullPath(); @@ -46,11 +46,11 @@ RadialMap::Widget::url( File const * const file ) const } void -RadialMap::Widget::invalidate( const bool b ) +RadialMap::Widget::tqinvalidate( const bool b ) { if( isValid() ) { - //**** have to check that only way to invalidate is this function frankly + //**** have to check that only way to tqinvalidate is this function frankly //**** otherwise you may get bugs.. //disable mouse tracking @@ -65,22 +65,22 @@ RadialMap::Widget::invalidate( const bool b ) //FIXME move this disablement thing no? // it is confusing in other areas, like the whole createFromCache() thing - m_map.invalidate( b ); //b signifies whether the pixmap is made to look disabled or not + m_map.tqinvalidate( b ); //b signifies whether the pixmap is made to look disabled or not if( b ) update(); //tell rest of Filelight - emit invalidated( url() ); + emit tqinvalidated( url() ); } } void RadialMap::Widget::create( const Directory *tree ) { - //it is not the responsibility of create() to invalidate first + //it is not the responsibility of create() to tqinvalidate first //skip invalidation at your own risk - //FIXME make it the responsibility of create to invalidate first + //FIXME make it the responsibility of create to tqinvalidate first if( tree ) { @@ -102,16 +102,16 @@ RadialMap::Widget::create( const Directory *tree ) void RadialMap::Widget::createFromCache( const Directory *tree ) { - //no scan was necessary, use cached tree, however we MUST still emit invalidate - invalidate( false ); + //no scan was necessary, use cached tree, however we MUST still emit tqinvalidate + tqinvalidate( false ); create( tree ); } void RadialMap::Widget::sendFakeMouseEvent() //slot { - QMouseEvent me( QEvent::MouseMove, mapFromGlobal( QCursor::pos() ), Qt::NoButton, Qt::NoButton ); - QApplication::sendEvent( this, &me ); + TQMouseEvent me( TQEvent::MouseMove, mapFromGlobal( TQCursor::pos() ), Qt::NoButton, Qt::NoButton ); + TQApplication::sendEvent( this, &me ); } void |