C# Class Plasma.Theme

Inheritance: Qyoto.QObject, IDisposable
Show file Open project: 0xd34df00d/Qross

Private Properties

Property Type Description
SettingsChanged void
Theme System

Public Methods

Method Description
Color ( Plasma role ) : QColor Returns the text color to be used by items resting on the background @arg role which role (usage pattern) to get the color for
ColorScheme ( ) : Kimono.KSharedConfig Returns the color scheme configurationthat goes along this theme. This can be used with KStatefulBrush and KColorScheme to determine the proper colours to use along with the visual elements in this theme.
CurrentThemeHasImage ( string name ) : bool Checks if this theme has an image named in a certain way @arg name the name of the file in the theme directory (without the ".svg" part or a leading slash)
DefaultTheme ( ) : Theme Singleton pattern accessor
Dispose ( ) : void
FindInCache ( string key, QPixmap pix ) : bool Tries to load pixmap with the specified key from cache. name="key" the name to use in the cache for this image name="pix" the pixmap object to populate with the resulting data if found
FindInCache ( string key, QPixmap pix, uint lastModified ) : bool This is an overloaded member provided to check with file timestamp where cache is still valid. name="key" the name to use in the cache for this image name="pix" the pixmap object to populate with the resulting data if found name="lastModified" if non-zero, the time stamp is also checked on the file, and must be newer than the timestamp to be loaded
FindInRectsCache ( string image, string element, Qyoto.QRectF rect ) : bool Tries to load the rect of a sub element from a disk cache @arg image path of the image we want to check @arg element sub element we want to retrieve @arg rect output parameter of the element rect found in cache if not found or if we are sure it doesn't exist it will be QRect()
Font ( Plasma role ) : QFont Returns the font to be used by themed items @arg role which role (usage pattern) to get the font for
FontMetrics ( ) : QFontMetrics Returns the font metrics for the font to be used by themed items
ImagePath ( string name ) : string Retrieve the path for an SVG image in the current theme. @arg name the name of the file in the theme directory (without the ".svg" part or a leading slash)
InsertIntoCache ( string key, QPixmap pix ) : void Insert specified pixmap into the cache. If the cache already contains pixmap with the specified key then it is overwritten. name="key" the name to use in the cache for this pixmap name="pix" the pixmap data to store in the cache
InsertIntoCache ( string key, QPixmap pix, string id ) : void Insert specified pixmap into the cache. If the cache already contains pixmap with the specified key then it is overwritten. The actual insert is delayed for optimization reasons and the id parameter is used to discard repeated inserts in the delay time, useful when for instance the graphics to inser comes from a quickly resizing object: the frames between the start and destination sizes aren't useful in the cache and just cause overhead. name="key" the name to use in the cache for this pixmap name="pix" the pixmap data to store in the cache name="id" a name that identifies the caller class of this function in an unique fashion
InsertIntoRectsCache ( string image, string element, Qyoto.QRectF rect ) : void Inserts a rectangle of a sub element of an image into a disk cache @arg image path of the image we want to insert information @arg element sub element we want insert the rect @arg rect element rectangle
InvalidateRectsCache ( string image ) : void Discards all the information about a given image from the rectangle disk cache @arg image the path to the image the cache is assoiated with
ListThemeInfo ( ) : List
PackageStructure ( ) : Plasma.PackageStructure
ReleaseRectsCache ( string image ) : void Frees up memory used by cached information for a given image without removing the permenant record of it on disk. @arg image the path to the image the cache is assoiated with
SetCacheLimit ( int kbytes ) : void Sets the maximum size of the cache (in kilobytes). If cache gets bigger the limit then some entries are removed Setting cache limit to 0 disables automatic cache size limiting. Note that the cleanup might not be done immediately, so the cache might temporarily (for a few seconds) grow bigger than the limit.
SetFont ( QFont font ) : void
SetFont ( QFont font, Plasma role ) : void Sets the default font to be used with themed items. Defaults to the application wide default font. @arg font the new font @arg role which role (usage pattern) to set the font for
SetUseGlobalSettings ( bool useGlobal ) : void Tells the theme whether to follow the global settings or use application specific settings @arg useGlobal pass in true to follow the global settings
Theme ( QObject parent ) : System Default constructor. Usually you want to use the singleton instead.
Theme ( string themeName ) : System
Theme ( string themeName, QObject parent ) : System Construct a theme. Usually you want to use the singleton instead.
UseGlobalSettings ( ) : bool
UseNativeWidgetStyle ( ) : bool
WallpaperPath ( ) : string
WallpaperPath ( Qyoto.QSize size ) : string Retrieves the default wallpaper associated with this theme. @arg size the target height and width of the wallpaper; if an invalid size is passed in, then a default size will be provided instead.
WindowTranslucencyEnabled ( ) : bool Returns if the window manager effects (e.g. translucency, compositing) is active or not

Protected Methods

Method Description
CreateProxy ( ) : void
Theme ( Type dummy ) : System

Private Methods

Method Description
SettingsChanged ( ) : void
Theme ( ) : System

Method Details

Color() public method

Returns the text color to be used by items resting on the background @arg role which role (usage pattern) to get the color for
public Color ( Plasma role ) : QColor
role Plasma
return Qyoto.QColor

ColorScheme() public method

Returns the color scheme configurationthat goes along this theme. This can be used with KStatefulBrush and KColorScheme to determine the proper colours to use along with the visual elements in this theme.
public ColorScheme ( ) : Kimono.KSharedConfig
return Kimono.KSharedConfig

CreateProxy() protected method

protected CreateProxy ( ) : void
return void

CurrentThemeHasImage() public method

Checks if this theme has an image named in a certain way @arg name the name of the file in the theme directory (without the ".svg" part or a leading slash)
public CurrentThemeHasImage ( string name ) : bool
name string
return bool

DefaultTheme() public static method

Singleton pattern accessor
public static DefaultTheme ( ) : Theme
return Theme

Dispose() public method

public Dispose ( ) : void
return void

FindInCache() public method

Tries to load pixmap with the specified key from cache. name="key" the name to use in the cache for this image name="pix" the pixmap object to populate with the resulting data if found
public FindInCache ( string key, QPixmap pix ) : bool
key string
pix Qyoto.QPixmap
return bool

FindInCache() public method

This is an overloaded member provided to check with file timestamp where cache is still valid. name="key" the name to use in the cache for this image name="pix" the pixmap object to populate with the resulting data if found name="lastModified" if non-zero, the time stamp is also checked on the file, and must be newer than the timestamp to be loaded
public FindInCache ( string key, QPixmap pix, uint lastModified ) : bool
key string
pix Qyoto.QPixmap
lastModified uint
return bool

FindInRectsCache() public method

Tries to load the rect of a sub element from a disk cache @arg image path of the image we want to check @arg element sub element we want to retrieve @arg rect output parameter of the element rect found in cache if not found or if we are sure it doesn't exist it will be QRect()
public FindInRectsCache ( string image, string element, Qyoto.QRectF rect ) : bool
image string
element string
rect Qyoto.QRectF
return bool

Font() public method

Returns the font to be used by themed items @arg role which role (usage pattern) to get the font for
public Font ( Plasma role ) : QFont
role Plasma
return Qyoto.QFont

FontMetrics() public method

Returns the font metrics for the font to be used by themed items
public FontMetrics ( ) : QFontMetrics
return Qyoto.QFontMetrics

ImagePath() public method

Retrieve the path for an SVG image in the current theme. @arg name the name of the file in the theme directory (without the ".svg" part or a leading slash)
public ImagePath ( string name ) : string
name string
return string

InsertIntoCache() public method

