• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdeui
 

kdeui

Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
KRestrictedLine Class Reference

#include <krestrictedline.h>

Inheritance diagram for KRestrictedLine:
KLineEdit KCompletionBase

Signals

void invalidChar (int)
- Signals inherited from KLineEdit
void completionBoxActivated (const TQString &)
void returnPressed (const TQString &)
void completion (const TQString &)
void substringCompletion (const TQString &)
void textRotation (KCompletionBase::KeyBindingType)
void completionModeChanged (KGlobalSettings::Completion)
void aboutToShowContextMenu (TQPopupMenu *p)

Public Member Functions

 KRestrictedLine (TQWidget *parent=0, const char *name=0, const TQString &valid=TQString::null)
 ~KRestrictedLine ()
void setValidChars (const TQString &valid)
TQString validChars () const
- Public Member Functions inherited from KLineEdit
 KLineEdit (const TQString &string, TQWidget *parent, const char *name=0)
 KLineEdit (TQWidget *parent=0, const char *name=0)
virtual ~KLineEdit ()
void setURL (const KURL &url)
void cursorAtEnd ()
virtual void setCompletionMode (KGlobalSettings::Completion mode)
virtual void setContextMenuEnabled (bool showMenu)
bool isContextMenuEnabled () const
void setURLDropsEnabled (bool enable)
bool isURLDropsEnabled () const
void setTrapReturnKey (bool trap)
bool trapReturnKey () const
virtual bool eventFilter (TQObject *, TQEvent *)
KCompletionBox * completionBox (bool create=true)
virtual void setCompletionObject (KCompletion *, bool hsig=true)
virtual void copy () const
void setEnableSqueezedText (bool enable)
bool isSqueezedTextEnabled () const
TQString originalText () const
void setCompletionBox (KCompletionBox *box)
void setClickMessage (const TQString &msg)
TQString clickMessage () const
- Public Member Functions inherited from KCompletionBase
KCompletion * completionObject (bool hsig=true)
virtual void setHandleSignals (bool handle)
bool isCompletionObjectAutoDeleted () const
void setAutoDeleteCompletionObject (bool autoDelete)
void setEnableSignals (bool enable)
bool handleSignals () const
bool emitSignals () const
KGlobalSettings::Completion completionMode () const
bool setKeyBinding (KeyBindingType item, const KShortcut &key)
const KShortcut & getKeyBinding (KeyBindingType item) const
void useGlobalKeyBindings ()
virtual void setCompletedText (const TQString &text)=0
virtual void setCompletedItems (const TQStringList &items)=0
KCompletion * compObj () const

Protected Member Functions

void keyPressEvent (TQKeyEvent *e)
virtual void virtual_hook (int id, void *data)
- Protected Member Functions inherited from KLineEdit
virtual void resizeEvent (TQResizeEvent *)
virtual void mousePressEvent (TQMouseEvent *)
virtual void mouseDoubleClickEvent (TQMouseEvent *)
virtual void mouseReleaseEvent (TQMouseEvent *)
virtual void contextMenuEvent (TQContextMenuEvent *)
virtual TQPopupMenu * createPopupMenu ()
virtual void drawContents (TQPainter *p)
virtual void dropEvent (TQDropEvent *)
virtual void setCompletedText (const TQString &, bool)
void setUserSelection (bool userSelection)
virtual void create (WId=0, bool initializeWindow=true, bool destroyOldWindow=true)
virtual void focusInEvent (TQFocusEvent *)
virtual void focusOutEvent (TQFocusEvent *)
bool autoSuggest () const
- Protected Member Functions inherited from KCompletionBase
KeyBindingMap getKeyBindings () const
void setDelegate (KCompletionBase *delegate)
KCompletionBase * delegate () const

Properties

TQString validChars
- Properties inherited from KLineEdit
bool contextMenuEnabled
bool urlDropsEnabled
bool trapEnterKeyEvent
bool enableSqueezedText
TQString clickMessage

Additional Inherited Members

- Public Types inherited from KCompletionBase
enum  KeyBindingType
typedef TQMap< KeyBindingType,
KShortcut > 
KeyBindingMap
- Public Slots inherited from KLineEdit
virtual void setReadOnly (bool)
void rotateText (KCompletionBase::KeyBindingType type)
virtual void setCompletedText (const TQString &)
void setCompletedItems (const TQStringList &items)
void setCompletedItems (const TQStringList &items, bool autoSuggest)
virtual void clear ()
void setSqueezedText (const TQString &text)
virtual void setText (const TQString &)
- Public Attributes inherited from KCompletionBase
 TextCompletion
 PrevCompletionMatch
 NextCompletionMatch
 SubstringCompletion
- Protected Slots inherited from KLineEdit
virtual void makeCompletion (const TQString &)
void slotAboutToShow ()
void slotCancelled ()
void userCancelled (const TQString &cancelText)

Detailed Description

A line editor for restricted character sets.

The KRestrictedLine widget is a variant of TQLineEdit 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 TQString to the constructor or set afterwards via setValidChars(). The default key bindings of TQLineEdit are still in effect.

Author
Michael Wiedmann mw@mi.nosp@m.wie..nosp@m.in-be.nosp@m.rlin.nosp@m..de

Definition at line 44 of file krestrictedline.h.

Constructor & Destructor Documentation

KRestrictedLine::KRestrictedLine ( TQWidget *  parent = 0,
const char *  name = 0,
const TQString &  valid = TQString::null 
)

Constructor: This contructor takes three - optional - arguments.

The first two parameters are simply passed on to TQLineEdit.

Parameters
parentpointer to the parent widget
namepointer to the name of this widget
validpointer 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::invalidChar ( int  )
signal

Emitted when an invalid character was typed.

void KRestrictedLine::keyPressEvent ( TQKeyEvent *  e)
protectedvirtual

Re-implemented for internal reasons.

API not affected.

See TQLineEdit::keyPressEvent().

Reimplemented from KLineEdit.

Definition at line 42 of file krestrictedline.cpp.

void KRestrictedLine::setValidChars ( const TQString &  valid)

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

Definition at line 68 of file krestrictedline.cpp.

TQString KRestrictedLine::validChars ( ) const
Returns
the string of acceptable characters.

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

kdeui

Skip menu "kdeui"
  • 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
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdeui by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |