plotwidget_editor.h
Go to the documentation of this file.
1 #ifndef PLOTWIDGET_EDITOR_H
2 #define PLOTWIDGET_EDITOR_H
3 
4 #include <QDialog>
5 #include <QKeyEvent>
6 #include "plotwidget.h"
7 #include "color_wheel.hpp"
8 #include "color_preview.hpp"
10 
11 namespace Ui {
12 class PlotWidgetEditor;
13 }
14 
15 class EditorRowWidget: public QWidget
16 {
17  Q_OBJECT
18 
19 public:
20  EditorRowWidget(QString text, QColor color);
21 
22  void enterEvent(QEvent *ev) override;
23  void leaveEvent(QEvent *ev) override;
24 
25  QString text() const;
26 
27  void setColor(QColor color);
28  QColor color() const;
29 
30 signals:
31 
32  void deleteRow(QWidget* _this);
33 
34 private:
35  QLabel* _text;
36  QColor _color;
37  QPushButton* _delete_button;
38  QWidget* _empty_spacer;
39 };
40 
41 class PlotwidgetEditor : public QDialog
42 {
43  Q_OBJECT
44 
45 public:
46  explicit PlotwidgetEditor(PlotWidget* plotwidget, QWidget *parent = nullptr);
48 
49 public slots:
50  void onColorChanged(QColor c);
51 
52 private slots:
53 
54  void on_editColotText_textChanged(const QString &arg1);
55 
56  void on_radioLines_toggled(bool checked);
57 
58  void on_radioPoints_toggled(bool checked);
59 
60  void on_radioBoth_toggled(bool checked);
61 
62  void on_checkBoxMax_toggled(bool checked);
63 
64  void on_checkBoxMin_toggled(bool checked);
65 
66  void on_pushButtonReset_clicked();
67 
68  void on_pushButtonCancel_pressed();
69 
70  void on_pushButtonSave_pressed();
71 
72  void on_listWidget_itemSelectionChanged();
73 
74  void on_lineLimitMin_textChanged(const QString &text);
75 
76  void on_lineLimitMax_textChanged(const QString &text);
77 
78 private:
79  Ui::PlotWidgetEditor *ui;
80 
86 
87  std::set<QWidget*> _connected_transform_widgets;
88 
89  void setupColorWidget();
90  void setupTable();
91  void updateLimits();
92  void onDeleteRow(QWidget *w);
93  void disableWidgets();
94 
95  std::unordered_map<std::string, std::shared_ptr<TimeSeriesTransform>> _transforms;
96 };
97 
98 #endif // PLOTWIDGET_EDITOR_H
Display an analog widget that allows the selection of a HSV color.
Definition: color_wheel.hpp:35
PlotWidget * _plotwidget_origin
PlotWidget * _plotwidget
QPushButton * _delete_button
std::set< QWidget * > _connected_transform_widgets
std::unordered_map< std::string, std::shared_ptr< TimeSeriesTransform > > _transforms
Ui::PlotWidgetEditor * ui
QRectF _bounding_rect_original
color_widgets::ColorPreview * _color_preview
QWidget * _empty_spacer
MQTTClient c
Definition: test10.c:1656
color_widgets::ColorWheel * _color_wheel


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10