Public Types | Public Member Functions | Protected Types | Protected Member Functions | List of all members
iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel > Class Template Reference

#include <TShapeParamsGuiCompBase.h>

Inheritance diagram for iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >:
iqt2d::TViewExtenderCompBase< iqtgui::TDesignerGuiObserverCompBase< Ui, ShapeModel > > iview::IShapeFactory iqtgui::TDesignerGuiObserverCompBase< Ui, ShapeModel > iqt2d::IViewExtender istd::IPolymorphic ibase::TModelObserverCompBaseWrap< iqtgui::TGuiObserverWrap< iqtgui::TDesignerGuiCompBase< Ui, QWidget >, imod::TSingleModelObserverBase< ShapeModel > > > istd::IPolymorphic iqtgui::TGuiObserverWrap< iqtgui::TDesignerGuiCompBase< Ui, QWidget >, imod::TSingleModelObserverBase< ShapeModel > > iqtgui::TDesignerGuiCompBase< Ui, QWidget > imod::TSingleModelObserverBase< ShapeModel > imod::IModelEditor iqtgui::TGuiComponentBase< QWidget > imod::CSingleModelObserverBase istd::IPolymorphic iqtgui::CGuiComponentBase imod::IObserver ibase::TLocalizableWrap< icomp::CComponentBase > iqtgui::IGuiObject istd::IPolymorphic icomp::CComponentBase istd::IPolymorphic icomp::IComponent istd::IPolymorphic

Public Types

typedef
iqt2d::TViewExtenderCompBase
< iqtgui::TDesignerGuiObserverCompBase
< Ui, ShapeModel > > 
BaseClass
 
- Public Types inherited from iqtgui::TGuiComponentBase< QWidget >
typedef CGuiComponentBase BaseClass
 
- Public Types inherited from iqtgui::CGuiComponentBase
typedef icomp::CComponentBase BaseClass
 
- Public Types inherited from ibase::TLocalizableWrap< icomp::CComponentBase >
typedef icomp::CComponentBase BaseClass
 
- Public Types inherited from imod::TSingleModelObserverBase< ShapeModel >
typedef CSingleModelObserverBase BaseClass
 
typedef ShapeModel ModelType
 
- Public Types inherited from imod::CSingleModelObserverBase
typedef imod::IModel ModelType
 
- Public Types inherited from imod::IModelEditor
enum  ChangeFlags { CF_INIT_EDITOR = 0x3720694 }
 Data model change notification flags. More...
 
- Public Types inherited from iqt2d::IViewExtender
enum  SceneFlags { SF_BACKGROUND = 1, SF_DIRECT = 2 }
 Standard flags for items . More...
 

Public Member Functions

 TShapeParamsGuiCompBase ()
 
virtual bool OnModelAttached (imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask)
 This call back function will be called, if an observable object is about to be attached. More...
 
virtual bool OnModelDetached (imod::IModel *modelPtr)
 This call back function will be called, if an observable object is about to be detached. More...
 
virtual iview::IShapeCreateShape (const istd::IChangeable *objectPtr, bool connectToModel=false) const
 Create a graphical representation of the given 2D-object object. More...
 
- Public Member Functions inherited from iqtgui::TGuiComponentBase< QWidget >
 TGuiComponentBase ()
 
virtual QWidget * GetQtWidget () const
 
- Public Member Functions inherited from iqtgui::CGuiComponentBase
 I_REGISTER_SUBELEMENT_INTERFACE_T (VisualStatus, IVisualStatus, ExtractVisualStatus)
 
 I_REGISTER_SUBELEMENT_INTERFACE_T (VisualStatus, istd::IChangeable, ExtractVisualStatus)
 
 I_REGISTER_SUBELEMENT_INTERFACE_T (VisualStatus, imod::IModel, ExtractVisualStatus)
 
 CGuiComponentBase ()
 
bool IsGuiShown () const
 
virtual bool IsGuiCreated () const
 Inform if GUI was initilized. More...
 
virtual bool CreateGui (QWidget *parentPtr)
 Initialize GUI and connect it to the parent. More...
 
virtual bool DestroyGui ()
 Release GUI and disconnect it from parent. More...
 
