org.kde.koala

Class KInputDialog

public class KInputDialog extends KDialogBase

The KInputDialog class provides a simple dialog to get a single value from the user. The value can be a string, a number (either an integer or a float) or an item from a list. This class is designed to be source compatible with QInputDialog. Five static convenience functions are provided: getText(), getInteger(). getDouble(), getItem() and getItemList().

Author: Nadeem Hasan

UNKNOWN: The KInputDialog class provides a simple dialog to get a single value from the user.

Constructor Summary
protected KInputDialog(Class dummy)
Method Summary
StringclassName()
static StringgetItem(String caption, String label, String[] list, int current, boolean editable, boolean[] ok, QWidget parent, String name)
Static convenience function to let the user select an item from a list. caption is the text that is displayed in the title bar. label is the text that appears as the label for the list. list is the string list which is inserted into the list, and current is the number of the item which should be the selected item.
static StringgetItem(String caption, String label, String[] list, int current, boolean editable, boolean[] ok, QWidget parent)
static StringgetItem(String caption, String label, String[] list, int current, boolean editable, boolean[] ok)
static StringgetItem(String caption, String label, String[] list, int current, boolean editable)
static StringgetItem(String caption, String label, String[] list, int current)
static StringgetItem(String caption, String label, String[] list)
static ArrayListgetItemList(String caption, String label, String[] list, String[] select, boolean multiple, boolean[] ok, QWidget parent, String name)
Static convenience function to let the user select one or more items from a listbox. caption is the text that is displayed in the title bar. label is the text that appears as the label for the listbox. list is the string list which is inserted into the listbox, select is the list of item(s) that should be the selected.
static ArrayListgetItemList(String caption, String label, String[] list, String[] select, boolean multiple, boolean[] ok, QWidget parent)
static ArrayListgetItemList(String caption, String label, String[] list, String[] select, boolean multiple, boolean[] ok)
static ArrayListgetItemList(String caption, String label, String[] list, String[] select, boolean multiple)
static ArrayListgetItemList(String caption, String label, String[] list, String[] select)
static ArrayListgetItemList(String caption, String label, String[] list)
static ArrayListgetItemList(String caption, String label)
static StringgetMultiLineText(String caption, String label, String value, boolean[] ok, QWidget parent, String name)
Static convenience function to get a multiline string from the user. caption is the text that is displayed in the title bar. label is the text that appears as a label for the line edit. value is the initial value of the line edit. ok will be set to true if user pressed Ok and false if user pressed Cancel.
static StringgetMultiLineText(String caption, String label, String value, boolean[] ok, QWidget parent)
static StringgetMultiLineText(String caption, String label, String value, boolean[] ok)
static StringgetMultiLineText(String caption, String label, String value)
static StringgetMultiLineText(String caption, String label)
static StringgetText(String caption, String label, String value, boolean[] ok, QWidget parent, String name, QValidator validator, String mask)
Static convenience function to get a string from the user. caption is the text that is displayed in the title bar. label is the text that appears as a label for the line edit. value is the initial value of the line edit. ok will be set to true if user pressed Ok and false if user pressed Cancel.
static StringgetText(String caption, String label, String value, boolean[] ok, QWidget parent, String name, QValidator validator)
static StringgetText(String caption, String label, String value, boolean[] ok, QWidget parent, String name)
static StringgetText(String caption, String label, String value, boolean[] ok, QWidget parent)
static StringgetText(String caption, String label, String value, boolean[] ok)
static StringgetText(String caption, String label, String value)
static StringgetText(String caption, String label)
QMetaObjectmetaObject()
static Stringtext(String caption, String label, String value, boolean[] ok, QWidget parent, String name, QValidator validator, String mask, String whatsThis)
Same as KInputDialog except it provides an extra parameter to specify a QWhatsThis text for the input widget.
static Stringtext(String caption, String label, String value, boolean[] ok, QWidget parent, String name, QValidator validator, String mask)
static Stringtext(String caption, String label, String value, boolean[] ok, QWidget parent, String name, QValidator validator)
static Stringtext(String caption, String label, String value, boolean[] ok, QWidget parent, String name)
static Stringtext(String caption, String label, String value, boolean[] ok, QWidget parent)
static Stringtext(String caption, String label, String value, boolean[] ok)
static Stringtext(String caption, String label, String value)
static Stringtext(String caption, String label)

Constructor Detail

KInputDialog

protected KInputDialog(Class dummy)

Method Detail

className

public String className()

getItem

public static String getItem(String caption, String label, String[] list, int current, boolean editable, boolean[] ok, QWidget parent, String name)
Static convenience function to let the user select an item from a list. caption is the text that is displayed in the title bar. label is the text that appears as the label for the list. list is the string list which is inserted into the list, and current is the number of the item which should be the selected item. If editable is true, the user can enter their own text.

Parameters: caption Caption of the dialog label Text of the label for the spin box list List of item for user to choose from current Index of the selected item editable If true, user can enter own text ok This boolean would be set to true if user pressed Ok parent Parent of the dialog widget name Name of the dialog widget

Returns: Text of the selected item. If editable is true this can be a text entered by the user.

UNKNOWN: Static convenience function to let the user select an item from a list.

getItem

public static String getItem(String caption, String label, String[] list, int current, boolean editable, boolean[] ok, QWidget parent)

