The base class of all the different Qtilities property types. More...
#include <QtilitiesProperty.h>
Public Member Functions | |
virtual IExportable::ExportResultFlags | exportBinary (QDataStream &stream) const |
Allows exporting to a QDataStream. | |
virtual IExportable::ExportResultFlags | exportXml (QDomDocument *doc, QDomElement *object_node) const |
Allows exporting to an XML document. A reference to the QDomElement to which the object's information must be added is provided, along with a reference to the QDomDocument. | |
virtual IExportable::ExportResultFlags | importBinary (QDataStream &stream, QList< QPointer< QObject > > &import_list) |
Allows importing and reconstruction of the object state from information provided in a QDataStream. | |
virtual IExportable::ExportResultFlags | importXml (QDomDocument *doc, QDomElement *object_node, QList< QPointer< QObject > > &import_list) |
Allows importing and reconstruction of data from information provided in a XML document. A reference to the QDomElement which contains the object's information is provided, along with a reference to the QDomDocument. | |
bool | isReadOnly () const |
Indicates if the property is read only. | |
bool | isRemovable () const |
Indicates if the property is removable. | |
bool | isReserved () const |
Indicates if the property is reserved. | |
bool | isValid () |
Function to check if an observer property is valid. | |
void | makeNotRemovable () |
Makes the property non removable. Properties can only be made not removable once, after that they always stay not removable. | |
void | makeReadOnly () |
Makes the property read only. Properties can only be made read only once, after that they always stay read only. | |
void | makeReserved () |
Makes the property reserved. Properties can only be made reserved once, after that they always stay reserved. | |
QObject * | objectBase () |
const QObject * | objectBase () const |
QString | propertyNameString () const |
Gets the name of this property as a QString. | |
void | setPropertyName (const char *new_name) |
Sets the name of this property. | |
void | setPropertyName (const QString &new_name) |
Sets the name of this property. | |
virtual ExportModeFlags | supportedFormats () const |
Provides information about the export format(s) supported by your implementation of IExportable. | |
bool | supportsChangeNotifications () const |
Indicates if this property supports change notifications. | |
Public Member Functions inherited from Qtilities::Core::Interfaces::IExportable | |
quint32 | applicationExportVersion () const |
Returns the application export version currently used by all your application's classes. | |
virtual void | clearExportTask () |
Clears the export task. | |
IExportable * | duplicate (QString *error_msg=0, int properties_to_copy=0, ExportResultFlags *result_flags=0) const |
Function which will create a duplicate (copy) of this object. | |
virtual ITask * | exportTask () const |
Gets the task which must be used to log import/export information to. | |
Qtilities::ExportVersion | exportVersion () const |
Returns the export version currently used by all Qtilities classes. | |
virtual InstanceFactoryInfo | instanceFactoryInfo () const |
The instance factory information which must be used when the exported object is reconstructed during an import. | |
bool | isExportable () const |
Gets if this object must be part of it's parents' exports. | |
virtual void | setApplicationExportVersion (quint32 version) |
Sets the application export version currently used by all your application's classes. | |
virtual void | setExportTask (ITask *task) |
Sets the task which must be used to log import/export information to. | |
virtual void | setExportVersion (Qtilities::ExportVersion version) |
Returns the export version currently used by all Qtilities classes. | |
virtual void | setIsExportable (bool new_is_exportable) |
Sets if this object must be part of it's parents' exports. | |
Public Member Functions inherited from Qtilities::Core::Interfaces::IObjectBase | |
QString | objectOriginID () const |
Allows interfaces to provide some sort of source identification. | |
void | setObjectOriginID (const QString &object_origin_id) |
Allows setting of the object source ID of this interface implementation. |
Static Public Member Functions | |
static QVariant | constructVariant (const QString &type_string, const QString &value_string) |
Converts a QString type_string and QString value_string to a matching QVariant. | |
static QVariant | constructVariant (QVariant::Type type, const QString &value_string) |
Converts a QVariant::Type and QString value_string to a matching QVariant. | |
static bool | isExportableVariant (QVariant variant) |
Checks if a QVariant is exportable. Thus, if it can be converted to QString. | |
static bool | propertyIsExportable (const char *property_name) |
Function to check if any Qtilities property is exportable. | |
static bool | propertyIsRemovable (const char *property_name) |
Function to check if any Qtilities property is removable. | |
static bool | propertyIsReserved (const char *property_name) |
Function to check if any Qtilities property is reserved. | |
static bool | propertySupportsChangeNotifications (const char *property_name) |
Function to check if any Qtilities property supports change notifications. | |
Static Public Member Functions inherited from Qtilities::Core::Interfaces::IExportable | |
template<typename T > | |
static T * | duplicateInstance (IExportable *obj, QString *error_msg=0, int properties_to_copy=0, ExportResultFlags *result_flags=0) |
Provides an easy to use template based implementation of IExportable::duplicate(). | |
static QString | exportModeToString (ExportMode export_mode) |
Function which returns a string associated with a specific ExportMode. | |
static ExportMode | stringToExportMode (const QString &export_mode_string) |
Function which returns the ExportMode associated with a string. | |
static Result | validateQtilitiesExportVersion (Qtilities::ExportVersion export_version, ITask *task=0) |
Checks the exportVersion() against the supported Qtilities export versions for the current Qtilities version. | |
static Result | validateQtilitiesImportVersion (Qtilities::ExportVersion import_version, ITask *task=0) |
Checks the exportVersion() against the supported Qtilities import versions for the current Qtilities version. |
Additional Inherited Members | |
Public Types inherited from Qtilities::Core::Interfaces::IExportable | |
enum | ExportMode { None = 0, Binary = 1, XML = 2 } |
Possible export modes that an implementation of IExportable can support. More... | |
enum | Result { Complete = 0, Incomplete = 1, Failed = 2, FailedContinue = 4, VersionTooNew = 8, VersionTooOld = 16, VersionSupported = 32, SuccessResult = Complete | Incomplete | VersionSupported, FailedResult = Failed | FailedContinue | VersionTooNew | VersionTooOld } |
The possible results of an export/import operation. More... |
The base class of all the different Qtilities property types.
For information about how QtilitiesProperty is used in the context of Qtilities::Core::Observer, please see Dynamic properties used and managed by Observers.
|
virtual |
Allows exporting to a QDataStream.
See Serializing Qtilities Data Types Overview for more information about the expected output format.
stream | A reference to the QDataStream to which the object's information must be appended is provided. |
Reimplemented from Qtilities::Core::Interfaces::IExportable.
Reimplemented in Qtilities::Core::SharedProperty, and Qtilities::Core::MultiContextProperty.
|
virtual |
Allows exporting to an XML document. A reference to the QDomElement to which the object's information must be added is provided, along with a reference to the QDomDocument.
See Serializing Qtilities Data Types Overview for more information about the expected output format.
Reimplemented from Qtilities::Core::Interfaces::IExportable.
Reimplemented in Qtilities::Core::SharedProperty, and Qtilities::Core::MultiContextProperty.
|
virtual |
Allows importing and reconstruction of the object state from information provided in a QDataStream.
See Serializing Qtilities Data Types Overview for more information about the expected output format.
stream | The QDataStream which contains the object's information. |
import_list | All objects constructed during the import operation must be added to the import list. When the operation fails, all objects in this list will be deleted. |
Reimplemented from Qtilities::Core::Interfaces::IExportable.
Reimplemented in Qtilities::Core::SharedProperty, and Qtilities::Core::MultiContextProperty.
|
virtual |
Allows importing and reconstruction of data from information provided in a XML document. A reference to the QDomElement which contains the object's information is provided, along with a reference to the QDomDocument.
See Serializing Qtilities Data Types Overview for more information about the expected output format.
Reimplemented from Qtilities::Core::Interfaces::IExportable.
Reimplemented in Qtilities::Core::SharedProperty, and Qtilities::Core::MultiContextProperty.
|
inline |
Indicates if the property is read only.
Read only properties cannot be edited developers.
|
inline |
Indicates if the property is removable.
Removable properties can be removed by developers. Properties that are not removable cannot be removed.
For non-Qtilities properties this is true by default.
|
inline |
Indicates if the property is reserved.
Reserved properties are managed by Qtilities and must not be changed by developers. Changes to these properties will automatically be filtered by Observers observing them.
For non-Qtilities properties this is false by default.
|
inlinevirtual |
Implements Qtilities::Core::Interfaces::IObjectBase.
Reimplemented in Qtilities::Core::SharedProperty, and Qtilities::Core::MultiContextProperty.
|
inlinevirtual |
Implements Qtilities::Core::Interfaces::IObjectBase.
Reimplemented in Qtilities::Core::SharedProperty, and Qtilities::Core::MultiContextProperty.
|
virtual |
Provides information about the export format(s) supported by your implementation of IExportable.
Reimplemented from Qtilities::Core::Interfaces::IExportable.
Reimplemented in Qtilities::Core::SharedProperty, and Qtilities::Core::MultiContextProperty.
|
inline |
Indicates if this property supports change notifications.
For non-Qtilities properties this is true by default.
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|