mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
6878e317a7
fixes bug reported by scrawl 1. openmw.cfg had content files in order 'Bloodmoon.esm, Tribunal.esm, Morrowind.esm' 2. Blank_ESM_2.0.esm is in the Data Files directory 3. Do an ini file import. 4. Imported profile will have Blank_ESM_2.0.esm as the game file. Should be Morrowind.esm. Root cause: Game File combo box and Plugins Grid shared same data model, so changing plug-in file order also changed order of Game File combo box.
68 lines
1.6 KiB
C++
68 lines
1.6 KiB
C++
#ifndef CONTENTSELECTOR_HPP
|
|
#define CONTENTSELECTOR_HPP
|
|
|
|
#include <QDialog>
|
|
|
|
#include "ui_contentselector.h"
|
|
#include "../model/contentmodel.hpp"
|
|
|
|
class QSortFilterProxyModel;
|
|
|
|
namespace ContentSelectorView
|
|
{
|
|
class ContentSelector : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
QStringList mFilePaths;
|
|
|
|
protected:
|
|
|
|
ContentSelectorModel::ContentModel *mContentModel;
|
|
QSortFilterProxyModel *mAddonProxyModel;
|
|
|
|
public:
|
|
|
|
explicit ContentSelector(QWidget *parent = 0);
|
|
|
|
QString currentFile() const;
|
|
|
|
void addFiles(const QString &path);
|
|
void setProfileContent (const QStringList &fileList);
|
|
|
|
void clearCheckStates();
|
|
void setContentList(const QStringList &list);
|
|
|
|
ContentSelectorModel::ContentFileList selectedFiles() const;
|
|
|
|
void setGameFile (const QString &filename = QString(""));
|
|
|
|
bool isGamefileSelected() const
|
|
{ return ui.gameFileView->currentIndex() != -1; }
|
|
|
|
QWidget *uiWidget() const
|
|
{ return ui.contentGroupBox; }
|
|
|
|
|
|
private:
|
|
|
|
Ui::ContentSelector ui;
|
|
|
|
void buildContentModel();
|
|
void buildGameFileView();
|
|
void buildAddonView();
|
|
void setGameFileSelected(int index, bool selected);
|
|
|
|
signals:
|
|
void signalCurrentGamefileIndexChanged (int);
|
|
|
|
void signalAddonDataChanged (const QModelIndex& topleft, const QModelIndex& bottomright);
|
|
|
|
private slots:
|
|
|
|
void slotCurrentGameFileIndexChanged(int index);
|
|
void slotAddonTableItemActivated(const QModelIndex& index);
|
|
};
|
|
}
|
|
|
|
#endif // CONTENTSELECTOR_HPP
|