libyui-qt
|
#include <YQMainWinDock.h>
Public Member Functions | |
void | add (YQDialog *dialog) |
void | remove (YQDialog *dialog=0) |
YQDialog * | topmostDialog () const |
bool | couldDock () |
virtual void | show () |
virtual void | closeEvent (QCloseEvent *event) |
Static Public Member Functions | |
static YQMainWinDock * | mainWinDock () |
Protected Slots | |
void | showCurrentDialog () |
Protected Member Functions | |
YQMainWinDock () | |
virtual | ~YQMainWinDock () |
virtual void | paintEvent (QPaintEvent *event) |
virtual void | resizeEvent (QResizeEvent *event) |
void | resizeVisibleChild () |
void | setSideBarWidth (int width) |
void | activateCurrentDialog (bool active) |
Friends | |
class | YQWizard |
Container window for YQDialogs of type YMainWindowDialog:
This widget "swallows" any main dialogs it gets so only the topmost of them is visible at any given time. It acts as a window stack for main dialogs, making the next lower dialog on the stack visible as when the (previously) topmost main dialog is closed.
This widget also handles its own visibility accordingly: It is visible if and only if it has a main dialog to display. It makes itself invisible when there is no more main dialog to display, and it makes itself visible again when a new main dialog appears.
This widget can swallow an arbitrary number of main dialogs as they are opened as long as there is no popup dialog in between.
|
protected |
Constructor.
Use the static mainWinDock() method to access the singleton for this class.
|
protectedvirtual |
Destructor.
|
protected |
Activate or deactivate the next-lower dialog in the dock when a new dialog is opened or when a dialog is closed.
void YQMainWinDock::add | ( | YQDialog * | dialog | ) |
Add a dialog (the widgetRep() of a YQDialog) to the MainWinDock (on top of its widget stack. The widget stack does not assume ownership of the widget.
If the MainWinDock is not visible yet, this operation makes it visible.
|
virtual |
Window manager close event (Alt-F4): Send a YCancelEvent and let the application handle that event.
Reimplemented from QWidget.
bool YQMainWinDock::couldDock | ( | ) |
Return 'true' if the next main dialog could be docked, i.e., if there is either no open dialog at all or only main dialogs.
|
static |
Static method to access the singleton for this class.
This creates the (one and only) instance of this class in the first call. Subsequent calls simply return this instance.
|
protectedvirtual |
Paint event.
Reimplemented from QWidget.
void YQMainWinDock::remove | ( | YQDialog * | dialog = 0 | ) |
Remove a dialog from the MainWinDock (if it belongs to the MainWinDock). If dialog is 0, this removes the topmost dialog from the MainWinDock.
This can safely be called in the destructor of all dialogs, even those that were never added to the MainWinDock.
If that was the last main dialog in the MainWinDock, the MainWinDock will be hidden (until another main dialog is added).
|
protectedvirtual |
Resize event.
Reimplemented from QWidget.
|
protected |
Resize the visible child to the current size of the dock.
|
protected |
For secondary wizards
|
virtual |
Show the widget (make it visible).
Reimplemented from QWidget.
|
protectedslot |
Show the current dialog.
YQDialog * YQMainWinDock::topmostDialog | ( | ) | const |
Return the current topmost dialog (the widgetRep() of a YQDialog) or 0 if there is none.