KDEUI
kdialog.cpp
Go to the documentation of this file.
78 kWarning(240) << q->metaObject()->className() << "created with a layout; don't do that, KDialog takes care of it, use mainWidget or setMainWidget instead";
181 q->setPlainCaption(KGlobal::caption()); // set appropriate initial window title for case it gets not set later
190 : QDialog(parent, sAllowEmbeddingInGraphicsView ? flags : flags | Qt::BypassGraphicsProxyWidget ), d_ptr(new KDialogPrivate)
196 : QDialog(parent, sAllowEmbeddingInGraphicsView ? flags : flags | Qt::BypassGraphicsProxyWidget), d_ptr(&dd)
560 if( !( widget->windowFlags() & Qt::X11BypassWindowManagerHint ) && widget->windowType() != Qt::Popup
1033 void KDialog::saveDialogSize( KConfigGroup& config, KConfigGroup::WriteConfigFlags options ) const
1040 config.writeEntry( QString::fromLatin1("Width %1").arg( desk.width() ), sizeToSave.width(), options );
1041 config.writeEntry( QString::fromLatin1("Height %1").arg( desk.height() ), sizeToSave.height(), options );
QLayout * layout() const
QObject * child(const char *objName, const char *inheritsClass, bool recursiveSearch) const
static int marginHint()
Returns the number of pixels that should be used between a dialog edge and the outermost widget(s) ac...
Definition: kdialog.cpp:427
ButtonCode defaultButton() const
Returns the button code of the default button, or NoDefault if there is no default button...
Definition: kdialog.cpp:324
QString caption()
QString i18n(const char *text)
void setMenu(QMenu *menu)
void setBottom(int y)
void setButtonGuiItem(ButtonCode id, const KGuiItem &item)
Sets the KGuiItem directly for the button instead of using 3 methods to set the text, tooltip and whatsthis strings.
Definition: kdialog.cpp:699
static void centerOnScreen(QWidget *widget, int screen=-1)
Centers widget on the desktop, taking multi-head setups into account.
Definition: kdialog.cpp:554
Qt::KeyboardModifiers modifiers() const
virtual QLayout * layout()
virtual QSize minimumSizeHint() const
const QRect screenGeometry(int screen) const
virtual QLayoutItem * itemAt(int index) const =0
virtual void closeEvent(QCloseEvent *e)
virtual void reject()
bool isHidden() const
int width() const
bool isButtonEnabled(ButtonCode id) const
Returns whether any button is enabled.
Definition: kdialog.cpp:668
QWidget * window() const
int right() const
const Key & key() const
Qt::Orientation orientation() const
static bool avoidArea(QWidget *widget, const QRect &area, int screen=-1)
Places widget so that it doesn't cover a certain area of the screen.
Definition: kdialog.cpp:572
int numScreens() const
Qt::HANDLE appRootWindow(int screen)
bool hasNext() const
void setEnabled(bool enable)
Display * display()
Show Cancel-button. (this button reject()s the dialog; result set to QDialog::Rejected) ...
Definition: kdialog.h:144
#define K_GLOBAL_STATIC(TYPE, NAME)
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const =0
void setHelp(const QString &anchor, const QString &appname=QString())
Sets the help path and topic.
Definition: kdialog.cpp:967
const QObjectList & children() const
virtual QLayout * layout()
Show Yes button. (this button closes the dialog and sets the result to KDialog::Yes) ...
Definition: kdialog.h:147
static void resizeLayout(QWidget *widget, int margin, int spacing)
Resize every layout manager used in widget and its nested children.
Definition: kdialog.cpp:499
static void setAllowEmbeddingInGraphicsView(bool allowEmbedding)
Allow embedding the dialogs based on KDialog into a graphics view.
Definition: kdialog.cpp:1044
Definition: netwm_def.h:614
void translate(int dx, int dy)
visible
bool intersects(const QRect &rectangle) const
void setAttribute(Qt::WidgetAttribute attribute, bool on)
int exec()
bool isDetailsWidgetVisible() const
Returns the status of the Details button.
Definition: kdialog.cpp:824
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
int height() const
Definition: kdialog.h:443
int x() const
int y() const
Definition: kdialog.h:138
virtual void done(int r)
virtual void slotButtonClicked(int button)
Activated when the button button is clicked.
Definition: kdialog.cpp:877
bool isVirtualDesktop() const
void setButtonWhatsThis(ButtonCode id, const QString &text)
Sets the "What's this?" text of any button.
Definition: kdialog.cpp:778
void adjustSize()
void setButtonFocus(ButtonCode id)
Sets the focus to the button of the passed id.
Definition: kdialog.cpp:798
void setButtonToolTip(ButtonCode id, const QString &text)
Sets the tooltip text of any button.
Definition: kdialog.cpp:758
QWidget * focusWidget() const
void setParent(QWidget *parent)
int screenNumber(const QWidget *widget) const
virtual void setCaption(const QString &caption)
Make a KDE compliant caption.
Definition: kdialog.cpp:469
void enableButtonApply(bool state)
Enable or disable (gray out) the Apply button.
Definition: kdialog.cpp:682
int x() const
int y() const
static void invokeHelp(const QString &anchor=QString(), const QString &appname=QString(), const QByteArray &startup_id=QByteArray())
QString i18nc(const char *ctxt, const char *text)
geometry
QString buttonWhatsThis(ButtonCode id) const
Returns the "What's this?" text of any button.
Definition: kdialog.cpp:789
Definition: kdialog.h:444
width
void showButtonSeparator(bool state)
Hide or display the separator line drawn between the action buttons an the main widget.
Definition: kdialog.cpp:624
QSize size() const
bool testAttribute(Qt::WidgetAttribute attribute) const
void setEnabled(bool)
void setButtonMenu(ButtonCode id, QMenu *menu, ButtonPopupMode popupmode=InstantPopup)
Sets the menu of any button.
Definition: kdialog.cpp:708
primaryScreen
QString fromUtf8(const char *str, int size)
static QString makeStandardCaption(const QString &userCaption, QWidget *window=0, CaptionFlags flags=HIGCompliantCaption)
Builds a caption that contains the application name along with the userCaption using a standard layou...
Definition: kdialog.cpp:442
void setButtonsOrientation(Qt::Orientation orientation)
Sets the orientation of the button box.
Definition: kdialog.cpp:268
int top() const
static int spacingHint()
Returns the number of pixels that should be used between widgets inside a dialog according to the KDE...
Definition: kdialog.cpp:432
void setFocus()
void setEscapeButton(ButtonCode id)
Sets the button that will be activated when the Escape key is pressed.
Definition: kdialog.cpp:282
int left() const
bool isEmpty() const
Definition: kdialog.h:445
const char * constData() const
void setHelpLinkText(const QString &text)
Sets the text that is shown as the linked text.
Definition: kdialog.cpp:975
QString buttonToolTip(ButtonCode id) const
Returns the tooltip of any button.
Definition: kdialog.cpp:769
QPoint pos() const
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
QPoint center() const
bool spontaneous() const
frameGeometry
void deleteLater()
virtual QSize sizeHint() const
void hide()
QFuture< void > map(Sequence &sequence, MapFunction function)
void restoreDialogSize(const KConfigGroup &config)
Restores the dialog's size from the configuration according to the screen size.
Definition: kdialog.cpp:1018
void setButtons(ButtonCodes buttonMask)
Creates (or recreates) the button box and all the buttons in it.
Definition: kdialog.cpp:206
Show Help button. (this button will run the help set with setHelp)
Definition: kdialog.h:139
void setMargin(int margin)
void setButtonIcon(ButtonCode id, const KIcon &icon)
Sets the icon of any button.
Definition: kdialog.cpp:742
virtual void accept()
bool isSupported(NET::Property property) const
Returns true if the given property is supported by the window manager.
Definition: netwm.cpp:2640
QRect rect() const
void setDelayedMenu(QMenu *delayed_menu)
Sets a delayed popup menu for consistency, since menu() isn't virtual.
Definition: kpushbutton.cpp:307
Show Ok button. (this button accept()s the dialog; result set to QDialog::Accepted) ...
Definition: kdialog.h:141
int key() const
Qt::WindowType windowType() const
Item next()
void enableButtonOk(bool state)
Enable or disable (gray out) the OK button.
Definition: kdialog.cpp:677
static int groupSpacingHint()
Returns the number of pixels that should be used to visually separate groups of related options in a ...
Definition: kdialog.cpp:437
void setDefaultButton(ButtonCode id)
Sets the button that will be activated when the Enter key is pressed.
Definition: kdialog.cpp:287
void setDetailsWidget(QWidget *detailsWidget)
Sets the widget that gets shown when "Details" is enabled.
Definition: kdialog.cpp:806
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
void showButton(ButtonCode id, bool state)
Hide or display a general action button.
Definition: kdialog.cpp:692
virtual void keyPressEvent(QKeyEvent *e)
KPushButton * button(ButtonCode id) const
Returns the button that corresponds to the id.
Definition: kdialog.cpp:655
Definition: kdialog.h:160
void setRight(int x)
windowFlags
Show No button. (this button closes the dialog and sets the result to KDialog::No) ...
Definition: kdialog.h:146
void setWhatsThis(const QString &)
bool activate()
int width() const
QFontMetrics fontMetrics() const
QPoint pos()
void enterWhatsThisMode()
QStyle * style()
void setX(int x)
void setY(int y)
QDesktopWidget * desktop()
void setGuiItem(const KGuiItem &item)
Sets the KGuiItem for this button.
Definition: kpushbutton.cpp:215
Definition: netwm_def.h:692
Used when specifying a default button; indicates that no button should be marked by default...
Definition: kdialog.h:153
QWidget * parentWidget() const
void enableButton(ButtonCode id, bool state)
Enable or disable (gray out) a general action button.
Definition: kdialog.cpp:661
QWidget(QWidget *parent, QFlags< Qt::WindowType > f)
int height() const
int bottom() const
void setDetailsWidgetVisible(bool visible)
Sets the status of the Details button.
Definition: kdialog.cpp:829
QFontMetrics fontMetrics()
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
QString fromLatin1(const char *str, int size)
void enableButtonCancel(bool state)
Enable or disable (gray out) the Cancel button.
Definition: kdialog.cpp:687
void setSpacing(int)
typedef WindowFlags
const QRect availableGeometry(int screen) const
void show()
void setButtonText(ButtonCode id, const QString &text)
Sets the text of any button.
Definition: kdialog.cpp:719
void setToolTip(const QString &)
const T & value() const
virtual void setPlainCaption(const QString &caption)
Make a plain caption without any modifications.
Definition: kdialog.cpp:488
bool isWidgetType() const
void enableLinkedHelp(bool state)
Display or hide the help link area on the top of the dialog.
Definition: kdialog.cpp:941
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Show Details button. (this button will show the detail widget set with setDetailsWidget) ...
Definition: kdialog.h:149
void saveDialogSize(KConfigGroup &config, KConfigGroup::WriteConfigFlags options=KConfigGroup::Normal) const
Saves the dialog's size dependent on the screen dimension either to the global or application config ...
Definition: kdialog.cpp:1033
void setDefault(bool)
virtual void closeEvent(QCloseEvent *e)
Detects when a dialog is being closed from the window manager controls.
Definition: kdialog.cpp:1001
T readEntry(const QString &key, const T &aDefault) const
int lineSpacing() const
QFuture< T > mapped(const Sequence &sequence, MapFunction function)
height
void animateClick(int msec)
singleShot
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.