summaryrefslogtreecommitdiffstats
path: root/lib/kopainter/koIconChooser.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kopainter/koIconChooser.h')
-rw-r--r--lib/kopainter/koIconChooser.h48
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();