Plugin base

This module contains basic structures that should be available throughout LiveKeys.

import base 1.0

Summary

TypeVisualLogMain logging object
TypeVisualLogQmlObject
TypeLiveScriptA wrapper class for running a script, containing command arguments and LiveKeys environment data
TypeEnvironmentContainer for parameters of the environment LiveKeys is running in.
TypeObjectListContains a custom list of objects with a user buffer
TypeObjectListModelModel that provides us access to the ObjectList
TypeVariantListContains a custom list of values with a user buffer
TypeVariantListModelModel 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

InheritsQObject

Contains methods to present a Qml output for the visual log.

Summary

Members Descriptions
publicVisualLogQmlObject(QObject * parent) Default constructor
public~VisualLogQmlObject() Default destructor
{slot} public voidf(const QJSValue & messageOrCategory,const QJSValue & message) Fatal messages
{slot} public voide(const QJSValue & messageOrCategory,const QJSValue & message) Error messages
{slot} public voidw(const QJSValue & messageOrCategory,const QJSValue & message) Warning messages
{slot} public voidi(const QJSValue & messageOrCategory,const QJSValue & message) Info messages
{slot} public voidd(const QJSValue & messageOrCategory,const QJSValue & message) Debug messages
{slot} public voidv(const QJSValue & messageOrCategory,const QJSValue & message) Verbose messages
{slot} public voidconfigure(const QString & name,const QJSValue & options) Configures global vlog object from a given QJSValue object

LiveScript type

Inherits
Propertylist argv
Propertylist argvList
PropertyLiveEnvironment environment
Methodvoid scriptChanged(ProjectDocument active)
Methodstring 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
PropertyQVariantMap 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

InheritsShared
PropertyQQmlListProperty items
PropertyObjectListModel model
MethodQObject itemAt(int index)
Methodint itemCount()
Methodvoid clearItems()
Methodvoid appendItem(QObject item)
Methodvoid removeItemAt(int index)
MethodObjectListModel model()
MethodObjectList cloneConst()
MethodObjectList 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

InheritsAbstractListModel
MethodappendData(Object data)
MethodremoveAt(int index)
MethodObject at(int index)
Methodint 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

InheritsShared
PropertyQVariantList items
Methodlist items()
Methodvar itemAt(int index)
Methodint itemCount()
Methodbool isConst()
Methodvoid clearItems()
Methodvoid appendItem(var item)
Methodvoid removeItemAt(int index)
MethodVariantListModel model()
MethodVariantList cloneConst()
MethodQmlVariantList* 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

InheritsAbstractListModel
MethodappendData(var data)
MethodremoveAt(int index)
Methodvar at(int index)
Methodint 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