Crossfire Server, Trunk
UseFilterAssetModel Class Reference

#include <AssetModel.h>

+ Inheritance diagram for UseFilterAssetModel:
+ Collaboration diagram for UseFilterAssetModel:

Public Member Functions

virtual QVariant data (const QModelIndex &index, int role) const override
 
void setFilter (AssetWrapper *asset)
 
 UseFilterAssetModel (QObject *parent)
 

Protected Member Functions

virtual bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override
 

Protected Attributes

AssetWrappermyAsset
 
std::map< AssetWrapper *, bool > myCachedFilter
 
std::map< AssetWrapper *, std::string > myCachedHints
 

Detailed Description

Proxy model filtering based on whether an asset uses a specific asset or not.

Definition at line 58 of file AssetModel.h.

Constructor & Destructor Documentation

◆ UseFilterAssetModel()

UseFilterAssetModel::UseFilterAssetModel ( QObject *  parent)

Definition at line 194 of file AssetModel.cpp.

Member Function Documentation

◆ data()

QVariant UseFilterAssetModel::data ( const QModelIndex &  index,
int  role 
) const
overridevirtual

Definition at line 238 of file AssetModel.cpp.

References navar-midane_time::data, npc_dialog::index, and myCachedHints.

◆ filterAcceptsRow()

bool UseFilterAssetModel::filterAcceptsRow ( int  sourceRow,
const QModelIndex &  sourceParent 
) const
overrideprotectedvirtual

◆ setFilter()

void UseFilterAssetModel::setFilter ( AssetWrapper asset)

Definition at line 197 of file AssetModel.cpp.

References myAsset, myCachedFilter, and myCachedHints.

Referenced by AssetUseTree::setFilter(), and CREFacePanel::updateItem().

+ Here is the caller graph for this function:

Field Documentation

◆ myAsset

AssetWrapper* UseFilterAssetModel::myAsset
protected

Definition at line 68 of file AssetModel.h.

Referenced by filterAcceptsRow(), and setFilter().

◆ myCachedFilter

std::map<AssetWrapper *, bool> UseFilterAssetModel::myCachedFilter
mutableprotected

Definition at line 69 of file AssetModel.h.

Referenced by filterAcceptsRow(), and setFilter().

◆ myCachedHints

std::map<AssetWrapper *, std::string> UseFilterAssetModel::myCachedHints
mutableprotected

Definition at line 70 of file AssetModel.h.

Referenced by data(), filterAcceptsRow(), and setFilter().


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