mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-03 10:06:41 +00:00
Removed vertical headers from plugin view
This commit is contained in:
parent
49c4e1bf9e
commit
b850fe0289
3 changed files with 8 additions and 6 deletions
|
@ -32,12 +32,14 @@ DataFilesPage::DataFilesPage(Files::ConfigurationManager &cfg, GameSettings &gam
|
||||||
mDataFilesModel = new DataFilesModel(this);
|
mDataFilesModel = new DataFilesModel(this);
|
||||||
|
|
||||||
mMastersProxyModel = new QSortFilterProxyModel();
|
mMastersProxyModel = new QSortFilterProxyModel();
|
||||||
mMastersProxyModel->setFilterRegExp(QString("^.*\\.esm"));
|
mMastersProxyModel->setFilterRegExp(QString("game")); //QString("^.*\\.esm"));
|
||||||
|
mMastersProxyModel->setFilterRole (Qt::UserRole);
|
||||||
mMastersProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
mMastersProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||||
mMastersProxyModel->setSourceModel(mDataFilesModel);
|
mMastersProxyModel->setSourceModel(mDataFilesModel);
|
||||||
|
|
||||||
mPluginsProxyModel = new PluginsProxyModel();
|
mPluginsProxyModel = new PluginsProxyModel();
|
||||||
mPluginsProxyModel->setFilterRegExp(QString("^.*\\.esp"));
|
mPluginsProxyModel->setFilterRegExp(QString("addon")); //^.*\\.esp"));
|
||||||
|
mPluginsProxyModel->setFilterRole (Qt::UserRole);
|
||||||
mPluginsProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
mPluginsProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||||
mPluginsProxyModel->setSourceModel(mDataFilesModel);
|
mPluginsProxyModel->setSourceModel(mDataFilesModel);
|
||||||
|
|
||||||
|
|
|
@ -202,11 +202,11 @@ QVariant DataFilesModel::headerData(int section, Qt::Orientation orientation, in
|
||||||
case 7: return tr("Masters");
|
case 7: return tr("Masters");
|
||||||
case 8: return tr("Description");
|
case 8: return tr("Description");
|
||||||
}
|
}
|
||||||
} else {
|
} /* else {
|
||||||
// Show row numbers
|
// Show row numbers
|
||||||
return ++section;
|
return ++section;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ PluginsProxyModel::~PluginsProxyModel()
|
||||||
|
|
||||||
QVariant PluginsProxyModel::headerData(int section, Qt::Orientation orientation, int role) const
|
QVariant PluginsProxyModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||||
{
|
{
|
||||||
if (orientation != Qt::Vertical || role != Qt::DisplayRole)
|
//if (orientation != Qt::Vertical || role != Qt::DisplayRole)
|
||||||
return QSortFilterProxyModel::headerData(section, orientation, role);
|
return QSortFilterProxyModel::headerData(section, orientation, role);
|
||||||
return section + 1;
|
// return section + 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue