Jump to content

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

From KDE Community Wiki
Notmart (talk | contribs)
Created page with "=Properties and invokables= All removed, only declared in the subclass in the QML bindings =Constructors= {| cellspacing="0" cellpadding="5" border="1" style="border: 1px sol..."
 
Sebas (talk | contribs)
 
(12 intermediate revisions by one other user not shown)
Line 5: Line 5:
{| cellspacing="0" cellpadding="5" border="1" style="border: 1px solid gray; border-collapse: collapse; text-align: left; width: 100%;" class="sortable"
{| cellspacing="0" cellpadding="5" border="1" style="border: 1px solid gray; border-collapse: collapse; text-align: left; width: 100%;" class="sortable"
|- style="background: rgb(236, 236, 236) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; white-space: nowrap;"
|- style="background: rgb(236, 236, 236) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; white-space: nowrap;"
as
 
! Status  
! Status  
! Action  
! Action  
! Method  
! Method  


{{FeatureDone|Keep| explicit Theme(QObject *parent = 0)}}
{{FeatureDone|Keep| explicit Theme(QObject *parent ); will create the standard "global" theme}}
{{FeatureDone|Keep|  explicit Theme(const QString &themeName, QObject *parent = 0);}}
{{FeatureDone|Keep|  explicit Theme(const QString &themeName, QObject *parent ); -> will create a "custom" theme}}
{{FeatureDone|Keep| ~Theme();}}
{{FeatureDone|Keep| ~Theme();}}


|}
|}


=Enums=
{| cellspacing="0" cellpadding="5" border="1" style="border: 1px solid gray; border-collapse: collapse; text-align: left; width: 100%;" class="sortable"
|- style="background: rgb(236, 236, 236) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; white-space: nowrap;"
! Status
! Action
! Method
{{FeatureDone|Keep| ColorRole}}
{{FeatureDone|Remove| FontRole}}
|}
=Fonts=
{| cellspacing="0" cellpadding="5" border="1" style="border: 1px solid gray; border-collapse: collapse; text-align: left; width: 100%;" class="sortable"
{| cellspacing="0" cellpadding="5" border="1" style="border: 1px solid gray; border-collapse: collapse; text-align: left; width: 100%;" class="sortable"
|- style="background: rgb(236, 236, 236) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; white-space: nowrap;"
|- style="background: rgb(236, 236, 236) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; white-space: nowrap;"
as
 
! Status
! Action
! Method
 
{{FeatureDone|Remove| void setFont(const QFont &font, FontRole role);}}
{{FeatureDone|Remove| QFont font(FontRole role) const;}}
{{FeatureDone|Remove| QFontMetrics fontMetrics() const;}}
 
|}
 
=Other methods=
{| cellspacing="0" cellpadding="5" border="1" style="border: 1px solid gray; border-collapse: collapse; text-align: left; width: 100%;" class="sortable"
|- style="background: rgb(236, 236, 236) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; white-space: nowrap;"
 
! Status  
! Status  
! Action  
! Action  
! Method  
! Method  


{{FeatureDone|Keep| }}
{{FeatureDone|Remove| static Theme *defaultTheme(); -> the dpointer will be implicitly shared: if a theme is created with a different name a new dpointer is created.}}
{{FeatureDone|Keep| }}
{{FeatureDone|Keep| void setThemeName(const QString &themeName);}}
{{FeatureDone|Keep| }}
{{FeatureDone|Keep| QString themeName() const;}}
{{FeatureDone|Keep| }}
{{FeatureDone|Keep| QString imagePath(const QString &name) const;}}
{{FeatureDone|Keep| }}
{{FeatureDone|Keep| bool currentThemeHasImage(const QString &name) const;}}
{{FeatureDone|Keep| }}
{{FeatureDone|Keep| QString wallpaperPath(const QSize &size) const;}}
{{FeatureDone|Keep| }}
{{FeatureDone|Keep| KSharedConfigPtr colorScheme() const;}}
{{FeatureDone|Keep| }}
{{FeatureDone|Keep| QColor color(ColorRole role) const;}}
{{FeatureDone|Keep| }}
{{FeatureDone|Remove| bool windowTranslucencyEnabled() const;}}
{{FeatureDone|Keep| }}
{{FeatureTodo|Rename| void setUseGlobalSettings(bool useGlobal); -> void setConfigurationGroupName(const QString &name);}}
{{FeatureDone|Keep| }}
{{FeatureTodo|Rename| bool useGlobalSettings() const; -> QString configurationGroupName() const; '''Note''': store config group name in the KConfigGroup object in the dptr}}
{{FeatureDone|Keep| }}
{{FeatureDone|Remove| bool useNativeWidgetStyle() const;}}
{{FeatureDone|Keep| }}
{{FeatureDone|Move| QString styleSheet(const QString &css) const; -> SVG stylesheet becomes private
{{FeatureDone|Keep| }}
cachedStyleSheets -> does not need to be a QHash, we only ever have 2 stylesheets cached
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| bool findInCache(const QString &key, QPixmap &pix, unsigned int lastModified);}}
{{FeatureDone|Keep| void insertIntoCache(const QString& key, const QPixmap& pix);}}
{{FeatureDone|Keep| void insertIntoCache(const QString& key, const QPixmap& pix, const QString& id);}}
{{FeatureDone|Keep| void setCacheLimit(int kbytes);}}
{{FeatureDone|Keep| bool findInRectsCache(const QString &image, const QString &element, QRectF &rect) const;}}
{{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);}}
{{FeatureDone|Rename|  QUrl homepage() const; -> KPluginfo pluginInfo();}}
{{FeatureDone|Remove|  int toolTipDelay() const;}}
{{FeatureDone|Keep| SIGNAL void themeChanged();}}
{{FeatureDone|Move| public slot void settingsChanged(); -> becomes private, goes into dpointer}}


|}
|}

Latest revision as of 23:03, 12 March 2014

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
DONE Keep explicit Theme(const QString &themeName, QObject *parent ); -> will create a "custom" theme
DONE Keep ~Theme();


Enums

Status Action Method
DONE Keep ColorRole
DONE Remove FontRole


Fonts

Status Action Method
DONE Remove void setFont(const QFont &font, FontRole role);
DONE Remove QFont font(FontRole role) const;
DONE Remove QFontMetrics fontMetrics() const;


Other methods

Status Action Method
DONE Remove static Theme *defaultTheme(); -> the dpointer will be implicitly shared: if a theme is created with a different name a new dpointer is created.
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 Remove 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}}}>
DONE Remove bool useNativeWidgetStyle() const;
DONE Move QString styleSheet(const QString &css) const; -> SVG stylesheet becomes private

cachedStyleSheets -> does not need to be a QHash, we only ever have 2 stylesheets cached See if there are any uses of custom stylesheets being processed by this (to see if we need the css parameter at all)

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);
DONE Rename QUrl homepage() const; -> KPluginfo pluginInfo();
DONE Remove int toolTipDelay() const;
DONE Keep SIGNAL void themeChanged();
DONE Move public slot void settingsChanged(); -> becomes private, goes into dpointer