virtual QWidget * GetWidget () const
 Get access to internal QWidget object. More...
 
virtual void OnTryClose (bool *ignoredPtr=NULL)
 Called on trying to close application. More...
 
- Public Member Functions inherited from ibase::TLocalizableWrap< icomp::CComponentBase >
 TLocalizableWrap ()
 
virtual void EnableLocalization (bool enableLocalization=true)
 If enabled, listen to the language change event from the application context. More...
 
- Public Member Functions inherited from icomp::CComponentBase
 CComponentBase ()
 Create component and assign it to specific context. More...
 
virtual const ICompositeComponentGetParentComponent (bool ownerOnly=false) const
 Get parent of this component. More...
 
virtual void * GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="")
 Get access to specified component interface. More...
 
virtual const IComponentContextGetComponentContext () const
 Get access to component context describing all application-specified component information loaded from components registry. More...
 
virtual void SetComponentContext (const icomp::IComponentContext *contextPtr, const ICompositeComponent *parentPtr, bool isParentOwner)
 Set component context of this component. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 
- Public Member Functions inherited from imod::TSingleModelObserverBase< ShapeModel >
 TSingleModelObserverBase ()
 
ShapeModel * GetObservedObject () const
 Get instance of observed object. More...
 
ShapeModel * GetObjectPtr () const
 Get instance of observed object. More...
 
bool AttachOrSetObject (ShapeModel *objectPtr)
 Attach to model of object or set object pointer, if no connection is possible. More...
 
- Public Member Functions inherited from imod::CSingleModelObserverBase
 CSingleModelObserverBase ()
 
virtual ~CSingleModelObserverBase ()
 
imod::IModelGetObservedModel () const
 Get access to observed model. More...
 
imod::IModelGetModelPtr () const
 Get access to observed model. More...
 
void EnsureModelDetached ()
 Make sure this observer is detached. More...
 
void SetObservedIds (const istd::IChangeable::ChangeSet &changeMask)
 Set list of ID's beeing observed. More...
 
virtual bool IsModelAttached (const imod::IModel *modelPtr=NULL) const
 Check if specified model is attached. More...
 
virtual void BeforeUpdate (imod::IModel *modelPtr)
 This function will be called before update of the observer contents occures. More...
 

Protected Types

typedef BaseClass::Shapes Shapes
 
typedef BaseClass::ShapesMap ShapesMap
 

Protected Member Functions

QString GetUnitName () const
 
bool IsPositionFixed () const
 
bool IsToolsMenuAllowed () const
 
QToolBar * GetToolBar () const
 
virtual void CreateToolsMenu (QAbstractButton *buttonPtr)
 Maintenance of the tools actions. More...
 
virtual bool PopulateActions (QWidget &host, imod::IModel *modelPtr)
 
virtual void OnModelAttachedAndGuiShown (imod::IModel *modelPtr)
 
virtual void OnModelDetachedOrGuiHidden (imod::IModel *modelPtr)
 
virtual void OnActionTriggered (QAction *actionPtr)
 
virtual
iview::CInteractiveShapeBase
CreateShapeInstance () const
 Simple creation of shape instance. More...
 
virtual void CreateShapes (int sceneId, Shapes &result)
 Create shapes for the view. More...
 
virtual void OnGuiDestroyed ()
 Called just before GUI is released. More...
 
virtual void OnGuiShown ()
 Called from widget event filter when slave widget is shown. More...
 
virtual void OnGuiHidden ()
 Called from widget event filter when slave widget is hidden. More...
 
virtual void OnGuiModelAttached ()
 Called when model is attached and GUI is created. More...
 
virtual void OnGuiModelDetached ()
 Called when model is detached or GUI is destroyed. More...
 
- Protected Member Functions inherited from iqtgui::CGuiComponentBase
virtual bool OnKeyPressed (QKeyEvent *event)
 Called from widget event filter when key is pressed. More...
 
virtual void OnRetranslate ()
 Called when non-GUI elements (like commands) should be retranslated. More...
 
void SetStatusIcon (const QIcon &icon)
 Set status icon;. More...
 
void SetStatusText (const QString &text)
 Set status text;. More...
 
