This class wraps Qtilities::Core::Observer as a project item. More...
#include <ObserverProjectItemWrapper.h>
Signals | |
void | modificationStateChanged (bool is_modified) const |
Implement this function as a signal when implementing the object. |
Public Member Functions | |
virtual void | clearExportTask () |
Clears the export task. | |
virtual IExportable::ExportResultFlags | exportBinary (QDataStream &stream) const |
Allows exporting to a QDataStream. | |
ObserverData::ExportItemFlags | exportItemFlags () const |
Get the export item flags to be used for this project item. | |
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. | |
InstanceFactoryInfo | instanceFactoryInfo () const |
The instance factory information which must be used when the exported object is reconstructed during an import. | |
bool | isModified () const |
Indicates the modification state of the object. | |
bool | newProjectItem () |
Called by the project manager when a new project needs to be created. | |
QObject * | objectBase () |
Returns the QObject* base of the interface. | |
const QObject * | objectBase () const |
Returns a const QObject* base of the interface. | |
QString | projectItemName () const |
The name of the project item. | |
void | setExportItemFlags (ObserverData::ExportItemFlags flags) |
Sets the export item flags to be used for this project item. | |
virtual void | setExportVersion (Qtilities::ExportVersion version) |
Returns the export version currently used by all Qtilities classes. | |
void | setObserverContext (Observer *observer) |
Sets the observer context for this project item. | |
ExportModeFlags | supportedFormats () const |
Provides information about the export format(s) supported by your implementation of IExportable. | |
Public Member Functions inherited from Qtilities::ProjectManagement::Interfaces::IProjectItem | |
virtual bool | closeProjectItem (ITask *task=0)=0 |
Close the project item. | |
Public Member Functions inherited from Qtilities::Core::Interfaces::IModificationNotifier | |
virtual void | setModificationState (bool new_state, NotificationTargets notification_targets=NotifyListeners, bool force_notifications=false)=0 |
Sets the modification state of the object. Returns true if it was successfull. | |
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. | |
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. | |
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. | |
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 | setIsExportable (bool new_is_exportable) |
Sets if this object must be part of it's parents' exports. |
This class wraps Qtilities::Core::Observer as a project item.
Using ObserverProjectItemWrapper you can easily make any Qtilities::Core::Observer part of a project. For example:
Make sure you register the project item in the global object pool before initializing the project manager.
|
virtual |
Clears the export task.
Reimplemented from Qtilities::Core::Interfaces::IExportable.
|
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.
Qtilities::Core::ObserverData::ExportItemFlags Qtilities::ProjectManagement::ObserverProjectItemWrapper::exportItemFlags | ( | ) | const |
Get the export item flags to be used for this project item.
The default ObserverData::ExportData.
|
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.
|
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.
|
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.
|
virtual |
The instance factory information which must be used when the exported object is reconstructed during an import.
For more information see The IExportable interface, what does it have to do with factories?.
Reimplemented from Qtilities::Core::Interfaces::IExportable.
|
virtualsignal |
Implement this function as a signal when implementing the object.
Because this interface does not use the Q_OBJECT macro, you cannot connect to this signal directly. Instead you need to connect to the signal on the base object implementing this interface as follows:
Implements Qtilities::Core::Interfaces::IModificationNotifier.
|
inlinevirtual |
Returns a const QObject* base of the interface.
This function can be used in const methods, but make sure that you don't modify things that should stay const. An example where this is used is when we want to get a property on an object in a const method. This is a const operation.
Implements Qtilities::Core::Interfaces::IObjectBase.
void Qtilities::ProjectManagement::ObserverProjectItemWrapper::setExportItemFlags | ( | ObserverData::ExportItemFlags | flags | ) |
Sets the export item flags to be used for this project item.
|
virtual |
Returns the export version currently used by all Qtilities classes.
By default the latest Qtilities version is selected.
Reimplemented from Qtilities::Core::Interfaces::IExportable.
|
virtual |
Provides information about the export format(s) supported by your implementation of IExportable.
Reimplemented from Qtilities::Core::Interfaces::IExportable.
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|