15 #ifndef BORNAGAIN_MVVM_VIEWMODEL_MVVM_EDITORS_SELECTABLECOMBOBOXEDITOR_H
16 #define BORNAGAIN_MVVM_VIEWMODEL_MVVM_EDITORS_SELECTABLECOMBOBOXEDITOR_H
21 class QStandardItemModel;
25 class WheelEventFilter;
35 QSize sizeHint()
const override;
36 QSize minimumSizeHint()
const override;
38 bool is_persistent()
const override;
41 void onModelDataChanged(
const QModelIndex&,
const QModelIndex&,
const QVector<int>&);
43 void onClickedList(
const QModelIndex& index);
46 void update_components()
override;
49 bool eventFilter(QObject* obj, QEvent* event)
override;
50 void setConnected(
bool isConnected);
51 void updateBoxLabel();
53 bool isClickToSelect(QObject* obj, QEvent* event)
const;
54 bool isClickToExpand(QObject* obj, QEvent* event)
const;
56 QComboBox* m_box{
nullptr};
58 QStandardItemModel* m_model{
nullptr};
Base class for all custom variant editors.
Adds multi-selection capabilities to QComboBox.
Event filter to install on combo boxes and spin boxes to ignore wheel events during scrolling.
materialitems.h Collection of materials to populate MaterialModel.