 |
Crossfire Resources Editor
|
Go to the documentation of this file.
13 #ifndef TREASURES_WRAPPER_H
14 #define TREASURES_WRAPPER_H
18 #include "AssetsManager.h"
20 #include "../assets/AssetsCollectionWrapper.h"
21 #include "../archetypes/ArchetypeWrapper.h"
23 #include "../assets/AssetOriginAndCreationDialog.h"
32 tr(
"Display all treasures.")),
myResources(resourcesManager) {
40 connect(menu->addAction(tr(
"Add treasure list")), &QAction::triggered, [
this] () {
addTreasureList(); });
46 auto keys = getManager()->treasures()->keys();
49 if (aqd.exec() != QDialog::Accepted) {
52 auto list = asset_create<treasurelist>(aqd.
code().toStdString());
53 getManager()->treasures()->define(list->name, list);
void treasureModified(treasurelist *treasure)
Class managing all assets, tracking in which file they are, which are modified, and such.
ArchetypeWrapper * wrap(archetype *arch, AssetWrapper *parent)
virtual PossibleUse uses(const AssetWrapper *asset, std::string &) const override
virtual void assetDefined(const archetype *arch, const std::string &filename) override
std::vector< std::string > treasureFiles() const
ResourcesManager * myResources
Base class for all assets that can be displayed or edited by CRE.
TreasuresWrapper(AssetWrapper *parent, ResourcesManager *resourcesManager)
Helper dialog to input origin of an asset, and maybe create a new one.
void fillMenu(QMenu *menu)
void markModified(ChangeType change, int extra=0)
QVector< AssetWrapper * > myAssets