class KDialog

# class KDialog | Dialog with extended nonmodal support and methods for KDE standard compliance. More...
Definition | `#include <kdialog.h>`
Inherits | QDialog (qt) [public ]
Inherited by | KAboutApplication, KAboutDialog, KAboutKDE, KBugReport, KColorDialog, KDialogBase, KEdFind, KEdGotoLine, KEdReplace, KEditToolbar, KFontDialog, KKeyDialog, KLineEditDlg, KPasswordDialog, KProgressDialog, KShortcutDialog, KTipDialog
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KDialog (QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0)

#### Public Slots

- virtual void polish ()
- virtual void setCaption ( const QString &caption )
- virtual void setPlainCaption ( const QString &caption )

#### Signals

- void layoutHintChanged ()

#### Public Static Methods

- static int marginHint ()
- static int spacingHint ()
- static void resizeLayout ( QWidget *widget, int margin, int spacing )
- static void resizeLayout ( QLayoutItem *lay, int margin, int spacing )
- static void centerOnScreen ( QWidget *widget, int screen = -1 )

#### Protected Methods

- virtual void keyPressEvent (QKeyEvent*)
- virtual void virtual_hook ( int id, void* data )

## Detailed Description

Dialog with extended nonmodal support and methods for KDE standard compliance.

Generally, you should not use this class directly, but KDialogBase which inherits KDialog.

If the dialog is non-modal and has a parent, the default keybindings (`escape` = `reject`(), `enter` = `accept`(), etc.) are disabled.

The marginHint() and spacingHint() sizes shall be used whenever you layout the interior of a dialog. One special note. If you make your own action buttons (OK, Cancel etc), the space beteween the buttons shall be spacingHint(), whereas the space above, below, to the right and to the left shall be marginHint(). If you add a separator line above the buttons, there shall be a marginHint() between the buttons and the separator and a marginHint() above the separator as well.

See also: KDialogBase

KDialog (QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0) | ### KDialog

Constructor.

Takes the same arguments as QDialog.

int marginHint () | ### marginHint

[static]

Return the number of pixels you shall use between a dialog edge and the outermost widget(s) according to the KDE standard.

int spacingHint () | ### spacingHint

[static]

Return the number of pixels you shall use between widgets inside a dialog according to the KDE standard.

void resizeLayout ( QWidget *widget, int margin, int spacing ) | ### resizeLayout

[static]

Resize every layout manager used in `widget` and its nested children.

Parameters:

margin | The new layout margin.
margin | The new layout spacing.

void resizeLayout ( QLayoutItem *lay, int margin, int spacing ) | ### resizeLayout

[static]

Reszie every layout associated with `lay` and its children.

Parameters:

margin | The new layout margin
margin | The new layout spacing

void centerOnScreen ( QWidget *widget, int screen = -1 ) | ### centerOnScreen

[static]

Centers `widget` on the desktop, taking multi-head setups into account. If `screen` is -1, `widget` will be centered on its current screen (if it was shown already) or on the primary screen.

void polish () | ### polish

[virtual slot]

void setCaption ( const QString &caption ) | ### setCaption

[virtual slot]

Make a KDE compliant caption.

Parameters:

caption | Your caption. Do `not` include the application name in this string. It will be added automatically according to the KDE standard.

void setPlainCaption ( const QString &caption ) | ### setPlainCaption

[virtual slot]

Make a plain caption without any modifications.

Parameters:

caption | Your caption. This is the string that will be displayed in the window title.

void keyPressEvent (QKeyEvent*) | ### keyPressEvent

[protected virtual]

void layoutHintChanged () | ### layoutHintChanged

[signal]

Emitted when the margin size and/or spacing size have changed.

Use marginHint() and spacingHint() in your slot to get the new values.

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

- Version: 0.1.2
- Author: Thomas Tanghus , Espen Sand
- Generated: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:37 2003, using kdoc 2.0a54.