diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kivio/kiviopart/kivio_icon_view.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kivio/kiviopart/kivio_icon_view.cpp')
-rw-r--r-- | kivio/kiviopart/kivio_icon_view.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/kivio/kiviopart/kivio_icon_view.cpp b/kivio/kiviopart/kivio_icon_view.cpp index 9a1c3b29..01e110e0 100644 --- a/kivio/kiviopart/kivio_icon_view.cpp +++ b/kivio/kiviopart/kivio_icon_view.cpp @@ -26,23 +26,23 @@ #include "kivioglobal.h" #include "kivio_stencil.h" -#include <qbrush.h> -#include <qcursor.h> -#include <qpalette.h> +#include <tqbrush.h> +#include <tqcursor.h> +#include <tqpalette.h> #include <klocale.h> #include <kdebug.h> #include <kglobalsettings.h> KivioStencilSpawner* KivioIconView::m_pCurDrag = 0L; -QPtrList<KivioIconView> KivioIconView::objList; +TQPtrList<KivioIconView> KivioIconView::objList; /********************************************************************** * * KivioIconViewItem * **********************************************************************/ -KivioIconViewItem::KivioIconViewItem( QIconView *parent ) - : QIconViewItem( parent ) +KivioIconViewItem::KivioIconViewItem( TQIconView *tqparent ) + : TQIconViewItem( tqparent ) { m_pSpawner = NULL; setText("stencil"); @@ -74,7 +74,7 @@ void KivioIconViewItem::setStencilSpawner( KivioStencilSpawner *pSpawn ) } -bool KivioIconViewItem::acceptDrop( const QMimeSource * ) const +bool KivioIconViewItem::acceptDrop( const TQMimeSource * ) const { return false; } @@ -85,8 +85,8 @@ bool KivioIconViewItem::acceptDrop( const QMimeSource * ) const * KivioIconView * **********************************************************************/ -KivioIconView::KivioIconView( bool _readWrite,QWidget *parent, const char *name ) -: QIconView( parent, name ) +KivioIconView::KivioIconView( bool _readWrite,TQWidget *tqparent, const char *name ) +: TQIconView( tqparent, name ) { m_pSpawnerSet = NULL; m_pCurDrag = NULL; @@ -108,8 +108,8 @@ KivioIconView::KivioIconView( bool _readWrite,QWidget *parent, const char *name setAcceptDrops(false); viewport()->setAcceptDrops(false); if(isReadWrite) { - connect(this, SIGNAL(doubleClicked(QIconViewItem*)), this, SLOT(slotDoubleClicked(QIconViewItem*))); - connect(this, SIGNAL(clicked(QIconViewItem*)), this, SLOT(slotClicked(QIconViewItem*))); + connect(this, TQT_SIGNAL(doubleClicked(TQIconViewItem*)), this, TQT_SLOT(slotDoubleClicked(TQIconViewItem*))); + connect(this, TQT_SIGNAL(clicked(TQIconViewItem*)), this, TQT_SLOT(slotClicked(TQIconViewItem*))); } } @@ -138,12 +138,12 @@ void KivioIconView::setStencilSpawnerSet( KivioStencilSpawnerSet *pSet ) } } -QDragObject *KivioIconView::dragObject() +TQDragObject *KivioIconView::dragObject() { if( !currentItem() || !isReadWrite) return 0; - QPoint orig = viewportToContents( viewport()->mapFromGlobal( QCursor::pos() ) ); + TQPoint orig = viewportToContents( viewport()->mapFromGlobal( TQCursor::pos() ) ); KivioSpawnerDrag *drag = new KivioSpawnerDrag( this, viewport() ); const char*null_pix[]={ @@ -154,17 +154,17 @@ QDragObject *KivioIconView::dragObject() KivioIconViewItem *item = (KivioIconViewItem *)currentItem(); - QIconDragItem id; - QString full; + TQIconDragItem id; + TQString full; full = item->spawner()->set()->dir() + "/" + item->spawner()->info()->title(); - id.setData( QCString(full.ascii())); + id.setData( TQCString(full.ascii())); drag->append( id, - QRect( item->pixmapRect(FALSE).x() - orig.x(), + TQRect( item->pixmapRect(FALSE).x() - orig.x(), item->pixmapRect(FALSE).y() - orig.y(), item->pixmapRect().width(), item->pixmapRect().height() ), - QRect( item->textRect(FALSE).x() - orig.x(), + TQRect( item->textRect(FALSE).x() - orig.x(), item->textRect(FALSE).y() - orig.y(), item->textRect().width(), item->textRect().height() ), @@ -187,9 +187,9 @@ void KivioIconView::clearCurrentDrag() } -void KivioIconView::slotDoubleClicked( QIconViewItem *pQtItem ) +void KivioIconView::slotDoubleClicked( TQIconViewItem *pTQtItem ) { - KivioIconViewItem* pItem = dynamic_cast<KivioIconViewItem *>(pQtItem); + KivioIconViewItem* pItem = dynamic_cast<KivioIconViewItem *>(pTQtItem); if( !pItem ) { @@ -202,7 +202,7 @@ void KivioIconView::slotDoubleClicked( QIconViewItem *pQtItem ) emit createNewStencil(pSpawner); } -void KivioIconView::slotClicked(QIconViewItem* item) +void KivioIconView::slotClicked(TQIconViewItem* item) { KivioIconViewItem* stencilItem = dynamic_cast<KivioIconViewItem *>(item); |