virtual void OnLanguageChanged ()
 
virtual bool eventFilter (QObject *sourcePtr, QEvent *eventPtr)
 
- Protected Member Functions inherited from icomp::CComponentBase
bool IsComponentActive () const
 Check if component is active. More...
 
virtual const
icomp::IRealComponentStaticInfo
GetComponentStaticInfo () const =0
 Get access to static info of this component. More...
 
- Protected Member Functions inherited from imod::TSingleModelObserverBase< ShapeModel >
virtual ShapeModel * CastFromModel (imod::IModel *modelPtr) const
 
- Protected Member Functions inherited from imod::CSingleModelObserverBase
void SetModelPtr (imod::IModel *modelPtr)
 Set internal model pointer to specified value. More...
 
virtual void OnUpdate (const istd::IChangeable::ChangeSet &changeSet)
 Called on update of observed model. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from icomp::CComponentBase
static const
icomp::IRealComponentStaticInfo
InitStaticInfo (IComponent *componentPtr)
 
static QByteArray GetComponentId (const icomp::IComponentContext *componentContextPtr, const QByteArray &contextId=QByteArray())
 
- Protected Attributes inherited from iqtgui::CGuiComponentBase
imod::TModelWrap< VisualStatusm_visualStatus
 
- Static Protected Attributes inherited from imod::CSingleModelObserverBase
static const
istd::IChangeable::ChangeSet 
s_undoChanges
 

Detailed Description

template<class Ui, class Shape, class ShapeModel>
class iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >

Definition at line 34 of file TShapeParamsGuiCompBase.h.

Member Typedef Documentation

template<class Ui, class Shape, class ShapeModel>
typedef iqt2d::TViewExtenderCompBase<iqtgui::TDesignerGuiObserverCompBase<Ui, ShapeModel> > iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::BaseClass

Definition at line 40 of file TShapeParamsGuiCompBase.h.

template<class Ui, class Shape, class ShapeModel>
typedef BaseClass::Shapes iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::Shapes
protected

Definition at line 64 of file TShapeParamsGuiCompBase.h.

template<class Ui, class Shape, class ShapeModel>
typedef BaseClass::ShapesMap iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::ShapesMap
protected

Definition at line 65 of file TShapeParamsGuiCompBase.h.

Constructor & Destructor Documentation

template<class Ui , class Shape , class ShapeModel >
iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::TShapeParamsGuiCompBase ( )

Definition at line 119 of file TShapeParamsGuiCompBase.h.

Member Function Documentation

template<class Ui , class Shape , class ShapeModel >
iview::IShape * iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::CreateShape ( const istd::IChangeable objectPtr,
bool  connectToModel = false 
) const
virtual

Create a graphical representation of the given 2D-object object.

If is enabled, the created shape will be connected to the object's data model. If connection has failed, then no shape will be returned. The method returns NULL if the shape could not be created.

Parameters
objectPtrObject for which the shape will be created. If it is NULL, this will be anonymous. It is declared as const, but for attachement to model this const will be removed.
connectToModelIf this flag is enabled, the shape will be attached to model of object using observer/observable mechanism.

Implements iview::IShapeFactory.

Definition at line 190 of file TShapeParamsGuiCompBase.h.

References iview::CShapeBase::AssignToLayer(), imod::IModel::AttachObserver(), iview::IViewLayer::LT_INACTIVE, NULL, iview::CShapeBase::SetDefaultDescription(), iview::CInteractiveShapeBase::SetEditablePosition(), iview::CShapeBase::SetUserColorSchema(), and iview::CShapeBase::SetVisible().

template<class Ui , class Shape , class ShapeModel >
iview::CInteractiveShapeBase * iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::CreateShapeInstance ( ) const
protectedvirtual

Simple creation of shape instance.

Reimplemented in iqt2d::CLine2dParamsGuiComp, and iqt2d::CPolylineParamsGuiComp.

Definition at line 278 of file TShapeParamsGuiCompBase.h.

template<class Ui , class Shape , class ShapeModel >
void iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::CreateShapes ( int  viewId,
Shapes result 
)
protectedvirtual
template<class Ui , class Shape , class ShapeModel >
void iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::CreateToolsMenu ( QAbstractButton *  buttonPtr)
protectedvirtual

