Provides command and name completion. More...
Inherits QObject.
Public Slots | |
| void | complete (const QString &text, int cursor, Direction direction=Forward) |
| void | reset () |
Signals | |
| void | completed (const QString &text, int cursor) |
Public Member Functions | |
| IrcCompleter (QObject *parent=0) | |
| virtual | ~IrcCompleter () |
Properties | |
| IrcBuffer | buffer |
| IrcCommandParser | parser |
| QString | suffix |
IrcCompleter provides command and name completion for a text input field. The completer is made context aware by assigning a command parser and a buffer that is currently active in the GUI. The parser is used for completing commands, and the buffer is used for completing buffer and user names.
In order to perform a completion, call complete() with the current text input field content and the cursor position. If a suitable completion is found, the completed() signal is emitted with a suggestion for a new content and cursor position for the text input field.
|
explicit |
Constructs a completer with parent.
|
virtual |
Destructs the completer.
|
slot |
Completes text at cursor position, iterating multiple matches to the specified direction, and emits completed() if a suitable completion is found.
|
signal |
This signal is emitted when a suitable completion with text and cursor position is found.
|
slot |
Resets the completer state.
|
readwrite |
|
readwrite |
This property holds the parser used for command completion.
|
readwrite |
This property holds the completion suffix.
The suffix is appended to the end of a completed nick name, but only when the nick name is in the beginning of completed text.
The default value is ":".
1.8.14