ICF 3.1.1.10
Technical documentation of ICF Libraries
icmpstr::CSceneProviderGuiComp Class Reference

#include <CSceneProviderGuiComp.h>

Inheritance diagram for icmpstr::CSceneProviderGuiComp:
Collaboration diagram for icmpstr::CSceneProviderGuiComp:

Classes

class  CScene
 Implementation of QGraphicsScene with own background drawing to provide rastered backgrounds. More...
 

Public Types

enum  BackgroundMode {
  BM_NORMAL , BM_SOLID , BM_GRID , BM_CHECKERBOARD ,
  BM_DOT_GRID , BM_TRANSPARENT
}
 
typedef istdgui::TDesignerGuiCompBase< Ui::CSceneProviderGuiComp > BaseClass
 
- Public Types inherited from istdgui::TGuiComponentBase< QWidget >
typedef CGuiComponentBase BaseClass
 
- Public Types inherited from istdgui::CGuiComponentBase
typedef ibase::TVisualChangesHandlerWrap< icomp::CComponentBase > BaseClass
 
- Public Types inherited from ibase::TVisualChangesHandlerWrap< icomp::CComponentBase >
typedef icomp::CComponentBase BaseClass
 
- Public Types inherited from ibase::ICommandsProvider
enum  ChangeFlags { CF_COMMANDS = 0x62b7e8 }
 
- Public Types inherited from istd::IChangeable
enum  ChangeFlags {
  CF_ICF_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 , SO_CHANGE_LOCK = 1 << 5
}
 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 Types inherited from icmpstr::ISceneProvider
enum  SceneFlags { SF_FIXED_SIZE = 1 , SF_ALIGNED = 2 }
 
- Public Types inherited from i2d::ISceneController
enum  RestrictionFlags {
  SR_NONE = 0x0 , SR_ROTATE = 0x1 , SR_SHIFT = 0x2 , SR_SCALE = 0x4 ,
  SR_ALL = 0xff
}
 
enum  FittingMode { FM_NONE , FM_ISOTROPIC_REDUCTION , FM_ISOTROPIC , FM_ANISOTROPIC }
 Vieport scale fitting mode. More...
 
enum  ScaleMode {
  SM_SET , SM_COMBINE , SM_RESET , SM_ZOOM_IN ,
  SM_ZOOM_OUT , SM_FIT_ISOTROPIC_REDUCTION , SM_FIT_ISOTROPIC , SM_FIT_ANISOTROPIC
}
 Describe mode for setting of scale value. More...
 

Signals

void zoomChanged (double)
 
void embeddedRegistrySelected (const QByteArray &)
 

Public Member Functions

 CSceneProviderGuiComp ()
 
double GetIsotropyFactor () const
 
void SetIsotropyFactor (double factor)
 
const ibase::IHierarchicalCommand * GetCommands () const override
 Get list of menu commands.
 
int GetSceneId () const override
 Get ID indentifing this scene.
 
QGraphicsScene * GetScene () const override
 Called when items should be removed from specified scene.
 
bool GetSceneAlignment (double &distance) const override
 Get parameters of grid alignment.
 
int GetSceneFlags () const override
 Get scene's paremeter info.
 
int GetSceneRestrictionFlags () const override
 Get the restriction flags, to tell the scene manipulator, what can be changed on the scene.
 
FittingMode GetFitMode () const override
 Get vieport scale fitting mode.
 
bool SetFitMode (FittingMode fitMode) override
 Set vieport scale fitting mode.
 
bool IsFullScreenMode () const override
 Check if full screen mode is enabled.
 
bool SetFullScreenMode (bool isFullScreen) override
 Set full screen mode on/off.
 
double GetScale () const override
 Get actual scale factor.
 
bool SetScale (int scaleMode=SM_SET, double value=1.0) override
 Set or modify scale factor.
 
- Public Member Functions inherited from istdgui::TGuiComponentBase< QWidget >
 TGuiComponentBase ()
 
virtual QWidget * GetQtWidget () const
 
- Public Member Functions inherited from istdgui::CGuiComponentBase
 CGuiComponentBase ()
 
bool IsGuiShown () const
 
bool IsGuiCreated () const override
 Inform if GUI was initilized.
 
bool CreateGui (QWidget *parentPtr) override
 Initialize GUI and connect it to the parent.
 
bool DestroyGui () override
 Release GUI and disconnect it from parent.
 
QWidget * GetWidget () const override
 Get access to internal QWidget object.
 
void OnTryClose (bool *ignoredPtr=nullptr) override
 Called on trying to close application.
 
- Public Member Functions inherited from ibase::TVisualChangesHandlerWrap< icomp::CComponentBase >
 TVisualChangesHandlerWrap (Args &&... args)
 
virtual void EnableVisualChangesHandler (bool enableLocalization=true)
 If enabled, listen to the language change event from the application context.
 
