kdeui
KLineEditDlg Class Reference
#include <klineeditdlg.h>
Public Slots | |
void | slotClear () |
Public Member Functions | |
KLineEditDlg (const QString &_text, const QString &_value, QWidget *parent) KDE_DEPRECATED | |
KLineEdit * | lineEdit () const |
QString | text () const |
virtual | ~KLineEditDlg () |
Static Public Member Functions | |
static QString | getText (const QString &caption, const QString &text, const QString &value=QString::null, bool *ok=0, QWidget *parent=0, QValidator *validator=0) KDE_DEPRECATED |
static QString | getText (const QString &text, const QString &value, bool *ok, QWidget *parent, QValidator *validator=0) KDE_DEPRECATED |
Protected Slots | |
void | slotTextChanged (const QString &) |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
KLineEdit * | edit |
Detailed Description
- Deprecated:
- Please use KInputDialog instead.
- Version:
- Id
- klineeditdlg.h 465272 2005-09-29 09:47:40Z mueller
Definition at line 38 of file klineeditdlg.h.
Constructor & Destructor Documentation
Create a dialog that asks for a single line of text.
_value is the initial value of the line. _text appears as label on top of the entry box. If the internal line edit has an associated QValidator set, the OK button is disabled as long as the validator doesn't return Acceptable. If there's no validator, the OK button is enabled whenever the line edit isn't empty.
If you want to accept empty input, make a trivial QValidator that always returns Acceptable, e.g. QRegExpValidator with a regexp of ".*".
- Parameters:
-
_text Text of the label _value Initial value of the inputline parent Parent widget for the line edit dialog
Definition at line 37 of file klineeditdlg.cpp.
KLineEditDlg::~KLineEditDlg | ( | ) | [virtual] |
Definition at line 130 of file klineeditdlg.cpp.
Member Function Documentation
QString KLineEditDlg::getText | ( | const QString & | caption, | |
const QString & | text, | |||
const QString & | value = QString::null , |
|||
bool * | ok = 0 , |
|||
QWidget * | parent = 0 , |
|||
QValidator * | validator = 0 | |||
) | [static] |
Static convenience function to get a textual input from the user.
This method includes a caption, and has (almost) the same API as QInputDialog::getText (no echo mode, we have KPasswordDialog).
- Parameters:
-
caption Caption of the dialog text Text of the label value Initial value of the inputline ok this bool will be set to true if user pressed "Ok" parent The parent widget for this text input dialog validator Validator to be stuffed into the line edit.
Definition at line 174 of file klineeditdlg.cpp.
QString KLineEditDlg::getText | ( | const QString & | text, | |
const QString & | value, | |||
bool * | ok, | |||
QWidget * | parent, | |||
QValidator * | validator = 0 | |||
) | [static] |
Static convenience function to get a textual input from the user.
- Parameters:
-
text Text of the label value Initial value of the inputline ok this bool will be set to true if user pressed "Ok" validator Validator to be stuffed into the line edit. parent The parent widget
Definition at line 159 of file klineeditdlg.cpp.
KLineEdit* KLineEditDlg::lineEdit | ( | ) | const [inline] |
void KLineEditDlg::slotClear | ( | ) | [slot] |
void KLineEditDlg::slotTextChanged | ( | const QString & | text | ) | [protected, slot] |
Enables and disables the OK button depending on the state returned by the lineedit's QValidator.
Definition at line 139 of file klineeditdlg.cpp.
QString KLineEditDlg::text | ( | ) | const |
void KLineEditDlg::virtual_hook | ( | int | id, | |
void * | data | |||
) | [protected, virtual] |
Member Data Documentation
KLineEdit* KLineEditDlg::edit [protected] |
The documentation for this class was generated from the following files: