C# Class Plasma.Theme

Inheritance: Qyoto.QObject, IDisposable
Afficher le fichier Open project: 0xd34df00d/Qross

Private Properties

Свойство Type Description
SettingsChanged void
Theme System

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
CreateProxy ( ) : void
Theme ( Type dummy ) : System

Private Methods

Méthode Description
SettingsChanged ( ) : void
Theme ( ) : System

Method Details

Color() public méthode

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
Résultat Qyoto.QColor

ColorScheme() public méthode

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
Résultat Kimono.KSharedConfig

CreateProxy() protected méthode

protected CreateProxy ( ) : void
Résultat void

CurrentThemeHasImage() public méthode

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
Résultat bool

DefaultTheme() public static méthode

Singleton pattern accessor
public static DefaultTheme ( ) : Theme
Résultat Theme

Dispose() public méthode

public Dispose ( ) : void
Résultat void

FindInCache() public méthode

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
Résultat bool

FindInCache() public méthode

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
Résultat bool

FindInRectsCache() public méthode

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
Résultat bool

Font() public méthode

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
Résultat Qyoto.QFont

FontMetrics() public méthode

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

ImagePath() public méthode

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
Résultat string

InsertIntoCache() public méthode

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
Résultat void

InsertIntoCache() public méthode

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
Résultat void

InsertIntoRectsCache() public méthode

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
Résultat void

InvalidateRectsCache() public méthode

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
Résultat void

ListThemeInfo() public static méthode

public static ListThemeInfo ( ) : List
Résultat List

PackageStructure() public static méthode

public static PackageStructure ( ) : Plasma.PackageStructure
Résultat Plasma.PackageStructure

ReleaseRectsCache() public méthode

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
Résultat void

SetCacheLimit() public méthode

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
Résultat void

SetFont() public méthode

public SetFont ( QFont font ) : void
font Qyoto.QFont
Résultat void

SetFont() public méthode

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
Résultat void

SetUseGlobalSettings() public méthode

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
Résultat void

Theme() public méthode

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

Theme() protected méthode

protected Theme ( Type dummy ) : System
dummy System.Type
Résultat System

Theme() public méthode

public Theme ( string themeName ) : System
themeName string
Résultat System

Theme() public méthode

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

UseGlobalSettings() public méthode

public UseGlobalSettings ( ) : bool
Résultat bool

UseNativeWidgetStyle() public méthode

public UseNativeWidgetStyle ( ) : bool
Résultat bool

WallpaperPath() public méthode

public WallpaperPath ( ) : string
Résultat string

WallpaperPath() public méthode

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
Résultat string

WindowTranslucencyEnabled() public méthode

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