• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Kate

  • kde-4.14
  • applications
  • kate
  • part
  • script
katescriptview.h
Go to the documentation of this file.
1 
20 #ifndef KATE_SCRIPT_VIEW_H
21 #define KATE_SCRIPT_VIEW_H
22 
23 #include <QObject>
24 #include <QtScript/QScriptable>
25 
26 #include "katepartprivate_export.h"
27 
28 #include <ktexteditor/cursor.h>
29 #include <ktexteditor/range.h>
30 
31 class KateView;
32 
43 class KATEPART_TESTS_EXPORT KateScriptView : public QObject, protected QScriptable
44 {
46  Q_OBJECT
47 
48  public:
49  KateScriptView (QObject *parent=0);
50  void setView (KateView *view);
51  KateView *view();
52 
53  Q_INVOKABLE KTextEditor::Cursor cursorPosition ();
58  Q_INVOKABLE void setCursorPosition(int line, int column);
59  Q_INVOKABLE void setCursorPosition(const KTextEditor::Cursor& cursor);
60 
61 
62  Q_INVOKABLE KTextEditor::Cursor virtualCursorPosition();
63  Q_INVOKABLE void setVirtualCursorPosition(int line, int column);
64  Q_INVOKABLE void setVirtualCursorPosition(const KTextEditor::Cursor& cursor);
65 
66  Q_INVOKABLE QString selectedText();
67  Q_INVOKABLE bool hasSelection();
68  Q_INVOKABLE KTextEditor::Range selection();
69  Q_INVOKABLE void setSelection(const KTextEditor::Range& range);
70  Q_INVOKABLE void removeSelectedText();
71  Q_INVOKABLE void selectAll();
72  Q_INVOKABLE void clearSelection();
73 
74  private:
75  KateView *m_view;
76 };
77 
78 #endif
79 
80 // kate: space-indent on; indent-width 2; replace-tabs on;
KATEPART_TESTS_EXPORT
#define KATEPART_TESTS_EXPORT
Definition: katepartprivate_export.h:36
QObject
katepartprivate_export.h
QString
KateView
Definition: kateview.h:77
KateScriptView
Thinish wrapping around KateView, exposing the methods we want exposed and adding some helper methods...
Definition: katescriptview.h:43
QScriptable
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal