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