openmw-tes3coop/components/fileorderlist/datafileslist.hpp
Michal Sciubidlo 155cca0c9a Upload missing files.
Fix folder name.
Keep Qt optional.
Move open dialogue from doc to tools.
Rename 'load' to 'open'.
Deleted wrong comment.
2013-02-02 18:36:01 +01:00

96 lines
2.1 KiB
C++

#ifndef DATAFILESLIST_H
#define DATAFILESLIST_H
#include <QWidget>
#include <QModelIndex>
#include "utils/profilescombobox.hpp"
#include <components/files/collections.hpp>
class QTableView;
class QSortFilterProxyModel;
class QSettings;
class QAction;
class QToolBar;
class QMenu;
class ProfilesComboBox;
class DataFilesModel;
class TextInputDialog;
namespace Files { struct ConfigurationManager; }
class DataFilesList : public QWidget
{
Q_OBJECT
public:
DataFilesList(Files::ConfigurationManager& cfg, QWidget *parent = 0);
ProfilesComboBox *mProfilesComboBox;
void writeConfig(QString profile = QString());
bool showDataFilesWarning();
bool setupDataFiles();
void getSelectedFiles(std::vector<boost::filesystem::path>& paths);
public slots:
void setCheckState(QModelIndex index);
void filterChanged(const QString filter);
void showContextMenu(const QPoint &point);
void profileChanged(const QString &previous, const QString &current);
void profileRenamed(const QString &previous, const QString &current);
void updateOkButton(const QString &text);
// Action slots
void newProfile();
void deleteProfile();
// void moveUp();
// void moveDown();
// void moveTop();
// void moveBottom();
void check();
void uncheck();
void refresh();
private:
DataFilesModel *mMastersModel;
DataFilesModel *mPluginsModel;
QSortFilterProxyModel *mPluginsProxyModel;
QTableView *mMastersTable;
QTableView *mPluginsTable;
QToolBar *mProfileToolBar;
QMenu *mContextMenu;
QAction *mNewProfileAction;
QAction *mDeleteProfileAction;
// QAction *mMoveUpAction;
// QAction *mMoveDownAction;
// QAction *mMoveTopAction;
// QAction *mMoveBottomAction;
QAction *mCheckAction;
QAction *mUncheckAction;
Files::ConfigurationManager &mCfgMgr;
Files::PathContainer mDataDirs;
Files::PathContainer mDataLocal;
QSettings *mLauncherConfig;
TextInputDialog *mNewProfileDialog;
// const QStringList checkedPlugins();
// const QStringList selectedMasters();
void createActions();
void setupConfig();
void readConfig();
};
#endif