NorMIT-nav
2023.01.05-dev+develop.0da12
An IGT application
|
Base class for a group of presets in the system. More...
#include <cxPresets.h>
Signals | |
void | changed () |
Public Member Functions | |
Presets (XmlOptionFile presetFile, XmlOptionFile customFile) | |
virtual | ~Presets () |
IMAGE_MODALITY | getId () const |
void | addCustomPreset (QDomElement &element) |
adds a custom preset More... | |
virtual void | deleteCustomPreset (QString name) |
deletes the custom preset with the given name if it exists More... | |
virtual void | save () |
saves the presets to file More... | |
virtual void | remove () |
removes the presets from file More... | |
QStringList | getPresetList (IMAGE_MODALITY tag=imUNKNOWN) |
returns a list of the preset names for the given tag More... | |
bool | isDefaultPreset (QString presetName) |
Check is the preset is one of the "system presets". More... | |
XmlOptionFile | getCustomFile () |
Protected Member Functions | |
virtual QStringList | generatePresetList (IMAGE_MODALITY tag) |
internally generate the preset list More... | |
XmlOptionFile | getPresetNode (const QString &presetName) |
Look for a preset with the given name. Create one if not found. More... | |
void | addDefaultPreset (QDomElement &element) |
void | addPreset (XmlOptionFile &file, QDomElement &element) |
void | print (QDomElement element) |
debugging function for printing xml elements More... | |
Protected Attributes | |
QString | mLastCustomPresetAdded |
QString | mLastCustomPresetRemoved |
< the name of the last custom preset added More... | |
XmlOptionFile | mPresetFile |
< the name of the last custom preset removed More... | |
Base class for a group of presets in the system.
A preset node should look like this: <Preset name="example" valuename1="value1" valuename2="value2" ... valuenameN="valueN"/>
Definition at line 41 of file cxPresets.h.
cx::Presets::Presets | ( | XmlOptionFile | presetFile, |
XmlOptionFile | customFile | ||
) |
Definition at line 23 of file cxPresets.cpp.
|
inlinevirtual |
Definition at line 47 of file cxPresets.h.
void cx::Presets::addCustomPreset | ( | QDomElement & | element | ) |
adds a custom preset
Definition at line 38 of file cxPresets.cpp.
|
protected |
Definition at line 91 of file cxPresets.cpp.
|
protected |
Definition at line 96 of file cxPresets.cpp.
|
signal |
|
virtual |
deletes the custom preset with the given name if it exists
Definition at line 31 of file cxPresets.cpp.
|
protectedvirtual |
internally generate the preset list
Reimplemented in cx::TransferFunctions3DPresets.
Definition at line 69 of file cxPresets.cpp.
XmlOptionFile cx::Presets::getCustomFile | ( | ) |
Definition at line 74 of file cxPresets.cpp.
IMAGE_MODALITY cx::Presets::getId | ( | ) | const |
Definition at line 118 of file cxPresets.cpp.
QStringList cx::Presets::getPresetList | ( | IMAGE_MODALITY | tag = imUNKNOWN | ) |
returns a list of the preset names for the given tag
Definition at line 55 of file cxPresets.cpp.
|
protected |
Look for a preset with the given name. Create one if not found.
Definition at line 79 of file cxPresets.cpp.
bool cx::Presets::isDefaultPreset | ( | QString | presetName | ) |
Check is the preset is one of the "system presets".
Definition at line 60 of file cxPresets.cpp.
|
protected |
debugging function for printing xml elements
Definition at line 110 of file cxPresets.cpp.
|
virtual |
removes the presets from file
Definition at line 49 of file cxPresets.cpp.
|
virtual |
saves the presets to file
Definition at line 44 of file cxPresets.cpp.
|
protected |
Definition at line 72 of file cxPresets.h.
|
protected |
< the name of the last custom preset added
Definition at line 73 of file cxPresets.h.
|
protected |
< the name of the last custom preset removed
Definition at line 75 of file cxPresets.h.