summaryrefslogtreecommitdiffstats
path: root/doc/html/qcustommenuitem.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/qcustommenuitem.html')
-rw-r--r--doc/html/qcustommenuitem.html137
1 files changed, 137 insertions, 0 deletions
diff --git a/doc/html/qcustommenuitem.html b/doc/html/qcustommenuitem.html
new file mode 100644
index 0000000..2525fb0
--- /dev/null
+++ b/doc/html/qcustommenuitem.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/widgets/qmenudata.cpp:1461 -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>QCustomMenuItem Class</title>
+<style type="text/css"><!--
+fn { margin-left: 1cm; text-indent: -1cm; }
+a:link { color: #004faf; text-decoration: none }
+a:visited { color: #672967; text-decoration: none }
+body { background: #ffffff; color: black; }
+--></style>
+</head>
+<body>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+<tr bgcolor="#E5E5E5">
+<td valign=center>
+ <a href="index.html">
+<font color="#004faf">Home</font></a>
+ | <a href="classes.html">
+<font color="#004faf">All&nbsp;Classes</font></a>
+ | <a href="mainclasses.html">
+<font color="#004faf">Main&nbsp;Classes</font></a>
+ | <a href="annotated.html">
+<font color="#004faf">Annotated</font></a>
+ | <a href="groups.html">
+<font color="#004faf">Grouped&nbsp;Classes</font></a>
+ | <a href="functions.html">
+<font color="#004faf">Functions</font></a>
+</td>
+<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QCustomMenuItem Class Reference</h1>
+
+<p>The QCustomMenuItem class is an abstract base class for custom menu items in popup menus.
+<a href="#details">More...</a>
+<p><tt>#include &lt;<a href="qmenudata-h.html">qmenudata.h</a>&gt;</tt>
+<p>Inherits <a href="qt.html">Qt</a>.
+<p><a href="qcustommenuitem-members.html">List of all member functions.</a>
+<h2>Public Members</h2>
+<ul>
+<li class=fn><a href="#QCustomMenuItem"><b>QCustomMenuItem</b></a> ()</li>
+<li class=fn>virtual <a href="#~QCustomMenuItem"><b>~QCustomMenuItem</b></a> ()</li>
+<li class=fn>virtual bool <a href="#fullSpan"><b>fullSpan</b></a> () const</li>
+<li class=fn>virtual bool <a href="#isSeparator"><b>isSeparator</b></a> () const</li>
+<li class=fn>virtual void <a href="#setFont"><b>setFont</b></a> ( const&nbsp;QFont&nbsp;&amp;&nbsp;font )</li>
+<li class=fn>virtual void <a href="#paint"><b>paint</b></a> ( QPainter&nbsp;*&nbsp;p, const&nbsp;QColorGroup&nbsp;&amp;&nbsp;cg, bool&nbsp;act, bool&nbsp;enabled, int&nbsp;x, int&nbsp;y, int&nbsp;w, int&nbsp;h ) = 0</li>
+<li class=fn>virtual QSize <a href="#sizeHint"><b>sizeHint</b></a> () = 0</li>
+</ul>
+<hr><a name="details"></a><h2>Detailed Description</h2>
+
+
+The QCustomMenuItem class is an abstract base class for custom menu items in popup menus.
+<p>
+<p> A custom menu item is a menu item that is defined by two pure
+virtual functions, <a href="#paint">paint</a>() and <a href="#sizeHint">sizeHint</a>(). The size hint tells the
+menu how much space it needs to reserve for this item, and paint
+is called whenever the item needs painting.
+<p> This simple mechanism allows you to create all kinds of
+application specific menu items. Examples are items showing
+different fonts in a word processor or menus that allow the
+selection of drawing utilities in a vector drawing program.
+<p> A custom item is inserted into a popup menu with
+<a href="qmenudata.html#insertItem">QPopupMenu::insertItem</a>().
+<p> By default, a custom item can also have an icon and a keyboard
+accelerator. You can reimplement <a href="#fullSpan">fullSpan</a>() to return TRUE if you
+want the item to span the entire popup menu width. This is
+particularly useful for labels.
+<p> If you want the custom item to be treated just as a separator,
+reimplement <a href="#isSeparator">isSeparator</a>() to return TRUE.
+<p> Note that you can insert pixmaps or bitmaps as items into a popup
+menu without needing to create a QCustomMenuItem. However, custom
+menu items offer more flexibility, and -- especially important
+with Windows style -- provide the possibility of drawing the item
+with a different color when it is highlighted.
+<p> <a href="menu-example.html">menu/menu.cpp</a> shows a simple
+example how custom menu items can be used.
+<p> Note: the current implementation of QCustomMenuItem will not
+recognize shortcut keys that are from text with ampersands. Normal
+accelerators work though.
+<p> <img src=qpopmenu-fancy.png>
+<p> <p>See also <a href="qmenudata.html">QMenuData</a>, <a href="qpopupmenu.html">QPopupMenu</a>, and <a href="misc.html">Miscellaneous Classes</a>.
+
+<hr><h2>Member Function Documentation</h2>
+<h3 class=fn><a name="QCustomMenuItem"></a>QCustomMenuItem::QCustomMenuItem ()
+</h3>
+Constructs a QCustomMenuItem
+
+<h3 class=fn><a name="~QCustomMenuItem"></a>QCustomMenuItem::~QCustomMenuItem ()<tt> [virtual]</tt>
+</h3>
+Destroys a QCustomMenuItem
+
+<h3 class=fn>bool <a name="fullSpan"></a>QCustomMenuItem::fullSpan () const<tt> [virtual]</tt>
+</h3>
+Returns TRUE if this item wants to span the entire popup menu
+width; otherwise returns FALSE. The default is FALSE, meaning that
+the menu may show an icon and an accelerator key for this item as
+well.
+
+<h3 class=fn>bool <a name="isSeparator"></a>QCustomMenuItem::isSeparator () const<tt> [virtual]</tt>
+</h3>
+Returns TRUE if this item is just a separator; otherwise returns
+FALSE.
+
+<h3 class=fn>void <a name="paint"></a>QCustomMenuItem::paint ( <a href="qpainter.html">QPainter</a>&nbsp;*&nbsp;p, const&nbsp;<a href="qcolorgroup.html">QColorGroup</a>&nbsp;&amp;&nbsp;cg, bool&nbsp;act, bool&nbsp;enabled, int&nbsp;x, int&nbsp;y, int&nbsp;w, int&nbsp;h )<tt> [pure virtual]</tt>
+</h3>
+
+<p> Paints this item. When this function is invoked, the painter <em>p</em>
+is set to a font and foreground color suitable for a menu item
+text using color group <em>cg</em>. The item is active if <em>act</em> is TRUE
+and enabled if <em>enabled</em> is TRUE. The geometry values <em>x</em>, <em>y</em>,
+<em>w</em> and <em>h</em> specify where to draw the item.
+<p> Do not draw any background, this has already been done by the
+popup menu according to the current GUI style.
+
+<h3 class=fn>void <a name="setFont"></a>QCustomMenuItem::setFont ( const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp;&nbsp;font )<tt> [virtual]</tt>
+</h3>
+Sets the font of the custom menu item to <em>font</em>.
+<p> This function is called whenever the font in the popup menu
+changes. For menu items that show their own individual font entry,
+you want to ignore this.
+
+<h3 class=fn><a href="qsize.html">QSize</a> <a name="sizeHint"></a>QCustomMenuItem::sizeHint ()<tt> [pure virtual]</tt>
+</h3>
+
+<p> Returns the item's size hint.
+
+<!-- eof -->
+<hr><p>
+This file is part of the <a href="index.html">Qt toolkit</a>.
+Copyright &copy; 1995-2007
+<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
+<table width=100% cellspacing=0 border=0><tr>
+<td>Copyright &copy; 2007
+<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
+<td align=right><div align=right>Qt 3.3.8</div>
+</table></div></address></body>
+</html>