ddt  0.1
ddtGraphicalElementsDialog.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 ddtGraphicalElementsDialog.hpp
8 // @brief DDT Dialogs. Class for the graphical elements dialog
9 // A dialog to allow the user to draw graphical elements.
10 //
11 // Class for the DDT Graphical Elements Dialog
12 //
13 // @author Carsten Mannel, CGI
14 // @since 2020/11/16
15 //
16 
17 #ifndef DDT_DATAVISUALISATION_DDTDIALOGS_GRAPHICALELEMENTS_HPP
18 #define DDT_DATAVISUALISATION_DDTDIALOGS_GRAPHICALELEMENTS_HPP
19 
20 #include <QtWidgets>
21 
24 
29  Q_OBJECT
30 
31  public:
36  explicit DdtGraphicalElementsDialog(QWidget *parent = nullptr);
40  virtual ~DdtGraphicalElementsDialog() = default;
41 
48  void SetInitialParameter(const QString parameter_id,
49  const QVariant parameter) override;
50 
51  protected:
55  virtual void CreateDialog();
56 
57  void changeEvent(QEvent *event) override;
58  void focusInEvent(QFocusEvent *event) override;
59 
60  private:
61  QVBoxLayout *verticalLayout;
62  QGridLayout *gridLayout_toolButtons;
63  QToolButton *select_item_button;
64  QToolButton *text_button;
65  QToolButton *line_button;
66  QToolButton *rectangle_button;
67  QToolButton *ellipse_button;
68  QToolButton *cross_button;
69  QFormLayout *formLayout;
70  QLabel *label_thickness;
71  QComboBox *comboBox_thickness;
72  QLabel *label_font;
73  QToolButton *font_button;
74  QLabel *label_line_color;
75  QToolButton *line_color_button;
76  QCheckBox *checkBox_fill_color;
77  QToolButton *fill_color_button;
78  QLabel *label_tag;
79  QLineEdit *tag_lineEdit;
80  QLabel *label_thresholdscale;
81  QComboBox *comboBox_thresholdscale;
82  QHBoxLayout *horizontalLayout_buttons;
83  QPushButton *pushButton_delete;
84  QPushButton *pushButton_clear;
85  QPushButton *pushButton_quit;
86 
87  QString btn_height;
88  QString btn_width;
89  QString icon_btn_height;
90  QString icon_btn_width;
91 
92  void SetFontButtonText(QFont font);
93 
94  QFont current_font;
95 
96  QString current_draw_mode;
97 
98  void UncheckButtons();
99 
100  public slots:
106  void SetChangedParameter(const QString param_id,
107  const QVariant parameter) override;
108 
113  virtual void QuitPressed();
114 
115  private slots:
119  void LineThicknessCurrentIndexChanged(int index);
120 
124  void ThresholdScaleCurrentIndexChanged(int index);
125 
129  void FontSelection();
130 
134  void ColorSelection();
135 
139  void FillColorCheckboxClicked();
140 
144  void SetTag(QString tag);
145 
149  void DrawRectangle();
150 
154  void DrawEllipse();
155 
159  void DrawText();
160 
164  void DrawLine();
165 
169  void DrawCross();
170 
174  void SelectItem();
175 
179  void DeleteItem();
180 
184  void DeleteItems();
185 
186  signals:
190  void ParameterChanged(const QString dialog_id, const QString param_id,
191  const QVariant parameter);
192 };
193 
194 #endif // DDT_DATAVISUALISATION_DDTDIALOGS_GRAPHICALELEMENTS_HPP
DdtGraphicalElementsDialog::changeEvent
void changeEvent(QEvent *event) override
Definition: ddtGraphicalElementsDialog.cpp:232
DdtGraphicalElementsDialog::focusInEvent
void focusInEvent(QFocusEvent *event) override
Definition: ddtGraphicalElementsDialog.cpp:240
DdtGraphicalElementsDialog::~DdtGraphicalElementsDialog
virtual ~DdtGraphicalElementsDialog()=default
DdtGraphicalElementsDialog::SetChangedParameter
void SetChangedParameter(const QString param_id, const QVariant parameter) override
Definition: ddtGraphicalElementsDialog.cpp:441
ddtDialog.hpp
DdtGraphicalElementsDialog::CreateDialog
virtual void CreateDialog()
Definition: ddtGraphicalElementsDialog.cpp:30
DdtGraphicalElementsDialog::ParameterChanged
void ParameterChanged(const QString dialog_id, const QString param_id, const QVariant parameter)
DdtGraphicalElementsDialog::QuitPressed
virtual void QuitPressed()
Definition: ddtGraphicalElementsDialog.cpp:482
ddtDialogIds.hpp
DdtGraphicalElementsDialog
Definition: ddtGraphicalElementsDialog.hpp:28
DdtGraphicalElementsDialog::SetInitialParameter
void SetInitialParameter(const QString parameter_id, const QVariant parameter) override
Definition: ddtGraphicalElementsDialog.cpp:246
DdtDialog
Definition: ddtDialog.hpp:24
DdtGraphicalElementsDialog::DdtGraphicalElementsDialog
DdtGraphicalElementsDialog(QWidget *parent=nullptr)
Definition: ddtGraphicalElementsDialog.cpp:22