The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)
Libglacierapp
(→in pro file) |
(→on install) |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Introduction== | ==Introduction== | ||
− | Libglacier app provide some simplitification to create application for [[Nemo/Glacier| Glacier UX]] | + | Libglacier app provide some simplitification to create application for [[Nemo/Glacier| Glacier UX]] applications. Why we make it? Just for siplisity of start developing applications. |
==Get Source== | ==Get Source== | ||
− | Latest sources you can get in [https://github.com/nemomobile-ux/libglacierapp | + | Latest sources you can get in [https://github.com/nemomobile-ux/libglacierapp Nemo-UX github]. Last compiled rpm packages you can get it on [https://build.merproject.org/package/show/nemo:devel:ux/libglacierapp nemo ux devel obs] |
==Develop== | ==Develop== | ||
Line 27: | Line 27: | ||
app->exec(); | app->exec(); | ||
} | } | ||
+ | |||
+ | ===Add context propertes=== | ||
+ | '''Important: GlacierApp::engine aviable from version 0.2 of library''' | ||
+ | |||
+ | QQmlApplicationEngine *engine = GlacierApp::engine(app); | ||
+ | context->rootContext()->setContextProperty("foo", bar); | ||
+ | |||
+ | All context proprttys must set before you call GlacierApp::showWindow(); | ||
===on install=== | ===on install=== | ||
− | Main qml file must be called as $ | + | Executable file must be installed on /usr/bin |
+ | |||
+ | ''if you use [[Qtquickcontrols-nemo| nemo quickcontrols]] will be better start application from [[nemo qml booster]]'' | ||
+ | |||
+ | Main qml file must be called as $TARGET.qml and installed to /usr/share/$TAGRET/qml/ | ||
Translations file must be installed to /usr/share/$TARGET/translations/ | Translations file must be installed to /usr/share/$TARGET/translations/ | ||
+ | |||
+ | ==Console arguments== | ||
+ | |||
+ | * '''-w --windowed''' run application in window mode on desktop | ||
+ | * '''-p --prestart''' run application in shadow mode | ||
+ | |||
+ | without arguments applications run in fullscreen mode | ||
[[Category:Nemo]] | [[Category:Nemo]] | ||
[[Category:GlacierUX]] | [[Category:GlacierUX]] |
Latest revision as of 09:51, 24 September 2018
Contents |
[edit] Introduction
Libglacier app provide some simplitification to create application for Glacier UX applications. Why we make it? Just for siplisity of start developing applications.
[edit] Get Source
Latest sources you can get in Nemo-UX github. Last compiled rpm packages you can get it on nemo ux devel obs
[edit] Develop
[edit] in pro file
Add support of glacier library
CONFIG += link_pkgconfig LIBS += -lglacierapp
[edit] in main.cpp
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQuickWindow> #include <glacierapp.h> int main(int argc, char *argv[]) { QGuiApplication *app = GlacierApp::app(argc, argv); QQuickWindow *window = GlacierApp::showWindow(); window->setTitle(QObject::tr("Example")); app->exec(); }
[edit] Add context propertes
Important: GlacierApp::engine aviable from version 0.2 of library
QQmlApplicationEngine *engine = GlacierApp::engine(app); context->rootContext()->setContextProperty("foo", bar);
All context proprttys must set before you call GlacierApp::showWindow();
[edit] on install
Executable file must be installed on /usr/bin
if you use nemo quickcontrols will be better start application from nemo qml booster
Main qml file must be called as $TARGET.qml and installed to /usr/share/$TAGRET/qml/
Translations file must be installed to /usr/share/$TARGET/translations/
[edit] Console arguments
- -w --windowed run application in window mode on desktop
- -p --prestart run application in shadow mode
without arguments applications run in fullscreen mode