• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • @topname@
  • Sitemap
  • Contact Us
 

kdeui

KRestrictedLine Class Reference

#include <krestrictedline.h>

Inheritance diagram for KRestrictedLine:

KLineEdit QLineEdit KCompletionBase

List of all members.


Detailed Description

A line editor for restricted character sets.

The KRestrictedLine widget is a variant of QLineEdit which accepts only a restricted set of characters as input. All other characters will be discarded and the signal invalidChar() will be emitted for each of them.

Valid characters can be passed as a QString to the constructor or set afterwards via setValidChars(). The default key bindings of QLineEdit are still in effect.

Author:
Michael Wiedmann <mw@miwie.in-berlin.de>

Definition at line 44 of file krestrictedline.h.


Signals

void invalidChar (int)

Public Member Functions

 KRestrictedLine (QWidget *parent=0, const char *name=0, const QString &valid=QString::null)
 ~KRestrictedLine ()
void setValidChars (const QString &valid)
QString validChars () const

Protected Member Functions

void keyPressEvent (QKeyEvent *e)
virtual void virtual_hook (int id, void *data)

Properties

QString validChars

Constructor & Destructor Documentation

KRestrictedLine::KRestrictedLine ( QWidget *  parent = 0,
const char *  name = 0,
const QString &  valid = QString::null 
)

Constructor: This contructor takes three - optional - arguments.

The first two parameters are simply passed on to QLineEdit.

Parameters:
parent pointer to the parent widget
name pointer to the name of this widget
valid pointer to set of valid characters

Definition at line 28 of file krestrictedline.cpp.

KRestrictedLine::~KRestrictedLine (  ) 

Destructs the restricted line editor.

Definition at line 36 of file krestrictedline.cpp.


Member Function Documentation

void KRestrictedLine::setValidChars ( const QString &  valid  ) 

All characters in the string valid are treated as acceptable characters.

Definition at line 68 of file krestrictedline.cpp.

QString KRestrictedLine::validChars (  )  const

Returns:
the string of acceptable characters.

void KRestrictedLine::invalidChar ( int   )  [signal]

Emitted when an invalid character was typed.

void KRestrictedLine::keyPressEvent ( QKeyEvent *  e  )  [protected, virtual]

Re-implemented for internal reasons.

API not affected.

See QLineEdit::keyPressEvent().

Reimplemented from KLineEdit.

Definition at line 42 of file krestrictedline.cpp.


The documentation for this class was generated from the following files:
  • krestrictedline.h
  • krestrictedline.cpp

kdeui

Skip menu "kdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

@topname@

Skip menu "@topname@"
  •     kdnssd-avahi
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for @topname@ by doxygen 1.5.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal