Plasma/libplasma2/API Review/Theme: Difference between revisions

From KDE Community Wiki
No edit summary
Line 57: Line 57:
{{FeatureDone|Keep| QString imagePath(const QString &name) const;}}
{{FeatureDone|Keep| QString imagePath(const QString &name) const;}}
{{FeatureDone|Keep| bool currentThemeHasImage(const QString &name) const;}}
{{FeatureDone|Keep| bool currentThemeHasImage(const QString &name) const;}}
{{FeatureDone|Keep| QString wallpaperPath(const QSize &size = QSize()) const;}}
{{FeatureDone|Keep| QString wallpaperPath(const QSize &size) const;}}
{{FeatureDone|Keep| KSharedConfigPtr colorScheme() const;}}
{{FeatureDone|Keep| KSharedConfigPtr colorScheme() const;}}
{{FeatureDone|Keep| QColor color(ColorRole role) const;}}
{{FeatureDone|Keep| QColor color(ColorRole role) const;}}
Line 63: Line 63:
{{FeatureTodo|Rename| void setUseGlobalSettings(bool useGlobal); -> void setConfigurationGroupName(const QString &name);}}
{{FeatureTodo|Rename| void setUseGlobalSettings(bool useGlobal); -> void setConfigurationGroupName(const QString &name);}}
{{FeatureTodo|Rename| bool useGlobalSettings() const; -> QString configurationGroupName() const; '''Note''': store config group name in the KConfigGroup object in the dptr}}
{{FeatureTodo|Rename| bool useGlobalSettings() const; -> QString configurationGroupName() const; '''Note''': store config group name in the KConfigGroup object in the dptr}}
{{FeatureDone|Keep| }}
{{FeatureTodo|Remove| bool useNativeWidgetStyle() const;}}
{{FeatureDone|Keep| }}
{{FeatureTodo|Move?| QString styleSheet(const QString &css = QString()) const; -> SVG stylesheet becomes private
{{FeatureDone|Keep| }}
cachedStyleSheets -> does not need to be a QHash, we only ever have 2 stylesheets cached
{{FeatureDone|Keep| }}
See if there are any uses of custom stylesheets being processed by this (to see if we need the css parameter at all)}}
{{FeatureDone|Keep| }}
{{FeatureDone|Keep| bool findInCache(const QString &key, QPixmap &pix, unsigned int lastModified);}}
{{FeatureDone|Keep| }}
{{FeatureDone|Keep| void insertIntoCache(const QString& key, const QPixmap& pix);}}
{{FeatureDone|Keep| }}
{{FeatureDone|Keep| void insertIntoCache(const QString& key, const QPixmap& pix, const QString& id);}}
{{FeatureDone|Keep| }}
{{FeatureDone|Keep| void setCacheLimit(int kbytes);}}
{{FeatureDone|Keep| }}
{{FeatureDone|Keep| bool findInRectsCache(const QString &image, const QString &element, QRectF &rect) const;}}
{{FeatureDone|Keep| }}
{{FeatureDone|Keep| QStringList listCachedRectKeys(const QString &image) const;}}
{{FeatureDone|Keep| void insertIntoRectsCache(const QString& image, const QString &element, const QRectF &rect);}}
{{FeatureDone|Keep| void invalidateRectsCache(const QString &image);}}
{{FeatureDone|Keep| void releaseRectsCache(const QString &image);}}
{{FeatureTodo|Rename|  QUrl homepage() const; -> KPluginfo pluginInfo();}}
{{FeatureDone|Remove|  int toolTipDelay() const;}}
{{FeatureDone|Keep| SIGNAL void themeChanged();}}
{{FeatureTodo|Move| public slot void settingsChanged(); -> becomes private, goes into dpointer}}


|}
|}

Revision as of 14:52, 11 March 2013

Properties and invokables

All removed, only declared in the subclass in the QML bindings

Constructors

Status Action Method
DONE Keep explicit Theme(QObject *parent ); will create the standard "global" theme
IN PROGRESS Keep explicit Theme(const QString &themeName, QObject *parent ); -> will create a "custom" theme
DONE Keep ~Theme();


Enums

Status Action Method
DONE Keep ColorRole
TO DO Remove FontRole <{{{3}}}>



Fonts

Status Action Method
TO DO Remove {{{2}}} <{{{3}}}>
TO DO Remove QFont font(FontRole role) const; <{{{3}}}>
TO DO Remove QFontMetrics fontMetrics() const; <{{{3}}}>


Other methods

Status Action Method
TO DO Remove static Theme *defaultTheme(); -> the dpointer will be implicitly shared: if a theme is created with a different name a new dpointer is created. <{{{3}}}>
DONE Keep void setThemeName(const QString &themeName);
DONE Keep QString themeName() const;
DONE Keep QString imagePath(const QString &name) const;
DONE Keep bool currentThemeHasImage(const QString &name) const;
DONE Keep QString wallpaperPath(const QSize &size) const;
DONE Keep KSharedConfigPtr colorScheme() const;
DONE Keep QColor color(ColorRole role) const;
DONE Keep bool windowTranslucencyEnabled() const;
TO DO Rename void setUseGlobalSettings(bool useGlobal); -> void setConfigurationGroupName(const QString &name); <{{{3}}}>
TO DO Rename bool useGlobalSettings() const; -> QString configurationGroupName() const; Note: store config group name in the KConfigGroup object in the dptr <{{{3}}}>
TO DO Remove bool useNativeWidgetStyle() const; <{{{3}}}>
TO DO Move? {{{2}}} <{{{3}}}>
DONE Keep bool findInCache(const QString &key, QPixmap &pix, unsigned int lastModified);
DONE Keep void insertIntoCache(const QString& key, const QPixmap& pix);
DONE Keep void insertIntoCache(const QString& key, const QPixmap& pix, const QString& id);
DONE Keep void setCacheLimit(int kbytes);
DONE Keep bool findInRectsCache(const QString &image, const QString &element, QRectF &rect) const;
DONE Keep QStringList listCachedRectKeys(const QString &image) const;
DONE Keep void insertIntoRectsCache(const QString& image, const QString &element, const QRectF &rect);
DONE Keep void invalidateRectsCache(const QString &image);
DONE Keep void releaseRectsCache(const QString &image);
TO DO Rename QUrl homepage() const; -> KPluginfo pluginInfo(); <{{{3}}}>
DONE Remove int toolTipDelay() const;
DONE Keep SIGNAL void themeChanged();
TO DO Move public slot void settingsChanged(); -> becomes private, goes into dpointer <{{{3}}}>