curvelist_panel.h
Go to the documentation of this file.
1 #ifndef CURVE_SELECTOR_H
2 #define CURVE_SELECTOR_H
3 
4 #include <QWidget>
5 #include <QAction>
6 #include <QListWidget>
7 #include <QMouseEvent>
8 #include <QStandardItemModel>
9 #include <QTableView>
10 #include <QItemSelection>
11 
13 #include "tree_completer.h"
14 #include "curvetree_view.h"
15 #include <array>
16 
17 namespace Ui
18 {
19 class CurveListPanel;
20 }
21 
22 class CurveListPanel : public QWidget
23 {
24  Q_OBJECT
25 
26 public:
27  explicit CurveListPanel(const CustomPlotMap& mapped_math_plots, QWidget* parent);
28 
29  ~CurveListPanel() override;
30 
31  void clear();
32 
33  void addCurve(const QString& item_name);
34 
35  void addCustom(const QString& item_name);
36 
37  void refreshColumns();
38 
39  void removeCurve(const std::string& name);
40 
41  void rebuildEntireList(const std::vector<std::string>& names);
42 
43  void updateFilter();
44 
45  void changeFontSize(int point_size);
46 
47  bool is2ndColumnHidden() const;
48 
49  void update2ndColumnValues(double time, std::unordered_map<std::string, PlotData>* numeric_data);
50 
51  virtual void keyPressEvent(QKeyEvent* event) override;
52 
53 private slots:
54 
55  void on_lineEditFilter_textChanged(const QString& search_string);
56 
57  void removeSelectedCurves();
58 
59  void on_buttonAddCustom_clicked();
60 
61  void on_buttonEditCustom_clicked();
62 
63  void onCustomSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
64 
65  void on_checkBoxShowValues_toggled(bool show);
66 
67 public slots:
68 
69  void clearSelections();
70 
71  void on_stylesheetChanged(QString theme);
72 
73  void refreshValues();
74 
75 private:
76  Ui::CurveListPanel* ui;
77 
78  void updateTreeModel();
79 
82 
83  double _tracker_time = 0;
84  std::unordered_map<std::string, PlotData>* _numeric_data = nullptr;
85 
87 
88  QString _style_dir;
89 
91 
92 signals:
93 
94  void hiddenItemsChanged();
95 
96  void createMathPlot(const std::string& linked_plot);
97  void editMathPlot(const std::string& plot_name);
98  void refreshMathPlot(const std::string& curve_name);
99 
100  void deleteCurves(const std::vector<std::string>& curve_names);
101 };
102 
103 #endif // CURVE_SELECTOR_H
CurveTreeView * _tree_view
Ui::CurveListPanel * ui
const char * name
std::unordered_map< std::string, CustomPlotPtr > CustomPlotMap
const CustomPlotMap & _custom_plots
float time
Definition: mqtt_test.py:17
void clear(lua_State *L, int table_index)
Definition: sol.hpp:10569
CurveTableView * _custom_view


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:47:33