From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: 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 --- lib/kopainter/koIconChooser.h | 48 ++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 23 deletions(-) (limited to 'lib/kopainter/koIconChooser.h') 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 -#include -#include +#include +#include +#include #include 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 mIconList; + TQPtrList 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 &list, QWidget *parent, const char *name = 0 ); + KoPatternChooser( const TQPtrList &list, TQWidget *tqparent, const char *name = 0 ); ~KoPatternChooser(); KoIconItem *currentPattern(); -- cgit v1.2.1