- Public Member Functions inherited from icomp::CComponentBase
 CComponentBase ()
 Create component and assign it to specific context.
 
 CComponentBase (const CComponentBase &)=delete
 
CComponentBase & operator= (const CComponentBase &)=delete
 
virtual const ICompositeComponent * GetParentComponent (bool ownerOnly=false) const
 Get parent of this component.
 
virtual void * GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="")
 Get access to specified component interface.
 
virtual const IComponentContext * GetComponentContext () const
 Get access to component context describing all application-specified component information loaded from components registry.
 
virtual void SetComponentContext (const IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner)
 Set component context of this component.
 
- Public Member Functions inherited from icomp::IComponent
- Public Member Functions inherited from istdgui::IGuiObject
- Public Member Functions inherited from ibase::ICommandsProvider
- Public Member Functions inherited from istd::IChangeable
virtual int GetSupportedOperations () const
 Get set of flags for supported operations.
 
virtual bool CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
 Copy this object from another one.
 
virtual bool IsEqual (const IChangeable &object) const
 Compare this object with another object.
 
virtual std::unique_ptr< IChangeable > CloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const
 Make a copy of this object.
 
virtual bool ResetData (CompatibilityMode mode=CM_WITHOUT_REFS)
 Reset data to its default state.
 
virtual QMutex * GetChangesLock () const
 Get mutex beeing locked during changes, if available.
 
virtual void BeginChanges (const ChangeSet &changeSet)
 Starts the change transaction.
 
virtual void EndChanges (const ChangeSet &changeSet)
 Ends the change transaction.
 
virtual void BeginChangeGroup (const ChangeSet &changeSet)
 Starts group of changes.
 
virtual void EndChangeGroup (const ChangeSet &changeSet)
 Ends group of changes.
 
- Public Member Functions inherited from icmpstr::ISceneProvider
- Public Member Functions inherited from i2d::ISceneController

Protected Slots

void OnPrint ()
 
void OnZoomIncrement ()
 
void OnZoomDecrement ()
 
void OnFitToView ()
 
void OnFitToShapes ()
 
void OnResetScale ()
 
void OnAutoFit (bool isAutoScale)
 
void OnSelectAllShapes ()
 

Protected Member Functions

virtual bool OnResize (QResizeEvent *eventPtr)
 
virtual bool OnWheelEvent (QGraphicsSceneWheelEvent *eventPtr)
 
virtual bool OnKeyReleaseEvent (QKeyEvent *eventPtr)
 
virtual bool OnMouseDoubleClickEvent (QEvent *eventPtr)
 
void ScaleView (double scaleFactor)
 
void SetFittedScale (FittingMode mode)
 
istdgui::CHierarchicalCommand & GetCommandsRootRef ()
 
bool HasDropConsumerForFormat (const QStringList &formats) const
 
void DelegateDropEvent (const QMimeData &data, QGraphicsSceneDragDropEvent *eventPtr)
 
void ResetScene ()
 
void OnGuiCreated () override
 Called just after GUI is initialized.
 
void OnRetranslate () override
 Called when non-GUI elements (like commands) should be retranslated.
 
void OnComponentCreated () override
 
void OnComponentDestroyed () override
 
bool eventFilter (QObject *sourcePtr, QEvent *eventPtr) override
 
- Protected Member Functions inherited from istdgui::TGuiComponentBase< QWidget >
virtual QWidget * CreateQtWidget (QWidget *parentPtr)
 Create slave widget object.
 
- Protected Member Functions inherited from istdgui::CGuiComponentBase
virtual void OnGuiShown ()
 Called from widget event filter when slave widget is shown.
 
virtual void OnGuiHidden ()
 Called from widget event filter when slave widget is hidden.
 
virtual bool OnKeyPressed (QKeyEvent *event)
 Called from widget event filter when key is pressed.
 
virtual void OnGuiRetranslate ()
 Called from widget event filter when GUI should be retranslated.
 
virtual void OnGuiDestroyed ()
 Called just before GUI is released.
 
void SetStatusIcon (const QIcon &icon)
 Set status icon;.
 
void SetStatusText (const QString &text)
 Set status text;.
 
void OnLanguageChanged () override
 
void OnDesignSchemaChanged () override
 
bool eventFilter (QObject *sourcePtr, QEvent *eventPtr) override
 
- Protected Member Functions inherited from ibase::TVisualChangesHandlerWrap< icomp::CComponentBase >
- Protected Member Functions inherited from icomp::CComponentBase
bool IsComponentActive () const
 Check if component is active.
 
virtual const IRealComponentStaticInfo & GetComponentStaticInfo () const =0
 Get access to static info of this component.
 
- Protected Member Functions inherited from istd::IChangeable
virtual void OnBeginChanges ()
 Callback function for begin change event.
 
