33 #include <yui/YDialog.h>
42 class YQDialog :
public QWidget,
public YDialog
63 YDialogColorMode colorMode = YDialogNormalColor );
106 virtual void setSize(
int newWidth,
int newHeight );
187 virtual void highlight( YWidget * child );
196 static void center( QWidget * dialog, QWidget * parent = 0 );
219 static QWidget *
chooseParent( YDialogType dialogType );
226 YWidgetListConstIterator end )
const;
233 YWidgetListConstIterator end )
const;
242 YWidgetListConstIterator end );
281 virtual void focusInEvent ( QFocusEvent * event );
282 virtual void resizeEvent ( QResizeEvent * event );
295 QTimer * _waitForEventTimer;
296 QEventLoop * _eventLoop;
297 YWidget * _highlightedChild;
298 QPalette _preHighlightPalette;
299 bool _preHighlightAutoFill;
virtual void highlight(YWidget *child)
Highlight a child widget of this dialog.
static void center(QWidget *dialog, QWidget *parent=0)
Center a dialog relative to 'parent'.
virtual void keyPressEvent(QKeyEvent *event)
Qt event handlers.
void closeEvent(QCloseEvent *ev)
Interited from QDialog: The window was closed via the window manager close button.
void setDefaultButton(YPushButton *newDefaultButton)
Set the dialog's default button - the button that is activated with [Return] if no other button has t...
virtual void setEnabled(bool enabled)
Set enabled/disabled state.
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...
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
virtual YEvent * waitForEventInternal(int timeout_millisec)
Wait for a user event.
bool userResized()
Return 'true' if the user resized this dialog.
virtual void activate()
Activate this dialog: Make sure that it is shown as the topmost dialog of this application and that i...
void gettingFocus(YQGenericButton *button)
Notification that a button gets the keyboard focus.
Stylesheet Editor Dialog.
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 ...
QEventLoop * eventLoop()
Access to this dialog's event loop.
virtual int preferredHeight()
Preferred height of the widget.
virtual void openInternal()
Internal open() method, called exactly once during the life time of the dialog in open().
virtual int preferredWidth()
Preferred width of the widget.
YQGenericButton * findDefaultButton()
Return this dialog's (first) default button or 0 if none.
YQDialog(YDialogType dialogType, YDialogColorMode colorMode=YDialogNormalColor)
Constructor.
void ensureOnlyOneDefaultButton()
Ensure presence of no more than one single default button.
void losingFocus(YQGenericButton *button)
Notification that a button loses the keyboard focus.
void waitForEventTimeout()
Timeout during waitForEvent()
virtual ~YQDialog()
Destructor.
YQGenericButton * wizardDefaultButton(YQWizard *wizard) const
Find a wizard button that would make sense as a default button.
YQWizard * findWizard() const
Find the first wizard in that dialog, if there is any.
bool activateDefaultButton(bool warn=true)
Activate (i.e.
virtual YEvent * pollEventInternal()
Check if a user event is pending.