itom
Loading...
Searching...
No Matches
ito::UiContainer Class Reference

Every instance of this class contains information about one user interface (main window, dialog, dock widget...) which is organized by UiOrganizer. More...

#include <uiOrganizer.h>

Public Types

enum  tUiType {
  uiTypeUiDialog = 0x0001 , uiTypeQDialog = 0x0002 , uiTypeQMainWindow = 0x0003 , uiTypeQDockWidget = 0x0004 ,
  uiTypeFigure = 0x0005 , uiTypeWidget = 0x0006
}
 

Public Member Functions

 UiContainer (UserUiDialog *uiDialog)
 creates new UiContainer from instance of dialog-widget UserUiDialog
 
 UiContainer (QDialog *dialog)
 creates new UiContainer from instance of QDialog
 
 UiContainer (QMainWindow *mainWindow)
 creates new UiContainer from instance of QMainWindow
 
 UiContainer (FigureWidget *figureWidget)
 creates new UiContainer from instance of QMainWindow
 
 UiContainer (QDockWidget *dockWidget)
 creates new UiContainer from instance of QDockWidget
 
 UiContainer (QWidget *widget, tUiType type)
 general constructor to create an instance of UiContainer from given QWidget*-pointer and type
 
 UiContainer (const UiContainer &cpy)
 copy constructor
 
 ~UiContainer ()
 destructor
 
UserUiDialoggetUiDialog () const
 returns instance of UiDialog or NULL, if the widget is not longer available of the type is not uiTypeUiDialog
 
QWidget * getUiWidget () const
 returns instance of Widget or NULL, if the widget is not longer available.
 
tUiType getType () const
 returns type of the guarded user interface
 

Private Attributes

QPointer< QWidget > m_weakDialog
 
tUiType m_type
 

Detailed Description

Every instance of this class contains information about one user interface (main window, dialog, dock widget...) which is organized by UiOrganizer.

Member Enumeration Documentation

◆ tUiType

< type of the user interface

Constructor & Destructor Documentation

◆ UiContainer() [1/6]

ito::UiContainer::UiContainer ( UserUiDialog * uiDialog)
inline

creates new UiContainer from instance of dialog-widget UserUiDialog

The weak reference to uiDialog together with the type uiTypeUiDialog is saved as member variable in UiDialogSet.

Parameters
uiDialogis the dialog-instance which should be guarded by the instance of UiDialogSet

◆ UiContainer() [2/6]

ito::UiContainer::UiContainer ( QDialog * dialog)
inline

creates new UiContainer from instance of QDialog

The weak reference to dialog together with the type uiTypeQDialog is saved as member variable in UiDialogSet.

Parameters
dialogis an instance of QDialog or inherited from it which should be guarded by the instance of UiDialogSet

◆ UiContainer() [3/6]

ito::UiContainer::UiContainer ( QMainWindow * mainWindow)
inline

creates new UiContainer from instance of QMainWindow

The weak reference to mainWindow together with the type uiTypeMainWindow is saved as member variable in UiDialogSet.

Parameters
mainWindowis the window-instance which should be guarded by the instance of UiDialogSet

◆ UiContainer() [4/6]

ito::UiContainer::UiContainer ( FigureWidget * figureWidget)
inline

creates new UiContainer from instance of QMainWindow

The weak reference to mainWindow together with the type uiTypeMainWindow is saved as member variable in UiDialogSet.

Parameters
mainWindowis the window-instance which should be guarded by the instance of UiDialogSet

◆ UiContainer() [5/6]

ito::UiContainer::UiContainer ( QDockWidget * dockWidget)
inline

creates new UiContainer from instance of QDockWidget

The weak reference to dockWidget together with the type uiTypeQDockWidget is saved as member variable in UiDialogSet.

Parameters
dockWidgetis the dockWidget-instance which should be guarded by the instance of UiDialogSet

◆ UiContainer() [6/6]

ito::UiContainer::UiContainer ( QWidget * widget,
tUiType type )
inline

general constructor to create an instance of UiContainer from given QWidget*-pointer and type

The weak reference to widget together with the type-parameter is saved as member variable in this instance of UiDialogSet

Parameters
widgetis the pointer to QWidget
typeis the corresponding type of widget
See also
tUiType

◆ ~UiContainer()

ito::UiContainer::~UiContainer ( )

destructor

If the widget, observed by the UiDialogSet-instance is still valid, it is registered for deletion by the Qt-system.

Member Function Documentation

◆ getUiWidget()

QWidget * ito::UiContainer::getUiWidget ( ) const
inline

returns instance of Widget or NULL, if the widget is not longer available.

Internally, even a dialog or main windows are casted to QWidget. Therefore, this getter method always returns this casted QWidget and NULL, if the QWidget has been deleted before.

Member Data Documentation

◆ m_type

tUiType ito::UiContainer::m_type
private

type of the user interface which is covered by this instance.

See also
tUiType

◆ m_weakDialog

QPointer<QWidget> ito::UiContainer::m_weakDialog
private

weak pointer to the user interface which is covered by this instance. A weak reference is used, since an external deletion of the user interface is then safely considered.


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