summaryrefslogtreecommitdiffstats
path: root/qtpropertybrowser/doc/html/qtflagpropertymanager.html
blob: 11894264cbdbf41dafa8d82e1e551c30d8fd67ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qtpropertymanager.cpp -->
<head>
  <title>QtFlagPropertyManager Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="57" height="67" border="0" /></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a></td>
</tr></table><h1 class="title">QtFlagPropertyManager Class Reference</h1>
<p>The QtFlagPropertyManager provides and manages flag properties. <a href="#details">More...</a></p>
<pre> #include &lt;QtFlagPropertyManager&gt;</pre><p>Inherits <a href="qtabstractpropertymanager.html">QtAbstractPropertyManager</a>.</p>
<ul>
<li><a href="qtflagpropertymanager-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtflagpropertymanager.html#QtFlagPropertyManager">QtFlagPropertyManager</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtflagpropertymanager.html#dtor.QtFlagPropertyManager">~QtFlagPropertyManager</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QStringList </td><td class="memItemRight" valign="bottom"><b><a href="qtflagpropertymanager.html#flagNames">flagNames</a></b> ( const QtProperty * <i>property</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QtBoolPropertyManager * </td><td class="memItemRight" valign="bottom"><b><a href="qtflagpropertymanager.html#subBoolPropertyManager">subBoolPropertyManager</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qtflagpropertymanager.html#value">value</a></b> ( const QtProperty * <i>property</i> ) const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>3 public functions inherited from <a href="qtabstractpropertymanager.html#public-functions">QtAbstractPropertyManager</a></li>
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#public-functions">QObject</a></li>
</ul>
<hr />
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtflagpropertymanager.html#setFlagNames">setFlagNames</a></b> ( QtProperty * <i>property</i>, const QStringList &amp; <i>flagNames</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtflagpropertymanager.html#setValue">setValue</a></b> ( QtProperty * <i>property</i>, int <i>value</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>1 public slot inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#public-slots">QObject</a></li>
</ul>
<hr />
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtflagpropertymanager.html#flagNamesChanged">flagNamesChanged</a></b> ( QtProperty * <i>property</i>, const QStringList &amp; <i>names</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtflagpropertymanager.html#valueChanged">valueChanged</a></b> ( QtProperty * <i>property</i>, int <i>value</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>4 signals inherited from <a href="qtabstractpropertymanager.html#signals">QtAbstractPropertyManager</a></li>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#signals">QObject</a></li>
</ul>
<hr />
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qtflagpropertymanager.html#initializeProperty">initializeProperty</a></b> ( QtProperty * <i>property</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qtflagpropertymanager.html#uninitializeProperty">uninitializeProperty</a></b> ( QtProperty * <i>property</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QString </td><td class="memItemRight" valign="bottom"><b><a href="qtflagpropertymanager.html#valueText">valueText</a></b> ( const QtProperty * <i>property</i> ) const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>6 protected functions inherited from <a href="qtabstractpropertymanager.html#protected-functions">QtAbstractPropertyManager</a></li>
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>1 property inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#properties">QObject</a></li>
<li><div class="fn"></div>1 public type inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#public-variables">QObject</a></li>
<li><div class="fn"></div>4 static public members inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"></div>6 protected functions inherited from <a href="qtabstractpropertymanager.html#protected-functions">QtAbstractPropertyManager</a></li>
<li><div class="fn"></div>7 protected functions inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#protected-functions">QObject</a></li>
<li><div class="fn"></div>2 protected variables inherited from <a href="http://qt.nokia.com/doc/4.6/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QtFlagPropertyManager provides and manages flag properties.</p>
<p>Each flag property has an associated list of flag names which can be retrieved using the <a href="qtflagpropertymanager.html#flagNames">flagNames</a>() function, and set using the corresponding <a href="qtflagpropertymanager.html#setFlagNames">setFlagNames</a>() function.</p>
<p>The flag manager provides properties with nested boolean subproperties representing each flag, i.e&#x2e; a flag property's value is the binary combination of the subproperties' values. A property's value can be retrieved and set using the <a href="qtflagpropertymanager.html#value">value</a>() and <a href="qtflagpropertymanager.html#setValue">setValue</a>() slots respectively. The combination of flags is represented by single int value - that's why it's possible to store up to 32 independent flags in one flag property.</p>
<p>The subproperties are created by a <a href="qtboolpropertymanager.html">QtBoolPropertyManager</a> object. This manager can be retrieved using the <a href="qtflagpropertymanager.html#subBoolPropertyManager">subBoolPropertyManager</a>() function. In order to provide editing widgets for the subproperties in a property browser widget, this manager must be associated with an editor factory.</p>
<p>In addition, QtFlagPropertyManager provides the <a href="qtflagpropertymanager.html#valueChanged">valueChanged</a>() signal which is emitted whenever a property created by this manager changes, and the <a href="qtflagpropertymanager.html#flagNamesChanged">flagNamesChanged</a>() signal which is emitted whenever the list of flag names is altered.</p>
<p>See also <a href="qtabstractpropertymanager.html">QtAbstractPropertyManager</a> and <a href="qtboolpropertymanager.html">QtBoolPropertyManager</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QtFlagPropertyManager"></a>QtFlagPropertyManager::QtFlagPropertyManager ( <a href="http://qt.nokia.com/doc/4.6/qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Creates a manager with the given <i>parent</i>.</p>
<h3 class="fn"><a name="dtor.QtFlagPropertyManager"></a>QtFlagPropertyManager::~QtFlagPropertyManager ()</h3>
<p>Destroys this manager, and all the properties it has created.</p>
<h3 class="fn"><a name="flagNames"></a><a href="http://qt.nokia.com/doc/4.6/qstringlist.html">QStringList</a> QtFlagPropertyManager::flagNames ( const <a href="qtproperty.html">QtProperty</a> * <i>property</i> ) const</h3>
<p>Returns the given <i>property</i>'s list of flag names.</p>
<p>See also <a href="qtflagpropertymanager.html#value">value</a>() and <a href="qtflagpropertymanager.html#setFlagNames">setFlagNames</a>().</p>
<h3 class="fn"><a name="flagNamesChanged"></a>void QtFlagPropertyManager::flagNamesChanged ( <a href="qtproperty.html">QtProperty</a> * <i>property</i>, const <a href="http://qt.nokia.com/doc/4.6/qstringlist.html">QStringList</a> &amp; <i>names</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted whenever a property created by this manager changes its flag names, passing a pointer to the <i>property</i> and the new <i>names</i> as parameters.</p>
<p>See also <a href="qtflagpropertymanager.html#setFlagNames">setFlagNames</a>().</p>
<h3 class="fn"><a name="initializeProperty"></a>void QtFlagPropertyManager::initializeProperty ( <a href="qtproperty.html">QtProperty</a> * <i>property</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qtabstractpropertymanager.html#initializeProperty">QtAbstractPropertyManager::initializeProperty</a>().</p>
<h3 class="fn"><a name="setFlagNames"></a>void QtFlagPropertyManager::setFlagNames ( <a href="qtproperty.html">QtProperty</a> * <i>property</i>, const <a href="http://qt.nokia.com/doc/4.6/qstringlist.html">QStringList</a> &amp; <i>flagNames</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Sets the given <i>property</i>'s list of flag names to <i>flagNames</i>. The property's current value is reset to 0 indicating the first item of the list.</p>
<p>See also <a href="qtflagpropertymanager.html#flagNames">flagNames</a>() and <a href="qtflagpropertymanager.html#flagNamesChanged">flagNamesChanged</a>().</p>
<h3 class="fn"><a name="setValue"></a>void QtFlagPropertyManager::setValue ( <a href="qtproperty.html">QtProperty</a> * <i>property</i>, int <i>value</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Sets the value of the given <i>property</i> to <i>value</i>. Nested properties are updated automatically.</p>
<p>The specified <i>value</i> must be less than the binary combination of the property's <a href="qtflagpropertymanager.html#flagNames">flagNames</a>() list size (i.e&#x2e; less than 2<sup>n</sup>, where <tt>n</tt> is the size of the list) and larger than (or equal to) 0.</p>
<p>See also <a href="qtflagpropertymanager.html#value">value</a>() and <a href="qtflagpropertymanager.html#valueChanged">valueChanged</a>().</p>
<h3 class="fn"><a name="subBoolPropertyManager"></a><a href="qtboolpropertymanager.html">QtBoolPropertyManager</a> * QtFlagPropertyManager::subBoolPropertyManager () const</h3>
<p>Returns the manager that produces the nested boolean subproperties representing each flag.</p>
<p>In order to provide editing widgets for the subproperties in a property browser widget, this manager must be associated with an editor factory.</p>
<p>See also <a href="qtabstractpropertybrowser.html#setFactoryForManager">QtAbstractPropertyBrowser::setFactoryForManager</a>().</p>
<h3 class="fn"><a name="uninitializeProperty"></a>void QtFlagPropertyManager::uninitializeProperty ( <a href="qtproperty.html">QtProperty</a> * <i>property</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qtabstractpropertymanager.html#uninitializeProperty">QtAbstractPropertyManager::uninitializeProperty</a>().</p>
<h3 class="fn"><a name="value"></a>int QtFlagPropertyManager::value ( const <a href="qtproperty.html">QtProperty</a> * <i>property</i> ) const</h3>
<p>Returns the given <i>property</i>'s value.</p>
<p>If the given property is not managed by this manager, this function returns 0.</p>
<p>See also <a href="qtflagpropertymanager.html#flagNames">flagNames</a>() and <a href="qtflagpropertymanager.html#setValue">setValue</a>().</p>
<h3 class="fn"><a name="valueChanged"></a>void QtFlagPropertyManager::valueChanged ( <a href="qtproperty.html">QtProperty</a> * <i>property</i>, int <i>value</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted whenever a property created by this manager changes its value, passing a pointer to the <i>property</i> and the new <i>value</i> as parameters.</p>
<p>See also <a href="qtflagpropertymanager.html#setValue">setValue</a>().</p>
<h3 class="fn"><a name="valueText"></a><a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> QtFlagPropertyManager::valueText ( const <a href="qtproperty.html">QtProperty</a> * <i>property</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qtabstractpropertymanager.html#valueText">QtAbstractPropertyManager::valueText</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="40%" align="center"><a href="http://qt.nokia.com/doc/trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt Solutions</div></td>
</tr></table></div></address></body>
</html>