Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > 3cd8ed2ba8c8318377f50d8a76dbe3c4 > files > 239

kdebase-devel-doc-3.5.9-36mdv2008.1.x86_64.rpm

<?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_US" xml:lang="en_US">

<head>
  <title>kwin/lib: kdecoration.cpp Source File (kwin/lib)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <meta http-equiv="Content-Style-Type" content="text/css" />

  <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org"  r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org"  r (n 0 s 0 v 0 l 0))' />

  <meta name="trademark" content="KDE e.V." />
  <meta name="description" content="K Desktop Environment Homepage, KDE.org" />
  <meta name="MSSmartTagsPreventParsing" content="true" />
  <meta name="robots" content="all" />

  <link rel="shortcut icon" href="../../../favicon.ico" />

<link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" />



</head>

<body>

<div id="nav_header_top" align="right">
  <a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a>

  <a href="../../.."><img id="nav_header_logo" alt="Home" align="left" src="../../../kde_gear_64.png" border="0" /></a>
  <span class="doNotDisplay">::</span>

  <div id="nav_header_title" align="left">KDE API Reference</div>


</div>

<div id="nav_header_bottom" align="right">
  <span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span>
  <div id="nav_header_bottom_right" style="text-align: left;">
/ <a href="../../..">API Reference</a>
 / <a href="../../html/index.html">kwin</a> / <a href=".">lib</a>
  </div>
</div>


<table id="main" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
      <td valign="top" class="menuheader" height="0"></td>

  <td id="contentcolumn" valign="top" rowspan="2" >
    <div id="content" style="padding-top: 0px;"><div style="width:100%; margin: 0px; padding: 0px;">
    <a name="content"></a>


