ICF 3.0.5.47
Technical documentation of ICF Libraries
iview::CConsoleGui Class Reference

Implementation of 2D display console with overlays and scale control functionality. More...

#include <CConsoleGui.h>

Inheritance diagram for iview::CConsoleGui:
Collaboration diagram for iview::CConsoleGui:

Public Types

enum  CommandGroupId {
  CGI_ZOOM = ibase::ICommand::GI_USER + 1 , CGI_SHAPE_EDITOR , CGI_CALIBRATION , CGI_VIEW_CONTROL ,
  CGI_SHAPE_TOOLS
}
 
typedef iview::CConsoleBase BaseClass
 
- Public Types inherited from iview::CConsoleBase
enum class  FittingMode {
  Reset , ScaleToFit , ScaleToFitH , ScaleToFitV ,
  Stretch , PropFill
}
 Control fitting mode, to fit area of interest (AOI) to display. More...
 
enum class  ExtraMode { None , FullScreenView , ZoomToFit }
 
- 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 Slots

void OnZoomIn ()
 
void OnZoomOut ()
 
void OnZoomReset ()
 
void OnZoomToFit (bool state)
 
void OnFitContentsToView ()
 
void OnPointsNone ()
 
void OnPoinsMove ()
 
void OnPointsAdd ()
 
void OnPointsSub ()
 
void OnShowScrollbars (bool state)
 
void OnShowGrid (bool state)
 
void OnShowRuler (bool state)
 
void OnActivateDistanceMeasureTool (bool state)
 
void OnActivatePointMeasureTool (bool state)
 
void OnShowGridInMm (bool state)
 
void OnHScrollbarChanged (int newPos)
 
void OnVScrollbarChanged (int newPos)
 
void UpdateView ()
 
void OnStopFullScreen ()
 

Signals

bool selectionChanged (const iview::IShapeView &view, const istd::CIndex2d &position, const iview::IInteractiveShape &shape, bool state)
 
bool mouseClicked (const iview::IShapeView &view, const istd::CIndex2d &position, Qt::MouseButton buttonType, bool state, const iview::IInteractiveShape *shapePtr)
 

Public Member Functions

 CConsoleGui (QWidget *parent=nullptr)
 
void SetShapeStatusInfo (IShapeStatusInfo *shapeStatusInfoPtr)
 Set status info object for the console shapes.
 
bool IsFullScreenMode () const
 
void SetFullScreenMode (bool isFullScreen)
 
void RetranslateGui ()
 
virtual const CViewportGetView () const
 Get access to internal view implementation.
 
virtual CViewportGetViewRef ()
 Get access to internal view implementation.
 
virtual void UpdateCursorInfo (const QString &infoText)
 
virtual const ibase::IHierarchicalCommandGetCommands () const
 Get list of menu commands.
 
- Public Member Functions inherited from iview::CConsoleBase
 CConsoleBase (QWidget *parent)
 
bool IsZoomToFit () const
 
void SetZoomToFit (bool state=true)
 
FittingMode GetFitMode () const
 
void SetFitMode (FittingMode mode)
 
bool IsGridVisible () const
 
void SetGridVisible (bool state=true)
 
bool IsRulerVisible () const
 
void SetRulerVisible (bool state=true)
 
bool IsDistanceMeasureToolActive () const
 
void SetDistanceMeasureToolActive (bool state=true)
 
bool IsPointMeasureToolActive () const
 
void SetPointMeasureToolActive (bool state=true)
 
bool IsGridInMm () const
 
void SetGridInMm (bool state=true)
 
bool IsButtonsPanelVisible () const
 
void SetButtonsPanelVisible (bool state=true)
 
bool IsButtonsPanelVertical () const
 
void SetButtonsPanelVertical (bool state=true)
 
bool AreScrollbarsVisible () const
 
void SetScrollbarsVisible (bool state=true)
 
bool AreZoomsVisible () const
 
void SetZoomsVisible (bool state=true)
 
bool IsZoomToFitVisible () const
 
void SetZoomToFitVisible (bool state=true)
 
bool ArePolylineButtonsVisible () const
 
void SetPolylineButtonsVisible (bool state=true)
 
bool AreUserModeButtonsVisible () const
 
void SetUserModeButtonsVisible (bool state=true)
 
bool IsScrollbarsButtonVisible () const
 
void SetScrollbarsButtonVisible (bool state=true)
 
bool IsGridButtonVisible () const
 
void SetGridButtonVisible (bool state=true)
 