virtual void OnEndChanges (const ChangeSet &changeSet)
 Callback function for end change event.
 

Additional Inherited Members

- Static Public Member Functions inherited from istdgui::CGuiComponentBase
static void MakeAutoSlotConnection (const QWidget &widget, QObject &object)
 
- Static Public Member Functions inherited from istd::IChangeable
static const ChangeSet & GetNoChanges ()
 Get empty set of changes.
 
static const ChangeSet & GetAnyChange ()
 Get anonymous change set.
 
static const ChangeSet & GetAllChanges ()
 Get anonymous change set.
 
static const ChangeSet & GetDelegatedChanges ()
 Get delegated change set.
 
- Static Protected Member Functions inherited from icomp::CComponentBase
static const IRealComponentStaticInfo & InitStaticInfo (IComponent *componentPtr)
 
static QByteArray GetComponentId (const IComponentContext *componentContextPtr, const QByteArray &contextId=QByteArray())
 
- Protected Attributes inherited from istdgui::CGuiComponentBase
istd::CMainThreadCaller m_updateGuiCaller
 
imod::TModelWrap< VisualStatus > m_visualStatus
 

Detailed Description

Definition at line 30 of file CSceneProviderGuiComp.h.

Member Typedef Documentation

◆ BaseClass

Member Enumeration Documentation

◆ BackgroundMode

Enumerator
BM_NORMAL 

Standard window backround.

BM_SOLID 

Filled with solid color.

BM_GRID 

Grid of horizontal and vertical lines.

BM_CHECKERBOARD 

Checkerboard pattern.

BM_DOT_GRID 

Dot grid.

BM_TRANSPARENT 

Transparent background.

Definition at line 40 of file CSceneProviderGuiComp.h.

Constructor & Destructor Documentation

◆ CSceneProviderGuiComp()

icmpstr::CSceneProviderGuiComp::CSceneProviderGuiComp ( )

Member Function Documentation

◆ DelegateDropEvent()

void icmpstr::CSceneProviderGuiComp::DelegateDropEvent ( const QMimeData & data,
QGraphicsSceneDragDropEvent * eventPtr )
protected

◆ embeddedRegistrySelected

void icmpstr::CSceneProviderGuiComp::embeddedRegistrySelected ( const QByteArray & )
signal

◆ eventFilter()

bool icmpstr::CSceneProviderGuiComp::eventFilter ( QObject * sourcePtr,
QEvent * eventPtr )
overrideprotected

◆ GetCommands()

const ibase::IHierarchicalCommand * icmpstr::CSceneProviderGuiComp::GetCommands ( ) const
overridevirtual

Get list of menu commands.

These commands will be integrated in global menu system, independent from actual selected view. For support of normal pull down menu, depth of this tree structure should be at least 3.

Reimplemented from ibase::ICommandsProvider.

◆ GetCommandsRootRef()

istdgui::CHierarchicalCommand & icmpstr::CSceneProviderGuiComp::GetCommandsRootRef ( )
inlineprotected

Definition at line 223 of file CSceneProviderGuiComp.h.

◆ GetFitMode()

FittingMode icmpstr::CSceneProviderGuiComp::GetFitMode ( ) const
overridevirtual

Get vieport scale fitting mode.

Implements i2d::ISceneController.

◆ GetIsotropyFactor()

double icmpstr::CSceneProviderGuiComp::GetIsotropyFactor ( ) const

◆ GetScale()

double icmpstr::CSceneProviderGuiComp::GetScale ( ) const
overridevirtual

Get actual scale factor.

Implements i2d::ISceneController.

◆ GetScene()

QGraphicsScene * icmpstr::CSceneProviderGuiComp::GetScene ( ) const
overridevirtual

Called when items should be removed from specified scene.

Implements icmpstr::ISceneProvider.

◆ GetSceneAlignment()

bool icmpstr::CSceneProviderGuiComp::GetSceneAlignment ( double & distance) const
overridevirtual

Get parameters of grid alignment.

Parameters
distancedistance between nearest alignment positions.
Returns
true if grid alignment is enabled.
See also
SceneFlags

Implements icmpstr::ISceneProvider.

◆ GetSceneFlags()

int icmpstr::CSceneProviderGuiComp::GetSceneFlags ( ) const
overridevirtual

Get scene's paremeter info.

See also
SceneFlags

Implements icmpstr::ISceneProvider.

◆ GetSceneId()

int icmpstr::CSceneProviderGuiComp::GetSceneId ( ) const
overridevirtual

Get ID indentifing this scene.

Typically this ID is 0 for first scene, 1 for the second etc.

Implements icmpstr::ISceneProvider.

◆ GetSceneRestrictionFlags()

int icmpstr::CSceneProviderGuiComp::GetSceneRestrictionFlags ( ) const
overridevirtual

