Public Types | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
iqtdoc::CMainWindowGuiComp Class Reference

Standard main window component for any document based application. More...

#include <CMainWindowGuiComp.h>

Inheritance diagram for iqtdoc::CMainWindowGuiComp:
iqtdoc::CMainWindowGuiCompBase imod::TSingleModelObserverBase< idoc::IDocumentManager > iqtgui::CSimpleMainWindowGuiComp imod::CSingleModelObserverBase iqtgui::CSimpleMainWindowGuiCompBase imod::IObserver iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMainWindow > > istd::IPolymorphic iqtgui::TGuiComponentBase< QMainWindow > iqtgui::CGuiComponentBase ibase::TLocalizableWrap< icomp::CComponentBase > iqtgui::IGuiObject icomp::CComponentBase istd::IPolymorphic icomp::IComponent istd::IPolymorphic

Public Types

enum  GroupId { GI_APPLICATION = 0x200, GI_DOCUMENT, GI_UNDO, GI_RECENT_FILE }
 
enum  CommandProviderId { CPI_DOCUMENT_MANAGER = 100, CPI_ACTIVE_VIEW, CPI_ACTIVE_DOCUMENT }
 
typedef CMainWindowGuiCompBase BaseClass
 
typedef
imod::TSingleModelObserverBase
< idoc::IDocumentManager
BaseClass2
 
- Public Types inherited from iqtdoc::CMainWindowGuiCompBase
typedef
iqtgui::CSimpleMainWindowGuiComp 
BaseClass
 
- Public Types inherited from iqtgui::CSimpleMainWindowGuiComp
enum  GroupId { GI_SETTINGS = 0x400 }
 
enum  ModelId { MI_PREFERENCE_COMMAND = 0x1000 }
 
typedef
CSimpleMainWindowGuiCompBase 
BaseClass
 
- Public Types inherited from iqtgui::CSimpleMainWindowGuiCompBase
typedef
iqtgui::TRestorableGuiWrap
< iqtgui::TGuiComponentBase
< QMainWindow > > 
BaseClass
 
- Public Types inherited from iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMainWindow > >
typedef
iqtgui::TGuiComponentBase
< QMainWindow > 
BaseClass
 
- Public Types inherited from iqtgui::TGuiComponentBase< QMainWindow >
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 Member Functions

 CMainWindowGuiComp ()
 
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...
 
- Public Member Functions inherited from iqtgui::CSimpleMainWindowGuiComp
 CSimpleMainWindowGuiComp ()
 
virtual void OnTryClose (bool *ignoredPtr=NULL)
 Called on trying to close application. More...
 
- Public Member Functions inherited from iqtgui::TGuiComponentBase< QMainWindow >
 TGuiComponentBase ()
 
virtual QMainWindow * GetQtWidget () const
 
virtual QWidget * CreateQtWidget (QWidget *parentPtr)
 Create slave widget object. More...
 
- 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 QWidget * GetWidget () const
 Get access to internal QWidget object. 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 ()
 

Protected Slots

void OnNew ()
 
void OnOpen ()
 
void OnSave ()
 
void OnSaveAs ()
 
void OnOpenDocument (const QByteArray *documentTypeIdPtr=NULL)
 
void OnQuit ()
 
void OnUndo ()
 
void OnRedo ()
 
void OnCopyPathToClipboard ()
 
void OnOpenDocumentFolder ()
 
- Protected Slots inherited from iqtgui::CSimpleMainWindowGuiComp
void OnShowToolbars ()
 
void OnFullScreen ()
 
void OnAbout ()
 
void OnHelpManual ()
 
void OnSettings ()
 
void OnShowOtherCommandTriggered (bool enabled)
 

Protected Member Functions

virtual bool OpenFile (const QString &fileName)
 
virtual void OnActiveViewChanged ()
 
virtual void OnActiveDocumentChanged ()
 
virtual void OnDragEnterEvent (QDragEnterEvent *dragEnterEventPtr)
 
virtual void OnDropEvent (QDropEvent *dropEventPtr)
 
void SetupNewCommand ()
 
bool HasDocumentTemplate () const
 
void UpdateUndoMenu ()
 
void OnNewDocument (const QByteArray &documentTypeId)
 
virtual bool SerializeRecentFileList (iser::IArchive &archive)
 
virtual void UpdateRecentFileList (const idoc::IDocumentManager::FileToTypeMap &fileToTypeMap)
 Updates displayed list of recent used files. More...
 
virtual void RemoveFromRecentFileList (const QString &filePath)
 
virtual bool IsMainWindowActive (int index) const
 
virtual void UpdateFixedCommands (iqtgui::CHierarchicalCommand &fixedCommands)
 
virtual void UpdateToolsCommands (iqtgui::CHierarchicalCommand &toolsCommand)
 
virtual void AppendMenuActions (iqtgui::CHierarchicalCommand &menuCommands)
 
