ddt  0.1
ddtGraphicalOverlay.hpp
Go to the documentation of this file.
1 // @copyright
2 // (c) Copyright ESO 2020
3 // All Rights Reserved
4 // ESO (eso.org) is an Intergovernmental Organization, and therefore special
5 // legal conditions apply.
6 //
7 // @file ddtGraphicalOverlay.hpp
8 // @brief DDT Graphics. Class for the DDT Graphical Overlays. This class can be
9 // used to build a set of overlay elements. Each of those elements will be a
10 // DdtGraphicalElement (which can be lines, ovals, rectangles etc.)
11 //
12 // Class for the Graphical Overlays
13 //
14 // @author Carsten Mannel, CGI
15 // @since 2021/01/13
16 //
17 
18 #ifndef DDT_DATAVISUALISATION_DDTGRAPHCIS_GRAPHICALOVERLAY_HPP
19 #define DDT_DATAVISUALISATION_DDTGRAPHCIS_GRAPHICALOVERLAY_HPP
20 
21 #include <string>
22 
25 
30  public:
34  explicit DdtGraphicalOverlay();
35 
40 
45  void AddGraphicalElement(DdtGraphicalElement* const element);
46 
51  void RemoveGraphicalElement(DdtGraphicalElement* const element);
52 
57  QList<DdtGraphicalElement*>* GetListOfGraphicalElements();
58 
65  QList<DdtGraphicalElement*> GetElementByTag(const QString tag) const;
66 
72  QStringList GetListOfElementIDs() const;
73 
77  void ShowAllElements() const;
78 
82  void HideAllElements() const;
83 
88  void ShowElementsOfType(const DdtOverlayType type, const bool showIds = false,
89  const QString id_list = "") const;
90 
95  void HideElementsOfType(const DdtOverlayType type) const;
96 
101  void ShowElementsOfTag(const QString tag) const;
102 
107  void HideElementsOfTag(const QString tag) const;
108 
113  void RemoveElementsOfType(const DdtOverlayType type);
114 
115  protected:
123  void SetShowHideFlags(DdtOverlayType ovltype, const bool show,
124  const QString tag = "", const bool showIds = false,
125  const QString id_list = "") const;
126 
127  private:
128  QList<DdtGraphicalElement*> graphical_elements;
129 
130  int next_index = 1;
131 };
132 
133 #endif // DDT_DATAVISUALISATION_DDTGRAPHCIS_GRAPHICALOVERLAY_HPP
DdtGraphicalOverlay
Definition: ddtGraphicalOverlay.hpp:29
DdtGraphicalOverlay::ShowElementsOfTag
void ShowElementsOfTag(const QString tag) const
Definition: ddtGraphicalOverlay.cpp:99
DdtGraphicalOverlay::GetElementByTag
QList< DdtGraphicalElement * > GetElementByTag(const QString tag) const
Definition: ddtGraphicalOverlay.cpp:60
DdtGraphicalOverlay::HideElementsOfTag
void HideElementsOfTag(const QString tag) const
Definition: ddtGraphicalOverlay.cpp:104
DdtGraphicalOverlay::GetListOfGraphicalElements
QList< DdtGraphicalElement * > * GetListOfGraphicalElements()
Definition: ddtGraphicalOverlay.cpp:56
DdtGraphicalElement
Definition: ddtGraphicalElement.hpp:78
DdtGraphicalOverlay::HideAllElements
void HideAllElements() const
Definition: ddtGraphicalOverlay.cpp:82
DdtGraphicalOverlay::RemoveGraphicalElement
void RemoveGraphicalElement(DdtGraphicalElement *const element)
Definition: ddtGraphicalOverlay.cpp:32
ddtGraphicalElements.hpp
ddtGraphicalElement.hpp
DdtGraphicalOverlay::DdtGraphicalOverlay
DdtGraphicalOverlay()
DdtGraphicalOverlay::~DdtGraphicalOverlay
virtual ~DdtGraphicalOverlay()
DdtGraphicalOverlay::HideElementsOfType
void HideElementsOfType(const DdtOverlayType type) const
Definition: ddtGraphicalOverlay.cpp:94
DdtGraphicalOverlay::SetShowHideFlags
void SetShowHideFlags(DdtOverlayType ovltype, const bool show, const QString tag="", const bool showIds=false, const QString id_list="") const
Definition: ddtGraphicalOverlay.cpp:120
DdtGraphicalOverlay::AddGraphicalElement
void AddGraphicalElement(DdtGraphicalElement *const element)
Definition: ddtGraphicalOverlay.cpp:22
DdtOverlayType
DdtOverlayType
Definition: ddtGraphicalElement.hpp:28
DdtGraphicalOverlay::GetListOfElementIDs
QStringList GetListOfElementIDs() const
Definition: ddtGraphicalOverlay.cpp:45
DdtGraphicalOverlay::ShowElementsOfType
void ShowElementsOfType(const DdtOverlayType type, const bool showIds=false, const QString id_list="") const
Definition: ddtGraphicalOverlay.cpp:87
DdtGraphicalOverlay::RemoveElementsOfType
void RemoveElementsOfType(const DdtOverlayType type)
Definition: ddtGraphicalOverlay.cpp:109
DdtGraphicalOverlay::ShowAllElements
void ShowAllElements() const
Definition: ddtGraphicalOverlay.cpp:77