lineedit class

# lineedit class Simple line editor for inputting short text
Inherits
object widget
Description
This is a simple, one-line editor usually used for inputting short text like names, phone numbers etc. It can display text in three echo modes (see $setEchoMode() for details).
Functions
`<string> $text()`
Returns text contained by the widget. See also $setText().
`$setText(<text:string>)`
Sets editor text to <text>. See also $text().
`$setEchoMode(<echo_mode:string>)`
Sets the line edit's echo mode. Possible value are: -Normal: display chars as they entered -Noecho : do not display anything -Password : display asterisks instead of the characters actually entered See also $echoMode().
`<string> $echoMode()`
Return the line edit's echo mode. See also $setEchoMode().
`<integer> $maxLength()`
Returns the current maximum length of the text that can be typed in the editor. See also $setMaxLength().
`$setMaxLength(<max_lenght:integer>)`
Sets maximum length of the text that can be typed in the editor. See also $maxLength().
`<boolean> $frame()`
Returns '1' if the editor is drawn inside a frame, which is 2 pixels wide, '0' otherwise. See also $setFrame().
`$setFrame(<bframe:boolean>)`
Sets editor frame drawing to <bool>. See also $frame().
`<integer> $cursorPosition()`
Returns current cursor position in the editor. See also $setCursorPosition().
`$setCursorPosition(<index:integer>)`
Moves the cursor to place pointed by <index>. See also $cursorPosition().
`$selectAll()`
Selects whole text inside the editor. See also $setSelection(), $cut(), $copy(), $paste().
`$setSelection(<start:integer>, <length:integer>)`
Selects <length> characters in the editor starting at position <start>. See also $selectAll(), $cut(), $copy(), $paste().
`$copy()`
Copies selected text in the editor to the clipboard. See also $setSelection(), $cut(), $paste().
`$cut()`
Cuts selected text from the editor to the clipboard. See also $setSelection(), $copy(), $paste().
`$paste()`
Pastes text from the clipboard into the editor. The pasted text will start at cursor position. See also $setSelection(), $copy(), $cut().
`$clear()`
Deletes all text from the editor. Equal to calling $setText("").
`$setDragEnabled(<bEnabled:bool>)`
With this property user can drag text in the lineedit.
`$setReadOnly(<bReadonly:boolean>)`
Sets the lineedit to read only mode.
`$setInputMask(<mask:string>)`
Sets the validation input mask to inputMask. Example: %ledit_example->$setInputMask( "+99 99 99 99 99;_" ); %ledit_example->$setInputMask( "000.000.000.000;_" ); %ledit_example->Ip Number Mask. %ledit_example->setInputMask( ">AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#" ); The mask format understands these mask characters: Character Meaning A ASCII alphabetic character required. A-Z, a-z. a ASCII alphabetic character permitted but not required. N ASCII alphanumeric character required. A-Z, a-z, 0-9. n ASCII alphanumeric character permitted but not required. X Any character required. x Any character permitted but not required. 9 ASCII digit required. 0-9. 0 ASCII digit permitted but not required. D ASCII digit required. 1-9. d ASCII digit permitted but not required. # ASCII digit or plus/minus sign permitted but not required. > All following alphabetic characters are uppercased. < All following alphabetic characters are lowercased. ! Switch off case conversion. \ Use \ to escape the special characters listed above to use them as separators. The mask consists of a string of mask characters and separators, optionally followed by a semi-colon and the character used for blanks: the blank characters are always removed from the text after editing. The default blank character is space.
`$returnPressedEvent()`
This function is called by the framework when the enter key is pressed.
`$lostFocusEvent()`
Called when the lineedit lost focus.
`$textChangedEvent(<new text:string>)`
This event is called when the text changed, In $0 there is the new text.
`$setCompleter(<completion_mode:string>,<items:stringlist>)`
Provides completions based on an stringlist. Valid completion_mode are: PopupCompletion: Current completions are displayed in a popup below the lineedit. UnfilteredPopupCompletion: All possible completions are displayed in a popup window with the most likely suggestion selected. InlineCompletion: Completions appear as selected text.
`$disableCompleter()`
Disable temporally the completer.
`$enableCompleter()`
Enable the completer.
`$removeCompleter()`
Remove the completer.
Signals
`$returnPressed()`
This signal is emitted by the default implementation of $returnPressedEvent().
`$lostFocus()`
This signal is emitted by the default implementation of $lostFocusEvent().
`$textChanged()`
This signal is emitted by the default implementation of $textChangedEvent().

Index, Object Classes

KVIrc 4.2.0.6190 Documentation
Generated by builduser at Sun Jun 5 17:19:09 2016