Crossfire Server, Trunk
ArchetypesWrapper.cpp
Go to the documentation of this file.
1 #include "ArchetypesWrapper.h"
2 #include "../ResourcesManager.h"
3 
4 #include "assets.h"
5 #include "AssetsManager.h"
6 
8  : AssetWrapper(parent), myResourcesManager(resourcesManager) {
9  getManager()->archetypes()->each([&] (archt *arch) {
10  if (!arch->head) {
11  myArch.append(myResourcesManager->wrap(arch, this));
12  }
13  });
14  qSort(myArch.begin(), myArch.end(), compareByDisplayName);
15  setProperty(tipProperty, tr("Display all archetypes."));
16 }
ResourcesManager
Definition: ResourcesManager.h:67
archininventory.arch
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
Definition: archininventory.py:16
AssetsManager.h
ArchetypesWrapper::ArchetypesWrapper
ArchetypesWrapper(AssetWrapper *parent, ResourcesManager *resourcesManager)
Definition: ArchetypesWrapper.cpp:7
AssetWrapper::tipProperty
static const char * tipProperty
Definition: AssetWrapper.h:16
getManager
AssetsManager * getManager()
Definition: assets.cpp:333
archt
Definition: object.h:470
ArchetypesWrapper.h
AssetWrapper
Definition: AssetWrapper.h:11
AssetsCollection::each
void each(std::function< void(T *)> op)
Definition: AssetsCollection.h:135
ArchetypesWrapper::myArch
QVector< AssetWrapper * > myArch
Definition: ArchetypesWrapper.h:30
AssetsManager::archetypes
Archetypes * archetypes()
Definition: AssetsManager.h:44
assets.h
AssetWrapper::compareByDisplayName
static bool compareByDisplayName(const AssetWrapper *left, const AssetWrapper *right)
Definition: AssetWrapper.h:47