Sophie

Sophie

distrib > Mandriva > current > x86_64 > by-pkgid > 4272c97b1af3db3f39a3b697bcba7e48 > files > 558

albumshaper-2.1-7mdv2010.1.x86_64.rpm

<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>AlbumShaper: GroupsWidget Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>GroupsWidget Class Reference</h1><!-- doxytag: class="GroupsWidget" --><!-- doxytag: inherits="QIconView" -->
<p>Displays group icon and text, also contains pointer to widget for setting group settings.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="groupsWidget_8h_source.html">groupsWidget.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for GroupsWidget:</div>
<div class="dynsection">
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for GroupsWidget:</div>
<div class="dynsection">
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classGroupsWidget-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGroupsWidget.html#a7568428ebdb1cd1ef118026c47522073">GroupsWidget</a> (<a class="el" href="classQWidget.html">QWidget</a> *parent=0, const char *name=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGroupsWidget.html#aceca286550125f004c92e99f0771bb33">keyPressEvent</a> (QKeyEvent *e)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QSize&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGroupsWidget.html#a5cec77ea38f87c10a00c956c8b98290c">sizeHint</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGroupsWidget.html#ad769b1460640d784ce3abb9b73689294">setTextWidth</a> (int val)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGroupsWidget.html#aa4643a9dd6b48994f676c8cfeb1206bf">getTextWidth</a> ()</td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGroupsWidget.html#a6615005cbda1ab389bb680766bb8e8d1">contentsMousePressEvent</a> (QMouseEvent *e)</td></tr>
<tr><td colspan="2"><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGroupsWidget.html#a7baaeee73345ed30518f70c857a5634e">textWidth</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Displays group icon and text, also contains pointer to widget for setting group settings. </p>

<p>Definition at line <a class="el" href="groupsWidget_8h_source.html#l00025">25</a> of file <a class="el" href="groupsWidget_8h_source.html">groupsWidget.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7568428ebdb1cd1ef118026c47522073"></a><!-- doxytag: member="GroupsWidget::GroupsWidget" ref="a7568428ebdb1cd1ef118026c47522073" args="(QWidget *parent=0, const char *name=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GroupsWidget::GroupsWidget </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classQWidget.html">QWidget</a> *&nbsp;</td>
          <td class="paramname"> <em>parent</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="groupsWidget_8cpp_source.html#l00018">18</a> of file <a class="el" href="groupsWidget_8cpp_source.html">groupsWidget.cpp</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00019"></a>00019                                                : <a class="code" href="classQIconView.html">QIconView</a>( parent, name)
<a name="l00020"></a>00020 {
<a name="l00021"></a>00021   setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum);
<a name="l00022"></a>00022 }
</pre></div></p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a6615005cbda1ab389bb680766bb8e8d1"></a><!-- doxytag: member="GroupsWidget::contentsMousePressEvent" ref="a6615005cbda1ab389bb680766bb8e8d1" args="(QMouseEvent *e)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GroupsWidget::contentsMousePressEvent </td>
          <td>(</td>
          <td class="paramtype">QMouseEvent *&nbsp;</td>
          <td class="paramname"> <em>e</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="groupsWidget_8cpp_source.html#l00024">24</a> of file <a class="el" href="groupsWidget_8cpp_source.html">groupsWidget.cpp</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00025"></a>00025 {
<a name="l00026"></a>00026   <span class="comment">//ignore all clicks other than left-clicks</span>
<a name="l00027"></a>00027   <span class="keywordflow">if</span>( e-&gt;button() != Qt::LeftButton ) <span class="keywordflow">return</span>;
<a name="l00028"></a>00028   
<a name="l00029"></a>00029   <a class="code" href="classGroupsWidget.html#a6615005cbda1ab389bb680766bb8e8d1">QIconView::contentsMousePressEvent</a>( e );
<a name="l00030"></a>00030 }
</pre></div></p>

</div>
</div>
<a class="anchor" id="aa4643a9dd6b48994f676c8cfeb1206bf"></a><!-- doxytag: member="GroupsWidget::getTextWidth" ref="aa4643a9dd6b48994f676c8cfeb1206bf" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int GroupsWidget::getTextWidth </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="groupsWidget_8cpp_source.html#l00068">68</a> of file <a class="el" href="groupsWidget_8cpp_source.html">groupsWidget.cpp</a>.</p>

<p>References <a class="el" href="groupsWidget_8h_source.html#l00043">textWidth</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00069"></a>00069 { <span class="keywordflow">return</span> <a class="code" href="classGroupsWidget.html#a7baaeee73345ed30518f70c857a5634e">textWidth</a>; }
</pre></div></p>

