2018-05-06 00:32:45 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
#include <pajlada/signals/signal.hpp>
|
|
|
|
|
|
|
|
class QAbstractTableModel;
|
|
|
|
class QTableView;
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
|
|
|
class EditableModelView : public QWidget
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
EditableModelView(QAbstractTableModel *model);
|
|
|
|
|
|
|
|
void setTitles(std::initializer_list<QString> titles);
|
|
|
|
|
|
|
|
QTableView *getTableView();
|
|
|
|
QAbstractTableModel *getModel();
|
|
|
|
|
|
|
|
pajlada::Signals::NoArgSignal addButtonPressed;
|
|
|
|
|
|
|
|
private:
|
2018-07-06 19:23:47 +02:00
|
|
|
QTableView *tableView_;
|
|
|
|
QAbstractTableModel *model_;
|
2018-05-06 00:32:45 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace chatterino
|