diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
commit | dc6b8e72fed2586239e3514819238c520636c9d9 (patch) | |
tree | 88b200df0a0b7fab9d6f147596173556f1ed9a13 /kimagemapeditor/kimearea.h | |
parent | 6927d4436e54551917f600b706a8d6109e49de1c (diff) | |
download | tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kimagemapeditor/kimearea.h')
-rw-r--r-- | kimagemapeditor/kimearea.h | 196 |
1 files changed, 98 insertions, 98 deletions
diff --git a/kimagemapeditor/kimearea.h b/kimagemapeditor/kimearea.h index 581bba94..8cd9677a 100644 --- a/kimagemapeditor/kimearea.h +++ b/kimagemapeditor/kimearea.h @@ -18,11 +18,11 @@ #ifndef KIMEAREA_H #define KIMEAREA_H -#include <qrect.h> -#include <qpoint.h> -#include <qptrlist.h> +#include <tqrect.h> +#include <tqpoint.h> +#include <tqptrlist.h> #include <klocale.h> -#include <qmap.h> +#include <tqmap.h> #include "kdeversion.h" @@ -31,10 +31,10 @@ class QPointArray; class QListViewItem; class QBitmap; -typedef QPtrList<QRect> SelectionPointList; +typedef TQPtrList<TQRect> SelectionPointList; -typedef QMap<QString,QString> AttributeMap; -typedef QMapConstIterator<QString,QString> AttributeIterator; +typedef TQMap<TQString,TQString> AttributeMap; +typedef TQMapConstIterator<TQString,TQString> AttributeIterator; @@ -46,26 +46,26 @@ public: static bool showAlt; protected: - QRect _rect; + TQRect _rect; ShapeType _type; - QString _name; - QString _href; - QString _alt; - QString _target; + TQString _name; + TQString _href; + TQString _alt; + TQString _target; AttributeMap _attributes; bool _isSelected; bool _finished; bool _isMoving; int currentHighlighted; - QListViewItem* _listViewItem; + TQListViewItem* _listViewItem; // Only used for Polygons - QPointArray *_coords; + TQPointArray *_coords; SelectionPointList *_selectionPoints; - QPixmap *_highlightedPixmap; + TQPixmap *_highlightedPixmap; - void drawHighlighting(QPainter & p); - void drawAlt(QPainter & p); - QString getHTMLAttributes() const; + void drawHighlighting(TQPainter & p); + void drawAlt(TQPainter & p); + TQString getHTMLAttributes() const; public: Area(); @@ -73,60 +73,60 @@ public: virtual Area* clone() const; // Default implementation; is specified by subclasses - virtual bool contains(const QPoint &) const; + virtual bool contains(const TQPoint &) const; // Default implementation; is specified by subclasses - virtual QString coordsToString() const; - virtual void draw(QPainter &); + virtual TQString coordsToString() const; + virtual void draw(TQPainter &); - virtual QBitmap getMask() const; - virtual QString getHTMLCode() const; + virtual TQBitmap getMask() const; + virtual TQString getHTMLCode() const; - virtual void setHighlightedPixmap( QImage &, QBitmap &); + virtual void setHighlightedPixmap( TQImage &, TQBitmap &); virtual void moveBy(int, int); virtual void moveTo(int, int); - virtual void moveSelectionPoint(QRect*, const QPoint &); + virtual void moveSelectionPoint(TQRect*, const TQPoint &); - virtual QRect* onSelectionPoint(const QPoint &,double zoom) const; - virtual bool removeSelectionPoint(QRect * r); + virtual TQRect* onSelectionPoint(const TQPoint &,double zoom) const; + virtual bool removeSelectionPoint(TQRect * r); virtual SelectionPointList* selectionPoints() const { return _selectionPoints; } - virtual QRect rect() const; + virtual TQRect rect() const; - virtual QRect selectionRect() const; + virtual TQRect selectionRect() const; virtual void setArea(const Area &); - virtual bool setCoords(const QString &); + virtual bool setCoords(const TQString &); /** finished drawing only important for polygon */ virtual void setFinished(bool b) { _finished=b; } - virtual void setRect(const QRect &); + virtual void setRect(const TQRect &); virtual void setMoving(bool b); virtual bool isMoving() const; // Default implementation; is specified by subclasses - virtual QString typeString() const { return ""; } + virtual TQString typeString() const { return ""; } virtual ShapeType type() const; virtual void updateSelectionPoints() {}; // Only interesting for Polygons virtual void simplifyCoords() {}; - virtual int addCoord(const QPoint &); - virtual void insertCoord(int, const QPoint &); + virtual int addCoord(const TQPoint &); + virtual void insertCoord(int, const TQPoint &); virtual void removeCoord(int); - virtual void moveCoord(int,const QPoint &); - virtual QPointArray* coords() const; + virtual void moveCoord(int,const TQPoint &); + virtual TQPointArray* coords() const; virtual void highlightSelectionPoint(int); - virtual QString attribute(const QString &) const; - virtual void setAttribute(const QString &, const QString &); + virtual TQString attribute(const TQString &) const; + virtual void setAttribute(const TQString &, const TQString &); virtual AttributeIterator firstAttribute() const; virtual AttributeIterator lastAttribute() const; - QPixmap cutOut(const QImage &) ; - void setListViewItem(QListViewItem*); + TQPixmap cutOut(const TQImage &) ; + void setListViewItem(TQListViewItem*); void deleteListViewItem(); - QListViewItem* listViewItem() const; - void setName(const QString &); - QString name() const; + TQListViewItem* listViewItem() const; + void setName(const TQString &); + TQString name() const; void setSelected(bool b); bool isSelected() const; bool finished() const; @@ -136,15 +136,15 @@ public: -inline QListViewItem* Area::listViewItem() const { +inline TQListViewItem* Area::listViewItem() const { return _listViewItem; } -inline void Area::setName(const QString & name) { +inline void Area::setName(const TQString & name) { _name=name; } -inline QString Area::name() const { +inline TQString Area::name() const { return _name; } @@ -172,14 +172,14 @@ class RectArea : public Area virtual ~RectArea(); virtual Area* clone() const; - virtual bool contains(const QPoint & p) const; - virtual QString coordsToString() const; - virtual void draw(QPainter & p); - virtual void moveSelectionPoint(QRect* selectionPoint, const QPoint & p); - virtual bool setCoords(const QString & s); - virtual QString typeString() const { return i18n("Rectangle"); } - virtual QBitmap getMask() const; - virtual QString getHTMLCode() const; + virtual bool contains(const TQPoint & p) const; + virtual TQString coordsToString() const; + virtual void draw(TQPainter & p); + virtual void moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p); + virtual bool setCoords(const TQString & s); + virtual TQString typeString() const { return i18n("Rectangle"); } + virtual TQBitmap getMask() const; + virtual TQString getHTMLCode() const; virtual void updateSelectionPoints(); }; @@ -194,15 +194,15 @@ class CircleArea : public Area virtual ~CircleArea(); virtual Area* clone() const; - virtual bool contains(const QPoint & p) const; - virtual QString coordsToString() const; - virtual void draw(QPainter & p); - virtual void moveSelectionPoint(QRect* selectionPoint, const QPoint & p); - virtual bool setCoords(const QString & s); - virtual void setRect(const QRect & r); - virtual QString typeString() const { return i18n("Circle"); } - virtual QBitmap getMask() const; - virtual QString getHTMLCode() const; + virtual bool contains(const TQPoint & p) const; + virtual TQString coordsToString() const; + virtual void draw(TQPainter & p); + virtual void moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p); + virtual bool setCoords(const TQString & s); + virtual void setRect(const TQRect & r); + virtual TQString typeString() const { return i18n("Circle"); } + virtual TQBitmap getMask() const; + virtual TQString getHTMLCode() const; virtual void updateSelectionPoints(); }; @@ -217,23 +217,23 @@ class PolyArea :public Area virtual ~PolyArea(); virtual Area* clone() const; - virtual bool contains(const QPoint & p) const; - virtual QString coordsToString() const; - virtual void draw(QPainter & p); - virtual void moveSelectionPoint(QRect* selectionPoint, const QPoint & p); + virtual bool contains(const TQPoint & p) const; + virtual TQString coordsToString() const; + virtual void draw(TQPainter & p); + virtual void moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p); virtual void simplifyCoords(); - virtual int addCoord(const QPoint & p); - virtual bool setCoords(const QString & s); - virtual QRect selectionRect() const; + virtual int addCoord(const TQPoint & p); + virtual bool setCoords(const TQString & s); + virtual TQRect selectionRect() const; virtual void setFinished(bool b); - virtual QString typeString() const { return i18n("Polygon"); } - virtual QBitmap getMask() const; - virtual QString getHTMLCode() const; + virtual TQString typeString() const { return i18n("Polygon"); } + virtual TQBitmap getMask() const; + virtual TQString getHTMLCode() const; virtual void updateSelectionPoints(); private: - static int distance(const QPoint &p1, const QPoint &p2); - static bool isBetween(const QPoint &p, const QPoint &p1, const QPoint &p2); + static int distance(const TQPoint &p1, const TQPoint &p2); + static bool isBetween(const TQPoint &p, const TQPoint &p1, const TQPoint &p2); }; @@ -248,15 +248,15 @@ class DefaultArea :public Area virtual Area* clone() const; // the default area isn't drawn - virtual void draw(QPainter & p); - virtual QString typeString() const { return i18n("Default"); } - virtual QString getHTMLCode() const; + virtual void draw(TQPainter & p); + virtual TQString typeString() const { return i18n("Default"); } + virtual TQString getHTMLCode() const; }; -typedef QPtrList<Area> AreaList; -typedef QPtrListIterator<Area> AreaListIterator; +typedef TQPtrList<Area> AreaList; +typedef TQPtrListIterator<Area> AreaListIterator; /** * This class represents a selection of areas @@ -294,18 +294,18 @@ class AreaSelection : public Area { /** * Overiden Methods of the Area class */ - virtual bool contains(const QPoint & p) const; + virtual bool contains(const TQPoint & p) const; /** * **/ - virtual QRect* onSelectionPoint(const QPoint & p, double zoom) const; + virtual TQRect* onSelectionPoint(const TQPoint & p, double zoom) const; /** * Only if one Area is selected the moveSelectionPoint method * of that Area will be called **/ - virtual void moveSelectionPoint(QRect* selectionPoint, const QPoint & p); + virtual void moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p); virtual SelectionPointList* selectionPoints() const; @@ -327,16 +327,16 @@ class AreaSelection : public Area { * If only one Area is selected the setRect method of that Area * will be called **/ - virtual void setRect(const QRect & r); - virtual QRect rect() const; + virtual void setRect(const TQRect & r); + virtual TQRect rect() const; - virtual QString typeString() const; + virtual TQString typeString() const; virtual ShapeType type() const; // The selection is only a container // so it is never drawn - virtual void draw(QPainter & p); + virtual void draw(TQPainter & p); /** @@ -345,18 +345,18 @@ class AreaSelection : public Area { virtual Area* clone() const; virtual void updateSelectionPoints(); - virtual int addCoord(const QPoint & p); - virtual void insertCoord(int pos, const QPoint & p); + virtual int addCoord(const TQPoint & p); + virtual void insertCoord(int pos, const TQPoint & p); virtual void removeCoord(int pos); - virtual bool removeSelectionPoint(QRect * r); - virtual void moveCoord(int pos,const QPoint & p); - virtual QPointArray* coords() const; + virtual bool removeSelectionPoint(TQRect * r); + virtual void moveCoord(int pos,const TQPoint & p); + virtual TQPointArray* coords() const; virtual void highlightSelectionPoint(int); - virtual QRect selectionRect() const; + virtual TQRect selectionRect() const; - virtual QString attribute(const QString & name) const; - virtual void setAttribute(const QString & name, const QString & value); + virtual TQString attribute(const TQString & name) const; + virtual void setAttribute(const TQString & name, const TQString & value); virtual AttributeIterator firstAttribute() const; virtual AttributeIterator lastAttribute() const; @@ -364,7 +364,7 @@ class AreaSelection : public Area { virtual bool isMoving() const; - bool allAreasWithin(const QRect & r) const; + bool allAreasWithin(const TQRect & r) const; // makes the cache invalid void invalidate(); @@ -374,8 +374,8 @@ class AreaSelection : public Area { // The selectionRect and the rect are cached // so even in const functions they must be changeable - mutable QRect _cachedSelectionRect; - mutable QRect _cachedRect; + mutable TQRect _cachedSelectionRect; + mutable TQRect _cachedRect; mutable bool _selectionCacheValid; mutable bool _rectCacheValid; |