1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00
OpenMW/apps/launcher/datafilespage.hpp

64 lines
1.4 KiB
C++
Raw Normal View History

2011-04-08 00:04:09 +02:00
#ifndef DATAFILESPAGE_H
#define DATAFILESPAGE_H
#include <QWidget>
#include <QModelIndex>
#include "combobox.hpp"
2011-04-08 00:04:09 +02:00
class QTableWidget;
class QTableView;
class ComboBox;
2011-04-08 00:04:09 +02:00
class QStandardItemModel;
class QItemSelection;
class QItemSelectionModel;
class QStringListModel;
class QSettings;
class QPushButton;
2011-04-08 00:04:09 +02:00
class DataFilesPage : public QWidget
{
Q_OBJECT
public:
DataFilesPage(QWidget *parent = 0);
ComboBox *mProfilesComboBox;
//QStringListModel *mProfilesModel;
QSettings *mLauncherConfig;
2011-04-08 00:04:09 +02:00
2011-04-24 23:23:04 +02:00
const QStringList checkedPlugins();
2011-04-25 10:41:16 +02:00
void setupConfig();
void readConfig();
2011-04-25 10:41:16 +02:00
void writeConfig(QString profile = QString());
void setupDataFiles(const QString &path);
2011-04-08 00:04:09 +02:00
public slots:
void masterSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
void setCheckstate(QModelIndex index);
void resizeRows();
2011-04-25 10:41:16 +02:00
void profileChanged(const QString &previous, const QString &current);
void newProfile();
void copyProfile();
2011-05-02 23:06:11 +02:00
void deleteProfile();
2011-04-08 00:04:09 +02:00
private:
QTableWidget *mMastersWidget;
QTableView *mPluginsTable;
2011-04-24 21:42:56 +02:00
2011-04-08 00:04:09 +02:00
QStandardItemModel *mDataFilesModel;
QStandardItemModel *mPluginsModel;
2011-04-24 21:42:56 +02:00
2011-04-08 00:04:09 +02:00
QItemSelectionModel *mPluginsSelectModel;
QPushButton *mNewProfileButton;
QPushButton *mCopyProfileButton;
QPushButton *mDeleteProfileButton;
2011-04-08 00:04:09 +02:00
void addPlugins(const QModelIndex &index);
void removePlugins(const QModelIndex &index);
2011-04-24 23:23:04 +02:00
void uncheckPlugins();
2011-04-24 21:42:56 +02:00
};
2011-04-08 00:04:09 +02:00
2011-04-24 21:42:56 +02:00
#endif