|
|
|
@ -9,13 +9,14 @@
|
|
|
|
|
|
|
|
|
|
#include "components/esm/esmreader.hpp"
|
|
|
|
|
|
|
|
|
|
ContentSelectorModel::ContentModel::ContentModel(QObject *parent, QIcon warningIcon) :
|
|
|
|
|
ContentSelectorModel::ContentModel::ContentModel(QObject *parent, QIcon warningIcon, bool showGameFiles) :
|
|
|
|
|
QAbstractTableModel(parent),
|
|
|
|
|
mWarningIcon(warningIcon),
|
|
|
|
|
mMimeType ("application/omwcontent"),
|
|
|
|
|
mMimeTypes (QStringList() << mMimeType),
|
|
|
|
|
mColumnCount (1),
|
|
|
|
|
mDropActions (Qt::MoveAction)
|
|
|
|
|
mDropActions (Qt::MoveAction),
|
|
|
|
|
mShowGameFiles(showGameFiles)
|
|
|
|
|
{
|
|
|
|
|
setEncoding ("win1252");
|
|
|
|
|
uncheckAll();
|
|
|
|
@ -110,9 +111,14 @@ Qt::ItemFlags ContentSelectorModel::ContentModel::flags(const QModelIndex &index
|
|
|
|
|
if (!file)
|
|
|
|
|
return Qt::NoItemFlags;
|
|
|
|
|
|
|
|
|
|
//game files are not shown
|
|
|
|
|
//game files are not shown (unless OpenCS)
|
|
|
|
|
if (file->isGameFile())
|
|
|
|
|
{
|
|
|
|
|
if(mShowGameFiles)
|
|
|
|
|
return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsUserCheckable;
|
|
|
|
|
else
|
|
|
|
|
return Qt::NoItemFlags;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Qt::ItemFlags returnFlags;
|
|
|
|
|
|
|
|
|
|