Insert specified pixmap into the cache. If the cache already contains pixmap with the specified key then it is overwritten. name="key" the name to use in the cache for this pixmap name="pix" the pixmap data to store in the cache
public InsertIntoCache ( string key, QPixmap pix ) : void
key string
pix Qyoto.QPixmap
return void

InsertIntoCache() public method

Insert specified pixmap into the cache. If the cache already contains pixmap with the specified key then it is overwritten. The actual insert is delayed for optimization reasons and the id parameter is used to discard repeated inserts in the delay time, useful when for instance the graphics to inser comes from a quickly resizing object: the frames between the start and destination sizes aren't useful in the cache and just cause overhead. name="key" the name to use in the cache for this pixmap name="pix" the pixmap data to store in the cache name="id" a name that identifies the caller class of this function in an unique fashion
public InsertIntoCache ( string key, QPixmap pix, string id ) : void
key string
pix Qyoto.QPixmap
id string
return void

InsertIntoRectsCache() public method

Inserts a rectangle of a sub element of an image into a disk cache @arg image path of the image we want to insert information @arg element sub element we want insert the rect @arg rect element rectangle
public InsertIntoRectsCache ( string image, string element, Qyoto.QRectF rect ) : void
image string
element string
rect Qyoto.QRectF
return void

InvalidateRectsCache() public method

Discards all the information about a given image from the rectangle disk cache @arg image the path to the image the cache is assoiated with
public InvalidateRectsCache ( string image ) : void
image string
return void

ListThemeInfo() public static method

public static ListThemeInfo ( ) : List
return List

PackageStructure() public static method

public static PackageStructure ( ) : Plasma.PackageStructure
return Plasma.PackageStructure

ReleaseRectsCache() public method

Frees up memory used by cached information for a given image without removing the permenant record of it on disk. @arg image the path to the image the cache is assoiated with
public ReleaseRectsCache ( string image ) : void
image string
return void

SetCacheLimit() public method

Sets the maximum size of the cache (in kilobytes). If cache gets bigger the limit then some entries are removed Setting cache limit to 0 disables automatic cache size limiting. Note that the cleanup might not be done immediately, so the cache might temporarily (for a few seconds) grow bigger than the limit.
public SetCacheLimit ( int kbytes ) : void
kbytes int
return void

SetFont() public method

public SetFont ( QFont font ) : void
font Qyoto.QFont
return void

SetFont() public method

Sets the default font to be used with themed items. Defaults to the application wide default font. @arg font the new font @arg role which role (usage pattern) to set the font for
public SetFont ( QFont font, Plasma role ) : void
font Qyoto.QFont
role Plasma
return void

SetUseGlobalSettings() public method

Tells the theme whether to follow the global settings or use application specific settings @arg useGlobal pass in true to follow the global settings
public SetUseGlobalSettings ( bool useGlobal ) : void
useGlobal bool
return void

Theme() public method

Default constructor. Usually you want to use the singleton instead.
public Theme ( QObject parent ) : System
parent Qyoto.QObject
return System

Theme() protected method

protected Theme ( Type dummy ) : System
dummy System.Type
return System

Theme() public method

public Theme ( string themeName ) : System
themeName string
return System

Theme() public method

Construct a theme. Usually you want to use the singleton instead.
public Theme ( string themeName, QObject parent ) : System
themeName string
parent Qyoto.QObject
return System

UseGlobalSettings() public method

public UseGlobalSettings ( ) : bool
return bool

UseNativeWidgetStyle() public method

public UseNativeWidgetStyle ( ) : bool
return bool

WallpaperPath() public method

public WallpaperPath ( ) : string
return string

WallpaperPath() public method

Retrieves the default wallpaper associated with this theme. @arg size the target height and width of the wallpaper; if an invalid size is passed in, then a default size will be provided instead.
public WallpaperPath ( Qyoto.QSize size ) : string
size Qyoto.QSize
return string

WindowTranslucencyEnabled() public method

Returns if the window manager effects (e.g. translucency, compositing) is active or not
public WindowTranslucencyEnabled ( ) : bool
return bool