libyui-qt
 
Loading...
Searching...
No Matches
YQMainWinDock Class Reference

#include <YQMainWinDock.h>

Inheritance diagram for YQMainWinDock:
Collaboration diagram for YQMainWinDock:

Public Member Functions

void add (YQDialog *dialog)
 
void remove (YQDialog *dialog=0)
 
YQDialogtopmostDialog () const
 
bool couldDock ()
 
virtual void show ()
 
virtual void closeEvent (QCloseEvent *event)
 

Static Public Member Functions

static YQMainWinDockmainWinDock ()
 

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
 

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.

Constructor & Destructor Documentation

◆ YQMainWinDock()

YQMainWinDock::YQMainWinDock ( )
protected

Constructor.

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

◆ ~YQMainWinDock()

YQMainWinDock::~YQMainWinDock ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ activateCurrentDialog()

void YQMainWinDock::activateCurrentDialog ( bool active)
protected

Activate or deactivate the next-lower dialog in the dock when a new dialog is opened or when a dialog is closed.

◆ add()

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.

◆ closeEvent()

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.

◆ couldDock()

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.

◆ mainWinDock()

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.

◆ paintEvent()

void YQMainWinDock::paintEvent ( QPaintEvent * event)
protectedvirtual

Paint event.

Reimplemented from QWidget.

◆ remove()

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

◆ resizeEvent()

void YQMainWinDock::resizeEvent ( QResizeEvent * event)
protectedvirtual

Resize event.

Reimplemented from QWidget.

◆ resizeVisibleChild()

void YQMainWinDock::resizeVisibleChild ( )
protected

Resize the visible child to the current size of the dock.

◆ setSideBarWidth()

void YQMainWinDock::setSideBarWidth ( int width)
protected

For secondary wizards

◆ show()

void YQMainWinDock::show ( )
virtual

Show the widget (make it visible).

Reimplemented from QWidget.

◆ showCurrentDialog

void YQMainWinDock::showCurrentDialog ( )
protectedslot

Show the current dialog.

◆ topmostDialog()

YQDialog * YQMainWinDock::topmostDialog ( ) const

Return the current topmost dialog (the widgetRep() of a YQDialog) or 0 if there is none.


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