<?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: KCommonDecorationButton Class Reference (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 --> <div class="contents"> <h1>KCommonDecorationButton Class Reference</h1><!-- doxytag: class="KCommonDecorationButton" --><!-- doxytag: inherits="QButton" --><code>#include <<a class="el" href="kcommondecoration_8h-source.html">kcommondecoration.h</a>></code> <p> Inherits QButton. <p> <p> <a href="classKCommonDecorationButton-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> Title bar buttons of <a class="el" href="classKCommonDecoration.html" title="This class eases development of decorations by implementing parts of KDecoration...">KCommonDecoration</a> need to inherit this class. <p>Definition at line <a class="el" href="kcommondecoration_8h-source.html#l00290">290</a> of file <a class="el" href="kcommondecoration_8h-source.html">kcommondecoration.h</a>.</p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Types</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom">{ <br> <a class="el" href="classKCommonDecorationButton.html#46e57c819304e85671bc9c12ed139978522acd148b11ad60cf4d45a1133564c0">ManualReset</a> = 1 << 0, <a class="el" href="classKCommonDecorationButton.html#46e57c819304e85671bc9c12ed1399782b615440f9c6923d4761974103f16874">SizeChange</a> = 1 << 1, <a class="el" href="classKCommonDecorationButton.html#46e57c819304e85671bc9c12ed1399786bee2bf3a5c3a184af442559364795bf">ToggleChange</a> = 1 << 2, <a class="el" href="classKCommonDecorationButton.html#46e57c819304e85671bc9c12ed139978ebf9b72f4ee2b26f6fc946283abd125f">StateChange</a> = 1 << 3, <br> <a class="el" href="classKCommonDecorationButton.html#46e57c819304e85671bc9c12ed13997884cbb3bda20243ea8a48e39d36a98688">IconChange</a> = 1 << 4, <a class="el" href="classKCommonDecorationButton.html#46e57c819304e85671bc9c12ed1399787e883ee529f42d35eccd341fe03c1ff5">DecorationReset</a> = 1 << 5 <br> }</td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f62b493b113f5f123633482874057d10"></a><!-- doxytag: member="KCommonDecorationButton::KCommonDecorationButton" ref="f62b493b113f5f123633482874057d10" args="(ButtonType type, KCommonDecoration *parent, const char *name)" --> </td><td class="memItemRight" valign="bottom"><b>KCommonDecorationButton</b> (ButtonType type, <a class="el" href="classKCommonDecoration.html">KCommonDecoration</a> *parent, const char *name)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKCommonDecorationButton.html#0473c0df8bda92875c27471e791c92fb">reset</a> (unsigned long changed)=0</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classKCommonDecoration.html">KCommonDecoration</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classKCommonDecorationButton.html#69380743b39174aa40858348cc065cc8">decoration</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">ButtonType </td><td class="memItemRight" valign="bottom"><a class="el" href="classKCommonDecorationButton.html#884281ccb66ae34bc5a3d9a9c993c0c6">type</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classKCommonDecorationButton.html#c3bda944734a7c3553bb49ad47090c22">isLeft</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKCommonDecorationButton.html#adf6c4d7394239727af28433f6e93b85">setRealizeButtons</a> (int btns)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKCommonDecorationButton.html#31be09cb483adc8a7e3964e40f5917c5">setSize</a> (const QSize &s)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKCommonDecorationButton.html#d6e197890f13f5d2bf94cfad4d1bc12c">setTipText</a> (const QString &tip)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">ButtonState </td><td class="memItemRight" valign="bottom"><a class="el" href="classKCommonDecorationButton.html#771f0c9c5329adf0e64636ae806def54">lastMousePress</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="16804b8f282e0c4e33cd4ce8ddaaa6f0"></a><!-- doxytag: member="KCommonDecorationButton::sizeHint" ref="16804b8f282e0c4e33cd4ce8ddaaa6f0" args="() const " --> QSize </td><td class="memItemRight" valign="bottom"><b>sizeHint</b> () const </td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="85579db75eaa0b64a0899907f1675eb8"></a><!-- doxytag: member="KCommonDecorationButton::setToggleButton" ref="85579db75eaa0b64a0899907f1675eb8" args="(bool toggle)" --> void </td><td class="memItemRight" valign="bottom"><b>setToggleButton</b> (bool toggle)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="65d816a95ae8d8b60433a069d3a81438"></a><!-- doxytag: member="KCommonDecorationButton::setOn" ref="65d816a95ae8d8b60433a069d3a81438" args="(bool on)" --> void </td><td class="memItemRight" valign="bottom"><b>setOn</b> (bool on)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9d682dbeb60bdbba08918561e197fb5a"></a><!-- doxytag: member="KCommonDecorationButton::setLeft" ref="9d682dbeb60bdbba08918561e197fb5a" args="(bool left)" --> void </td><td class="memItemRight" valign="bottom"><b>setLeft</b> (bool left)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5956a1a37ce1587bd90f79284da5a267"></a><!-- doxytag: member="KCommonDecorationButton::mousePressEvent" ref="5956a1a37ce1587bd90f79284da5a267" args="(QMouseEvent *e)" --> void </td><td class="memItemRight" valign="bottom"><b>mousePressEvent</b> (QMouseEvent *e)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="420a43f1618627ec2cb942fd87ac114d"></a><!-- doxytag: member="KCommonDecorationButton::mouseReleaseEvent" ref="420a43f1618627ec2cb942fd87ac114d" args="(QMouseEvent *e)" --> void </td><td class="memItemRight" valign="bottom"><b>mouseReleaseEvent</b> (QMouseEvent *e)</td></tr> <tr><td colspan="2"><br><h2>Friends</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4ac0ac3e3f2cf965648f3b6be8d02887"></a><!-- doxytag: member="KCommonDecorationButton::KCommonDecoration" ref="4ac0ac3e3f2cf965648f3b6be8d02887" args="" --> class </td><td class="memItemRight" valign="bottom"><a class="el" href="classKCommonDecorationButton.html#4ac0ac3e3f2cf965648f3b6be8d02887">KCommonDecoration</a></td></tr> </table> <hr><h2>Member Enumeration Documentation</h2> <a class="anchor" name="46e57c819304e85671bc9c12ed139978"></a><!-- doxytag: member="KCommonDecorationButton::@0" ref="46e57c819304e85671bc9c12ed139978" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">anonymous enum </td> </tr> </table> </div> <div class="memdoc"> <p> These flags specify what has changed, e.g. <p> the reason for a <a class="el" href="classKCommonDecorationButton.html#0473c0df8bda92875c27471e791c92fb" title="Initialize the button after size change etc.">reset()</a>. <dl compact><dt><b>Enumerator: </b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><em><a class="anchor" name="46e57c819304e85671bc9c12ed139978522acd148b11ad60cf4d45a1133564c0"></a><!-- doxytag: member="ManualReset" ref="46e57c819304e85671bc9c12ed139978522acd148b11ad60cf4d45a1133564c0" args="" -->ManualReset</em> </td><td> The button might want to do a full reset for some reason... </td></tr> <tr><td valign="top"><em><a class="anchor" name="46e57c819304e85671bc9c12ed1399782b615440f9c6923d4761974103f16874"></a><!-- doxytag: member="SizeChange" ref="46e57c819304e85671bc9c12ed1399782b615440f9c6923d4761974103f16874" args="" -->SizeChange</em> </td><td> The button size changed. <p> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classKCommonDecorationButton.html#31be09cb483adc8a7e3964e40f5917c5" title="Set the button size.">setSize()</a> </dd></dl> </td></tr> <tr><td valign="top"><em><a class="anchor" name="46e57c819304e85671bc9c12ed1399786bee2bf3a5c3a184af442559364795bf"></a><!-- doxytag: member="ToggleChange" ref="46e57c819304e85671bc9c12ed1399786bee2bf3a5c3a184af442559364795bf" args="" -->ToggleChange</em> </td><td> The button toggle state has changed. <p> <dl class="see" compact><dt><b>See also:</b></dt><dd>setToggleButton() </dd></dl> </td></tr> <tr><td valign="top"><em><a class="anchor" name="46e57c819304e85671bc9c12ed139978ebf9b72f4ee2b26f6fc946283abd125f"></a><!-- doxytag: member="StateChange" ref="46e57c819304e85671bc9c12ed139978ebf9b72f4ee2b26f6fc946283abd125f" args="" -->StateChange</em> </td><td> The button has been set pressed or not... <p> <dl class="see" compact><dt><b>See also:</b></dt><dd>setOn() </dd></dl> </td></tr> <tr><td valign="top"><em><a class="anchor" name="46e57c819304e85671bc9c12ed13997884cbb3bda20243ea8a48e39d36a98688"></a><!-- doxytag: member="IconChange" ref="46e57c819304e85671bc9c12ed13997884cbb3bda20243ea8a48e39d36a98688" args="" -->IconChange</em> </td><td> The window icon has been changed. </td></tr> <tr><td valign="top"><em><a class="anchor" name="46e57c819304e85671bc9c12ed1399787e883ee529f42d35eccd341fe03c1ff5"></a><!-- doxytag: member="DecorationReset" ref="46e57c819304e85671bc9c12ed1399787e883ee529f42d35eccd341fe03c1ff5" args="" -->DecorationReset</em> </td><td> E.g. when decoration colors have changed. </td></tr> </table> </dl> <p>Definition at line <a class="el" href="kcommondecoration_8h-source.html#l00301">301</a> of file <a class="el" href="kcommondecoration_8h-source.html">kcommondecoration.h</a>.</p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="0473c0df8bda92875c27471e791c92fb"></a><!-- doxytag: member="KCommonDecorationButton::reset" ref="0473c0df8bda92875c27471e791c92fb" args="(unsigned long changed)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void KCommonDecorationButton::reset </td> <td>(</td> <td class="paramtype">unsigned long </td> <td class="paramname"> <em>changed</em> </td> <td> ) </td> <td width="100%"><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Initialize the button after size change etc. <p> </div> </div><p> <a class="anchor" name="69380743b39174aa40858348cc065cc8"></a><!-- doxytag: member="KCommonDecorationButton::decoration" ref="69380743b39174aa40858348cc065cc8" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classKCommonDecoration.html">KCommonDecoration</a> * KCommonDecorationButton::decoration </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the <a class="el" href="classKCommonDecoration.html" title="This class eases development of decorations by implementing parts of KDecoration...">KCommonDecoration</a> the button belongs to. </dd></dl> <p>Definition at line <a class="el" href="kcommondecoration_8cpp-source.html#l00889">889</a> of file <a class="el" href="kcommondecoration_8cpp-source.html">kcommondecoration.cpp</a>.</p> </div> </div><p> <a class="anchor" name="884281ccb66ae34bc5a3d9a9c993c0c6"></a><!-- doxytag: member="KCommonDecorationButton::type" ref="884281ccb66ae34bc5a3d9a9c993c0c6" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">ButtonType KCommonDecorationButton::type </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the button type. </dd></dl> <dl class="see" compact><dt><b>See also:</b></dt><dd>ButtonType </dd></dl> <p>Definition at line <a class="el" href="kcommondecoration_8cpp-source.html#l00894">894</a> of file <a class="el" href="kcommondecoration_8cpp-source.html">kcommondecoration.cpp</a>.</p> </div> </div><p> <a class="anchor" name="c3bda944734a7c3553bb49ad47090c22"></a><!-- doxytag: member="KCommonDecorationButton::isLeft" ref="c3bda944734a7c3553bb49ad47090c22" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool KCommonDecorationButton::isLeft </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> Whether the button is left of the titlebar or not. <p> <p>Definition at line <a class="el" href="kcommondecoration_8cpp-source.html#l00899">899</a> of file <a class="el" href="kcommondecoration_8cpp-source.html">kcommondecoration.cpp</a>.</p> </div> </div><p> <a class="anchor" name="adf6c4d7394239727af28433f6e93b85"></a><!-- doxytag: member="KCommonDecorationButton::setRealizeButtons" ref="adf6c4d7394239727af28433f6e93b85" args="(int btns)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void KCommonDecorationButton::setRealizeButtons </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>btns</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Set which mouse buttons the button should honor. <p> Used e.g. to prevent accidental right mouse clicks. <p>Definition at line <a class="el" href="kcommondecoration_8cpp-source.html#l00909">909</a> of file <a class="el" href="kcommondecoration_8cpp-source.html">kcommondecoration.cpp</a>.</p> </div> </div><p> <a class="anchor" name="31be09cb483adc8a7e3964e40f5917c5"></a><!-- doxytag: member="KCommonDecorationButton::setSize" ref="31be09cb483adc8a7e3964e40f5917c5" args="(const QSize &s)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void KCommonDecorationButton::setSize </td> <td>(</td> <td class="paramtype">const QSize & </td> <td class="paramname"> <em>s</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Set the button size. <p> <p>Definition at line <a class="el" href="kcommondecoration_8cpp-source.html#l00914">914</a> of file <a class="el" href="kcommondecoration_8cpp-source.html">kcommondecoration.cpp</a>.</p> </div> </div><p> <a class="anchor" name="d6e197890f13f5d2bf94cfad4d1bc12c"></a><!-- doxytag: member="KCommonDecorationButton::setTipText" ref="d6e197890f13f5d2bf94cfad4d1bc12c" args="(const QString &tip)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void KCommonDecorationButton::setTipText </td> <td>(</td> <td class="paramtype">const QString & </td> <td class="paramname"> <em>tip</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Set/update the button's tool tip. <p> <p>Definition at line <a class="el" href="kcommondecoration_8cpp-source.html#l00929">929</a> of file <a class="el" href="kcommondecoration_8cpp-source.html">kcommondecoration.cpp</a>.</p> </div> </div><p> <a class="anchor" name="771f0c9c5329adf0e64636ae806def54"></a><!-- doxytag: member="KCommonDecorationButton::lastMousePress" ref="771f0c9c5329adf0e64636ae806def54" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">ButtonState KCommonDecorationButton::lastMousePress </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> The mouse button that has been clicked last time. <p> <p>Definition at line <a class="el" href="kcommondecoration_8h-source.html#l00344">344</a> of file <a class="el" href="kcommondecoration_8h-source.html">kcommondecoration.h</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="kcommondecoration_8h-source.html">kcommondecoration.h</a><li><a class="el" href="kcommondecoration_8cpp-source.html">kcommondecoration.cpp</a></ul> </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> <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="mailto:groot@kde.org">Adriaan de Groot</a> and <a href="mailto:winter@kde.org">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>