[gcompris-devel] GCompris-qt - reimplementation of configuration
Mario Fux
mario at unormal.org
Wed Mar 5 15:28:29 UTC 2014
Am Montag, 03. März 2014, 08.25:02 schrieb JAZEIX Johnny:
> Hi,
Morning Johnny
> i'd like to start to reimplement the new configuration panel of the qt
> version.
>
> I have some ideas on how implement them and i'd like to share them in
> order to see if I missed some and to find the best one:
>
> These options are persistent (meaning they are stored and restored at
> each application launch).
> They can be passed as arguments to the program and if it's the case, the
> concerned ones will be overriden by the arguments and it will be for the
> session only.
>
> About the content, i think we can keep the ones of the gtk version (and
> adapt for tablet if we show them, because for example the fullscreen
> isn't useful in tablet):
> * application language
> * enable/disable fullscreen, effects, sounds.
> * police
>
> Are the zoom (equivalent to nonfullscreen in fullscreen ?) and themes
> used or useful ?
>
> * For the application language, some questions:
> - I think the easiest is do to like the gtk version: we have a "map"
> stocking a locale associated with a name and when we finish to
> configure, we change the application locale and we send a signal to
> translate application with the new locale (but I need to look at how
> dynamically translate qml components because last time I saw,
> workarounds had to be made).
>
> * For enable/disable audio, we can encapsulate the Audio component and
> play audio only if the configuration enables it, we use this class
> instead of Audio (using aliases, there shouldn't be too much changes for
> current activities).
>
> * About the effects, we have to know which effects we want to
> enable/disable. For example, the ImageParticle can be disabled, but
> transition effects during activities have to stay. Can we consider some
> transitions have to be disabled (for example, the "sliding" effect when
> choosing an activity) ?
> For image particle, i think the same as Audio can be done (ie
> encapulsation).
>
> * For the fullscreen, it looks like it has to be done in the c++ part
> (basically: window->setVisibility(QWindow::FullScreen))
>
> * For the police, i didn't look but it could be also be with
> encapsulation for the Text(maybe TextEdit...?) component. Do we use the
> platform fonts or do we embed some ?
>
> * For the storage, there are 3 ways to do it:
> - sqlite base
> (http://qt-project.org/doc/qt-5/qtquick-localstorage-qmlmodule.html):
> advantage: Seems ok for android adding QT += sql in .pro. Probably be
> used later for administration.
> drawback: i don't think storing config in a database is a good idea. Not
> human readable.
>
> - qt settings:
> c++ version: QSettings
> advantage: human readable, exist for saving data and restoring them over
> sessions.
> drawback: i don't know if it works on tablet.
> qml version:
> http://qt-project.org/doc/qt-5/qml-qt-labs-settings-settings.html
> advantage: qml, no c++.
> drawback: not sure to remain compatible in future versions. Is based on
> QSettings (so why not use it directly ?)
>
> Personally, i would go with the c++ version of QSettings (of course, if
> it works on tablet).
There might be another option:
KConfig: https://projects.kde.org/projects/frameworks/kconfig
It's Qt5 based of course, part of KDE Frameworks 5 (but you don't need to use
all of KF5) and it's afaik in use in Plasma Active (Plasma for Tablets) and
available and in use in QML and C++.
> I hope this mail is readable and understandable :).
>
> Johnny
Best regards
Mario
--
Fellow of the FSFE.org and Joined the Game of KDE.org
Main Organizer of the Randa Meetings (www.randa-meetings.ch)
And if you need a simple computer:
www.asimplecomputer.com or www.eineinfachercomputer.com
More information about the Gcompris-devel
mailing list