KVIrc
4.9.2
DeveloperAPIs
|
Input editor class. More...
#include <KviInputEditor.h>
Classes | |
class | EditCommand |
Holds the command used in the {un,re}do operations. More... | |
Public Slots | |
void | clear () |
Clears the input line. More... | |
void | copyToClipboard () |
Copies the text to the system clipboard. More... | |
void | copyToSelection (bool bDonNotCopyToClipboard=true) |
Copies the text to the system clipboard. More... | |
void | cut () |
Cuts the selection from the input line. More... | |
void | iconPopupActivated (QAction *pAction) |
Opens the icon popup with icon description. More... | |
void | pasteClipboardWithConfirmation () |
Pastes the text to the system clipboard. More... | |
void | pasteFile () |
Pastes a file to the buffer. More... | |
void | pasteSelectionWithConfirmation () |
Pastes the text to the system clipboard. More... | |
void | pasteSlow () |
Starts a slow paste in the buffer. More... | |
void | redo () |
Redo the last undo-ed action. More... | |
void | removeSelected () |
Removes the selected text. More... | |
void | selectAll () |
Selects all text in the input line. More... | |
void | stopPasteSlow () |
Stops a slow paste in the buffer. More... | |
void | undo () |
Undo the last action. More... | |
Signals | |
void | enterPressed () |
Called when the user press enter/return. More... | |
void | escapePressed () |
Called when the user press escape. More... | |
Public Member Functions | |
void | applyOptions (bool bRefreshCachedMetrics=true) |
Applies the options and update. More... | |
void | clearUndoStack () |
Clears the undo stack. More... | |
int | heightHint () const |
Returns the height of the editor. More... | |
void | insertChar (QChar c) |
Inserts a character at the current position. More... | |
void | insertText (const QString &szTxt) |
Inserts the text at the current position. More... | |
bool | isReadOnly () const |
Returns true if the input line is in read only state. More... | |
KviInputEditor (QWidget *pPar, KviWindow *pWnd, KviUserListView *pView=0) | |
Constructs the input editor object. More... | |
void | setMaxBufferSize (int iSize) |
Sets the maximum buffer size. More... | |
void | setReadOnly (bool bReadOnly) |
Sets the read only state for the input line. More... | |
void | setText (const QString szText) |
Sets the text in the input line. More... | |
QString | text () |
Returns the text in the buffer. More... | |
QString | textBeforeCursor () |
Returns the text before the cursor. More... | |
~KviInputEditor () | |
Destroys the Input editor object. More... | |
Protected Member Functions | |
bool | checkWordSpelling (const QString &szWord) |
void | completionEscapeUnsafeToken (QString &szToken) |
virtual void | dragEnterEvent (QDragEnterEvent *e) |
virtual void | drawContents (QPainter *) |
virtual void | dropEvent (QDropEvent *e) |
void | fillSpellCheckerCorrectionsPopup () |
KviInputEditorSpellCheckerBlock * | findSpellCheckerBlockAtCursor (KviPointerList< KviInputEditorSpellCheckerBlock > &lBlocks) |
virtual void | focusInEvent (QFocusEvent *e) |
virtual void | focusOutEvent (QFocusEvent *e) |
virtual void | inputMethodEvent (QInputMethodEvent *e) |
virtual QVariant | inputMethodQuery (Qt::InputMethodQuery query) const |
void | insertIconCode (const QString &szCode) |
void | installShortcuts () |
virtual void | keyPressEvent (QKeyEvent *e) |
virtual void | keyReleaseEvent (QKeyEvent *e) |
virtual void | mouseDoubleClickEvent (QMouseEvent *e) |
virtual void | mousePressEvent (QMouseEvent *e) |
virtual void | mouseReleaseEvent (QMouseEvent *e) |
virtual void | paintEvent (QPaintEvent *e) |
void | rebuildTextBlocks () |
void | splitTextIntoSpellCheckerBlocks (const QString &szText, KviPointerList< KviInputEditorSpellCheckerBlock > &lBuffer) |
virtual void | timerEvent (QTimerEvent *e) |
Protected Attributes | |
bool | m_bCursorOn |
bool | m_bIMComposing |
bool | m_bLastCompletionFinished |
bool | m_bReadOnly |
bool | m_bSpSlowFlag |
bool | m_bUpdatesEnabled |
int | m_iCurHistoryIdx |
int | m_iCursorPosition |
int | m_iCursorTimer |
int | m_iCursorWidth |
int | m_iDragTimer |
int | m_iIMLength |
int | m_iIMSelectionBegin |
int | m_iIMSelectionLength |
int | m_iIMStart |
int | m_iLastCompletionCursorPosition |
int | m_iMaxBufferSize |
int | m_iSelectionAnchorChar |
int | m_iSelectionBegin |
int | m_iSelectionEnd |
KviInputEditorPrivate * | m_p |
KviPointerList< QString > * | m_pHistory |
QMenu * | m_pIconMenu |
QWidget * | m_pInputParent |
KviWindow * | m_pKviWindow |
KviPointerList< EditCommand > * | m_pRedoStack |
The redo stack. More... | |
KviPointerList< EditCommand > * | m_pUndoStack |
The undo stack. More... | |
KviUserListView * | m_pUserListView |
QMenu | m_SpellCheckerPopup |
KviCString | m_szAltKeyCode |
QString | m_szIMText |
QString | m_szLastCompletedNick |
QString | m_szLastCompletionBuffer |
KviCString | m_szSaveTextBuffer |
QString | m_szTextBuffer |
Static Protected Attributes | |
static int | g_iCachedHeight = 0 |
static int | g_iInputFontCharWidth [256] |
static int | g_iInputInstances = 0 |
static QFontMetricsF * | g_pLastFontMetrics = nullptr |
Properties | |
int | TransparencyCapable |
Private Slots | |
void | backspaceHit () |
Run when backspace key is pressed. More... | |
void | copyInternal () |
Copies to clipboard. More... | |
void | cutInternal () |
Cuts to clipboard. More... | |
void | deleteHit () |
Run when delete key is pressed. More... | |
void | deleteNextWord () |
Deletes next word. More... | |
void | deletePreviousWord () |
Deletes previous word. More... | |
void | dummy () |
Does nothing but grabs some keys combinations. More... | |
void | endInternal () |
Moves the cursor at the end. More... | |
void | endInternalSelection () |
Selects until the end. More... | |
void | escapeHit () |
Run when escape key is pressed. More... | |
void | historyNext () |
Moves forward in the command history and in the history popup. More... | |
void | historyPrev () |
Moves backward in the command history and in the history popup. More... | |
void | homeInternal () |
Moves the cursor at the beginning. More... | |
void | homeInternalSelection () |
Selects until the beginning. More... | |
void | insertBold () |
Inserts bold control character. More... | |
void | insertColor () |
Inserts color control character. More... | |
void | insertIcon () |
Inserts icon control character. More... | |
void | insertPlainText () |
Inserts non-crypt (plain text) control character. More... | |
void | insertReset () |
Inserts reset control character. More... | |
void | insertReverse () |
Inserts reverse control character. More... | |
void | insertUnderline () |
Inserts underline control character. More... | |
void | nextChar () |
Moves to the next character. More... | |
void | nextCharSelection () |
Selects up to the next character. More... | |
void | nextLine () |
Scrolls the output window down one line. More... | |
void | nextPage () |
Scrolls the output window down one page. More... | |
void | nextWord () |
Moves to the end of the next word. More... | |
void | nextWordSelection () |
Selects up to the end of the next word. More... | |
void | openHistory () |
Opens the history popup. More... | |
void | pasteInternal () |
Pastes clipboard contents. More... | |
void | popupTextIconWindow () |
void | previousChar () |
Moves to the previous character. More... | |
void | previousCharSelection () |
Selects up to the previous character. More... | |
void | previousLine () |
Scrolls the output window up one line. More... | |
void | previousPage () |
Scrolls the output window up one page. More... | |
void | previousWord () |
Moves to the beginning of the previous word. More... | |
void | previousWordSelection () |
Selects up to the beginning of the previous word. More... | |
void | redoInternal () |
Redoes last action. More... | |
void | returnHit () |
Run when return/enter key is pressed. More... | |
void | scrollToLastReadLine () |
Scrolls the ircview to the last read line. More... | |
void | search () |
Opens the search window. More... | |
void | selectAllInternal () |
Selects all. More... | |
void | sendKvs () |
Sends the message assuming it's kvs code. More... | |
void | sendPlain () |
Sends plain text, ignoring initial token starting with / (a command) More... | |
void | showContextPopup (const QPoint &pos) |
void | showContextPopupHere () |
void | showSpellCheckerCorrectionsPopup () |
void | spellCheckerPopupCorrectionActionTriggered () |
void | toggleCommandMode () |
Toggles the commandline's KVS/User-friendly mode. More... | |
void | toggleMultiLineEditor () |
Toggles the multiline editor. More... | |
void | undoInternal () |
Undoes last action. More... | |
void | zoomDefault () |
Restore the ircview font (and its size) More... | |
void | zoomIn () |
Increase the ircview font size. More... | |
void | zoomOut () |
Decrease the ircview font size. More... | |
Private Member Functions | |
void | addUndo (EditCommand *pCommand) |
Inserts one action in the undo stack. More... | |
int | charIndexFromXPosition (qreal fXPos) |
Returns the current character from a given position. More... | |
void | clearSelection () |
void | completion (bool bShift) |
Autocompletion function. More... | |
void | end () |
Moves the cursor to the end of the input line. More... | |
void | ensureCursorVisible () |
Makes sure that the cursor is visible. More... | |
QFontMetricsF * | getLastFontMetrics (const QFont &font) |
Returns the current input editor font metrics (globally shared) More... | |
void | getWordBeforeCursor (QString &szBuffer, bool *bIsFirstWordInLine) |
Gets the word before the cursor and puts it to the buffer. More... | |
void | handleDragSelection () |
Handles the drag selection. More... | |
bool | hasSelection () |
Returns true if the input line has focus. More... | |
void | home () |
Moves the cursor to the start of the input line. More... | |
void | internalCursorLeft (bool bShift) |
Moves the cursor one character to the left. More... | |
void | internalCursorRight (bool bShift) |
Moves the cursor one character to the right. More... | |
bool | isRedoAvailable () const |
Returns true is there are some action in the redo stack. More... | |
bool | isUndoAvailable () const |
Returns true is there are some action in the undo stack. More... | |
void | killDragTimer () |
Kills the drag timer. More... | |
void | moveCursorTo (int iIdx, bool bRepaint=true) |
Moves the cursor to the specified position. More... | |
void | repaintWithCursorOn () |
Repaints the input line with the visible cursor. More... | |
int | replaceSegment (int iStart, int iLength, const QString &szString) |
Replace characters in the buffer. More... | |
void | replaceWordBeforeCursor (const QString &szWord, const QString &szReplacement, bool bRepaint=true) |
Replaces the word before the cursor. More... | |
void | returnPressed (bool bRepaint=true) |
Adds the text to the history. More... | |
void | standardNickCompletion (bool bAddMask, QString &szWord, bool bFirstWordInLine, bool bInCommand) |
Completes the nickname specified by szWord (inserts the completed text to the input line) More... | |
void | standardNickCompletionInsertCompletedText (const QString &szReplacedWord, const QString &szCompletedText, bool bFirstWordInLine, bool bInCommand) |
Internal helper for standardNickCompletion() More... | |
qreal | xPositionFromCharIndex (int iChIdx) |
Returns the current position from a given character. More... | |
Static Private Member Functions | |
static QChar | getSubstituteChar (unsigned short uControlCode) |
Gets the substitute character for control codes. More... | |
Friends | |
class | KviTextIconWindow |
class | KviTopicWidget |
Input editor class.
KviInputEditor::KviInputEditor | ( | QWidget * | pPar, |
KviWindow * | pWnd, | ||
KviUserListView * | pView = 0 |
||
) |
Constructs the input editor object.
pPar | The parent widget |
pWnd | The KviWindow object |
pView | The userlist |
References applyOptions(), KviInputEditorPrivate::bTextBlocksDirty, connect(), KviInputEditorPrivate::fXOffset, g_iInputInstances, iconPopupActivated(), installShortcuts(), KVI_INPUT_MARGIN, KVI_INPUT_MAX_BUFFER_SIZE, m_bCursorOn, m_bIMComposing, m_bReadOnly, m_bUpdatesEnabled, m_iCurHistoryIdx, m_iCursorPosition, m_iCursorTimer, m_iDragTimer, m_iIMLength, m_iIMSelectionBegin, m_iIMSelectionLength, m_iIMStart, m_iMaxBufferSize, m_iSelectionAnchorChar, m_iSelectionBegin, m_iSelectionEnd, m_p, m_pHistory, m_pIconMenu, m_pInputParent, m_pKviWindow, m_pRedoStack, m_pUndoStack, m_pUserListView, KviPointerList< T >::setAutoDelete(), and KviInputEditorPrivate::szFontElision.
KviInputEditor::~KviInputEditor | ( | ) |
Destroys the Input editor object.
References g_iInputInstances, g_pLastFontMetrics, killDragTimer(), KviInputEditorPrivate::lTextBlocks, m_iCursorTimer, m_p, m_pHistory, m_pIconMenu, m_pRedoStack, and m_pUndoStack.
|
private |
Inserts one action in the undo stack.
pCommand | The command representing the action |
References KVI_INPUT_MAX_UNDO_SIZE, and m_pUndoStack.
Referenced by backspaceHit(), clear(), cut(), insertChar(), insertText(), removeSelected(), replaceSegment(), and setText().
void KviInputEditor::applyOptions | ( | bool | bRefreshCachedMetrics = true | ) |
Applies the options and update.
References g_pLastFontMetrics, getLastFontMetrics(), KVI_OPTION_BOOL, KVI_OPTION_FONT, KVI_OPTION_UINT, KviOption_boolEnableCustomCursorWidth, KviOption_fontInput, KviOption_uintCustomCursorWidth, and m_iCursorWidth.
Referenced by KviInput::applyOptions(), and KviInputEditor().
|
privateslot |
Run when backspace key is pressed.
References addUndo(), KviInputEditorPrivate::bTextBlocksDirty, clearSelection(), ensureCursorVisible(), hasSelection(), m_bReadOnly, m_iCursorPosition, m_iSelectionBegin, m_iSelectionEnd, m_p, m_szTextBuffer, KviInputEditor::EditCommand::RemoveText, and repaintWithCursorOn().
Referenced by keyPressEvent().
|
private |
Returns the current character from a given position.
iXPos | The position to grab |
References KviInputEditorPrivate::bTextBlocksDirty, KviInputEditorPrivate::fFontElisionWidth, KviInputEditorTextBlock::fWidth, KviInputEditorPrivate::fXOffset, getLastFontMetrics(), KviInputEditorTextBlock::iLength, KVI_INPUT_MARGIN, KviInputEditorPrivate::lTextBlocks, m_p, rebuildTextBlocks(), KviInputEditorPrivate::szFontElision, and KviInputEditorTextBlock::szText.
Referenced by handleDragSelection(), mouseDoubleClickEvent(), and mousePressEvent().
|
protected |
References KviKvsVariant::asBoolean(), c, KviKvsScript::evaluate(), KviWindow::isChannel(), KviChannelWindow::isOn(), and m_pKviWindow.
Referenced by splitTextIntoSpellCheckerBlocks().
|
slot |
Clears the input line.
References addUndo(), KviInputEditorPrivate::bTextBlocksDirty, clearSelection(), home(), m_p, m_szTextBuffer, and KviInputEditor::EditCommand::RemoveText.
Referenced by showContextPopup(), and toggleMultiLineEditor().
|
private |
References KviInputEditorPrivate::bTextBlocksDirty, m_iSelectionBegin, m_iSelectionEnd, and m_p.
Referenced by backspaceHit(), clear(), cut(), deleteHit(), endInternal(), handleDragSelection(), historyNext(), historyPrev(), homeInternal(), insertChar(), internalCursorLeft(), internalCursorRight(), mousePressEvent(), removeSelected(), replaceWordBeforeCursor(), setText(), and standardNickCompletion().
void KviInputEditor::clearUndoStack | ( | ) |
Clears the undo stack.
References m_pRedoStack, and m_pUndoStack.
Referenced by KviInput::inputEditorEnterPressed().
|
private |
Autocompletion function.
To autocomplete, this function looks for a nickname, a directory, or a nickname.
bShift | Whether to complete with the mask of the nickname |
References __tr2qs, KviConsoleWindow::completeChannel(), KviKvsKernel::completeCommand(), KviApplication::completeDirectory(), KviKvsKernel::completeFunction(), KviUserListView::completeNickBashLike(), KviConsoleWindow::completeServer(), completionEscapeUnsafeToken(), KviWindow::console(), KviPointerList< T >::count(), KviQString::equalCI(), KviQString::equalCIN(), KviPointerList< T >::first(), g_pApp, getWordBeforeCursor(), KviKvsKernel::instance(), KVI_OPTION_BOOL, KVI_OPTION_STRING, KVI_OUT_SYSTEMMESSAGE, KviOption_boolBashLikeNickCompletion, KviOption_boolUseNickCompletionPostfixForFirstWordOnly, KviOption_boolZshLikeNickCompletion, KviOption_stringNickCompletionPostfix, m_pKviWindow, m_pUserListView, m_szLastCompletedNick, m_szTextBuffer, KviPointerList< T >::next(), KviWindow::output(), KviWindow::outputNoFmt(), repaintWithCursorOn(), replaceWordBeforeCursor(), KviPointerList< T >::setAutoDelete(), standardNickCompletion(), and KviWindow::windowName().
Referenced by keyPressEvent().
|
protected |
References KviQString::escapeKvs(), KviQString::EscapeSpace, and m_pInputParent.
Referenced by completion(), and standardNickCompletionInsertCompletedText().
|
privateslot |
|
slot |
Copies the text to the system clipboard.
References hasSelection(), m_iSelectionBegin, m_iSelectionEnd, m_szTextBuffer, and repaintWithCursorOn().
Referenced by copyInternal(), and showContextPopup().
|
slot |
Copies the text to the system clipboard.
If the system supports the mouse clipboard, the text will be copied there
bDonNotCopyToClipboard | Whether to copy the text to the system clipboard |
References hasSelection(), m_iSelectionBegin, m_iSelectionEnd, m_szTextBuffer, and repaintWithCursorOn().
Referenced by mouseReleaseEvent().
|
slot |
Cuts the selection from the input line.
References addUndo(), KviInputEditorPrivate::bTextBlocksDirty, clearSelection(), hasSelection(), m_iSelectionBegin, m_iSelectionEnd, m_p, m_szTextBuffer, moveCursorTo(), KviInputEditor::EditCommand::RemoveText, and repaintWithCursorOn().
Referenced by cutInternal(), and showContextPopup().
|
privateslot |
|
privateslot |
Run when delete key is pressed.
References KviInputEditorPrivate::bTextBlocksDirty, clearSelection(), ensureCursorVisible(), hasSelection(), m_bReadOnly, m_iCursorPosition, m_p, m_szTextBuffer, removeSelected(), and repaintWithCursorOn().
Referenced by keyPressEvent().
|
privateslot |
Deletes next word.
References KviInputEditorPrivate::bTextBlocksDirty, hasSelection(), m_bReadOnly, m_iCursorPosition, m_p, m_szTextBuffer, removeSelected(), and repaintWithCursorOn().
Referenced by installShortcuts().
|
privateslot |
Deletes previous word.
References KviInputEditorPrivate::bTextBlocksDirty, hasSelection(), m_bReadOnly, m_iCursorPosition, m_p, m_szTextBuffer, removeSelected(), and repaintWithCursorOn().
Referenced by installShortcuts().
|
protectedvirtual |
|
protectedvirtual |
References KviInputEditorPrivate::bTextBlocksDirty, KviInputEditorTextBlock::fWidth, KviInputEditorPrivate::fXOffset, getLastFontMetrics(), KviInputEditorTextBlock::IsBold, KviInputEditorTextBlock::IsControlBlock, KviInputEditorTextBlock::IsSelected, KviInputEditorTextBlock::IsSpellingMistake, KviInputEditorTextBlock::IsUnderline, KVI_INPUT_DEF_BACK, KVI_INPUT_DEF_FORE, KVI_INPUT_MARGIN, KVI_INPUT_XTRAPADDING, KVI_OPTION_COLOR, KVI_OPTION_MIRCCOLOR, KviOption_colorInputBackground, KviOption_colorInputControl, KviOption_colorInputCursor, KviOption_colorInputForeground, KviOption_colorInputSelectionBackground, KviOption_colorInputSelectionForeground, KviInputEditorPrivate::lTextBlocks, m_bCursorOn, m_bIMComposing, m_iCursorPosition, m_iCursorWidth, m_iIMLength, m_iIMSelectionBegin, m_iIMSelectionLength, m_iIMStart, m_p, rebuildTextBlocks(), KviInputEditorTextBlock::szText, KviInputEditorTextBlock::uBackground, KviInputEditorTextBlock::uFlags, KviInputEditorTextBlock::uForeground, and xPositionFromCharIndex().
Referenced by paintEvent().
|
protectedvirtual |
|
privateslot |
Does nothing but grabs some keys combinations.
Referenced by installShortcuts().
|
private |
Moves the cursor to the end of the input line.
References ensureCursorVisible(), m_iCursorPosition, m_szTextBuffer, and repaintWithCursorOn().
Referenced by endInternal(), endInternalSelection(), historyNext(), historyPrev(), selectAll(), and setText().
|
privateslot |
Moves the cursor at the end.
References clearSelection(), and end().
Referenced by installShortcuts().
|
privateslot |
Selects until the end.
References KviInputEditorPrivate::bTextBlocksDirty, end(), m_iCursorPosition, m_iSelectionBegin, m_iSelectionEnd, m_p, and m_szTextBuffer.
Referenced by installShortcuts().
|
private |
Makes sure that the cursor is visible.
References KviInputEditorPrivate::fXOffset, getLastFontMetrics(), KVI_INPUT_MARGIN, m_iCursorPosition, m_p, m_szTextBuffer, and xPositionFromCharIndex().
Referenced by backspaceHit(), deleteHit(), end(), handleDragSelection(), home(), insertChar(), internalCursorLeft(), internalCursorRight(), moveCursorTo(), and sendPlain().
|
signal |
|
privateslot |
Run when escape key is pressed.
References escapePressed().
Referenced by installShortcuts().
|
signal |
|
protected |
References __tr2qs, KviKvsArrayCast::array(), KviKvsVariant::asString(), KviKvsArray::at(), KviInputEditorSpellCheckerBlock::bSpellCheckable, KviKvsVariant::castToArray(), KviKvsScript::evaluate(), findSpellCheckerBlockAtCursor(), g_pInputPopup, i, m_SpellCheckerPopup, m_szTextBuffer, pArray, s, KviKvsArray::size(), spellCheckerPopupCorrectionActionTriggered(), splitTextIntoSpellCheckerBlocks(), KviInputEditorSpellCheckerBlock::szText, and v.
Referenced by showContextPopup(), and showSpellCheckerCorrectionsPopup().
|
protected |
References KviPointerList< T >::first(), m_iCursorPosition, and KviPointerList< T >::next().
Referenced by fillSpellCheckerCorrectionsPopup(), showContextPopup(), and spellCheckerPopupCorrectionActionTriggered().
|
protectedvirtual |
References KVI_INPUT_BLINK_TIME, m_bCursorOn, and m_iCursorTimer.
|
protectedvirtual |
References m_bCursorOn, and m_iCursorTimer.
|
private |
Returns the current input editor font metrics (globally shared)
font | The current input editor font |
References KviInputEditorPrivate::fFontElisionWidth, g_iCachedHeight, g_pLastFontMetrics, h, KVI_INPUT_MARGIN, KVI_INPUT_XTRAPADDING, m_p, KviInputEditorPrivate::szFontElision, and w.
Referenced by applyOptions(), charIndexFromXPosition(), drawContents(), ensureCursorVisible(), rebuildTextBlocks(), and xPositionFromCharIndex().
|
staticprivate |
Gets the substitute character for control codes.
uControlCode | The control code inserted |
References KviControlCodes::Bold, KviControlCodes::CryptEscape, KviControlCodes::Icon, KviControlCodes::Reset, KviControlCodes::Reverse, and KviControlCodes::Underline.
Referenced by rebuildTextBlocks().
|
private |
Gets the word before the cursor and puts it to the buffer.
szBuffer | The buffer where to put the word got |
bIsFirstWordInLine | Returns true if the word is the first |
References m_iCursorPosition, and m_szTextBuffer.
Referenced by completion(), and standardNickCompletion().
|
private |
Handles the drag selection.
References KviInputEditorPrivate::bTextBlocksDirty, charIndexFromXPosition(), clearSelection(), ensureCursorVisible(), m_iCursorPosition, m_iSelectionAnchorChar, m_iSelectionBegin, m_iSelectionEnd, m_p, m_szTextBuffer, and repaintWithCursorOn().
Referenced by timerEvent().
|
private |
Returns true if the input line has focus.
References m_iSelectionBegin, and m_iSelectionEnd.
Referenced by backspaceHit(), copyToClipboard(), copyToSelection(), cut(), deleteHit(), deleteNextWord(), deletePreviousWord(), mouseReleaseEvent(), removeSelected(), and showContextPopup().
int KviInputEditor::heightHint | ( | ) | const |
Returns the height of the editor.
References g_iCachedHeight.
Referenced by KviInput::heightHint(), and showContextPopupHere().
|
privateslot |
Moves forward in the command history and in the history popup.
References KviPointerList< T >::at(), KviInputEditorPrivate::bTextBlocksDirty, clearSelection(), KviPointerList< T >::count(), end(), home(), KVI_OPTION_BOOL, KviOption_boolInputHistoryCursorAtEnd, m_bReadOnly, m_iCurHistoryIdx, m_p, m_pHistory, m_szSaveTextBuffer, and m_szTextBuffer.
Referenced by installShortcuts().
|
privateslot |
Moves backward in the command history and in the history popup.
References KviPointerList< T >::at(), KviInputEditorPrivate::bTextBlocksDirty, clearSelection(), KviPointerList< T >::count(), end(), home(), KVI_OPTION_BOOL, KviOption_boolInputHistoryCursorAtEnd, m_bReadOnly, m_iCurHistoryIdx, m_p, m_pHistory, m_szSaveTextBuffer, and m_szTextBuffer.
Referenced by installShortcuts().
|
private |
Moves the cursor to the start of the input line.
References ensureCursorVisible(), m_iCursorPosition, and repaintWithCursorOn().
Referenced by clear(), historyNext(), historyPrev(), homeInternal(), homeInternalSelection(), and KviTopicWidget::switchMode().
|
privateslot |
Moves the cursor at the beginning.
References clearSelection(), home(), and m_iCursorPosition.
Referenced by installShortcuts().
|
privateslot |
Selects until the beginning.
References KviInputEditorPrivate::bTextBlocksDirty, home(), m_iCursorPosition, m_iSelectionBegin, m_iSelectionEnd, and m_p.
Referenced by installShortcuts().
|
slot |
Opens the icon popup with icon description.
iId | The id of the icon |
References KviControlCodes::Icon, insertText(), and m_bReadOnly.
Referenced by KviInputEditor().
|
protectedvirtual |
|
protectedvirtual |
|
privateslot |
Inserts bold control character.
References KviControlCodes::Bold, insertChar(), and m_bReadOnly.
Referenced by installShortcuts().
void KviInputEditor::insertChar | ( | QChar | c | ) |
Inserts a character at the current position.
c | The character to insert |
References addUndo(), KviInputEditorPrivate::bTextBlocksDirty, clearSelection(), ensureCursorVisible(), KviInputEditor::EditCommand::InsertText, m_bUpdatesEnabled, m_iCursorPosition, m_iMaxBufferSize, m_iSelectionBegin, m_iSelectionEnd, m_p, m_szTextBuffer, removeSelected(), and repaintWithCursorOn().
Referenced by insertBold(), KviInput::insertChar(), insertColor(), insertIcon(), insertIconCode(), insertPlainText(), insertReset(), insertReverse(), insertUnderline(), and keyReleaseEvent().
|
privateslot |
Inserts color control character.
References insertChar(), m_bReadOnly, m_iCursorPosition, KviColorWindow::popup(), and xPositionFromCharIndex().
Referenced by installShortcuts().
|
privateslot |
Inserts icon control character.
References KviControlCodes::Icon, insertChar(), m_bReadOnly, and popupTextIconWindow().
Referenced by installShortcuts().
|
protected |
References KviControlCodes::Icon, insertChar(), insertText(), m_iCursorPosition, and m_szTextBuffer.
|
privateslot |
Inserts non-crypt (plain text) control character.
References KviControlCodes::CryptEscape, insertChar(), and m_bReadOnly.
Referenced by installShortcuts().
|
privateslot |
Inserts reset control character.
References insertChar(), m_bReadOnly, and KviControlCodes::Reset.
Referenced by installShortcuts().
|
privateslot |
Inserts reverse control character.
References insertChar(), m_bReadOnly, and KviControlCodes::Reverse.
Referenced by installShortcuts().
void KviInputEditor::insertText | ( | const QString & | szTxt | ) |
Inserts the text at the current position.
szTxt | The text to insert |
References addUndo(), KviInputEditorPrivate::bTextBlocksDirty, KviInputEditor::EditCommand::InsertText, KVI_OPTION_UINT, KviOption_uintSpacesToExpandTabulationInput, m_bUpdatesEnabled, m_iCursorPosition, m_iMaxBufferSize, m_p, m_szTextBuffer, moveCursorTo(), removeSelected(), and returnPressed().
Referenced by dropEvent(), iconPopupActivated(), insertIconCode(), KviTopicWidget::insertText(), KviInput::insertText(), keyPressEvent(), pasteClipboardWithConfirmation(), pasteSelectionWithConfirmation(), and spellCheckerPopupCorrectionActionTriggered().
|
privateslot |
Inserts underline control character.
References insertChar(), m_bReadOnly, and KviControlCodes::Underline.
Referenced by installShortcuts().
|
protected |
References copyInternal(), KviShortcut::create(), cutInternal(), deleteNextWord(), deletePreviousWord(), dummy(), endInternal(), endInternalSelection(), escapeHit(), historyNext(), historyPrev(), homeInternal(), homeInternalSelection(), insertBold(), insertColor(), insertIcon(), insertPlainText(), insertReset(), insertReverse(), insertUnderline(), KVI_SHORTCUTS_INPUT_BOLD, KVI_SHORTCUTS_INPUT_COLOR, KVI_SHORTCUTS_INPUT_COMMANDLINE, KVI_SHORTCUTS_INPUT_COPY, KVI_SHORTCUTS_INPUT_CORRECT_SPELLING, KVI_SHORTCUTS_INPUT_CUT, KVI_SHORTCUTS_INPUT_DELETE_NEXT_WORD, KVI_SHORTCUTS_INPUT_DELETE_PREV_WORD, KVI_SHORTCUTS_INPUT_DUMMY, KVI_SHORTCUTS_INPUT_END, KVI_SHORTCUTS_INPUT_END_SELECT, KVI_SHORTCUTS_INPUT_ESCAPE, KVI_SHORTCUTS_INPUT_HISTORY, KVI_SHORTCUTS_INPUT_HISTORY_NEXT, KVI_SHORTCUTS_INPUT_HISTORY_PREV, KVI_SHORTCUTS_INPUT_HOME, KVI_SHORTCUTS_INPUT_HOME_SELECT, KVI_SHORTCUTS_INPUT_ICON, KVI_SHORTCUTS_INPUT_MENU, KVI_SHORTCUTS_INPUT_NEXT_CHAR, KVI_SHORTCUTS_INPUT_NEXT_CHAR_SELECT, KVI_SHORTCUTS_INPUT_NEXT_WORD, KVI_SHORTCUTS_INPUT_NEXT_WORD_SELECT, KVI_SHORTCUTS_INPUT_PASTE, KVI_SHORTCUTS_INPUT_PLAINTEXT, KVI_SHORTCUTS_INPUT_PREV_CHAR, KVI_SHORTCUTS_INPUT_PREV_CHAR_SELECT, KVI_SHORTCUTS_INPUT_PREV_WORD, KVI_SHORTCUTS_INPUT_PREV_WORD_SELECT, KVI_SHORTCUTS_INPUT_REDO, KVI_SHORTCUTS_INPUT_RESET, KVI_SHORTCUTS_INPUT_REVERSE, KVI_SHORTCUTS_INPUT_SELECT_ALL, KVI_SHORTCUTS_INPUT_SEND_PLAIN, KVI_SHORTCUTS_INPUT_SEND_PLAIN_2, KVI_SHORTCUTS_INPUT_UNDERLINE, KVI_SHORTCUTS_INPUT_UNDO, KVI_SHORTCUTS_WIN_NEXT_LINE, KVI_SHORTCUTS_WIN_NEXT_PAGE, KVI_SHORTCUTS_WIN_PREV_LINE, KVI_SHORTCUTS_WIN_PREV_PAGE, KVI_SHORTCUTS_WIN_SCROLL_TO_LAST_READ_LINE, KVI_SHORTCUTS_WIN_SEARCH, KVI_SHORTCUTS_WIN_ZOOM_DEFAULT, KVI_SHORTCUTS_WIN_ZOOM_IN, KVI_SHORTCUTS_WIN_ZOOM_OUT, nextChar(), nextCharSelection(), nextLine(), nextPage(), nextWord(), nextWordSelection(), openHistory(), pasteInternal(), previousChar(), previousCharSelection(), previousLine(), previousPage(), previousWord(), previousWordSelection(), redoInternal(), scrollToLastReadLine(), search(), selectAllInternal(), sendPlain(), showContextPopupHere(), showSpellCheckerCorrectionsPopup(), toggleCommandMode(), undoInternal(), zoomDefault(), zoomIn(), and zoomOut().
Referenced by KviInputEditor().
|
private |
Moves the cursor one character to the left.
bShift | Whether to shift the selection |
References KviInputEditorPrivate::bTextBlocksDirty, clearSelection(), ensureCursorVisible(), m_iCursorPosition, m_iSelectionBegin, m_iSelectionEnd, and m_p.
Referenced by previousChar(), previousCharSelection(), previousWord(), and previousWordSelection().
|
private |
Moves the cursor one character to the right.
bShift | Whether to shift the selection |
References KviInputEditorPrivate::bTextBlocksDirty, clearSelection(), ensureCursorVisible(), m_iCursorPosition, m_iSelectionBegin, m_iSelectionEnd, m_p, and m_szTextBuffer.
Referenced by nextChar(), nextCharSelection(), nextWord(), and nextWordSelection().
|
inline |
Returns true if the input line is in read only state.
Referenced by KviTopicWidget::acceptClicked().
|
inlineprivate |
Returns true is there are some action in the redo stack.
Referenced by redo(), and showContextPopup().
|
inlineprivate |
Returns true is there are some action in the undo stack.
Referenced by showContextPopup(), and undo().
|
protectedvirtual |
References backspaceHit(), completion(), deleteHit(), insertText(), m_bIMComposing, m_bLastCompletionFinished, m_bReadOnly, m_szAltKeyCode, and returnHit().
|
protectedvirtual |
References KviCString::hasData(), insertChar(), m_szAltKeyCode, and KviCString::toUShort().
|
private |
Kills the drag timer.
References m_iDragTimer.
Referenced by mouseDoubleClickEvent(), mousePressEvent(), mouseReleaseEvent(), and ~KviInputEditor().
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
References copyToSelection(), hasSelection(), killDragTimer(), m_iDragTimer, and m_iSelectionAnchorChar.
|
private |
Moves the cursor to the specified position.
iIdx | The index of the character to move the cursor to |
bRepaint | Whether to repaint the input line |
References ensureCursorVisible(), m_iCursorPosition, m_szTextBuffer, and repaintWithCursorOn().
Referenced by cut(), inputMethodEvent(), insertText(), mouseDoubleClickEvent(), redo(), removeSelected(), replaceWordBeforeCursor(), and undo().
|
privateslot |
Moves to the next character.
References internalCursorRight(), and repaintWithCursorOn().
Referenced by installShortcuts().
|
privateslot |
Selects up to the next character.
References internalCursorRight(), m_iCursorPosition, m_szTextBuffer, and repaintWithCursorOn().
Referenced by installShortcuts().
|
privateslot |
Scrolls the output window down one line.
References m_pKviWindow, KviIrcView::nextLine(), and KviWindow::view().
Referenced by installShortcuts().
|
privateslot |
Scrolls the output window down one page.
References m_pKviWindow, KviIrcView::nextPage(), and KviWindow::view().
Referenced by installShortcuts().
|
privateslot |
Moves to the end of the next word.
References internalCursorRight(), m_iCursorPosition, m_szTextBuffer, and repaintWithCursorOn().
Referenced by installShortcuts().
|
privateslot |
Selects up to the end of the next word.
References internalCursorRight(), m_iCursorPosition, m_szTextBuffer, and repaintWithCursorOn().
Referenced by installShortcuts().
|
privateslot |
Opens the history popup.
References KVI_OPTION_BOOL, KviOption_boolEnableInputHistory, and m_pInputParent.
Referenced by installShortcuts().
|
protectedvirtual |
References drawContents(), KviPixmapUtils::drawPixmapWithPainter(), g_pApp, g_pMainWindow, KviWindow::isDocked(), KVI_OPTION_BOOL, KVI_OPTION_COLOR, KVI_OPTION_PIXMAP, KVI_OPTION_UINT, KviOption_boolUseCompositingForTransparency, KviOption_colorGlobalTransparencyFade, KviOption_colorInputBackground, KviOption_pixmapInputBackground, KviOption_uintGlobalTransparencyChildFadeFactor, KviOption_uintInputPixmapAlign, m_pKviWindow, p, r, and KviApplication::supportsCompositing().
|
slot |
Pastes the text to the system clipboard.
References KviWindow::id(), insertText(), KviEvent_OnInputBarPaste, KVS_TRIGGER_EVENT_2_HALTED, m_pInputParent, and m_pKviWindow.
Referenced by pasteInternal(), and showContextPopup().
|
slot |
Pastes a file to the buffer.
References KviQString::escapeKvs(), KviQString::EscapeSpace, g_pActiveWindow, m_bSpSlowFlag, and KviKvsScript::run().
Referenced by showContextPopup().
|
privateslot |
Pastes clipboard contents.
References m_bReadOnly, and pasteClipboardWithConfirmation().
Referenced by installShortcuts().
|
slot |
Pastes the text to the system clipboard.
If the system supports the mouse clipboard, the text will be copied there
References KviWindow::id(), insertText(), KviEvent_OnInputBarPaste, KVS_TRIGGER_EVENT_2_HALTED, m_pInputParent, and m_pKviWindow.
Referenced by mousePressEvent().
|
slot |
Starts a slow paste in the buffer.
References g_pActiveWindow, m_bSpSlowFlag, and KviKvsScript::run().
Referenced by showContextPopup().
|
privateslot |
Shows the text icon window at cursor position
References KVI_TEXTICON_WIN_HEIGHT, KviTextIconWindow, m_bReadOnly, m_iCursorPosition, KviTextIconWindow::popup(), and xPositionFromCharIndex().
Referenced by insertIcon(), and showContextPopup().
|
privateslot |
Moves to the previous character.
References internalCursorLeft(), and repaintWithCursorOn().
Referenced by installShortcuts().
|
privateslot |
Selects up to the previous character.
References internalCursorLeft(), m_iCursorPosition, and repaintWithCursorOn().
Referenced by installShortcuts().
|
privateslot |
Scrolls the output window up one line.
References m_pKviWindow, KviIrcView::prevLine(), and KviWindow::view().
Referenced by installShortcuts().
|
privateslot |
Scrolls the output window up one page.
References m_pKviWindow, KviIrcView::prevPage(), and KviWindow::view().
Referenced by installShortcuts().
|
privateslot |
Moves to the beginning of the previous word.
References internalCursorLeft(), m_iCursorPosition, m_szTextBuffer, and repaintWithCursorOn().
Referenced by installShortcuts().
|
privateslot |
Selects up to the beginning of the previous word.
References internalCursorLeft(), m_iCursorPosition, m_szTextBuffer, and repaintWithCursorOn().
Referenced by installShortcuts().
|
protected |
References ADD_SPELLCHECKER_BLOCK, KviControlCodes::Bold, KviInputEditorPrivate::bTextBlocksDirty, c, KviControlCodes::CryptEscape, e, KviPointerList< T >::first(), KviInputEditorTextBlock::fWidth, getLastFontMetrics(), getSubstituteChar(), KviControlCodes::getUnicodeColorBytes(), KviControlCodes::Icon, KviInputEditorTextBlock::iLength, KviInputEditorTextBlock::IsBold, KviInputEditorTextBlock::IsControlBlock, KviPointerList< T >::isEmpty(), KviInputEditorTextBlock::IsSelected, KviInputEditorTextBlock::IsSpellingMistake, KviInputEditorTextBlock::IsUnderline, KVI_INPUT_DEF_BACK, KVI_INPUT_DEF_FORE, KviInputEditorPrivate::lTextBlocks, m_iSelectionBegin, m_iSelectionEnd, m_p, m_szTextBuffer, KviPointerList< T >::next(), KviControlCodes::NoChange, NOT_CONTROL_CHAR, p, KviControlCodes::Reset, KviControlCodes::Reverse, KviPointerList< T >::setAutoDelete(), splitTextIntoSpellCheckerBlocks(), KviInputEditorTextBlock::szText, KviInputEditorTextBlock::uBackground, KviInputEditorTextBlock::uFlags, KviInputEditorTextBlock::uForeground, and KviControlCodes::Underline.
Referenced by charIndexFromXPosition(), drawContents(), and xPositionFromCharIndex().
|
slot |
Redo the last undo-ed action.
References KviInputEditorPrivate::bTextBlocksDirty, KviInputEditor::EditCommand::InsertText, isRedoAvailable(), KVI_INPUT_MAX_UNDO_SIZE, m_iSelectionBegin, m_iSelectionEnd, m_p, m_pRedoStack, m_pUndoStack, m_szTextBuffer, moveCursorTo(), KviInputEditor::EditCommand::RemoveText, KviInputEditor::EditCommand::startPosition(), KviInputEditor::EditCommand::text(), and KviInputEditor::EditCommand::type().
Referenced by redoInternal(), and showContextPopup().
|
privateslot |
Redoes last action.
References m_bReadOnly, and redo().
Referenced by installShortcuts().
|
slot |
Removes the selected text.
References addUndo(), KviInputEditorPrivate::bTextBlocksDirty, clearSelection(), hasSelection(), m_iSelectionBegin, m_iSelectionEnd, m_p, m_szTextBuffer, moveCursorTo(), KviInputEditor::EditCommand::RemoveText, and repaintWithCursorOn().
Referenced by deleteHit(), deleteNextWord(), deletePreviousWord(), inputMethodEvent(), insertChar(), and insertText().
|
private |
Repaints the input line with the visible cursor.
References m_bCursorOn, and m_bUpdatesEnabled.
Referenced by backspaceHit(), completion(), copyToClipboard(), copyToSelection(), cut(), deleteHit(), deleteNextWord(), deletePreviousWord(), end(), handleDragSelection(), home(), inputMethodEvent(), insertChar(), mousePressEvent(), moveCursorTo(), nextChar(), nextCharSelection(), nextWord(), nextWordSelection(), previousChar(), previousCharSelection(), previousWord(), previousWordSelection(), removeSelected(), replaceSegment(), replaceWordBeforeCursor(), selectAllInternal(), sendKvs(), and sendPlain().
|
private |
Replace characters in the buffer.
Returns the length of the text inserted (different from text.length() only if the buffer was truncated.
iStart | The starting character |
iLength | The length of the string to replace |
szString | The string to replace with |
References addUndo(), KviInputEditorPrivate::bTextBlocksDirty, KviInputEditor::EditCommand::InsertText, m_iMaxBufferSize, m_p, m_szTextBuffer, and repaintWithCursorOn().
Referenced by inputMethodEvent().
|
private |
Replaces the word before the cursor.
szWord | The word to replace |
szReplacement | The new word to use |
bRepaint | Whether to repain the input line |
References KviInputEditorPrivate::bTextBlocksDirty, clearSelection(), m_iCursorPosition, m_iMaxBufferSize, m_p, m_szTextBuffer, moveCursorTo(), and repaintWithCursorOn().
Referenced by completion(), and standardNickCompletionInsertCompletedText().
|
privateslot |
Run when return/enter key is pressed.
References returnPressed().
Referenced by keyPressEvent().
|
private |
Adds the text to the history.
Triggered when the user press return
bRepaint | Whether to repain the input line |
References KviInputHistory::add(), KviPointerList< T >::count(), enterPressed(), KviPointerList< T >::insert(), KviInputHistory::instance(), KVI_ASSERT, KVI_INPUT_MAX_LOCAL_HISTORY_ENTRIES, m_iCurHistoryIdx, m_pHistory, m_pInputParent, m_szTextBuffer, and KviPointerList< T >::removeLast().
Referenced by insertText(), and returnHit().
|
privateslot |
Scrolls the ircview to the last read line.
References KviIrcView::hasLineMark(), m_pKviWindow, KviIrcView::scrollToMarker(), and KviWindow::view().
Referenced by installShortcuts().
|
privateslot |
Opens the search window.
References m_pKviWindow, KviIrcView::toggleToolWidget(), and KviWindow::view().
Referenced by installShortcuts().
|
slot |
Selects all text in the input line.
References KviInputEditorPrivate::bTextBlocksDirty, end(), m_iSelectionBegin, m_iSelectionEnd, m_p, and m_szTextBuffer.
Referenced by showContextPopup().
|
privateslot |
Selects all.
References KviInputEditorPrivate::bTextBlocksDirty, m_iCursorPosition, m_iSelectionBegin, m_iSelectionEnd, m_p, m_szTextBuffer, and repaintWithCursorOn().
Referenced by installShortcuts().
|
privateslot |
Sends the message assuming it's kvs code.
References KviInputHistory::add(), KviInputEditorPrivate::bTextBlocksDirty, KviPointerList< T >::count(), KviPointerList< T >::insert(), KviInputHistory::instance(), KVI_ASSERT, KVI_INPUT_MAX_LOCAL_HISTORY_ENTRIES, m_iCurHistoryIdx, m_iCursorPosition, m_iSelectionBegin, m_iSelectionEnd, m_p, m_pHistory, m_pInputParent, m_pKviWindow, m_szTextBuffer, KviUserInput::parseCommand(), KviPointerList< T >::removeLast(), repaintWithCursorOn(), and szBuffer.
|
privateslot |
Sends plain text, ignoring initial token starting with / (a command)
References KviInputHistory::add(), KviInputEditorPrivate::bTextBlocksDirty, KviPointerList< T >::count(), ensureCursorVisible(), KviPointerList< T >::insert(), KviInputHistory::instance(), KVI_ASSERT, KVI_INPUT_MAX_LOCAL_HISTORY_ENTRIES, m_iCurHistoryIdx, m_iCursorPosition, m_iSelectionBegin, m_iSelectionEnd, m_p, m_pHistory, m_pInputParent, m_pKviWindow, m_szTextBuffer, KviUserInput::parseNonCommand(), KviPointerList< T >::removeLast(), repaintWithCursorOn(), and szBuffer.
Referenced by installShortcuts().
|
inline |
Sets the maximum buffer size.
iSize | The size of the buffer to set |
Referenced by KviTopicWidget::switchMode().
|
inline |
Sets the read only state for the input line.
bReadOnly | Whether to set the read only state |
Referenced by KviTopicWidget::switchMode().
void KviInputEditor::setText | ( | const QString | szText | ) |
Sets the text in the input line.
szText | The text to set |
References addUndo(), KviInputEditorPrivate::bTextBlocksDirty, clearSelection(), end(), m_iMaxBufferSize, m_p, m_szTextBuffer, and KviInputEditor::EditCommand::RemoveText.
Referenced by KviTopicWidget::complete(), KviInput::inputEditorEnterPressed(), KviInput::multiLineEditorButtonToggled(), KviInput::setText(), and KviTopicWidget::switchMode().
|
privateslot |
Shows the contextual popup menu at the global position pos
References __tr2qs, ACCEL_KEY, KviInputEditorSpellCheckerBlock::bCorrect, KviIconManager::BigGrin, KviInputEditorSpellCheckerBlock::bSpellCheckable, KviWindow::Channel, clear(), copyToClipboard(), cut(), KviWindow::DccChat, END_TABLE_BOLD_ROW, fillSpellCheckerCorrectionsPopup(), findSpellCheckerBlockAtCursor(), g_pApp, g_pIconManager, g_pInputPopup, KviIconManager::getSmallIcon(), hasSelection(), i, isRedoAvailable(), isUndoAvailable(), m_bReadOnly, m_bSpSlowFlag, m_pKviWindow, m_SpellCheckerPopup, m_szTextBuffer, pasteClipboardWithConfirmation(), pasteFile(), pasteSlow(), popupTextIconWindow(), KviWindow::Query, redo(), selectAll(), splitTextIntoSpellCheckerBlocks(), START_TABLE_BOLD_ROW, stopPasteSlow(), KviInputEditorSpellCheckerBlock::szText, KviWindow::type(), undo(), V, X, Y, and Z.
Referenced by mousePressEvent(), and showContextPopupHere().
|
privateslot |
Shows the context popup menu at the current cursor position
References heightHint(), KVI_INPUT_MARGIN, KVI_INPUT_XTRAPADDING, m_iCursorPosition, showContextPopup(), and xPositionFromCharIndex().
Referenced by installShortcuts().
|
privateslot |
Show the spell checker corrections popup.
References fillSpellCheckerCorrectionsPopup(), m_iCursorPosition, m_SpellCheckerPopup, and xPositionFromCharIndex().
Referenced by installShortcuts().
|
privateslot |
Handles spellchecker suggestions popup
References KviInputEditorPrivate::bTextBlocksDirty, findSpellCheckerBlockAtCursor(), KviInputEditorSpellCheckerBlock::iLength, insertText(), KviInputEditorSpellCheckerBlock::iStart, m_iSelectionBegin, m_iSelectionEnd, m_p, m_szTextBuffer, and splitTextIntoSpellCheckerBlocks().
Referenced by fillSpellCheckerCorrectionsPopup().
|
protected |
References ADD_SPELLCHECKER_BLOCK, checkWordSpelling(), e, and p.
Referenced by fillSpellCheckerCorrectionsPopup(), rebuildTextBlocks(), showContextPopup(), and spellCheckerPopupCorrectionActionTriggered().
|
private |
Completes the nickname specified by szWord (inserts the completed text to the input line)
bAddMask | Whether to complete with the mask of the nickname |
szWord | The nickname to complete |
bFirstWordInLine | Whether the word to complete is the first word in the text line (so the suffix from option panel is added) |
bInCommand | Whether the completion happens inside a kvs command (and thus the completed word should be kvs-escaped) |
References KviInputEditorPrivate::bTextBlocksDirty, clearSelection(), KviUserListView::completeNickStandard(), getWordBeforeCursor(), m_bLastCompletionFinished, m_iCursorPosition, m_iLastCompletionCursorPosition, m_p, m_pUserListView, m_szLastCompletedNick, m_szLastCompletionBuffer, m_szTextBuffer, standardNickCompletionInsertCompletedText(), and szBuffer.
Referenced by completion().
|
private |
Internal helper for standardNickCompletion()
szReplacedWord | The word replaced before the cursor |
szCompletedText | The text to be completed |
bFirstWordInLine | Whether the word to complete is the first word in the text line (so the suffix from option panel is added) |
bInCommand | Whether the completion happens inside a kvs command (and thus the completed word should be kvs-escaped) |
References completionEscapeUnsafeToken(), KVI_OPTION_BOOL, KVI_OPTION_STRING, KviOption_boolUseNickCompletionPostfixForFirstWordOnly, KviOption_stringNickCompletionPostfix, replaceWordBeforeCursor(), and szBuffer.
Referenced by standardNickCompletion().
|
slot |
Stops a slow paste in the buffer.
References g_pActiveWindow, m_bSpSlowFlag, and KviKvsScript::run().
Referenced by showContextPopup().
|
inline |
Returns the text in the buffer.
Referenced by KviTopicWidget::acceptClicked(), KviInput::inputEditorEnterPressed(), KviInput::multiLineEditorButtonToggled(), KviInput::multiLinePaste(), and KviInput::text().
QString KviInputEditor::textBeforeCursor | ( | ) |
Returns the text before the cursor.
References m_iCursorPosition, and m_szTextBuffer.
|
protectedvirtual |
References handleDragSelection(), m_bCursorOn, and m_iCursorTimer.
|
privateslot |
Toggles the commandline's KVS/User-friendly mode.
References m_pInputParent.
Referenced by installShortcuts().
|
privateslot |
|
slot |
Undo the last action.
References KviInputEditorPrivate::bTextBlocksDirty, KviInputEditor::EditCommand::InsertText, isUndoAvailable(), KVI_INPUT_MAX_UNDO_SIZE, m_iSelectionBegin, m_iSelectionEnd, m_p, m_pRedoStack, m_pUndoStack, m_szTextBuffer, moveCursorTo(), KviInputEditor::EditCommand::RemoveText, KviInputEditor::EditCommand::startPosition(), KviInputEditor::EditCommand::text(), and KviInputEditor::EditCommand::type().
Referenced by showContextPopup(), and undoInternal().
|
privateslot |
Undoes last action.
References m_bReadOnly, and undo().
Referenced by installShortcuts().
|
private |
Returns the current position from a given character.
iChIdx | Th index of the character |
References KviInputEditorPrivate::bTextBlocksDirty, KviInputEditorTextBlock::fWidth, KviInputEditorPrivate::fXOffset, getLastFontMetrics(), KviInputEditorTextBlock::iLength, KVI_INPUT_MARGIN, KviInputEditorPrivate::lTextBlocks, m_p, rebuildTextBlocks(), and KviInputEditorTextBlock::szText.
Referenced by drawContents(), ensureCursorVisible(), insertColor(), popupTextIconWindow(), showContextPopupHere(), and showSpellCheckerCorrectionsPopup().
|
privateslot |
Restore the ircview font (and its size)
References m_pKviWindow, KviIrcView::resetDefaultFont(), and KviWindow::view().
Referenced by installShortcuts().
|
privateslot |
Increase the ircview font size.
References KviIrcView::increaseFontSize(), m_pKviWindow, and KviWindow::view().
Referenced by installShortcuts().
|
privateslot |
Decrease the ircview font size.
References KviIrcView::decreaseFontSize(), m_pKviWindow, and KviWindow::view().
Referenced by installShortcuts().
|
friend |
Referenced by popupTextIconWindow().
|
friend |
|
staticprotected |
Referenced by getLastFontMetrics(), and heightHint().
|
staticprotected |
|
staticprotected |
Referenced by KviInputEditor(), and ~KviInputEditor().
|
staticprotected |
Referenced by applyOptions(), getLastFontMetrics(), and ~KviInputEditor().
|
protected |
Referenced by drawContents(), focusInEvent(), focusOutEvent(), KviInputEditor(), repaintWithCursorOn(), and timerEvent().
|
protected |
Referenced by drawContents(), inputMethodEvent(), keyPressEvent(), and KviInputEditor().
|
protected |
Referenced by keyPressEvent(), and standardNickCompletion().
|
protected |
Referenced by backspaceHit(), cutInternal(), deleteHit(), deleteNextWord(), deletePreviousWord(), historyNext(), historyPrev(), iconPopupActivated(), inputMethodEvent(), insertBold(), insertColor(), insertIcon(), insertPlainText(), insertReset(), insertReverse(), insertUnderline(), keyPressEvent(), KviInputEditor(), pasteInternal(), popupTextIconWindow(), redoInternal(), showContextPopup(), and undoInternal().
|
protected |
Referenced by pasteFile(), pasteSlow(), showContextPopup(), and stopPasteSlow().
|
protected |
Referenced by inputMethodEvent(), insertChar(), insertText(), KviInputEditor(), and repaintWithCursorOn().
|
protected |
Referenced by historyNext(), historyPrev(), KviInputEditor(), returnPressed(), sendKvs(), and sendPlain().
|
protected |
Referenced by backspaceHit(), deleteHit(), deleteNextWord(), deletePreviousWord(), drawContents(), end(), endInternalSelection(), ensureCursorVisible(), findSpellCheckerBlockAtCursor(), getWordBeforeCursor(), handleDragSelection(), home(), homeInternal(), homeInternalSelection(), inputMethodEvent(), insertChar(), insertColor(), insertIconCode(), insertText(), internalCursorLeft(), internalCursorRight(), KviInputEditor(), mousePressEvent(), moveCursorTo(), nextCharSelection(), nextWord(), nextWordSelection(), popupTextIconWindow(), previousCharSelection(), previousWord(), previousWordSelection(), replaceWordBeforeCursor(), selectAllInternal(), sendKvs(), sendPlain(), showContextPopupHere(), showSpellCheckerCorrectionsPopup(), standardNickCompletion(), and textBeforeCursor().
|
protected |
Referenced by focusInEvent(), focusOutEvent(), KviInputEditor(), timerEvent(), and ~KviInputEditor().
|
protected |
Referenced by applyOptions(), and drawContents().
|
protected |
Referenced by killDragTimer(), KviInputEditor(), mousePressEvent(), and mouseReleaseEvent().
|
protected |
Referenced by drawContents(), inputMethodEvent(), and KviInputEditor().
|
protected |
Referenced by drawContents(), inputMethodEvent(), and KviInputEditor().
|
protected |
Referenced by drawContents(), inputMethodEvent(), and KviInputEditor().
|
protected |
Referenced by drawContents(), inputMethodEvent(), and KviInputEditor().
|
protected |
Referenced by standardNickCompletion().
|
protected |
Referenced by insertChar(), insertText(), KviInputEditor(), replaceSegment(), replaceWordBeforeCursor(), and setText().
|
protected |
Referenced by handleDragSelection(), KviInputEditor(), mousePressEvent(), and mouseReleaseEvent().
|
protected |
Referenced by backspaceHit(), clearSelection(), copyToClipboard(), copyToSelection(), cut(), endInternalSelection(), handleDragSelection(), hasSelection(), homeInternalSelection(), insertChar(), internalCursorLeft(), internalCursorRight(), KviInputEditor(), mouseDoubleClickEvent(), rebuildTextBlocks(), redo(), removeSelected(), selectAll(), selectAllInternal(), sendKvs(), sendPlain(), spellCheckerPopupCorrectionActionTriggered(), and undo().
|
protected |
Referenced by backspaceHit(), clearSelection(), copyToClipboard(), copyToSelection(), cut(), endInternalSelection(), handleDragSelection(), hasSelection(), homeInternalSelection(), insertChar(), internalCursorLeft(), internalCursorRight(), KviInputEditor(), mouseDoubleClickEvent(), rebuildTextBlocks(), redo(), removeSelected(), selectAll(), selectAllInternal(), sendKvs(), sendPlain(), spellCheckerPopupCorrectionActionTriggered(), and undo().
|
protected |
Referenced by backspaceHit(), charIndexFromXPosition(), clear(), clearSelection(), cut(), deleteHit(), deleteNextWord(), deletePreviousWord(), drawContents(), endInternalSelection(), ensureCursorVisible(), getLastFontMetrics(), handleDragSelection(), historyNext(), historyPrev(), homeInternalSelection(), insertChar(), insertText(), internalCursorLeft(), internalCursorRight(), KviInputEditor(), mouseDoubleClickEvent(), rebuildTextBlocks(), redo(), removeSelected(), replaceSegment(), replaceWordBeforeCursor(), selectAll(), selectAllInternal(), sendKvs(), sendPlain(), setText(), spellCheckerPopupCorrectionActionTriggered(), standardNickCompletion(), undo(), xPositionFromCharIndex(), and ~KviInputEditor().
|
protected |
Referenced by historyNext(), historyPrev(), KviInputEditor(), returnPressed(), sendKvs(), sendPlain(), and ~KviInputEditor().
|
protected |
Referenced by KviInputEditor(), and ~KviInputEditor().
|
protected |
|
protected |
Referenced by checkWordSpelling(), completion(), dropEvent(), KviInputEditor(), nextLine(), nextPage(), paintEvent(), pasteClipboardWithConfirmation(), pasteSelectionWithConfirmation(), previousLine(), previousPage(), scrollToLastReadLine(), search(), sendKvs(), sendPlain(), showContextPopup(), zoomDefault(), zoomIn(), and zoomOut().
|
protected |
The redo stack.
Contains owned pointers and has autodelete set to true. The most recently undone command is at the end. Null when no redo is available.
Referenced by clearUndoStack(), KviInputEditor(), redo(), undo(), and ~KviInputEditor().
|
protected |
The undo stack.
Contains owned pointers and has autodelete set to true. The most recent command is at the end. Null when no undo is available.
Referenced by addUndo(), clearUndoStack(), KviInputEditor(), redo(), undo(), and ~KviInputEditor().
|
protected |
Referenced by completion(), KviInputEditor(), and standardNickCompletion().
|
protected |
Referenced by fillSpellCheckerCorrectionsPopup(), showContextPopup(), and showSpellCheckerCorrectionsPopup().
|
protected |
Referenced by keyPressEvent(), and keyReleaseEvent().
|
protected |
|
protected |
Referenced by completion(), and standardNickCompletion().
|
protected |
Referenced by standardNickCompletion().
|
protected |
Referenced by historyNext(), and historyPrev().
|
protected |
Referenced by backspaceHit(), clear(), completion(), copyToClipboard(), copyToSelection(), cut(), deleteHit(), deleteNextWord(), deletePreviousWord(), end(), endInternalSelection(), ensureCursorVisible(), fillSpellCheckerCorrectionsPopup(), getWordBeforeCursor(), handleDragSelection(), historyNext(), historyPrev(), insertChar(), insertIconCode(), insertText(), internalCursorRight(), mouseDoubleClickEvent(), moveCursorTo(), nextCharSelection(), nextWord(), nextWordSelection(), previousWord(), previousWordSelection(), rebuildTextBlocks(), redo(), removeSelected(), replaceSegment(), replaceWordBeforeCursor(), returnPressed(), selectAll(), selectAllInternal(), sendKvs(), sendPlain(), setText(), showContextPopup(), spellCheckerPopupCorrectionActionTriggered(), standardNickCompletion(), textBeforeCursor(), toggleMultiLineEditor(), and undo().
|
read |