maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Python Qt SVG Clock on its way (https://talk.maemo.org/showthread.php?t=48411)

mikec 2010-03-26 23:27

Python Qt SVG Clock on its way
 
Well, after a monumental struggle I think we have N900 Cairo Clock ported to Python Qt on its way. Here is a teaser :D

http://farm5.static.flickr.com/4002/...b3968574_o.png

And here is the 7 lines of code that has taken the best part of a day
to read the Cairo Clock Themes into Qt

Code:

def paintEvent(self, event):
        self.scene = QtGui.QGraphicsScene()
        for path in self.theme:
            self.svgItem=QGraphicsSvgItem(path)
            renderer=self.svgItem.renderer()
            self.scene.addItem(self.svgItem)
           
        self.grView.setScene(self.scene)


dread123 2010-03-27 07:48

Re: Python Qt SVG Clock on its way
 
how long before we get some sort of release? really looking forward to testing.thanks

Addison 2010-03-27 07:53

Re: Python Qt SVG Clock on its way
 
Hey mikec, I see that you're using one of the newer clock themes that are available.

How did you get that to show on the desktop correctly?

I've tried all of the newer ones and the full image of the clock get's cut and gutted under shin's version in Diablo.

mikec 2010-03-27 07:55

Re: Python Qt SVG Clock on its way
 
first release will be in the next week or so, but will not be a widget, as I have to learn how to convert an app to a widget.

Of course I dont know what I dont know :D

mikec 2010-03-27 07:59

Re: Python Qt SVG Clock on its way
 
Quote:

Originally Posted by Addison (Post 584059)
Hey mikec, I see that you're using one of the newer clock themes that are available.

How did you get that to show on the desktop correctly?

I've tried all of the newer ones and the full image of the clock get's cut and gutted under shin's version in Diablo.

@Addison QtSVG does all the magic, look at the quality also. Shin was rendering to a bitmap before putting to screen and you have to worry about size, antialiasing and all sorts of crap. Qt just seems to do its thing. Next step is to animate the hands, which with QGraphics view should be really simple, and will allow us to do some serious SVG animation in the future.

Have a look at this clock :eek:

http://tavmjong.free.fr/INKSCAPE/DRAWINGS/clock2.svg

Addison 2010-03-27 08:01

Re: Python Qt SVG Clock on its way
 
Wow!

Thanks for the quick reply!

You and shin need to start sharing information because I really do love having this on the desktop. :D

dread123 2010-03-27 08:14

Re: Python Qt SVG Clock on its way
 
Quote:

Originally Posted by mikec (Post 584064)
@Addison QtSVG does all the magic, look at the quality also. Shin was rendering to a bitmap before putting to screen and you have to worry about size, antialiasing and all sorts of crap. Qt just seems to do its thing. Next step is to animate the hands, which with QGraphics view should be really simple, and will allow us to do some serious SVG animation in the future.

Have a look at this clock :eek:

http://tavmjong.free.fr/INKSCAPE/DRAWINGS/clock2.svg

now that clock is awesome!!! look forward to seeing some mad and wonderful designs on my n900.

mikec 2010-03-27 16:53

Re: Python Qt SVG Clock on its way
 
We have a ticking svg clock

http://farm5.static.flickr.com/4071/...be9a5b6a_o.png:)

noobmonkey 2010-03-27 16:56

Re: Python Qt SVG Clock on its way
 
wow, that does look amazing!!

dread123 2010-03-27 17:04

Re: Python Qt SVG Clock on its way
 
Quote:

Originally Posted by mikec (Post 584401)

will this app allow for all those designs out there to work? cannot wait much more lol

i appreciate u not the original creator but am i able to donate some $$$ your way?

mikec 2010-03-27 17:57

Re: Python Qt SVG Clock on its way
 
Quote:

Originally Posted by dread123 (Post 584415)
will this app allow for all those designs out there to work? cannot wait much more lol

i appreciate u not the original creator but am i able to donate some $$$ your way?

should have a version into extras dev for tomorrow.
are there any themes you want me to try out from

Gnome look

http://gnome-look.org/index.php?xcontentmode=186

dread123 2010-03-27 19:21

Re: Python Qt SVG Clock on its way
 
pls

Ninjja-Slim-Clocks
Neon-blue
Onion Tou Cairo Clock
MacOSX Leopard Cairo-Dock
Revolve
Time Warp Redux
Armageddon
WOTLK-Clock
Minority Report

Minority Report
Firefox chick Clock theme

Firefox chick Clock theme
Dark default

Dark default


if you have time..thanks and cant wait

noobmonkey 2010-03-29 14:17

Re: Python Qt SVG Clock on its way
 
hehe mike, keeping yourself busy? :D - does look good!

mikec 2010-03-29 20:33

Re: Python Qt SVG Clock on its way
 
OK here it is first development release should be up on the repos in half an hour or so.

This is a full screen version, and is intended to test themes out.

some screenshots

Pilot
http://farm5.static.flickr.com/4053/...764465db_o.png

Default Blue
http://farm5.static.flickr.com/4031/...719c265a_o.png

http://farm3.static.flickr.com/2694/...b33d883393.jpg


as a lot of the themes are small I made it zoomable so you can see how wonderfull SVGs look scaled to any size.

The pilot clock is the default theme and it will load this if you dont supply a theme.

Put your own theme files into this directory which you will have to make:

Code:

MyDocs/Nclocktheme.
This is mountable on your PC so you can just drag and drop you files into above directory. only put files in here no directories.

Modes
-Automatic , nice smooth hands movement 3600bph (30% CPU:eek:)
-Quartz , tick tick (15% CPU)
-Eco no seconds hand movement (0.1 to 0.5% CPU)

Lots to do yet but good enough to test themes with.

Get your themes from here

http://gnome-look.org/index.php?xcontentmode=186

I will open a new thread in Applications once this is stable enough and on PR1.2 (some technical hurdles with PR1.1 and Python)



Good luck and feedback please.

dread123 2010-03-29 22:18

Re: Python Qt SVG Clock on its way
 
cannot import name qtopengl???? thats after installing and tryin to run script above?

mikec 2010-03-29 23:03

Re: Python Qt SVG Clock on its way
 
oops left some cruft, building a new version now

mikec 2010-03-30 00:44

Re: Python Qt SVG Clock on its way
 
OK version 0.1.2 build three is up and you should be able launch from the app menu :D

dread123 2010-03-30 13:08

Re: Python Qt SVG Clock on its way
 
yep works...sweet. this will look excllent when able to make as an onscreen widget...playing with some good themes. will update if any problems.

mikec 2010-03-30 15:22

Re: Python Qt SVG Clock on its way
 
Just uploading a new version that has a bit better zooming, heres screeny of one of my fave clocks and new version

http://farm5.static.flickr.com/4002/...b3968574_o.png

dread123 2010-03-31 11:42

Re: Python Qt SVG Clock on its way
 
tried a few themes out..they get kinda blurry when zoomed in though..not your apps fault just the quality of images i guess :)

dread123 2010-03-31 15:52

Re: Python Qt SVG Clock on its way
 
also any way to implement you choose a directory for theme? as you can only have 1 theme in theme directory.. i downloaded quite a few but have to overwrite the main one each time to try alt theme.

if that makes sense? lol

mikec 2010-04-01 06:55

Re: Python Qt SVG Clock on its way
 
i,m about to make another release in the next few days which will pave the way to add directories as it now includes a config screen. it will also run in full screen so you can enjoy the clock in larger scale, while we wait for PR 1.2 which will hopefully allow me to convert to widget also.

shin 2010-04-01 09:49

Re: Python Qt SVG Clock on its way
 
mikec - looks great so far.. eager to see this as a widget for the n900

mikec 2010-04-11 19:39

Re: Python Qt SVG Clock on its way
 
A new version is now up in the auto builder, but nothing is getting through to the extras dev repos for some reason. Here is a sneak peek at the major changes.

1. New front end with slidy menu from the right by tapping on the screen. Also background wallpaper to show off clocks that have transparent faces. Tap again and the menu hides iteself

http://farm3.static.flickr.com/2709/...f6faba1426.jpg

2. New config screen that uses QSettings to remember what settings you made.

http://farm5.static.flickr.com/4015/...e5aa5f82_o.png

3. New file manager to select the theme you want so you can have loads of themes on your device and just select.

4. New Eco Mode that reduces CPU to minimal usage. Eco mode will also kick in after a set time to stop you draining your battery.


and now some screenies of some themes I made my self. I will be releasing a new themepack which will consists of homages of my fav watches that I made up over the hols (sad I know) :D

Dive
http://farm5.static.flickr.com/4011/...0ab455f4_o.png

Radar
http://farm3.static.flickr.com/2083/...e2daff4d_o.png


Now if the auto builder can push version 0.5 out you lot can enjoy also.

mikec 2010-04-12 14:59

Re: Python Qt SVG Clock on its way
 
Ok this is now in the dev repos, feedback before I push to extras testing would be great, will provide a link for my theme pack later today also.

Mike C

dread123 2010-04-12 19:18

Re: Python Qt SVG Clock on its way
 
seems to crash on opening the app mate?
tried resetting after installation as well?

Texrat 2010-04-12 19:26

Re: Python Qt SVG Clock on its way
 
I can't see the pretty pictures. :(

mikec 2010-04-12 19:32

Re: Python Qt SVG Clock on its way
 
Apologies pics should now be available

mikec 2010-04-12 19:34

Re: Python Qt SVG Clock on its way
 
Quote:

Originally Posted by dread123 (Post 607385)
seems to crash on opening the app mate?
tried resetting after installation as well?

Dread 123 can you confirm that you have the latest version 0.5.1-5 versions prior to this crashed due to missing file.

as this is just a build version change you will need to uninstall and re-install HAM will not tell you a new version is available.

dread123 2010-04-12 19:38

Re: Python Qt SVG Clock on its way
 
i updated via app manager..it stated there was an update..just removing now and will start again

dread123 2010-04-12 19:42

Re: Python Qt SVG Clock on its way
 
working now...just looking foward to having as a sizeable widget now :)

mikec 2010-04-12 20:16

Re: Python Qt SVG Clock on its way
 
Here is the themepack

http://www.megaupload.com/?d=H5CK8FGU

which includes

Dive,Flight,Radar, and my fave so far GT

http://farm3.static.flickr.com/2782/...39535993_o.png

Home widget will not be available until PR1.2 , and the new python bindings for Qt Home widgets.:(


All times are GMT. The time now is 12:34.

vBulletin® Version 3.8.8