C# Класс Plasma.Theme

Наследование: Qyoto.QObject, IDisposable
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
SettingsChanged void
Theme System

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
CreateProxy ( ) : void
Theme ( Type dummy ) : System

Приватные методы

Метод Описание
SettingsChanged ( ) : void
Theme ( ) : System

Описание методов

Color() публичный Метод

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
Результат Qyoto.QColor

ColorScheme() публичный Метод

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
Результат Kimono.KSharedConfig

CreateProxy() защищенный Метод

protected CreateProxy ( ) : void
Результат void

CurrentThemeHasImage() публичный Метод

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
Результат bool

DefaultTheme() публичный статический Метод

Singleton pattern accessor
public static DefaultTheme ( ) : Theme
Результат Theme

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

FindInCache() публичный Метод

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
Результат bool

FindInCache() публичный Метод

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
Результат bool

FindInRectsCache() публичный Метод

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
Результат bool

Font() публичный Метод

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
Результат Qyoto.QFont

FontMetrics() публичный Метод

Returns the font metrics for the font to be used by themed items
public FontMetrics ( ) : QFontMetrics
Результат Qyoto.QFontMetrics

ImagePath() публичный Метод

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
Результат string

InsertIntoCache() публичный Метод

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
Результат void

InsertIntoCache() публичный Метод

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
Результат void

InsertIntoRectsCache() публичный Метод

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
Результат void

InvalidateRectsCache() публичный Метод

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
Результат void

ListThemeInfo() публичный статический Метод

public static ListThemeInfo ( ) : List
Результат List

PackageStructure() публичный статический Метод

public static PackageStructure ( ) : Plasma.PackageStructure
Результат Plasma.PackageStructure

ReleaseRectsCache() публичный Метод

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
Результат void

SetCacheLimit() публичный Метод

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
Результат void

SetFont() публичный Метод

public SetFont ( QFont font ) : void
font Qyoto.QFont
Результат void

SetFont() публичный Метод

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
Результат void

SetUseGlobalSettings() публичный Метод

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
Результат void

Theme() публичный Метод

Default constructor. Usually you want to use the singleton instead.
public Theme ( QObject parent ) : System
parent Qyoto.QObject
Результат System

Theme() защищенный Метод

protected Theme ( Type dummy ) : System
dummy System.Type
Результат System

Theme() публичный Метод

public Theme ( string themeName ) : System
themeName string
Результат System

Theme() публичный Метод

Construct a theme. Usually you want to use the singleton instead.
public Theme ( string themeName, QObject parent ) : System
themeName string
parent Qyoto.QObject
Результат System

UseGlobalSettings() публичный Метод

public UseGlobalSettings ( ) : bool
Результат bool

UseNativeWidgetStyle() публичный Метод

public UseNativeWidgetStyle ( ) : bool
Результат bool

WallpaperPath() публичный Метод

public WallpaperPath ( ) : string
Результат string

WallpaperPath() публичный Метод

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
Результат string

WindowTranslucencyEnabled() публичный Метод

Returns if the window manager effects (e.g. translucency, compositing) is active or not
public WindowTranslucencyEnabled ( ) : bool
Результат bool