KDEUI
ktextedit.cpp
Go to the documentation of this file.
114 void slotReplaceText(const QString &text, int replacementIndex, int /*replacedLength*/, int matchedLength);
184 //Laurent in sonnet/dialog.cpp we emit done(QString) too => it calls here twice spellCheckerFinished not necessary
196 //Laurent in sonnet/dialog.cpp we emit done(QString) too => it calls here twice spellCheckerFinished not necessary
214 void KTextEdit::Private::spellCheckerAutoCorrect(const QString& currentWord,const QString& autoCorrectWord)
225 void KTextEdit::Private::spellCheckerCorrected( const QString& oldWord, int pos,const QString& newWord)
276 void KTextEdit::Private::slotFindHighlight(const QString& text, int matchingIndex, int matchingLength)
288 void KTextEdit::Private::slotReplaceText(const QString &text, int replacementIndex, int replacedLength, int matchedLength) {
289 //kDebug() << "Replace: [" << text << "] ri:" << replacementIndex << " rl:" << replacedLength << " ml:" << matchedLength;
680 QMetaObject::invokeMethod(this, "mousePopupMenuImplementation", Q_ARG(QPoint, event->globalPos()));
888 d->replace = new KReplace(d->repDlg->pattern(), d->repDlg->replacement(), d->repDlg->options(), this);
890 if (d->replace->options() & KFind::FromCursor || d->replace->options() & KFind::FindBackwards) {
bool isWordMisspelled(const QString &word)
Checks if a given word is marked as misspelled by the highlighter.
Definition: highlighter.cpp:433
void languageChanged(const QString &language)
Emitted when the user changes the language in the spellcheck dialog shown by checkSpelling() or when ...
void highlightWord(int length, int pos)
Selects the characters at the specified position.
Definition: ktextedit.cpp:849
void mousePopupMenuImplementation(const QPoint &pos)
Definition: ktextedit.cpp:1182
static void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
Display an "Error" dialog.
Definition: kmessagebox.cpp:818
virtual void paintEvent(QPaintEvent *)
Reimplemented to paint clickMessage.
Definition: ktextedit.cpp:1152
static void information(QWidget *parent, const QString &text, const QString &caption=QString(), const QString &dontShowAgainName=QString(), Options options=Notify)
Display an "Information" dialog.
Definition: kmessagebox.cpp:960
static int startServiceByDesktopName(const QString &_name, const QString &URL, QString *error=0, QString *serviceName=0, int *pid=0, const QByteArray &startup_id=QByteArray(), bool noWait=false)
static void deleteWord(QTextCursor cursor, QTextCursor::MoveOperation op)
Definition: ktextedit.cpp:500
void setCurrentLanguage(const QString &lang)
Definition: highlighter.cpp:300
QString i18nc(const char *ctxt, const char *text)
void aboutToShowContextMenu(QMenu *menu)
Emitted before the context menu is displayed.
virtual void createHighlighter()
Allows to create a specific highlighter if reimplemented.
Definition: ktextedit.cpp:736
This interface is a workaround to keep binary compatibility in KDE4, because adding the virtual keywo...
Definition: ktextedit.h:45
KTextEdit(const QString &text, QWidget *parent=0)
Constructs a KTextEdit object.
Definition: ktextedit.cpp:317
virtual void setReadOnly(bool readOnly)
Reimplemented to set a proper "deactivated" background color.
Definition: ktextedit.cpp:807
const KShortcut & deleteWordBack()
Delete a word back from mouse/cursor position.
Definition: kstandardshortcut.cpp:338
void setCheckSpellingEnabled(bool check)
Turns background spell checking for this text edit on or off.
Definition: ktextedit.cpp:752
KAction * clear(const QObject *recvr, const char *slot, QObject *parent)
Clear the content of the focus widget.
Definition: kstandardaction.cpp:314
void changeLanguage(const QString &lang)
void setSpellCheckingConfigFileName(const QString &fileName)
Allows to override the config file where the settings for spell checking, like the current language o...
Definition: ktextedit.cpp:334
static void assignIconsToContextMenu(ContextMenus type, QList< QAction * > actions)
Assigns standard icons to the various standard text edit context menus.
Definition: kicontheme.cpp:599
KAction * replace(const QObject *recvr, const char *slot, QObject *parent)
Find and replace matches.
Definition: kstandardaction.cpp:344
virtual void deleteWordBack()
Deletes a word backwards from the current cursor position, if available.
Definition: ktextedit.cpp:507
void setCheckSpellingEnabledInternal(bool check)
Enable or disable the spellchecking.
Definition: ktextedit.cpp:760
const KShortcut & pasteSelection()
Paste the selection at mouse/cursor position.
Definition: kstandardshortcut.cpp:337
virtual void contextMenuEvent(QContextMenuEvent *)
Reimplemented from QTextEdit to add spelling related items when appropriate.
Definition: ktextedit.cpp:617
virtual void keyPressEvent(QKeyEvent *)
Reimplemented for internal reasons.
Definition: ktextedit.cpp:1121
void setLanguage(const QString &language)
Sets the language/dictionary that will be selected by default in this config dialog.
Definition: configdialog.cpp:92
StandardShortcut find(const QKeySequence &seq)
Return the StandardShortcut id of the standard accel action which uses this key sequence,...
Definition: kstandardshortcut.cpp:295
Sonnet::Highlighter * highlighter() const
Returns the current highlighter, which is 0 if spell checking is disabled.
Definition: ktextedit.cpp:741
void setSpellCheckingLanguage(const QString &language)
Set the spell check language which will be used for highlighting spelling mistakes and for the spellc...
Definition: ktextedit.cpp:344
KSharedConfigPtr config()
virtual void deleteWordForward()
Deletes a word forwards from the current cursor position, if available.
Definition: ktextedit.cpp:512
QString i18n(const char *text)
virtual void focusInEvent(QFocusEvent *)
Reimplemented to instantiate a KDictSpellingHighlighter, if spellchecking is enabled.
Definition: ktextedit.cpp:786
virtual void wheelEvent(QWheelEvent *)
Reimplemented to allow fast-wheelscrolling with Ctrl-Wheel or zoom.
Definition: ktextedit.cpp:728
static bool wheelMouseZooms()
Typically, QScrollView derived classes can be scrolled fast by holding down the Ctrl-button during wh...
Definition: kglobalsettings.cpp:707
KAction * findPrev(const QObject *recvr, const char *slot, QObject *parent)
Find a previous instance of a stored 'find'.
Definition: kstandardaction.cpp:339
KAction * findNext(const QObject *recvr, const char *slot, QObject *parent)
Find the next instance of a stored 'find'.
Definition: kstandardaction.cpp:334
group
const KShortcut & beginningOfLine()
Goto beginning of current line.
Definition: kstandardshortcut.cpp:349
void setHighlighter(Sonnet::Highlighter *_highLighter)
Sets a custom backgound spell highlighter for this text edit.
Definition: ktextedit.cpp:746
const KShortcut & paste()
Paste contents of clipboard at mouse/cursor position.
Definition: kstandardshortcut.cpp:336
QStringList suggestionsForWord(const QString &word, int max=10)
Returns a list of suggested replacements for the given misspelled word.
Definition: highlighter.cpp:423
void checkSpellingChanged(bool)
emit signal when we activate or not autospellchecking
const KShortcut & cut()
Cut selected area and store it in the clipboard.
Definition: kstandardshortcut.cpp:334
virtual bool event(QEvent *)
Reimplemented to catch "delete word" shortcut events.
Definition: ktextedit.cpp:371
void showSpellConfigDialog(const QString &configFileName, const QString &windowIcon=QString())
Opens a Sonnet::ConfigDialog for this text edit.
Definition: ktextedit.cpp:357
static void setAutoHideCursor(QWidget *w, bool enable, bool customEventFilter=false)
Sets auto-hiding the cursor for widget w.
Definition: kcursor.cpp:202
void setSpellInterface(KTextEditSpellInterface *spellInterface)
Sets the spell interface, which is used to delegate certain function calls to the interface.
Definition: ktextedit.cpp:1061
KAction * find(const QObject *recvr, const char *slot, QObject *parent)
Initiate a 'find' request in the current document.
Definition: kstandardaction.cpp:329
const KShortcut & deleteWordForward()
Delete a word forward from mouse/cursor position.
Definition: kstandardshortcut.cpp:339
void setClickMessage(const QString &msg)
This makes the text edit display a grayed-out hinting text as long as the user didn't enter any text.
Definition: ktextedit.cpp:1134
void spellCheckerAutoCorrect(const QString ¤tWord, const QString &autoCorrectWord)
static void activateWindow(WId win, long time=0)
Requests that window win is activated.
Definition: kwindowsystem_mac.cpp:355
void addWordToDictionary(const QString &word)
Adds the given word permanently to the dictionary.
Definition: highlighter.cpp:413
bool checkSpellingEnabledInternal() const
Checks whether spellchecking is enabled or disabled.
Definition: ktextedit.cpp:802
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jan 30 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jan 30 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.