Api-documentation
Updated 2,473 Days AgoPublic

Minuet API Documentation

  • Plugins overview:

So far Minuet has supported only one instrument - the piano. GSoC 2017's primary goal is to extend Minuet's instruments collection by using a plugin mechanism. Thus, any user having some basic C++/Qt knowledge will be able to implement and add his own instruments in Minuet by following the steps briefly described in the next sections.

  • Where and how plugins should be installed:

Minuet, like any other KDE application, keeps its data files into /usr/share/ file-system directory. Thus, this is the place where our plugins will be installed; actually, the exact path is /usr/share/minuet/plugins/. Installing a plugin can be simply done by using a CMakeLists.txt file telling the build system where the plugin files should be installed. A plugin is nothing more than a bunch of QML files and a simple JSON file parsed by Minuet to learn about QML files location and load them dynamically in Minuet instrument tab bar.
Minuet already provides a piano plugin example, being a good starting point to follow in order to add another instrument as a plugin.

  • How plugins are loaded into Minuet:

Firstly, by using the "initializePlugins()" method inside uicontroller.cpp, Minuet iterates through each instrument's JSON file, building a QJsonArray containing the plugin name and path. This QJsonArray is passed into InstrumentView.qml, setting the contents of the Instrument Tab Bar. Having all the tabs ready, the TabBar will just wait for a tab to be selected and a QML file to be loaded. By default, Minuet will load the first instrument plugin available as default.
The InstrumentView.qml will be a wrapper above all the instruments, having its methods called by the core ExerciseView.qml file, and calling in turn the methods that each instrument should implement.

Last Author
stefant
Projects
Subscribers
stefant
Tokens
"Like" token, awarded by firef.