DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
GraphicalClass.hpp
Go to the documentation of this file.
1// DUNE DAQ modification notice:
2// This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
3// Fork baseline commit: dbe-02-12-17 (2022-05-12).
4// Renamed since fork: yes (from dbe/GraphicalClass.h to include/dbe/GraphicalClass.hpp).
5
6#ifndef GRAPHICALCLASS_H
7#define GRAPHICALCLASS_H
8
10#include <QGraphicsObject>
12#include "conffwk/Schema.hpp"
13
14namespace dbe
15{
16
18{
20 QStringList EnvNames;
21};
22
24{
25 QString Direct;
26 QString Reverse;
27};
28
30{
31 QString GraphicalUID;
35 QString BitmapFile;
38 QStringList Attributes;
40 QStringList Relationships;
41 QString IconTitle;
43 QStringList DerivedClasses;
44 QList<DualRelationship> DualRelationships;
45 QList<InitAttributeFromEnv> NeedToInitialize;
46};
47
48struct Window
49{
50 QString Title;
53};
54
55class GraphicalObject: public QGraphicsObject
56{
57 Q_OBJECT
58public:
59 explicit GraphicalObject ( bool Used, QString ObjectName, GraphicalClass GraphInfo,
60 QGraphicsObject * parent = 0 );
62 QRectF boundingRect() const;
63 void paint ( QPainter * painter, const QStyleOptionGraphicsItem * option,
64 QWidget * widget );
65 QPainterPath shape() const;
67 void mouseDoubleClickEvent ( QGraphicsSceneMouseEvent * event );
68 void mousePressEvent ( QGraphicsSceneMouseEvent * event );
69 void mouseMoveEvent ( QGraphicsSceneMouseEvent * event );
70 void dropEvent ( QGraphicsSceneDragDropEvent * event );
72 void AddGraphicChildren();
75 double GetExpandedX() const;
76 double GetExpandedY() const;
77 void SetExpandedX ( double dx );
78 void SetExpandedY ( double dy );
80 void GetOffsetX ( QGraphicsItem * Item, double & Offset );
81 void GetOffsetY ( QGraphicsItem * Item, double & Offset );
82 void LocateTopMostItem ( QGraphicsItem * Auxiliary );
83 QString GetDatabaseClassName() const;
84 QString GetDatabaseUidName() const;
85private:
87 QGraphicsPixmapItem * IconItem;
88 QGraphicsTextItem * TextItem;
93 QPointF StartDrag;
94 double expandedX;
95 double expandedY;
96};
97
98class GraphicalRelationship: public QGraphicsObject
99{
100 Q_OBJECT
101public:
102 explicit GraphicalRelationship ( QString ObjectName, QString ClassName,
103 dunedaq::conffwk::relationship_t & Data, QGraphicsObject * parent =
104 0 );
106 QRectF boundingRect() const;
107 void paint ( QPainter * painter, const QStyleOptionGraphicsItem * option,
108 QWidget * widget );
109 QPainterPath shape() const;
111 void mouseDoubleClickEvent ( QGraphicsSceneMouseEvent * event );
112 void mousePressEvent ( QGraphicsSceneMouseEvent * event );
113 void mouseMoveEvent ( QGraphicsSceneMouseEvent * event );
115 void AddGraphicChildren();
116private:
120 QGraphicsTextItem * TextItem;
121};
122
123} // end namespace dbe
124#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