kexi

KexiNameWidget Class Reference

List of all members.

Detailed Description

Definition at line 32 of file kexinamewidget.h.


Public Slots

virtual void clear ()
bool checkValidity ()

Signals

void returnPressed ()
void textChanged ()
void messageChanged ()

Public Member Functions

 KexiNameWidget (const QString &message, QWidget *parent=0, const char *name=0, WFlags fl=0)
 KexiNameWidget (const QString &message, const QString &nameLabel, const QString &nameText, const QString &captionLabel, const QString &captionText, QWidget *parent=0, const char *name=0, WFlags fl=0)
virtual ~KexiNameWidget ()
QLabel * captionLabel () const
QLabel * nameLabel () const
KLineEdit * captionLineEdit () const
KLineEdit * nameLineEdit () const
QString messageText () const
void setMessageText (const QString &msg)
QString captionText () const
void setCaptionText (const QString &capt)
QString nameText () const
void setNameText (const QString &name)
void setWarningForName (const QString &txt)
void setWarningForCaption (const QString &txt)
bool empty () const
KexiUtils::ValidatornameValidator () const
void addNameSubvalidator (KexiUtils::Validator *validator, bool owned=true)
bool isNameRequired () const
void setNameRequired (bool set)
bool isCaptionRequired () const
void setCaptionRequired (bool set)

Protected Slots

void slotNameTxtChanged (const QString &)
void slotCaptionTxtChanged (const QString &)

Protected Member Functions

void init (const QString &message, const QString &nameLabel, const QString &nameText, const QString &captionLabel, const QString &captionText)

Protected Attributes

QLabel * lbl_message
QLabel * lbl_caption
QLabel * lbl_name
KLineEdit * le_caption
KLineEdit * le_name
QGridLayout * lyr
KexiUtils::MultiValidatorm_validator
QString m_nameWarning
QString m_captionWarning
bool m_le_name_txtchanged_disable: 1
bool m_le_name_autofill: 1
bool m_caption_required: 1

Friends

class KexiNameDialog

Member Function Documentation

QString KexiNameWidget::captionText (  )  const

Returns:
entered caption text

Definition at line 172 of file kexinamewidget.cpp.

QString KexiNameWidget::nameText (  )  const

Returns:
entered name text, always in lower case

Definition at line 177 of file kexinamewidget.cpp.

void KexiNameWidget::setWarningForName ( const QString &  txt  )  [inline]

Sets i18n'ed warning message displayed when user leaves 'name' field without filling it (if acceptsEmptyValue() is false). By default the message is equal "Please enter the name.".

Definition at line 69 of file kexinamewidget.h.

void KexiNameWidget::setWarningForCaption ( const QString &  txt  )  [inline]

Sets i18n'ed warning message displayed when user leaves 'name' field without filling it (if acceptsEmptyValue() is false). By default the message is equal "Please enter the caption."

Definition at line 74 of file kexinamewidget.h.

bool KexiNameWidget::empty (  )  const

Returns:
true if name or caption is empty.

Definition at line 137 of file kexinamewidget.cpp.

void KexiNameWidget::addNameSubvalidator ( KexiUtils::Validator validator,
bool  owned = true 
)

Adds subvalidator for name field. In fact it's is added to internal multivalidator. If owned is true, validator will be owned by the object.

See also:
MultiValidator::addSubvalidator().

Definition at line 209 of file kexinamewidget.cpp.

bool KexiNameWidget::isNameRequired (  )  const

Returns:
true if name text cannot be empty (true by default).

Definition at line 145 of file kexinamewidget.cpp.

bool KexiNameWidget::isCaptionRequired (  )  const [inline]

Returns:
true if caption text cannot be empty (false by default).

Definition at line 92 of file kexinamewidget.h.

void KexiNameWidget::clear (  )  [virtual, slot]

Clears both name and caption.

Definition at line 131 of file kexinamewidget.cpp.

bool KexiNameWidget::checkValidity (  )  [slot]

Checks if both fields have valid values (i.e. not empty if acceptsEmptyValue() is false). If not, warning message is shown and false is returned.

Definition at line 182 of file kexinamewidget.cpp.

void KexiNameWidget::returnPressed (  )  [signal]

Emitted whenever return key is pressed on name or caption label.

void KexiNameWidget::textChanged (  )  [signal]

Emitted whenever the caption or the name text changes

void KexiNameWidget::messageChanged (  )  [signal]

Emitted whenever the message changes


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys