KDELibs4Support
kdialog.cpp
81 qWarning() << q->metaObject()->className() << "created with a layout; don't do that, KDialog takes care of it, use mainWidget or setMainWidget instead";
191 q->setPlainCaption(KGlobal::caption()); // set appropriate initial window title for case it gets not set later
200 : QDialog(parent, sAllowEmbeddingInGraphicsView ? flags : flags | Qt::BypassGraphicsProxyWidget), d_ptr(new KDialogPrivate)
206 : QDialog(parent, sAllowEmbeddingInGraphicsView ? flags : flags | Qt::BypassGraphicsProxyWidget), d_ptr(&dd)
526 NETWinInfo info(QX11Info::connection(), win->winId(), QX11Info::appRootWindow(), NET::Properties{}, NET::Properties2{});
601 && !(widget->windowFlags() & Qt::X11BypassWindowManagerHint) && widget->windowType() != Qt::Popup
1095 void KDialog::saveDialogSize(KConfigGroup &config, KConfigGroup::WriteConfigFlags options) const
void setHelpLinkText(const QString &text)
Sets the text that is shown as the linked text.
Definition: kdialog.cpp:1042
void adjustSize()
Qt::Orientation orientation() const const
virtual QLayoutItem * itemAt(int index) const const=0
AlignRight
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const const
int screenNumber(const QWidget *widget) const const
void setWhatsThis(const QString &)
void setParent(QWidget *parent)
void showButtonSeparator(bool state)
Hide or display the a separator line drawn between the action buttons an the main widget.
Definition: kdialog.cpp:669
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:1095
QWidget * window() const const
void setMenu(QMenu *menu)
KGuiItem no()
QDesktopWidget * desktop()
QFontMetrics fontMetrics() const const
QWidget(QWidget *parent, Qt::WindowFlags f)
QString fromUtf8(const char *str, int size)
pos
NoGlobals
virtual void reject()
virtual QLayout * layout() override
int right() const const
void setEscapeButton(ButtonCode id)
Sets the button that will be activated when the Escape key is pressed.
Definition: kdialog.cpp:309
void enableButtonCancel(bool state)
Enable or disable (gray out) the Cancel button.
Definition: kdialog.cpp:736
platformName
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:459
void setMargin(int margin)
void setButtonWhatsThis(ButtonCode id, const QString &text)
Sets the "What's this?" text of any button.
Definition: kdialog.cpp:836
void setDetailsWidget(QWidget *detailsWidget)
Sets the widget that gets shown when "Details" is enabled.
Definition: kdialog.cpp:866
rect
ButtonCode defaultButton() const
Returns the button code of the default button, or NoDefault if there is no default button.
Definition: kdialog.cpp:352
QLayout * layout() const const
void setButtonToolTip(ButtonCode id, const QString &text)
Sets the tooltip text of any button.
Definition: kdialog.cpp:814
virtual bool event(QEvent *event) override
QFontMetrics fontMetrics()
QFuture< typename QtPrivate::MapResultType< void, MapFunctor >::ResultType > mapped(const Sequence &sequence, MapFunctor function)
@ NoDefault
Used when specifying a default button; indicates that no button should be marked by default.
Definition: kdialog.h:152
int width() const const
QScreen * screen() const const
int x() const const
int y() const const
@ Ok
Show Ok button. (this button accept()s the dialog; result set to QDialog::Accepted)
Definition: kdialog.h:140
@ No
Show No button. (this button closes the dialog and sets the result to KDialog::No)
Definition: kdialog.h:145
void setButtonMenu(ButtonCode id, QMenu *menu, ButtonPopupMode popupmode=InstantPopup)
Sets the menu of any button.
Definition: kdialog.cpp:759
void setAttribute(Qt::WidgetAttribute attribute, bool on)
void setName(const char *name)
virtual void closeEvent(QCloseEvent *e) override
QPushButton * button(ButtonCode id) const
Returns the button that corresponds to the id.
Definition: kdialog.cpp:702
Definition: k4aboutdata.h:38
QString buttonWhatsThis(ButtonCode id) const
Returns the "What's this?" text of any button.
Definition: kdialog.cpp:848
const T & value() const const
bool isDetailsWidgetVisible() const
Returns the status of the Details button.
Definition: kdialog.cpp:887
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setEnabled(bool enable)
QWidget * focusWidget() const const
Qt::WindowType windowType() const const
int left() const const
void setButtonGuiItem(ButtonCode id, const KGuiItem &item)
Sets the KGuiItem directly for the button instead of using 3 methods to set the text,...
Definition: kdialog.cpp:749
void hide()
virtual int pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, const QWidget *widget) const const=0
KGuiItem close()
void setButtonIcon(ButtonCode id, const QIcon &icon)
Sets the icon of any button.
Definition: kdialog.cpp:796
void setRight(int x)
KGuiItem cancel()
@ Details
Show Details button. (this button will show the detail widget set with setDetailsWidget)
Definition: kdialog.h:148
void setButtonText(ButtonCode id, const QString &text)
Sets the text of any button.
Definition: kdialog.cpp:771
visible
typedef WindowFlags
bool intersects(const QRect &rectangle) const const
void deleteLater()
int bottom() const const
static void assign(QPushButton *button, const KGuiItem &item)
int top() const const
virtual QSize minimumSizeHint() const const override
const QRect availableGeometry(const QWidget *widget) const const
QString i18n(const char *text, const TYPE &arg...)
void restoreDialogSize(const KConfigGroup &config)
Restores the dialog's size from the configuration according to the screen size.
Definition: kdialog.cpp:1088
static QString makeStandardCaption(const QString &userCaption, QWidget *window=nullptr, CaptionFlags flags=HIGCompliantCaption)
Builds a caption that contains the application name along with the userCaption using a standard layou...
Definition: kdialog.cpp:474
int lineSpacing() const const
windowFlags
ButtonRole
virtual QLayout * layout()
void enableButton(ButtonCode id, bool state)
Enable or disable (gray out) a general action button.
Definition: kdialog.cpp:708
primaryScreen
void setBottom(int y)
void setDetailsWidgetVisible(bool visible)
Sets the status of the Details button.
Definition: kdialog.cpp:892
QHashIterator::Item next()
int numScreens() const const
static int groupSpacingHint()
Returns the number of pixels that should be used to visually separate groups of related options in a ...
Definition: kdialog.cpp:469
Horizontal
bool isEmpty() const const
QByteArray toUtf8() const const
static void resizeLayout(QWidget *widget, int margin, int spacing)
Resize every layout manager used in widget and its nested children.
Definition: kdialog.cpp:533
virtual void accept()
KGuiItem yes()
QueuedConnection
void animateClick(int msec)
virtual void setPlainCaption(const QString &caption)
Make a plain caption without any modifications.
Definition: kdialog.cpp:520
KDialog(QWidget *parent=nullptr, Qt::WindowFlags flags={})
Creates a dialog.
Definition: kdialog.cpp:199
virtual void done(int r)
Key_F1
QPoint pos()
bool testAttribute(Qt::WidgetAttribute attribute) const const
void setEnabled(bool)
PM_DefaultChildMargin
void show()
bool hasNext() const const
void closeEvent(QCloseEvent *e) override
Detects when a dialog is being closed from the window manager controls.
Definition: kdialog.cpp:1070
bool isButtonEnabled(ButtonCode id) const
Returns whether any button is enabled.
Definition: kdialog.cpp:716
bool isVirtualDesktop() const const
void setIcon(const QIcon &icon)
virtual void keyPressEvent(QKeyEvent *e) override
frameGeometry
QWindow * windowHandle() const const
height
int height() const const
void setToolTip(const QString &)
const char * constData() const const
static void centerOnScreen(QWidget *widget, int screen=-1)
Centers widget on the desktop, taking multi-head setups into account.
Definition: kdialog.cpp:593
bool isWidgetType() const const
KCONFIGGUI_EXPORT void restoreWindowSize(QWindow *window, const KConfigGroup &config)
QCA_EXPORT bool isSupported(const char *features, const QString &provider=QString())
void enterWhatsThisMode()
static int spacingHint()
Returns the number of pixels that should be used between widgets inside a dialog according to the KDE...
Definition: kdialog.cpp:464
void setButtonsOrientation(Qt::Orientation orientation)
Sets the orientation of the button box.
Definition: kdialog.cpp:293
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 setDefaultButton(ButtonCode id)
Sets the button that will be activated when the Enter key is pressed.
Definition: kdialog.cpp:314
void enableLinkedHelp(bool state)
Display or hide the help link area on the top of the dialog.
Definition: kdialog.cpp:1008
KGuiItem defaults()
void setContentsMargins(int left, int top, int right, int bottom)
void setButtonFocus(ButtonCode id)
Sets the focus to the button of the passed id.
Definition: kdialog.cpp:858
void setX(int x)
void setY(int y)
void setSpacing(int)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
KGuiItem reset()
void setDefault(bool)
void translate(int dx, int dy)
virtual void setCaption(const QString &caption)
Make a KDE compliant caption.
Definition: kdialog.cpp:502
void move(int x, int y)
@ Cancel
Show Cancel-button. (this button reject()s the dialog; result set to QDialog::Rejected)
Definition: kdialog.h:143
geometry
bool activate()
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:613
KGuiItem ok()
@ Yes
Show Yes button. (this button closes the dialog and sets the result to KDialog::Yes)
Definition: kdialog.h:146
void setHelp(const QString &anchor, const QString &appname=QString())
Sets the help path and topic.
Definition: kdialog.cpp:1035
void invokeHelp(const QString &anchor=QString(), const QString &appname=QString())
bool isHidden() const const
void setButtons(ButtonCodes buttonMask)
Creates (or recreates) the button box and all the buttons in it.
Definition: kdialog.cpp:216
width
KGuiItem apply()
static void setAllowEmbeddingInGraphicsView(bool allowEmbedding)
Allow embedding the dialogs based on KDialog into a graphics view.
Definition: kdialog.cpp:1101
ShiftModifier
QFuture< void > map(Sequence &sequence, MapFunctor function)
QString buttonToolTip(ButtonCode id) const
Returns the tooltip of any button.
Definition: kdialog.cpp:826
void setFocus()
void enableButtonOk(bool state)
Enable or disable (gray out) the OK button.
Definition: kdialog.cpp:726
size
const Key & key() const const
void setText(const QString &text)
WA_DeleteOnClose
virtual void slotButtonClicked(int button)
Activated when the button button is clicked.
Definition: kdialog.cpp:943
QStyle * style()
Q_D(Todo)
void showButton(ButtonCode id, bool state)
Hide or display a general action button.
Definition: kdialog.cpp:741
const QObjectList & children() const const
virtual QSize sizeHint() const const override
void enableButtonApply(bool state)
Enable or disable (gray out) the Apply button.
Definition: kdialog.cpp:731
KGuiItem help()
KCONFIGGUI_EXPORT void saveWindowSize(const QWindow *window, KConfigGroup &config, KConfigGroup::WriteConfigFlags options=KConfigGroup::Normal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Dec 7 2023 03:56:48 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Dec 7 2023 03:56:48 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.