ddt  0.1
ddtGraphicsControlDialog.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 ddtGraphicsControlDialog.hpp
8 // @brief DDT Dialogs. Class for dialog for the control of graphical elements
9 // A dialog which allows the user to control graphical
10 // elements.
11 //
12 // Class for the DDT Graphics Control Dialog
13 //
14 // @author Carsten Mannel, CGI
15 // @since 2021/06/11
16 //
17 
18 #ifndef DATAVISUALISATION_WIDGETSDIALOGS_SRC_INCLUDE_DDT_DIALOGS_DDTGRAPHICSCONTROLDIALOG_CPP_
19 #define DATAVISUALISATION_WIDGETSDIALOGS_SRC_INCLUDE_DDT_DIALOGS_DDTGRAPHICSCONTROLDIALOG_CPP_
20 
21 #include <QtWidgets>
22 
25 
30  Q_OBJECT
31 
32  public:
37  explicit DdtGraphicsControlDialog(QWidget *parent = nullptr);
41  ~DdtGraphicsControlDialog() override = default;
42 
49  void SetInitialParameter(const QString parameter_id,
50  const QVariant parameter) override;
51 
56  QString GetDialogName() override;
57 
58  protected:
62  void CreateDialog() override;
63 
67  virtual void AddElementsToGroupBox();
68 
69  private:
70  QVBoxLayout *verticalLayout;
71  QHBoxLayout *hlayout_lines;
72  QHBoxLayout *hlayout_rectangles;
73  QHBoxLayout *hlayout_crosses;
74  QHBoxLayout *hlayout_text;
75  QHBoxLayout *hlayout_ellipses;
76  QHBoxLayout *hlayout_tag;
77  QVBoxLayout *group_box_layout;
78 
79  QGroupBox *group_box_graphical_elements;
80 
81  QCheckBox *checkbox_show_lines;
82  QCheckBox *checkbox_show_rectangles;
83  QCheckBox *checkbox_show_crosses;
84  QCheckBox *checkbox_show_text;
85  QCheckBox *checkbox_show_ellipses;
86 
87  QCheckBox *checkbox_show_tag;
88 
89  QLineEdit *tag_list;
90 
91  QPushButton *button_select_lines;
92  QCheckBox *checkbox_show_selected_lines;
93  QLineEdit *line_list;
94 
95  QPushButton *button_select_rectangles;
96  QCheckBox *checkbox_show_selected_rectangles;
97  QLineEdit *rectangle_list;
98 
99  QPushButton *button_select_crosses;
100  QCheckBox *checkbox_show_selected_crosses;
101  QLineEdit *cross_list;
102 
103  QPushButton *button_select_text;
104  QCheckBox *checkbox_show_selected_text;
105  QLineEdit *text_list;
106 
107  QPushButton *button_select_ellipses;
108  QCheckBox *checkbox_show_selected_ellipses;
109  QLineEdit *ellipse_list;
110 
111  QStringList id_list;
112 
113  public slots:
119  void SetChangedParameter(const QString param_id,
120  const QVariant parameter) override;
121 
126  void QuitPressed() override;
127 
128  private slots:
129 
130  void ShowGraphicalElementsSelected(const bool flag);
131 
132  void ShowLinesSelected(const bool flag);
133  void ShowSelectedLinesSelected(const bool flag);
134  void ShowRectanglesSelected(const bool flag);
135  void ShowSelectedRectanglesSelected(const bool flag);
136  void ShowCrossesSelected(const bool flag);
137  void ShowSelectedCrossesSelected(const bool flag);
138  void ShowTextSelected(const bool flag);
139  void ShowSelectedTextSelected(const bool flag);
140  void ShowEllipsesSelected(const bool flag);
141  void ShowSelectedEllipsesSelected(const bool flag);
142 
143  void ShowTagSelected(const bool flag);
144 
145  QString SelectItems(const QString itemType);
146  void SelectLineItems();
147  void SelectRectangleItems();
148  void SelectCrossItems();
149  void SelectTextItems();
150  void SelectEllipseItems();
151 
152  void AddControlsLines(const int checkboxsize);
153  void AddControlsRectangles(const int checkboxsize);
154  void AddControlsCrosses(const int checkboxsize);
155  void AddControlsText(const int checkboxsize);
156  void AddControlsEllipses(const int checkboxsize);
157  void AddControlsTags();
158 
159  signals:
163  void ParameterChanged(const QString dialog_id, const QString param_id,
164  const QVariant parameter);
165 };
166 
167 #endif // DATAVISUALISATION_WIDGETSDIALOGS_SRC_INCLUDE_DDT_DIALOGS_DDTGRAPHICSCONTROLDIALOG_CPP_
DdtGraphicsControlDialog::SetChangedParameter
void SetChangedParameter(const QString param_id, const QVariant parameter) override
Definition: ddtGraphicsControlDialog.cpp:253
DdtGraphicsControlDialog::AddElementsToGroupBox
virtual void AddElementsToGroupBox()
Definition: ddtGraphicsControlDialog.cpp:113
DdtGraphicsControlDialog::~DdtGraphicsControlDialog
~DdtGraphicsControlDialog() override=default
DdtGraphicsControlDialog
Definition: ddtGraphicsControlDialog.hpp:29
ddtDialog.hpp
DdtGraphicsControlDialog::ParameterChanged
void ParameterChanged(const QString dialog_id, const QString param_id, const QVariant parameter)
DdtGraphicsControlDialog::GetDialogName
QString GetDialogName() override
Definition: ddtGraphicsControlDialog.cpp:30
DdtGraphicsControlDialog::DdtGraphicsControlDialog
DdtGraphicsControlDialog(QWidget *parent=nullptr)
Definition: ddtGraphicsControlDialog.cpp:24
ddtDialogIds.hpp
DdtGraphicsControlDialog::SetInitialParameter
void SetInitialParameter(const QString parameter_id, const QVariant parameter) override
Definition: ddtGraphicsControlDialog.cpp:236
DdtGraphicsControlDialog::CreateDialog
void CreateDialog() override
Definition: ddtGraphicsControlDialog.cpp:35
DdtDialog
Definition: ddtDialog.hpp:24
DdtGraphicsControlDialog::QuitPressed
void QuitPressed() override
Definition: ddtGraphicsControlDialog.cpp:481