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 /lib/kopainter/koIconChooser.h | |
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 'lib/kopainter/koIconChooser.h')
-rw-r--r-- | lib/kopainter/koIconChooser.h | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/lib/kopainter/koIconChooser.h b/lib/kopainter/koIconChooser.h index 5beb25a0..df69fd72 100644 --- a/lib/kopainter/koIconChooser.h +++ b/lib/kopainter/koIconChooser.h @@ -21,9 +21,9 @@ #ifndef __ko_iconchooser_h__ #define __ko_iconchooser_h__ -#include <qgridview.h> -#include <qptrlist.h> -#include <qpixmap.h> +#include <tqgridview.h> +#include <tqptrlist.h> +#include <tqpixmap.h> #include <koffice_export.h> class KoIconItem @@ -39,32 +39,33 @@ public: virtual int spacing() const {return 0; } virtual void setSpacing(int) {} - virtual QPixmap &pixmap() const = 0; - virtual QPixmap &thumbPixmap() const = 0; + virtual TQPixmap &pixmap() const = 0; + virtual TQPixmap &thumbPixmap() const = 0; // Return -1 if this is less than other, 0 if equal, 1 if greater than. virtual int compare(const KoIconItem */*other*/) const { return 0; } }; -class KoPixmapWidget : public QFrame +class KoPixmapWidget : public TQFrame { public: - KoPixmapWidget(const QPixmap &aPixmap, QWidget *parent = 0L, const char *name = 0L); + KoPixmapWidget(const TQPixmap &aPixmap, TQWidget *tqparent = 0L, const char *name = 0L); ~KoPixmapWidget(); protected: - void paintEvent(QPaintEvent *e); - void mouseReleaseEvent( QMouseEvent *e); + void paintEvent(TQPaintEvent *e); + void mouseReleaseEvent( TQMouseEvent *e); private: - QPixmap mPixmap; + TQPixmap mPixmap; }; -class KOPAINTER_EXPORT KoIconChooser: public QGridView +class KOPAINTER_EXPORT KoIconChooser: public TQGridView { Q_OBJECT + TQ_OBJECT public: // To make the items sorted, set 'sort' to true and override KoIconItem::compare(). - KoIconChooser(QSize iconSize, QWidget *parent = 0L, const char *name = 0L, bool sort = false); + KoIconChooser(TQSize iconSize, TQWidget *tqparent = 0L, const char *name = 0L, bool sort = false); virtual ~KoIconChooser(); bool autoDelete() const {return mIconList.autoDelete(); } @@ -87,22 +88,22 @@ signals: void selected(KoIconItem *item); protected: - void keyPressEvent(QKeyEvent *e); - void mousePressEvent( QMouseEvent *e); - void mouseReleaseEvent( QMouseEvent *e); - void mouseMoveEvent( QMouseEvent *e); - void resizeEvent(QResizeEvent *e); - void paintCell(QPainter *p, int row, int col); + void keyPressEvent(TQKeyEvent *e); + void mousePressEvent( TQMouseEvent *e); + void mouseReleaseEvent( TQMouseEvent *e); + void mouseMoveEvent( TQMouseEvent *e); + void resizeEvent(TQResizeEvent *e); + void paintCell(TQPainter *p, int row, int col); virtual void startDrag(); private: int cellIndex(int row, int col); void calculateCells(); - void showFullPixmap(const QPixmap &pix, const QPoint &p); + void showFullPixmap(const TQPixmap &pix, const TQPoint &p); int sortInsertionIndex(const KoIconItem *item); private: - QPtrList<KoIconItem> mIconList; + TQPtrList<KoIconItem> mIconList; KoPixmapWidget *mPixmapWidget; int mItemWidth; int mItemHeight; @@ -111,7 +112,7 @@ private: int mCurRow; int mCurCol; int mMargin; - QPoint mDragStartPos; + TQPoint mDragStartPos; bool mMouseButtonDown; bool mDragEnabled; bool mSort; @@ -120,11 +121,12 @@ private: // This is a first attempt at a pattern chooser widget abstraction which is at least // useful for two applications(karbon and krita). It is really a light version of // kis_patternchooser. (Rob) -class KOPAINTER_EXPORT KoPatternChooser : public QWidget +class KOPAINTER_EXPORT KoPatternChooser : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KoPatternChooser( const QPtrList<KoIconItem> &list, QWidget *parent, const char *name = 0 ); + KoPatternChooser( const TQPtrList<KoIconItem> &list, TQWidget *tqparent, const char *name = 0 ); ~KoPatternChooser(); KoIconItem *currentPattern(); |