Changeset 13537 for branches/OMEdit/OMEditGUI/LineAnnotation.h
- Timestamp:
- 2012-10-20T20:27:24+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OMEdit/OMEditGUI/LineAnnotation.h
r13405 r13537 42 42 class RectangleCornerItem; 43 43 class ShapeAnnotation; 44 class Component _OMC;44 class Component; 45 45 46 class LineAnnotation _OMC : public ShapeAnnotation_OMC46 class LineAnnotation : public ShapeAnnotation 47 47 { 48 48 Q_OBJECT 49 49 public: 50 50 enum geometryType {VERTICAL, HORIZONTAL, DIAGONAL}; 51 LineAnnotation _OMC(QString annotation, Component_OMC*pParent);52 LineAnnotation _OMC(Component_OMC*pStartComponent, GraphicsView *pGraphicsView);51 LineAnnotation(QString annotation, Component *pParent); 52 LineAnnotation(Component *pStartComponent, GraphicsView *pGraphicsView); 53 53 void parseShapeAnnotation(QString annotation); 54 54 QPainterPath getShape() const; … … 59 59 QPolygonF drawArrow(QPointF startPos, QPointF endPos, qreal size, int arrowType) const; 60 60 QString getShapeAnnotation(); 61 void setStartComponent(Component _OMC*pStartComponent);62 Component _OMC* getStartComponent();63 void setEndComponent(Component _OMC*pEndComponent);64 Component _OMC* getEndComponent();61 void setStartComponent(Component *pStartComponent); 62 Component* getStartComponent(); 63 void setEndComponent(Component *pEndComponent); 64 Component* getEndComponent(); 65 65 void addPoint(QPointF point); 66 66 void updateStartPoint(QPointF point); 67 67 void updateEndPoint(QPointF point); 68 68 void moveAllPoints(qreal offsetX, qreal offsetY); 69 void setStartComponentName(QString name); 70 QString getStartComponentName(); 71 void setEndComponentName(QString name); 72 QString getEndComponentName(); 69 73 private: 70 74 QList<StringHandler::Arrow> mArrow; 71 75 qreal mArrowSize; 72 76 GraphicsView *mpGraphicsView; 73 Component_OMC *mpStartComponent; 74 Component_OMC *mpEndComponent; 77 Component *mpStartComponent; 78 QString mStartComponentName; 79 Component *mpEndComponent; 80 QString mEndComponentName; 75 81 QList<geometryType> mGeometries; 76 82 public slots: … … 79 85 }; 80 86 81 82 class LineAnnotation : public ShapeAnnotation 87 class ConnectionArray : public QDialog 83 88 { 84 89 Q_OBJECT 85 90 public: 86 LineAnnotation(QString shape, Component *pParent); 87 LineAnnotation(GraphicsView *graphicsView, QGraphicsItem *pParent = 0); 88 LineAnnotation(QString shape, GraphicsView *graphicsView, QGraphicsItem *pParent = 0); 89 QPainterPath getShape() const; 90 QRectF boundingRect() const; 91 QPainterPath shape() const; 92 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); 93 void drawLineAnnotaion(QPainter *painter); 94 void addPoint(QPointF point); 95 void updateEndPoint(QPointF point); 96 void drawRectangleCornerItems(); 97 QString getShapeAnnotation(); 98 void parseShapeAnnotation(QString annotation); 99 QPolygonF drawArrow(QPointF startPos, QPointF endPos, qreal size, int arrowType) const; 100 101 Component *mpComponent; 91 ConnectionArray(GraphicsView *pGraphicsView, LineAnnotation *pConnectionLineAnnotation, QWidget *pParent = 0); 92 private: 93 GraphicsView *mpGraphicsView; 94 LineAnnotation *mpConnectionLineAnnotation; 95 Label *mpHeading; 96 QFrame *mpHorizontalLine; 97 Label *mpDescriptionLabel; 98 Label *mpStartComponentLabel; 99 QLineEdit *mpStartComponentTextBox; 100 Label *mpEndComponentLabel; 101 QLineEdit *mpEndComponentTextBox; 102 QPushButton *mpOkButton; 103 QPushButton *mpCancelButton; 104 QDialogButtonBox *mpButtonBox; 102 105 public slots: 103 void updatePoint(int index, QPointF point); 106 void saveArrayIndex(); 107 void cancelArrayIndex(); 104 108 }; 105 109
Note: See TracChangeset
for help on using the changeset viewer.