1 #ifndef CURVELIST_VIEW_H 2 #define CURVELIST_VIEW_H 5 #include <QFontDatabase> 6 #include <QGuiApplication> 11 #include <QStandardItem> 12 #include <QStandardItemModel> 13 #include <QTableWidget> 21 template <
typename ItemType>
31 return doj::alphanum_impl(this->
str.c_str(), other.
str.c_str()) < 0;
43 virtual void clear() = 0;
45 virtual void addItem(
const QString& item_name) = 0;
47 virtual std::vector<std::string> getSelectedNames() = 0;
49 virtual bool applyVisibilityFilter(
const QString& filter_string) = 0;
51 virtual void refreshFontSize() = 0;
53 virtual void refreshColumns() = 0;
55 virtual void hideValuesColumn(
bool hide) = 0;
57 virtual void setViewResizeEnabled(
bool enable) = 0;
59 bool eventFilterBase(QObject*
object, QEvent* event);
61 virtual std::pair<int, int> hiddenItemsCount() = 0;
63 virtual void removeCurve(
const QString&
name) = 0;
74 bool _newX_modifier =
false;
75 bool _dragging =
false;
87 _inserted_curves.clear();
90 void addItem(
const QString& item_name)
override;
92 void refreshColumns()
override;
94 std::vector<std::string> getSelectedNames()
override;
96 void refreshFontSize()
override;
98 void removeCurve(
const QString&
name)
override;
100 bool applyVisibilityFilter(
const QString& filter_string)
override;
107 return QWidget::eventFilter(
object, event);
115 void setViewResizeEnabled(
bool enable)
override;
119 return { _hidden_count, model()->rowCount() };
122 virtual void hideValuesColumn(
bool hide)
override;
125 int _hidden_count = 0;
129 #endif // CURVELIST_VIEW_H bool operator<(const SortedTableItem &other) const
QSet< QString > _inserted_curves
void setFontSize(int size)
CurveListPanel * _parent_panel
virtual std::pair< int, int > hiddenItemsCount() override
SortedTableItem(const QString &name)
void clear(lua_State *L, int table_index)
bool eventFilterBase(QObject *object, QEvent *event)
bool eventFilter(QObject *object, QEvent *event) override