OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
ContentSelectorModel::ContentModel Class Reference

#include <contentmodel.hpp>

Inheritance diagram for ContentSelectorModel::ContentModel:
Collaboration diagram for ContentSelectorModel::ContentModel:

Public Member Functions

 ContentModel (QObject *parent, QIcon warningIcon)
 
 ~ContentModel ()
 
void setEncoding (const QString &encoding)
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 
int columnCount (const QModelIndex &parent=QModelIndex()) const
 
QVariant data (const QModelIndex &index, int role) const
 
Qt::ItemFlags flags (const QModelIndex &index) const
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 
bool insertRows (int position, int rows, const QModelIndex &index=QModelIndex())
 
bool removeRows (int position, int rows, const QModelIndex &index=QModelIndex())
 
Qt::DropActions supportedDropActions () const
 
QStringList mimeTypes () const
 
QMimeDatamimeData (const QModelIndexList &indexes) const
 
bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
 
void addFiles (const QString &path)
 
void clearFiles ()
 
QModelIndex indexFromItem (const EsmFile *item) const
 
const EsmFileitem (const QString &name) const
 
QStringList gameFiles () const
 
bool isEnabled (QModelIndex index) const
 
bool isChecked (const QString &filepath) const
 
bool setCheckState (const QString &filepath, bool isChecked)
 
void setContentList (const QStringList &fileList)
 
ContentFileList checkedItems () const
 
void uncheckAll ()
 
void refreshModel ()
 
void checkForLoadOrderErrors ()
 Checks all plug-ins for load order errors and updates mPluginsWithLoadOrderError with plug-ins with issues. More...
 

Public Attributes

QString mMimeType
 
QStringList mMimeTypes
 
int mColumnCount
 
Qt::DropActions mDropActions
 

Private Member Functions

void addFile (EsmFile *file)
 
const EsmFileitem (int row) const
 
EsmFileitem (int row)
 
void sortFiles ()
 
QList< LoadOrderErrorcheckForLoadOrderErrors (const EsmFile *file, int row) const
 
bool isLoadOrderError (const EsmFile *file) const
 
QString toolTip (const EsmFile *file) const
 

Private Attributes

ContentFileList mFiles
 
QHash< QString, Qt::CheckState > mCheckStates
 
QSet< QString > mPluginsWithLoadOrderError
 
QString mEncoding
 
QIcon mWarningIcon
 

Constructor & Destructor Documentation

ContentSelectorModel::ContentModel::ContentModel ( QObject parent,
QIcon  warningIcon 
)
explicit

Here is the call graph for this function:

ContentSelectorModel::ContentModel::~ContentModel ( )

Member Function Documentation

void ContentSelectorModel::ContentModel::addFile ( EsmFile file)
private
void ContentSelectorModel::ContentModel::addFiles ( const QString &  path)

Here is the call graph for this function:

ContentSelectorModel::ContentFileList ContentSelectorModel::ContentModel::checkedItems ( ) const

Here is the call graph for this function:

void ContentSelectorModel::ContentModel::checkForLoadOrderErrors ( )

Checks all plug-ins for load order errors and updates mPluginsWithLoadOrderError with plug-ins with issues.

Here is the call graph for this function:

QList< ContentSelectorModel::LoadOrderError > ContentSelectorModel::ContentModel::checkForLoadOrderErrors ( const EsmFile file,
int  row 
) const
private

Checks a specific plug-in for load order errors

Returns
all errors found for specific plug-in

Here is the call graph for this function:

void ContentSelectorModel::ContentModel::clearFiles ( )
int ContentSelectorModel::ContentModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
QVariant ContentSelectorModel::ContentModel::data ( const QModelIndex &  index,
int  role 
) const

Here is the call graph for this function:

bool ContentSelectorModel::ContentModel::dropMimeData ( const QMimeData data,
Qt::DropAction  action,
int  row,
int  column,
const QModelIndex &  parent 
)
Qt::ItemFlags ContentSelectorModel::ContentModel::flags ( const QModelIndex &  index) const

Here is the call graph for this function:

QStringList ContentSelectorModel::ContentModel::gameFiles ( ) const

Here is the call graph for this function:

QModelIndex ContentSelectorModel::ContentModel::indexFromItem ( const EsmFile item) const
bool ContentSelectorModel::ContentModel::insertRows ( int  position,
int  rows,
const QModelIndex &  index = QModelIndex() 
)
bool ContentSelectorModel::ContentModel::isChecked ( const QString &  filepath) const
bool ContentSelectorModel::ContentModel::isEnabled ( QModelIndex  index) const
bool ContentSelectorModel::ContentModel::isLoadOrderError ( const EsmFile file) const
private
Returns
true if plug-in has a Load Order error

Here is the call graph for this function:

const ContentSelectorModel::EsmFile * ContentSelectorModel::ContentModel::item ( const QString &  name) const

Here is the call graph for this function:

const ContentSelectorModel::EsmFile * ContentSelectorModel::ContentModel::item ( int  row) const
private
ContentSelectorModel::EsmFile * ContentSelectorModel::ContentModel::item ( int  row)
private
QMimeData * ContentSelectorModel::ContentModel::mimeData ( const QModelIndexList &  indexes) const
QStringList ContentSelectorModel::ContentModel::mimeTypes ( ) const
void ContentSelectorModel::ContentModel::refreshModel ( )
bool ContentSelectorModel::ContentModel::removeRows ( int  position,
int  rows,
const QModelIndex &  index = QModelIndex() 
)
int ContentSelectorModel::ContentModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
bool ContentSelectorModel::ContentModel::setCheckState ( const QString &  filepath,
bool  isChecked 
)

Here is the call graph for this function:

void ContentSelectorModel::ContentModel::setContentList ( const QStringList &  fileList)
bool ContentSelectorModel::ContentModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)

Here is the call graph for this function:

void ContentSelectorModel::ContentModel::setEncoding ( const QString &  encoding)

Here is the caller graph for this function:

void ContentSelectorModel::ContentModel::sortFiles ( )
private
Qt::DropActions ContentSelectorModel::ContentModel::supportedDropActions ( ) const
QString ContentSelectorModel::ContentModel::toolTip ( const EsmFile file) const
private

Here is the call graph for this function:

void ContentSelectorModel::ContentModel::uncheckAll ( )

Here is the caller graph for this function:

Member Data Documentation

QHash<QString, Qt::CheckState> ContentSelectorModel::ContentModel::mCheckStates
private
int ContentSelectorModel::ContentModel::mColumnCount
Qt::DropActions ContentSelectorModel::ContentModel::mDropActions
QString ContentSelectorModel::ContentModel::mEncoding
private
ContentFileList ContentSelectorModel::ContentModel::mFiles
private
QString ContentSelectorModel::ContentModel::mMimeType
QStringList ContentSelectorModel::ContentModel::mMimeTypes
QSet<QString> ContentSelectorModel::ContentModel::mPluginsWithLoadOrderError
private
QIcon ContentSelectorModel::ContentModel::mWarningIcon
private

The documentation for this class was generated from the following files: