mirror-chatterino2/src/widgets/helper/EditableModelView.hpp
2019-09-08 22:27:57 +02:00

35 lines
655 B
C++

#pragma once
#include <QWidget>
#include <pajlada/signals/signal.hpp>
class QAbstractTableModel;
class QTableView;
class QHBoxLayout;
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;
void addCustomButton(QWidget *widget);
void addRegexHelpLink();
private:
QTableView *tableView_{};
QAbstractTableModel *model_{};
QHBoxLayout *buttons_{};
};
} // namespace chatterino