Kate
kateview.cpp
Go to the documentation of this file.
124 , m_selection (m_doc->buffer(), KTextEditor::Range::invalid(), Kate::TextRange::ExpandLeft, Kate::TextRange::AllowEmpty)
143 connect(this, SIGNAL(delayedUpdateOfView()), this, SLOT(slotDelayedUpdateOfView()), Qt::QueuedConnection);
155 KTextEditor::ViewBarContainer *viewBarContainer=qobject_cast<KTextEditor::ViewBarContainer*>( KateGlobal::self()->container() );
156 QWidget *bottomBarParent=viewBarContainer?viewBarContainer->getViewBarParent(this,KTextEditor::ViewBarContainer::BottomBar):0;
157 QWidget *topBarParent=viewBarContainer?viewBarContainer->getViewBarParent(this,KTextEditor::ViewBarContainer::TopBar):0;
159 m_bottomViewBar=new KateViewBar (bottomBarParent!=0,KTextEditor::ViewBarContainer::BottomBar,bottomBarParent?bottomBarParent:this,this);
160 m_topViewBar=new KateViewBar (topBarParent!=0,KTextEditor::ViewBarContainer::TopBar,topBarParent?topBarParent:this,this);
214 m_vBox->addSpacing (style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing, &option, this));
233 viewBarContainer->addViewBarToLayout(this,m_bottomViewBar,KTextEditor::ViewBarContainer::BottomBar);
282 connect(this, SIGNAL(displayRangeChanged(KateView*)), m_topMessageWidget, SLOT(startAutoHideTimer()));
283 connect(this, SIGNAL(displayRangeChanged(KateView*)), m_bottomMessageWidget, SLOT(startAutoHideTimer()));
286 connect(this, SIGNAL(cursorPositionChanged(KTextEditor::View*, const KTextEditor::Cursor&)), m_topMessageWidget, SLOT(startAutoHideTimer()));
287 connect(this, SIGNAL(cursorPositionChanged(KTextEditor::View*, const KTextEditor::Cursor&)), m_bottomMessageWidget, SLOT(startAutoHideTimer()));
303 KTextEditor::ViewBarContainer *viewBarContainer=qobject_cast<KTextEditor::ViewBarContainer*>( KateGlobal::self()->container() );
335 connect( m_doc, SIGNAL(annotationModelChanged(KTextEditor::AnnotationModel*,KTextEditor::AnnotationModel*)),
336 m_viewInternal->m_leftBorder, SLOT(annotationModelChanged(KTextEditor::AnnotationModel*,KTextEditor::AnnotationModel*)) );
359 a->setWhatsThis(i18n( "Use this command to copy the currently selected text to the system clipboard."));
361 m_pasteMenu = ac->addAction("edit_paste_menu", new KatePasteMenu (i18n("Clipboard &History"), this));
362 connect (KateGlobal::self(), SIGNAL(clipboardHistoryChanged()), this, SLOT(slotClipboardHistoryChanged()));
381 a->setWhatsThis(i18n("Use this command to wrap all lines of the current document which are longer than the width of the"
382 " current view, to fit into this view.<br /><br /> This is a static word wrap, meaning it is not updated"
388 a->setWhatsThis(i18n("Use this to clean the indentation of a selected block of text (only tabs/only spaces).<br /><br />"
389 "You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog."));
394 a->setWhatsThis(i18n("Use this to align the current line or block of text to its proper indent level."));
400 a->setWhatsThis(i18n("This command comments out the current line or a selected block of text.<br /><br />"
401 "The characters for single/multiple line comments are defined within the language's highlighting."));
407 a->setWhatsThis(i18n("This command removes comments from the current line or a selected block of text.<br /><br />"
408 "The characters for single/multiple line comments are defined within the language's highlighting."));
449 a->setWhatsThis(i18n("Manually invoke command completion, usually by using a shortcut bound to this action."));
485 a->setWhatsThis(i18n("This command opens a dialog and lets you choose a line that you want the cursor to move to."));
494 ftm->setWhatsThis(i18n("Here you can choose which mode should be used for the current document. This will influence the highlighting and folding being used, for example."));
499 menu->setWhatsThis(i18n("Here you can choose how the current document should be highlighted."));
507 KateViewIndentationAction *indentMenu = new KateViewIndentationAction(m_doc, i18n("&Indentation"), this);
514 a->setWhatsThis(i18n("If you have selected something within the current document, this will no longer be selected."));
533 a->setWhatsThis(i18n("This command allows switching between the normal (line based) selection mode and the block selection mode."));
539 a->setWhatsThis(i18n("Choose whether you want the text you type to be inserted or to overwrite existing text."));
546 a->setWhatsThis(i18n("If this option is checked, the text lines will be wrapped at the view border on the screen."));
559 m_setDynWrapIndicators->setEnabled(m_toggleDynWrap->isChecked()); // only synced on real change, later
561 a = toggleAction = m_toggleFoldingMarkers = new KToggleAction(i18n("Show Folding &Markers"), this);
564 a->setWhatsThis(i18n("You can choose if the codefolding marks should be shown, if codefolding is possible."));
570 a->setWhatsThis(i18n("Show/hide the icon border.<br /><br />The icon border shows bookmark symbols, for instance."));
579 a = m_toggleScrollBarMarks = toggleAction = new KToggleAction(i18n("Show Scroll&bar Marks"), this);
581 a->setWhatsThis(i18n("Show/hide the marks on the vertical scrollbar.<br /><br />The marks show bookmarks, for instance."));
584 a = m_toggleScrollBarMiniMap = toggleAction = new KToggleAction(i18n("Show Scrollbar Mini-Map"), this);
586 a->setWhatsThis(i18n("Show/hide the mini-map on the vertical scrollbar.<br /><br />The mini-map shows an overview of the whole document."));
589 // a = m_toggleScrollBarMiniMapAll = toggleAction = new KToggleAction(i18n("Show the whole document in the Mini-Map"), this);
591 // a->setWhatsThis(i18n("Display the whole document in the mini-map.<br /><br />With this option set the whole document will be visible in the mini-map."));
593 // connect(m_toggleScrollBarMiniMap, SIGNAL(triggered(bool)), m_toggleScrollBarMiniMapAll, SLOT(setEnabled(bool)));
595 a = toggleAction = m_toggleWWMarker = new KToggleAction(i18n("Show Static &Word Wrap Marker"), this);
633 a->setWhatsThis(i18n("Enable/disable adding of byte order markers for UTF-8/UTF-16 encoded files while saving"));
636 KateViewEncodingAction *encodingAction = new KateViewEncodingAction(m_doc, this, i18n("E&ncoding"), this);
640 a->setWhatsThis(i18n("Look up the first occurrence of a piece of text or regular expression."));
664 a->setWhatsThis(i18n("Look up a piece of text or regular expression and replace the result with some given text."));
670 connect(m_toggleOnTheFlySpellCheck, SIGNAL(triggered(bool)), SLOT(toggleOnTheFlySpellCheck(bool)));
681 a->setWhatsThis(i18n("Remove all the separate dictionary ranges that were set for spell checking."));
703 connect (this, SIGNAL(selectionChanged(KTextEditor::View*)), this, SLOT(slotSelectionChanged()));
983 a->setWhatsThis(i18n("Insert newline including leading characters of the current line which are not letters or numbers."));
995 "You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog."));
1102 QVector<QPair<qint64, Kate::TextFolding::FoldingRangeFlags> > startingRanges = textFolding().foldingRangesStartingOnLine (startLine);
1107 textFolding().newFoldingRange (doc()->buffer().computeFoldingRangeForStartLine (startLine), Kate::TextFolding::Folded);
1117 QVector<QPair<qint64, Kate::TextFolding::FoldingRangeFlags> > startingRanges = textFolding().foldingRangesStartingOnLine (startLine);
1217 m_pasteMenu->setEnabled (m_doc->isReadWrite() && !KateGlobal::self()->clipboardHistory().isEmpty());
1246 m_pasteMenu->setEnabled (m_doc->isReadWrite() && !KateGlobal::self()->clipboardHistory().isEmpty());
1278 bool KateView::setCursorPositionInternal( const KTextEditor::Cursor& position, uint tabwidth, bool calledExternally )
1297 m_viewInternal->updateCursor( KTextEditor::Cursor(position.line(), x), false, true, calledExternally );
1345 setCursorPositionInternal(KTextEditor::Cursor(config.readEntry("CursorLine",0), config.readEntry("CursorColumn",0)));
2035 int selectionColumn = qMin(m_doc->toVirtualColumn(selection.start()), m_doc->toVirtualColumn(selection.end()));
2037 newSelection.start().setColumn(m_doc->fromVirtualColumn(newSelection.start().line(), selectionColumn));
2038 newSelection.end().setColumn(m_doc->fromVirtualColumn(newSelection.end().line(), selectionColumn));
2079 && (lineEndPos.line() > m_selection.start().line() || (lineEndPos.line() == m_selection.start().line() && (m_selection.start().column() < lineEndPos.column() || lineEndPos.column() == -1)))
2080 && (lineEndPos.line() < m_selection.end().line() || (lineEndPos.line() == m_selection.end().line() && (lineEndPos.column() <= m_selection.end().column() && lineEndPos.column() != -1)));
2102 } else if (blockSelection() && (oldSelection.start().column() != m_selection.start().column() || oldSelection.end().column() != m_selection.end().column())) {
2142 while (start > 0 && m_doc->highlight()->isInWord(textLine->at(start - 1), textLine->attribute(start - 1))) start--;
2143 while (end < len && m_doc->highlight()->isInWord(textLine->at(end), textLine->attribute(start - 1))) end++;
2215 // when leaving block selection mode, if cursor is at an invalid position or past the end of the
2245 void KateView::slotTextInserted ( KTextEditor::View *view, const KTextEditor::Cursor &position, const QString &text)
2277 KateTemplateScript* kateTemplateScript = KateGlobal::self()->scriptManager()->templateScript(templateScript);
2282 new KateTemplateHandler(this, c, templateString, initialValues, m_doc->undoManager(), kateTemplateScript);
2329 void KateView::startCompletion( const KTextEditor::Range & word, KTextEditor::CodeCompletionModel * model )
2364 void KateView::sendCompletionExecuted(const KTextEditor::Cursor& position, KTextEditor::CodeCompletionModel* model, const QModelIndex& index)
2381 m_doc->paste( this, textToPaste ? *textToPaste : QApplication::clipboard()->text(QClipboard::Clipboard) );
3049 kDebug() << "trigger attribute changed from" << startLine << "to" << endLine << "rangeWithAttribute" << rangeWithAttribute;
3088 kDebug() << "delayed attribute changed from" << m_lineToUpdateMin << "to" << m_lineToUpdateMax;
3113 QSet<Kate::TextRange *> &oldSet = (activationType == KTextEditor::Attribute::ActivateMouseIn) ? m_rangesMouseIn : m_rangesCaretIn;
3116 KTextEditor::Cursor currentCursor = (activationType == KTextEditor::Attribute::ActivateMouseIn) ? m_viewInternal->getMouse() : m_viewInternal->getCursor ();
3127 QList<Kate::TextRange *> rangesForCurrentCursor = m_doc->buffer().rangesForLine (currentCursor.line(), this, false);
3132 if ((!range->attribute() || !range->attribute()->dynamicAttribute (activationType)) && !range->feedback())
3137 ? (currentCursor < range->start().toCursor ()) : (currentCursor <= range->start().toCursor ()))
3176 if (range->toRange().isValid() && range->attribute() && range->attribute()->dynamicAttribute (activationType))
3203 m_notificationLayout->insertWidget(0, m_floatTopMessageWidget, 0, Qt::AlignTop | Qt::AlignRight);
3204 connect(this, SIGNAL(displayRangeChanged(KateView*)), m_floatTopMessageWidget, SLOT(startAutoHideTimer()));
3205 connect(this, SIGNAL(cursorPositionChanged(KTextEditor::View*, const KTextEditor::Cursor&)), m_floatTopMessageWidget, SLOT(startAutoHideTimer()));
3211 m_notificationLayout->addWidget(m_floatBottomMessageWidget, 0, Qt::AlignBottom | Qt::AlignRight);
3212 connect(this, SIGNAL(displayRangeChanged(KateView*)), m_floatBottomMessageWidget, SLOT(startAutoHideTimer()));
3213 connect(this, SIGNAL(cursorPositionChanged(KTextEditor::View*, const KTextEditor::Cursor&)), m_floatBottomMessageWidget, SLOT(startAutoHideTimer()));
void editEnd(int editTagLineStart, int editTagLineEnd, bool tagFrom)
Definition: kateviewinternal.cpp:3325
void align(KateView *view, const KTextEditor::Range &range)
Definition: katedocument.cpp:2908
void cursorPrevChar(bool sel=false)
Definition: kateviewinternal.cpp:1061
void updateViModeBarMode()
Update vi mode statusbar according to the current mode.
Definition: kateview.cpp:1548
const QString getVerbatimKeys() const
Definition: kateviinputmodemanager.cpp:554
void writeConfig(KConfig *config=0)
Write editor configuration to given config object.
Definition: kateglobal.cpp:274
Cursor & start()
void viEnterNormalMode()
set normal mode to be the active vi mode and perform the needed setup work
Definition: kateviinputmodemanager.cpp:472
bool tagLines(int start, int end, bool realLines=false)
Definition: kateview.cpp:1863
QMenu * defaultContextMenu(QMenu *menu=0L) const
Definition: kateview.cpp:2819
void setReplacementPattern(const QString &replacementPattern)
Set the current replacement pattern.
Definition: katesearchbar.cpp:226
KTextEditor::MovingRangeFeedback * feedback() const
Gets the active MovingRangeFeedback for this range.
Definition: katetextrange.h:195
const KShortcut & deleteWordForward()
KAction * print(const QObject *recvr, const char *slot, QObject *parent)
const QColor & selectionColor() const
Definition: kateconfig.cpp:2199
QScriptValue i18n(QScriptContext *context, QScriptEngine *engine)
i18n("text", arguments [optional])
Definition: katescripthelpers.cpp:186
void setShortcuts(const QList< QKeySequence > &shortcuts, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
void viewModeChanged(KTextEditor::View *view)
void addBarWidget(KateViewBarWidget *newBarWidget)
Adds a widget to this viewbar.
Definition: kateviewhelpers.cpp:2437
const KShortcut & next()
void setSearchPattern(const QString &searchPattern)
Set the current search pattern.
Definition: katesearchbar.cpp:942
void sendCompletionExecuted(const KTextEditor::Cursor &position, KTextEditor::CodeCompletionModel *model, const QModelIndex &index)
Definition: kateview.cpp:2364
const KTextEditor::MovingCursor & start() const
Retrieve start cursor of this range, read-only.
Definition: katetextrange.h:119
virtual KActionCollection * actionCollection() const
virtual int column() const =0
KAction * undo(const QObject *recvr, const char *slot, QObject *parent)
bool tagRange(const KTextEditor::Range &range, bool realCursors)
Definition: kateviewinternal.cpp:2051
void contextMenuAboutToShow(KTextEditor::View *view, QMenu *menu)
void popupMenu(const QPoint &global, const KFileItemList &items, const KParts::OpenUrlArguments &args=KParts::OpenUrlArguments(), const KParts::BrowserArguments &browserArgs=KParts::BrowserArguments(), KParts::BrowserExtension::PopupFlags flags=KParts::BrowserExtension::DefaultPopupItems, const KParts::BrowserExtension::ActionGroupMap &actionGroups=ActionGroupMap())
virtual bool isValid() const
const QColor & replaceHighlightColor() const
Definition: kateconfig.cpp:2559
int column() const
Retrieve the column on which this cursor is situated.
Definition: katetextcursor.h:141
void setAnnotationBorderOn(bool enable)
Definition: kateviewhelpers.cpp:1301
virtual void startCompletion(const KTextEditor::Range &word, KTextEditor::CodeCompletionModel *model)
Definition: kateview.cpp:2329
const KShortcut & forwardWord()
QScriptValue i18nc(QScriptContext *context, QScriptEngine *engine)
i18nc("context", "text", arguments [optional])
Definition: katescripthelpers.cpp:210
void removeClient(KXMLGUIClient *client)
bool rangePointerValid(TextRange *range) const
Check if the given range pointer is still valid.
Definition: katetextbuffer.h:429
void configDialog(QWidget *parent)
Shows a config dialog for the part, changes will be applied to the editor, but not saved anywhere aut...
Definition: kateglobal.cpp:303
void bottomOfView(bool sel=false)
Definition: kateviewinternal.cpp:1473
void setCaretStyle(KateRenderer::caretStyles style, bool repaint=false)
Set the caret's style.
Definition: kateview.cpp:2388
void setText(const QString &text, bool selected=true)
Definition: kateviewhelpers.cpp:839
void setScrollBarMiniMapAll(bool on)
Definition: kateconfig.cpp:1452
QString getCommentStart(int attrib=0) const
Definition: katehighlight.cpp:1119
void editSetCursor(const KTextEditor::Cursor &cursor)
Definition: kateviewinternal.cpp:3379
void createActions(KActionCollection *ac)
Definition: spellingmenu.cpp:95
Definition: katemodemenu.h:33
virtual bool isAutomaticInvocationEnabled() const
Definition: kateview.cpp:2354
void onTheFlySpellCheckingEnabled(bool enable)
Definition: katedocument.cpp:5152
void pageUp(bool sel=false, bool half=false)
Definition: kateviewinternal.cpp:1513
Definition: katesearchbar.h:47
QPoint cursorToCoordinate(const KTextEditor::Cursor &cursor, bool realCursor=true, bool includeBorder=true) const
Definition: kateviewinternal.cpp:712
Inserts a template and offers advanced snippet features, like navigation and mirroring.
Definition: katetemplatehandler.h:73
virtual bool mouseTrackingEnabled() const
Definition: kateview.cpp:2304
virtual bool documentReload()
Reloads the current document from disk if possible.
Definition: katedocument.cpp:3805
void updateMenu(KateDocument *doc)
Definition: katehighlightmenu.cpp:66
Definition: katesearchbar.h:73
void showViModeEmulatedCommandBar()
Definition: kateview.cpp:1540
void readSessionConfig(const KConfigGroup &)
Definition: kateview.cpp:1342
const KShortcut & zoomIn()
BrowserExtension * browserExtension() const
void copyToClipboard(const QString &text)
Copy text to clipboard an remember it in the history.
Definition: kateglobal.cpp:547
QAction * addAction(const QString &name, QAction *action)
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
virtual void setXMLFile(const QString &file, bool merge=false, bool setXMLDoc=true)
bool tagLine(const KTextEditor::Cursor &virtualCursor)
Definition: kateview.cpp:1853
Definition: katedialogs.h:113
KXMLGUIFactory * factory() const
void slotClipboardHistoryChanged()
Definition: kateview.cpp:1244
void setSelectionColor(const QColor &col)
Definition: kateconfig.cpp:2207
void toggleOnTheFlySpellCheck(bool b)
Definition: kateview.cpp:3029
virtual QWidget * getViewBarParent(View *view, enum Position position)=0
bool setCursorPosition(KTextEditor::Cursor position)
Definition: kateview.cpp:2393
KTextEditor::AnnotationModel * annotationModel() const
Definition: kateview.cpp:3006
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void bomSetByUser()
Set that the BOM marker is forced via the tool menu.
Definition: katedocument.cpp:1536
void removeView(KTextEditor::View *view)
Definition: katepartpluginmanager.cpp:136
Definition: spellcheckdialog.h:49
Kate::TextLine plainKateTextLine(uint i)
Definition: katedocument.cpp:4713
void indent(KTextEditor::Range range, int change)
Definition: katedocument.cpp:2898
bool tagRange(const KTextEditor::Range &range, bool realLines=false)
Definition: kateview.cpp:1858
Definition: katebookmarks.h:34
virtual void registerCompletionModel(KTextEditor::CodeCompletionModel *model)
Definition: kateview.cpp:2344
int fromVirtualColumn(int line, int column) const
Definition: katedocument.cpp:2579
const QStringList & clipboardHistory() const
Clipboard history, filled with text we ever copied to clipboard via copyToClipboard.
Definition: kateglobal.h:423
KUrl url
void showDialog(KateView *view)
Show the snippet dialog, used by most simple apps using just KatePart.
Definition: katesnippetglobal.cpp:61
KateViInputModeManager * getViInputModeManager()
Definition: kateview.cpp:1567
void textInserted(KTextEditor::View *view, const KTextEditor::Cursor &position, const QString &text)
void comment(KateView *view, uint line, uint column, int change)
Definition: katedocument.cpp:3301
bool cursorSelected(const KTextEditor::Cursor &cursor)
Definition: kateview.cpp:2058
KSharedConfigPtr config()
bool unfoldRange(qint64 id, bool remove=false)
Unfold the given range.
Definition: katetextfolding.cpp:191
virtual void addViewBarToLayout(View *view, QWidget *bar, enum Position position)=0
bool tagLines(int start, int end, bool realLines=false)
Definition: kateviewinternal.cpp:1965
Definition: katescriptconsole.h:72
void createActions(KActionCollection *)
Definition: spellcheckdialog.cpp:62
Definition: kateschema.h:80
void unregisterCompletionModel(KTextEditor::CodeCompletionModel *model)
Definition: katecompletionwidget.cpp:1218
void setScrollBarMiniMapWidth(int width)
Definition: kateview.cpp:1451
Definition: katehighlightmenu.h:30
virtual void mouseEnteredRange(MovingRange *range, View *view)
virtual const KTextEditor::Range & selectionRange() const
Definition: kateview.cpp:2760
void cursorToMatchingBracket(bool sel=false)
Definition: kateviewinternal.cpp:1456
Definition: katedocument.h:734
Handles all of the work of rendering the text (used for the views and printing)
Definition: katerenderer.h:50
void displayRangeChanged(KateView *view)
KateCompletionWidget * completionWidget() const
Definition: kateview.cpp:2321
void setIconBorderOn(bool enable)
Definition: kateviewhelpers.cpp:1289
void setFoldingMarkersOn(bool enable)
Definition: kateviewhelpers.cpp:1352
MessagePosition position() const
void setConfigValue(const QString &key, const QVariant &value)
Definition: kateview.cpp:2894
void registerView(KateView *view)
register view at the factory this allows us to loop over all views for example on config changes ...
Definition: kateglobal.cpp:485
QVector< QPair< qint64, FoldingRangeFlags > > foldingRangesStartingOnLine(int line) const
Queries which folding ranges start at the given line and returns the id + flags for all of them...
Definition: katetextfolding.cpp:476
This is the code completion's main widget, and also contains the core interface logic.
Definition: katecompletionwidget.h:55
const KShortcut & zoomOut()
void cursorNextChar(bool sel=false)
Definition: kateviewinternal.cpp:1069
virtual bool isValid() const
virtual bool setSelection(const KTextEditor::Range &selection)
Definition: kateview.cpp:1931
void transform(KateView *view, const KTextEditor::Cursor &, TextTransform)
Handling uppercase, lowercase and capitalize for the view.
Definition: katedocument.cpp:3383
static KUrl::List fromMimeData(const QMimeData *mimeData, KUrl::MetaDataMap *metaData=0)
void uppercase()
Uppercases selected text, or an alphabetic character next to the cursor.
Definition: kateview.cpp:2513
virtual KComponentData componentData() const
void configChanged()
void editEnd(int editTagLineStart, int editTagLineEnd, bool tagFrom)
Definition: kateview.cpp:1841
KateSnippetGlobal * snippetGlobal()
global instance of the snippet handling lazy constructed on first use to allow it to use the session ...
Definition: kateglobal.cpp:250
bool scrollBarMiniMapAll()
Definition: kateviewinternal.h:72
void setDynWrapIndicators(int state)
Definition: kateviewhelpers.cpp:1339
const KShortcut & endOfLine()
virtual void unregisterCompletionModel(KTextEditor::CodeCompletionModel *model)
Definition: kateview.cpp:2349
QPoint cursorToCoordinate(const KTextEditor::Cursor &cursor) const
Definition: kateview.cpp:2408
bool viInputModeStealKeys() const
Definition: kateconfig.cpp:1716
void postMessage(KTextEditor::Message *message, QList< QSharedPointer< QAction > > actions)
Used by Document::postMessage().
Definition: kateview.cpp:3192
void setView(KTextEditor::View *view)
Sets the currently active view for this range.
Definition: katetextrange.cpp:243
static BrowserExtension * childObject(QObject *obj)
Definition: kateviewinternal.h:57
static Range invalid()
QList< QAction * > actions() const
This class implements a message widget based on KMessageWidget.
Definition: katemessagewidget.h:42
bool isReadWrite() const
int line() const
Retrieve the line on which this cursor is situated.
Definition: katetextcursor.cpp:132
const KTextEditor::Range toRange() const
Convert this clever range into a dumb one.
Definition: katetextrange.h:143
const KShortcut & backwardWord()
const KShortcut & beginningOfLine()
virtual bool insertTemplateTextImplementation(const KTextEditor::Cursor &, const QString &templateString, const QMap< QString, QString > &initialValues)
Definition: kateview.cpp:2250
void completionExecuted(KTextEditor::View *view, const KTextEditor::Cursor &position, KTextEditor::CodeCompletionModel *model, const QModelIndex &)
Definition: spellingmenu.h:40
void registerCompletionModel(KTextEditor::CodeCompletionModel *model)
Definition: katecompletionwidget.cpp:1201
void setCaretStyle(KateRenderer::caretStyles style, bool repaint=false)
Set the caret's style.
Definition: kateviewinternal.cpp:1804
virtual void mouseExitedRange(MovingRange *range, View *view)
virtual void caretExitedRange(MovingRange *range, View *view)
void writeSessionConfig(KConfigGroup &config)
Definition: kateviinputmodemanager.cpp:612
KAction * redo(const QObject *recvr, const char *slot, QObject *parent)
void openUrlRequest(const KUrl &url, const KParts::OpenUrlArguments &arguments=KParts::OpenUrlArguments(), const KParts::BrowserArguments &browserArguments=KParts::BrowserArguments())
void setBackgroundColor(const QColor &col)
Definition: kateconfig.cpp:2186
void setReplacementPattern(const QString &replacementPattern)
Set the current replacement pattern.
Definition: kateview.cpp:2456
virtual void setComponentData(const KComponentData &componentData)
void updateRangesIn(KTextEditor::Attribute::ActivationType activationType)
check if ranges changed for mouse in and caret in
Definition: kateview.cpp:3107
QString replacementPattern() const
Definition: katesearchbar.cpp:237
const KShortcut & reload()
void setScrollBarMiniMapAll(bool enable)
Definition: kateview.cpp:1441
void delayedUpdateOfView()
Delayed update for view after text ranges changed.
Definition: katesearchbar.h:72
Definition: katedocument.h:734
static KatePartPluginManager * self()
Definition: katepartpluginmanager.cpp:70
void dropEventPass(QDropEvent *)
void cursorPositionChanged(KTextEditor::View *view, const KTextEditor::Cursor &newPosition)
void annotationModelChanged(KTextEditor::AnnotationModel *oldmodel, KTextEditor::AnnotationModel *newmodel)
Definition: kateviewhelpers.cpp:2191
void focusIn(KTextEditor::View *view)
Definition: kateview.h:78
const Cursor toCursor() const
void setLineNumbersOn(bool enable)
Definition: kateviewhelpers.cpp:1326
void unfoldLine(int startLine)
Try to unfold all foldings starting at the given line.
Definition: kateview.cpp:1110
void setShortcut(const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
static void setAutoHideCursor(QWidget *w, bool enable, bool customEventFilter=false)
void slotTextInserted(KTextEditor::View *view, const KTextEditor::Cursor &position, const QString &text)
Definition: kateview.cpp:2245
void setSearchPattern(const QString &searchPattern)
Set the current search pattern.
Definition: kateview.cpp:2451
virtual bool setMouseTrackingEnabled(bool enable)
Definition: kateview.cpp:2310
Definition: katedocument.h:74
void setAutomaticCompletionInvocation(bool on)
Definition: kateconfig.cpp:1763
This action provides a list of available indenters and gets plugged into the KateView's KActionCollec...
Definition: kateautoindent.h:235
bool isAnnotationBorderVisible() const
Definition: kateview.cpp:3016
void readSessionConfig(const KConfigGroup &config)
Definition: kateviinputmodemanager.cpp:576
void userInvokedCompletion()
Definition: katecompletionwidget.cpp:1320
void pageDown(bool sel=false, bool half=false)
Definition: kateviewinternal.cpp:1555
Tools > Scripts menu This menu is filled with the command line scripts exported via the scripting sup...
Definition: katescriptaction.h:55
static void nextMatchForSelection(KateView *view, SearchDirection searchDirection)
Definition: katesearchbar.cpp:1228
Definition: kateviewhelpers.h:408
KGuiItem ok()
bool isLineVisible(int line, qint64 *foldedRangeId=0) const
Query if a given line is visible.
Definition: katetextfolding.cpp:281
void capitalize()
Capitalizes the selection (makes each word start with an uppercase) or the word under the cursor...
Definition: kateview.cpp:2528
void setSearchHighlightColor(const QColor &col)
Definition: kateconfig.cpp:2546
virtual void caretEnteredRange(MovingRange *range, View *view)
Definition: katedialogs.h:133
KTextEditor::Cursor cursorPositionVirtual() const
Definition: kateview.cpp:2403
void postMessage(KTextEditor::Message *message, QList< QSharedPointer< QAction > > actions)
Post a new incoming message.
Definition: katemessagewidget.cpp:186
void setInsertBehaviors(InsertBehaviors insertBehaviors)
Set insert behaviors.
Definition: katetextrange.cpp:68
virtual int line() const
bool isCompletionActive() const
Definition: katecompletionwidget.cpp:746
void setAnnotationModel(KTextEditor::AnnotationModel *model)
Definition: kateview.cpp:2999
virtual InsertBehavior insertBehavior() const =0
QList< TextRange * > rangesForLine(int line, KTextEditor::View *view, bool rangesWithAttributeOnly) const
Return the ranges which affect the given line.
Definition: katetextbuffer.cpp:872
const KTextEditor::MovingCursor & end() const
Retrieve end cursor of this range, read-only.
Definition: katetextrange.h:131
virtual int line() const =0
QAction * action(const char *name) const
KXMLGUIClient * parentClient() const
virtual void deleteViewBarForView(View *view, enum Position position)=0
void addView(KTextEditor::View *view)
Definition: katepartpluginmanager.cpp:124
bool automaticCompletionInvocation() const
Definition: kateconfig.cpp:1755
const KShortcut & deleteWordBack()
Definition: katewordcompletion.h:85
void tagSelection(const KTextEditor::Range &oldSelection)
Definition: kateview.cpp:2093
void prepareForDynWrapChange()
Definition: kateviewinternal.cpp:241
void updateViModeBarCmd()
Update vi mode statusbar with the (partial) vi command being typed.
Definition: kateview.cpp:1555
void showBarWidget(KateViewBarWidget *barWidget)
Shows barWidget that was previously added with addBarWidget.
Definition: kateviewhelpers.cpp:2501
void setAnnotationBorderVisible(bool visible)
Definition: kateview.cpp:3011
void focusOut(KTextEditor::View *view)
QString getCommentSingleLineStart(int attrib=0) const
Definition: katehighlight.cpp:1129
KateViEmulatedCommandBar * viModeEmulatedCommandBar()
Definition: kateview.cpp:2989
const KShortcut & prior()
KToggleAction * m_toggleOnTheFlySpellCheck
Definition: kateview.h:758
KateViInputModeManager * resetViInputModeManager()
Replace ViInputModeManager by new one.
Definition: kateview.cpp:1572
void setMimeType(const QString &mime)
void selectionChanged(KTextEditor::View *view)
Cursor & end()
void setUseMouseForMisspelledRange(bool b)
This method has to be called before the menu is shown in response to a context menu event...
Definition: spellingmenu.cpp:161
Definition: katehighlight.h:119
bool containsLine(int line) const
void startCompletion(KTextEditor::CodeCompletionModel::InvocationType invocationType, const QList< KTextEditor::CodeCompletionModel * > &models=QList< KTextEditor::CodeCompletionModel * >())
Definition: katecompletionwidget.cpp:286
QSharedPointer< TextLineData > TextLine
The normal world only accesses the text lines with shared pointers.
Definition: katetextline.h:443
void notifyAboutRangeChange(int startLine, int endLine, bool rangeWithAttribute)
Attribute of a range changed or range with attribute changed in given line range. ...
Definition: kateview.cpp:3045
void setRange(const KTextEditor::Range &range)
Set the range of this range.
Definition: katetextrange.cpp:122
ActivationType
const QColor & searchHighlightColor() const
Definition: kateconfig.cpp:2538
bool isRecordingMacro()
Definition: kateviinputmodemanager.cpp:340
void addAssociatedWidget(QWidget *widget)
bool isOnTheFlySpellCheckingEnabled() const
Definition: katedocument.cpp:5172
static QString modeToString(ViMode mode)
convert mode to string representation for user
Definition: kateviinputmodemanager.cpp:866
void setZDepth(qreal zDepth)
Set the current Z-depth of this range.
Definition: katetextrange.cpp:306
Definition: kateviewhelpers.h:476
const QColor & backgroundColor() const
Definition: kateconfig.cpp:2178
virtual QString text(const KTextEditor::Range &range, bool blockwise=false) const
Definition: katedocument.cpp:337
bool setCursorPositionVisual(const KTextEditor::Cursor &position)
Definition: kateview.cpp:2423
void mousePositionChanged(KTextEditor::View *view, const KTextEditor::Cursor &newPosition)
qint64 newFoldingRange(const KTextEditor::Range &range, FoldingRangeFlags flags=FoldingRangeFlags())
Create a new folding range.
Definition: katetextfolding.cpp:99
int virtualCursorColumn() const
Return the virtual cursor column, each tab is expanded into the document's tabWidth characters...
Definition: kateview.cpp:1919
QAction * action(int index) const
int toVirtualColumn(int line, int column) const
Definition: katedocument.cpp:2564
void createSnippet(KateView *view)
Create snippet for given view, e.g.
Definition: katesnippetglobal.cpp:132
void enableTextHints(int timeout)
Definition: kateviewinternal.cpp:3293
Definition: katedocument.h:734
bool contains(const Range &range) const
void editSetCursor(const KTextEditor::Cursor &cursor)
Definition: kateview.cpp:1846
Definition: kateconfig.h:381
void setScrollBarMiniMapWidth(int width)
Definition: kateconfig.cpp:1473
bool tagLine(const KTextEditor::Cursor &virtualCursor)
Definition: kateviewinternal.cpp:1949
bool isOverwriteMode() const
Return values for "save" related commands.
Definition: kateview.cpp:1199
void reflectOnTheFlySpellCheckStatus(bool enabled)
Definition: kateview.cpp:3034
KTextEditor::Cursor coordinatesToCursor(const QPoint &coord) const
Definition: kateview.cpp:2413
KTextEditor::Attribute::Ptr attribute() const
Gets the active Attribute for this range.
Definition: katetextrange.h:173
Definition: kateviewhelpers.h:244
void setReplaceHighlightColor(const QColor &col)
Definition: kateconfig.cpp:2567
bool lineEndSelected(const KTextEditor::Cursor &lineEndPos)
Definition: kateview.cpp:2076
void editStart()
Enclose editor actions with editStart() and editEnd() to group them.
Definition: katedocument.cpp:776
void removeView(KTextEditor::View *)
removes the view from the list of views.
Definition: katedocument.cpp:2540
QPoint cursorPositionCoordinates() const
Definition: kateview.cpp:2418
Definition: kateviewhelpers.h:319
bool isEmpty() const
Definition: katetemplatescript.h:28
void importFoldingRanges(const QVariantList &folds)
Import the folding ranges given as a QVariantList like read from configs.
Definition: katetextfolding.cpp:905
bool isInWord(QChar c, int attrib=0) const
Definition: katehighlight.cpp:1084
const KShortcut & end()
virtual void setColumn(int column)
int column() const
QVariantList exportFoldingRanges() const
Return the current known folding ranges a QVariantList to store in configs.
Definition: katetextfolding.cpp:874
EditMode
T readEntry(const QString &key, const T &aDefault) const
bool setCursorPositionInternal(const KTextEditor::Cursor &position, uint tabwidth=1, bool calledExternally=false)
Definition: kateview.cpp:1278
QPoint cursorCoordinates(bool includeBorder=true) const
Definition: kateviewinternal.cpp:737
void lowercase()
Lowercases selected text, or an alphabetic character next to the cursor.
Definition: kateview.cpp:2523
void completionAborted(KTextEditor::View *view)
A KateViewBarWidget that attempts to emulate some of the features of Vim's own command bar...
Definition: kateviemulatedcommandbar.h:40
void viewEditModeChanged(KTextEditor::View *view, enum KTextEditor::View::EditMode mode)
virtual bool removeText(const KTextEditor::Range &range, bool block=false)
Definition: katedocument.cpp:633
QList< QWidget * > containers(const QString &tagName)
static void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
void setDynWordWrapIndicators(int mode)
Definition: kateconfig.cpp:1347
KTextEditor::Cursor coordinatesToCursor(const QPoint &coord, bool includeBorder=true) const
Definition: kateviewinternal.cpp:2736
const KShortcut & begin()
KateTemplateScript * templateScript(KTextEditor::TemplateScript *templateScript)
Definition: katescriptmanager.cpp:410
QStringList list(const QString &fileClass)
virtual void setAutomaticInvocationEnabled(bool enabled=true)
Definition: kateview.cpp:2359
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.