Go to file
rtlhq fcfd234aeb changed debian/source/format to native 2022-11-15 15:12:44 +08:00
autotests Import Upstream version 5.92.0 2022-10-07 21:27:26 +08:00
debian changed debian/source/format to native 2022-11-15 15:12:44 +08:00
docs Import Upstream version 5.92.0 2022-10-07 21:27:26 +08:00
po Import Upstream version 5.92.0 2022-10-07 21:27:26 +08:00
src Import Upstream version 5.92.0 2022-10-07 21:27:26 +08:00
.gitignore Import Upstream version 5.92.0 2022-10-07 21:27:26 +08:00
.gitlab-ci.yml Import Upstream version 5.92.0 2022-10-07 21:27:26 +08:00
.kde-ci.yml Import Upstream version 5.92.0 2022-10-07 21:27:26 +08:00
CMakeLists.txt Import Upstream version 5.92.0 2022-10-07 21:27:26 +08:00
COPYING.LIB Import Upstream version 5.92.0 2022-10-07 21:27:26 +08:00
KF5KrossConfig.cmake.in Import Upstream version 5.92.0 2022-10-07 21:27:26 +08:00
README.md Import Upstream version 5.92.0 2022-10-07 21:27:26 +08:00
metainfo.yaml Import Upstream version 5.92.0 2022-10-07 21:27:26 +08:00

README.md

Kross

Embedding of scripting into applications

Introduction

Kross is a scripting bridge to embed scripting functionality into an application. It supports QtScript as a scripting interpreter backend.

Components

The core of Kross provides the framework to deal transparently with interpreter-backends and offers abstract functionality to deal with scripts.

The Kross::Manager class is a singleton that provides the main entry point to deal with the Kross Scripting Framework.

The Kross::Interpreter class is the base for interpreter implementations. Each scripting backend needs to inherit its own interpreter and implement it. The Kross::InterpreterInfo class provides abstract information about a Interpreter before the interpreter-backend itself is loaded.

The Kross::Action class is an abstract container to deal with scripts like a single standalone script file. Each action holds a reference to by the matching Kross::Interpreter created Kross::Script instance.

The Kross::ActionCollectionProxyModel class implements a QSortFilterProxyModel for a Kross::ActionCollectionModel instance which implements QAbstractItemModel to provide a model for views on a Kross::ActionCollection instance.

The Kross::ActionCollection class manages collections of Kross::Action instances.

Modules

Kross is able to optional dynamic load modules which provide then additional functionality for scripts.

  • Kross::FormModule provides access to UI functionality like dialogs or widgets.
  • Kross::TranslationModule provides access to the KDE internationalization and translation facilities.

Console Application

The Kross console application provides an executable application to run by Kross supported scripts from within the command line:

kross myscript.js

Backends

Currently, the only backend is a JavaScript backend powered by the QtScript library (which is part of Qt).