<!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: RecentAlbumMenuItem 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 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 List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>RecentAlbumMenuItem Class Reference</h1><!-- doxytag: class="RecentAlbumMenuItem" --><!-- doxytag: inherits="QCustomMenuItem" --> <p>A custom menu entry, displays album image, name, and number of photos. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="recentAlbumMenuItem_8h_source.html">recentAlbumMenuItem.h</a>></code></p> <div class="dynheader"> Inheritance diagram for RecentAlbumMenuItem:</div> <div class="dynsection"> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <div class="dynheader"> Collaboration diagram for RecentAlbumMenuItem:</div> <div class="dynsection"> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classRecentAlbumMenuItem-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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classRecentAlbumMenuItem.html#a354ab25f0544318701dcfef55e905ebb">RecentAlbumMenuItem</a> (Key <a class="el" href="classRecentAlbumMenuItem.html#a36498fbf466c609c7d1d7900c093682b">acceleratorKey</a>)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRecentAlbumMenuItem.html#a8f24dece7400a13da2e48ab8a70b29d2">changeItem</a> (QString <a class="el" href="classRecentAlbumMenuItem.html#a99a2324b66081f9fda0716880905c157">albumName</a>, QString albumLocation, QString <a class="el" href="classRecentAlbumMenuItem.html#a569129eb48599392a7b8e090ad4217c9">numPhotos</a>)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">updates entry as per arguments passed (used by constructor during intiailization as well) <a href="#a8f24dece7400a13da2e48ab8a70b29d2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRecentAlbumMenuItem.html#adbae14ce02aab6186cc91ce1a02600fc">paint</a> (QPainter *p, const QColorGroup &cg, bool act, bool enabled, int x, int y, int w, int h)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">paints entry <a href="#adbae14ce02aab6186cc91ce1a02600fc"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><a class="el" href="classRecentAlbumMenuItem.html#a42a7d14255eb18be7b52009921c4d6ad">sizeHint</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">returns menu entry size <a href="#a42a7d14255eb18be7b52009921c4d6ad"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classRecentAlbumMenuItem.html#a8fbcd4bb687b9a6ca0e1171fe0848a1f">setMaxWidth</a> (int val)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">after all menu items have been refreshed hint at maximum width so we can adequately position the accelerator text <a href="#a8fbcd4bb687b9a6ca0e1171fe0848a1f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classRecentAlbumMenuItem.html#a43fb3d3e87cfcd20190f051228134ebb">fullSpan</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">no icon necessary since album image painted here <a href="#a43fb3d3e87cfcd20190f051228134ebb"></a><br/></td></tr> <tr><td colspan="2"><h2>Private Attributes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">Key </td><td class="memItemRight" valign="bottom"><a class="el" href="classRecentAlbumMenuItem.html#a36498fbf466c609c7d1d7900c093682b">acceleratorKey</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">QImage </td><td class="memItemRight" valign="bottom"><a class="el" href="classRecentAlbumMenuItem.html#a947ab36fc08c87e0997e9237ee237554">albumImage</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">album image <a href="#a947ab36fc08c87e0997e9237ee237554"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="classRecentAlbumMenuItem.html#a99a2324b66081f9fda0716880905c157">albumName</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">album name <a href="#a99a2324b66081f9fda0716880905c157"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="classRecentAlbumMenuItem.html#a569129eb48599392a7b8e090ad4217c9">numPhotos</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">number of photos <a href="#a569129eb48599392a7b8e090ad4217c9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><a class="el" href="classRecentAlbumMenuItem.html#afa0cbaf725a37f20af94b10b02a8a73c">size</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">computed size <a href="#afa0cbaf725a37f20af94b10b02a8a73c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classRecentAlbumMenuItem.html#a24a7b428c635dce4efe51dd27dad6cd3">maxWidth</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">max element width <a href="#a24a7b428c635dce4efe51dd27dad6cd3"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classRecentAlbumMenuItem.html#a37540412a8fd5ee7add7ebfea246e0f7">idealImageWidth</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">used for painting purposes <a href="#a37540412a8fd5ee7add7ebfea246e0f7"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>A custom menu entry, displays album image, name, and number of photos. </p> <p>Definition at line <a class="el" href="recentAlbumMenuItem_8h_source.html#l00023">23</a> of file <a class="el" href="recentAlbumMenuItem_8h_source.html">recentAlbumMenuItem.h</a>.</p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a354ab25f0544318701dcfef55e905ebb"></a><!-- doxytag: member="RecentAlbumMenuItem::RecentAlbumMenuItem" ref="a354ab25f0544318701dcfef55e905ebb" args="(Key acceleratorKey)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">RecentAlbumMenuItem::RecentAlbumMenuItem </td> <td>(</td> <td class="paramtype">Key </td> <td class="paramname"> <em>acceleratorKey</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00022">22</a> of file <a class="el" href="recentAlbumMenuItem_8cpp_source.html">recentAlbumMenuItem.cpp</a>.</p> <p>References <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00028">changeItem()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00022"></a>00022 : <a class="code" href="classQCustomMenuItem.html">QCustomMenuItem</a>() <a name="l00023"></a>00023 { <a name="l00024"></a>00024 this-><a class="code" href="classRecentAlbumMenuItem.html#a36498fbf466c609c7d1d7900c093682b">acceleratorKey</a> = <a class="code" href="classRecentAlbumMenuItem.html#a36498fbf466c609c7d1d7900c093682b">acceleratorKey</a>; <a name="l00025"></a>00025 <a class="code" href="classRecentAlbumMenuItem.html#a8f24dece7400a13da2e48ab8a70b29d2" title="updates entry as per arguments passed (used by constructor during intiailization...">changeItem</a>( <span class="stringliteral">"unitialized"</span>, <span class="stringliteral">"unitialized"</span>, <span class="stringliteral">"unitialized"</span> ); <a name="l00026"></a>00026 } </pre></div></p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a8f24dece7400a13da2e48ab8a70b29d2"></a><!-- doxytag: member="RecentAlbumMenuItem::changeItem" ref="a8f24dece7400a13da2e48ab8a70b29d2" args="(QString albumName, QString albumLocation, QString numPhotos)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void RecentAlbumMenuItem::changeItem </td> <td>(</td> <td class="paramtype">QString </td> <td class="paramname"> <em>albumName</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">QString </td> <td class="paramname"> <em>albumLocation</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">QString </td> <td class="paramname"> <em>numPhotos</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>updates entry as per arguments passed (used by constructor during intiailization as well) </p> <p>Definition at line <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00028">28</a> of file <a class="el" href="recentAlbumMenuItem_8cpp_source.html">recentAlbumMenuItem.cpp</a>.</p> <p>References <a class="el" href="recentAlbumMenuItem_8h_source.html#l00051">albumImage</a>, <a class="el" href="recentAlbumMenuItem_8h_source.html#l00066">idealImageWidth</a>, <a class="el" href="imageTools_8cpp_source.html#l00157">scaleImage()</a>, and <a class="el" href="recentAlbumMenuItem_8h_source.html#l00060">size</a>.</p> <p>Referenced by <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00022">RecentAlbumMenuItem()</a>, and <a class="el" href="titleWidget_8cpp_source.html#l01435">TitleWidget::refreshOpenRecentMenu()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00031"></a>00031 { <a name="l00032"></a>00032 <span class="comment">//set name, and number of photos</span> <a name="l00033"></a>00033 this-><a class="code" href="classRecentAlbumMenuItem.html#a99a2324b66081f9fda0716880905c157" title="album name">albumName</a> = <a class="code" href="classRecentAlbumMenuItem.html#a99a2324b66081f9fda0716880905c157" title="album name">albumName</a>; <a name="l00034"></a>00034 this-><a class="code" href="classRecentAlbumMenuItem.html#a569129eb48599392a7b8e090ad4217c9" title="number of photos">numPhotos</a> = <a class="code" href="classRecentAlbumMenuItem.html#a569129eb48599392a7b8e090ad4217c9" title="number of photos">numPhotos</a>; <a name="l00035"></a>00035 <a name="l00036"></a>00036 <span class="comment">//compute height</span> <a name="l00037"></a>00037 QFontMetrics fm( qApp->font() ); <a name="l00038"></a>00038 <a class="code" href="classRecentAlbumMenuItem.html#afa0cbaf725a37f20af94b10b02a8a73c" title="computed size">size</a>.setHeight( 2 + fm.leading() + 2*fm.height() + 2); <a name="l00039"></a>00039 <a name="l00040"></a>00040 <span class="comment">//attempt to set album image </span> <a name="l00041"></a>00041 QString albumImageLocation = QDir::convertSeparators( albumLocation + <span class="stringliteral">"/img/album.jpg"</span> ); <a name="l00042"></a>00042 QDir tempDir; <a name="l00043"></a>00043 <span class="keywordflow">if</span>( tempDir.exists( albumImageLocation ) ) <a name="l00044"></a>00044 { <a name="l00045"></a>00045 <span class="comment">//ideal image width assuming 4:3 aspect ratio</span> <a name="l00046"></a>00046 <a class="code" href="classRecentAlbumMenuItem.html#a37540412a8fd5ee7add7ebfea246e0f7" title="used for painting purposes">idealImageWidth</a> = (4 * (<a class="code" href="classRecentAlbumMenuItem.html#afa0cbaf725a37f20af94b10b02a8a73c" title="computed size">size</a>.height()-4) ) / 3; <a name="l00047"></a>00047 <a name="l00048"></a>00048 <span class="comment">//scale image</span> <a name="l00049"></a>00049 <a class="code" href="imageTools_8cpp.html#a126e11984fb8124e78e3b1b68a24870c" title="Scale image and save copy to disk.">scaleImage</a>( albumImageLocation, <a class="code" href="classRecentAlbumMenuItem.html#a947ab36fc08c87e0997e9237ee237554" title="album image">albumImage</a>, <a class="code" href="classRecentAlbumMenuItem.html#a37540412a8fd5ee7add7ebfea246e0f7" title="used for painting purposes">idealImageWidth</a>, <a class="code" href="classRecentAlbumMenuItem.html#afa0cbaf725a37f20af94b10b02a8a73c" title="computed size">size</a>.height() ); <a name="l00050"></a>00050 } <a name="l00051"></a>00051 <span class="keywordflow">else</span> <a name="l00052"></a>00052 { <a name="l00053"></a>00053 <a class="code" href="classRecentAlbumMenuItem.html#a37540412a8fd5ee7add7ebfea246e0f7" title="used for painting purposes">idealImageWidth</a> = 0; <a name="l00054"></a>00054 } <a name="l00055"></a>00055 <a name="l00056"></a>00056 <span class="comment">//compute menu entry width</span> <a name="l00057"></a>00057 <a class="code" href="classRecentAlbumMenuItem.html#afa0cbaf725a37f20af94b10b02a8a73c" title="computed size">size</a>.setWidth( <a class="code" href="classRecentAlbumMenuItem.html#a37540412a8fd5ee7add7ebfea246e0f7" title="used for painting purposes">idealImageWidth</a> + 2 + fm.width(<a class="code" href="classRecentAlbumMenuItem.html#a99a2324b66081f9fda0716880905c157" title="album name">albumName</a>) ); <a name="l00058"></a>00058 } </pre></div></p> </div> </div> <a class="anchor" id="a43fb3d3e87cfcd20190f051228134ebb"></a><!-- doxytag: member="RecentAlbumMenuItem::fullSpan" ref="a43fb3d3e87cfcd20190f051228134ebb" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool RecentAlbumMenuItem::fullSpan </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>no icon necessary since album image painted here </p> <p>Definition at line <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00108">108</a> of file <a class="el" href="recentAlbumMenuItem_8cpp_source.html">recentAlbumMenuItem.cpp</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00109"></a>00109 { <span class="keywordflow">return</span> <span class="keyword">true</span>; } </pre></div></p> </div> </div> <a class="anchor" id="adbae14ce02aab6186cc91ce1a02600fc"></a><!-- doxytag: member="RecentAlbumMenuItem::paint" ref="adbae14ce02aab6186cc91ce1a02600fc" args="(QPainter *p, const QColorGroup &cg, bool act, bool enabled, int x, int y, int w, int h)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void RecentAlbumMenuItem::paint </td> <td>(</td> <td class="paramtype">QPainter * </td> <td class="paramname"> <em>p</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const QColorGroup & </td> <td class="paramname"> <em>cg</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>act</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>enabled</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>x</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>y</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>w</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>h</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>paints entry </p> <p>Definition at line <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00060">60</a> of file <a class="el" href="recentAlbumMenuItem_8cpp_source.html">recentAlbumMenuItem.cpp</a>.</p> <p>References <a class="el" href="recentAlbumMenuItem_8h_source.html#l00048">acceleratorKey</a>, <a class="el" href="recentAlbumMenuItem_8h_source.html#l00051">albumImage</a>, <a class="el" href="recentAlbumMenuItem_8h_source.html#l00054">albumName</a>, <a class="el" href="recentAlbumMenuItem_8h_source.html#l00066">idealImageWidth</a>, <a class="el" href="recentAlbumMenuItem_8h_source.html#l00063">maxWidth</a>, <a class="el" href="recentAlbumMenuItem_8h_source.html#l00057">numPhotos</a>, and <a class="el" href="recentAlbumMenuItem_8h_source.html#l00060">size</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00064"></a>00064 { <a name="l00065"></a>00065 <span class="comment">//move down and right by two for spacing purposes</span> <a name="l00066"></a>00066 y+=2; <a name="l00067"></a>00067 x+=2; <a name="l00068"></a>00068 <span class="keywordtype">int</span> xOffset = 0; <a name="l00069"></a>00069 <span class="keywordtype">int</span> yOffset = 0; <a name="l00070"></a>00070 <a name="l00071"></a>00071 <span class="comment">//paint album image first if not null</span> <a name="l00072"></a>00072 <span class="keywordflow">if</span>(!<a class="code" href="classRecentAlbumMenuItem.html#a947ab36fc08c87e0997e9237ee237554" title="album image">albumImage</a>.isNull()) <a name="l00073"></a>00073 { <a name="l00074"></a>00074 p->drawImage( x + (<a class="code" href="classRecentAlbumMenuItem.html#a37540412a8fd5ee7add7ebfea246e0f7" title="used for painting purposes">idealImageWidth</a> - <a class="code" href="classRecentAlbumMenuItem.html#a947ab36fc08c87e0997e9237ee237554" title="album image">albumImage</a>.width()) / 2, <a name="l00075"></a>00075 y + (<a class="code" href="classRecentAlbumMenuItem.html#afa0cbaf725a37f20af94b10b02a8a73c" title="computed size">size</a>.height() - <a class="code" href="classRecentAlbumMenuItem.html#a947ab36fc08c87e0997e9237ee237554" title="album image">albumImage</a>.height() - 4)/2, <a name="l00076"></a>00076 <a class="code" href="classRecentAlbumMenuItem.html#a947ab36fc08c87e0997e9237ee237554" title="album image">albumImage</a> ); <a name="l00077"></a>00077 xOffset+=(<a class="code" href="classRecentAlbumMenuItem.html#a37540412a8fd5ee7add7ebfea246e0f7" title="used for painting purposes">idealImageWidth</a> + 2); <a name="l00078"></a>00078 } <a name="l00079"></a>00079 <a name="l00080"></a>00080 <span class="comment">//paint album name + photo count</span> <a name="l00081"></a>00081 QFontMetrics fm( qApp->font() ); <a name="l00082"></a>00082 yOffset+=fm.ascent(); <a name="l00083"></a>00083 p->drawText( x+xOffset, y+yOffset, <a class="code" href="classRecentAlbumMenuItem.html#a99a2324b66081f9fda0716880905c157" title="album name">albumName</a> ); <a name="l00084"></a>00084 <a name="l00085"></a>00085 <span class="comment">//if photo count available print it as well</span> <a name="l00086"></a>00086 <span class="keywordflow">if</span>(<a class="code" href="classRecentAlbumMenuItem.html#a569129eb48599392a7b8e090ad4217c9" title="number of photos">numPhotos</a>.compare(<span class="stringliteral">"-1"</span>) != 0) <a name="l00087"></a>00087 { <a name="l00088"></a>00088 yOffset+=fm.descent() + 1 + fm.leading() + fm.ascent(); <a name="l00089"></a>00089 p->drawText( x+xOffset, y+yOffset, <a name="l00090"></a>00090 qApp->translate(<span class="stringliteral">"RecentAlbumMenuItem"</span>, <span class="stringliteral">"%1 Photos"</span>).arg(<a class="code" href="classRecentAlbumMenuItem.html#a569129eb48599392a7b8e090ad4217c9" title="number of photos">numPhotos</a>) ); <a name="l00091"></a>00091 } <a name="l00092"></a>00092 <a name="l00093"></a>00093 <span class="comment">//paint accelerator key</span> <a name="l00094"></a>00094 <span class="keywordflow">if</span>( <a class="code" href="classRecentAlbumMenuItem.html#a36498fbf466c609c7d1d7900c093682b">acceleratorKey</a> != Key_unknown ) <a name="l00095"></a>00095 { <a name="l00096"></a>00096 xOffset = <a class="code" href="classRecentAlbumMenuItem.html#a24a7b428c635dce4efe51dd27dad6cd3" title="max element width">maxWidth</a> + 24; <a name="l00097"></a>00097 yOffset = fm.ascent() + fm.height()/2; <a name="l00098"></a>00098 QKeySequence seq( CTRL+<a class="code" href="classRecentAlbumMenuItem.html#a36498fbf466c609c7d1d7900c093682b">acceleratorKey</a> ); <a name="l00099"></a>00099 QString str = (QString)seq; <a name="l00100"></a>00100 p->drawText( x+xOffset, y+yOffset, <a name="l00101"></a>00101 str); <a name="l00102"></a>00102 } <a name="l00103"></a>00103 } </pre></div></p> </div> </div> <a class="anchor" id="a8fbcd4bb687b9a6ca0e1171fe0848a1f"></a><!-- doxytag: member="RecentAlbumMenuItem::setMaxWidth" ref="a8fbcd4bb687b9a6ca0e1171fe0848a1f" args="(int val)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void RecentAlbumMenuItem::setMaxWidth </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>val</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>after all menu items have been refreshed hint at maximum width so we can adequately position the accelerator text </p> <p>Definition at line <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00111">111</a> of file <a class="el" href="recentAlbumMenuItem_8cpp_source.html">recentAlbumMenuItem.cpp</a>.</p> <p>References <a class="el" href="recentAlbumMenuItem_8h_source.html#l00063">maxWidth</a>.</p> <p>Referenced by <a class="el" href="titleWidget_8cpp_source.html#l01435">TitleWidget::refreshOpenRecentMenu()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00112"></a>00112 { <a class="code" href="classRecentAlbumMenuItem.html#a24a7b428c635dce4efe51dd27dad6cd3" title="max element width">maxWidth</a> = val; } </pre></div></p> </div> </div> <a class="anchor" id="a42a7d14255eb18be7b52009921c4d6ad"></a><!-- doxytag: member="RecentAlbumMenuItem::sizeHint" ref="a42a7d14255eb18be7b52009921c4d6ad" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QSize RecentAlbumMenuItem::sizeHint </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>returns menu entry size </p> <p>Definition at line <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00105">105</a> of file <a class="el" href="recentAlbumMenuItem_8cpp_source.html">recentAlbumMenuItem.cpp</a>.</p> <p>References <a class="el" href="recentAlbumMenuItem_8h_source.html#l00060">size</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00106"></a>00106 { <span class="keywordflow">return</span> <a class="code" href="classRecentAlbumMenuItem.html#afa0cbaf725a37f20af94b10b02a8a73c" title="computed size">size</a>; } </pre></div></p> </div> </div> <hr/><h2>Member Data Documentation</h2> <a class="anchor" id="a36498fbf466c609c7d1d7900c093682b"></a><!-- doxytag: member="RecentAlbumMenuItem::acceleratorKey" ref="a36498fbf466c609c7d1d7900c093682b" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Key <a class="el" href="classRecentAlbumMenuItem.html#a36498fbf466c609c7d1d7900c093682b">RecentAlbumMenuItem::acceleratorKey</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="recentAlbumMenuItem_8h_source.html#l00048">48</a> of file <a class="el" href="recentAlbumMenuItem_8h_source.html">recentAlbumMenuItem.h</a>.</p> <p>Referenced by <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00060">paint()</a>.</p> </div> </div> <a class="anchor" id="a947ab36fc08c87e0997e9237ee237554"></a><!-- doxytag: member="RecentAlbumMenuItem::albumImage" ref="a947ab36fc08c87e0997e9237ee237554" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QImage <a class="el" href="classRecentAlbumMenuItem.html#a947ab36fc08c87e0997e9237ee237554">RecentAlbumMenuItem::albumImage</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>album image </p> <p>Definition at line <a class="el" href="recentAlbumMenuItem_8h_source.html#l00051">51</a> of file <a class="el" href="recentAlbumMenuItem_8h_source.html">recentAlbumMenuItem.h</a>.</p> <p>Referenced by <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00028">changeItem()</a>, and <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00060">paint()</a>.</p> </div> </div> <a class="anchor" id="a99a2324b66081f9fda0716880905c157"></a><!-- doxytag: member="RecentAlbumMenuItem::albumName" ref="a99a2324b66081f9fda0716880905c157" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QString <a class="el" href="classRecentAlbumMenuItem.html#a99a2324b66081f9fda0716880905c157">RecentAlbumMenuItem::albumName</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>album name </p> <p>Definition at line <a class="el" href="recentAlbumMenuItem_8h_source.html#l00054">54</a> of file <a class="el" href="recentAlbumMenuItem_8h_source.html">recentAlbumMenuItem.h</a>.</p> <p>Referenced by <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00060">paint()</a>.</p> </div> </div> <a class="anchor" id="a37540412a8fd5ee7add7ebfea246e0f7"></a><!-- doxytag: member="RecentAlbumMenuItem::idealImageWidth" ref="a37540412a8fd5ee7add7ebfea246e0f7" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="classRecentAlbumMenuItem.html#a37540412a8fd5ee7add7ebfea246e0f7">RecentAlbumMenuItem::idealImageWidth</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>used for painting purposes </p> <p>Definition at line <a class="el" href="recentAlbumMenuItem_8h_source.html#l00066">66</a> of file <a class="el" href="recentAlbumMenuItem_8h_source.html">recentAlbumMenuItem.h</a>.</p> <p>Referenced by <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00028">changeItem()</a>, and <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00060">paint()</a>.</p> </div> </div> <a class="anchor" id="a24a7b428c635dce4efe51dd27dad6cd3"></a><!-- doxytag: member="RecentAlbumMenuItem::maxWidth" ref="a24a7b428c635dce4efe51dd27dad6cd3" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="classRecentAlbumMenuItem.html#a24a7b428c635dce4efe51dd27dad6cd3">RecentAlbumMenuItem::maxWidth</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>max element width </p> <p>Definition at line <a class="el" href="recentAlbumMenuItem_8h_source.html#l00063">63</a> of file <a class="el" href="recentAlbumMenuItem_8h_source.html">recentAlbumMenuItem.h</a>.</p> <p>Referenced by <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00060">paint()</a>, and <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00111">setMaxWidth()</a>.</p> </div> </div> <a class="anchor" id="a569129eb48599392a7b8e090ad4217c9"></a><!-- doxytag: member="RecentAlbumMenuItem::numPhotos" ref="a569129eb48599392a7b8e090ad4217c9" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QString <a class="el" href="classRecentAlbumMenuItem.html#a569129eb48599392a7b8e090ad4217c9">RecentAlbumMenuItem::numPhotos</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>number of photos </p> <p>Definition at line <a class="el" href="recentAlbumMenuItem_8h_source.html#l00057">57</a> of file <a class="el" href="recentAlbumMenuItem_8h_source.html">recentAlbumMenuItem.h</a>.</p> <p>Referenced by <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00060">paint()</a>.</p> </div> </div> <a class="anchor" id="afa0cbaf725a37f20af94b10b02a8a73c"></a><!-- doxytag: member="RecentAlbumMenuItem::size" ref="afa0cbaf725a37f20af94b10b02a8a73c" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QSize <a class="el" href="classRecentAlbumMenuItem.html#afa0cbaf725a37f20af94b10b02a8a73c">RecentAlbumMenuItem::size</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>computed size </p> <p>Definition at line <a class="el" href="recentAlbumMenuItem_8h_source.html#l00060">60</a> of file <a class="el" href="recentAlbumMenuItem_8h_source.html">recentAlbumMenuItem.h</a>.</p> <p>Referenced by <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00028">changeItem()</a>, <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00060">paint()</a>, and <a class="el" href="recentAlbumMenuItem_8cpp_source.html#l00105">sizeHint()</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="recentAlbumMenuItem_8h_source.html">recentAlbumMenuItem.h</a></li> <li><a class="el" href="recentAlbumMenuItem_8cpp_source.html">recentAlbumMenuItem.cpp</a></li> </ul> </div> <hr size="1"/><address style="text-align: right;"><small>Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address> </body> </html>