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?


All times are GMT. The time now is 01:15.

vBulletin® Version 3.8.8