Get the restriction flags, to tell the scene manipulator, what can be changed on the scene.

Implements i2d::ISceneController.

◆ HasDropConsumerForFormat()

bool icmpstr::CSceneProviderGuiComp::HasDropConsumerForFormat ( const QStringList & formats) const
protected

◆ IsFullScreenMode()

bool icmpstr::CSceneProviderGuiComp::IsFullScreenMode ( ) const
overridevirtual

Check if full screen mode is enabled.

In full screen mode scene is shown on whole screen area.

Implements i2d::ISceneController.

◆ OnAutoFit

void icmpstr::CSceneProviderGuiComp::OnAutoFit ( bool isAutoScale)
protectedslot

◆ OnComponentCreated()

void icmpstr::CSceneProviderGuiComp::OnComponentCreated ( )
overrideprotectedvirtual

Reimplemented from istdgui::CGuiComponentBase.

◆ OnComponentDestroyed()

void icmpstr::CSceneProviderGuiComp::OnComponentDestroyed ( )
overrideprotectedvirtual

Reimplemented from istdgui::CGuiComponentBase.

◆ OnFitToShapes

void icmpstr::CSceneProviderGuiComp::OnFitToShapes ( )
protectedslot

◆ OnFitToView

void icmpstr::CSceneProviderGuiComp::OnFitToView ( )
protectedslot

◆ OnGuiCreated()

void icmpstr::CSceneProviderGuiComp::OnGuiCreated ( )
overrideprotectedvirtual

Called just after GUI is initialized.

Reimplemented from istdgui::CGuiComponentBase.

◆ OnKeyReleaseEvent()

virtual bool icmpstr::CSceneProviderGuiComp::OnKeyReleaseEvent ( QKeyEvent * eventPtr)
protectedvirtual

◆ OnMouseDoubleClickEvent()

virtual bool icmpstr::CSceneProviderGuiComp::OnMouseDoubleClickEvent ( QEvent * eventPtr)
protectedvirtual

◆ OnPrint

void icmpstr::CSceneProviderGuiComp::OnPrint ( )
protectedslot

◆ OnResetScale

void icmpstr::CSceneProviderGuiComp::OnResetScale ( )
protectedslot

◆ OnResize()

virtual bool icmpstr::CSceneProviderGuiComp::OnResize ( QResizeEvent * eventPtr)
protectedvirtual

◆ OnRetranslate()

void icmpstr::CSceneProviderGuiComp::OnRetranslate ( )
overrideprotectedvirtual

Called when non-GUI elements (like commands) should be retranslated.

Reimplemented from istdgui::CGuiComponentBase.

◆ OnSelectAllShapes

void icmpstr::CSceneProviderGuiComp::OnSelectAllShapes ( )
protectedslot

◆ OnWheelEvent()

virtual bool icmpstr::CSceneProviderGuiComp::OnWheelEvent ( QGraphicsSceneWheelEvent * eventPtr)
protectedvirtual

◆ OnZoomDecrement

void icmpstr::CSceneProviderGuiComp::OnZoomDecrement ( )
protectedslot

◆ OnZoomIncrement

void icmpstr::CSceneProviderGuiComp::OnZoomIncrement ( )
protectedslot

◆ ResetScene()

void icmpstr::CSceneProviderGuiComp::ResetScene ( )
protected

◆ ScaleView()

void icmpstr::CSceneProviderGuiComp::ScaleView ( double scaleFactor)
protected

◆ SetFitMode()

bool icmpstr::CSceneProviderGuiComp::SetFitMode ( FittingMode fitMode)
overridevirtual

Set vieport scale fitting mode.

Returns
true if fitting mode was set correctly.
See also
RestrictionFlags

Implements i2d::ISceneController.

◆ SetFittedScale()

void icmpstr::CSceneProviderGuiComp::SetFittedScale ( FittingMode mode)
protected

◆ SetFullScreenMode()

bool icmpstr::CSceneProviderGuiComp::SetFullScreenMode ( bool isFullScreen)
overridevirtual

Set full screen mode on/off.

In full screen mode scene is shown on whole screen area.

Returns
true if full screen mode was set correctly.
See also
RestrictionFlags

Implements i2d::ISceneController.

◆ SetIsotropyFactor()

void icmpstr::CSceneProviderGuiComp::SetIsotropyFactor ( double factor)

◆ SetScale()

bool icmpstr::CSceneProviderGuiComp::SetScale ( int scaleMode = SM_SET,
double value = 1.0 )
overridevirtual

Set or modify scale factor.

See ScaleMode for possible modes.

Implements i2d::ISceneController.

◆ zoomChanged

void icmpstr::CSceneProviderGuiComp::zoomChanged ( double )
signal

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

© Witold Gantzke and Kirill Lepskiy