From 4ae0c208b66e0f7954e194384464fe2d0a2c56dd Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:51:49 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- umbrello/umbrello/umlwidget.h | 96 +++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'umbrello/umbrello/umlwidget.h') diff --git a/umbrello/umbrello/umlwidget.h b/umbrello/umbrello/umlwidget.h index 7ed472a9..0b96d5b2 100644 --- a/umbrello/umbrello/umlwidget.h +++ b/umbrello/umbrello/umlwidget.h @@ -12,9 +12,9 @@ #ifndef UMLWIDGET_H #define UMLWIDGET_H -#include -#include -#include +#include +#include +#include #include "umlnamespace.h" #include "widgetbase.h" @@ -40,7 +40,7 @@ class QFontMetrics; * @author Paul Hensgen * Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org */ -class UMLWidget : public WidgetBase, public QCanvasRectangle { +class UMLWidget : public WidgetBase, public TQCanvasRectangle { Q_OBJECT public: friend class UMLWidgetController; @@ -88,17 +88,17 @@ public: * Calls the method with the same name in UMLWidgetController. * @see UMLWidgetController#mouseReleaseEvent * - * @param me The QMouseEvent event. + * @param me The TQMouseEvent event. */ - virtual void mouseReleaseEvent(QMouseEvent * me); + virtual void mouseReleaseEvent(TQMouseEvent * me); /** * Calls the method with the same name in UMLWidgetController. * @see UMLWidgetController#mouseDoubleClickEvent * - * @param me The QMouseEvent event. + * @param me The TQMouseEvent event. */ - virtual void mouseDoubleClickEvent(QMouseEvent *me); + virtual void mouseDoubleClickEvent(TQMouseEvent *me); /** * Set the status of using fill color. @@ -117,7 +117,7 @@ public: /** * Overrides the method from WidgetBase. */ - void setLineColor(const QColor &colour); + void setLineColor(const TQColor &colour); /** * Overrides the method from WidgetBase. @@ -129,12 +129,12 @@ public: * * @param colour the new fill colour */ - void setFillColour(const QColor &colour); + void setFillColour(const TQColor &colour); /** - * Read property of QColor m_FillColour. + * Read property of TQColor m_FillColour. */ - QColor getFillColour() const { + TQColor getFillColour() const { return m_FillColour; } @@ -142,9 +142,9 @@ public: * Calls the method with the same name in UMLWidgetController. * @see UMLWidgetController#mouseMoveEvent * - * @param me The QMouseEvent event. + * @param me The TQMouseEvent event. */ - virtual void mouseMoveEvent(QMouseEvent* me); + virtual void mouseMoveEvent(TQMouseEvent* me); /** * Returns whether this is a line of text. @@ -200,7 +200,7 @@ public: * @return 0 if the given point is not in the boundaries of the widget; * (width()+height())/2 if the point is within the boundaries. */ - virtual int onWidget(const QPoint & p); + virtual int onWidget(const TQPoint & p); /** * Draws the UMLWidget on the given paint device @@ -210,24 +210,24 @@ public: * @param offsetY y position to start the drawing. * */ - virtual void draw(QPainter & p, int offsetX, int offsetY) = 0; + virtual void draw(TQPainter & p, int offsetX, int offsetY) = 0; /** * Set the pen. */ - void setPen(QPainter & p); + void setPen(TQPainter & p); /** * Sets the font the widget is to use. * * @param font Font to be set. */ - virtual void setFont( QFont font ); + virtual void setFont( TQFont font ); /** * Returns the font the widget is to use. */ - virtual QFont getFont() const; + virtual TQFont getFont() const; /** * Returns whether we triggered the update of position movement. @@ -268,35 +268,35 @@ public: * Gets the x-coordinate. */ int getX() const { - return (int)QCanvasItem::x(); + return (int)TQCanvasItem::x(); } /** * Gets the y-coordinate. */ int getY() const { - return (int)QCanvasItem::y(); + return (int)TQCanvasItem::y(); } /** * Gets the z-coordinate. */ int getZ() const { - return (int)QCanvasItem::z(); + return (int)TQCanvasItem::z(); } /** * Returns the height of widget. */ int getHeight() const { - return QCanvasRectangle::height(); + return TQCanvasRectangle::height(); } /** * Returns the width of the widget. */ int getWidth() const { - return QCanvasRectangle::width(); + return TQCanvasRectangle::width(); } /** @@ -386,14 +386,14 @@ public: /** * Write property of m_instanceName */ - void setInstanceName(const QString &instanceName) { + void setInstanceName(const TQString &instanceName) { m_instanceName = instanceName; } /** * Read property of m_instanceName */ - QString getInstanceName() const { + TQString getInstanceName() const { return m_instanceName; } @@ -429,7 +429,7 @@ public: * * @param strName The name to be set. */ - virtual void setName(const QString &strName); + virtual void setName(const TQString &strName); /** * Gets the name from the corresponding UMLObject. @@ -437,14 +437,14 @@ public: * * @return The currently set name. */ - virtual QString getName() const; + virtual TQString getName() const; /** * Starts the popup menu. * * @param At The Point where the diagram is to be coming up. */ - void startPopupMenu( const QPoint &At ); + void startPopupMenu( const TQPoint &At ); /** * Adjusts associations with the given co-ordinates @@ -492,26 +492,26 @@ public: * This behaviour is acceptable, because diagrams will always be showed on Display * first before a special painter like a printer device is used. */ - void forceUpdateFontMetrics(QPainter *painter); + void forceUpdateFontMetrics(TQPainter *painter); /** * Calls the method with the same name in UMLWidgetController. * @see UMLWidgetController#mousePressEvent * - * @param me The QMouseEvent event. + * @param me The TQMouseEvent event. */ - virtual void mousePressEvent(QMouseEvent *me); + virtual void mousePressEvent(TQMouseEvent *me); /** * Overrides the standard operation. * * @param me The move event. */ - virtual void moveEvent(QMoveEvent *me); + virtual void moveEvent(TQMoveEvent *me); - virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement ); + virtual void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ); - virtual bool loadFromXMI( QDomElement & qElement ); + virtual bool loadFromXMI( TQDomElement & qElement ); /** * Returns the UMLWdigetController for this widget. @@ -537,22 +537,22 @@ protected: * @param offsetX The x-coordinate for drawing. * @param offsetY The y-coordinate for drawing. */ - virtual void drawSelected(QPainter * p, int offsetX, int offsetY); + virtual void drawSelected(TQPainter * p, int offsetX, int offsetY); /** * Overrides default method. * * @param p Device on which the shape has to be drawn. */ - virtual void drawShape(QPainter &p ); + virtual void drawShape(TQPainter &p ); /** * Compute the minimum possible width and height. * The default implementation returns width=20, height=20. * - * @return QSize(mininum_width, minimum_height) + * @return TQSize(mininum_width, minimum_height) */ - virtual QSize calculateSize(); + virtual TQSize calculateSize(); typedef enum { FT_NORMAL = 0, @@ -570,13 +570,13 @@ protected: * font metric. */ virtual void setDefaultFontMetrics(UMLWidget::FontType fontType); - virtual void setDefaultFontMetrics(UMLWidget::FontType fontType, QPainter &painter); + virtual void setDefaultFontMetrics(UMLWidget::FontType fontType, TQPainter &painter); /** Returns the font metric used by this object for Text which uses bold/italic fonts*/ - QFontMetrics &getFontMetrics(UMLWidget::FontType fontType); + TQFontMetrics &getFontMetrics(UMLWidget::FontType fontType); /** set the font metric to use */ - void setFontMetrics(UMLWidget::FontType fontType, QFontMetrics fm); - void setupFontType(QFont &font, UMLWidget::FontType fontType); + void setFontMetrics(UMLWidget::FontType fontType, TQFontMetrics fm); + void setupFontType(TQFont &font, UMLWidget::FontType fontType); /** * Initializes key attributes of the class. @@ -600,7 +600,7 @@ protected: /** * Color of the background of the widget */ - QColor m_FillColour; + TQColor m_FillColour; /** * A list of AssociationWidgets between the UMLWidget and other UMLWidgets in the diagram @@ -612,12 +612,12 @@ protected: * underlying UMLObject; if it does not, then getName() returns the local * m_Text (notably the case for FloatingTextWidget.) */ - QString m_Text; + TQString m_Text; /** * The font the widget will use. */ - QFont m_Font; + TQFont m_Font; /** * Holds whether this widget is a component instance (i.e. on a deployment diagram) @@ -627,7 +627,7 @@ protected: /** * The instance name (used if on a deployment diagram) */ - QString m_instanceName; + TQString m_instanceName; /** * Should the stereotype be displayed @@ -642,7 +642,7 @@ protected: ListPopupMenu *m_pMenu; UMLDoc *m_pDoc; ///< shortcut for UMLApp::app()->getDocument() bool m_bResizable; - QFontMetrics *m_pFontMetrics[FT_INVALID]; + TQFontMetrics *m_pFontMetrics[FT_INVALID]; /** * It is true if the Activate Function has been called for this -- cgit v1.2.3