itom 1.3.0
|
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 } |
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 | |
UserUiDialog * | getUiDialog () 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 |
Every instance of this class contains information about one user interface (main window, dialog, dock widget...) which is organized by UiOrganizer.
< type of the user interface
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.
uiDialog | is 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.
dialog | is 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.
mainWindow | is 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.
mainWindow | is 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.
dockWidget | is 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
widget | is the pointer to QWidget |
type | is the corresponding type of widget |
ito::UiContainer::~UiContainer | ( | ) |
destructor
If the widget, observed by the UiDialogSet-instance is still valid, it is registered for deletion by the Qt-system.
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.
tUiType ito::UiContainer::m_type [private] |
type of the user interface which is covered by this instance.
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.