diff options
author | Chris Xiong <chirs241097@gmail.com> | 2019-10-08 11:18:27 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2019-10-08 11:18:27 +0800 |
commit | 3032c0021389b2a5211b4a6e5d1c2929ce307bf5 (patch) | |
tree | 4e9ec46dc450358ee2693e3fc3949d6fe2a65b0d /qmidiplayer-desktop/qmpchannelswindow.hpp | |
parent | dfdd98ae185a46949b668d01fcce3f5f2646970a (diff) | |
download | QMidiPlayer-3032c0021389b2a5211b4a6e5d1c2929ce307bf5.tar.xz |
Continue reducing usage of widgets in QTableWidget.
Diffstat (limited to 'qmidiplayer-desktop/qmpchannelswindow.hpp')
-rw-r--r-- | qmidiplayer-desktop/qmpchannelswindow.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qmidiplayer-desktop/qmpchannelswindow.hpp b/qmidiplayer-desktop/qmpchannelswindow.hpp index 93742a2..072f9d3 100644 --- a/qmidiplayer-desktop/qmpchannelswindow.hpp +++ b/qmidiplayer-desktop/qmpchannelswindow.hpp @@ -40,6 +40,7 @@ class qmpChannelsModel:public QAbstractTableModel int rowCount(const QModelIndex&parent=QModelIndex())const override; QModelIndex parent(const QModelIndex&child)const override; QVariant data(const QModelIndex&index,int role=Qt::ItemDataRole::DisplayRole)const override; + bool setData(const QModelIndex &index,const QVariant &value,int role=Qt::EditRole)override; QVariant headerData(int section,Qt::Orientation orientation,int role=Qt::ItemDataRole::DisplayRole)const override; Qt::ItemFlags flags(const QModelIndex&idx)const override; public slots: @@ -56,7 +57,7 @@ class qmpDeviceItemDelegate:public QStyledItemDelegate { Q_OBJECT public: - explicit qmpDeviceItemDelegate(QWidget*parent=nullptr); + explicit qmpDeviceItemDelegate(bool ignoreInternal=false,QWidget*parent=nullptr); void paint(QPainter*painter,const QStyleOptionViewItem&option,const QModelIndex&index)const override; QSize sizeHint(const QStyleOptionViewItem&option,const QModelIndex&index)const override; QWidget* createEditor(QWidget*parent,const QStyleOptionViewItem&option,const QModelIndex&index)const override; @@ -65,6 +66,7 @@ class qmpDeviceItemDelegate:public QStyledItemDelegate void updateEditorGeometry(QWidget*editor,const QStyleOptionViewItem&option,const QModelIndex&index)const override; private: QWidget *par; + bool nofs; }; class qmpChannelsWindow:public QWidget |