← Back to team overview

qreator-discuss team mailing list archive

QML updates

 

Hi David,

In the last two days I had some time and had a closer look at the qml code
you have written for Qreator.
I really like it a lot and have started to use it as a basis for some tests
of my own [1].

I think in the long run, we should start a new series in launchpad and
continue there.

I'm not really sure that I have really understood all the concepts of QML,
especially how to work around the limitations..., but I have nevertheless
started to organize your code a little and add some features...

1) qrcode.js
I have extended qrcode.js to allow for qrcodes up to size 40 (177x177
modules) instead of only size 10.
I have added a custom excetion that can be caught in order to increase the
size if the text does not fit the current size.
With those two changes, we now start at the smallest version and upgrade
the size dynamically...

2) directory structure
I have reorganized a lot of code. All longer functions are now in
'coffee/qreator.coffee' and get compiled to 'js/qreator.js'
QR code pages have their own folder and one file per code, they register
themselves in a global model.
All other pages are also single files in a different folder.

3) About / credits
I have added a few pages

4) Theming
I have slightly modified your already existing theming capabilities, added
color-themes and dot themes as separate entities, both of which can be
selected.
The current color theme and the current dot theme are stored in a
Qt.LocalStorage database and are persistent.
Every user will eventually be able to add colorthemes themselves (as soon
as there is a color picker in the Ubuntu SDK).

5) maybe more...

Actually, I struggled a lot with the limitations of QML and javascript. I
feel like having to jump through hoops in order to get the simplest things
done (e.g. triggering all qrcanvases to redraw themselves without changing
any text is something I still can't do...)

Nevertheless: Its also fun to get something working, and I would really
like Qreator to be ready when users actually have Ubuntu Phones in their
hands...

Cheers,
Stefan


[1] http://ubuntuone.com/1HFUhyVRZwfLWWsh7nJSQg

Follow ups