org.kde.koala

Class KDialog

public class KDialog extends QDialog

Dialog with extended non-modal 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 KDialogSignals for signals emitted by KDialog

Author: Thomas Tanghus , Espen Sand

See Also: KDialogBase

UNKNOWN: Dialog with extended non-modal support and methods for %KDE standard compliance.

Constructor Summary
protected KDialog(Class dummy)
KDialog(QWidget parent, String name, boolean modal, int f)
Constructor.
KDialog(QWidget parent, String name, boolean modal)
KDialog(QWidget parent, String name)
KDialog(QWidget parent)
KDialog()
Method Summary
static booleanavoidArea(QWidget widget, QRect area, int screen)
Places widget so that it doesn't cover a certain area of the screen.
static booleanavoidArea(QWidget widget, QRect area)
static voidcenterOnScreen(QWidget widget, int screen)
Centers widget on the desktop, taking multi-head setups into account.
static voidcenterOnScreen(QWidget widget)
StringclassName()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
protected voidkeyPressEvent(QKeyEvent arg1)
static intmarginHint()
Return the number of pixels you shall use between a dialog edge and the outermost widget(s) according to the KDE standard.
QMetaObjectmetaObject()
voidpolish()
If the dialog starts with focus in a QLineEdit child, then call selectAll() on the child.
static voidresizeLayout(QWidget widget, int margin, int spacing)
Resize every layout manager used in widget and its nested children.
static voidresizeLayout(QLayoutItemInterface lay, int margin, int spacing)
Resize every layout associated with lay and its children.
voidsetCaption(String caption)
Make a KDE compliant caption.
voidsetPlainCaption(String caption)
Make a plain caption without any modifications.
static intspacingHint()
Return the number of pixels you shall use between widgets inside a dialog according to the KDE standard.

Constructor Detail

KDialog

protected KDialog(Class dummy)

KDialog

public KDialog(QWidget parent, String name, boolean modal, int f)
Constructor. Takes the same arguments as QDialog.

UNKNOWN: Constructor.

KDialog

public KDialog(QWidget parent, String name, boolean modal)

KDialog

public KDialog(QWidget parent, String name)

KDialog

public KDialog(QWidget parent)

KDialog

public KDialog()

Method Detail

avoidArea

public static boolean avoidArea(QWidget widget, QRect area, int screen)
Places widget so that it doesn't cover a certain area of the screen. This is typically used by the "find dialog" so that the match it finds can be read. For screen, see centerOnScreen

Returns: true on success (widget doesn't cover area anymore, or never did), false on failure (not enough space found)

UNKNOWN: Places widget so that it doesn't cover a certain area of the screen.

avoidArea

public static boolean avoidArea(QWidget widget, QRect area)

centerOnScreen

public static void centerOnScreen(QWidget widget, int screen)
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. If screen is -3, widget will be centered on the screen that currently contains the mouse pointer. screen will be ignored if a merged display (like Xinerama) is not in use, or merged display placement is not enabled in kdeglobals.

UNKNOWN: Centers widget on the desktop, taking multi-head setups into account.

centerOnScreen

public static void centerOnScreen(QWidget widget)

className

public String className()

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

keyPressEvent

protected void keyPressEvent(QKeyEvent arg1)

UNKNOWN:

marginHint

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

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

metaObject

public QMetaObject metaObject()

polish

public void polish()
If the dialog starts with focus in a QLineEdit child, then call selectAll() on the child.

UNKNOWN: If the dialog starts with focus in a QLineEdit child, then call selectAll() on the child.

resizeLayout

public static void resizeLayout(QWidget widget, int margin, int spacing)
Resize every layout manager used in widget and its nested children.

Parameters: widget The widget used. margin The new layout margin. spacing The new layout spacing.

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

resizeLayout

public static void resizeLayout(QLayoutItemInterface lay, int margin, int spacing)
Resize every layout associated with lay and its children.

Parameters: lay layout to be resized margin The new layout margin spacing The new layout spacing

UNKNOWN: Resize every layout associated with lay and its children.

setCaption

public void setCaption(String caption)
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.

UNKNOWN: Make a KDE compliant caption.

setPlainCaption

public void setPlainCaption(String caption)
Make a plain caption without any modifications.

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

UNKNOWN: Make a plain caption without any modifications.

spacingHint

public static int spacingHint()
Return the number of pixels you shall use between widgets inside a dialog according to the KDE standard.

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