getItem

public static String getItem(String caption, String label, String[] list, int current, boolean editable, boolean[] ok)

getItem

public static String getItem(String caption, String label, String[] list, int current, boolean editable)

getItem

public static String getItem(String caption, String label, String[] list, int current)

getItem

public static String getItem(String caption, String label, String[] list)

getItemList

public static ArrayList getItemList(String caption, String label, String[] list, String[] select, boolean multiple, boolean[] ok, QWidget parent, String name)
Static convenience function to let the user select one or more items from a listbox. caption is the text that is displayed in the title bar. label is the text that appears as the label for the listbox. list is the string list which is inserted into the listbox, select is the list of item(s) that should be the selected. If multiple is true, the user can select multiple items.

Parameters: caption Caption of the dialog label Text of the label for the spin box list List of item for user to choose from select List of item(s) that should be selected multiple If true, user can select multiple items ok This boolean would be set to true if user pressed Ok parent Parent of the dialog widget name Name of the dialog widget

Returns: List of selected items if multiple is true, else currently selected item as an ArrayList

UNKNOWN: Static convenience function to let the user select one or more items from a listbox.

getItemList

public static ArrayList getItemList(String caption, String label, String[] list, String[] select, boolean multiple, boolean[] ok, QWidget parent)

getItemList

public static ArrayList getItemList(String caption, String label, String[] list, String[] select, boolean multiple, boolean[] ok)

getItemList

public static ArrayList getItemList(String caption, String label, String[] list, String[] select, boolean multiple)

getItemList

public static ArrayList getItemList(String caption, String label, String[] list, String[] select)

getItemList

public static ArrayList getItemList(String caption, String label, String[] list)

getItemList

public static ArrayList getItemList(String caption, String label)

getMultiLineText

public static String getMultiLineText(String caption, String label, String value, boolean[] ok, QWidget parent, String name)
Static convenience function to get a multiline string from the user. caption is the text that is displayed in the title bar. label is the text that appears as a label for the line edit. value is the initial value of the line edit. ok will be set to true if user pressed Ok and false if user pressed Cancel.

Parameters: caption Caption of the dialog label Text of the label for the line edit value Initial value of the line edit ok This boolean would be set to true if user pressed Ok parent Parent of the dialog widget name Name of the dialog widget

Returns: String user entered if Ok was pressed, else a null string

UNKNOWN: Static convenience function to get a multiline string from the user.

getMultiLineText

public static String getMultiLineText(String caption, String label, String value, boolean[] ok, QWidget parent)

getMultiLineText

public static String getMultiLineText(String caption, String label, String value, boolean[] ok)

getMultiLineText

public static String getMultiLineText(String caption, String label, String value)

getMultiLineText

public static String getMultiLineText(String caption, String label)

getText

public static String getText(String caption, String label, String value, boolean[] ok, QWidget parent, String name, QValidator validator, String mask)
Static convenience function to get a string from the user. caption is the text that is displayed in the title bar. label is the text that appears as a label for the line edit. value is the initial value of the line edit. ok will be set to true if user pressed Ok and false if user pressed Cancel. If you provide a validator, the Ok button is disabled as long as the validator doesn't return Acceptable. If there is no validator, the Ok button is enabled whenever the line edit isn't empty. If you want to accept empty input, create a trivial QValidator that always returns acceptable, e.g. QRegExpValidator with a regexp of ".*".

Parameters: caption Caption of the dialog label Text of the label for the line edit value Initial value of the line edit ok This boolean would be set to true if user pressed Ok parent Parent of the dialog widget name Name of the dialog widget validator A QValidator to be associated with the line edit mask Mask associated with the line edit. See the documentation for QLineEdit about masks.

Returns: String user entered if Ok was pressed, else a null string

UNKNOWN: Static convenience function to get a string from the user.

getText

public static String getText(String caption, String label, String value, boolean[] ok, QWidget parent, String name, QValidator validator)

getText

public static String getText(String caption, String label, String value, boolean[] ok, QWidget parent, String name)

getText

public static String getText(String caption, String label, String value, boolean[] ok, QWidget parent)

getText

public static String getText(String caption, String label, String value, boolean[] ok)

getText

public static String getText(String caption, String label, String value)

getText

public static String getText(String caption, String label)

metaObject

public QMetaObject metaObject()

text

public static String text(String caption, String label, String value, boolean[] ok, QWidget parent, String name, QValidator validator, String mask, String whatsThis)
Same as KInputDialog except it provides an extra parameter to specify a QWhatsThis text for the input widget. ### KDE4: Merge with getText.

UNKNOWN: Same as @ref getText except it provides an extra parameter to specify a QWhatsThis text for the input widget.

text

public static String text(String caption, String label, String value, boolean[] ok, QWidget parent, String name, QValidator validator, String mask)

text

public static String text(String caption, String label, String value, boolean[] ok, QWidget parent, String name, QValidator validator)

text

public static String text(String caption, String label, String value, boolean[] ok, QWidget parent, String name)

text

public static String text(String caption, String label, String value, boolean[] ok, QWidget parent)

text

public static String text(String caption, String label, String value, boolean[] ok)

text

public static String text(String caption, String label, String value)

text

public static String text(String caption, String label)