mirror-chatterino2/src/widgets/helper/EditableModelView.hpp

30 lines
557 B
C++
Raw Normal View History

#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:
QTableView *tableView;
QAbstractTableModel *model;
};
} // namespace chatterino