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;
Stylesheet Editor Dialog.
YQGenericButton * defaultButton() const
Returns the dialog's default button - the button that is activated with [Return] if no button has the...
bool userResized()
Return 'true' if the user resized this dialog.
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
virtual int preferredHeight()
Preferred height of the widget.
YQWizard * findWizard() const
Find the first wizard in that dialog, if there is any.
YQGenericButton * findDefaultButton()
Return this dialog's (first) default button or 0 if none.
void gettingFocus(YQGenericButton *button)
Notification that a button gets the keyboard focus.
void ensureOnlyOneDefaultButton()
Ensure presence of no more than one single default button.
static void center(QWidget *dialog, QWidget *parent=0)
Center a dialog relative to 'parent'.
void waitForEventTimeout()
Timeout during waitForEvent()
virtual YEvent * waitForEventInternal(int timeout_millisec)
Wait for a user event.
YQGenericButton * focusButton() const
Returns the button that has the keyboard focus or 0 if no button has the keyboard focus.
virtual YEvent * pollEventInternal()
Check if a user event is pending.
bool activateDefaultButton(bool warn=true)
Activate (i.e.
virtual void activate()
Activate this dialog: Make sure that it is shown as the topmost dialog of this application and that i...
virtual int preferredWidth()
Preferred width of the widget.
virtual void openInternal()
Internal open() method, called exactly once during the life time of the dialog in open().
virtual ~YQDialog()
Destructor.
YQGenericButton * wizardDefaultButton(YQWizard *wizard) const
Find a wizard button that would make sense as a default button.
virtual void keyPressEvent(QKeyEvent *event)
Qt event handlers.
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.
void setDefaultButton(YPushButton *newDefaultButton)
Set the dialog's default button - the button that is activated with [Return] if no other button has t...
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.
virtual void highlight(YWidget *child)
Highlight a child widget of this dialog.
void losingFocus(YQGenericButton *button)
Notification that a button loses the keyboard focus.
YQDialog(YDialogType dialogType, YDialogColorMode colorMode=YDialogNormalColor)
Constructor.