virtual void OnGuiCreated ()
 Called just after GUI is initialized. More...
 
virtual void OnRetranslate ()
 Called when non-GUI elements (like commands) should be retranslated. More...
 
virtual void OnUpdate (const istd::IChangeable::ChangeSet &changeSet)
 Called on update of observed model. More...
 
virtual bool eventFilter (QObject *sourcePtr, QEvent *eventPtr)
 
virtual void OnComponentCreated ()
 
virtual void OnComponentDestroyed ()
 
- Protected Member Functions inherited from iqtgui::CSimpleMainWindowGuiComp
virtual void UpdateMenuActions ()
 
virtual void SetupMainWindowComponents (QMainWindow &mainWindow)
 
virtual void AddMainComponent (int componentIndex, iqtgui::IMainWindowComponent *componentPtr)
 
virtual void RemoveMainComponent (iqtgui::IMainWindowComponent *componentPtr)
 
virtual void CreateMenuBar ()
 
virtual void CreateDefaultToolBar ()
 
virtual void SetToolBarsVisible (bool isVisible=true)
 
virtual void SetupMenu ()
 
virtual void UpdateViewCommands (iqtgui::CHierarchicalCommand &viewCommand)
 
virtual void UpdateHelpCommands (iqtgui::CHierarchicalCommand &helpCommand)
 
virtual void UpdateMainWindowComponentsVisibility ()
 Set main window visible or invisible, depending on menu commands. More...
 
virtual void OnRestoreSettings (const QSettings &settings)
 
virtual void OnSaveSettings (QSettings &settings) const
 
virtual void OnGuiDestroyed ()
 Called just before GUI is released. More...
 
virtual void OnGuiShown ()
 Called from widget event filter when slave widget is shown. More...
 
- Protected Member Functions inherited from iqtgui::TRestorableGuiWrap< iqtgui::TGuiComponentBase< QMainWindow > >
virtual bool CreateGui (QWidget *parentPtr)
 
virtual bool DestroyGui ()
 
- Protected Member Functions inherited from iqtgui::CGuiComponentBase
virtual void OnGuiHidden ()
 Called from widget event filter when slave widget is hidden. More...
 
virtual bool OnKeyPressed (QKeyEvent *event)
 Called from widget event filter when key is pressed. More...
 
virtual void OnGuiRetranslate ()
 Called from widget event filter when GUI 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 ()
 
- 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< idoc::IDocumentManager >
virtual idoc::IDocumentManagerCastFromModel (imod::IModel *modelPtr) const
 
 TSingleModelObserverBase ()
 
idoc::IDocumentManagerGetObservedObject () const
 Get instance of observed object. More...
 
idoc::IDocumentManagerGetObjectPtr () const
 Get instance of observed object. More...
 
bool AttachOrSetObject (idoc::IDocumentManager *objectPtr)
 Attach to model of object or set object pointer, if no connection is possible. More...
 
- Protected Member Functions inherited from imod::CSingleModelObserverBase
void SetModelPtr (imod::IModel *modelPtr)
 Set internal model pointer to specified value. More...
 
 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...
 
virtual void AfterUpdate (imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet)
 This function will be called after update of the observer contents occures. More...
 

Additional Inherited Members

- Protected Types inherited from imod::TSingleModelObserverBase< idoc::IDocumentManager >
typedef CSingleModelObserverBase BaseClass
 
typedef idoc::IDocumentManager ModelType
 
- Protected Types inherited from imod::CSingleModelObserverBase
typedef imod::IModel ModelType
 
- 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::CSimpleMainWindowGuiComp
CommandsObserver m_commandsObserver
 
- 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

Standard main window component for any document based application.

Definition at line 69 of file CMainWindowGuiComp.h.

Member Typedef Documentation

Definition at line 76 of file CMainWindowGuiComp.h.

Definition at line 77 of file CMainWindowGuiComp.h.

Member Enumeration Documentation

Enumerator
CPI_DOCUMENT_MANAGER 
CPI_ACTIVE_VIEW 
CPI_ACTIVE_DOCUMENT 

Definition at line 102 of file CMainWindowGuiComp.h.

Enumerator
GI_APPLICATION 
GI_DOCUMENT 
GI_UNDO 
GI_RECENT_FILE 

Definition at line 94 of file CMainWindowGuiComp.h.

Constructor & Destructor Documentation

iqtdoc::CMainWindowGuiComp::CMainWindowGuiComp ( )

Member Function Documentation

virtual void iqtdoc::CMainWindowGuiComp::AppendMenuActions ( iqtgui::CHierarchicalCommand menuCommands)
protectedvirtual

Reimplemented from iqtgui::CSimpleMainWindowGuiComp.

virtual bool iqtdoc::CMainWindowGuiComp::eventFilter ( QObject *  sourcePtr,
QEvent *  eventPtr 
)
protectedvirtual

