mirror of
https://github.com/huderlem/porymap.git
synced 2026-09-12 19:05:37 -05:00
custom table widget for mon data, add new encounter fields to maps
This commit is contained in:
51
include/ui/montabwidget.h
Normal file
51
include/ui/montabwidget.h
Normal file
@@ -0,0 +1,51 @@
|
||||
// montablewidget.h
|
||||
|
||||
#ifndef MONTABWIDGET_H
|
||||
#define MONTABWIDGET_H
|
||||
|
||||
#include "wildmoninfo.h"
|
||||
|
||||
#include <QtWidgets>
|
||||
#include <QVector>
|
||||
|
||||
//
|
||||
class Project;
|
||||
|
||||
class MonTabWidget : public QTabWidget {
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MonTabWidget(Project *project = nullptr, QWidget *parent = nullptr);
|
||||
~MonTabWidget(){};
|
||||
|
||||
void populate();
|
||||
void populateTab(int tabIndex, WildMonInfo monInfo, QString fieldName);
|
||||
void clear();
|
||||
|
||||
void createSpeciesTableRow(QTableWidget *table, WildPokemon mon, int index, QString fieldName);
|
||||
|
||||
void clearTableAt(int index);
|
||||
|
||||
QTableWidget *tableAt(int tabIndex);
|
||||
//void setupTableAt(int tabIndex);
|
||||
|
||||
public slots:
|
||||
void setTabActive(int index, bool active = true);
|
||||
|
||||
private:
|
||||
bool eventFilter(QObject *object, QEvent *event);
|
||||
void askActivateTab(int tabIndex, QPoint menuPos);
|
||||
|
||||
QVector<bool> activeTabs;
|
||||
|
||||
Project *project;
|
||||
|
||||
private slots:
|
||||
//
|
||||
|
||||
signals:
|
||||
// right click
|
||||
};
|
||||
|
||||
#endif // MONTABWIDGET_H
|
||||
Reference in New Issue
Block a user