Public Types | Public Member Functions | List of all members
ibase::ICommand Class Referenceabstract

Provides single command for interaction with user. More...

#include <ICommand.h>

Inheritance diagram for ibase::ICommand:
iprm::INameParam iprm::IEnableableParam iser::ISerializable iser::ISerializable istd::IChangeable istd::IChangeable istd::IPolymorphic istd::IPolymorphic

Public Types

enum  StaticFlags {
  CF_PERMANENT = 0x0001, CF_GLOBAL_MENU = 0x0010, CF_CONTEXT_MENU = 0x0020, CF_TOOLBAR = 0x0040,
  CF_TOOLBOX = 0x0080, CF_ONOFF = 0x0100, CF_EXCLUSIVE = 0x0200
}
 Flags indicating attributes of command. More...
 
enum  GroupId { GI_NONE = -1, GI_NORMAL = 0, GI_USER = 0x1000 }
 
- Public Types inherited from iprm::INameParam
enum  ChangeFlags { CF_RENAME = 0x15345e0 }
 Data model change notification flags. More...
 
- Public Types inherited from istd::IChangeable
enum  ChangeFlags {
  CF_ACF_INTERNAL = 0, CF_ALL_DATA, CF_ANY, CF_DESTROYING,
  CF_DELEGATED, CF_NO_UNDO
}
 Data model change notification flags. More...
 
enum  SupportedOperations {
  SO_NONE = 0, SO_OBSERVE = 1 << 0, SO_COPY = 1 << 1, SO_CLONE = 1 << 2,
  SO_COMPARE = 1 << 3, SO_RESET = 1 << 4
}
 Flags for supported operations. More...
 
enum  CompatibilityMode { CM_STRICT, CM_WITHOUT_REFS, CM_WITH_REFS, CM_CONVERT }
 Control how relationship betweeen objects are interpreted. More...
 

Public Member Functions

virtual int GetPriority () const =0
 Get priority in the same group. More...
 
virtual int GetGroupId () const =0
 Get group ID used to decide if separator should be used. More...
 
virtual int GetStaticFlags () const =0
 Get static flags of this command. More...
 
virtual bool Execute (istd::IPolymorphic *contextPtr)=0
 Execute this command. More...
 
- Public Member Functions inherited from iprm::INameParam
virtual const QString & GetName () const =0
 Get the object name. More...
 
virtual void SetName (const QString &name)=0
 Set the object name. More...
 
virtual bool IsNameFixed () const =0
 Return true, if the name setting is enabled. More...
 
- Public Member Functions inherited from iser::ISerializable
virtual bool Serialize (IArchive &archive)=0
 Load or store state of this object as a archive stream. More...
 
virtual quint32 GetMinimalVersion (int versionId) const
 Get minimal needed version to correct storing of this data. More...
 
- Public Member Functions inherited from istd::IChangeable
virtual int GetSupportedOperations () const
 Get set of flags for supported operations. More...
 
virtual bool CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
 Copy this object from another one. More...
 
virtual bool IsEqual (const IChangeable &object) const
 Compare this object with another object. More...
 
virtual IChangeableCloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const
 Make a copy of this object. More...
 
virtual bool ResetData (CompatibilityMode mode=CM_WITHOUT_REFS)
 Reset data to its default state. More...
 
virtual void BeginChanges (const ChangeSet &changeSet)
 Starts the change transaction. More...
 
virtual void EndChanges (const ChangeSet &changeSet)
 Ends the change transaction. More...
 
virtual void BeginChangeGroup (const ChangeSet &changeSet)
 Starts group of changes. More...
 
virtual void EndChangeGroup (const ChangeSet &changeSet)
 Ends group of changes. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 
- Public Member Functions inherited from iprm::IEnableableParam
virtual bool IsEnabled () const =0
 Return a true, if something is enabled. More...
 
virtual bool IsEnablingAllowed () const =0
 Return a true, if something can be enabled. More...
 
virtual bool SetEnabled (bool isEnabled=true)=0
 Set something to isEnabled state. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from istd::IChangeable
static const ChangeSetGetNoChanges ()
 Get empty set of changes. More...
 
static const ChangeSetGetAnyChange ()
 Get anonymous change set. More...
 
static const ChangeSetGetAllChanges ()
 Get anonymous change set. More...
 
static const ChangeSetGetDelegatedChanges ()
 Get delegated change set. More...
 
- Protected Member Functions inherited from istd::IChangeable
virtual void OnBeginChanges ()
 Callback function for begin change event. More...
 
virtual void OnEndChanges (const ChangeSet &changeSet)
 Callback function for end change event. More...
 

Detailed Description

Provides single command for interaction with user.

Definition at line 18 of file ICommand.h.

Member Enumeration Documentation

Enumerator
GI_NONE 
GI_NORMAL 
GI_USER 

Definition at line 66 of file ICommand.h.

Flags indicating attributes of command.

This flags can be binary combined.

Enumerator
CF_PERMANENT 

If this is enabled command will be permanent accessible, even if context is not active.

For example if view command is permanent, this command will be also accessible if other view is active.

CF_GLOBAL_MENU 

Enable to use this command in global application menu.

CF_CONTEXT_MENU 

Enable to use this command in context menu.

CF_TOOLBAR 

Enable to use this command in application toolbar.

CF_TOOLBOX 

Enable to use this command in separated toolbox.

CF_ONOFF 

Inform that this command can be turned on or off (checkable).

CF_EXCLUSIVE 

Enable exclusive selection of this command with other commands in the same node with the same group ID.

Definition at line 27 of file ICommand.h.

Member Function Documentation

virtual bool ibase::ICommand::Execute ( istd::IPolymorphic contextPtr)
pure virtual

Execute this command.

Parameters
contextPtrimplementation specific context parameter.
Returns
true if this command was consumed.
virtual int ibase::ICommand::GetGroupId ( ) const
pure virtual

Get group ID used to decide if separator should be used.

See Also
GroupId.
Returns
group ID or negative value, if no group is assigned.
virtual int ibase::ICommand::GetPriority ( ) const
pure virtual

Get priority in the same group.

virtual int ibase::ICommand::GetStaticFlags ( ) const
pure virtual

Get static flags of this command.

This flags should not change its values during application run and they don't belong to data model.


The documentation for this class was generated from the following file:

© 2007-2017 Witold Gantzke and Kirill Lepskiy