2013-08-17 03:23:21 +00:00
|
|
|
#ifndef CONTENTSELECTOR_HPP
|
|
|
|
#define CONTENTSELECTOR_HPP
|
|
|
|
|
2013-08-20 17:34:39 +00:00
|
|
|
#include <QDialog>
|
2013-08-17 03:23:21 +00:00
|
|
|
|
|
|
|
#include "ui_datafilespage.h"
|
|
|
|
|
2013-08-18 20:11:29 +00:00
|
|
|
namespace EsxModel
|
2013-08-17 03:23:21 +00:00
|
|
|
{
|
2013-09-07 20:57:40 +00:00
|
|
|
class ContentModel;
|
2013-08-18 20:11:29 +00:00
|
|
|
class DataFilesModel;
|
|
|
|
}
|
2013-08-17 03:23:21 +00:00
|
|
|
|
2013-08-18 20:11:29 +00:00
|
|
|
class QSortFilterProxyModel;
|
|
|
|
|
|
|
|
namespace EsxView
|
|
|
|
{
|
2013-08-20 17:34:39 +00:00
|
|
|
class ContentSelector : public QDialog, protected Ui::DataFilesPage
|
2013-08-17 03:23:21 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2013-08-17 10:55:43 +00:00
|
|
|
protected:
|
|
|
|
|
2013-08-18 20:11:29 +00:00
|
|
|
EsxModel::DataFilesModel *mDataFilesModel;
|
2013-09-07 20:57:40 +00:00
|
|
|
EsxModel::ContentModel *mContentModel;
|
2013-09-18 07:36:23 +00:00
|
|
|
QSortFilterProxyModel *mMasterProxyModel;
|
|
|
|
QSortFilterProxyModel *mPluginsProxyModel;
|
2013-08-17 03:23:21 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
explicit ContentSelector(QWidget *parent = 0);
|
|
|
|
|
|
|
|
void buildModelsAndViews();
|
|
|
|
|
|
|
|
void addFiles(const QString &path);
|
|
|
|
void setEncoding(const QString &encoding);
|
2013-08-18 13:54:51 +00:00
|
|
|
void setPluginCheckState();
|
2013-08-18 00:40:28 +00:00
|
|
|
void setCheckState(QModelIndex index, QSortFilterProxyModel *model);
|
2013-08-17 03:23:21 +00:00
|
|
|
QStringList checkedItemsPaths();
|
2013-08-18 13:54:51 +00:00
|
|
|
void on_checkAction_triggered();
|
2013-09-18 07:36:23 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void buildSourceModel();
|
|
|
|
void buildMasterView();
|
|
|
|
void buildPluginsView();
|
|
|
|
void buildProfilesView();
|
2013-08-17 03:23:21 +00:00
|
|
|
|
2013-08-18 00:40:28 +00:00
|
|
|
signals:
|
|
|
|
void profileChanged(int index);
|
|
|
|
|
2013-08-17 03:23:21 +00:00
|
|
|
private slots:
|
|
|
|
void updateViews();
|
2013-08-18 00:40:28 +00:00
|
|
|
void slotCurrentProfileIndexChanged(int index);
|
|
|
|
void slotCurrentMasterIndexChanged(int index);
|
2013-08-18 13:54:51 +00:00
|
|
|
void slotPluginTableItemClicked(const QModelIndex &index);
|
2013-08-17 03:23:21 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // CONTENTSELECTOR_HPP
|