Maintenance of the tools actions.

Definition at line 285 of file TShapeParamsGuiCompBase.h.

References NULL.

template<class Ui , class Shape , class ShapeModel >
QToolBar * iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::GetToolBar ( ) const
protected

Definition at line 243 of file TShapeParamsGuiCompBase.h.

References NULL.

template<class Ui , class Shape , class ShapeModel >
QString iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::GetUnitName ( ) const
protected
template<class Ui , class Shape , class ShapeModel >
bool iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::IsPositionFixed ( ) const
protected

Definition at line 225 of file TShapeParamsGuiCompBase.h.

template<class Ui , class Shape , class ShapeModel >
bool iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::IsToolsMenuAllowed ( ) const
protected

Definition at line 236 of file TShapeParamsGuiCompBase.h.

template<class Ui , class Shape , class ShapeModel >
void iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::OnActionTriggered ( QAction *  actionPtr)
protectedvirtual
template<class Ui , class Shape , class ShapeModel >
void iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::OnGuiDestroyed ( )
protectedvirtual
template<class Ui , class Shape , class ShapeModel >
void iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::OnGuiHidden ( )
protectedvirtual

Called from widget event filter when slave widget is hidden.

Reimplemented from iqtgui::TGuiObserverWrap< iqtgui::TDesignerGuiCompBase< Ui, QWidget >, imod::TSingleModelObserverBase< ShapeModel > >.

Definition at line 432 of file TShapeParamsGuiCompBase.h.

template<class Ui , class Shape , class ShapeModel >
void iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::OnGuiModelAttached ( )
protectedvirtual
template<class Ui , class Shape , class ShapeModel >
void iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::OnGuiModelDetached ( )
protectedvirtual
template<class Ui , class Shape , class ShapeModel >
void iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::OnGuiShown ( )
protectedvirtual

Called from widget event filter when slave widget is shown.

Reimplemented from iqtgui::TGuiObserverWrap< iqtgui::TDesignerGuiCompBase< Ui, QWidget >, imod::TSingleModelObserverBase< ShapeModel > >.

Definition at line 419 of file TShapeParamsGuiCompBase.h.

template<class Ui , class Shape , class ShapeModel >
bool iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::OnModelAttached ( imod::IModel modelPtr,
istd::IChangeable::ChangeSet changeMask 
)
virtual

This call back function will be called, if an observable object is about to be attached.

This function returns a true, if observable object is accepted by the implementation logic of the observer, otherwise returns false.

Parameters
modelPtrpointer to model object being attached.
changeMaskoutput parameter returning set of change ID's will be accepted. returns a false.

Reimplemented from iqtgui::TGuiObserverWrap< iqtgui::TDesignerGuiCompBase< Ui, QWidget >, imod::TSingleModelObserverBase< ShapeModel > >.

Definition at line 130 of file TShapeParamsGuiCompBase.h.

References imod::IModel::AttachObserver(), istd::TPointerVector< Pointer, AccessAdapter >::GetAt(), istd::TPointerVector< Pointer, AccessAdapter >::GetCount(), and NULL.

template<class Ui , class Shape , class ShapeModel >
void iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::OnModelAttachedAndGuiShown ( imod::IModel modelPtr)
protectedvirtual

Definition at line 324 of file TShapeParamsGuiCompBase.h.

References NULL.

template<class Ui , class Shape , class ShapeModel >
bool iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::OnModelDetached ( imod::IModel modelPtr)
virtual
template<class Ui , class Shape , class ShapeModel >
void iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::OnModelDetachedOrGuiHidden ( imod::IModel modelPtr)
protectedvirtual

Definition at line 362 of file TShapeParamsGuiCompBase.h.

References NULL.

template<class Ui , class Shape , class ShapeModel >
bool iqt2d::TShapeParamsGuiCompBase< Ui, Shape, ShapeModel >::PopulateActions ( QWidget &  host,
imod::IModel modelPtr 
)
protectedvirtual

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

© 2007-2017 Witold Gantzke and Kirill Lepskiy