porymap/include/ui/montabwidget.h

45 lines
885 B
C
Raw Normal View History

#ifndef MONTABWIDGET_H
#define MONTABWIDGET_H
#include "wildmoninfo.h"
#include <QtWidgets>
#include <QVector>
class Editor;
class MonTabWidget : public QTabWidget {
Q_OBJECT
public:
explicit MonTabWidget(Editor *editor = nullptr, QWidget *parent = nullptr);
2023-01-26 20:46:44 +00:00
~MonTabWidget();
void populate();
2023-01-15 04:10:58 +00:00
void populateTab(int tabIndex, WildMonInfo monInfo);
void clear();
void clearTableAt(int index);
2023-01-15 04:10:58 +00:00
QTableView *tableAt(int tabIndex);
public slots:
void setTabActive(int index, bool active = true);
2023-01-19 18:06:27 +00:00
void deactivateTab(int tabIndex);
private:
bool eventFilter(QObject *object, QEvent *event);
2023-01-19 18:06:27 +00:00
void actionCopyTab(int index);
void actionAddDeleteTab(int index);
QVector<bool> activeTabs;
2023-01-19 18:06:27 +00:00
QVector<QPushButton *> addDeleteTabButtons;
QVector<QPushButton *> copyTabButtons;
Editor *editor;
};
#endif // MONTABWIDGET_H