~kubuntu-members/libkdegames/4.11

« back to all changes in this revision

Viewing changes to kgtheme.h

  • Committer: Stefan Majewsky
  • Date: 2012-04-11 20:34:55 UTC
  • Revision ID: git-v1:f920b6d84f9de72a98379d9f2346564d154747a7
Rename KgTheme::svgPath -> ::graphicsPath, as suggested by aacid.

Also fix some other API issues Albert pointed out.

svn path=/trunk/KDE/kdegames/libkdegames/; revision=1289085

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
class KDEGAMES_EXPORT KgTheme : public QObject
69
69
{
70
70
        Q_OBJECT
71
 
        Q_PROPERTY(QByteArray identifier READ identifier)
72
 
        //no NOTIFY signals here - it is not intended to allow these properties
73
 
        //to change after the initial setup (note how KgThemeProvider returns only
74
 
        //const KgTheme*)
75
 
        Q_PROPERTY(QString name READ name WRITE setName)
76
 
        Q_PROPERTY(QString description READ description WRITE setDescription)
77
 
        Q_PROPERTY(QString author READ author WRITE setAuthor)
78
 
        Q_PROPERTY(QString authorEmail READ authorEmail WRITE setAuthorEmail)
79
 
        Q_PROPERTY(QString svgPath READ svgPath WRITE setSvgPath)
80
 
        Q_PROPERTY(QString previewPath READ previewPath WRITE setPreviewPath)
 
71
        Q_PROPERTY(QByteArray identifier READ identifier NOTIFY readOnlyProperty)
 
72
        //it is not intended to allow these properties to change after the initial
 
73
        //setup (note how KgThemeProvider returns only const KgTheme*), hence
 
74
        //a dummy NOTIFY signal is enough
 
75
        Q_PROPERTY(QString name READ name WRITE setName NOTIFY readOnlyProperty)
 
76
        Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY readOnlyProperty)
 
77
        Q_PROPERTY(QString author READ author WRITE setAuthor NOTIFY readOnlyProperty)
 
78
        Q_PROPERTY(QString authorEmail READ authorEmail WRITE setAuthorEmail NOTIFY readOnlyProperty)
 
79
        Q_PROPERTY(QString graphicsPath READ graphicsPath WRITE setGraphicsPath NOTIFY readOnlyProperty)
 
80
        Q_PROPERTY(QString previewPath READ previewPath WRITE setPreviewPath NOTIFY readOnlyProperty)
81
81
        Q_DISABLE_COPY(KgTheme)
82
82
        public:
83
83
                ///Constructor. The @a identifier must be application-unique.
123
123
                void setAuthorEmail(const QString& authorEmail);
124
124
 
125
125
                ///@return the path of the SVG file which holds the theme contents
126
 
                QString svgPath() const;
127
 
                ///@see svgPath()
128
 
                void setSvgPath(const QString& path);
 
126
                QString graphicsPath() const;
 
127
                ///@see graphicsPath()
 
128
                void setGraphicsPath(const QString& path);
129
129
                ///@return the path to an image file containing a preview, or an empty
130
130
                ///        string if no preview file is known
131
131
                QString previewPath() const;
141
141
                QString customData(const QString& key, const QString& defaultValue = QString()) const;
142
142
                ///@see customData()
143
143
                void setCustomData(const QMap<QString, QString>& customData);
 
144
        Q_SIGNALS:
 
145
                ///This signal is never emitted. It is provided because QML likes to
 
146
                ///complain about properties without NOTIFY signals, even readonly ones.
 
147
                void readOnlyProperty();
144
148
        private:
145
149
                class Private;
146
150
                Private* const d;