<!-- Generated by Doxygen 1.5.5 -->
<h1>kdecoration.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*****************************************************************</span>
<a name="l00002"></a>00002 <span class="comment">This file is part of the KDE project.</span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment">Copyright (C) 2003 Lubos Lunak &lt;l.lunak@kde.org&gt;</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">Permission is hereby granted, free of charge, to any person obtaining a</span>
<a name="l00007"></a>00007 <span class="comment">copy of this software and associated documentation files (the "Software"),</span>
<a name="l00008"></a>00008 <span class="comment">to deal in the Software without restriction, including without limitation</span>
<a name="l00009"></a>00009 <span class="comment">the rights to use, copy, modify, merge, publish, distribute, sublicense,</span>
<a name="l00010"></a>00010 <span class="comment">and/or sell copies of the Software, and to permit persons to whom the</span>
<a name="l00011"></a>00011 <span class="comment">Software is furnished to do so, subject to the following conditions:</span>
<a name="l00012"></a>00012 <span class="comment"></span>
<a name="l00013"></a>00013 <span class="comment">The above copyright notice and this permission notice shall be included in</span>
<a name="l00014"></a>00014 <span class="comment">all copies or substantial portions of the Software.</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment">THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
<a name="l00017"></a>00017 <span class="comment">IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
<a name="l00018"></a>00018 <span class="comment">FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL</span>
<a name="l00019"></a>00019 <span class="comment">THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
<a name="l00020"></a>00020 <span class="comment">LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span>
<a name="l00021"></a>00021 <span class="comment">FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</span>
<a name="l00022"></a>00022 <span class="comment">DEALINGS IN THE SOFTWARE.</span>
<a name="l00023"></a>00023 <span class="comment">******************************************************************/</span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="preprocessor">#include "kdecoration.h"</span>
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;kdebug.h&gt;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;qapplication.h&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;kglobal.h&gt;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;assert.h&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#if defined Q_WS_X11 &amp;&amp; ! defined K_WS_QTONLY</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#include &lt;X11/Xlib.h&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;fixx11h.h&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#endif</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span>
<a name="l00036"></a>00036 <span class="preprocessor">#include "kdecoration_p.h"</span>
<a name="l00037"></a>00037 <span class="preprocessor">#include "kdecorationfactory.h"</span>
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 <a class="code" href="classKDecorationOptions.html" title="This class holds various configuration settings for the decoration.">KDecorationOptions</a>* KDecoration::options_;
<a name="l00040"></a>00040 
<a name="l00041"></a><a class="code" href="classKDecoration.html#25bf2f89a655e1996117e2c6066f26fa">00041</a> <a class="code" href="classKDecoration.html#25bf2f89a655e1996117e2c6066f26fa" title="Constructs a KDecoration object.">KDecoration::KDecoration</a>( KDecorationBridge* bridge, KDecorationFactory* <a class="code" href="classKDecoration.html#00df2796c7d3e81aa1f4221a3b13dfe8" title="Returns the factory that created this decoration.">factory</a> )
<a name="l00042"></a>00042     :   bridge_( bridge ),
<a name="l00043"></a>00043     w_( NULL ),
<a name="l00044"></a>00044         factory_( factory )
<a name="l00045"></a>00045     {
<a name="l00046"></a>00046     factory-&gt;addDecoration( <span class="keyword">this</span> );
<a name="l00047"></a>00047     }
<a name="l00048"></a>00048 
<a name="l00049"></a><a class="code" href="classKDecoration.html#e664bfac522fdc18abb60f125ac3d5f9">00049</a> <a class="code" href="classKDecoration.html#e664bfac522fdc18abb60f125ac3d5f9" title="Destroys the KDecoration.">KDecoration::~KDecoration</a>()
<a name="l00050"></a>00050     {
<a name="l00051"></a>00051     <a class="code" href="classKDecoration.html#00df2796c7d3e81aa1f4221a3b13dfe8" title="Returns the factory that created this decoration.">factory</a>()-&gt;removeDecoration( <span class="keyword">this</span> );
<a name="l00052"></a>00052     <span class="keyword">delete</span> w_;
<a name="l00053"></a>00053     }
<a name="l00054"></a>00054 
<a name="l00055"></a><a class="code" href="classKDecoration.html#10b913d348df2d70ffb596b5b43c1f16">00055</a> <span class="keyword">const</span> <a class="code" href="classKDecorationOptions.html" title="This class holds various configuration settings for the decoration.">KDecorationOptions</a>* <a class="code" href="classKDecoration.html#10b913d348df2d70ffb596b5b43c1f16" title="Returns the KDecorationOptions object, which is used to access configuration settings...">KDecoration::options</a>()
<a name="l00056"></a>00056     {
<a name="l00057"></a>00057     <span class="keywordflow">return</span> options_;
<a name="l00058"></a>00058     }
<a name="l00059"></a>00059 
<a name="l00060"></a><a class="code" href="classKDecoration.html#0b9acb36ba59b91cda719210bcade18c">00060</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#0b9acb36ba59b91cda719210bcade18c" title="Convenience functions that creates and sets a main widget as necessary.">KDecoration::createMainWidget</a>( WFlags flags )
<a name="l00061"></a>00061     {
<a name="l00062"></a>00062     <span class="comment">// FRAME check flags?</span>
<a name="l00063"></a>00063     <a class="code" href="classKDecoration.html#c3d899111c02a03376d170c2ed4eb689" title="This should be the first function called in init() to specify the main widget of...">setMainWidget</a>( <span class="keyword">new</span> QWidget( <a class="code" href="classKDecoration.html#848517517c7a8c7150812208de96c8e1" title="The parent widget that should be used for the main widget.">initialParentWidget</a>(), <span class="stringliteral">"decoration widget"</span>, <a class="code" href="classKDecoration.html#5ad5b121e91936eebe23ccbcb726e5b0" title="The flags that should be used when creating the main widget.">initialWFlags</a>() | flags ));
<a name="l00064"></a>00064     }
<a name="l00065"></a>00065 
<a name="l00066"></a><a class="code" href="classKDecoration.html#c3d899111c02a03376d170c2ed4eb689">00066</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#c3d899111c02a03376d170c2ed4eb689" title="This should be the first function called in init() to specify the main widget of...">KDecoration::setMainWidget</a>( QWidget* w )
<a name="l00067"></a>00067     {
<a name="l00068"></a>00068     assert( w_ == NULL );
<a name="l00069"></a>00069     w_ = w;
<a name="l00070"></a>00070     w-&gt;setMouseTracking( <span class="keyword">true</span> );
<a name="l00071"></a>00071     <a class="code" href="classKDecoration.html#ffa0a7b9b3ee3e5e7260d3a14096b57f" title="Returns the main widget for the decoration.">widget</a>()-&gt;resize( <a class="code" href="classKDecoration.html#9fd6465e3282b7dfe4a6bc4c0a752ed4" title="Returns the geometry of the decoration.">geometry</a>().size());
<a name="l00072"></a>00072     }
<a name="l00073"></a>00073 
<a name="l00074"></a><a class="code" href="classKDecoration.html#848517517c7a8c7150812208de96c8e1">00074</a> QWidget* <a class="code" href="classKDecoration.html#848517517c7a8c7150812208de96c8e1" title="The parent widget that should be used for the main widget.">KDecoration::initialParentWidget</a>()<span class="keyword"> const</span>
<a name="l00075"></a>00075 <span class="keyword">    </span>{
<a name="l00076"></a>00076     <span class="keywordflow">return</span> bridge_-&gt;initialParentWidget();
<a name="l00077"></a>00077     }
<a name="l00078"></a>00078     
<a name="l00079"></a><a class="code" href="classKDecoration.html#5ad5b121e91936eebe23ccbcb726e5b0">00079</a> Qt::WFlags <a class="code" href="classKDecoration.html#5ad5b121e91936eebe23ccbcb726e5b0" title="The flags that should be used when creating the main widget.">KDecoration::initialWFlags</a>()<span class="keyword"> const</span>
<a name="l00080"></a>00080 <span class="keyword">    </span>{
<a name="l00081"></a>00081     <span class="keywordflow">return</span> bridge_-&gt;initialWFlags();
<a name="l00082"></a>00082     }
<a name="l00083"></a>00083 
<a name="l00084"></a><a class="code" href="classKDecoration.html#d1edfa13a2847ce2206d81c6d7eb3077">00084</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#d1edfa13a2847ce2206d81c6d7eb3077" title="Returns true if the decorated window is currently active.">KDecoration::isActive</a>()<span class="keyword"> const</span>
<a name="l00085"></a>00085 <span class="keyword">    </span>{
<a name="l00086"></a>00086     <span class="keywordflow">return</span> bridge_-&gt;isActive();
<a name="l00087"></a>00087     }
<a name="l00088"></a>00088     
<a name="l00089"></a><a class="code" href="classKDecoration.html#4918572a6cdd9b9ba36f77f49f90fcc7">00089</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#4918572a6cdd9b9ba36f77f49f90fcc7" title="Returns true if the decoration window can be closed by the user.">KDecoration::isCloseable</a>()<span class="keyword"> const</span>
<a name="l00090"></a>00090 <span class="keyword">    </span>{
<a name="l00091"></a>00091     <span class="keywordflow">return</span> bridge_-&gt;isCloseable();
<a name="l00092"></a>00092     }
<a name="l00093"></a>00093 
<a name="l00094"></a><a class="code" href="classKDecoration.html#d3e9a21437ee4027d607ca6e3cb36b9a">00094</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#d3e9a21437ee4027d607ca6e3cb36b9a" title="Returns true if the decorated window can be maximized.">KDecoration::isMaximizable</a>()<span class="keyword"> const</span>
<a name="l00095"></a>00095 <span class="keyword">    </span>{
<a name="l00096"></a>00096     <span class="keywordflow">return</span> bridge_-&gt;isMaximizable();
<a name="l00097"></a>00097     }
<a name="l00098"></a>00098     
<a name="l00099"></a><a class="code" href="classKDecoration.html#9aac09db0f38e9d4eda77ad25e810a3f">00099</a> <a class="code" href="classKDecorationDefines.html#e0238f4c511b53633b718183f6240e71" title="Maximize mode.">KDecoration::MaximizeMode</a> <a class="code" href="classKDecoration.html#9aac09db0f38e9d4eda77ad25e810a3f" title="Returns the current maximization mode of the decorated window.">KDecoration::maximizeMode</a>()<span class="keyword"> const</span>
<a name="l00100"></a>00100 <span class="keyword">    </span>{
<a name="l00101"></a>00101     <span class="keywordflow">return</span> bridge_-&gt;maximizeMode();
<a name="l00102"></a>00102     }
<a name="l00103"></a>00103     
<a name="l00104"></a><a class="code" href="classKDecoration.html#3ae77bd0a41231fd0cbe562012f7188c">00104</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#3ae77bd0a41231fd0cbe562012f7188c" title="Returns true if the decorated window can be minimized by the user.">KDecoration::isMinimizable</a>()<span class="keyword"> const</span>
<a name="l00105"></a>00105 <span class="keyword">    </span>{
<a name="l00106"></a>00106     <span class="keywordflow">return</span> bridge_-&gt;isMinimizable();
<a name="l00107"></a>00107     }
<a name="l00108"></a>00108 
<a name="l00109"></a><a class="code" href="classKDecoration.html#16edbbdcaf94884f1e648b070124f04a">00109</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#16edbbdcaf94884f1e648b070124f04a" title="Return true if the decorated window can show context help (i.e.">KDecoration::providesContextHelp</a>()<span class="keyword"> const</span>
<a name="l00110"></a>00110 <span class="keyword">    </span>{
<a name="l00111"></a>00111     <span class="keywordflow">return</span> bridge_-&gt;providesContextHelp();
<a name="l00112"></a>00112     }
<a name="l00113"></a>00113     
<a name="l00114"></a><a class="code" href="classKDecoration.html#ad0aa5926b5585ac55e1127b062fa80f">00114</a> <span class="keywordtype">int</span> <a class="code" href="classKDecoration.html#ad0aa5926b5585ac55e1127b062fa80f" title="Returns the number of the virtual desktop the decorated window is currently on (including...">KDecoration::desktop</a>()<span class="keyword"> const</span>
<a name="l00115"></a>00115 <span class="keyword">    </span>{
<a name="l00116"></a>00116     <span class="keywordflow">return</span> bridge_-&gt;desktop();
<a name="l00117"></a>00117     }
<a name="l00118"></a>00118     
<a name="l00119"></a><a class="code" href="classKDecoration.html#6b639e0f7ffd9a644c906a8d2f26c69b">00119</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#6b639e0f7ffd9a644c906a8d2f26c69b" title="Returns true if the decoration window is modal (usually a modal dialog).">KDecoration::isModal</a>()<span class="keyword"> const</span>
<a name="l00120"></a>00120 <span class="keyword">    </span>{
<a name="l00121"></a>00121     <span class="keywordflow">return</span> bridge_-&gt;isModal();
<a name="l00122"></a>00122     }
<a name="l00123"></a>00123     
<a name="l00124"></a><a class="code" href="classKDecoration.html#9aa12c86b794be1c560cd67bbb2c1cc7">00124</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#9aa12c86b794be1c560cd67bbb2c1cc7" title="Returns true if the decorated window can be shaded.">KDecoration::isShadeable</a>()<span class="keyword"> const</span>
<a name="l00125"></a>00125 <span class="keyword">    </span>{
<a name="l00126"></a>00126     <span class="keywordflow">return</span> bridge_-&gt;isShadeable();
<a name="l00127"></a>00127     }
<a name="l00128"></a>00128     
<a name="l00129"></a><a class="code" href="classKDecoration.html#be27ebdcc5b171236abf324dd18bc129">00129</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#be27ebdcc5b171236abf324dd18bc129" title="Returns true if the decorated window is currently shaded.">KDecoration::isShade</a>()<span class="keyword"> const</span>
<a name="l00130"></a>00130 <span class="keyword">    </span>{
<a name="l00131"></a>00131     <span class="keywordflow">return</span> bridge_-&gt;isShade();
<a name="l00132"></a>00132     }
<a name="l00133"></a>00133     
<a name="l00134"></a><a class="code" href="classKDecoration.html#0d09a9014d46ead91eb56c3fbec84d12">00134</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#0d09a9014d46ead91eb56c3fbec84d12" title="Returns true if the decorated window was set to be shaded.">KDecoration::isSetShade</a>()<span class="keyword"> const</span>
<a name="l00135"></a>00135 <span class="keyword">    </span>{
<a name="l00136"></a>00136     <span class="keywordflow">return</span> bridge_-&gt;isSetShade();
<a name="l00137"></a>00137     }
<a name="l00138"></a>00138     
<a name="l00139"></a><a class="code" href="classKDecoration.html#ed605a4c88de573397a8f6a1accb9794">00139</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#ed605a4c88de573397a8f6a1accb9794" title="Returns true if the decorated window should be kept above other windows.">KDecoration::keepAbove</a>()<span class="keyword"> const</span>
<a name="l00140"></a>00140 <span class="keyword">    </span>{
<a name="l00141"></a>00141     <span class="keywordflow">return</span> bridge_-&gt;keepAbove();
<a name="l00142"></a>00142     }
<a name="l00143"></a>00143 
<a name="l00144"></a><a class="code" href="classKDecoration.html#bb32741e503b3585c1b69b50f9627e11">00144</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#bb32741e503b3585c1b69b50f9627e11" title="Returns true if the decorated window should be kept below other windows.">KDecoration::keepBelow</a>()<span class="keyword"> const</span>
<a name="l00145"></a>00145 <span class="keyword">    </span>{
<a name="l00146"></a>00146     <span class="keywordflow">return</span> bridge_-&gt;keepBelow();
<a name="l00147"></a>00147     }
<a name="l00148"></a>00148 
<a name="l00149"></a><a class="code" href="classKDecoration.html#fbb07af71d99f9f0629e2743a8149302">00149</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#fbb07af71d99f9f0629e2743a8149302" title="Returns true if the decorated window can be moved by the user.">KDecoration::isMovable</a>()<span class="keyword"> const</span>
<a name="l00150"></a>00150 <span class="keyword">    </span>{
<a name="l00151"></a>00151     <span class="keywordflow">return</span> bridge_-&gt;isMovable();
<a name="l00152"></a>00152     }
<a name="l00153"></a>00153 
<a name="l00154"></a><a class="code" href="classKDecoration.html#fc2d892fddc3fa3993bcdfeac156901a">00154</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#fc2d892fddc3fa3993bcdfeac156901a" title="Returns true if the decorated window can be resized by the user.">KDecoration::isResizable</a>()<span class="keyword"> const</span>
<a name="l00155"></a>00155 <span class="keyword">    </span>{
<a name="l00156"></a>00156     <span class="keywordflow">return</span> bridge_-&gt;isResizable();
<a name="l00157"></a>00157     }
<a name="l00158"></a>00158 
<a name="l00159"></a><a class="code" href="classKDecoration.html#394cbbe31c0f008a901a77e32a50ddfa">00159</a> NET::WindowType <a class="code" href="classKDecoration.html#394cbbe31c0f008a901a77e32a50ddfa" title="This function returns the window type of the decorated window.">KDecoration::windowType</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> supported_types )<span class="keyword"> const</span>
<a name="l00160"></a>00160 <span class="keyword">    </span>{ <span class="comment">// this one is also duplicated in KDecorationFactory</span>
<a name="l00161"></a>00161     <span class="keywordflow">return</span> bridge_-&gt;windowType( supported_types );
<a name="l00162"></a>00162     }
<a name="l00163"></a>00163 
<a name="l00164"></a><a class="code" href="classKDecoration.html#3a617e2a07101b25a42e9c0c60082af1">00164</a> QIconSet <a class="code" href="classKDecoration.html#3a617e2a07101b25a42e9c0c60082af1" title="Returns an icon set with the decorated window&amp;#39;s icon.">KDecoration::icon</a>()<span class="keyword"> const</span>
<a name="l00165"></a>00165 <span class="keyword">    </span>{
<a name="l00166"></a>00166     <span class="keywordflow">return</span> bridge_-&gt;icon();
<a name="l00167"></a>00167     }
<a name="l00168"></a>00168     
<a name="l00169"></a><a class="code" href="classKDecoration.html#ec63afbf32967fb4b35b1b78a486c203">00169</a> QString <a class="code" href="classKDecoration.html#ec63afbf32967fb4b35b1b78a486c203" title="Returns the decorated window&amp;#39;s caption that should be shown in the titlebar.">KDecoration::caption</a>()<span class="keyword"> const</span>
<a name="l00170"></a>00170 <span class="keyword">    </span>{
<a name="l00171"></a>00171     <span class="keywordflow">return</span> bridge_-&gt;caption();
<a name="l00172"></a>00172     }
<a name="l00173"></a>00173 
<a name="l00174"></a><a class="code" href="classKDecoration.html#120a0e98ca1bba08f326b65b3c34b3be">00174</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#120a0e98ca1bba08f326b65b3c34b3be" title="This function is the default handler for mouse events.">KDecoration::processMousePressEvent</a>( QMouseEvent* e )
<a name="l00175"></a>00175     {
<a name="l00176"></a>00176     <span class="keywordflow">return</span> bridge_-&gt;processMousePressEvent( e );
<a name="l00177"></a>00177     }
<a name="l00178"></a>00178 
<a name="l00179"></a><a class="code" href="classKDecoration.html#f0395bc84b2b90788e54b1aa68e3f0af">00179</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#f0395bc84b2b90788e54b1aa68e3f0af" title="This function invokes the window operations menu.">KDecoration::showWindowMenu</a>( <span class="keyword">const</span> QRect &amp;pos )
<a name="l00180"></a>00180     {
<a name="l00181"></a>00181     bridge_-&gt;showWindowMenu( pos );
<a name="l00182"></a>00182     }
<a name="l00183"></a>00183     
<a name="l00184"></a><a class="code" href="classKDecoration.html#cb97ec33270126aba5e80adc92003969">00184</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#f0395bc84b2b90788e54b1aa68e3f0af" title="This function invokes the window operations menu.">KDecoration::showWindowMenu</a>( QPoint pos )
<a name="l00185"></a>00185     {
<a name="l00186"></a>00186     bridge_-&gt;showWindowMenu( pos );
<a name="l00187"></a>00187     }
<a name="l00188"></a>00188 
<a name="l00189"></a><a class="code" href="classKDecoration.html#2a879f3ec6408a3fbb12e2554594aa19">00189</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#2a879f3ec6408a3fbb12e2554594aa19" title="This function performs the given window operation.">KDecoration::performWindowOperation</a>( <a class="code" href="classKDecorationDefines.html#78c502c2349fad3279a6de2f982f71ea">WindowOperation</a> op )
<a name="l00190"></a>00190     {
<a name="l00191"></a>00191     bridge_-&gt;performWindowOperation( op );
<a name="l00192"></a>00192     }
<a name="l00193"></a>00193 
<a name="l00194"></a><a class="code" href="classKDecoration.html#698cd8fae86da9a203feef357f63a0ce">00194</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#698cd8fae86da9a203feef357f63a0ce" title="If the decoration is non-rectangular, this function needs to be called to set the...">KDecoration::setMask</a>( <span class="keyword">const</span> QRegion&amp; reg, <span class="keywordtype">int</span> mode )
<a name="l00195"></a>00195     {
<a name="l00196"></a>00196     bridge_-&gt;setMask( reg, mode );
<a name="l00197"></a>00197     }
<a name="l00198"></a>00198     
<a name="l00199"></a><a class="code" href="classKDecoration.html#fc36880706fb870b5d69dae27900fc31">00199</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#fc36880706fb870b5d69dae27900fc31" title="This convenience function resets the shape mask.">KDecoration::clearMask</a>()
<a name="l00200"></a>00200     {
<a name="l00201"></a>00201     bridge_-&gt;setMask( QRegion(), 0 );
<a name="l00202"></a>00202     }
<a name="l00203"></a>00203     
<a name="l00204"></a><a class="code" href="classKDecoration.html#c4dacc454f3e8bb9b3c572c6928aaef2">00204</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#c4dacc454f3e8bb9b3c572c6928aaef2" title="If this function returns true, the decorated window is used as a preview e.g.">KDecoration::isPreview</a>()<span class="keyword"> const</span>
<a name="l00205"></a>00205 <span class="keyword">    </span>{
<a name="l00206"></a>00206     <span class="keywordflow">return</span> bridge_-&gt;isPreview();
<a name="l00207"></a>00207     }
<a name="l00208"></a>00208     
<a name="l00209"></a><a class="code" href="classKDecoration.html#9fd6465e3282b7dfe4a6bc4c0a752ed4">00209</a> QRect <a class="code" href="classKDecoration.html#9fd6465e3282b7dfe4a6bc4c0a752ed4" title="Returns the geometry of the decoration.">KDecoration::geometry</a>()<span class="keyword"> const</span>
<a name="l00210"></a>00210 <span class="keyword">    </span>{
<a name="l00211"></a>00211     <span class="keywordflow">return</span> bridge_-&gt;geometry();
<a name="l00212"></a>00212     }
<a name="l00213"></a>00213     
<a name="l00214"></a><a class="code" href="classKDecoration.html#47d267ab1ce35bc3de5a69c7299791c7">00214</a> QRect <a class="code" href="classKDecoration.html#47d267ab1ce35bc3de5a69c7299791c7" title="Returns the icon geometry for the window, i.e.">KDecoration::iconGeometry</a>()<span class="keyword"> const</span>
<a name="l00215"></a>00215 <span class="keyword">    </span>{
<a name="l00216"></a>00216     <span class="keywordflow">return</span> bridge_-&gt;iconGeometry();
<a name="l00217"></a>00217     }
<a name="l00218"></a>00218 
<a name="l00219"></a><a class="code" href="classKDecoration.html#84eed4c34c154aaf05460fe9acd6d15e">00219</a> QRegion <a class="code" href="classKDecoration.html#84eed4c34c154aaf05460fe9acd6d15e" title="Returns the intersection of the given region with the region left unobscured by the...">KDecoration::unobscuredRegion</a>( <span class="keyword">const</span> QRegion&amp; r )<span class="keyword"> const</span>
<a name="l00220"></a>00220 <span class="keyword">    </span>{
<a name="l00221"></a>00221     <span class="keywordflow">return</span> bridge_-&gt;unobscuredRegion( r );
<a name="l00222"></a>00222     }
<a name="l00223"></a>00223 
<a name="l00224"></a><a class="code" href="classKDecoration.html#5fc94be87371222904e2133462fb590a">00224</a> QWidget* <a class="code" href="classKDecoration.html#5fc94be87371222904e2133462fb590a" title="Returns the main workspace widget.">KDecoration::workspaceWidget</a>()<span class="keyword"> const</span>
<a name="l00225"></a>00225 <span class="keyword">    </span>{
<a name="l00226"></a>00226     <span class="keywordflow">return</span> bridge_-&gt;workspaceWidget();
<a name="l00227"></a>00227     }
<a name="l00228"></a>00228         
<a name="l00229"></a><a class="code" href="classKDecoration.html#54368873bc97ebf6fac325b8022c5d6d">00229</a> WId <a class="code" href="classKDecoration.html#54368873bc97ebf6fac325b8022c5d6d" title="Returns the handle of the window that is being decorated.">KDecoration::windowId</a>()<span class="keyword"> const</span>
<a name="l00230"></a>00230 <span class="keyword">    </span>{
<a name="l00231"></a>00231     <span class="keywordflow">return</span> bridge_-&gt;windowId();
<a name="l00232"></a>00232     }
<a name="l00233"></a>00233         
<a name="l00234"></a><a class="code" href="classKDecoration.html#2661ed1ae0ef81c06fa98aa4245662fd">00234</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#2661ed1ae0ef81c06fa98aa4245662fd" title="This function can be called by the decoration to request closing of the decorated...">KDecoration::closeWindow</a>()
<a name="l00235"></a>00235     {
<a name="l00236"></a>00236     bridge_-&gt;closeWindow();
<a name="l00237"></a>00237     }
<a name="l00238"></a>00238 
<a name="l00239"></a>00239 <span class="keywordtype">void</span> KDecoration::maximize( ButtonState button )
<a name="l00240"></a>00240     {
<a name="l00241"></a>00241     <a class="code" href="classKDecoration.html#2a879f3ec6408a3fbb12e2554594aa19" title="This function performs the given window operation.">performWindowOperation</a>( <a class="code" href="classKDecoration.html#10b913d348df2d70ffb596b5b43c1f16" title="Returns the KDecorationOptions object, which is used to access configuration settings...">options</a>()-&gt;operationMaxButtonClick( button ));
<a name="l00242"></a>00242     }
<a name="l00243"></a>00243 
<a name="l00244"></a><a class="code" href="classKDecoration.html#fcec6cc40db7a993e0b6997968d5223e">00244</a> <span class="keywordtype">void</span> KDecoration::maximize( <a class="code" href="classKDecorationDefines.html#e0238f4c511b53633b718183f6240e71" title="Maximize mode.">MaximizeMode</a> mode )
<a name="l00245"></a>00245     {
<a name="l00246"></a>00246     bridge_-&gt;maximize( mode );
<a name="l00247"></a>00247     }
<a name="l00248"></a>00248     
<a name="l00249"></a><a class="code" href="classKDecoration.html#aa598f8049af3dd9369328d683498928">00249</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#aa598f8049af3dd9369328d683498928" title="Minimize the decorated window.">KDecoration::minimize</a>()
<a name="l00250"></a>00250     {
<a name="l00251"></a>00251     bridge_-&gt;minimize();
<a name="l00252"></a>00252     }
<a name="l00253"></a>00253 
<a name="l00254"></a><a class="code" href="classKDecoration.html#865d2fd2006e3d91e56edef15d2e30b9">00254</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#865d2fd2006e3d91e56edef15d2e30b9" title="Start showing context help in the window (i.e.">KDecoration::showContextHelp</a>()
<a name="l00255"></a>00255     {
<a name="l00256"></a>00256     bridge_-&gt;showContextHelp();
<a name="l00257"></a>00257     }
<a name="l00258"></a>00258     
<a name="l00259"></a><a class="code" href="classKDecoration.html#57db51d6d53939fe26e73803664d7eb4">00259</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#57db51d6d53939fe26e73803664d7eb4" title="Moves the window to the given desktop.">KDecoration::setDesktop</a>( <span class="keywordtype">int</span> <a class="code" href="classKDecoration.html#ad0aa5926b5585ac55e1127b062fa80f" title="Returns the number of the virtual desktop the decorated window is currently on (including...">desktop</a> )
<a name="l00260"></a>00260     {
<a name="l00261"></a>00261     bridge_-&gt;setDesktop( desktop );
<a name="l00262"></a>00262     }
<a name="l00263"></a>00263 
<a name="l00264"></a><a class="code" href="classKDecoration.html#efb316de6cf762684e642cb3b4c3983f">00264</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#efb316de6cf762684e642cb3b4c3983f" title="This function toggles the on-all-desktops state of the decorated window.">KDecoration::toggleOnAllDesktops</a>()
<a name="l00265"></a>00265     {
<a name="l00266"></a>00266     <span class="keywordflow">if</span>( <a class="code" href="classKDecoration.html#53718b62531291f3b512e3c43ef24c21" title="Convenience function that returns true if the window is on all virtual desktops.">isOnAllDesktops</a>())
<a name="l00267"></a>00267         <a class="code" href="classKDecoration.html#57db51d6d53939fe26e73803664d7eb4" title="Moves the window to the given desktop.">setDesktop</a>( bridge_-&gt;currentDesktop());
<a name="l00268"></a>00268     <span class="keywordflow">else</span>
<a name="l00269"></a>00269         <a class="code" href="classKDecoration.html#57db51d6d53939fe26e73803664d7eb4" title="Moves the window to the given desktop.">setDesktop</a>( NET::OnAllDesktops );
<a name="l00270"></a>00270     }
<a name="l00271"></a>00271 
<a name="l00272"></a><a class="code" href="classKDecoration.html#b5936e0cd55a4ba1cd7f8e278a29a64a">00272</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#b5936e0cd55a4ba1cd7f8e278a29a64a" title="This function performs the operation configured as titlebar double click operation...">KDecoration::titlebarDblClickOperation</a>()
<a name="l00273"></a>00273     {
<a name="l00274"></a>00274     bridge_-&gt;titlebarDblClickOperation();
<a name="l00275"></a>00275     }
<a name="l00276"></a>00276 
<a name="l00277"></a><a class="code" href="classKDecoration.html#e870f1fe084a2b1952e10b210bbf8031">00277</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#e870f1fe084a2b1952e10b210bbf8031" title="This function performs the operation configured as titlebar wheel mouse operation...">KDecoration::titlebarMouseWheelOperation</a>( <span class="keywordtype">int</span> delta )
<a name="l00278"></a>00278     {
<a name="l00279"></a>00279     bridge_-&gt;titlebarMouseWheelOperation( delta );
<a name="l00280"></a>00280     }
<a name="l00281"></a>00281 
<a name="l00282"></a><a class="code" href="classKDecoration.html#3596eac015653ca38f4655fb9e496bfa">00282</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#3596eac015653ca38f4655fb9e496bfa" title="Shades or unshades the decorated window.">KDecoration::setShade</a>( <span class="keywordtype">bool</span> <span class="keyword">set</span> )
<a name="l00283"></a>00283     {
<a name="l00284"></a>00284     bridge_-&gt;setShade( <span class="keyword">set</span> );
<a name="l00285"></a>00285     }
<a name="l00286"></a>00286         
<a name="l00287"></a><a class="code" href="classKDecoration.html#9a1b6096524e121c0730249f150e6a72">00287</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#9a1b6096524e121c0730249f150e6a72" title="Sets or reset keeping this window above others.">KDecoration::setKeepAbove</a>( <span class="keywordtype">bool</span> <span class="keyword">set</span> )
<a name="l00288"></a>00288     {
<a name="l00289"></a>00289     bridge_-&gt;setKeepAbove( <span class="keyword">set</span> );
<a name="l00290"></a>00290     }
<a name="l00291"></a>00291     
<a name="l00292"></a><a class="code" href="classKDecoration.html#a7d9badc3c2beffb269c42e666c205c9">00292</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#a7d9badc3c2beffb269c42e666c205c9" title="Sets or reset keeping this window below others.">KDecoration::setKeepBelow</a>( <span class="keywordtype">bool</span> <span class="keyword">set</span> )
<a name="l00293"></a>00293     {
<a name="l00294"></a>00294     bridge_-&gt;setKeepBelow( <span class="keyword">set</span> );
<a name="l00295"></a>00295     }
<a name="l00296"></a>00296 
<a name="l00297"></a><a class="code" href="classKDecoration.html#9421947e766b4223575de71602ea90f5">00297</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#9421947e766b4223575de71602ea90f5" title="This function may be reimplemented to provide custom bound drawing for transparent...">KDecoration::drawbound</a>( <span class="keyword">const</span> QRect&amp;, <span class="keywordtype">bool</span> )
<a name="l00298"></a>00298     {
<a name="l00299"></a>00299     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00300"></a>00300     }
<a name="l00301"></a>00301 
<a name="l00302"></a><a class="code" href="classKDecoration.html#6b274de881ab6f65fb8c47b37fd9bda2">00302</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecoration.html#6b274de881ab6f65fb8c47b37fd9bda2" title="This function may be reimplemented to provide custom minimize/restore animations...">KDecoration::animateMinimize</a>( <span class="keywordtype">bool</span> )
<a name="l00303"></a>00303     {
<a name="l00304"></a>00304     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00305"></a>00305     }
<a name="l00306"></a>00306 
<a name="l00307"></a>00307 <span class="keywordtype">bool</span> KDecoration::windowDocked( <a class="code" href="classKDecorationDefines.html#7cd259316ec359e451faf3e6466ac407" title="These values represent positions inside an area.">Position</a> )
<a name="l00308"></a>00308     {
<a name="l00309"></a>00309     <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00310"></a>00310     }
<a name="l00311"></a>00311 
<a name="l00312"></a><a class="code" href="classKDecoration.html#c37666bcd876b371c4e964813fee381e">00312</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#c37666bcd876b371c4e964813fee381e" title="This function is only allowed to be called once from animateMinimize().">KDecoration::helperShowHide</a>( <span class="keywordtype">bool</span> show )
<a name="l00313"></a>00313     {
<a name="l00314"></a>00314     bridge_-&gt;helperShowHide( show );
<a name="l00315"></a>00315     }
<a name="l00316"></a>00316 
<a name="l00317"></a><a class="code" href="classKDecoration.html#1764cd95c282f10b577a6ad64c853266">00317</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#1764cd95c282f10b577a6ad64c853266" title="This function is called to reset the decoration on settings changes.">KDecoration::reset</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> )
<a name="l00318"></a>00318     {
<a name="l00319"></a>00319     }
<a name="l00320"></a>00320 
<a name="l00321"></a><a class="code" href="classKDecoration.html#b17a2dd45d16d175d8a4b915390226da">00321</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#b17a2dd45d16d175d8a4b915390226da" title="Performs X server grab.">KDecoration::grabXServer</a>()
<a name="l00322"></a>00322     {
<a name="l00323"></a>00323     bridge_-&gt;grabXServer( <span class="keyword">true</span> );
<a name="l00324"></a>00324     }
<a name="l00325"></a>00325     
<a name="l00326"></a><a class="code" href="classKDecoration.html#b3ef4138795f5178aba96ebffe242186">00326</a> <span class="keywordtype">void</span> <a class="code" href="classKDecoration.html#b3ef4138795f5178aba96ebffe242186" title="Ungrabs X server (if the number of ungrab attempts matches the number of grab attempts)...">KDecoration::ungrabXServer</a>()
<a name="l00327"></a>00327     {
<a name="l00328"></a>00328     bridge_-&gt;grabXServer( <span class="keyword">false</span> );
<a name="l00329"></a>00329     }
<a name="l00330"></a>00330     
<a name="l00331"></a><a class="code" href="classKDecoration.html#6b2756bdfc94d585d238166f4a902349">00331</a> <a class="code" href="classKDecorationDefines.html#7cd259316ec359e451faf3e6466ac407" title="These values represent positions inside an area.">KDecoration::Position</a> <a class="code" href="classKDecoration.html#6b2756bdfc94d585d238166f4a902349" title="This function should return mouse cursor position in the decoration.">KDecoration::mousePosition</a>( <span class="keyword">const</span> QPoint&amp; p )<span class="keyword"> const</span>
<a name="l00332"></a>00332 <span class="keyword"></span>{
<a name="l00333"></a>00333     <span class="keyword">const</span> <span class="keywordtype">int</span> range = 16;
<a name="l00334"></a>00334     <span class="keywordtype">int</span> bleft, bright, btop, bbottom;
<a name="l00335"></a>00335     <a class="code" href="classKDecoration.html#f6c5daccb14738ce1601087303eed1d6" title="This function should return the distance from each window side to the inner window...">borders</a>( bleft, bright, btop, bbottom );
<a name="l00336"></a>00336     btop = KMIN( btop, 4 ); <span class="comment">// otherwise whole titlebar would have resize cursor</span>
<a name="l00337"></a>00337 
<a name="l00338"></a>00338     <a class="code" href="classKDecorationDefines.html#7cd259316ec359e451faf3e6466ac407" title="These values represent positions inside an area.">Position</a> m = PositionCenter;
<a name="l00339"></a>00339 
<a name="l00340"></a>00340     <span class="keywordflow">if</span> ( ( p.x() &gt; bleft &amp;&amp; p.x() &lt; <a class="code" href="classKDecoration.html#ffa0a7b9b3ee3e5e7260d3a14096b57f" title="Returns the main widget for the decoration.">widget</a>()-&gt;width() - bright )
<a name="l00341"></a>00341          &amp;&amp; ( p.y() &gt; btop &amp;&amp; p.y() &lt; <a class="code" href="classKDecoration.html#ffa0a7b9b3ee3e5e7260d3a14096b57f" title="Returns the main widget for the decoration.">widget</a>()-&gt;height() - bbottom ) )
<a name="l00342"></a>00342         <span class="keywordflow">return</span> PositionCenter;
<a name="l00343"></a>00343 
<a name="l00344"></a>00344     <span class="keywordflow">if</span> ( p.y() &lt;= KMAX( range, btop ) &amp;&amp; p.x() &lt;= KMAX( range, bleft ))
<a name="l00345"></a>00345         m = PositionTopLeft;
<a name="l00346"></a>00346     <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( p.y() &gt;= <a class="code" href="classKDecoration.html#ffa0a7b9b3ee3e5e7260d3a14096b57f" title="Returns the main widget for the decoration.">widget</a>()-&gt;height()- KMAX( range, bbottom )
<a name="l00347"></a>00347         &amp;&amp; p.x() &gt;= <a class="code" href="classKDecoration.html#ffa0a7b9b3ee3e5e7260d3a14096b57f" title="Returns the main widget for the decoration.">widget</a>()-&gt;width()- KMAX( range, bright ))
<a name="l00348"></a>00348         m = PositionBottomRight;
<a name="l00349"></a>00349     <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( p.y() &gt;= <a class="code" href="classKDecoration.html#ffa0a7b9b3ee3e5e7260d3a14096b57f" title="Returns the main widget for the decoration.">widget</a>()-&gt;height()- KMAX( range, bbottom ) &amp;&amp; p.x() &lt;= KMAX( range, bleft ))
<a name="l00350"></a>00350         m = PositionBottomLeft;
<a name="l00351"></a>00351     <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( p.y() &lt;= KMAX( range, btop ) &amp;&amp; p.x() &gt;= <a class="code" href="classKDecoration.html#ffa0a7b9b3ee3e5e7260d3a14096b57f" title="Returns the main widget for the decoration.">widget</a>()-&gt;width()- KMAX( range, bright ))
<a name="l00352"></a>00352         m = PositionTopRight;
<a name="l00353"></a>00353     <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( p.y() &lt;= btop )
<a name="l00354"></a>00354         m = PositionTop;
<a name="l00355"></a>00355     <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( p.y() &gt;= <a class="code" href="classKDecoration.html#ffa0a7b9b3ee3e5e7260d3a14096b57f" title="Returns the main widget for the decoration.">widget</a>()-&gt;height()-bbottom )
<a name="l00356"></a>00356         m = PositionBottom;
<a name="l00357"></a>00357     <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( p.x() &lt;= bleft )
<a name="l00358"></a>00358         m = PositionLeft;
<a name="l00359"></a>00359     <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( p.x() &gt;= <a class="code" href="classKDecoration.html#ffa0a7b9b3ee3e5e7260d3a14096b57f" title="Returns the main widget for the decoration.">widget</a>()-&gt;width()-bright )
<a name="l00360"></a>00360         m = PositionRight;
<a name="l00361"></a>00361     <span class="keywordflow">else</span>
<a name="l00362"></a>00362         m = PositionCenter;
<a name="l00363"></a>00363     <span class="keywordflow">return</span> m;
<a name="l00364"></a>00364 }
<a name="l00365"></a>00365 
<a name="l00366"></a>00366 KDecorationOptions::KDecorationOptions()
<a name="l00367"></a>00367     {
<a name="l00368"></a>00368     assert( KDecoration::options_ == NULL );
<a name="l00369"></a>00369     KDecoration::options_ = <span class="keyword">this</span>;
<a name="l00370"></a>00370     }
<a name="l00371"></a>00371 
<a name="l00372"></a>00372 KDecorationOptions::~KDecorationOptions()
<a name="l00373"></a>00373     {
<a name="l00374"></a>00374     assert( KDecoration::options_ == <span class="keyword">this</span> );
<a name="l00375"></a>00375     KDecoration::options_ = NULL;
<a name="l00376"></a>00376     }
<a name="l00377"></a>00377 
<a name="l00378"></a><a class="code" href="classKDecorationOptions.html#66daf378636f1c8dcee2cb7e4dfa9aeb">00378</a> <span class="keyword">const</span> QColor&amp; <a class="code" href="classKDecorationOptions.html#66daf378636f1c8dcee2cb7e4dfa9aeb" title="Returns the color that should be used for the given part of the decoration.">KDecorationOptions::color</a>(<a class="code" href="classKDecorationDefines.html#97b303019fc8b94945b4a9fddcf9d3ae" title="Basic color types that should be recognized by all decoration styles.">ColorType</a> type, <span class="keywordtype">bool</span> active)<span class="keyword"> const</span>
<a name="l00379"></a>00379 <span class="keyword"></span>{
<a name="l00380"></a>00380     <span class="keywordflow">return</span>(d-&gt;colors[type + (active ? 0 : NUM_COLORS)]);
<a name="l00381"></a>00381 }
<a name="l00382"></a>00382 
<a name="l00383"></a><a class="code" href="classKDecorationOptions.html#297d6a304716e812fea4e78a2e88bf08">00383</a> <span class="keyword">const</span> QFont&amp; <a class="code" href="classKDecorationOptions.html#297d6a304716e812fea4e78a2e88bf08" title="Returns the active or inactive decoration font.">KDecorationOptions::font</a>(<span class="keywordtype">bool</span> active, <span class="keywordtype">bool</span> small)<span class="keyword"> const</span>
<a name="l00384"></a>00384 <span class="keyword"></span>{
<a name="l00385"></a>00385     <span class="keywordflow">if</span> ( small )
<a name="l00386"></a>00386         <span class="keywordflow">return</span>(active ? d-&gt;activeFontSmall : d-&gt;inactiveFontSmall);
<a name="l00387"></a>00387     <span class="keywordflow">else</span>
<a name="l00388"></a>00388         <span class="keywordflow">return</span>(active ? d-&gt;activeFont : d-&gt;inactiveFont);
<a name="l00389"></a>00389 }
<a name="l00390"></a>00390 
<a name="l00391"></a><a class="code" href="classKDecorationOptions.html#e2ed3ef8128121916d0beef5ec6d8cd6">00391</a> <span class="keyword">const</span> QColorGroup&amp; <a class="code" href="classKDecorationOptions.html#e2ed3ef8128121916d0beef5ec6d8cd6" title="Returns a colorgroup using the given decoration color as the background.">KDecorationOptions::colorGroup</a>(<a class="code" href="classKDecorationDefines.html#97b303019fc8b94945b4a9fddcf9d3ae" title="Basic color types that should be recognized by all decoration styles.">ColorType</a> type, <span class="keywordtype">bool</span> active)<span class="keyword"> const</span>
<a name="l00392"></a>00392 <span class="keyword"></span>{
<a name="l00393"></a>00393     <span class="keywordtype">int</span> idx = type + (active ? 0 : NUM_COLORS);
<a name="l00394"></a>00394     <span class="keywordflow">if</span>(d-&gt;cg[idx])
<a name="l00395"></a>00395         <span class="keywordflow">return</span>(*d-&gt;cg[idx]);
<a name="l00396"></a>00396     d-&gt;cg[idx] = <span class="keyword">new</span> QColorGroup(Qt::black, d-&gt;colors[idx], d-&gt;colors[idx].light(150),
<a name="l00397"></a>00397                               d-&gt;colors[idx].dark(), d-&gt;colors[idx].dark(120),
<a name="l00398"></a>00398                               Qt::black, QApplication::palette().active().
<a name="l00399"></a>00399                               base());
<a name="l00400"></a>00400     <span class="keywordflow">return</span>(*d-&gt;cg[idx]);
<a name="l00401"></a>00401 }
<a name="l00402"></a>00402 
<a name="l00403"></a><a class="code" href="classKDecorationOptions.html#80db4c3b2d186b580e9bf3c88710fcfc">00403</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecorationOptions.html#80db4c3b2d186b580e9bf3c88710fcfc" title="Returns true if the style should use custom button positions The changed flags for...">KDecorationOptions::customButtonPositions</a>()<span class="keyword"> const</span>
<a name="l00404"></a>00404 <span class="keyword"></span>{
<a name="l00405"></a>00405     <span class="keywordflow">return</span> d-&gt;custom_button_positions;
<a name="l00406"></a>00406 }
<a name="l00407"></a>00407 
<a name="l00408"></a><a class="code" href="classKDecorationOptions.html#8ad12d76c93c5f1a12ea07b30f92d2fa">00408</a> QString <a class="code" href="classKDecorationOptions.html#8ad12d76c93c5f1a12ea07b30f92d2fa" title="If customButtonPositions() returns true, titleButtonsLeft returns which buttons should...">KDecorationOptions::titleButtonsLeft</a>()<span class="keyword"> const</span>
<a name="l00409"></a>00409 <span class="keyword"></span>{
<a name="l00410"></a>00410     <span class="keywordflow">return</span> d-&gt;title_buttons_left;
<a name="l00411"></a>00411 }
<a name="l00412"></a>00412 
<a name="l00413"></a><a class="code" href="classKDecorationOptions.html#d10cec51369eb4d2645a52cdcc9e321b">00413</a> QString <a class="code" href="classKDecorationOptions.html#d10cec51369eb4d2645a52cdcc9e321b" title="If customButtonPositions() returns true, titleButtonsRight returns which buttons...">KDecorationOptions::titleButtonsRight</a>()<span class="keyword"> const</span>
<a name="l00414"></a>00414 <span class="keyword"></span>{
<a name="l00415"></a>00415     <span class="keywordflow">return</span> d-&gt;title_buttons_right;
<a name="l00416"></a>00416 }
<a name="l00417"></a>00417 
<a name="l00418"></a><a class="code" href="classKDecorationOptions.html#99f82a16ab449c0ea1f33042600a86a0">00418</a> <span class="keywordtype">bool</span> <a class="code" href="classKDecorationOptions.html#99f82a16ab449c0ea1f33042600a86a0">KDecorationOptions::showTooltips</a>()<span class="keyword"> const</span>
<a name="l00419"></a>00419 <span class="keyword"></span>{
<a name="l00420"></a>00420     <span class="keywordflow">return</span> d-&gt;show_tooltips;
<a name="l00421"></a>00421 }
<a name="l00422"></a>00422 
<a name="l00423"></a><a class="code" href="classKDecorationOptions.html#902355bcbae17904d4b9280e10b9614a">00423</a> <a class="code" href="classKDecorationDefines.html#ef004e9289412d26146e90b5aabf5ee3" title="Border size.">KDecorationOptions::BorderSize</a> <a class="code" href="classKDecorationOptions.html#902355bcbae17904d4b9280e10b9614a" title="The preferred border size selected by the user, e.g.">KDecorationOptions::preferredBorderSize</a>( KDecorationFactory* <a class="code" href="classKDecoration.html#00df2796c7d3e81aa1f4221a3b13dfe8" title="Returns the factory that created this decoration.">factory</a> )<span class="keyword"> const</span>
<a name="l00424"></a>00424 <span class="keyword"></span>{
<a name="l00425"></a>00425     assert( factory != NULL );
<a name="l00426"></a>00426     <span class="keywordflow">if</span>( d-&gt;cached_border_size == BordersCount ) <span class="comment">// invalid</span>
<a name="l00427"></a>00427         d-&gt;cached_border_size = d-&gt;findPreferredBorderSize( d-&gt;border_size,
<a name="l00428"></a>00428             factory-&gt;borderSizes());
<a name="l00429"></a>00429     <span class="keywordflow">return</span> d-&gt;cached_border_size;
<a name="l00430"></a>00430 }
<a name="l00431"></a>00431 
<a name="l00432"></a>00432 <span class="keywordtype">bool</span> KDecorationOptions::moveResizeMaximizedWindows()<span class="keyword"> const</span>
<a name="l00433"></a>00433 <span class="keyword"></span>{
<a name="l00434"></a>00434     <span class="keywordflow">return</span> d-&gt;move_resize_maximized_windows;
<a name="l00435"></a>00435 }
<a name="l00436"></a>00436 
<a name="l00437"></a>00437 <a class="code" href="classKDecorationDefines.html#78c502c2349fad3279a6de2f982f71ea">KDecorationDefines::WindowOperation</a> KDecorationOptions::operationMaxButtonClick( Qt::ButtonState button )<span class="keyword"> const</span>
<a name="l00438"></a>00438 <span class="keyword">    </span>{
<a name="l00439"></a>00439     <span class="keywordflow">return</span> button == Qt::RightButton? d-&gt;OpMaxButtonRightClick : 
<a name="l00440"></a>00440            button == Qt::MidButton?   d-&gt;OpMaxButtonMiddleClick :
<a name="l00441"></a>00441                                       d-&gt;OpMaxButtonLeftClick;
<a name="l00442"></a>00442     }
<a name="l00443"></a>00443 
<a name="l00444"></a>00444 <span class="preprocessor">#include "kdecoration.moc"</span>
</pre></div></div>
    </div></div>


      </td>
  </tr>
  <tr>
    <td valign="top" id="leftmenu" width="25%">
      <a name="navigation"></a>
      <div class="menu_box"><h2>kwin/lib</h2>
<div class="nav_list">
<ul><li><a href="index.html">Main Page</a></li><li><a href="hierarchy.html">Class Hierarchy</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="files.html">File List</a></li><li><a href="functions.html">Class Members</a></li><li><a href="pages.html">Related Pages</a></li></ul>
<!--
<h2>Class Picker</h2>
<div style="text-align: center;">
<form name="guideform">
<select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value">
<option value="annotated.html">-- Choose --</option>
  <option value="classKCommonDecoration.html">kcommondecoration</option>,  <option value="classKCommonDecorationButton.html">kcommondecorationbutton</option>,  <option value="classKDecoration.html">kdecoration</option>,  <option value="classKDecorationDefines.html">kdecorationdefines</option>,  <option value="classKDecorationOptions.html">kdecorationoptions</option>,
</select>
</form>
</div>
-->
</div></div>
<div class="menu_box"><h2>API Dox</h2>
<div class="nav_list">
<ul>
<li><a href="../../../kate/html/index.html">kate</a></li><li><a href="../../../kwin/html/index.html">kwin</a></li><li>&nbsp;&nbsp;<a href="../../../kwin/lib/html/index.html">lib</a></li><li><a href="../../../libkonq/html/index.html">libkonq</a></li>
</ul></div></div>


        </td>
</tr>
</table>

<span class="doNotDisplay">
  <a href="http://www.kde.org/" accesskey="8">KDE Home</a> |
  <a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> |
  <a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a>
</span>


<div style="height: 8px"></div>

<div id="footer">
  <div id="footer_left">
    Maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;groo&#116;&#64;kde&#46;or&#x67;">Adriaan de Groot</a>
and
<a href="&#109;a&#105;&#108;&#116;&#111;&#58;w&#105;nter&#64;kde&#46;or&#x67">Allen Winter</a>.
<br/>
    KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" 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 id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div>
</div>

<!--
WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL
BE BLOCKED INSTANTLY AND PERMANENTLY!
<a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a>
WARNING END
-->

</body>
</html>