libyui-qt  2.47.1.1
YQMainWinDock Class Reference

Container window for YQDialogs of type YMainWindowDialog: More...

#include <YQMainWinDock.h>

Inheritance diagram for YQMainWinDock:
Collaboration diagram for YQMainWinDock:

Public Member Functions

void add (YQDialog *dialog)
 Add a dialog (the widgetRep() of a YQDialog) to the MainWinDock (on top of its widget stack. More...
 
void remove (YQDialog *dialog=0)
 Remove a dialog from the MainWinDock (if it belongs to the MainWinDock). More...
 
YQDialogtopmostDialog () const
 Return the current topmost dialog (the widgetRep() of a YQDialog) or 0 if there is none.
 
bool 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.
 
virtual void show ()
 Show the widget (make it visible). More...
 
virtual void closeEvent (QCloseEvent *event)
 Window manager close event (Alt-F4): Send a YCancelEvent and let the application handle that event. More...
 

Static Public Member Functions

static YQMainWinDockmainWinDock ()
 Static method to access the singleton for this class. More...
 

Protected Slots

void showCurrentDialog ()
 Show the current dialog.
 

Protected Member Functions

 YQMainWinDock ()
 Constructor. More...
 
virtual ~YQMainWinDock ()
 Destructor.
 
virtual void paintEvent (QPaintEvent *event)
 Paint event. More...
 
virtual void resizeEvent (QResizeEvent *event)
 Resize event. More...
 
void resizeVisibleChild ()
 Resize the visible child to the current size of the dock.
 
void setSideBarWidth (int width)
 For secondary wizards.
 
void activateCurrentDialog (bool active)
 Activate or deactivate the next-lower dialog in the dock when a new dialog is opened or when a dialog is closed.
 

Friends

class YQWizard
 

Detailed Description

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.

Definition at line 51 of file YQMainWinDock.h.

Constructor & Destructor Documentation

YQMainWinDock::YQMainWinDock ( )
protected

Constructor.

Use the static mainWinDock() method to access the singleton for this class.

Definition at line 50 of file YQMainWinDock.cc.

Here is the call graph for this function:

Member Function Documentation

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.

Definition at line 135 of file YQMainWinDock.cc.

Here is the call graph for this function:

void YQMainWinDock::closeEvent ( QCloseEvent *  event)
virtual

Window manager close event (Alt-F4): Send a YCancelEvent and let the application handle that event.

Reimplemented from QWidget.

Definition at line 297 of file YQMainWinDock.cc.

Here is the call graph for this function:

YQMainWinDock * YQMainWinDock::mainWinDock ( )
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.

Definition at line 39 of file YQMainWinDock.cc.

Here is the call graph for this function:

void YQMainWinDock::paintEvent ( QPaintEvent *  event)
protectedvirtual

Paint event.

Reimplemented from QWidget.

Definition at line 310 of file YQMainWinDock.cc.

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

Definition at line 208 of file YQMainWinDock.cc.

Here is the call graph for this function:

void YQMainWinDock::resizeEvent ( QResizeEvent *  event)
protectedvirtual

Resize event.

Reimplemented from QWidget.

Definition at line 75 of file YQMainWinDock.cc.

Here is the call graph for this function:

void YQMainWinDock::show ( )
virtual

Show the widget (make it visible).

Reimplemented from QWidget.

Definition at line 121 of file YQMainWinDock.cc.


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