libyui-qt
2.46.13
|
Public Member Functions | |
YQDialog (YDialogType dialogType, YDialogColorMode colorMode=YDialogNormalColor) | |
Constructor. More... | |
void | closeEvent (QCloseEvent *ev) |
Interited from QDialog: The window was closed via the window manager close button. | |
virtual void | setEnabled (bool enabled) |
Set enabled/disabled state. More... | |
virtual int | preferredWidth () |
Preferred width of the widget. More... | |
virtual int | preferredHeight () |
Preferred height of the widget. More... | |
virtual void | setSize (int newWidth, int newHeight) |
Set the new size of the widget. More... | |
YQGenericButton * | findDefaultButton () |
Return this dialog's (first) default button or 0 if none. | |
bool | userResized () |
Return 'true' if the user resized this dialog. | |
YQGenericButton * | focusButton () const |
Returns the button that has the keyboard focus or 0 if no button has the keyboard focus. | |
YQGenericButton * | defaultButton () const |
Returns the dialog's default button - the button that is activated with [Return] if no button has the keyboard focus. | |
void | losingFocus (YQGenericButton *button) |
Notification that a button loses the keyboard focus. More... | |
void | gettingFocus (YQGenericButton *button) |
Notification that a button gets the keyboard focus. More... | |
void | setDefaultButton (YPushButton *newDefaultButton) |
Set the dialog's default button - the button that is activated with [Return] if no other button has the keyboard focus. More... | |
void | ensureOnlyOneDefaultButton () |
Ensure presence of no more than one single default button. | |
bool | activateDefaultButton (bool warn=true) |
Activate (i.e. More... | |
YQWizard * | findWizard () const |
Find the first wizard in that dialog, if there is any. More... | |
YQGenericButton * | wizardDefaultButton (YQWizard *wizard) const |
Find a wizard button that would make sense as a default button. More... | |
virtual void | highlight (YWidget *child) |
Highlight a child widget of this dialog. More... | |
QEventLoop * | eventLoop () |
Access to this dialog's event loop. | |
Static Public Member Functions | |
static void | center (QWidget *dialog, QWidget *parent=0) |
Center a dialog relative to 'parent'. More... | |
Protected Slots | |
void | waitForEventTimeout () |
Timeout during waitForEvent() | |
Protected Member Functions | |
virtual | ~YQDialog () |
Destructor. More... | |
YQGenericButton * | findDefaultButton (YWidgetListConstIterator begin, YWidgetListConstIterator end) const |
Return the (first) default button between 'begin' and 'end' or 0 if there is none. | |
YQWizard * | findWizard (YWidgetListConstIterator begin, YWidgetListConstIterator end) const |
Return the (first) wizard widget between 'begin' and 'end' or 0 if there is none. | |
YQWizard * | ensureOnlyOneDefaultButton (YWidgetListConstIterator begin, YWidgetListConstIterator end) |
Helper function for ensureOnlyOneDefaultButton(): Recursively find all normal and wizard buttons between 'begin' and 'end' and make sure that no more than one button is marked as default. More... | |
virtual void | openInternal () |
Internal open() method, called exactly once during the life time of the dialog in open(). More... | |
virtual YEvent * | waitForEventInternal (int timeout_millisec) |
Wait for a user event. More... | |
virtual YEvent * | pollEventInternal () |
Check if a user event is pending. More... | |
virtual void | activate () |
Activate this dialog: Make sure that it is shown as the topmost dialog of this application and that it can receive input. More... | |
virtual void | keyPressEvent (QKeyEvent *event) |
Qt event handlers. More... | |
virtual void | focusInEvent (QFocusEvent *event) |
virtual void | resizeEvent (QResizeEvent *event) |
Static Protected Member Functions | |
static QWidget * | chooseParent (YDialogType dialogType) |
Choose a parent widget for a dialog of the specified type: Either the main window dock (if this is a YMainDialog and the dock currently accepts child dialogs) or 0. | |
Protected Attributes | |
bool | _userResized |
QSize | _userSize |
YQGenericButton * | _focusButton |
YQGenericButton * | _defaultButton |
QTimer * | _waitForEventTimer |
QEventLoop * | _eventLoop |
YWidget * | _highlightedChild |
QPalette | _preHighlightPalette |
bool | _preHighlightAutoFill |
QY2StyleEditor * | _styleEditor |
Definition at line 42 of file YQDialog.h.
YQDialog::YQDialog | ( | YDialogType | dialogType, |
YDialogColorMode | colorMode = YDialogNormalColor |
||
) |
Constructor.
'dialogType' is one of YMainDialog, YWizardDialog, or YPopupDialog.
The Qt UI supports YWizardDialogs. They are handled very much like YMainDialogs, except for wizard dialogs that are opened over a wizard with a steps panel on the left side, in which case that new wizard dialog will be resized and moved so the steps panel from the wizard below will remain visible.
'colorMode' can be set to YDialogWarnColor to use very bright "warning" colors or YDialogInfoColor to use more prominent, yet not quite as bright as "warning" colors. Use both only very rarely.
Definition at line 60 of file YQDialog.cc.
|
protectedvirtual |
Destructor.
Don't delete a dialog directly, use YDialog::deleteTopmostDialog().
Definition at line 123 of file YQDialog.cc.
|
protectedvirtual |
Activate this dialog: Make sure that it is shown as the topmost dialog of this application and that it can receive input.
Implemented from YDialog.
Definition at line 178 of file YQDialog.cc.
bool YQDialog::activateDefaultButton | ( | bool | warn = true | ) |
Activate (i.e.
click) this dialog's default button, if there is any. Issue a warning to the log file if 'warn' is true.
Definition at line 529 of file YQDialog.cc.
|
static |
Center a dialog relative to 'parent'.
If 'parent' is 0, the dialog is centered relative to the application's main widget. If 'dialog' is the main widget and 'parent' is 0, the dialog is centered relative to the desktop.
Definition at line 831 of file YQDialog.cc.
|
protected |
Helper function for ensureOnlyOneDefaultButton(): Recursively find all normal and wizard buttons between 'begin' and 'end' and make sure that no more than one button is marked as default.
Return (the first) wizard widget found on the way.
Definition at line 344 of file YQDialog.cc.
YQWizard * YQDialog::findWizard | ( | ) | const |
Find the first wizard in that dialog, if there is any.
Returns 0 if there is none.
Definition at line 420 of file YQDialog.cc.
void YQDialog::gettingFocus | ( | YQGenericButton * | button | ) |
Notification that a button gets the keyboard focus.
All pushbuttons are required to call this whenever they gain focus so the dialog can keep track of its focusButton.
Definition at line 584 of file YQDialog.cc.
|
virtual |
Highlight a child widget of this dialog.
This is meant for debugging: YDialogSpy and similar uses.
No more than one widget can be highlighted at any one time in the same dialog. Highlighting another widget un-highlights a previously highlighted widget. 0 means 'unhighlight the last highlighted widget, but don't highlight any other'.
Implemented from YDialog.
Definition at line 847 of file YQDialog.cc.
|
protectedvirtual |
Qt event handlers.
All reimplemented from QWidget.
Definition at line 600 of file YQDialog.cc.
void YQDialog::losingFocus | ( | YQGenericButton * | button | ) |
Notification that a button loses the keyboard focus.
All pushbuttons are required to call this whenever they lose focus so the dialog can keep track of its focusButton.
Definition at line 568 of file YQDialog.cc.
|
protectedvirtual |
Internal open() method, called exactly once during the life time of the dialog in open().
Implemented from YDialog.
Definition at line 168 of file YQDialog.cc.
|
protectedvirtual |
Check if a user event is pending.
If there is one, return it. If there is none, do not wait for one - return 0.
Implemented from YDialog.
Definition at line 799 of file YQDialog.cc.
|
virtual |
Preferred height of the widget.
Reimplemented from YWidget.
Definition at line 217 of file YQDialog.cc.
|
virtual |
Preferred width of the widget.
Reimplemented from YWidget.
Definition at line 186 of file YQDialog.cc.
void YQDialog::setDefaultButton | ( | YPushButton * | newDefaultButton | ) |
Set the dialog's default button - the button that is activated with [Return] if no other button has the keyboard focus.
'newDefaultButton' may be 0 if the former default button is destroyed.
Definition at line 489 of file YQDialog.cc.
|
virtual |
|
virtual |
Set the new size of the widget.
Reimplemented from YWidget.
Definition at line 256 of file YQDialog.cc.
|
protectedvirtual |
Wait for a user event.
Implemented from YDialog.
Definition at line 749 of file YQDialog.cc.
YQGenericButton * YQDialog::wizardDefaultButton | ( | YQWizard * | wizard | ) | const |
Find a wizard button that would make sense as a default button.
Return 0 if none can be found.
Definition at line 452 of file YQDialog.cc.