KateScriptView
#include <katescriptview.h>
Public Member Functions | |
KateScriptView (QJSEngine *, QObject *parent=nullptr) | |
Q_INVOKABLE void | align (const QJSValue &range) |
Q_INVOKABLE void | alignOn (const QJSValue &jsrange, const QJSValue &pattern=QJSValue(QStringLiteral(""))) |
Q_INVOKABLE bool | blockSelection () |
Q_INVOKABLE void | clearSelection () |
Q_INVOKABLE void | copy () |
Q_INVOKABLE QJSValue | cursorPosition () |
Q_INVOKABLE QJSValue | cursorPositions () |
Q_INVOKABLE void | cut () |
Q_INVOKABLE QJSValue | executeCommand (const QString &command, const QString &args=QString(), const QJSValue &jsrange=QJSValue()) |
Q_INVOKABLE bool | hasSelection () |
Q_INVOKABLE void | paste () |
Q_INVOKABLE void | removeSelectedText () |
Q_INVOKABLE QJSValue | searchText (const QJSValue &range, const QString &pattern, bool backwards=false) |
Q_INVOKABLE void | selectAll () |
Q_INVOKABLE QString | selectedText () |
Q_INVOKABLE QJSValue | selection () |
Q_INVOKABLE QJSValue | selections () |
Q_INVOKABLE void | setBlockSelection (bool on) |
Q_INVOKABLE void | setCursorPosition (const QJSValue &cursor) |
Q_INVOKABLE void | setCursorPosition (int line, int column) |
Q_INVOKABLE void | setCursorPositions (const QJSValue &cursors) |
Q_INVOKABLE void | setSelection (const QJSValue &range) |
Q_INVOKABLE void | setSelections (const QJSValue &ranges) |
void | setView (KTextEditor::ViewPrivate *view) |
Q_INVOKABLE void | setVirtualCursorPosition (const QJSValue &cursor) |
Q_INVOKABLE void | setVirtualCursorPosition (int line, int column) |
KTextEditor::ViewPrivate * | view () |
Q_INVOKABLE QJSValue | virtualCursorPosition () |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QBindable< QString > | bindableObjectName () |
bool | blockSignals (bool block) |
const QObjectList & | children () const const |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
bool | disconnect (const QObject *receiver, const char *method) const const |
void | dumpObjectInfo () const const |
void | dumpObjectTree () const const |
QList< QByteArray > | dynamicPropertyNames () const const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (Qt::FindChildOptions options) const const |
bool | inherits (const char *className) const const |
void | installEventFilter (QObject *filterObj) |
bool | isQuickItemType () const const |
bool | isWidgetType () const const |
bool | isWindowType () const const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
QVariant | property (const char *name) const const |
Q_CLASSINFO (Name, Value) | |
Q_EMIT Q_EMIT | |
Q_ENUM (...) | |
Q_ENUM_NS (...) | |
Q_ENUMS (...) | |
Q_FLAG (...) | |
Q_FLAG_NS (...) | |
Q_FLAGS (...) | |
Q_GADGET Q_GADGET | |
Q_GADGET_EXPORT (EXPORT_MACRO) | |
Q_INTERFACES (...) | |
Q_INVOKABLE Q_INVOKABLE | |
Q_MOC_INCLUDE Q_MOC_INCLUDE | |
Q_NAMESPACE Q_NAMESPACE | |
Q_NAMESPACE_EXPORT (EXPORT_MACRO) | |
Q_OBJECT Q_OBJECT | |
Q_PROPERTY (...) | |
Q_REVISION Q_REVISION | |
Q_SET_OBJECT_NAME (Object) | |
Q_SIGNAL Q_SIGNAL | |
Q_SIGNALS Q_SIGNALS | |
Q_SLOT Q_SLOT | |
Q_SLOTS Q_SLOTS | |
T | qobject_cast (const QObject *object) |
T | qobject_cast (QObject *object) |
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
void | removeEventFilter (QObject *obj) |
void | setObjectName (const QString &name) |
void | setObjectName (QAnyStringView name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | setProperty (const char *name, QVariant &&value) |
bool | signalsBlocked () const const |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType) |
QThread * | thread () const const |
Additional Inherited Members | |
Public Types inherited from QObject | |
typedef | QObjectList |
Properties inherited from QObject | |
objectName | |
Static Public Member Functions inherited from QObject | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Detailed Description
Thinish wrapping around KTextEditor::ViewPrivate, exposing the methods we want exposed and adding some helper methods.
setView must be called before using any other method. This is not checked for the sake of speed.
Definition at line 31 of file katescriptview.h.
Constructor & Destructor Documentation
◆ KateScriptView()
Properties are accessible with a nicer syntax from JavaScript.
Definition at line 21 of file katescriptview.cpp.
Member Function Documentation
◆ align()
void KateScriptView::align | ( | const QJSValue & | range | ) |
Definition at line 176 of file katescriptview.cpp.
◆ alignOn()
void KateScriptView::alignOn | ( | const QJSValue & | jsrange, |
const QJSValue & | pattern = QJSValue(QStringLiteral("")) ) |
Definition at line 182 of file katescriptview.cpp.
◆ blockSelection()
bool KateScriptView::blockSelection | ( | ) |
Definition at line 171 of file katescriptview.cpp.
◆ clearSelection()
void KateScriptView::clearSelection | ( | ) |
Definition at line 161 of file katescriptview.cpp.
◆ copy()
void KateScriptView::copy | ( | ) |
Definition at line 38 of file katescriptview.cpp.
◆ cursorPosition()
QJSValue KateScriptView::cursorPosition | ( | ) |
Definition at line 53 of file katescriptview.cpp.
◆ cursorPositions()
QJSValue KateScriptView::cursorPositions | ( | ) |
Definition at line 58 of file katescriptview.cpp.
◆ cut()
void KateScriptView::cut | ( | ) |
Definition at line 43 of file katescriptview.cpp.
◆ executeCommand()
QJSValue KateScriptView::executeCommand | ( | const QString & | command, |
const QString & | args = QString(), | ||
const QJSValue & | jsrange = QJSValue() ) |
Definition at line 198 of file katescriptview.cpp.
◆ hasSelection()
bool KateScriptView::hasSelection | ( | ) |
Definition at line 114 of file katescriptview.cpp.
◆ paste()
void KateScriptView::paste | ( | ) |
Definition at line 48 of file katescriptview.cpp.
◆ removeSelectedText()
void KateScriptView::removeSelectedText | ( | ) |
Definition at line 151 of file katescriptview.cpp.
◆ searchText()
QJSValue KateScriptView::searchText | ( | const QJSValue & | range, |
const QString & | pattern, | ||
bool | backwards = false ) |
Definition at line 191 of file katescriptview.cpp.
◆ selectAll()
void KateScriptView::selectAll | ( | ) |
Definition at line 156 of file katescriptview.cpp.
◆ selectedText()
QString KateScriptView::selectedText | ( | ) |
Definition at line 109 of file katescriptview.cpp.
◆ selection()
QJSValue KateScriptView::selection | ( | ) |
Definition at line 119 of file katescriptview.cpp.
◆ selections()
QJSValue KateScriptView::selections | ( | ) |
Definition at line 124 of file katescriptview.cpp.
◆ setBlockSelection()
void KateScriptView::setBlockSelection | ( | bool | on | ) |
Definition at line 166 of file katescriptview.cpp.
◆ setCursorPosition() [1/2]
void KateScriptView::setCursorPosition | ( | const QJSValue & | cursor | ) |
Definition at line 75 of file katescriptview.cpp.
◆ setCursorPosition() [2/2]
void KateScriptView::setCursorPosition | ( | int | line, |
int | column ) |
◆ setCursorPositions()
void KateScriptView::setCursorPositions | ( | const QJSValue & | cursors | ) |
Definition at line 81 of file katescriptview.cpp.
◆ setSelection()
void KateScriptView::setSelection | ( | const QJSValue & | range | ) |
Definition at line 135 of file katescriptview.cpp.
◆ setSelections()
void KateScriptView::setSelections | ( | const QJSValue & | ranges | ) |
Definition at line 140 of file katescriptview.cpp.
◆ setView()
void KateScriptView::setView | ( | KTextEditor::ViewPrivate * | view | ) |
Definition at line 28 of file katescriptview.cpp.
◆ setVirtualCursorPosition() [1/2]
void KateScriptView::setVirtualCursorPosition | ( | const QJSValue & | cursor | ) |
Definition at line 103 of file katescriptview.cpp.
◆ setVirtualCursorPosition() [2/2]
void KateScriptView::setVirtualCursorPosition | ( | int | line, |
int | column ) |
Definition at line 97 of file katescriptview.cpp.
◆ view()
KTextEditor::ViewPrivate * KateScriptView::view | ( | ) |
Definition at line 33 of file katescriptview.cpp.
◆ virtualCursorPosition()
QJSValue KateScriptView::virtualCursorPosition | ( | ) |
Definition at line 92 of file katescriptview.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.