mirror of
https://bitbucket.org/smil3y/kde-playground.git
synced 2025-02-24 10:52:52 +00:00
1227 lines
45 KiB
HTML
1227 lines
45 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
|
|
|
<head>
|
|
<title>Plasma.Theme</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta http-equiv="Content-Style-Type" content="text/css" />
|
|
<link rel="stylesheet" type="text/css" href="../common/doxygen.css" />
|
|
<link rel="stylesheet" media="screen" type="text/css" title="KDE Colors" href="../common/kde.css" />
|
|
</head>
|
|
<body>
|
|
<div id="container">
|
|
<div id="header">
|
|
<div id="header_top">
|
|
<div>
|
|
<div>
|
|
<img alt ="" src="../common/top-kde.jpg"/>
|
|
KDE 4.9 PyKDE API Reference
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="header_bottom">
|
|
<div id="location">
|
|
<ul>
|
|
<li>KDE's Python API</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div id="menu">
|
|
<ul>
|
|
<li><a href="../modules.html">Overview</a></li>
|
|
<li><a href="http://techbase.kde.org/Development/Languages/Python">PyKDE Home</a></li>
|
|
<li><a href="http://kde.org/family/">Sitemap</a></li>
|
|
<li><a href="http://kde.org/contact/">Contact Us</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="body_wrapper">
|
|
<div id="body">
|
|
<div id="right">
|
|
<div class="content">
|
|
<div id="main">
|
|
<div class="clearer"> </div>
|
|
|
|
<h1>Theme Class Reference</h1>
|
|
<code>from PyKDE4.plasma import *</code>
|
|
<p>
|
|
Inherits: QObject<br />
|
|
|
|
Namespace: <a href="../plasma/Plasma.html">Plasma</a><br />
|
|
<h2>Detailed Description</h2>
|
|
|
|
<p>Theme plasma/theme.h <Plasma/Theme>
|
|
</p>
|
|
<p>
|
|
Interface to the Plasma theme
|
|
</p>
|
|
<p>
|
|
Accessed via Plasma.Theme.defaultTheme() e.g:
|
|
<pre class="fragment">
|
|
QString imagePath = Plasma.Theme.defaultTheme()->imagePath("widgets/clock")
|
|
</pre>
|
|
</p>
|
|
<p>
|
|
Plasma.Theme provides access to a common and standardized set of graphic
|
|
elements stored in SVG format. This allows artists to create single packages
|
|
of SVGs that will affect the look and feel of all workspace components.
|
|
</p>
|
|
<p>
|
|
Plasma.Svg uses Plasma.Theme internally to locate and load the appropriate
|
|
SVG data. Alternatively, Plasma.Theme can be used directly to retrieve
|
|
file system paths to SVGs by name.
|
|
</p>
|
|
<table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="#ColorRole">ColorRole</a> </td><td class="memItemRight" valign="bottom">{ TextColor, HighlightColor, BackgroundColor, ButtonTextColor, ButtonBackgroundColor, LinkColor, VisitedLinkColor, ButtonHoverColor, ButtonFocusColor, ViewTextColor, ViewBackgroundColor, ViewHoverColor, ViewFocusColor }</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="#FontRole">FontRole</a> </td><td class="memItemRight" valign="bottom">{ DefaultFont, DesktopFont, SmallestFont }</td></tr>
|
|
<tr><td colspan="2"><br><h2>Signals</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#themeChanged">themeChanged</a> ()</td></tr>
|
|
<tr><td colspan="2"><br><h2>Methods</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#Theme">__init__</a> (self, QObject parent=0)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#Theme">__init__</a> (self, QString themeName, QObject parent=0)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#animationPath">animationPath</a> (self, QString name)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">QColor </td><td class="memItemRight" valign="bottom"><a class="el" href="#color">color</a> (self, <a href="../plasma/Plasma.Theme.html#ColorRole">Plasma.Theme.ColorRole</a> role)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">KSharedPtr<KSharedConfig> </td><td class="memItemRight" valign="bottom"><a class="el" href="#colorScheme">colorScheme</a> (self)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#currentThemeHasImage">currentThemeHasImage</a> (self, QString name)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#findInCache">findInCache</a> (self, QString key, QPixmap pix)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#findInCache">findInCache</a> (self, QString key, QPixmap pix, long lastModified)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#findInRectsCache">findInRectsCache</a> (self, QString image, QString element, QRectF rect)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">QFont </td><td class="memItemRight" valign="bottom"><a class="el" href="#font">font</a> (self, <a href="../plasma/Plasma.Theme.html#FontRole">Plasma.Theme.FontRole</a> role)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">QFontMetrics </td><td class="memItemRight" valign="bottom"><a class="el" href="#fontMetrics">fontMetrics</a> (self)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../kdecore/KUrl.html">KUrl</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#homepage">homepage</a> (self)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#imagePath">imagePath</a> (self, QString name)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#insertIntoCache">insertIntoCache</a> (self, QString key, QPixmap pix)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#insertIntoCache">insertIntoCache</a> (self, QString key, QPixmap pix, QString id)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#insertIntoRectsCache">insertIntoRectsCache</a> (self, QString image, QString element, QRectF rect)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#invalidateRectsCache">invalidateRectsCache</a> (self, QString image)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">QStringList </td><td class="memItemRight" valign="bottom"><a class="el" href="#listCachedRectKeys">listCachedRectKeys</a> (self, QString image)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#releaseRectsCache">releaseRectsCache</a> (self, QString image)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setCacheLimit">setCacheLimit</a> (self, int kbytes)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setFont">setFont</a> (self, QFont font, <a href="../plasma/Plasma.Theme.html#FontRole">Plasma.Theme.FontRole</a> role=Plasma.Theme.DefaultFont)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setThemeName">setThemeName</a> (self, QString themeName)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setUseGlobalSettings">setUseGlobalSettings</a> (self, bool useGlobal)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#settingsChanged">settingsChanged</a> (self)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#styleSheet">styleSheet</a> (self, QString css=QString())</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#themeName">themeName</a> (self)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#toolTipDelay">toolTipDelay</a> (self)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#useGlobalSettings">useGlobalSettings</a> (self)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#useNativeWidgetStyle">useNativeWidgetStyle</a> (self)</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#wallpaperPath">wallpaperPath</a> (self, QSize size=QSize())</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#windowTranslucencyEnabled">windowTranslucencyEnabled</a> (self)</td></tr>
|
|
<tr><td colspan="2"><br><h2>Static Methods</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../plasma/Plasma.Theme.html">Plasma.Theme</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#defaultTheme">defaultTheme</a> ()</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">[<a href="../kdecore/KPluginInfo.html">KPluginInfo</a>] </td><td class="memItemRight" valign="bottom"><a class="el" href="#listThemeInfo">listThemeInfo</a> ()</td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">KSharedPtr<Plasma::PackageStructure> </td><td class="memItemRight" valign="bottom"><a class="el" href="#packageStructure">packageStructure</a> ()</td></tr>
|
|
</table>
|
|
<hr><h2>Signal Documentation</h2><a class="anchor" name="themeChanged"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname"> themeChanged</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">)</td>
|
|
<td width="100%"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><p>Emitted when the user changes the theme. Stylesheet usage, colors, etc. should
|
|
be updated at this point. However, SVGs should *not* be repainted in response
|
|
to this signal; connect to Svg.repaintNeeded() instead for that, as Svg objects
|
|
need repainting not only when themeChanged() is emitted; moreover Svg objects
|
|
connect to and respond appropriately to themeChanged() internally, emitting
|
|
Svg.repaintNeeded() at an appropriate time.
|
|
</p><dl compact><dt><b>Signal syntax:</b></dt><dd><code>QObject.connect(source, SIGNAL("themeChanged()"), target_slot)</code></dd></dl></div></div><hr><h2>Method Documentation</h2><a class="anchor" name="Theme"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">__init__</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QObject </td>
|
|
<td class="paramname"><em>parent=0</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Default constructor. Usually you want to use the singleton instead.
|
|
<dl class="see" compact><dt><b>See also:</b></dt><dd> defaultTheme
|
|
</dd></dl> </p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>parent</em> </td><td> the parent object
|
|
</td></tr>
|
|
</table></dl>
|
|
<p>
|
|
</p></div></div><a class="anchor" name="Theme"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">__init__</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>themeName</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QObject </td>
|
|
<td class="paramname"><em>parent=0</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Construct a theme. Usually you want to use the singleton instead.
|
|
<dl class="see" compact><dt><b>See also:</b></dt><dd> defaultTheme
|
|
</dd></dl> </p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>themeName</em> </td><td> the name of the theme to create
|
|
|
|
<tr><td></td><td valign="top"><em>parent</em> </td><td> the parent object
|
|
</td></tr> </table></dl>
|
|
<p> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.3
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="animationPath"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">QString animationPath</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>name</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Retrieves the path for the script file that contains a given
|
|
Javascript animation.
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>the</em> </td><td> name of the animation
|
|
</td></tr> </table></dl>
|
|
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> the full path to the script file, or an emptry string on failure
|
|
</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.5
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="color"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">QColor color</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a href="../plasma/Plasma.Theme.html#ColorRole">Plasma.Theme.ColorRole</a> </td>
|
|
<td class="paramname"><em>role</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Returns the text color to be used by items resting on the background
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>role</em> </td><td> which role (usage pattern) to get the color for
|
|
</td></tr>
|
|
</table></dl>
|
|
<p>
|
|
</p></div></div><a class="anchor" name="colorScheme"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">KSharedPtr<KSharedConfig> colorScheme</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname"><em>self</em> )</td>
|
|
<td width="100%"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><p>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.
|
|
</p></div></div><a class="anchor" name="currentThemeHasImage"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">bool currentThemeHasImage</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>name</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Checks if this theme has an image named in a certain way
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>name</em> </td><td> the name of the file in the theme directory (without the
|
|
".svg" part or a leading slash)
|
|
</td></tr> </table></dl>
|
|
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> true if the image exists for this theme
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="findInCache"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">bool findInCache</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>key</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QPixmap </td>
|
|
<td class="paramname"><em>pix</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>This is an overloaded member provided to check with file timestamp
|
|
where cache is still valid.
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>key</em> </td><td> the name to use in the cache for this image
|
|
|
|
<tr><td></td><td valign="top"><em>pix</em> </td><td> the pixmap object to populate with the resulting data if found
|
|
|
|
<tr><td></td><td valign="top"><em>lastModified</em> </td><td> if non-zero, the time stamp is also checked on the file,
|
|
and must be newer than the timestamp to be loaded
|
|
</td></tr>
|
|
</table></dl>
|
|
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> true when pixmap was found and loaded from cache, false otherwise
|
|
</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.3
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="findInCache"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">bool findInCache</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>key</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QPixmap </td>
|
|
<td class="paramname"><em>pix</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">long </td>
|
|
<td class="paramname"><em>lastModified</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>This is an overloaded member provided to check with file timestamp
|
|
where cache is still valid.
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>key</em> </td><td> the name to use in the cache for this image
|
|
|
|
<tr><td></td><td valign="top"><em>pix</em> </td><td> the pixmap object to populate with the resulting data if found
|
|
|
|
<tr><td></td><td valign="top"><em>lastModified</em> </td><td> if non-zero, the time stamp is also checked on the file,
|
|
and must be newer than the timestamp to be loaded
|
|
</td></tr>
|
|
</table></dl>
|
|
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> true when pixmap was found and loaded from cache, false otherwise
|
|
</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.3
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="findInRectsCache"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">bool findInRectsCache</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>image</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>element</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QRectF </td>
|
|
<td class="paramname"><em>rect</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Tries to load the rect of a sub element from a disk cache
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>image</em> </td><td> path of the image we want to check
|
|
|
|
<tr><td></td><td valign="top"><em>element</em> </td><td> sub element we want to retrieve
|
|
|
|
<tr><td></td><td valign="top"><em>rect</em> </td><td> 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()
|
|
</td></tr> </table></dl>
|
|
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> true if the element was found in cache or if we are sure the element doesn't exist
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="font"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">QFont font</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a href="../plasma/Plasma.Theme.html#FontRole">Plasma.Theme.FontRole</a> </td>
|
|
<td class="paramname"><em>role</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Returns the font to be used by themed items
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>role</em> </td><td> which role (usage pattern) to get the font for
|
|
</td></tr>
|
|
</table></dl>
|
|
<p>
|
|
</p></div></div><a class="anchor" name="fontMetrics"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">QFontMetrics fontMetrics</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname"><em>self</em> )</td>
|
|
<td width="100%"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><p>Returns the font metrics for the font to be used by themed items
|
|
</p></div></div><a class="anchor" name="homepage"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname"><a href="../kdecore/KUrl.html">KUrl</a> homepage</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname"><em>self</em> )</td>
|
|
<td width="100%"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> the default homepage to use in conjunction with the branding svg content
|
|
</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.7
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="imagePath"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">QString imagePath</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>name</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Retrieve the path for an SVG image in the current theme.
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>name</em> </td><td> the name of the file in the theme directory (without the
|
|
".svg" part or a leading slash)
|
|
</td></tr> </table></dl>
|
|
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> the full path to the requested file for the current theme
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="insertIntoCache"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname"> insertIntoCache</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>key</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QPixmap </td>
|
|
<td class="paramname"><em>pix</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>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.
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>key</em> </td><td> the name to use in the cache for this pixmap
|
|
|
|
<tr><td></td><td valign="top"><em>pix</em> </td><td> the pixmap data to store in the cache
|
|
|
|
<tr><td></td><td valign="top"><em>id</em> </td><td> a name that identifies the caller class of this function in an unique fashion.
|
|
This is needed to limit disk writes of the cache.
|
|
If an image with the same id changes quickly,
|
|
only the last size where insertIntoCache was called is actually stored on disk
|
|
</td></tr> </table></dl>
|
|
<p> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.3
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="insertIntoCache"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname"> insertIntoCache</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>key</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QPixmap </td>
|
|
<td class="paramname"><em>pix</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>id</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>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.
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>key</em> </td><td> the name to use in the cache for this pixmap
|
|
|
|
<tr><td></td><td valign="top"><em>pix</em> </td><td> the pixmap data to store in the cache
|
|
|
|
<tr><td></td><td valign="top"><em>id</em> </td><td> a name that identifies the caller class of this function in an unique fashion.
|
|
This is needed to limit disk writes of the cache.
|
|
If an image with the same id changes quickly,
|
|
only the last size where insertIntoCache was called is actually stored on disk
|
|
</td></tr> </table></dl>
|
|
<p> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.3
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="insertIntoRectsCache"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname"> insertIntoRectsCache</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>image</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>element</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QRectF </td>
|
|
<td class="paramname"><em>rect</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Inserts a rectangle of a sub element of an image into a disk cache
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>image</em> </td><td> path of the image we want to insert information
|
|
|
|
<tr><td></td><td valign="top"><em>element</em> </td><td> sub element we want insert the rect
|
|
|
|
<tr><td></td><td valign="top"><em>rect</em> </td><td> element rectangle
|
|
</td></tr>
|
|
</table></dl>
|
|
<p>
|
|
</p></div></div><a class="anchor" name="invalidateRectsCache"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname"> invalidateRectsCache</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>image</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Discards all the information about a given image from the rectangle disk cache
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>image</em> </td><td> the path to the image the cache is assoiated with
|
|
</td></tr>
|
|
</table></dl>
|
|
<p>
|
|
</p></div></div><a class="anchor" name="listCachedRectKeys"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">QStringList listCachedRectKeys</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>image</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Returns a list of all keys of cached rects for the given image.
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>image</em> </td><td> path of the image for which the keys should be returned
|
|
</td></tr>
|
|
</table></dl>
|
|
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> a QStringList whose elements are the entry keys in the rects cache
|
|
</dd></dl> </p>
|
|
<p>
|
|
<dl class="since" compact><dt><b>Since:</b></dt><dd> 4.6
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="releaseRectsCache"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname"> releaseRectsCache</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>image</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Frees up memory used by cached information for a given image without removing
|
|
the permenant record of it on disk.
|
|
<dl class="see" compact><dt><b>See also:</b></dt><dd> invalidateRectsCache
|
|
</dd></dl> </p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>image</em> </td><td> the path to the image the cache is assoiated with
|
|
</td></tr>
|
|
</table></dl>
|
|
<p>
|
|
</p></div></div><a class="anchor" name="setCacheLimit"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname"> setCacheLimit</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>kbytes</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>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.
|
|
</p>
|
|
<p>
|
|
Note that the cleanup might not be done immediately, so the cache might
|
|
temporarily (for a few seconds) grow bigger than the limit.
|
|
</p></div></div><a class="anchor" name="setFont"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname"> setFont</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QFont </td>
|
|
<td class="paramname"><em>font</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a href="../plasma/Plasma.Theme.html#FontRole">Plasma.Theme.FontRole</a> </td>
|
|
<td class="paramname"><em>role=Plasma.Theme.DefaultFont</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Sets the default font to be used with themed items. Defaults to
|
|
the application wide default font.
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>font</em> </td><td> the new font
|
|
|
|
<tr><td></td><td valign="top"><em>role</em> </td><td> which role (usage pattern) to set the font for
|
|
</td></tr>
|
|
</table></dl>
|
|
<p>
|
|
</p></div></div><a class="anchor" name="setThemeName"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname"> setThemeName</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>themeName</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Sets the current theme being used.
|
|
</p></div></div><a class="anchor" name="setUseGlobalSettings"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname"> setUseGlobalSettings</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>useGlobal</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Tells the theme whether to follow the global settings or use application
|
|
specific settings
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>useGlobal</em> </td><td> pass in true to follow the global settings
|
|
</td></tr>
|
|
</table></dl>
|
|
<p>
|
|
</p></div></div><a class="anchor" name="settingsChanged"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname"> settingsChanged</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname"><em>self</em> )</td>
|
|
<td width="100%"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><p>Notifies the Theme object that the theme settings have changed
|
|
and should be read from the config file
|
|
</p></div></div><a class="anchor" name="styleSheet"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">QString styleSheet</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QString </td>
|
|
<td class="paramname"><em>css=QString()</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Provides a Plasma.Theme-themed stylesheet for hybrid (web / native Plasma) widgets.
|
|
</p>
|
|
<p>
|
|
You can use this method to retrieve a basic default stylesheet, or to theme your
|
|
custom stylesheet you use for example in Plasma.WebView. The QString you can pass
|
|
into this method does not have to be a valid stylesheet, in fact you can use this
|
|
method to replace color placeholders with the theme's color in any QString.
|
|
</p>
|
|
<p>
|
|
In order to use this method with a custom stylesheet, just put for example %textcolor
|
|
in your QString and it will be replaced with the theme's text (or foreground) color.
|
|
</p>
|
|
<p>
|
|
Just like in many other methods for retrieving theme information, do not forget to
|
|
update your stylesheet upon the themeChanged() signal.
|
|
</p>
|
|
<p>
|
|
The following tags will be replaced by corresponding colors from Plasma.Theme:
|
|
</p>
|
|
<p>
|
|
%textcolor
|
|
%backgroundcolor
|
|
%buttonbackgroundcolor
|
|
</p>
|
|
<p>
|
|
%link
|
|
%activatedlink
|
|
%hoveredlink
|
|
%visitedlink
|
|
</p>
|
|
<p>
|
|
%fontfamily
|
|
%fontsize
|
|
%smallfontsize
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>css</em> </td><td> a stylesheet to theme, leave empty for a default stylesheet containing
|
|
theming for some commonly used elements, body text and links, for example.
|
|
</td></tr>
|
|
</table></dl>
|
|
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> a piece of CSS that sets the most commonly used style elements to a theme
|
|
matching Plasma.Theme.
|
|
</dd></dl> </p>
|
|
<p>
|
|
<dl class="since" compact><dt><b>Since:</b></dt><dd> 4.5
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="themeName"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">QString themeName</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname"><em>self</em> )</td>
|
|
<td width="100%"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> the name of the theme.
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="toolTipDelay"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">int toolTipDelay</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname"><em>self</em> )</td>
|
|
<td width="100%"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> the default tool tip delay; -1 means "no tooltips"
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="useGlobalSettings"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">bool useGlobalSettings</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname"><em>self</em> )</td>
|
|
<td width="100%"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> true if the global settings are followed, false if application
|
|
specific settings are used.
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="useNativeWidgetStyle"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">bool useNativeWidgetStyle</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname"><em>self</em> )</td>
|
|
<td width="100%"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> true if the native widget styles should be used instead of themed
|
|
widgets. Defaults is false.
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="wallpaperPath"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">QString wallpaperPath</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> <em>self</em>, </td>
|
|
<td class="paramname"></td>
|
|
</tr><tr>
|
|
<td class="memname"></td>
|
|
<td></td>
|
|
<td class="paramtype">QSize </td>
|
|
<td class="paramname"><em>size=QSize()</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td width="100%"> </td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="memdoc"><p>Retrieves the default wallpaper associated with this theme.
|
|
</p>
|
|
<p>
|
|
</p><dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td></td><td valign="top"><em>size</em> </td><td> the target height and width of the wallpaper; if an invalid size
|
|
is passed in, then a default size will be provided instead.
|
|
</td></tr> </table></dl>
|
|
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> the full path to the wallpaper image
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="windowTranslucencyEnabled"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">bool windowTranslucencyEnabled</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname"><em>self</em> )</td>
|
|
<td width="100%"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><p>Returns if the window manager effects (e.g. translucency, compositing) is active or not
|
|
</p></div></div><hr><h2>Static Method Documentation</h2><a class="anchor" name="defaultTheme"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname"><a href="../plasma/Plasma.Theme.html">Plasma.Theme</a> defaultTheme</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">)</td>
|
|
<td width="100%"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><p>Singleton pattern accessor
|
|
</p></div></div><a class="anchor" name="listThemeInfo"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">[<a href="../kdecore/KPluginInfo.html">KPluginInfo</a>] listThemeInfo</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">)</td>
|
|
<td width="100%"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> a list of all known themes
|
|
</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.3
|
|
</dd></dl>
|
|
</p></div></div><a class="anchor" name="packageStructure"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname"><tr>
|
|
<td class="memname">KSharedPtr<Plasma::PackageStructure> packageStructure</td>
|
|
<td>(</td>
|
|
<td class="paramtype"> </td>
|
|
<td class="paramname">)</td>
|
|
<td width="100%"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> a package structure representing a Theme
|
|
</dd></dl>
|
|
</p></div></div><hr><h2>Enumeration Documentation</h2><a class="anchor" name="ColorRole"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr><td class="memname">ColorRole</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><dl compact><dt><b>Enumerator: </b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0"><tr><td valign="top"><em>TextColor</em> = 0</td><td><tr><td valign="top"><em>HighlightColor</em> = 1</td><td><tr><td valign="top"><em>BackgroundColor</em> = 2</td><td><tr><td valign="top"><em>ButtonTextColor</em> = 4</td><td><tr><td valign="top"><em>ButtonBackgroundColor</em> = 8</td><td><tr><td valign="top"><em>LinkColor</em> = 16</td><td><tr><td valign="top"><em>VisitedLinkColor</em> = 32</td><td><tr><td valign="top"><em>ButtonHoverColor</em> = 64</td><td><tr><td valign="top"><em>ButtonFocusColor</em> = 128</td><td><tr><td valign="top"><em>ViewTextColor</em> = 256</td><td><tr><td valign="top"><em>ViewBackgroundColor</em> = 512</td><td><tr><td valign="top"><em>ViewHoverColor</em> = 1024</td><td><tr><td valign="top"><em>ViewFocusColor</em> = 2048</td><td></table>
|
|
</dl>
|
|
</div></div><p><a class="anchor" name="FontRole"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr><td class="memname">FontRole</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc"><dl compact><dt><b>Enumerator: </b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0"><tr><td valign="top"><em>DefaultFont</em> = 0</td><td><tr><td valign="top"><em>DesktopFont</em> </td><td><tr><td valign="top"><em>SmallestFont</em> </td><td></table>
|
|
</dl>
|
|
</div></div><p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="left">
|
|
|
|
<div class="menu_box">
|
|
<div class="nav_list">
|
|
<ul>
|
|
<li><a href="../allclasses.html">Full Index</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<a name="cp-menu" /><div class="menutitle"><div>
|
|
<h2 id="cp-menu-project">Modules</h2>
|
|
</div></div>
|
|
<div class="nav_list">
|
|
<ul><li><a href="../akonadi/index.html">akonadi</a></li>
|
|
<li><a href="../dnssd/index.html">dnssd</a></li>
|
|
<li><a href="../kdecore/index.html">kdecore</a></li>
|
|
<li><a href="../kdeui/index.html">kdeui</a></li>
|
|
<li><a href="../khtml/index.html">khtml</a></li>
|
|
<li><a href="../kio/index.html">kio</a></li>
|
|
<li><a href="../knewstuff/index.html">knewstuff</a></li>
|
|
<li><a href="../kparts/index.html">kparts</a></li>
|
|
<li><a href="../kutils/index.html">kutils</a></li>
|
|
<li><a href="../nepomuk/index.html">nepomuk</a></li>
|
|
<li><a href="../phonon/index.html">phonon</a></li>
|
|
<li><a href="../plasma/index.html">plasma</a></li>
|
|
<li><a href="../polkitqt/index.html">polkitqt</a></li>
|
|
<li><a href="../solid/index.html">solid</a></li>
|
|
<li><a href="../soprano/index.html">soprano</a></li>
|
|
</ul></div></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="clearer"/>
|
|
</div>
|
|
|
|
<div id="end_body"></div>
|
|
</div>
|
|
<div id="footer"><div id="footer_text">
|
|
This documentation is maintained by <a href="mailto:simon@simonzone.com">Simon Edwards</a>.<br />
|
|
KDE<sup>®</sup> and <a href="../images/kde_gear_black.png">the K Desktop Environment<sup>®</sup> logo</a> are registered trademarks of <a href="http://ev.kde.org/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
|
|
<a href="http://www.kde.org/contact/impressum.php">Legal</a>
|
|
</div></div>
|
|
</body>
|
|
</html>
|