1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv=
"Content-Type" content=
"text/html;charset=iso-8859-1">
3 <title>Qanava: qan::NodeItem Class Reference
</title>
4 <link href=
"doxygen.css" rel=
"stylesheet" type=
"text/css">
5 <link href=
"tabs.css" rel=
"stylesheet" type=
"text/css">
7 <!-- Generated by Doxygen 1.5.1-p1 -->
10 <li><a href=
"index.html"><span>Main
Page
</span></a></li>
11 <li><a href=
"namespaces.html"><span>Namespaces
</span></a></li>
12 <li id=
"current"><a href=
"annotated.html"><span>Classes
</span></a></li>
13 <li><a href=
"files.html"><span>Files
</span></a></li>
14 <li><a href=
"dirs.html"><span>Directories
</span></a></li>
15 <li><a href=
"pages.html"><span>Related
Pages
</span></a></li>
19 <li><a href=
"annotated.html"><span>Class
List
</span></a></li>
20 <li><a href=
"hierarchy.html"><span>Class
Hierarchy
</span></a></li>
21 <li><a href=
"functions.html"><span>Class
Members
</span></a></li>
24 <a class=
"el" href=
"namespaceqan.html">qan
</a>::
<a class=
"el" href=
"classqan_1_1_node_item.html">NodeItem
</a></div>
25 <h1>qan::NodeItem Class Reference
</h1><!-- doxytag: class="qan::NodeItem" --><!-- doxytag: inherits="qan::AbstractNodeItem" -->Model a rectangular node item on a QT graphics view.
26 <a href=
"#_details">More...
</a>
28 <code>#include
<qanItemGeom.h
></code>
30 Inherits
<a class=
"el" href=
"classqan_1_1_abstract_node_item.html">qan::AbstractNodeItem
</a>.
32 Inheritance diagram for qan::NodeItem:
<p><center><img src=
"classqan_1_1_node_item__inherit__graph.png" border=
"0" usemap=
"#qan_1_1_node_item__inherit__map" alt=
"Inheritance graph"></center>
33 <map name=
"qan_1_1_node_item__inherit__map">
34 <area href=
"classqan_1_1_abstract_node_item.html" shape=
"rect" coords=
"7,7,164,34" alt=
"">
36 <center><font size=
"2">[
<a href=
"graph_legend.html">legend
</a>]
</font></center>Collaboration diagram for qan::NodeItem:
<p><center><img src=
"classqan_1_1_node_item__coll__graph.png" border=
"0" usemap=
"#qan_1_1_node_item__coll__map" alt=
"Collaboration graph"></center>
37 <map name=
"qan_1_1_node_item__coll__map">
38 <area href=
"classqan_1_1_abstract_node_item.html" shape=
"rect" coords=
"59,188,216,215" alt=
"">
39 <area href=
"classqan_1_1_node.html" shape=
"rect" coords=
"7,98,90,124" alt=
"">
40 <area href=
"classqan_1_1_style.html" shape=
"rect" coords=
"142,7,222,34" alt=
"">
41 <area href=
"classqan_1_1_style_1_1_manager.html" shape=
"rect" coords=
"199,98,340,124" alt=
"">
43 <center><font size=
"2">[
<a href=
"graph_legend.html">legend
</a>]
</font></center><a href=
"classqan_1_1_node_item-members.html">List of all members.
</a><table border=
"0" cellpadding=
"0" cellspacing=
"0">
45 <tr><td colspan=
"2"><br><h2>Public Slots
</h2></td></tr>
46 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">virtual void
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#8eed8419e88b4030597c7d46cff61beb">updateNode
</a> ()
</td></tr>
48 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">virtual QGraphicsItem *
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#24db2185312934811f407e2ec2658c86">getGraphicsItem
</a> ()
</td></tr>
50 <tr><td class=
"mdescLeft"> </td><td class=
"mdescRight">Usually, return this casted to a QGraphicsItem.
<a href=
"#24db2185312934811f407e2ec2658c86"></a><br></td></tr>
51 <tr><td colspan=
"2"><br><h2>Public Member Functions
</h2></td></tr>
52 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top"> </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#5efa68241c0ff0d89829db220f40cbad">NodeItem
</a> (
<a class=
"el" href=
"classqan_1_1_node.html">Node
</a> &node,
<a class=
"el" href=
"classqan_1_1_style_1_1_manager.html">Style::Manager
</a> &styleManager,
<a class=
"el" href=
"classqan_1_1_style.html">Style
</a> &style, QGraphicsItem *parent, QGraphicsScene *scene, QPoint origin, const QString
&label)
</td></tr>
54 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">virtual
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#d32258ed900999d23ea9220da952077d">~NodeItem
</a> ()
</td></tr>
56 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">QRectF
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#78a8308ea56a663546e1ad125a9d06da">boundingRect
</a> () const
</td></tr>
58 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">void
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#bc6a9b09b79568fd534b53e5cba190c5">paint
</a> (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=
0)
</td></tr>
60 <tr><td colspan=
"2"><br><h2>Protected Member Functions
</h2></td></tr>
61 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">QVariant
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#de0b0d344b638cba390c57e710fdd936">itemChange
</a> (GraphicsItemChange change, const QVariant
&value)
</td></tr>
63 <tr><td colspan=
"2"><br><h2>Private Member Functions
</h2></td></tr>
64 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">bool
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#e75f0b4668ee783b2bda1293fba069bf">hasShadow
</a> () const
</td></tr>
66 <tr><td colspan=
"2"><br><h2>Private Attributes
</h2></td></tr>
67 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">QPointF
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#fceef85ab55700122b4dd30b7dc8eee1">_dimension
</a></td></tr>
69 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">QString
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#7aacf2d09e08b2315506e146e23b2f68">_label
</a></td></tr>
71 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">QPixmap
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#70fa879f4e00180d367a93ebf0bd1cd9">_backPixmap
</a></td></tr>
73 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">QColor
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#de702c7fae39495b7d0a760ceffe8a3a">_shadowColor
</a></td></tr>
75 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">double
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#9ed972e11e9fe382687230d1b7af56f8">_shadowOffset
</a></td></tr>
77 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">QGraphicsTextItem *
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#bfa951a1a6e9321d2c70d339d091ee60">_labelItem
</a></td></tr>
79 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">QPixmap
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classqan_1_1_node_item.html#cd1356cc2965be43cc52cbf60de69302">_icon
</a></td></tr>
81 <tr><td colspan=
"2"><br><h2>Classes
</h2></td></tr>
82 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">struct
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"structqan_1_1_node_item_1_1_default_factory.html">DefaultFactory
</a></td></tr>
85 <hr><a name=
"_details"></a><h2>Detailed Description
</h2>
86 Model a rectangular node item on a QT graphics view.
88 The following style options are supported:
<ul>
90 <b>'backcolor':
</b> Background color, when there is no background image defined.
</li>
92 <b>'bordercolor':
</b> Color of the item border.
</li>
94 <b>'backimage':
</b> Background image (scaled to fit the item size).
</li>
96 <b>'maximumwidth':
</b> Maximum width of the item, content is cropped to fit this with limit.
</li>
98 <b>'maximumheight':
</b> Maximum height of the item, content is cropped to fit this height limit.
</li>
100 <b>'fontsize':
</b> Base size for the font used to display the item label.
</li>
102 <b>'icon':
</b> Display an icon centered in the left of the item.
</li>
104 <b>'hasshadow':
</b> Set this value to false to supress the node shadow.
</li>
108 <hr><h2>Constructor
& Destructor Documentation
</h2>
109 <a class=
"anchor" name=
"5efa68241c0ff0d89829db220f40cbad"></a><!-- doxytag: member="qan::NodeItem::NodeItem" ref="5efa68241c0ff0d89829db220f40cbad" args="(Node &node, Style::Manager &styleManager, Style &style, QGraphicsItem *parent, QGraphicsScene *scene, QPoint origin, const QString &label)" -->
110 <div class=
"memitem">
111 <div class=
"memproto">
112 <table class=
"memname">
114 <td class=
"memname">qan::NodeItem::NodeItem
</td>
116 <td class=
"paramtype"><a class=
"el" href=
"classqan_1_1_node.html">Node
</a> & </td>
117 <td class=
"paramname"> <em>node
</em>,
</td>
120 <td class=
"paramkey"></td>
122 <td class=
"paramtype"><a class=
"el" href=
"classqan_1_1_style_1_1_manager.html">Style::Manager
</a> & </td>
123 <td class=
"paramname"> <em>styleManager
</em>,
</td>
126 <td class=
"paramkey"></td>
128 <td class=
"paramtype"><a class=
"el" href=
"classqan_1_1_style.html">Style
</a> & </td>
129 <td class=
"paramname"> <em>style
</em>,
</td>
132 <td class=
"paramkey"></td>
134 <td class=
"paramtype">QGraphicsItem *
</td>
135 <td class=
"paramname"> <em>parent
</em>,
</td>
138 <td class=
"paramkey"></td>
140 <td class=
"paramtype">QGraphicsScene *
</td>
141 <td class=
"paramname"> <em>scene
</em>,
</td>
144 <td class=
"paramkey"></td>
146 <td class=
"paramtype">QPoint
</td>
147 <td class=
"paramname"> <em>origin
</em>,
</td>
150 <td class=
"paramkey"></td>
152 <td class=
"paramtype">const QString
& </td>
153 <td class=
"paramname"> <em>label
</em></td><td> </td>
158 <td></td><td></td><td width=
"100%"></td>
165 The following style options are supported:
<ul>
167 <b>'backcolor':
</b> Background color, when there is no background image defined.
</li>
169 <b>'bordercolor':
</b> Color of the item border.
</li>
171 <b>'backimage':
</b> Background image (scaled to fit the item size).
</li>
173 <b>'maximumwidth':
</b> Maximum width of the item, content is cropped to fit this with limit.
</li>
175 <b>'maximumheight':
</b> Maximum height of the item, content is cropped to fit this height limit.
</li>
177 <b>'fontsize':
</b> Base size for the font used to display the item label.
</li>
179 <b>'icon':
</b> Display an icon centered in the left of the item.
</li>
181 <b>'hasshadow':
</b> Set this value to false to supress the node shadow.
</li>
184 An item with an empty style is transparent with no background nor border.
<p>
185 <dl compact
><dt><b>Parameters:
</b></dt><dd>
186 <table border=
"0" cellspacing=
"2" cellpadding=
"0">
187 <tr><td valign=
"top"></td><td valign=
"top"><em>origin
</em> </td><td>Uper left corner of the rectangular item.
</td></tr>
188 <tr><td valign=
"top"></td><td valign=
"top"><em>label
</em> </td><td>Text label to be displayed in the node text area (can be multi line HTML tagged text).
</td></tr>
189 <tr><td valign=
"top"></td><td valign=
"top"><em>style
</em> </td><td>Advanced style to pass optionnal display parameters.
</td></tr>
195 <a class=
"anchor" name=
"d32258ed900999d23ea9220da952077d"></a><!-- doxytag: member="qan::NodeItem::~NodeItem" ref="d32258ed900999d23ea9220da952077d" args="()" -->
196 <div class=
"memitem">
197 <div class=
"memproto">
198 <table class=
"memname">
200 <td class=
"memname">qan::NodeItem::~NodeItem
</td>
202 <td class=
"paramname"> </td>
203 <td> )
</td>
204 <td width=
"100%"><code> [virtual]
</code></td>
214 <hr><h2>Member Function Documentation
</h2>
215 <a class=
"anchor" name=
"78a8308ea56a663546e1ad125a9d06da"></a><!-- doxytag: member="qan::NodeItem::boundingRect" ref="78a8308ea56a663546e1ad125a9d06da" args="() const" -->
216 <div class=
"memitem">
217 <div class=
"memproto">
218 <table class=
"memname">
220 <td class=
"memname">QRectF qan::NodeItem::boundingRect
</td>
222 <td class=
"paramname"> </td>
223 <td> )
</td>
224 <td width=
"100%"> const
</td>
234 <a class=
"anchor" name=
"bc6a9b09b79568fd534b53e5cba190c5"></a><!-- doxytag: member="qan::NodeItem::paint" ref="bc6a9b09b79568fd534b53e5cba190c5" args="(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)" -->
235 <div class=
"memitem">
236 <div class=
"memproto">
237 <table class=
"memname">
239 <td class=
"memname">void qan::NodeItem::paint
</td>
241 <td class=
"paramtype">QPainter *
</td>
242 <td class=
"paramname"> <em>painter
</em>,
</td>
245 <td class=
"paramkey"></td>
247 <td class=
"paramtype">const QStyleOptionGraphicsItem *
</td>
248 <td class=
"paramname"> <em>option
</em>,
</td>
251 <td class=
"paramkey"></td>
253 <td class=
"paramtype">QWidget *
</td>
254 <td class=
"paramname"> <em>widget
</em> =
<code>0</code></td><td> </td>
259 <td></td><td></td><td width=
"100%"></td>
269 <a class=
"anchor" name=
"e75f0b4668ee783b2bda1293fba069bf"></a><!-- doxytag: member="qan::NodeItem::hasShadow" ref="e75f0b4668ee783b2bda1293fba069bf" args="() const" -->
270 <div class=
"memitem">
271 <div class=
"memproto">
272 <table class=
"memname">
274 <td class=
"memname">bool qan::NodeItem::hasShadow
</td>
276 <td class=
"paramname"> </td>
277 <td> )
</td>
278 <td width=
"100%"> const
<code> [inline, private]
</code></td>
288 <a class=
"anchor" name=
"8eed8419e88b4030597c7d46cff61beb"></a><!-- doxytag: member="qan::NodeItem::updateNode" ref="8eed8419e88b4030597c7d46cff61beb" args="()" -->
289 <div class=
"memitem">
290 <div class=
"memproto">
291 <table class=
"memname">
293 <td class=
"memname">void qan::NodeItem::updateNode
</td>
295 <td class=
"paramname"> </td>
296 <td> )
</td>
297 <td width=
"100%"><code> [virtual, slot]
</code></td>
306 Implements
<a class=
"el" href=
"classqan_1_1_abstract_node_item.html#66a094b5e62b7ee8e442932af8498a08">qan::AbstractNodeItem
</a>.
309 <a class=
"anchor" name=
"24db2185312934811f407e2ec2658c86"></a><!-- doxytag: member="qan::NodeItem::getGraphicsItem" ref="24db2185312934811f407e2ec2658c86" args="()" -->
310 <div class=
"memitem">
311 <div class=
"memproto">
312 <table class=
"memname">
314 <td class=
"memname">virtual QGraphicsItem* qan::NodeItem::getGraphicsItem
</td>
316 <td class=
"paramname"> </td>
317 <td> )
</td>
318 <td width=
"100%"><code> [inline, virtual, slot]
</code></td>
325 Usually, return this casted to a QGraphicsItem.
329 Implements
<a class=
"el" href=
"classqan_1_1_abstract_node_item.html#bed579c7012982eaffb685b1534077f7">qan::AbstractNodeItem
</a>.
332 <a class=
"anchor" name=
"de0b0d344b638cba390c57e710fdd936"></a><!-- doxytag: member="qan::NodeItem::itemChange" ref="de0b0d344b638cba390c57e710fdd936" args="(GraphicsItemChange change, const QVariant &value)" -->
333 <div class=
"memitem">
334 <div class=
"memproto">
335 <table class=
"memname">
337 <td class=
"memname">QVariant qan::NodeItem::itemChange
</td>
339 <td class=
"paramtype">GraphicsItemChange
</td>
340 <td class=
"paramname"> <em>change
</em>,
</td>
343 <td class=
"paramkey"></td>
345 <td class=
"paramtype">const QVariant
& </td>
346 <td class=
"paramname"> <em>value
</em></td><td> </td>
351 <td></td><td></td><td width=
"100%"><code> [protected]
</code></td>
361 <hr><h2>Member Data Documentation
</h2>
362 <a class=
"anchor" name=
"fceef85ab55700122b4dd30b7dc8eee1"></a><!-- doxytag: member="qan::NodeItem::_dimension" ref="fceef85ab55700122b4dd30b7dc8eee1" args="" -->
363 <div class=
"memitem">
364 <div class=
"memproto">
365 <table class=
"memname">
367 <td class=
"memname">QPointF
<a class=
"el" href=
"classqan_1_1_node_item.html#fceef85ab55700122b4dd30b7dc8eee1">qan::NodeItem::_dimension
</a><code> [private]
</code> </td>
377 <a class=
"anchor" name=
"7aacf2d09e08b2315506e146e23b2f68"></a><!-- doxytag: member="qan::NodeItem::_label" ref="7aacf2d09e08b2315506e146e23b2f68" args="" -->
378 <div class=
"memitem">
379 <div class=
"memproto">
380 <table class=
"memname">
382 <td class=
"memname">QString
<a class=
"el" href=
"classqan_1_1_node_item.html#7aacf2d09e08b2315506e146e23b2f68">qan::NodeItem::_label
</a><code> [private]
</code> </td>
392 <a class=
"anchor" name=
"70fa879f4e00180d367a93ebf0bd1cd9"></a><!-- doxytag: member="qan::NodeItem::_backPixmap" ref="70fa879f4e00180d367a93ebf0bd1cd9" args="" -->
393 <div class=
"memitem">
394 <div class=
"memproto">
395 <table class=
"memname">
397 <td class=
"memname">QPixmap
<a class=
"el" href=
"classqan_1_1_node_item.html#70fa879f4e00180d367a93ebf0bd1cd9">qan::NodeItem::_backPixmap
</a><code> [private]
</code> </td>
407 <a class=
"anchor" name=
"de702c7fae39495b7d0a760ceffe8a3a"></a><!-- doxytag: member="qan::NodeItem::_shadowColor" ref="de702c7fae39495b7d0a760ceffe8a3a" args="" -->
408 <div class=
"memitem">
409 <div class=
"memproto">
410 <table class=
"memname">
412 <td class=
"memname">QColor
<a class=
"el" href=
"classqan_1_1_node_item.html#de702c7fae39495b7d0a760ceffe8a3a">qan::NodeItem::_shadowColor
</a><code> [private]
</code> </td>
422 <a class=
"anchor" name=
"9ed972e11e9fe382687230d1b7af56f8"></a><!-- doxytag: member="qan::NodeItem::_shadowOffset" ref="9ed972e11e9fe382687230d1b7af56f8" args="" -->
423 <div class=
"memitem">
424 <div class=
"memproto">
425 <table class=
"memname">
427 <td class=
"memname">double
<a class=
"el" href=
"classqan_1_1_node_item.html#9ed972e11e9fe382687230d1b7af56f8">qan::NodeItem::_shadowOffset
</a><code> [private]
</code> </td>
437 <a class=
"anchor" name=
"bfa951a1a6e9321d2c70d339d091ee60"></a><!-- doxytag: member="qan::NodeItem::_labelItem" ref="bfa951a1a6e9321d2c70d339d091ee60" args="" -->
438 <div class=
"memitem">
439 <div class=
"memproto">
440 <table class=
"memname">
442 <td class=
"memname">QGraphicsTextItem*
<a class=
"el" href=
"classqan_1_1_node_item.html#bfa951a1a6e9321d2c70d339d091ee60">qan::NodeItem::_labelItem
</a><code> [private]
</code> </td>
452 <a class=
"anchor" name=
"cd1356cc2965be43cc52cbf60de69302"></a><!-- doxytag: member="qan::NodeItem::_icon" ref="cd1356cc2965be43cc52cbf60de69302" args="" -->
453 <div class=
"memitem">
454 <div class=
"memproto">
455 <table class=
"memname">
457 <td class=
"memname">QPixmap
<a class=
"el" href=
"classqan_1_1_node_item.html#cd1356cc2965be43cc52cbf60de69302">qan::NodeItem::_icon
</a><code> [private]
</code> </td>
467 <hr>The documentation for this class was generated from the following files:
<ul>
468 <li>C:/projects/qanava-
0.1.0/src/
<a class=
"el" href=
"qan_item_geom_8h.html">qanItemGeom.h
</a><li>C:/projects/qanava-
0.1.0/src/
<a class=
"el" href=
"qan_item_geom_8cpp.html">qanItemGeom.cpp
</a></ul>
470 <hr style=
"width: 100%; height: 2px;">
471 <table width=
"95%" height=
"48" border=
"0"
472 cellpadding=
"0" cellspacing=
"0" style=
"text-align: left; width: 95%; height: 31px;">
475 <td height=
"48" style=
"font-family: Helvetica,Arial,sans-serif;">
477 <dt><a href=
"http://www.libqanava.org"><font size=
"2">www.libqanava.org
</font></a><font size=
"2">
478 Qanava - QCanvas Avanc
é</font></dt>
481 <td style=
"vertical-align: middle; text-align: right;"><span
482 style=
"font-family: Helvetica,Arial,sans-serif;"><font size=
"2">Generated by
</font></span>
484 href=
"http://www.doxygen.org"><img alt=
"Doxygen logo"
485 src=
"../images/doxygen.png"
486 style=
"border: 0px solid ; width: 100px; height: 45px;" align=
"middle"></a></td>