itom  4.1.0
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 More...
 
 UiContainer (QDialog *dialog)
 creates new UiContainer from instance of QDialog More...
 
 UiContainer (QMainWindow *mainWindow)
 creates new UiContainer from instance of QMainWindow More...
 
 UiContainer (FigureWidget *figureWidget)
 creates new UiContainer from instance of QMainWindow More...
 
 UiContainer (QDockWidget *dockWidget)
 creates new UiContainer from instance of QDockWidget More...
 
 UiContainer (QWidget *widget, tUiType type)
 general constructor to create an instance of UiContainer from given QWidget*-pointer and type More...
 
 UiContainer (const UiContainer &cpy)
 copy constructor
 
 ~UiContainer ()
 destructor More...
 
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. More...
 
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

< type of the user interface

Constructor & Destructor Documentation

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
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
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
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
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
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
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

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

tUiType ito::UiContainer::m_type
private

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

See also
tUiType
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 savely considered.


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