mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-23 06:59:59 +01:00
Cross ref item: user can select if xref must be displayed has a table or a contacts list.
Option is found in config dialog under the tab Cross ref. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3033 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -42,6 +42,14 @@ class CrossRefItem : public QGraphicsObject
|
||||
enum { Type = UserType + 1009 };
|
||||
virtual int type() const { return Type; }
|
||||
|
||||
enum CONTACTS {
|
||||
NO = 1,
|
||||
NC = 2,
|
||||
Power = 4,
|
||||
DelayOn = 8,
|
||||
DelayOff = 16
|
||||
};
|
||||
|
||||
QRectF boundingRect() const;
|
||||
virtual QPainterPath shape() const;
|
||||
|
||||
@@ -52,14 +60,17 @@ class CrossRefItem : public QGraphicsObject
|
||||
void autoPos();
|
||||
|
||||
protected:
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *e);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *e);
|
||||
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *e);
|
||||
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *e);
|
||||
|
||||
private:
|
||||
void setUpCrossBoundingRect();
|
||||
void fillCrossRef(QPainter &painter);
|
||||
void AddExtraInfo(QPainter &painter);
|
||||
void drawHasCross (QPainter &painter);
|
||||
void drawHasContacts (QPainter &painter);
|
||||
void drawContact (QPainter &painter, int flags, QString str = QString());
|
||||
void fillCrossRef (QPainter &painter);
|
||||
void AddExtraInfo (QPainter &painter);
|
||||
|
||||
//Attributes
|
||||
private:
|
||||
@@ -68,6 +79,7 @@ class CrossRefItem : public QGraphicsObject
|
||||
QPicture m_drawing;
|
||||
QPainterPath m_shape_path;
|
||||
XRefProperties m_properties;
|
||||
int m_drawed_contacts;
|
||||
};
|
||||
|
||||
#endif // CROSSREFITEM_H
|
||||
|
||||
Reference in New Issue
Block a user