Commit Graph

34 Commits

Author SHA1 Message Date
Shawn Starr
5e77ba9e70 Add some convenience methods file(), to get the svg image path and setFile, to set the image path
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=750651
2007-12-19 20:29:22 +00:00
Aaron J. Seigo
997f9e75a8 allow moving on any part of the applet surface; it seems our widgets still work just fine with this which is pretty cool; in this case i like the event model for QGV =)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738454
2007-11-18 23:03:57 +00:00
Aaron J. Seigo
b7ef853123 stub in elementAtPoint; it doesn't actually do anything right now pending changes to QSvgRenderer, but the code is all there ready to go
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738069
2007-11-17 21:34:28 +00:00
Aaron J. Seigo
3817a54b50 make resize() work even after createRenderer() has been called once
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=719392
2007-10-01 05:31:32 +00:00
Robert Knight
b329ddb69a Fix elementSize() , elementRect() always returning 0 in Plasma::Svg if called before resize(). Set the size to the document's default size when the renderer is created. Makes it possible to determine the aspect ratio of the graphic.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=706931
2007-08-31 15:15:04 +00:00
Enrico Ros
341c3700eb Faster background drawing. Speeds up a lot zooming operations and general compositing.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=701053
2007-08-17 06:35:19 +00:00
Aaron J. Seigo
db4a7ebe61 copyright cleanups:
* Copyright (C) -> Copyright
* add "or later" clause to files that i have the sole copyright on
* add current year (2007) to my copyrights where it was missing

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696946
2007-08-06 11:20:02 +00:00
Aaron J. Seigo
6a784b89a0 don't crash on exit due to using kdebug when the app is going away
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=696616
2007-08-05 12:29:06 +00:00
Leo Franchi
ce090faab8 add matrixForElement(const QString& elementId) const as discussed on panel-devel
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=695665
2007-08-02 16:14:35 +00:00
Aaron J. Seigo
ac918ad4bf kdebug fixes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=695587
2007-08-02 13:12:59 +00:00
Aaron J. Seigo
e0616c8c5f elementRect() ... and hopefully i got the math right because i haven't tested it at all. for lfranchi, with love.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693068
2007-07-26 23:07:26 +00:00
Aaron J. Seigo
201afe2033 * debug output when an absolute path is provided and the file doesn't exist
* provide an isValid() method

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=691142
2007-07-23 00:50:10 +00:00
Aaron J. Seigo
504810736b you know what, i really don't care about supporting animated svg's in Plasma::Svg as they break the "this is an image" concept that Plasma::Svg is built around and nobody is using them right now anyways
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=689385
2007-07-18 06:21:48 +00:00
Urs Wolfer
44f3ee81c7 fix logical bug: non themed images work now too
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=688651
2007-07-16 14:19:36 +00:00
Aaron J. Seigo
58277a7608 plug a bunch of memory leaks
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=672687
2007-06-07 20:57:18 +00:00
Aaron J. Seigo
c321d2f03e introduce ContentType; this lets us have svgs which are a single image which may be made up of a number of elements (in which case, the elements need to be scaled from the size on the svg when painted to have the right size) or made up of a number of discreet images each of which is already the right size (think: a deck of cards)
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=669616
2007-05-29 20:27:51 +00:00
Aaron J. Seigo
498ce9d548 attempt to share renderers. this should make quite a difference, one would hope. needs more testing.
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=669390
2007-05-29 07:56:21 +00:00
Matt Williams
f6849f9d23 Make the SVG render at the size specified by Svg::size() instead of ignoring it.
Here you go ruphy, you can now implement applet resizing to your heart's content :)

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=669300
2007-05-28 23:47:41 +00:00
Matt Williams
c2b3db02e8 Fix the pixmap drawing of the SVG so that it always draws the whole element. The size it draws it at is given by the QRectF still.
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=669225
2007-05-28 20:09:50 +00:00
Aaron J. Seigo
3d51733018 * more api documentation
* changes to reflect api movement

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=668671
2007-05-27 08:01:31 +00:00
Aaron J. Seigo
29bc7ed49e i'll take the red pill.
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=667153
2007-05-22 00:20:52 +00:00
Matt Williams
dfb58b44c1 EBN Fixes
* Include own header file first
* Make d-pointer const
* Use references-to-const

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=667001
2007-05-21 14:28:03 +00:00
David Faure
5f1db42cca should be const
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=666821
2007-05-20 23:31:44 +00:00
Aaron J. Seigo
8f037a992d &
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=666819
2007-05-20 23:18:05 +00:00
Aaron J. Seigo
cb2e8721a5 * Plasma::Svg::resize() to use the default size of the SVG
* make the clock use that size

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=666807
2007-05-20 22:56:38 +00:00
Aaron J. Seigo
f88f9ed076 add a missing bit of obvious api.
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=666798
2007-05-20 22:39:38 +00:00
Aaron J. Seigo
48db336a07 allow to pass in an alternative matrix to SVG::paint in case you don't want the painter's matrix to be used in rendering the svg; this happens when the Scene has matrix and then the painter is transformed further to adjust that specific painting event. for things like the clock, it also allows us to properly use the pixmapcache.
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=666794
2007-05-20 22:30:41 +00:00
Riccardo Iaconelli
4de7a36e29 The clock now shows (and moves) SVG hands. I had to do an hack on Plasma::Svg to make it work, it was doing strange things with the plasmoid painter, and especially its coordinate system, check the differences in lib/svg.cpp to see what changed.
Still have a couple of problems with hands other than second, and for the black thingy in the middle.
Too tired right now, will check (and hopefully fix) them again tomorrow.
Let's party though! The first (mostly) working plasmoid goes public! Yay!

CCMAIL:panel-devel@kde.org

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=666767
2007-05-20 21:01:30 +00:00
Aaron J. Seigo
b8253cda5b get rid of matrix removal for now so that things actually draw properly in graphicsitems
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=666238
2007-05-19 08:32:22 +00:00
Aaron J. Seigo
a9ebfb6a14 * allow painting of given elements
* find the size of an element (given the current size of the Plasma::Svg)

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=666140
2007-05-18 22:05:00 +00:00
Pino Toscano
c3d0436084 less qt3_support
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=650622
2007-04-04 23:26:24 +00:00
Aaron J. Seigo
d7caba7c6f this works, and i know it works, so the debug can go away for now so i can see other potentially important things in the output =)
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=643671
2007-03-18 06:57:48 +00:00
Aaron J. Seigo
34fbb0cefd use KSvgRenderer so we also support svgz
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=640689
2007-03-08 20:14:34 +00:00
Aaron J. Seigo
5cfabdc869 Plasma::Svg debuts. it is an image centric wrapper around QSvgRenderer that takes care of things such as:
* caching rendered pixmaps
* looking up the images from the Plasma::Theme
* scheduling needed updates, e.g. when the plasma theme changes


svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=640418
2007-03-07 23:27:37 +00:00