summaryrefslogtreecommitdiffstats
path: root/src/modules/dcc/canvaswidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/dcc/canvaswidget.h')
-rw-r--r--src/modules/dcc/canvaswidget.h167
1 files changed, 85 insertions, 82 deletions
diff --git a/src/modules/dcc/canvaswidget.h b/src/modules/dcc/canvaswidget.h
index 41d451e4..04867502 100644
--- a/src/modules/dcc/canvaswidget.h
+++ b/src/modules/dcc/canvaswidget.h
@@ -27,20 +27,20 @@
#ifdef COMPILE_DCC_CANVAS
-#include <qcanvas.h>
+#include <tqcanvas.h>
-//#ifdef QT_NO_CANVAS
+//#ifdef TQT_NO_CANVAS
// #warning "HEre is not"
//#endif
-#include <qmenubar.h>
-#include <qlabel.h>
+#include <tqmenubar.h>
+#include <tqlabel.h>
-#include <qmap.h>
-#include <qvariant.h>
-#include <qtable.h>
-#include <qsplitter.h>
+#include <tqmap.h>
+#include <tqvariant.h>
+#include <tqtable.h>
+#include <tqsplitter.h>
@@ -66,49 +66,49 @@ class KviCanvasWidget;
-class KviCanvasPolygon : public QCanvasPolygon
+class KviCanvasPolygon : public TQCanvasPolygon
{
public:
- KviCanvasPolygon(QCanvas * c,int x,int y,QPointArray &pnts,double dScaleFactor);
+ KviCanvasPolygon(TQCanvas * c,int x,int y,TQPointArray &pnts,double dScaleFactor);
virtual ~KviCanvasPolygon();
protected:
- QMap<QString,QVariant> m_properties;
+ TQMap<TQString,TQVariant> m_properties;
double m_dScaleFactor;
- QPointArray m_points;
+ TQPointArray m_points;
public:
- virtual void draw(QPainter & p);
+ virtual void draw(TQPainter & p);
double scaleFactor(){ return m_dScaleFactor; };
void setScaleFactor(double dScaleFactor);
void resetPoints();
- const QPointArray & internalPoints(){ return m_points; };
- void setInternalPoints(const QPointArray &pnts);
- QMap<QString,QVariant> * properties(){ return &m_properties; };
- virtual void setProperty(const QString &property,const QVariant &val);
+ const TQPointArray & internalPoints(){ return m_points; };
+ void setInternalPoints(const TQPointArray &pnts);
+ TQMap<TQString,TQVariant> * properties(){ return &m_properties; };
+ virtual void setProperty(const TQString &property,const TQVariant &val);
virtual int rtti() const;
};
-class KviCanvasRectangleItem : public QCanvasRectangle
+class KviCanvasRectangleItem : public TQCanvasRectangle
{
friend class KviCanvasRectangle;
friend class KviCanvasRichText;
friend class KviCanvasEllipticItem;
protected:
- KviCanvasRectangleItem(QCanvas * c,int x,int y,int w,int h);
+ KviCanvasRectangleItem(TQCanvas * c,int x,int y,int w,int h);
public:
virtual ~KviCanvasRectangleItem();
protected:
- QMap<QString,QVariant> m_properties;
+ TQMap<TQString,TQVariant> m_properties;
public:
int right(){ return ((int)x()) + width(); };
int bottom(){ return ((int)y()) + height(); };
- QMap<QString,QVariant> * properties(){ return &m_properties; };
- virtual void setProperty(const QString &property,const QVariant &val);
-// QVariant property(const QString &name){ return m_properties[name]; };
+ TQMap<TQString,TQVariant> * properties(){ return &m_properties; };
+ virtual void setProperty(const TQString &property,const TQVariant &val);
+// TQVariant property(const TQString &name){ return m_properties[name]; };
protected:
- void drawSelection(QPainter &p);
+ void drawSelection(TQPainter &p);
};
@@ -118,12 +118,12 @@ class KviCanvasEllipticItem : public KviCanvasRectangleItem
friend class KviCanvasChord;
friend class KviCanvasPie;
protected:
- KviCanvasEllipticItem(QCanvas * c,int x,int y,int w,int h);
+ KviCanvasEllipticItem(TQCanvas * c,int x,int y,int w,int h);
~KviCanvasEllipticItem();
public:
- virtual void setProperty(const QString & property,const QVariant &val);
- virtual void draw(QPainter & p);
- virtual void drawContent(QPainter & p);
+ virtual void setProperty(const TQString & property,const TQVariant &val);
+ virtual void draw(TQPainter & p);
+ virtual void drawContent(TQPainter & p);
virtual int rtti() const;
};
@@ -131,10 +131,10 @@ public:
class KviCanvasEllipse : public KviCanvasEllipticItem
{
public:
- KviCanvasEllipse(QCanvas * c,int x,int y,int w,int h);
+ KviCanvasEllipse(TQCanvas * c,int x,int y,int w,int h);
~KviCanvasEllipse();
public:
- virtual void drawContent(QPainter & p);
+ virtual void drawContent(TQPainter & p);
virtual int rtti() const;
};
@@ -142,10 +142,10 @@ public:
class KviCanvasPie : public KviCanvasEllipticItem
{
public:
- KviCanvasPie(QCanvas * c,int x,int y,int w,int h);
+ KviCanvasPie(TQCanvas * c,int x,int y,int w,int h);
~KviCanvasPie();
public:
- virtual void drawContent(QPainter & p);
+ virtual void drawContent(TQPainter & p);
virtual int rtti() const;
};
@@ -153,26 +153,26 @@ public:
class KviCanvasChord : public KviCanvasEllipticItem
{
public:
- KviCanvasChord(QCanvas * c,int x,int y,int w,int h);
+ KviCanvasChord(TQCanvas * c,int x,int y,int w,int h);
~KviCanvasChord();
public:
- virtual void drawContent(QPainter & p);
+ virtual void drawContent(TQPainter & p);
virtual int rtti() const;
};
-class KviCanvasLine : public QCanvasLine
+class KviCanvasLine : public TQCanvasLine
{
public:
- KviCanvasLine(QCanvas * c,int x1,int y1,int x2,int y2);
+ KviCanvasLine(TQCanvas * c,int x1,int y1,int x2,int y2);
virtual ~KviCanvasLine();
protected:
- QMap<QString,QVariant> m_properties;
+ TQMap<TQString,TQVariant> m_properties;
public:
- QMap<QString,QVariant> * properties(){ return &m_properties; };
- virtual void setProperty(const QString &property,const QVariant &val);
-// QVariant property(const QString &name){ return m_properties[name]; };
- virtual void draw(QPainter & p);
+ TQMap<TQString,TQVariant> * properties(){ return &m_properties; };
+ virtual void setProperty(const TQString &property,const TQVariant &val);
+// TQVariant property(const TQString &name){ return m_properties[name]; };
+ virtual void draw(TQPainter & p);
virtual int rtti() const;
};
@@ -181,11 +181,11 @@ public:
class KviCanvasRectangle : public KviCanvasRectangleItem
{
public:
- KviCanvasRectangle(QCanvas * c,int x,int y,int w,int h);
+ KviCanvasRectangle(TQCanvas * c,int x,int y,int w,int h);
~KviCanvasRectangle();
public:
- virtual void draw(QPainter & p);
- virtual void setProperty(const QString &property,const QVariant &val);
+ virtual void draw(TQPainter & p);
+ virtual void setProperty(const TQString &property,const TQVariant &val);
virtual int rtti() const;
};
@@ -193,19 +193,20 @@ public:
class KviCanvasRichText : public KviCanvasRectangleItem
{
public:
- KviCanvasRichText(QCanvas * c,int x,int y,int w,int h);
+ KviCanvasRichText(TQCanvas * c,int x,int y,int w,int h);
~KviCanvasRichText();
public:
- virtual void draw(QPainter & p);
+ virtual void draw(TQPainter & p);
virtual int rtti() const;
};
-class KviCanvasView : public QCanvasView
+class KviCanvasView : public TQCanvasView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KviCanvasView(QCanvas * c,KviCanvasWidget * cw,QWidget * par);
+ KviCanvasView(TQCanvas * c,KviCanvasWidget * cw,TQWidget * par);
~KviCanvasView();
public:
enum State { Idle , SelectOrigin };
@@ -226,30 +227,30 @@ protected:
ObjectType m_objectToInsert;
// Selected item
- QCanvasItem * m_pSelectedItem;
+ TQCanvasItem * m_pSelectedItem;
DragMode m_dragMode;
- QPoint m_dragBegin;
+ TQPoint m_dragBegin;
double m_dragScaleFactor;
unsigned int m_dragPointIndex;
- QPointArray m_dragPointArray;
+ TQPointArray m_dragPointArray;
protected:
- void beginDragRectangle(KviCanvasRectangleItem * it,const QPoint &p,bool bInitial = false);
- void dragRectangle(KviCanvasRectangleItem * it,const QPoint & p);
+ void beginDragRectangle(KviCanvasRectangleItem * it,const TQPoint &p,bool bInitial = false);
+ void dragRectangle(KviCanvasRectangleItem * it,const TQPoint & p);
- void beginDragLine(KviCanvasLine * it,const QPoint &p,bool bInitial = false);
- void dragLine(KviCanvasLine * it,const QPoint &p);
+ void beginDragLine(KviCanvasLine * it,const TQPoint &p,bool bInitial = false);
+ void dragLine(KviCanvasLine * it,const TQPoint &p);
- void beginDragPolygon(KviCanvasPolygon * it,const QPoint &p,bool bShift = false,bool bCtrl = false);
- void dragPolygon(KviCanvasPolygon * it,const QPoint &p);
+ void beginDragPolygon(KviCanvasPolygon * it,const TQPoint &p,bool bShift = false,bool bCtrl = false);
+ void dragPolygon(KviCanvasPolygon * it,const TQPoint &p);
- void setItemSelected(QCanvasItem * it);
+ void setItemSelected(TQCanvasItem * it);
void clearSelection();
- void insertObjectAt(const QPoint & pnt,ObjectType o);
- virtual void contentsMousePressEvent(QMouseEvent *e);
- virtual void contentsMouseMoveEvent(QMouseEvent *e);
- virtual void contentsMouseReleaseEvent(QMouseEvent *e);
+ void insertObjectAt(const TQPoint & pnt,ObjectType o);
+ virtual void contentsMousePressEvent(TQMouseEvent *e);
+ virtual void contentsMouseMoveEvent(TQMouseEvent *e);
+ virtual void contentsMouseReleaseEvent(TQMouseEvent *e);
public slots:
void insertRectangle();
void insertRichText();
@@ -261,59 +262,61 @@ public slots:
void insertPolygonRectangle();
void insertPolygonPentagon();
void insertPolygonHexagon();
- void propertyChanged(const QString &s,const QVariant &v);
+ void propertyChanged(const TQString &s,const TQVariant &v);
};
-// For Qt3.0 this might need to be changed
+// For TQt3.0 this might need to be changed
-class KviVariantTableItem : public QTableItem
+class KviVariantTableItem : public TQTableItem
{
public:
- KviVariantTableItem(QTable * t,const QVariant & property);
+ KviVariantTableItem(TQTable * t,const TQVariant & property);
~KviVariantTableItem();
private:
- QVariant m_property;
+ TQVariant m_property;
public:
- virtual QWidget * createEditor() const;
- virtual void setContentFromEditor(QWidget *w);
- QVariant & property(){ return m_property; };
- virtual void paint(QPainter *p,const QColorGroup &cg,const QRect &cr,bool selected);
+ virtual TQWidget * createEditor() const;
+ virtual void setContentFromEditor(TQWidget *w);
+ TQVariant & property(){ return m_property; };
+ virtual void paint(TQPainter *p,const TQColorGroup &cg,const TQRect &cr,bool selected);
};
-class KviCanvasItemPropertiesWidget : public QTable
+class KviCanvasItemPropertiesWidget : public TQTable
{
Q_OBJECT
+ TQ_OBJECT
public:
- KviCanvasItemPropertiesWidget(QWidget * par);
+ KviCanvasItemPropertiesWidget(TQWidget * par);
~KviCanvasItemPropertiesWidget();
public:
- void editItem(QCanvasItem * it);
+ void editItem(TQCanvasItem * it);
protected slots:
void cellEdited(int row,int col);
signals:
- void propertyChanged(const QString &s,const QVariant &v);
+ void propertyChanged(const TQString &s,const TQVariant &v);
};
-class KviCanvasWidget : public QWidget
+class KviCanvasWidget : public TQWidget
{
friend class KviCanvasView;
Q_OBJECT
+ TQ_OBJECT
public:
- KviCanvasWidget(QWidget * par);
+ KviCanvasWidget(TQWidget * par);
~KviCanvasWidget();
protected:
- QSplitter * m_pSplitter;
- QCanvas * m_pCanvas;
- QMenuBar * m_pMenuBar;
+ TQSplitter * m_pSplitter;
+ TQCanvas * m_pCanvas;
+ TQMenuBar * m_pMenuBar;
KviCanvasView * m_pCanvasView;
- QLabel * m_pStatusLabel;
+ TQLabel * m_pStatusLabel;
KviCanvasItemPropertiesWidget * m_pPropertiesWidget;
protected:
- virtual void resizeEvent(QResizeEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
};