1 #ifndef _KVI_INPUT_EDITOR_H_
2 #define _KVI_INPUT_EDITOR_H_
53 class QDragEnterEvent;
57 #define KVI_INPUT_MAX_BUFFER_SIZE 400
58 #define KVI_INPUT_XTRAPADDING 1
59 #define KVI_INPUT_MARGIN 4
60 #define KVI_INPUT_BLINK_TIME 800
61 #define KVI_INPUT_DRAG_TIMEOUT 80
62 #define KVI_INPUT_DEF_BACK 100
63 #define KVI_INPUT_DEF_FORE 101
66 #define ACCEL_KEY(k) "\t" + QKeySequence(Qt::ControlModifier | Qt::Key_##k).toString()
88 Q_PROPERTY(
int TransparencyCapable READ heightHint)
108 static int g_iInputFontCharWidth[256];
201 : m_eType(eType), m_szText(szText), m_iStartPosition(iStartPosition)
222 void setText(
const QString & szText) { m_szText = szText; }
228 const QString &
text()
const {
return m_szText; }
269 int heightHint()
const;
276 void setText(
const QString szText);
282 QString
text() {
return m_szTextBuffer; };
287 QString textBeforeCursor();
294 void insertChar(QChar
c);
301 void insertText(
const QString & szTxt);
307 void applyOptions(
bool bRefreshCachedMetrics =
true);
332 void clearUndoStack();
342 void replaceWordBeforeCursor(
const QString & szWord,
const QString & szReplacement,
bool bRepaint =
true);
353 int replaceSegment(
int iStart,
int iLength,
const QString & szString);
361 void getWordBeforeCursor(QString &
szBuffer,
bool * bIsFirstWordInLine);
368 static QChar getSubstituteChar(
unsigned short uControlCode);
373 void ensureCursorVisible();
379 void repaintWithCursorOn();
381 void clearSelection();
388 int charIndexFromXPosition(qreal fXPos);
395 qreal xPositionFromCharIndex(
int iChIdx);
401 void killDragTimer();
407 void handleDragSelection();
433 void moveCursorTo(
int iIdx,
bool bRepaint =
true);
442 void returnPressed(
bool bRepaint =
true);
452 void completion(
bool bShift);
462 void standardNickCompletion(
bool bAddMask, QString & szWord,
bool bFirstWordInLine,
bool bInCommand);
472 void standardNickCompletionInsertCompletedText(
const QString & szReplacedWord,
const QString & szCompletedText,
bool bFirstWordInLine,
bool bInCommand);
479 void internalCursorRight(
bool bShift);
486 void internalCursorLeft(
bool bShift);
505 void addUndo(EditCommand * pCommand);
512 QFontMetricsF * getLastFontMetrics(
const QFont & font);
520 void iconPopupActivated(QAction * pAction);
530 void copyToSelection(
bool bDonNotCopyToClipboard =
true);
536 void copyToClipboard();
542 void removeSelected();
566 void pasteClipboardWithConfirmation();
575 void pasteSelectionWithConfirmation();
587 void stopPasteSlow();
617 void toggleMultiLineEditor();
635 void previousCharSelection();
641 void nextCharSelection();
659 void previousWordSelection();
665 void nextWordSelection();
683 void insertUnderline();
689 void insertReverse();
695 void insertPlainText();
725 void pasteInternal();
743 void selectAllInternal();
749 void deletePreviousWord();
755 void deleteNextWord();
791 void scrollToLastReadLine();
821 void homeInternalSelection();
827 void endInternalSelection();
869 void toggleCommandMode();
899 void popupTextIconWindow();
904 void showContextPopup(
const QPoint & pos);
909 void showContextPopupHere();
914 void showSpellCheckerCorrectionsPopup();
919 void spellCheckerPopupCorrectionActionTriggered();
922 void insertIconCode(
const QString & szCode);
923 void completionEscapeUnsafeToken(QString & szToken);
924 void installShortcuts();
925 virtual void drawContents(QPainter *);
927 virtual void timerEvent(QTimerEvent *
e);
928 virtual void focusInEvent(QFocusEvent *
e);
929 virtual void focusOutEvent(QFocusEvent *
e);
930 virtual void keyPressEvent(QKeyEvent *
e);
931 virtual void keyReleaseEvent(QKeyEvent *
e);
932 virtual void mousePressEvent(QMouseEvent *
e);
933 virtual void mouseReleaseEvent(QMouseEvent *
e);
934 virtual void mouseDoubleClickEvent(QMouseEvent *
e);
935 virtual void dragEnterEvent(QDragEnterEvent *
e);
936 virtual void dropEvent(QDropEvent *
e);
937 virtual void inputMethodEvent(QInputMethodEvent *
e);
938 virtual QVariant inputMethodQuery(Qt::InputMethodQuery query)
const;
939 virtual void paintEvent(QPaintEvent *
e);
940 bool checkWordSpelling(
const QString & szWord);
943 void fillSpellCheckerCorrectionsPopup();
945 void rebuildTextBlocks();
952 void escapePressed();
961 #endif //_KVI_INPUT_EDITOR_H_
Definition: KviCString.h:105
#define KVIRC_API
Definition: kvi_settings.h:128
char s char s char s s s s s char char c s *s c s s s d c s *s d c d d d d c
Definition: KviIrcNumericCodes.h:391
#define e
Definition: detector.cpp:69
Text icon window class.
Definition: KviTextIconWindow.h:50
C++ Template based double linked pointer list class.
Base class for all windows in KVIrc.
Definition: KviWindow.h:74
Contains the KviWindow class.
char szBuffer[4096]
Definition: winamp.cpp:77
This file contains compile time settings.
User list view management class.
Definition: KviUserListView.h:226