~ubuntu-branches/ubuntu/quantal/kde-runtime/quantal

« back to all changes in this revision

Viewing changes to plasma/declarativeimports/core/svgitem.h

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-06-03 21:50:00 UTC
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: package-import@ubuntu.com-20120603215000-vn7oarsq0ynrydj5
Tags: upstream-4.8.80
Import upstream version 4.8.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
{
30
30
    Q_OBJECT
31
31
 
32
 
    Q_PROPERTY(QString elementId READ elementId WRITE setElementId)
33
 
    Q_PROPERTY(Plasma::Svg * svg READ svg WRITE setSvg)
 
32
    /**
 
33
     * The sub element of the svg we want to render. If empty the whole svg document will be painted.
 
34
     */
 
35
    Q_PROPERTY(QString elementId READ elementId WRITE setElementId NOTIFY elementIdChanged)
 
36
 
 
37
    /**
 
38
     * Svg class that is the source of the image, use it like that:
 
39
     * <code>
 
40
     * SvgItem {
 
41
     *     svg: Svg {imagePath: "widgets/arrows"}
 
42
     *     elementId: "arrow-left"
 
43
     * }
 
44
     * </code>
 
45
     * Instead of a Svg declaration it can also be the id of a Svg declared elsewhere, useful to share Svg instances.
 
46
     */
 
47
    Q_PROPERTY(Plasma::Svg * svg READ svg WRITE setSvg NOTIFY svgChanged)
 
48
 
 
49
    /**
 
50
     * The natural, unscaled size of the svg document or the element. useful if a pixel perfect rendering of outlines is needed.
 
51
     */
34
52
    Q_PROPERTY(QSizeF naturalSize READ naturalSize NOTIFY naturalSizeChanged)
35
 
    Q_PROPERTY(bool smooth READ smooth WRITE setSmooth)
 
53
 
 
54
    /**
 
55
     * If true enable antialiasing in paint: default off, better quality but less performance.
 
56
     */
 
57
    Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged)
36
58
 
37
59
public:
38
60
    SvgItem(QDeclarativeItem *parent=0);
52
74
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
53
75
 
54
76
Q_SIGNALS:
 
77
    void elementIdChanged();
 
78
    void svgChanged();
55
79
    void naturalSizeChanged();
 
80
    void smoothChanged();
56
81
 
57
82
protected Q_SLOTS:
58
83
    void updateNeeded();