reworked commands settings page

This commit is contained in:
fourtf
2018-04-27 01:11:09 +02:00
parent e23ce31e05
commit 49069beed7
11 changed files with 221 additions and 50 deletions
@@ -0,0 +1,26 @@
#pragma once
#include <QStyledItemDelegate>
namespace chatterino {
namespace widgets {
// stolen from https://wiki.qt.io/Combo_Boxes_in_Item_Views
class ComboBoxItemDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
ComboBoxItemDelegate(QObject *parent = 0);
~ComboBoxItemDelegate();
virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const;
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const;
virtual void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const;
};
} // namespace widgets
} // namespace chatterino