![]() |
[WIP] Hildon Qt Components
Recently, I have been working on a set of Hildonized Qt Components for Maemo5. The purpose of this project is to enable easy building of UIs using the Hildon style for those that do not wish to use QtGui/GTK widgets. The project provides a number of QML components along with C++ plugins to provide backend functionality, similar to Harmattan/Symbian Qt Components. The current list of completed components is:
The global properties available are:
More components will be added to these in future. Many of these components have associated style components (set via the platformStyle property), which are used to set visual properties. The properties and signals are, where possible, the same as those for the Harmattan components, but I will document them fully once I have them in the repositories. The main difference is in the use of the drop-down menu where Harmattan uses the toolbar. So, for Hildon Qt Components, the tools of a Page component are set like this: Code:
Page { Blur transitions are provided for the components, but are disabled by default for performance reasons. The default desaturation is a blurless transition with full color. The blur transitions can be enabled via the global theme property: Code:
theme.enableDesaturationEffects = true; Code:
Image { Code:
Image { http://img209.imageshack.us/img209/3...pshot28.th.png http://img341.imageshack.us/img341/4...pshot31.th.png http://img836.imageshack.us/img836/1...pshot32.th.png http://img515.imageshack.us/img515/2...pshot33.th.png http://img198.imageshack.us/img198/3...shot34c.th.png http://img152.imageshack.us/img152/4...pshot36.th.png http://img98.imageshack.us/img98/574...shot39a.th.png http://img685.imageshack.us/img685/6...pshot41.th.png http://img193.imageshack.us/img193/9...pshot43.th.png http://img689.imageshack.us/img689/6...pshot44.th.png http://img441.imageshack.us/img441/2...shot46c.th.png http://img441.imageshack.us/img441/9...shot49a.th.png http://img443.imageshack.us/img443/1...pshot29.th.png http://img837.imageshack.us/img837/4...pshot35.th.png http://img826.imageshack.us/img826/5...shot42a.th.png http://img580.imageshack.us/img580/5...shot45u.th.png Latest source is at https://github.com/marx1an/qt-components-hildon |
Re: [WIP] Hildon Qt Components
Wow! I've been thinking to start doing something like that, I even started something but I never found the time to continue. Awesome work. I must find something to start coding with them.
|
Re: [WIP] Hildon Qt Components
How is this related with QtComponents for Fremantle?
|
Re: [WIP] Hildon Qt Components
Quote:
|
Re: [WIP] Hildon Qt Components
Fantastic work! is there any place to check your work? please make it available on the extras (extras-devel) repo, that way it can be easily added as a dependency for new QML applications for Fremantle
|
Re: [WIP] Hildon Qt Components
Quote:
|
Re: [WIP] Hildon Qt Components
Great job pal.
Does it need Qt from CSSU? EDIT: Hmm, I realize my question sounds silly in the light of your statement that you'll upload that to extras-devel :) |
Re: [WIP] Hildon Qt Components
long live the N900
|
Re: [WIP] Hildon Qt Components
Quote:
EDIT: Also, I don't suppose you know the answer to my question of how to determine which theme is currently being used? I need to be able to tell my QDeclarativeImageProvider where to load the images from (and also load transistions.ini if the theme overrides the default one). |
Re: [WIP] Hildon Qt Components
Quote:
nicolai |
Re: [WIP] Hildon Qt Components
Quote:
http://gitorious.org/community-ssu/q...f9c83f6668f4f9 this is an example of how it is used: http://gitorious.org/community-ssu/o...ton.cpp#line46 That way Qt uses whatever sapwood has decided to be current, theme changes are applied on-the-fly, you don't need to care where the current theme images are stored and what their names are, etc. And of course memory usage is reduced, as Qt does not load its owns set of images, but uses shared pixmaps (the same ones GTK uses) NFC if the above helps you, I am not much into QML, but for native QPushButton that works with no problems (check how osso-calculator in CSSU behaves when theme is changed). So you may want to create your own set of native GTK widgets (in the same way Qt does) and trick somehow GTK to give you the pixmaps so you can GL draw them (I suspect QML uses QGLWidget/QGraphicsWidget/QGraphicsScene). Though I may had written nonsense as well :D EDIT: Why do you need to know the current transitions.ini? |
Re: [WIP] Hildon Qt Components
Quote:
As I understand it, some themes supply their own transitions.ini. I want to load this (if applicable) to provide correct values for pop-in/out durations etc. The idea is that these components will behave just as any GTK/QtGui application would. I have all the above working now, but for some reason I have an undefined symbol error when trying to import the plugin. AFAICT, my approach to exporting the plugin library is exactly the as that used by the MeeGo/Symbian components plugin. |
Re: [WIP] Hildon Qt Components
Is this already in extras-devel or otherwise available for use?
|
Re: [WIP] Hildon Qt Components
Quote:
I'm considering re-writing the components using C++, and basing them on C++ QDeclarativeItem instead of the QML Item element. This should allow me to use the GTK pixmaps, as per freemangordon's suggestion. It will also have other benefits. QML is great for quickly building a UI with existing components, but writing complex components using QML and JS is messy (just look at some of the Nokia Qt Components). |
Re: [WIP] Hildon Qt Components
If it's not too much to ask, can I have them even in the current state? I'd like to start doing an UI for the fremantle port of ipcLite. Whenever you update, if API breaks, I'll be happy to update my code.
|
Re: [WIP] Hildon Qt Components
1 Attachment(s)
Quote:
|
Re: [WIP] Hildon Qt Components
Marxian, thanks for the source, I managed to build it, but QDeclarativeFolderListModel is missing. I copied the one from qt examples but it lacks some methods such as setRoot()
For now I can work as I commented out the calls to those methods but please share this file as well. Thanks again. (Now I have to set up my thimb toolchain :) ) |
Re: [WIP] Hildon Qt Components
1 Attachment(s)
Quote:
Are you able to import org.hildon.components successfully after installation? I was getting an undefined symbol error in the plugin, and wasn't able to figure out the cause. |
Re: [WIP] Hildon Qt Components
No, I get that undefined symbol error too but I thought it should be the fact that I compiled with different qt (madde, 4.6.3) than that on the device (4.7.4).
However, as with the repos down it's impossible for now to set up a working thumb scratchbox target, I compiled it with desktop Qt for the simulator, and installed them in the simulator. However I'm getting the same error when importing. This new finding, and the fact that this happens to you too probably invalidates the above assumption. I'll try to find what causes that undefined symbol. |
Re: [WIP] Hildon Qt Components
Quote:
|
Re: [WIP] Hildon Qt Components
Code:
(/opt/QtSDK/Simulator/Qt/gcc/imports/org/hildon/components/libhildonplugin.so: undefined symbol: _ZTV12HildonPlugin) EDIT: It worked :) I just needed to move the declaration of the plugin class to a header file instead of a source file. |
Re: [WIP] Hildon Qt Components
Quote:
EditBar now added: http://t.imgbox.com/adeUEtNa.jpg Code:
EditBar { |
Re: [WIP] Hildon Qt Components
Some more changes. FileSystemModel is fixed and FileBrowserDialog is changed to conform to Hildon style.
http://t.imgbox.com/acrmPesa.jpg http://t.imgbox.com/adz9r3qJ.jpg Latest source: https://github.com/marx1an/qt-components-hildon |
Re: [WIP] Hildon Qt Components
Thanks for the awesome work. Here is the first implementation using your components http://youtu.be/hVAtWl3oUHI
Source here https://github.com/qwazix/qmlBrowser I also uploaded qt-components to github, if you got an account we can collaborate there: https://github.com/qwazix/hildon-qt-components EDIT: stupid. I didn't see you already pushed there. I'll merge. Finally some thoughts...
EDIT2: also selecting text in textfields doesn't work |
Re: [WIP] Hildon Qt Components
Quote:
I haven't tested on-device for a while, so I'm not sure about the crashing. It worked last time I tested, but there have been some code changes since then. I think using the GTK pixmaps requires creating a widget instance. Whilst it is possible to render QWidgets in a QGraphicsScene, it's not recommended (according to the documentation), so it may be better to avoid that solution. As far as the statusbar info is concerned, this can be obtained using QSystemInfo (HildonSystemPlugin currently uses it for battery, profile and network status), but I've had problems with this in Qt4.7.0, so lower-level alternatives may need to be considered. The icons are missing because I haven't finished the implementation on the QML side. The main thing missing from the status bar is the ability to raise the Hildon status menu. I wonder if a DBus method can be added to hildon-status-menu. :) I couldn't see any difference in your StatusBar.qml. What use case do you have in mind? EDIT: Text selection via mouse drag is now fixed. Just needed to set selectByMouse to true. :) |
Re: [WIP] Hildon Qt Components
Sorry, I wasn't clear enough. I was talking about this https://github.com/qwazix/qmlBrowser...omTitleBar.qml
|
Re: [WIP] Hildon Qt Components
StatusBar, Menu, and PageStack are now independent components, so they can be used outside of PageStackWindow. There is also a new ApplicationWindow component.
Code:
ApplicationWindow { |
Re: [WIP] Hildon Qt Components
I've now added a QDeclarativeProcess plugin. This makes the the QProcess API accessible via QML. It doesn't depend on qt-components-hildon, so if you have a QML project and want to use QProcess, feel free to use my code.
Example: Code:
import QtQuick 1.0 |
Re: [WIP] Hildon Qt Components
I've added a Qt Components Hildon Gallery to demonstrate the currently available components. :)
http://t.imgbox.com/acmK9TyU.jpg http://t.imgbox.com/adrDa5T1.jpg http://t.imgbox.com/acjusXo4.jpg http://t.imgbox.com/abwOapI3.jpg http://t.imgbox.com/acoK4TqR.jpg http://t.imgbox.com/advnOyss.jpg http://t.imgbox.com/adsC5TC6.jpg https://github.com/marx1an/qt-compon...master/gallery I'll add a couple of small example applications soon. |
Re: [WIP] Hildon Qt Components
Impressive work :)
|
Re: [WIP] Hildon Qt Components
Some more changes:
Example: Code:
Page { http://img547.imageshack.us/img547/7...shot18y.th.png http://img15.imageshack.us/img15/566...shot19k.th.png http://img818.imageshack.us/img818/4...shot20b.th.png http://img26.imageshack.us/img26/435...hot21sx.th.png http://img708.imageshack.us/img708/4...shot22i.th.png http://img856.imageshack.us/img856/3...shot23b.th.png http://img849.imageshack.us/img849/9...shot24j.th.png http://img707.imageshack.us/img707/8...hot25yc.th.png http://img203.imageshack.us/img203/1...shot26h.th.png https://github.com/marx1an/qt-compon...amples/browser Pretty basic atm, but I'll add some more features later. |
Re: [WIP] Hildon Qt Components
When referencing the Menu directly (and not as part of pageStackWindow), I get the following error. I tried to dig down to the PopUp element but it doesn't seem to inherit or otherwise use dialog.
Code:
ReferenceError: Can't find variable: DialogStatus Menu implementation as follows Code:
Menu{ |
Re: [WIP] Hildon Qt Components
Quote:
Code:
Menu{ |
Re: [WIP] Hildon Qt Components
Great job. Could anyone please add a short how-to on the compilation?
I have tried standard qmake && make, but it complains about 'QSystemDeviceInfo' missing. The reason might be I try to compile it on my Desktop instead of N900, but since my Desktop is my primary development environment, it is much needed. Thank you. |
Re: [WIP] Hildon Qt Components
Quote:
|
Re: [WIP] Hildon Qt Components
Quote:
I am just not sure about the licensing... EDIT: It builds fine, but fails to run with: Code:
plugin cannot be loaded for module "org.hildon.components": Cannot load library /usr/lib/qt/imports/org/hildon/components/libhildonplugin.so: (/usr/lib/qt/imports/org/hildon/components/libhildonplugin.so: undefined symbol: _ZNK20QDeclarativeSettings10metaObjectEv) |
Re: [WIP] Hildon Qt Components
Quote:
|
Re: [WIP] Hildon Qt Components
Quote:
Note that you'll have to do some further adoptions of the code to load the images from the right places in the desktop version. Moreover, you also need to install the Hildon icons and theme images somewhere in the system, otherwise you'll get complaints at runtime that these can't be found. |
Re: [WIP] Hildon Qt Components
Hi Marxian,thanks for these tools,but have you any plans to put your work in repo,I asked because for me is very hard to understand how to run hildon qt-components on my n900
regards |
Re: [WIP] Hildon Qt Components
I don't know if this is related to hildon-components or the browser itself but I have noticed QML-browser doesn't use system fonts for most of it's text.
Also from some testing it seems to ignore some html meta tags that provide mobile skins of websites, opting to only show the desktop version. Is there plan for further work on QML-browser? |
All times are GMT. The time now is 06:42. |
vBulletin® Version 3.8.8