- Home
- Installation
- Using Livekeys
- Plugins
- Developer
Plugin base
This module contains basic structures that should be available throughout LiveKeys.
import base 1.0
Summary
Type VisualLog | Main logging object |
Type VisualLogQmlObject | |
Type LiveScript | A wrapper class for running a script, containing command arguments and LiveKeys environment data |
Type Environment | Container for parameters of the environment LiveKeys is running in. |
Type ObjectList | Contains a custom list of objects with a user buffer |
Type ObjectListModel | Model that provides us access to the ObjectList |
Type VariantList | Contains a custom list of values with a user buffer |
Type VariantListModel | Model that provides us access to the VariantList |
VisualLog
type
Inherits |
|
Main logging object
For the concepts behind logging in LiveKeys, check out the Logging page.
Example of logging:
vlog.d("Hello world!")
VisualLogQmlObject
type
Inherits | QObject |
Contains methods to present a Qml output for the visual log.
Summary
Members | Descriptions |
---|---|
public VisualLogQmlObject (QObject * parent) |
Default constructor |
public ~VisualLogQmlObject () |
Default destructor |
{slot} public void f (const QJSValue & messageOrCategory,const QJSValue & message) |
Fatal messages |
{slot} public void e (const QJSValue & messageOrCategory,const QJSValue & message) |
Error messages |
{slot} public void w (const QJSValue & messageOrCategory,const QJSValue & message) |
Warning messages |
{slot} public void i (const QJSValue & messageOrCategory,const QJSValue & message) |
Info messages |
{slot} public void d (const QJSValue & messageOrCategory,const QJSValue & message) |
Debug messages |
{slot} public void v (const QJSValue & messageOrCategory,const QJSValue & message) |
Verbose messages |
{slot} public void configure (const QString & name,const QJSValue & options) |
Configures global vlog object from a given QJSValue object |
LiveScript
type
Inherits |
|
Property | list argv |
Property | list argvList |
Property | LiveEnvironment environment |
Method | void scriptChanged(ProjectDocument active) |
Method | string name() |
A wrapper class for running a script, containing command arguments and LiveKeys environment data
It's available throughout QML in LiveKeys through the script
property.
list argv
property
List of all arguments given as strings, including the script name.
list argvList
property
Potentially empty list of additional arguments for the script. Same as argv
sans the script name.
LiveEnvironment environment
property
Collection of enviroment data.
void scriptChanged(ProjectDocument active)
method
Reacts to changes to the active document, and changes the script name.
string name()
method
Returns the name of the script.
Environment
type
Inherits |
|
Property | QVariantMap os |
Container for parameters of the environment LiveKeys is running in.
It's available throughout QML in LiveKeys through the script.environment
property.
QVariantMap os
property
Represents a map of values related to the operating system LiveKeys is running on.
ObjectList
type
Inherits | Shared |
Property | QQmlListProperty items |
Property | ObjectListModel model |
Method | QObject itemAt(int index) |
Method | int itemCount() |
Method | void clearItems() |
Method | void appendItem(QObject item) |
Method | void removeItemAt(int index) |
Method | ObjectListModel model() |
Method | ObjectList cloneConst() |
Method | ObjectList clone() |
Contains a custom list of objects with a user buffer
QQmlListProperty items
property
List of all item objects contained within
ObjectListModel model
property
Model of this data to be used within Qml
QObject itemAt(int index)
method
Function that gets us the item at the given position.
int itemCount()
method
Number of objects the list contains
void clearItems()
method
Removes all elements from the container
void appendItem(QObject item)
method
Adds item at the end of the container
void removeItemAt(int index)
method
Removes item at given index
ObjectListModel model()
method
Returns model
ObjectList cloneConst()
method
Creates a read-only clone of the container
ObjectList clone()
method
Creates a clone of the container
ObjectListModel
type
Inherits | AbstractListModel |
Method | appendData(Object data) |
Method | removeAt(int index) |
Method | Object at(int index) |
Method | int size() |
Model that provides us access to the ObjectList
appendData(Object data)
method
Appends a given object to the list
removeAt(int index)
method
Removes the object at the given index from the list
Object at(int index)
method
Returns the object at the given index
int size()
method
Returns the number of items
VariantList
type
Inherits | Shared |
Property | QVariantList items |
Method | list items() |
Method | var itemAt(int index) |
Method | int itemCount() |
Method | bool isConst() |
Method | void clearItems() |
Method | void appendItem(var item) |
Method | void removeItemAt(int index) |
Method | VariantListModel model() |
Method | VariantList cloneConst() |
Method | QmlVariantList* clone() const |
Contains a custom list of values with a user buffer
QVariantList items
property
List of all values contained within
list items()
method
Returns a list of items
var itemAt(int index)
method
Returns the item at given index
int itemCount()
method
Returns the count of items
bool isConst()
method
Shows if the list is immutable
void clearItems()
method
Clear all items
void appendItem(var item)
method
Appends the given item to the end of the list
void removeItemAt(int index)
method
Remove item at the given index
VariantListModel model()
method
Returns the model
VariantList cloneConst()
method
Create an immutable clone of the list
QmlVariantList* clone() const
method
Create a clone of the list
VariantListModel
type
Inherits | AbstractListModel |
Method | appendData(var data) |
Method | removeAt(int index) |
Method | var at(int index) |
Method | int size() |
Model that provides us access to the VariantList
appendData(var data)
method
Appends a given value to the list
removeAt(int index)
method
Removes the value at the given index from the list
var at(int index)
method
Returns the value at the given index
int size()
method
Returns the number of items