Crossfire Server, Trunk
|
#include <AssetOriginAndCreationDialog.h>
Public Types | |
enum | Mode { CreateAsset, DefineOrigin } |
enum | Type { Quest = 0, Treasure = 1, Archetype = 2 } |
Public Member Functions | |
AssetOriginAndCreationDialog (Type type, Mode mode, const QString &code, const std::vector< std::string > &origins, const std::vector< std::string > &assets) | |
QString | code () const |
QString | file () const |
Private Member Functions | |
void | validate () |
Private Attributes | |
std::vector< std::string > | myAssets |
QLineEdit * | myCode |
QComboBox * | myExistingFile |
QLineEdit * | myNewFile |
QString | myRootDirectory |
Type | myType |
Helper dialog to input origin of an asset, and maybe create a new one.
Definition at line 21 of file AssetOriginAndCreationDialog.h.
Enumerator | |
---|---|
CreateAsset | |
DefineOrigin |
Definition at line 25 of file AssetOriginAndCreationDialog.h.
Enumerator | |
---|---|
Quest | |
Treasure | |
Archetype |
Definition at line 24 of file AssetOriginAndCreationDialog.h.
AssetOriginAndCreationDialog::AssetOriginAndCreationDialog | ( | Type | type, |
Mode | mode, | ||
const QString & | code, | ||
const std::vector< std::string > & | origins, | ||
const std::vector< std::string > & | assets | ||
) |
Standard constructor.
type | asset type, to adjust messages. |
mode | dialog mode to operate in. |
code | asset code, used in DefineOrigin mode only. |
origins | list of existing files for the asset. |
assets | existing assets. |
Definition at line 44 of file AssetOriginAndCreationDialog.cpp.
References addTitles, code(), CreateAsset, Settings::datadir, DefineOrigin, extensions, isArch, Settings::mapdir, myCode, myExistingFile, myNewFile, myRootDirectory, myType, names, originTitles, settings, is_valid_types_gen::type, and validate().
|
inline |
Definition at line 37 of file AssetOriginAndCreationDialog.h.
References myCode.
Referenced by ArchetypesWrapper::addArchetype(), QuestsWrapper::addQuest(), and AssetOriginAndCreationDialog().
|
inline |
Definition at line 38 of file AssetOriginAndCreationDialog.h.
References myExistingFile, and myNewFile.
Referenced by ArchetypesWrapper::addArchetype(), QuestsWrapper::addQuest(), and ResourcesManager::saveTreasures().
|
private |
Check if data is complete. If yes then close the dialog, else explain to the user what is wrong.
Definition at line 109 of file AssetOriginAndCreationDialog.cpp.
References altar_valkyrie::accept(), extensions, myAssets, myCode, myNewFile, myRootDirectory, myType, and names.
Referenced by AssetOriginAndCreationDialog().
|
private |
Existing assets, to avoid duplication.
Definition at line 46 of file AssetOriginAndCreationDialog.h.
Referenced by validate().
|
private |
Quest code.
Definition at line 43 of file AssetOriginAndCreationDialog.h.
Referenced by AssetOriginAndCreationDialog(), code(), and validate().
|
private |
Selected current file.
Definition at line 44 of file AssetOriginAndCreationDialog.h.
Referenced by AssetOriginAndCreationDialog(), and file().
|
private |
New file path.
Definition at line 45 of file AssetOriginAndCreationDialog.h.
Referenced by AssetOriginAndCreationDialog(), file(), and validate().
|
private |
Base path for this asset type.
Definition at line 42 of file AssetOriginAndCreationDialog.h.
Referenced by AssetOriginAndCreationDialog(), and validate().
|
private |
Asset type.
Definition at line 41 of file AssetOriginAndCreationDialog.h.
Referenced by AssetOriginAndCreationDialog(), and validate().