DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
GraphicalClass.hpp
Go to the documentation of this file.
1#ifndef GRAPHICALCLASS_H
2#define GRAPHICALCLASS_H
3
5#include <QGraphicsObject>
7#include "conffwk/Schema.hpp"
8
9namespace dbe
10{
11
13{
15 QStringList EnvNames;
16};
17
19{
20 QString Direct;
21 QString Reverse;
22};
23
25{
26 QString GraphicalUID;
30 QString BitmapFile;
33 QStringList Attributes;
35 QStringList Relationships;
36 QString IconTitle;
38 QStringList DerivedClasses;
39 QList<DualRelationship> DualRelationships;
40 QList<InitAttributeFromEnv> NeedToInitialize;
41};
42
43struct Window
44{
45 QString Title;
48};
49
50class GraphicalObject: public QGraphicsObject
51{
52 Q_OBJECT
53public:
54 explicit GraphicalObject ( bool Used, QString ObjectName, GraphicalClass GraphInfo,
55 QGraphicsObject * parent = 0 );
57 QRectF boundingRect() const;
58 void paint ( QPainter * painter, const QStyleOptionGraphicsItem * option,
59 QWidget * widget );
60 QPainterPath shape() const;
62 void mouseDoubleClickEvent ( QGraphicsSceneMouseEvent * event );
63 void mousePressEvent ( QGraphicsSceneMouseEvent * event );
64 void mouseMoveEvent ( QGraphicsSceneMouseEvent * event );
65 void dropEvent ( QGraphicsSceneDragDropEvent * event );
67 void AddGraphicChildren();
70 double GetExpandedX() const;
71 double GetExpandedY() const;
72 void SetExpandedX ( double dx );
73 void SetExpandedY ( double dy );
75 void GetOffsetX ( QGraphicsItem * Item, double & Offset );
76 void GetOffsetY ( QGraphicsItem * Item, double & Offset );
77 void LocateTopMostItem ( QGraphicsItem * Auxiliary );
78 QString GetDatabaseClassName() const;
79 QString GetDatabaseUidName() const;
80private:
82 QGraphicsPixmapItem * IconItem;
83 QGraphicsTextItem * TextItem;
88 QPointF StartDrag;
89 double expandedX;
90 double expandedY;
91};
92
93class GraphicalRelationship: public QGraphicsObject
94{
95 Q_OBJECT
96public:
97 explicit GraphicalRelationship ( QString ObjectName, QString ClassName,
98 dunedaq::conffwk::relationship_t & Data, QGraphicsObject * parent =
99 0 );
101 QRectF boundingRect() const;
102 void paint ( QPainter * painter, const QStyleOptionGraphicsItem * option,
103 QWidget * widget );
104 QPainterPath shape() const;
106 void mouseDoubleClickEvent ( QGraphicsSceneMouseEvent * event );
107 void mousePressEvent ( QGraphicsSceneMouseEvent * event );
108 void mouseMoveEvent ( QGraphicsSceneMouseEvent * event );
110 void AddGraphicChildren();
111private:
115 QGraphicsTextItem * TextItem;
116};
117
118} // end namespace dbe
119#endif // GRAPHICALCLASS_H
QGraphicsTextItem * TextItem
void AddGraphicChildren()
Graphics.
void GetOffsetY(QGraphicsItem *Item, double &Offset)
void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
double GetExpandedX() const
void GetOffsetX(QGraphicsItem *Item, double &Offset)
Some Api.
GraphicalClass GraphicalInfo
QPainterPath shape() const
double GetExpandedY() const
void mousePressEvent(QGraphicsSceneMouseEvent *event)
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
void dropEvent(QGraphicsSceneDragDropEvent *event)
GraphicalObject(bool Used, QString ObjectName, GraphicalClass GraphInfo, QGraphicsObject *parent=0)
QString GetDatabaseUidName() const
QRectF boundingRect() const
void LocateTopMostItem(QGraphicsItem *Auxiliary)
void SetExpandedX(double dx)
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Event Handler.
QGraphicsPixmapItem * IconItem
void SetExpandedY(double dy)
QString GetDatabaseClassName() const
dunedaq::conffwk::relationship_t RelationshipData
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
QGraphicsTextItem * TextItem
QPainterPath shape() const
void mousePressEvent(QGraphicsSceneMouseEvent *event)
void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
GraphicalRelationship(QString ObjectName, QString ClassName, dunedaq::conffwk::relationship_t &Data, QGraphicsObject *parent=0)
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Event Handler.
Include QT Headers.
QList< DualRelationship > DualRelationships
QList< InitAttributeFromEnv > NeedToInitialize
QStringList GraphicalClassesList