</div>
</div>
<a class="anchor" id="aceca286550125f004c92e99f0771bb33"></a><!-- doxytag: member="GroupsWidget::keyPressEvent" ref="aceca286550125f004c92e99f0771bb33" args="(QKeyEvent *e)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GroupsWidget::keyPressEvent </td>
          <td>(</td>
          <td class="paramtype">QKeyEvent *&nbsp;</td>
          <td class="paramname"> <em>e</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="groupsWidget_8cpp_source.html#l00032">32</a> of file <a class="el" href="groupsWidget_8cpp_source.html">groupsWidget.cpp</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00033"></a>00033 {
<a name="l00034"></a>00034   <span class="comment">//change key left/right presses to up/down events</span>
<a name="l00035"></a>00035   <span class="keywordtype">int</span> key = e-&gt;key();
<a name="l00036"></a>00036   <span class="keywordflow">if</span>( key == Key_Left) key = Key_Up;
<a name="l00037"></a>00037   <span class="keywordflow">if</span>( key == Key_Right) key = Key_Down;
<a name="l00038"></a>00038 
<a name="l00039"></a>00039   <a class="code" href="classGroupsWidget.html#aceca286550125f004c92e99f0771bb33">QIconView::keyPressEvent</a>(
<a name="l00040"></a>00040     <span class="keyword">new</span> QKeyEvent(QEvent::KeyPress,
<a name="l00041"></a>00041               key,
<a name="l00042"></a>00042               e-&gt;ascii(),
<a name="l00043"></a>00043               e-&gt;state(),
<a name="l00044"></a>00044               e-&gt;text(),
<a name="l00045"></a>00045               e-&gt;isAutoRepeat(),
<a name="l00046"></a>00046               e-&gt;count() ) );
<a name="l00047"></a>00047 }
</pre></div></p>

</div>
</div>
<a class="anchor" id="ad769b1460640d784ce3abb9b73689294"></a><!-- doxytag: member="GroupsWidget::setTextWidth" ref="ad769b1460640d784ce3abb9b73689294" args="(int val)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GroupsWidget::setTextWidth </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>val</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="groupsWidget_8cpp_source.html#l00065">65</a> of file <a class="el" href="groupsWidget_8cpp_source.html">groupsWidget.cpp</a>.</p>

<p>References <a class="el" href="groupsWidget_8h_source.html#l00043">textWidth</a>.</p>

<p>Referenced by <a class="el" href="configurationWidget_8cpp_source.html#l00030">ConfigurationWidget::ConfigurationWidget()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00066"></a>00066 { <a class="code" href="classGroupsWidget.html#a7baaeee73345ed30518f70c857a5634e">textWidth</a> = val; }
</pre></div></p>

</div>
</div>
<a class="anchor" id="a5cec77ea38f87c10a00c956c8b98290c"></a><!-- doxytag: member="GroupsWidget::sizeHint" ref="a5cec77ea38f87c10a00c956c8b98290c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QSize GroupsWidget::sizeHint </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="groupsWidget_8cpp_source.html#l00049">49</a> of file <a class="el" href="groupsWidget_8cpp_source.html">groupsWidget.cpp</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00050"></a>00050 {
<a name="l00051"></a>00051   QSize s = <a class="code" href="classGroupsWidget.html#a5cec77ea38f87c10a00c956c8b98290c">QIconView::sizeHint</a>();
<a name="l00052"></a>00052 
<a name="l00053"></a>00053   <span class="comment">//find max item width</span>
<a name="l00054"></a>00054   s.setWidth(0);
<a name="l00055"></a>00055   <a class="code" href="classQIconViewItem.html">QIconViewItem</a> *item;
<a name="l00056"></a>00056   <span class="keywordflow">for</span>( item = firstItem(); item != NULL; item = item-&gt;nextItem() )
<a name="l00057"></a>00057   {
<a name="l00058"></a>00058     <span class="keywordflow">if</span>(item-&gt;width() + 2 &gt; s.width() )
<a name="l00059"></a>00059       s.setWidth( item-&gt;width() );
<a name="l00060"></a>00060   }
<a name="l00061"></a>00061   s.setWidth( s.width() + 2*spacing() );
<a name="l00062"></a>00062   <span class="keywordflow">return</span> s;
<a name="l00063"></a>00063 }
</pre></div></p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a7baaeee73345ed30518f70c857a5634e"></a><!-- doxytag: member="GroupsWidget::textWidth" ref="a7baaeee73345ed30518f70c857a5634e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classGroupsWidget.html#a7baaeee73345ed30518f70c857a5634e">GroupsWidget::textWidth</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="groupsWidget_8h_source.html#l00043">43</a> of file <a class="el" href="groupsWidget_8h_source.html">groupsWidget.h</a>.</p>

<p>Referenced by <a class="el" href="groupsWidget_8cpp_source.html#l00068">getTextWidth()</a>, and <a class="el" href="groupsWidget_8cpp_source.html#l00065">setTextWidth()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="groupsWidget_8h_source.html">groupsWidget.h</a></li>
<li><a class="el" href="groupsWidget_8cpp_source.html">groupsWidget.cpp</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>