1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/components/contentselector/view/contentselector.hpp

54 lines
1.3 KiB
C++
Raw Normal View History

#ifndef CONTENTSELECTOR_HPP
#define CONTENTSELECTOR_HPP
2013-08-20 12:34:39 -05:00
#include <QDialog>
#include "ui_datafilespage.h"
namespace ContentSelectorModel { class ContentModel; }
class QSortFilterProxyModel;
namespace ContentSelectorView
{
2013-08-20 12:34:39 -05:00
class ContentSelector : public QDialog, protected Ui::DataFilesPage
{
Q_OBJECT
protected:
ContentSelectorModel::ContentModel *mContentModel;
QSortFilterProxyModel *mGameFileProxyModel;
QSortFilterProxyModel *mAddonProxyModel;
public:
explicit ContentSelector(QWidget *parent = 0);
static ContentSelector &cast(QWidget *subject); //static constructor function for singleton performance.
void addFiles(const QString &path);
void setCheckState(QModelIndex index, QSortFilterProxyModel *model);
QStringList checkedItemsPaths();
2013-09-18 02:36:23 -05:00
private:
void buildContentModel();
void buildGameFileView();
void buildAddonView();
2013-09-18 02:36:23 -05:00
void buildProfilesView();
signals:
void profileChanged(int index);
void signalGameFileChanged(int value);
private slots:
void updateViews();
void slotCurrentProfileIndexChanged(int index);
void slotCurrentGameFileIndexChanged(int index);
void slotAddonTableItemClicked(const QModelIndex &index);
};
}
#endif // CONTENTSELECTOR_HPP