bool IsRulerButtonVisible () const
 
void SetRulerButtonVisible (bool state=true)
 
bool IsMmButtonVisible () const
 
void SetMmButtonVisible (bool state=true)
 
bool IsDistanceMeasureButtonVisible () const
 
void SetDistanceMeasureButtonVisible (bool state=true)
 
bool IsPointMeasureButtonVisible () const
 
void SetPointMeasureButtonVisible (bool state=true)
 
ExtraMode GetDoubleClickMode () const
 
void SetDoubleClickMode (ExtraMode mode)
 
bool IsFitReleaseAllowed () const
 
void SetFitReleaseAllowed (bool state=true)
 
bool IsBackgroundActive () const
 Check if background object is present and active.
 
void UpdateView ()
 
- 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< IChangeableCloneMe (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.
 

Protected Member Functions

void UpdateZoomInOutState ()
 
void UpdateScrollbarsValues ()
 
virtual bool OnWheelEvent (QWheelEvent *eventPtr)
 
virtual bool OnMouseDoubleClickEvent (QEvent *eventPtr)
 
virtual bool OnKeyPressEvent (QKeyEvent *eventPtr)
 
virtual void UpdateEditModeButtons ()
 Update state of edit mode buttons.
 
virtual void UpdateButtonsState ()
 Recalculates enabling flags for buttons.
 
virtual void UpdateComponentsPosition ()
 Recalculates position of all components.
 
virtual void UpdateCommands ()
 Recalculate menu commands.
 
virtual bool OnSelectChange (const iview::IShapeView &view, const istd::CIndex2d &position, const iview::IInteractiveShape &shape, bool state)
 
virtual bool OnViewMouseButton (const iview::IShapeView &view, const istd::CIndex2d &position, Qt::MouseButton buttonType, bool state, const iview::IInteractiveShape *shapePtr)
 
virtual void OnBoundingBoxChanged ()
 
virtual bool eventFilter (QObject *sourcePtr, QEvent *eventPtr)
 
- Protected Member Functions inherited from iview::CConsoleBase
- 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.
 

Protected Attributes

iview::CViewportm_viewPtr
 

Properties

bool ZoomToFit
 
bool GridVisible
 
bool RulerVisible
 
bool DistanceMeasureToolActive
 
bool PointMeasureToolActive
 
bool GridInMm
 
bool ShowButtonPanel
 
bool ButtonPanelVertical
 
bool ScrollbarsVisible
 
bool ZoomButtonsVisible
 
bool ZoomToFitButtonsVisible
 
bool PolylineButtonsVisible
 
bool UserModeButtonsVisible
 
bool ScrollbarsButtonVisible
 
bool GridButtonVisible
 
bool RulerButtonVisible
 
bool MmButtonVisible
 
FittingMode FittingMode
 

Additional Inherited Members

- Static Public Member Functions inherited from istd::IChangeable
static const ChangeSetGetNoChanges ()
 Get empty set of changes.
 
static const ChangeSetGetAnyChange ()
 Get anonymous change set.
 
static const ChangeSetGetAllChanges ()
 Get anonymous change set.
 
static const ChangeSetGetDelegatedChanges ()
 Get delegated change set.
 

Detailed Description

Implementation of 2D display console with overlays and scale control functionality.

Definition at line 35 of file CConsoleGui.h.

Member Typedef Documentation

◆ BaseClass

Member Enumeration Documentation

◆ CommandGroupId

Enumerator
CGI_ZOOM 
CGI_SHAPE_EDITOR 
CGI_CALIBRATION 
CGI_VIEW_CONTROL 
CGI_SHAPE_TOOLS 

Definition at line 64 of file CConsoleGui.h.

Constructor & Destructor Documentation

◆ CConsoleGui()

iview::CConsoleGui::CConsoleGui ( QWidget * parent = nullptr)
explicit

Member Function Documentation

◆ eventFilter()

virtual bool iview::CConsoleGui::eventFilter ( QObject * sourcePtr,
QEvent * eventPtr )
protectedvirtual

◆ GetCommands()

virtual const ibase::IHierarchicalCommand * iview::CConsoleGui::GetCommands ( ) const
virtual

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.

◆ GetView()

const CViewport & iview::CConsoleGui::GetView ( ) const
inlinevirtual

Get access to internal view implementation.

Implements iview::CConsoleBase.

Definition at line 184 of file CConsoleGui.h.

References m_viewPtr.

◆ GetViewRef()

CViewport & iview::CConsoleGui::GetViewRef ( )
inlinevirtual

Get access to internal view implementation.

Implements iview::CConsoleBase.

Definition at line 192 of file CConsoleGui.h.

References m_viewPtr.

◆ IsFullScreenMode()

bool iview::CConsoleGui::IsFullScreenMode ( ) const

◆ mouseClicked

bool iview::CConsoleGui::mouseClicked ( const iview::IShapeView & view,
const istd::CIndex2d & position,
Qt::MouseButton buttonType,
bool state,
const iview::IInteractiveShape * shapePtr )
signal

◆ OnActivateDistanceMeasureTool

void iview::CConsoleGui::OnActivateDistanceMeasureTool ( bool state)
slot

◆ OnActivatePointMeasureTool

void iview::CConsoleGui::OnActivatePointMeasureTool ( bool state)
slot

◆ OnBoundingBoxChanged()

virtual void iview::CConsoleGui::OnBoundingBoxChanged ( )
protectedvirtual

Implements iview::CConsoleBase.

◆ OnFitContentsToView

void iview::CConsoleGui::OnFitContentsToView ( )
slot

◆ OnHScrollbarChanged

void iview::CConsoleGui::OnHScrollbarChanged ( int newPos)
slot

◆ OnKeyPressEvent()

virtual bool iview::CConsoleGui::OnKeyPressEvent ( QKeyEvent * eventPtr)
protectedvirtual

◆ OnMouseDoubleClickEvent()

virtual bool iview::CConsoleGui::OnMouseDoubleClickEvent ( QEvent * eventPtr)
protectedvirtual

◆ OnPoinsMove

void iview::CConsoleGui::OnPoinsMove ( )
slot

◆ OnPointsAdd

void iview::CConsoleGui::OnPointsAdd ( )
slot

◆ OnPointsNone

void iview::CConsoleGui::OnPointsNone ( )
slot

◆ OnPointsSub

void iview::CConsoleGui::OnPointsSub ( )
slot

◆ OnSelectChange()

virtual bool iview::CConsoleGui::OnSelectChange ( const iview::IShapeView & view,
const istd::CIndex2d & position,
const iview::IInteractiveShape & shape,
bool state )
protectedvirtual

Implements iview::CConsoleBase.

◆ OnShowGrid

void iview::CConsoleGui::OnShowGrid ( bool state)
slot

◆ OnShowGridInMm

void iview::CConsoleGui::OnShowGridInMm ( bool state)
slot

◆ OnShowRuler

void iview::CConsoleGui::OnShowRuler ( bool state)
slot

◆ OnShowScrollbars

void iview::CConsoleGui::OnShowScrollbars ( bool state)
slot

◆ OnStopFullScreen

void iview::CConsoleGui::OnStopFullScreen ( )
slot

◆ OnViewMouseButton()

virtual bool iview::CConsoleGui::OnViewMouseButton ( const iview::IShapeView & view,
const istd::CIndex2d & position,
Qt::MouseButton buttonType,
bool state,
const iview::IInteractiveShape * shapePtr )
protectedvirtual

Implements iview::CConsoleBase.

◆ OnVScrollbarChanged

void iview::CConsoleGui::OnVScrollbarChanged ( int newPos)
slot

◆ OnWheelEvent()

virtual bool iview::CConsoleGui::OnWheelEvent ( QWheelEvent * eventPtr)
protectedvirtual

◆ OnZoomIn

void iview::CConsoleGui::OnZoomIn ( )
slot

◆ OnZoomOut

void iview::CConsoleGui::OnZoomOut ( )
slot

◆ OnZoomReset

void iview::CConsoleGui::OnZoomReset ( )
slot

◆ OnZoomToFit

void iview::CConsoleGui::OnZoomToFit ( bool state)
slot

◆ RetranslateGui()

void iview::CConsoleGui::RetranslateGui ( )

◆ selectionChanged

bool iview::CConsoleGui::selectionChanged ( const iview::IShapeView & view,
const istd::CIndex2d & position,
const iview::IInteractiveShape & shape,
bool state )
signal

◆ SetFullScreenMode()

void iview::CConsoleGui::SetFullScreenMode ( bool isFullScreen)

◆ SetShapeStatusInfo()

void iview::CConsoleGui::SetShapeStatusInfo ( IShapeStatusInfo * shapeStatusInfoPtr)

Set status info object for the console shapes.

◆ UpdateButtonsState()

virtual void iview::CConsoleGui::UpdateButtonsState ( )
protectedvirtual

Recalculates enabling flags for buttons.

Implements iview::CConsoleBase.

◆ UpdateCommands()

virtual void iview::CConsoleGui::UpdateCommands ( )
protectedvirtual

Recalculate menu commands.

Implements iview::CConsoleBase.

◆ UpdateComponentsPosition()

virtual void iview::CConsoleGui::UpdateComponentsPosition ( )
protectedvirtual

Recalculates position of all components.

Implements iview::CConsoleBase.

◆ UpdateCursorInfo()

virtual void iview::CConsoleGui::UpdateCursorInfo ( const QString & infoText)
virtual

Implements iview::CConsoleBase.

◆ UpdateEditModeButtons()

virtual void iview::CConsoleGui::UpdateEditModeButtons ( )
protectedvirtual

Update state of edit mode buttons.

Edit mode buttons controls the mode of interaction with objects. For example for polyline nodes: select, move, insert, remove.

See also
iview::ISelectable::EditMode

Implements iview::CConsoleBase.

◆ UpdateScrollbarsValues()

void iview::CConsoleGui::UpdateScrollbarsValues ( )
protected

◆ UpdateView

void iview::CConsoleGui::UpdateView ( )
slot

◆ UpdateZoomInOutState()

void iview::CConsoleGui::UpdateZoomInOutState ( )
protected

Member Data Documentation

◆ m_viewPtr

iview::CViewport* iview::CConsoleGui::m_viewPtr
protected

Definition at line 139 of file CConsoleGui.h.

Referenced by GetView(), and GetViewRef().

Property Documentation

◆ ButtonPanelVertical

bool iview::CConsoleGui::ButtonPanelVertical
readwrite

Definition at line 49 of file CConsoleGui.h.

◆ DistanceMeasureToolActive

bool iview::CConsoleGui::DistanceMeasureToolActive
readwrite

Definition at line 45 of file CConsoleGui.h.

◆ FittingMode

Definition at line 59 of file CConsoleGui.h.

◆ GridButtonVisible

bool iview::CConsoleGui::GridButtonVisible
readwrite

Definition at line 56 of file CConsoleGui.h.

◆ GridInMm

bool iview::CConsoleGui::GridInMm
readwrite

Definition at line 47 of file CConsoleGui.h.

◆ GridVisible

bool iview::CConsoleGui::GridVisible
readwrite

Definition at line 43 of file CConsoleGui.h.

◆ MmButtonVisible

bool iview::CConsoleGui::MmButtonVisible
readwrite

Definition at line 58 of file CConsoleGui.h.

◆ PointMeasureToolActive

bool iview::CConsoleGui::PointMeasureToolActive
readwrite

Definition at line 46 of file CConsoleGui.h.

◆ PolylineButtonsVisible

bool iview::CConsoleGui::PolylineButtonsVisible
readwrite

Definition at line 53 of file CConsoleGui.h.

◆ RulerButtonVisible

bool iview::CConsoleGui::RulerButtonVisible
readwrite

Definition at line 57 of file CConsoleGui.h.

◆ RulerVisible

bool iview::CConsoleGui::RulerVisible
readwrite

Definition at line 44 of file CConsoleGui.h.

◆ ScrollbarsButtonVisible

bool iview::CConsoleGui::ScrollbarsButtonVisible
readwrite

Definition at line 55 of file CConsoleGui.h.

◆ ScrollbarsVisible

bool iview::CConsoleGui::ScrollbarsVisible
readwrite

Definition at line 50 of file CConsoleGui.h.

◆ ShowButtonPanel

bool iview::CConsoleGui::ShowButtonPanel
readwrite

Definition at line 48 of file CConsoleGui.h.

◆ UserModeButtonsVisible

bool iview::CConsoleGui::UserModeButtonsVisible
readwrite

Definition at line 54 of file CConsoleGui.h.

◆ ZoomButtonsVisible

bool iview::CConsoleGui::ZoomButtonsVisible
readwrite

Definition at line 51 of file CConsoleGui.h.

◆ ZoomToFit

bool iview::CConsoleGui::ZoomToFit
readwrite

Definition at line 42 of file CConsoleGui.h.

◆ ZoomToFitButtonsVisible

bool iview::CConsoleGui::ZoomToFitButtonsVisible
readwrite

Definition at line 52 of file CConsoleGui.h.


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

© Witold Gantzke and Kirill Lepskiy