class KLineEditDlg

# class KLineEditDlg | Dialog for user to enter a single line of text. More...
Definition | `#include <klineeditdlg.h>`
Inherits | KDialogBase [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KLineEditDlg ( const QString& _text, const QString& _value, QWidget *parent )
- virtual ~KLineEditDlg ()
- QString text () const
- KLineEdit * lineEdit () const

#### Public Slots

- void slotClear ()

#### Public Static Methods

- static QString getText (const QString &_text, const QString& _value, bool *ok, QWidget *parent, QValidator *validator=0 )
- static QString getText (const QString &_caption, const QString &_text, const QString& _value=QString::null, bool *ok=0, QWidget *parent=0, QValidator *validator=0)

#### Protected Methods

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

#### Protected Slots

- void slotTextChanged ( const QString& )

#### Protected Members

- KLineEdit *edit

## Detailed Description

Dialog for user to enter a single line of text.

KLineEditDlg ( const QString& _text, const QString& _value, QWidget *parent ) | ### KLineEditDlg

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

~KLineEditDlg () | ### ~KLineEditDlg

[virtual]

QString text () | ### text

[const]

Returns: the value the user entered

KLineEdit * lineEdit () | ### lineEdit

[const]

Returns: the line edit widget

QString getText (const QString &_text, const QString& _value, bool *ok, QWidget *parent, QValidator *validator=0 ) | ### getText

[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.

QString getText (const QString &_caption, const QString &_text, const QString& _value=QString::null, bool *ok=0, QWidget *parent=0, QValidator *validator=0) | ### getText

[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"
_validator | Validator to be stuffed into the line edit.

void slotClear () | ### slotClear

[slot]

Clears the edit widget

void slotTextChanged ( const QString& ) | ### slotTextChanged

[protected slots slot]

Enables and disables the OK button depending on the state returned by the lineedit's QValidator.

KLineEdit * edit | ### edit

[protected]

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

[protected virtual]

The line edit widget

Reimplemented from KDialogBase.

- Version: $Id: klineeditdlg.h,v 1.13 2002/03/04 00:51:50 lunakl Exp $
- Author: David Faure , layout management by Preston Brown
- Generated: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:37 2003, using kdoc 2.0a54.