void | presetAdded ( String presetName, String className ) |
void | presetLoadFinished () |
void | presetRemoved ( String presetName, String className ) |
Responsible for managing presets in the form of DzFileIOSettings objects for various importers, exporters, and other forms of file I/O.
There is only one instance of this manager in an application. This instance is created and owned by DzApp. Request the instance via DzApp::getFileIOPresetMgr().
File I/O presets are defined by a unique name. They have two types of settings: Specific Settings and Common Settings.
Specific Settings
Specific settings are tied to a class name. This class name is typically, but not always, the name of an importer or exporter, such as “DzObjImporter” or “DzObjExporter.” The key values for specific settings will vary based on the class.
Common Settings
Common settings for a preset are common to all class names. These include settings that define scale values and axis settings. Common keys can be accessed via the following methods:
The scale value used by the presets is for importers. If you are working with an exporter then the scale value needs to be converted to 1/scale. As an example, if the scale value for a preset is 2.54 then the scale value for an exporter would be 1/2.54 = 0.3937
Boolean : getAllCurrentSettings( String className, DzFileIOSettings settings )
TODO: Add description.
Boolean : getAllDefaults( String className, DzFileIOSettings settings )
TODO: Add description.
Boolean : getAllSettings( String presetName, String className, DzFileIOSettings settings )
TODO: Add description.
Array : getAvailableClasses( String presetName )
Parameter(s):
Return Value:
Array : getAvailablePresets( String className )
Parameter(s):
className
is empty, returns all presetsReturn Value:
void : getCommonApplicationDefaults( DzFileIOSettings settings )
TODO: Add description.
Boolean : getCommonDefaults( String className, DzFileIOSettings settings )
TODO: Add description.
Boolean : getCommonSettings( String presetName, String className, DzFileIOSettings settings )
Populates settings
with the values for common to all presets named presetName
Parameter(s):
Return Value:
presetName
does not represent a valid presetBoolean : getCurrentCommonSettings( String className, DzFileIOSettings settings )
TODO: Add description.
Boolean : getCurrentSpecificSettings( String className, DzFileIOSettings settings )
TODO: Add description.
String : getCustomPresetLabel()
Return Value:
Return Value:
String : getInvertDepthAxisKey()
Return Value:
String : getInvertLateralAxisKey()
Return Value:
String : getInvertVerticalAxisKey()
Return Value:
Return Value:
Number : getPresetID( String presetName, String className=String )
Parameter(s):
Return Value:
className
is not empty and the given preset does not have settings for that specific class.String : getPresetName( Number id, String className=String )
Parameter(s):
Return Value:
className
is not empty and the given preset does not have settings for that specific class.String : getScaleKey()
Note:
Return Value:
Boolean : getSpecificDefaults( String className, DzFileIOSettings settings )
TODO: Add description.
Boolean : getSpecificSettings( String presetName, String className, DzFileIOSettings settings )
TODO: Add description.
Array : getSystemPresets( String className )
Parameter(s):
className
is empty, returns all system presetsReturn Value:
Array : getUserPresets( String className )
Parameter(s):
className
is empty, returns all user presetsReturn Value:
Return Value:
Boolean : isSystemPreset( String presetName )
Parameter(s):
Return Value:
Boolean : isUserPreset( String presetName )
Parameter(s):
Return Value:
Boolean : presetExists( Number id, String className=String )
Parameter(s):
Return Value:
Boolean : presetExists( String presetName, String className=String )
Parameter(s):
Return Value:
Boolean : removeUserPreset( String presetName, String className )
Attempts to remove the preset with the given preset name and class name.
Return Value:
Boolean : saveUserPreset( String presetName, String className, Boolean keepCommonSettings, DzFileIOSettings settings )
Attempts to save a user preset with the given preset name and class name
Parameter(s):
presetName
presetName
already exists, this settings determines what to do with common settings in the settings
parameter. If true, the existing common settings will be kept and those in the settings
will be ignored.presetName
and className
already exists, this setting determines what to do with the specific settings. If true, the specific settings will remain unchanged.Return Value:
void : presetAdded( String presetName, String className )
Signature:presetRemoved(const QString&, const QSring&)
Emitted when a preset is added
Parameter(s):
void : presetLoadFinished()
Emitted when presets have been loaded from file and are ready to use
void : presetRemoved( String presetName, String className )
Signature:presetRemoved(const QString&, const QSring&)
Emitted when a preset is removed
Parameter(s):