Reply
Thread Tools
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#11
Originally Posted by marxian View Post
I don't believe it will require Qt 4.7.4, unless I use QSystemInfo for the battery indicator etc. Presumably there are lower-level methods to get battery info and such that would enable me to avoid using the high-level QtMobility APIs.

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).
Well, there is a little "hack" in CSSU Qt, which allows applications to use GTK syles, without taking care what is the current theme, you may want to look at it:

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


EDIT:
Why do you need to know the current transitions.ini?
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer


Last edited by freemangordon; 2012-08-11 at 07:42.
 

The Following 3 Users Say Thank You to freemangordon For This Useful Post:
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#12
Originally Posted by freemangordon View Post
Well, there is a little "hack" in CSSU Qt, which allows applications to use GTK syles, without taking care what is the current theme, you may want to look at it:

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


EDIT:
Why do you need to know the current transitions.ini?
I already have my QDeclarativeImageProvider set up, but I'll at least consider the method you propose. For now, the fact that /etc/hildon/theme points to the directory of the current theme is enough.

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.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following User Says Thank You to marxian For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#13
Is this already in extras-devel or otherwise available for use?
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jollacontactlaunchtimenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 

The Following User Says Thank You to qwazix For This Useful Post:
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#14
Originally Posted by qwazix View Post
Is this already in extras-devel or otherwise available for use?
Not yet. Most of the components are fully working, but there is a performance issue with popup components (menus, dialogs etc). Should be easy to fix, but I haven't had time to resume work on this yet.

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).
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following 8 Users Say Thank You to marxian For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#15
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.
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jollacontactlaunchtimenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 

The Following 4 Users Say Thank You to qwazix For This Useful Post:
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#16
Originally Posted by qwazix View Post
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.
I've attached a tarball containing the source. I don't expect the existing API to change. There will be additions (currently there is no edit bar, tree view etc), but the names, properties and signals of the current set of components should remain the same.
Attached Files
File Type: gz qt-components-hildon.tar.gz (44.4 KB, 231 views)
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub

Last edited by marxian; 2013-01-16 at 13:44.
 

The Following 10 Users Say Thank You to marxian For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#17
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 )
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jollacontactlaunchtimenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 

The Following 5 Users Say Thank You to qwazix For This Useful Post:
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#18
Originally Posted by qwazix View Post
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 )
The files have been deleted. I have recreated QDeclarativeFolderListModel and made some changes. Replace filesystemmodel.* with the new files.

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.
Attached Files
File Type: gz filesystemmodel.tar.gz (4.9 KB, 221 views)
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following 3 Users Say Thank You to marxian For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#19
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.
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jollacontactlaunchtimenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 

The Following 2 Users Say Thank You to qwazix For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#20
Originally Posted by qwazix View Post
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.
what symbol is undefined?
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 

The Following 2 Users Say Thank You to freemangordon For This Useful Post:
Reply

Tags
hildon, qml components

Thread Tools

 
Forum Jump


All times are GMT. The time now is 14:26.