org.kde.koala
public class KDialogBase extends KDialog
TreeList
/Paged, Tabbed
, Plain
, Swallow
and IconList
mode layouts (faces) are available.
The class takes care of the geometry management. You only need to define
a minimum size for the widget you want to use as the main widget.
You can set a background tile (pixmap) for parts of the dialog. The
tile you select is shared by all instances of this class in your
application so that they all get the same look and feel.
There is a tutorial available on http://developer.kde.org/ (NOT YET)
that contains
copy/paste examples as well a screenshots on how to use this class.
UrlDlg.UrlDlg( QWidget parent, String caption, String urltext) { QWidget page = new QWidget( this ); setMainWidget(page); QVBoxLayout topLayout = new QVBoxLayout( page, 0, spacingHint() ); QLabel label = new QLabel( caption, page, "caption" ); topLayout.addWidget( label ); lineedit = new QLineEdit( urltext, page, "lineedit" ); lineedit.setMinimumWidth(fontMetrics().maxWidth()*20); topLayout.addWidget( lineedit ); topLayout.addStretch(10); }If you use makeVBoxMainWidget(), then the dialog above can be made simpler but you lose the ability to add a stretchable area:
UrlDlg.UrlDlg( QWidget parent, String caption, String urltext) { QVBox page = makeVBoxMainWidget(); QLabel label = new QLabel( caption, page, "caption" ); lineedit = new QLineEdit( urltext, page, "lineedit" ); lineedit.setMinimumWidth(fontMetrics().maxWidth()*20); }This class can be used in many ways. Note that most KDE ui widgets and many of KDE core applications use the KDialogBase so for more inspiration you should study the code for these. See KDialogBaseSignals for signals emitted by KDialogBase
UNKNOWN: A dialog base class with standard buttons and predefined layouts.
Field Summary | |
---|---|
static int | ActionStyle0 |
static int | ActionStyle1 |
static int | ActionStyle2 |
static int | ActionStyle3 |
static int | ActionStyle4 |
static int | ActionStyleMAX |
static int | Apply |
static int | Cancel |
static int | Close |
static int | Default |
static int | Details |
static int | Filler |
static int | Help |
static int | IconList |
static int | No |
static int | NoDefault |
static int | Ok |
static int | Plain |
static int | Stretch |
static int | Swallow |
static int | Tabbed |
static int | TreeListTreeList - A dialog with a tree on the left side and a
representation of the contents on the right side.
|
static int | Try |
static int | User1 |
static int | User2 |
static int | User3 |
static int | Yes |
Constructor Summary | |
---|---|
protected | KDialogBase(Class dummy) |
KDialogBase(QWidget parent, String name, boolean modal, String caption, int buttonMask, int defaultButton, boolean separator, KGuiItem user1, KGuiItem user2, KGuiItem user3)
Constructor for the standard mode where you must specify the main
widget with setMainWidget() . | |
KDialogBase(QWidget parent, String name, boolean modal, String caption, int buttonMask, int defaultButton, boolean separator, KGuiItem user1, KGuiItem user2) | |
KDialogBase(QWidget parent, String name, boolean modal, String caption, int buttonMask, int defaultButton, boolean separator, KGuiItem user1) | |
KDialogBase(QWidget parent, String name, boolean modal, String caption, int buttonMask, int defaultButton, boolean separator) | |
KDialogBase(QWidget parent, String name, boolean modal, String caption, int buttonMask, int defaultButton) | |
KDialogBase(QWidget parent, String name, boolean modal, String caption, int buttonMask) | |
KDialogBase(QWidget parent, String name, boolean modal, String caption) | |
KDialogBase(QWidget parent, String name, boolean modal) | |
KDialogBase(QWidget parent, String name) | |
KDialogBase(QWidget parent) | |
KDialogBase() | |
KDialogBase(int dialogFace, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal, boolean separator, KGuiItem user1, KGuiItem user2, KGuiItem user3)
In KDE4 a WFlag paramater should be added after modal and next
function can be removed.
| |
KDialogBase(int dialogFace, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal, boolean separator, KGuiItem user1, KGuiItem user2) | |
KDialogBase(int dialogFace, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal, boolean separator, KGuiItem user1) | |
KDialogBase(int dialogFace, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal, boolean separator) | |
KDialogBase(int dialogFace, String caption, int buttonMask, int defaultButton, QWidget parent, String name, boolean modal) | |
KDialogBase(int dialogFace, String caption, int buttonMask, int defaultButton, QWidget parent, String name) | |
KDialogBase(int dialogFace, String caption, int buttonMask, int defaultButton, QWidget parent) | |
KDialogBase(int dialogFace, String caption, int buttonMask, int defaultButton) | |
KDialogBase(int dialogFace, int f, QWidget parent, String name, boolean modal, String caption, int buttonMask, int defaultButton, boolean separator, KGuiItem user1, KGuiItem user2, KGuiItem user3)
Constructor for the predefined layout mode where you specify the
kind of layout (face). | |
KDialogBase(int dialogFace, int f, QWidget parent, String name, boolean modal, String caption, int buttonMask, int defaultButton, boolean separator, KGuiItem user1, KGuiItem user2) | |
KDialogBase(int dialogFace, int f, QWidget parent, String name, boolean modal, String caption, int buttonMask, int defaultButton, boolean separator, KGuiItem user1) | |
KDialogBase(int dialogFace, int f, QWidget parent, String name, boolean modal, String caption, int buttonMask, int defaultButton, boolean separator) | |
KDialogBase(int dialogFace, int f, QWidget parent, String name, boolean modal, String caption, int buttonMask, int defaultButton) | |
KDialogBase(int dialogFace, int f, QWidget parent, String name, boolean modal, String caption, int buttonMask) | |
KDialogBase(int dialogFace, int f, QWidget parent, String name, boolean modal, String caption) | |
KDialogBase(int dialogFace, int f, QWidget parent, String name, boolean modal) | |
KDialogBase(int dialogFace, int f, QWidget parent, String name) | |
KDialogBase(int dialogFace, int f, QWidget parent) | |
KDialogBase(int dialogFace, int f) | |
KDialogBase(String caption, int buttonMask, int defaultButton, int escapeButton, QWidget parent, String name, boolean modal, boolean separator, KGuiItem yes, KGuiItem no, KGuiItem cancel)
Constructor for a message box mode where the buttonMask can only
contain Yes, No, or Cancel.
| |
KDialogBase(String caption, int buttonMask, int defaultButton, int escapeButton, QWidget parent, String name, boolean modal, boolean separator, KGuiItem yes, KGuiItem no) | |
KDialogBase(String caption, int buttonMask, int defaultButton, int escapeButton, QWidget parent, String name, boolean modal, boolean separator, KGuiItem yes) | |
KDialogBase(String caption, int buttonMask, int defaultButton, int escapeButton, QWidget parent, String name, boolean modal, boolean separator) | |
KDialogBase(String caption, int buttonMask, int defaultButton, int escapeButton, QWidget parent, String name, boolean modal) | |
KDialogBase(String caption, int buttonMask, int defaultButton, int escapeButton, QWidget parent, String name) | |
KDialogBase(String caption, int buttonMask, int defaultButton, int escapeButton, QWidget parent) | |
KDialogBase(String caption, int buttonMask, int defaultButton, int escapeButton) | |
KDialogBase(String caption, int buttonMask, int defaultButton) | |
KDialogBase(String caption, int buttonMask) | |
KDialogBase(String caption) |
Method Summary | |
---|---|
QPushButton | actionButton(int id)
Returns the action button that corresponds to the id.
Normally
you should not use this function. |
int | activePageIndex()
Returns the index of the active page.
|
void | addButtonBelowList(String text, QObject recv, String slot)
Add a button at the bottom of the TreeList/IconList. |
void | addButtonBelowList(KGuiItem guiitem, QObject recv, String slot)
The same as the above function, but with a KGuiItem providing the text
and icon for the button at the bottom of the TreeList/IconList. |
QGrid | addGridPage(int n, int dir, String itemName, String header, QPixmap pixmap)
Add a page to the dialog when the class is used in TreeList ,
IconList or Tabbed mode.
|
QGrid | addGridPage(int n, int dir, String itemName, String header) |
QGrid | addGridPage(int n, int dir, String itemName) |
QGrid | addGridPage(int n, int dir, String[] items, String header, QPixmap pixmap)
This is like addGridPage() just above, with the difference
that the first element is a list of strings.
|
QGrid | addGridPage(int n, int dir, String[] items, String header) |
QGrid | addGridPage(int n, int dir, String[] items) |
QHBox | addHBoxPage(String itemName, String header, QPixmap pixmap)
Add a page to the dialog when the class is used in TreeList ,
IconList or Tabbed mode.
|
QHBox | addHBoxPage(String itemName, String header) |
QHBox | addHBoxPage(String itemName) |
QHBox | addHBoxPage(String[] items, String header, QPixmap pixmap)
This is like addHBoxPage() just above, with the
difference that the first element is a list of strings.
|
QHBox | addHBoxPage(String[] items, String header) |
QHBox | addHBoxPage(String[] items) |
QFrame | addPage(String itemName, String header, QPixmap pixmap)
Add a page to the dialog when the class is used in TreeList ,
IconList or Tabbed mode.
|
QFrame | addPage(String itemName, String header) |
QFrame | addPage(String itemName) |
QFrame | addPage(String[] items, String header, QPixmap pixmap)
This is like addPage() just above, with the difference that the first
element is a list of strings.
|
QFrame | addPage(String[] items, String header) |
QFrame | addPage(String[] items) |
QVBox | addVBoxPage(String itemName, String header, QPixmap pixmap)
Add a page to the dialog when the class is used in TreeList ,
IconList or Tabbed mode.
|
QVBox | addVBoxPage(String itemName, String header) |
QVBox | addVBoxPage(String itemName) |
QVBox | addVBoxPage(String[] items, String header, QPixmap pixmap)
This is like addVBoxPage() just above, with the difference
that the first element is a list of strings.
|
QVBox | addVBoxPage(String[] items, String header) |
QVBox | addVBoxPage(String[] items) |
void | addWidgetBelowList(QWidget widget)
Add a widget at the bottom of the TreeList/IconList. |
void | adjustSize()
Adjust the size of the dialog to fit the contents just before
QDialog.exec() or QDialog.show() is called.
|
static QPixmap | backgroundTile()
Returns a pointer to the background tile if there is one. |
QSize | calculateSize(int w, int h)
Calculate the size hint for the dialog.
|
void | cancel()
Force closing the dialog, setting its result code to the one Esc would set.
|
String | className() |
protected void | closeEvent(QCloseEvent e)
Detects when a dialog is being closed from the window manager
controls. |
QSize | configDialogSize(String groupName)
read the dialogs size from the configuration according to the screen size.
|
QSize | configDialogSize(KConfig config, String groupName)
read the dialogs size from the configuration according to the screen size.
|
void | delayedDestruct()
Destruct the Dialog delayed.
|
void | disableResize()
Convenience method.
|
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
void | enableButton(int id, boolean state)
Enable or disable (gray out) a general action button. |
void | enableButtonApply(boolean state)
Enable or disable (gray out) the Apply button. |
void | enableButtonCancel(boolean state)
Enable or disable (gray out) the Cancel button. |
void | enableButtonOK(boolean state)
Enable or disable (gray out) the OK button. |
void | enableButtonSeparator(boolean state)
Hide or display the a separator line drawn between the action
buttons an the main widget. |
void | enableLinkedHelp(boolean state)
Display or hide the help link area on the top of the dialog. |
protected void | finalize() Deletes the wrapped C++ instance |
static boolean | haveBackgroundTile()
Check whether the background tile is set or not. |
void | helpClickedSlot(String arg1)
Connected to help link label. |
String | helpLinkText()
Returns the help link text.
|
protected void | hideEvent(QHideEvent arg1)
Emits the #hidden signal. |
void | incInitialSize(QSize s, boolean noResize)
Convenience method. |
void | incInitialSize(QSize s) |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
protected void | keyPressEvent(QKeyEvent e)
Maps some keys to the actions buttons. |
QWidget | mainWidget()
Returns the main widget if any. |
QGrid | makeGridMainWidget(int n, int dir)
Make a main widget.
|
QHBox | makeHBoxMainWidget()
Make a main widget.
|
QFrame | makeMainWidget()
Make a main widget.
|
QVBox | makeVBoxMainWidget()
Make a main widget.
|
QMetaObject | metaObject() |
QSize | minimumSizeHint() |
int | pageIndex(QWidget widget)
Returns the index of a page created with addPage(),
addVBoxPage(), addHBoxPage() or addGridPage().
|
QFrame | plainPage()
Retrieve the empty page when the predefined layout is used in Plain
mode.
|
void | saveDialogSize(String groupName, boolean global)
save the dialogs size dependant on the screen dimension either to the
global or application config file. |
void | saveDialogSize(String groupName) |
void | saveDialogSize(KConfig config, String groupName, boolean global)
save the dialogs size dependant on the screen dimension. |
void | saveDialogSize(KConfig config, String groupName) |
static void | setBackgroundTile(QPixmap pix)
Sets the background tile.
|
void | setButtonApply(KGuiItem item)
Sets the appearance of the Apply button.
|
void | setButtonApply() |
void | setButtonBoxOrientation(int orientation)
Sets the orientation of the button box.
|
void | setButtonCancel(KGuiItem item)
Sets the appearance of the Cancel button.
|
void | setButtonCancel() |
void | setButtonGuiItem(int id, KGuiItem item)
Sets the KGuiItem directly for the button instead of using 3 methods to
set the text, tooltip and whatsthis strings. |
void | setButtonOK(KGuiItem item)
Sets the appearance of the OK button.
|
void | setButtonOK() |
void | setButtonText(int id, String text)
Sets the text of any button. |
void | setButtonTip(int id, String text)
Sets the tooltip text of any button. |
void | setButtonWhatsThis(int id, String text)
Sets the "What's this? |
void | setDetails(boolean showDetails)
Sets the status of the Details button. |
void | setDetailsWidget(QWidget detailsWidget)
Sets the widget that gets shown when "Details" is enabled.
|
void | setEscapeButton(int id)
Sets the button that will be activated when the Escape key
is pressed.
|
void | setFolderIcon(String[] path, QPixmap pixmap)
Sets the icon used in TreeList Mode for the given path. |
void | setHelp(String anchor, String appname)
Sets the help path and topic. |
void | setHelp(String anchor) |
void | setHelpLinkText(String text)
Sets the text that is shown as the linked text.
|
void | setIconListAllVisible(boolean state)
This function has only effect in IconList mode.
|
void | setInitialSize(QSize s, boolean noResize)
Convenience method. |
void | setInitialSize(QSize s) |
void | setMainWidget(QWidget widget)
Sets the main user definable widget.
|
void | setRootIsDecorated(boolean state)
This function has only effect in TreeList mode.
|
void | setShowIconsInTreeList(boolean state)
This function has only effect in TreeList mode.
|
void | setTreeListAutoResize(boolean state)
This function has only effect in TreeList mode.
|
void | showButton(int id, boolean state)
Hide or display a general action button.
|
void | showButtonApply(boolean state)
Hide or display the Apply button.
|
void | showButtonCancel(boolean state)
Hide or display the Cancel button. |
void | showButtonOK(boolean state)
Hide or display the OK button.
|
boolean | showPage(int index)
Sets the page with index to be displayed.
|
void | showTile(boolean state)
Enable hiding of the background tile (if any). |
QSize | sizeHint() |
protected void | slotApply()
Activated when the Apply button has been clicked. |
protected void | slotCancel()
Activated when the Cancel button has been clicked. |
protected void | slotClose()
Activated when the Close button has been clicked. |
protected void | slotDefault()
Activated when the Default button has been clicked. |
protected void | slotDelayedDestruct()
Deletes the dialog immediately. |
protected void | slotDetails()
Activated when the Details button has been clicked. |
protected void | slotHelp()
Activated when the Help button has been clicked. |
protected void | slotNo()
Activated when the Yes button has been clicked. |
protected void | slotOk()
Activated when the Ok button has been clicked. |
protected void | slotTry()
Activated when the Try button has been clicked. |
protected void | slotUser1()
Activated when the User1 button has been clicked. |
protected void | slotUser2()
Activated when the User2 button has been clicked. |
protected void | slotUser3()
Activated when the User3 button has been clicked. |
protected void | slotYes()
Activated when the Yes button has been clicked. |
void | unfoldTreeList(boolean persist)
This function has only effect in TreeList mode.
|
void | unfoldTreeList() |
void | updateBackground()
This method is called automatically whenever the background has
changed. |
void | updateGeometry()
Updates the margins and spacings. |
TreeList
- A dialog with a tree on the left side and a
representation of the contents on the right side.
Tabbed
- A dialog using a QTabWidget.
Plain
- A normal dialog. Use plainPage() as parent for widgets.
Swallow
- Simplifes the usage of existing widgets. You specify
the widget to be displayed by setMainWidget().
IconList
- A dialog with an iconlist on the left side and a
representation of the contents on the right side.
Parameters: parent Parent of the dialog. name Dialog name (for internal use only) modal Controls dialog modality. If false
, the rest of the
program interface (example: other dialogs) is accessible while
the dialog is open. caption The dialog caption. Do not specify the application name
here. The class will take care of that. buttonMask Specifies which buttons will be visible. If zero
(0) no button box will be made. defaultButton Specifies which button will be marked as
the default. Use ButtonCode.NoDefault to indicate that no button
should be marked as the default button. separator If true
, a separator line is drawn between the
action buttons and the main widget. user1 User button1 item. user2 User button2 item. user3 User button3 item.
UNKNOWN: Constructor for the standard mode where you must specify the main widget with setMainWidget() .
Parameters: dialogFace You can use TreeList, Tabbed, Plain, Swallow or
IconList. caption The dialog caption. Do not specify the application name
here. The class will take care of that. buttonMask Specifies which buttons will be visible. If zero
(0) no button box will be made. defaultButton Specifies which button will be marked as
the default. Use ButtonCode.NoDefault to indicate that no button
should be marked as the default button. parent Parent of the dialog. name Dialog name (for internal use only). modal Controls dialog modality. If false
, the rest of the
program interface (example: other dialogs) is accessible while
the dialog is open. separator If true
, a separator line is drawn between the
action buttons and the main widget. user1 User button1 text item. user2 User button2 text item. user3 User button3 text item.
UNKNOWN: In KDE4 a WFlag paramater should be added after modal and next function can be removed.
Parameters: dialogFace You can use TreeList, Tabbed, Plain, Swallow or
IconList. f widget flags, by default it is just set to WStyle_DialogBorder. caption The dialog caption. Do not specify the application name
here. The class will take care of that. parent Parent of the dialog. name Dialog name (for internal use only). modal Controls dialog modality. If false
, the rest of the
program interface (example: other dialogs) is accessible while
the dialog is open. buttonMask Specifies which buttons will be visible. If zero
(0) no button box will be made. defaultButton Specifies which button will be marked as
the default. Use ButtonCode.NoDefault to indicate that no button
should be marked as the default button. separator If true
, a separator line is drawn between the
action buttons and the main widget. user1 User button1 text item. user2 User button2 text item. user3 User button3 text item.
UNKNOWN: Constructor for the predefined layout mode where you specify the kind of layout (face).
buttonMask
can only
contain Yes, No, or Cancel.
If you need other names you can rename
the buttons with setButtonText(). The dialog box is not resizable
by default but this can be changed by setInitialSize(). If you
select 'modal' to be true, the dialog will return Yes, No, or Cancel
when closed otherwise you can use the signals yesClicked(),
noClicked(), or cancelClicked() to determine the state.Parameters: caption The dialog caption. Do not specify the application name
here. The class will take care of that. buttonMask Specifies which buttons will be visible. If zero
(0) no button box will be made. defaultButton Specifies which button will be marked as
the default. Use ButtonCode.NoDefault to indicate that no button
should be marked as the default button. escapeButton Specifies which button will be activated by
when the dialog receives a Key_Escape
keypress. parent Parent of the dialog. name Dialog name (for internal use only). modal Controls dialog modality. If false
, the rest of the
program interface (example: other dialogs) is accessible
while the dialog is open. separator If true
, a separator line is drawn between the
action buttons and the main widget. yes Text to use for the first button (defaults to i18n("Yes")) no Text to use for the second button (defaults to i18n("No")) cancel Text to use for the third button (defaults to i18n("Cancel"))
UNKNOWN: Constructor for a message box mode where the buttonMask
can only contain Yes, No, or Cancel.
id.
Normally
you should not use this function. Never delete the object returned
by this function. See also enableButton(), showButton(),
setButtonTip(), setButtonWhatsThis(), and setButtonText().Parameters: id Integer identifier of the button. FIXME KDE 4: Return the actual KPushButton instead of QPushButton (Martijn)
Returns: The action button or 0 if the button does not exists.
UNKNOWN: Returns the action button that corresponds to the id.
Returns: The page index or -1 if there is no active page.
UNKNOWN: Returns the index of the active page.
Parameters: text The text on the PushButton. recv The object that is to receive the signal when the button is clicked. slot The slot to connect to the clicked signal of the button.
UNKNOWN: Add a button at the bottom of the TreeList/IconList.
Parameters: guiitem The text and icon on the PushButton. recv The object that is to receive the signal when the button is clicked. slot The slot to connect to the clicked signal of the button.
UNKNOWN: The same as the above function, but with a KGuiItem providing the text and icon for the button at the bottom of the TreeList/IconList.
TreeList
,
IconList
or Tabbed
mode.
The returned widget must be used as the
toplevel widget for this particular page. The widget contains a
QGridLayout layout so the widget children are positioned in a grid.Parameters: n Specifies the number of columns if dir
is Qt.Horizontal
or the number of rows if dir
is Qt.Vertical. dir Can be Qt.Horizontal or Qt.Vertical. itemName String used in the list or as tab item name. header Header text use in the list modes Ignored
in Tabbed
mode. If empty, the item text is used instead. pixmap Used in IconList
mode. You should prefer a pixmap
with size 32x32 pixels.
Returns: The page widget which must be used as the toplevel widget for the page.
UNKNOWN: Add a page to the dialog when the class is used in TreeList
, IconList
or Tabbed
mode.
TreeList
face. Later this may
be added for the IconList
face too. In other faces than the
TreeList
, all the strings except the last one is ignored.UNKNOWN: This is like addGridPage() just above, with the difference that the first element is a list of strings.
TreeList
,
IconList
or Tabbed
mode.
The returned widget must be used as the
toplevel widget for this particular page. The widget contains a
QHBoxLayout layout so the widget children are lined up horizontally.
You can use it as follows:Parameters: itemName String used in the list or as tab item name. header Header text use in the list modes. Ignored in Tabbed mode. If empty, the item text is used instead. pixmap Used in IconList mode. You should prefer a pixmap with size 32x32 pixels.
Returns: The page widget which must be used as the toplevel widget for the page.
UNKNOWN: Add a page to the dialog when the class is used in TreeList
, IconList
or Tabbed
mode.
TreeList
face. Later this may
be added for the IconList
face too. In other faces than the
TreeList
, all the strings except the last one is ignored.UNKNOWN: This is like addHBoxPage() just above, with the difference that the first element is a list of strings.
TreeList
,
IconList
or Tabbed
mode.
The returned widget must be used as the
toplevel widget for this particular page.
Note: The returned frame widget has no
layout manager associated with it. In order to use it you must
create a layout yourself as the example below illustrates:
QFrame page = addPage( i18n("Layout") ); QVBoxLayout topLayout = new QVBoxLayout( page, 0, KDialog.spacingHint() ); QLabel label = new QLabel( i18n("Layout type"), page ); topLayout.addWidget( label ); ..
Parameters: itemName String used in the list or as tab item name. header Header text use in the list modes. Ignored in Tabbed
mode. If empty, the item text is used instead. pixmap Used in IconList
mode. You should prefer a pixmap
with size 32x32 pixels.
Returns: The page widget which must be used as the toplevel widget for the page.
UNKNOWN: Add a page to the dialog when the class is used in TreeList
, IconList
or Tabbed
mode.
TreeList
face. Later this may
be added for the IconList
face too. In other faces than the
TreeList
, all the strings except the last one is ignored.UNKNOWN: This is like addPage() just above, with the difference that the first element is a list of strings.
TreeList
,
IconList
or Tabbed
mode.
The returned widget must be used as the toplevel widget for
this particular page. The widget contains a QVBoxLayout
layout so the widget children are lined up vertically. You can
use it as follows:
QVBox page = addVBoxPage( i18n("Layout") ); QLabel label = new QLabel( i18n("Layout type"), page ); ..
Parameters: itemName String used in the list or as tab item name. header Header text use in the list modes. Ignored in Tabbed
mode. If empty, the item text is used instead. pixmap Used in IconList
mode. You should prefer a pixmap
with size 32x32 pixels.
Returns: The page widget which must be used as the toplevel widget for the page.
UNKNOWN: Add a page to the dialog when the class is used in TreeList
, IconList
or Tabbed
mode.
TreeList
face. Later this may
be added for the IconList
face too. In other faces than the
TreeList
, all the strings except the last one is ignored.UNKNOWN: This is like addVBoxPage() just above, with the difference that the first element is a list of strings.
Parameters: widget The widget to be added. It will be reparented into the KJanusWidget, therefor it will be deleted with the KJanusWidget, too. To be on the save side just don't keep the pointer to this widget.
UNKNOWN: Add a widget at the bottom of the TreeList/IconList.
UNKNOWN: Adjust the size of the dialog to fit the contents just before QDialog.exec() or QDialog.show() is called.
Returns: The tile pointer or 0 if no tile is defined.
UNKNOWN: Returns a pointer to the background tile if there is one.
Parameters: w The width of you special widget. h The height of you special widget.
Returns: The minimum width and height of the dialog using w
and h
as the size of the main widget.
UNKNOWN: Calculate the size hint for the dialog.
UNKNOWN: Force closing the dialog, setting its result code to the one Esc would set.
UNKNOWN: Detects when a dialog is being closed from the window manager controls.
Parameters: groupName Name of the group to read from. The old group of KGlobal.config is preserved.
UNKNOWN: read the dialogs size from the configuration according to the screen size.
Parameters: config The KConfig object to read from groupName Name of the group to read from. The old group of KGlobal.config is preserved.
UNKNOWN: read the dialogs size from the configuration according to the screen size.
UNKNOWN: Destruct the Dialog delayed.
UNKNOWN: Convenience method.
Parameters: id Button identifier. state true
enables the button(s).
UNKNOWN: Enable or disable (gray out) a general action button.
Parameters: state true enables the button.
UNKNOWN: Enable or disable (gray out) the Apply button.
Parameters: state true enables the button.
UNKNOWN: Enable or disable (gray out) the Cancel button.
Parameters: state true
enables the button.
UNKNOWN: Enable or disable (gray out) the OK button.
UNKNOWN: Hide or display the a separator line drawn between the action buttons an the main widget.
Parameters: state true
will display the area.
UNKNOWN: Display or hide the help link area on the top of the dialog.
Returns: true
if there is defined a background tile.
UNKNOWN: Check whether the background tile is set or not.
UNKNOWN: Connected to help link label.
Returns: The help link text.
UNKNOWN: Returns the help link text.
UNKNOWN: Emits the #hidden signal.
Parameters: s Size added to minimum size. noResize If true
the dialog cannot be resized.
UNKNOWN: Convenience method.
UNKNOWN: Maps some keys to the actions buttons.
Returns: The current main widget. Can be 0 if no widget has been defined.
UNKNOWN: Returns the main widget if any.
Parameters: n Specifies the number of columns if 'dir' is Qt.Horizontal or the number of rows if 'dir' is Qt.Vertical. dir Can be Qt.Horizontal or Qt.Vertical.
Returns: The main widget or 0 if any of the rules described above were broken.
UNKNOWN: Make a main widget.
not
if you have used the
constructor where you define the face (Plain
, Swallow
, Tabbed
,
TreeList
, IconList
).Returns: The main widget or 0 if any of the rules described above were broken.
UNKNOWN: Make a main widget.
Plain
, Swallow
, Tabbed
,
TreeList
).Returns: The main widget or 0 if any of the rules described above were broken.
UNKNOWN: Make a main widget.
Plain
, Swallow
, Tabbed
,
TreeList
, IconList
).Returns: The main widget or 0 if any of the rules described above were broken.
UNKNOWN: Make a main widget.
Parameters: widget The widget returned by addPage(), addVBoxPage(), addHBoxPage() or addGridPage().
Returns: The index or -1 if the face is not Tabbed, TreeList or IconList
UNKNOWN: Returns the index of a page created with addPage(), addVBoxPage(), addHBoxPage() or addGridPage().
Plain
mode.
This widget must be used as the toplevel widget of your dialog
code.Returns: The widget or 0 if the predefined layout mode is not Plain
or if you don't use any predefined layout.
UNKNOWN: Retrieve the empty page when the predefined layout is used in Plain
mode.
Parameters: groupName The group to which the dialogs size is saved. See configDialogSize to read the size. global Set to true if the entry should go to the global config rather than to the applications config. Default is false.
UNKNOWN: save the dialogs size dependant on the screen dimension either to the global or application config file.
Parameters: config The KConfig object to write to. groupName The group to which the dialogs size is saved. See configDialogSize to read the size. global Set to true if the entry should go to the global config. Default is false.
UNKNOWN: save the dialogs size dependant on the screen dimension.
Parameters: pix The background tile.
UNKNOWN: Sets the background tile.
Parameters: item KGuiItem.
UNKNOWN: Sets the appearance of the Apply button.
Vertical
or Horizontal.
If Horizontal
(default), the button box is positioned at the bottom of the
dialog. If Vertical
it will be placed at the right edge of the
dialog.Parameters: orientation The button box orientation.
UNKNOWN: Sets the orientation of the button box.
Parameters: item KGuiItem.
UNKNOWN: Sets the appearance of the Cancel button.
Parameters: id The button identifier. item The KGuiItem for the button.
UNKNOWN: Sets the KGuiItem directly for the button instead of using 3 methods to set the text, tooltip and whatsthis strings.
Parameters: item KGuiItem.
UNKNOWN: Sets the appearance of the OK button.
Parameters: id The button identifier. text Button text.
UNKNOWN: Sets the text of any button.
Parameters: id The button identifier. text Button text.
UNKNOWN: Sets the tooltip text of any button.
Parameters: id The button identifier. text Button text.
UNKNOWN: Sets the "What's this?" text of any button.
UNKNOWN: Sets the status of the Details button.
UNKNOWN: Sets the widget that gets shown when "Details" is enabled.
Parameters: id The button code.
UNKNOWN: Sets the button that will be activated when the Escape key is pressed.
TreeList
Mode for the given path.Parameters: path The path for which this icon should be shown. pixmap The icon used.
UNKNOWN: Sets the icon used in TreeList
Mode for the given path.
Parameters: anchor Defined anchor in your docbook sources appname Defines the appname the help belongs to If empty it's the current one
UNKNOWN: The help button works differently for the class KCMultiDialog, so it does not make sense to call this function for Dialogs of that type. See KCMultiDialog.slotHelp() for more information. Sets the help path and topic.
Parameters: text The link text.
UNKNOWN: Sets the text that is shown as the linked text.
Parameters: state The visibility mode. If true, the minimum height is adjusted so that every icon in the list is visible at the same time. The vertical scrollbar will never be visible.
UNKNOWN: This function has only effect in IconList mode.
Parameters: s Startup size. noResize If true
the dialog cannot be resized.
UNKNOWN: Convenience method.
widget
must have the
dialog as parent.Parameters: widget The widget to be displayed as main widget. If it is 0, then the dialog will show an empty space of 100x100 pixels instead.
UNKNOWN: Sets the main user definable widget.
Parameters: state Root will be decorated if true.
UNKNOWN: This function has only effect in TreeList mode.
Parameters: state If true the icons are shown.
UNKNOWN: This function has only effect in TreeList mode.
Parameters: state The resize mode. If false (default) the tree list keeps its current width when the dialog becomes wider.
UNKNOWN: This function has only effect in TreeList mode.
Parameters: id Button identifier. state true display the button(s).
UNKNOWN: Hide or display a general action button.
Parameters: state true display the button(s).
UNKNOWN: Hide or display the Apply button.
Parameters: state true
display the button(s).
UNKNOWN: Hide or display the Cancel button.
Parameters: state If true
, display the button(s).
UNKNOWN: Hide or display the OK button.
index
to be displayed.
This method will only
work when the dialog is using the predefined shape of TreeList,
IconList or Tabbed.Parameters: index Index of the page to be shown.
Returns: true
if the page is shown, false
otherwise.
UNKNOWN: Sets the page with index
to be displayed.
Parameters: state true
will make the tile visible.
UNKNOWN: Enable hiding of the background tile (if any).
UNKNOWN: Activated when the Apply button has been clicked.
UNKNOWN: Activated when the Cancel button has been clicked.
UNKNOWN: Activated when the Close button has been clicked.
UNKNOWN: Activated when the Default button has been clicked.
UNKNOWN: Deletes the dialog immediately.
See Also: KDialogBase
UNKNOWN: Activated when the Details button has been clicked.
UNKNOWN: Activated when the Help button has been clicked.
UNKNOWN: Activated when the Yes button has been clicked.
UNKNOWN: Activated when the Ok button has been clicked.
UNKNOWN: Activated when the Try button has been clicked.
UNKNOWN: Activated when the User1 button has been clicked.
UNKNOWN: Activated when the User2 button has been clicked.
UNKNOWN: Activated when the User3 button has been clicked.
UNKNOWN: Activated when the Yes button has been clicked.
persist
flag is set opened
entries cannot be closed again, though.Parameters: persist If true the tree always stays unfolded.
UNKNOWN: This function has only effect in TreeList mode.
UNKNOWN: This method is called automatically whenever the background has changed.
UNKNOWN: Updates the margins and spacings.