Reimplemented from iqtgui::CSimpleMainWindowGuiComp.

bool iqtdoc::CMainWindowGuiComp::HasDocumentTemplate ( ) const
protected
virtual bool iqtdoc::CMainWindowGuiComp::IsMainWindowActive ( int  index) const
protectedvirtual

Reimplemented from iqtgui::CSimpleMainWindowGuiComp.

virtual void iqtdoc::CMainWindowGuiComp::OnActiveDocumentChanged ( )
protectedvirtual
virtual void iqtdoc::CMainWindowGuiComp::OnActiveViewChanged ( )
protectedvirtual
virtual void iqtdoc::CMainWindowGuiComp::OnComponentCreated ( )
protectedvirtual

Reimplemented from iqtgui::CGuiComponentBase.

virtual void iqtdoc::CMainWindowGuiComp::OnComponentDestroyed ( )
protectedvirtual

Reimplemented from icomp::CComponentBase.

void iqtdoc::CMainWindowGuiComp::OnCopyPathToClipboard ( )
protectedslot
virtual void iqtdoc::CMainWindowGuiComp::OnDragEnterEvent ( QDragEnterEvent *  dragEnterEventPtr)
protectedvirtual
virtual void iqtdoc::CMainWindowGuiComp::OnDropEvent ( QDropEvent *  dropEventPtr)
protectedvirtual
virtual void iqtdoc::CMainWindowGuiComp::OnGuiCreated ( )
protectedvirtual

Called just after GUI is initialized.

Reimplemented from iqtgui::CSimpleMainWindowGuiComp.

virtual bool iqtdoc::CMainWindowGuiComp::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 imod::TSingleModelObserverBase< idoc::IDocumentManager >.

virtual bool iqtdoc::CMainWindowGuiComp::OnModelDetached ( imod::IModel modelPtr)
virtual

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

Reimplemented from imod::TSingleModelObserverBase< idoc::IDocumentManager >.

void iqtdoc::CMainWindowGuiComp::OnNew ( )
protectedslot
void iqtdoc::CMainWindowGuiComp::OnNewDocument ( const QByteArray &  documentTypeId)
protected
void iqtdoc::CMainWindowGuiComp::OnOpen ( )
protectedslot
void iqtdoc::CMainWindowGuiComp::OnOpenDocument ( const QByteArray *  documentTypeIdPtr = NULL)
protectedslot
void iqtdoc::CMainWindowGuiComp::OnOpenDocumentFolder ( )
protectedslot
void iqtdoc::CMainWindowGuiComp::OnQuit ( )
protectedslot
void iqtdoc::CMainWindowGuiComp::OnRedo ( )
protectedslot
virtual void iqtdoc::CMainWindowGuiComp::OnRetranslate ( )
protectedvirtual

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

Reimplemented from iqtgui::CSimpleMainWindowGuiComp.

void iqtdoc::CMainWindowGuiComp::OnSave ( )
protectedslot
void iqtdoc::CMainWindowGuiComp::OnSaveAs ( )
protectedslot
void iqtdoc::CMainWindowGuiComp::OnUndo ( )
protectedslot
virtual void iqtdoc::CMainWindowGuiComp::OnUpdate ( const istd::IChangeable::ChangeSet changeSet)
protectedvirtual

Called on update of observed model.

This method is designed to be overload by derrived classes.

Reimplemented from imod::CSingleModelObserverBase.

virtual bool iqtdoc::CMainWindowGuiComp::OpenFile ( const QString &  fileName)
protectedvirtual
virtual void iqtdoc::CMainWindowGuiComp::RemoveFromRecentFileList ( const QString &  filePath)
protectedvirtual
virtual bool iqtdoc::CMainWindowGuiComp::SerializeRecentFileList ( iser::IArchive archive)
protectedvirtual
void iqtdoc::CMainWindowGuiComp::SetupNewCommand ( )
protected
virtual void iqtdoc::CMainWindowGuiComp::UpdateFixedCommands ( iqtgui::CHierarchicalCommand fixedCommands)
protectedvirtual

Reimplemented from iqtgui::CSimpleMainWindowGuiComp.

virtual void iqtdoc::CMainWindowGuiComp::UpdateRecentFileList ( const idoc::IDocumentManager::FileToTypeMap fileToTypeMap)
protectedvirtual

Updates displayed list of recent used files.

Parameters
fileToTypeMaplist of new files and corresponding types.
virtual void iqtdoc::CMainWindowGuiComp::UpdateToolsCommands ( iqtgui::CHierarchicalCommand toolsCommand)
protectedvirtual

Reimplemented from iqtgui::CSimpleMainWindowGuiComp.

void iqtdoc::CMainWindowGuiComp::UpdateUndoMenu ( )
protected

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

© 2007-2017 Witold Gantzke and Kirill Lepskiy