QtPdWidgets  2.3.1
Svg.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * Copyright (C) 2009 - 2012 Florian Pose <fp@igh-essen.com>
4  *
5  * This file is part of the QtPdWidgets library.
6  *
7  * The QtPdWidgets library is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation, either version 3 of the License,
10  * or (at your option) any later version.
11  *
12  * The QtPdWidgets library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with the QtPdWidgets Library. If not, see
19  * <http://www.gnu.org/licenses/>.
20  *
21  ****************************************************************************/
22 
23 #ifndef PD_SVG_H
24 #define PD_SVG_H
25 
26 #include <QFrame>
27 #include <QString>
28 #include <QScopedPointer>
29 
30 #include "Export.h"
31 
32 namespace Pd {
33 
34 class SvgPrivate;
35 
36 /****************************************************************************/
37 
41 class PD_PUBLIC Svg:
42  public QFrame
43 {
44  Q_OBJECT
45 
46  Q_PROPERTY(QString svgPath READ getSvgPath WRITE setSvgPath RESET resetSvgPath)
47  Q_PROPERTY(qreal angle READ getAngle WRITE setAngle RESET resetAngle)
48 
49  public:
50  Svg(QWidget * = 0);
51  ~Svg();
52 
53  QString getSvgPath() const;
54  void setSvgPath(const QString &);
55  void resetSvgPath();
56 
57  qreal getAngle() const;
58  void setAngle(qreal);
59  void resetAngle();
60 
61  void setIdList(const QStringList &);
62  QStringList getIdList() const;
63  bool existId(QString) const;
64 
65  private:
66  Q_DECLARE_PRIVATE(Svg)
67  Q_DISABLE_COPY(Svg)
68 
69  QScopedPointer<SvgPrivate> const d_ptr;
70 
71  void paintEvent(QPaintEvent *);
72 };
73 
74 } // namespace Pd
75 
76 #endif // PD_SVG_H
Definition: Bar.h:36
Svg widget.
Definition: Svg.h:41
#define PD_PUBLIC
Definition: Export.h:33
Definition: Svg.cpp:35