curvetree_view.h
Go to the documentation of this file.
1 /*
2  * This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
5  */
6 
7 #ifndef CURVETREE_VIEW_H
8 #define CURVETREE_VIEW_H
9 
10 #include "curvelist_view.h"
11 #include <QTreeWidget>
12 #include <functional>
13 
14 class CurveTreeView : public QTreeWidget, public CurvesView
15 {
16 public:
18 
19  void clear() override
20  {
22  _leaf_count = 0;
23  _hidden_count = 0;
24  }
25 
26  void addItem(const QString& prefix, const QString& tree_name,
27  const QString& plot_ID) override;
28 
29  void refreshColumns() override;
30 
31  std::vector<std::string> getSelectedNames() override;
32 
33  void refreshFontSize() override;
34 
35  bool applyVisibilityFilter(const QString& filter_string) override;
36 
37  bool eventFilter(QObject* object, QEvent* event) override;
38 
39  void removeCurve(const QString& name) override;
40 
41  std::pair<int, int> hiddenItemsCount() override
42  {
43  return { _hidden_count, _leaf_count };
44  }
45 
46  void setViewResizeEnabled(bool) override
47  {
48  }
49 
50  virtual void hideValuesColumn(bool hide) override;
51 
52  void treeVisitor(std::function<void(QTreeWidgetItem*)> visitor);
53 
54  virtual void keyPressEvent(QKeyEvent*) override;
55 
56 private:
57  void expandChildren(bool expanded, QTreeWidgetItem* item);
58 
59  int _hidden_count = 0;
60  int _leaf_count = 0;
61 };
62 
63 #endif // CURVETREE_VIEW_H
std::vector< std::string > getSelectedNames() override
void expandChildren(bool expanded, QTreeWidgetItem *item)
void removeCurve(const QString &name) override
void treeVisitor(std::function< void(QTreeWidgetItem *)> visitor)
void addItem(const QString &prefix, const QString &tree_name, const QString &plot_ID) override
virtual void keyPressEvent(QKeyEvent *) override
bool eventFilter(QObject *object, QEvent *event) override
void refreshColumns() override
std::pair< int, int > hiddenItemsCount() override
void refreshFontSize() override
CurveTreeView(CurveListPanel *parent)
void setViewResizeEnabled(bool) override
void clear(lua_State *L, int table_index)
Definition: sol.hpp:11710
bool applyVisibilityFilter(const QString &filter_string) override
virtual void hideValuesColumn(bool hide) override
void clear() override


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:01:01