<!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: PhotoPreviewWidget 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>PhotoPreviewWidget Class Reference</h1><!-- doxytag: class="PhotoPreviewWidget" --><!-- doxytag: inherits="QIconViewItem" --> <p>Displays photo thumbnail and description. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="photoPreviewWidget_8h_source.html">photoPreviewWidget.h</a>></code></p> <div class="dynheader"> Inheritance diagram for PhotoPreviewWidget:</div> <div class="dynsection"> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <div class="dynheader"> Collaboration diagram for PhotoPreviewWidget:</div> <div class="dynsection"> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classPhotoPreviewWidget-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="classPhotoPreviewWidget.html#aea4916ddf230f37c914099f522fefb4b">PhotoPreviewWidget</a> (<a class="el" href="classQIconView.html">QIconView</a> *parent, <a class="el" href="classPhoto.html">Photo</a> *<a class="el" href="classPhotoPreviewWidget.html#a482d401a94fe00a2a5bd1c2f9a999ad4">phto</a>)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets subalbum pointer. <a href="#aea4916ddf230f37c914099f522fefb4b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classPhoto.html">Photo</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#af54da3447e6426891f5a1a40a0e3e1a7">getPhoto</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns photo pointer. <a href="#af54da3447e6426891f5a1a40a0e3e1a7"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#a32d90bce58cce24b83851f051dce3714">updateImage</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Update photo thumbnail from background object. <a href="#a32d90bce58cce24b83851f051dce3714"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#aa2645b8d8e9d18731397692dbb260137">updateDescription</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Update photo description. <a href="#aa2645b8d8e9d18731397692dbb260137"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#a5a1d2b680d796a9e89eb5af1c0ad3285">paint</a> (QPainter *p)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#acf01b867b25b67203ecf3ca72a6d5c53">paintItem</a> (QPainter *p, const QColorGroup &cg)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Repain iconview item. <a href="#acf01b867b25b67203ecf3ca72a6d5c53"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#ad40116f02fe920262585aefcd929f7eb">paintFocus</a> (QPainter *p, const QColorGroup &cg)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#addb523fc7dd928131a9931b01be0f2b6">setText</a> (const QString &text)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#a0622139cdc67fe47a5948fcf9c791b3b">setPixmap</a> (const QPixmap &p, bool redraw)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#a4e56de1e3bb4b7ce970a89d26d31a593">acceptDrop</a> (const QMimeSource *e) const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#af22bb482f3ff13f026e350950d2cd07d">compare</a> (<a class="el" href="classQIconViewItem.html">QIconViewItem</a> *i) const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#a81806a5a36fa6fbae947dd1aa2f09210">setMousedOver</a> (bool val)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#aa0a4a1da54f1ce102f3d3512afd2fb49">getPhotoInfoRect</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">QPoint </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#afdd4a5baee26b0cb4f12fee37a165263">getPhotoPos</a> ()</td></tr> <tr><td colspan="2"><h2>Private Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#a1719368fda87885100c3b440be3db526">initializeItemRect</a> ()</td></tr> <tr><td colspan="2"><h2>Private Attributes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classPhoto.html">Photo</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#a482d401a94fe00a2a5bd1c2f9a999ad4">phto</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Pointer to photo backend object. <a href="#a482d401a94fe00a2a5bd1c2f9a999ad4"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#ad2975bd54873312f3b3a799ec14d8852">calibratedWidth</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#a470f63209ed369c3f9c147f11d0f11e6">mousedOver</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#ac59e9c7026c537f86d06dd445d5e1433">photoInfoRect</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#a85c95ac886de95d09abfc1474153ac22">pixmapXOffset</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">offsets used to center pixmap <a href="#a85c95ac886de95d09abfc1474153ac22"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPhotoPreviewWidget.html#a18e6c66b12c8f635dbf367190b090787">pixmapYOffset</a></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Displays photo thumbnail and description. </p> <p>Definition at line <a class="el" href="photoPreviewWidget_8h_source.html#l00032">32</a> of file <a class="el" href="photoPreviewWidget_8h_source.html">photoPreviewWidget.h</a>.</p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="aea4916ddf230f37c914099f522fefb4b"></a><!-- doxytag: member="PhotoPreviewWidget::PhotoPreviewWidget" ref="aea4916ddf230f37c914099f522fefb4b" args="(QIconView *parent, Photo *phto)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PhotoPreviewWidget::PhotoPreviewWidget </td> <td>(</td> <td class="paramtype"><a class="el" href="classQIconView.html">QIconView</a> * </td> <td class="paramname"> <em>parent</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classPhoto.html">Photo</a> * </td> <td class="paramname"> <em>phto</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Sets subalbum pointer. </p> <p>Definition at line <a class="el" href="photoPreviewWidget_8cpp_source.html#l00029">29</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p>References <a class="el" href="photoPreviewWidget_8h_source.html#l00076">calibratedWidth</a>, <a class="el" href="photo_8cpp_source.html#l00207">Photo::getDescription()</a>, <a class="el" href="photoPreviewWidget_8cpp_source.html#l00187">initializeItemRect()</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00078">mousedOver</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00024">PHOTO_TEXT_MARGIN</a>, <a class="el" href="photoPreviewWidget_8cpp_source.html#l00071">setText()</a>, and <a class="el" href="config_8h_source.html#l00024">THUMBNAIL_WIDTH</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00030"></a>00030 : <a name="l00031"></a>00031 <a class="code" href="classQIconViewItem.html">QIconViewItem</a>( parent, QString(<span class="stringliteral">""</span>), QPixmap(phto-><a class="code" href="classPhoto.html#a937a069696ef937d5ddd030b16946ded" title="Gets the thumbnail filename.">getThumbnailFilename</a>()) ) <a name="l00032"></a>00032 { <a name="l00033"></a>00033 <span class="comment">//initially item not moused over, set photo pointer</span> <a name="l00034"></a>00034 <a class="code" href="classPhotoPreviewWidget.html#a470f63209ed369c3f9c147f11d0f11e6">mousedOver</a> = <span class="keyword">false</span>; <a name="l00035"></a>00035 this->phto = phto; <a name="l00036"></a>00036 <a name="l00037"></a>00037 <span class="comment">//calibrated text width is icon width minus margin + info button size (info button is sized to be a square of height</span> <a name="l00038"></a>00038 <span class="comment">//equal to text height, aka fm.height)</span> <a name="l00039"></a>00039 QFontMetrics fm( qApp->font() ); <a name="l00040"></a>00040 <a class="code" href="classPhotoPreviewWidget.html#ad2975bd54873312f3b3a799ec14d8852">calibratedWidth</a> = <a class="code" href="config_8h.html#af562473223519f4a32c8b5428c19c71e">THUMBNAIL_WIDTH</a> - <a class="code" href="photoPreviewWidget_8h.html#aa85ac1cb0d23fe80344f98942a4b67b7">PHOTO_TEXT_MARGIN</a> - fm.height(); <a name="l00041"></a>00041 <a name="l00042"></a>00042 <span class="comment">//actually set the items text by clipping it using the calibration width we just computed</span> <a name="l00043"></a>00043 <a class="code" href="classPhotoPreviewWidget.html#addb523fc7dd928131a9931b01be0f2b6">setText</a>( phto-><a class="code" href="classPhoto.html#adb7ed08547098feeaff5753f2600f4bc" title="Gets the description.">getDescription</a>() ); <a name="l00044"></a>00044 <a name="l00045"></a>00045 <span class="comment">//update the items rectange which is a function of the text width, icon rect,</span> <a name="l00046"></a>00046 <span class="comment">//and margins for displaying selection and mouse over ovals</span> <a name="l00047"></a>00047 <a class="code" href="classPhotoPreviewWidget.html#a1719368fda87885100c3b440be3db526">initializeItemRect</a>(); } </pre></div></p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a4e56de1e3bb4b7ce970a89d26d31a593"></a><!-- doxytag: member="PhotoPreviewWidget::acceptDrop" ref="a4e56de1e3bb4b7ce970a89d26d31a593" args="(const QMimeSource *e) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool PhotoPreviewWidget::acceptDrop </td> <td>(</td> <td class="paramtype">const QMimeSource * </td> <td class="paramname"> <em>e</em></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="photoPreviewWidget_8cpp_source.html#l00170">170</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00171"></a>00171 { <a name="l00172"></a>00172 <span class="keywordflow">return</span> <span class="keyword">true</span>; <a name="l00173"></a>00173 } </pre></div></p> </div> </div> <a class="anchor" id="af22bb482f3ff13f026e350950d2cd07d"></a><!-- doxytag: member="PhotoPreviewWidget::compare" ref="af22bb482f3ff13f026e350950d2cd07d" args="(QIconViewItem *i) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int PhotoPreviewWidget::compare </td> <td>(</td> <td class="paramtype"><a class="el" href="classQIconViewItem.html">QIconViewItem</a> * </td> <td class="paramname"> <em>i</em></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="photoPreviewWidget_8cpp_source.html#l00175">175</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p>References <a class="el" href="blur_8cpp_source.html#l00079">height</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00176"></a>00176 { <a name="l00177"></a>00177 <span class="keywordflow">if</span>( pos().y() > (i->pos().y() + <a class="code" href="blur_8cpp.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>()) || <a name="l00178"></a>00178 ( <a name="l00179"></a>00179 pos().y() >= i->pos().y() && <a name="l00180"></a>00180 pos().x() >= i->pos().x() <a name="l00181"></a>00181 )) <a name="l00182"></a>00182 { <span class="keywordflow">return</span> 1; } <a name="l00183"></a>00183 <span class="keywordflow">else</span> <a name="l00184"></a>00184 { <span class="keywordflow">return</span> -1; } <a name="l00185"></a>00185 } </pre></div></p> </div> </div> <a class="anchor" id="af54da3447e6426891f5a1a40a0e3e1a7"></a><!-- doxytag: member="PhotoPreviewWidget::getPhoto" ref="af54da3447e6426891f5a1a40a0e3e1a7" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classPhoto.html">Photo</a> * PhotoPreviewWidget::getPhoto </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Returns photo pointer. </p> <p>Definition at line <a class="el" href="photoPreviewWidget_8cpp_source.html#l00049">49</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p>References <a class="el" href="photoPreviewWidget_8h_source.html#l00074">phto</a>.</p> <p>Referenced by <a class="el" href="photoDescEdit_8cpp_source.html#l00518">PhotoDescEdit::disappear()</a>, <a class="el" href="photoDescEdit_8cpp_source.html#l00047">PhotoDescEdit::PhotoDescEdit()</a>, <a class="el" href="photosIconView_8cpp_source.html#l00330">PhotosIconView::setAlbumImage()</a>, <a class="el" href="photosIconView_8cpp_source.html#l00336">PhotosIconView::setSubalbumImage()</a>, and <a class="el" href="subalbum_8cpp_source.html#l00500">Subalbum::syncPhotoList()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00050"></a>00050 { <a name="l00051"></a>00051 <span class="keywordflow">return</span> <a class="code" href="classPhotoPreviewWidget.html#a482d401a94fe00a2a5bd1c2f9a999ad4" title="Pointer to photo backend object.">phto</a>; <a name="l00052"></a>00052 } </pre></div></p> </div> </div> <a class="anchor" id="aa0a4a1da54f1ce102f3d3512afd2fb49"></a><!-- doxytag: member="PhotoPreviewWidget::getPhotoInfoRect" ref="aa0a4a1da54f1ce102f3d3512afd2fb49" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QRect PhotoPreviewWidget::getPhotoInfoRect </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="photoPreviewWidget_8cpp_source.html#l00224">224</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p>References <a class="el" href="blur_8cpp_source.html#l00079">height</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00021">PHOTO_MARGIN</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00022">PHOTO_SHADOW</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00080">photoInfoRect</a>, and <a class="el" href="blur_8cpp_source.html#l00079">width</a>.</p> <p>Referenced by <a class="el" href="photosIconView_8cpp_source.html#l00432">PhotosIconView::contentsMouseMoveEvent()</a>, and <a class="el" href="photoPreviewWidget_8cpp_source.html#l00109">paintItem()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00225"></a>00225 { <a name="l00226"></a>00226 QRect <a class="code" href="classPhotoPreviewWidget.html#ac59e9c7026c537f86d06dd445d5e1433">photoInfoRect</a>; <a name="l00227"></a>00227 QFontMetrics fm( qApp->font() ); <a name="l00228"></a>00228 photoInfoRect.setLeft( x() + rect().<a class="code" href="blur_8cpp.html#a2474a5474cbff19523a51eb1de01cda4">width</a>() - fm.height() - <a class="code" href="photoPreviewWidget_8h.html#a51af35a52d737b53581977578ece2eb2">PHOTO_MARGIN</a> - <a class="code" href="photoPreviewWidget_8h.html#a10c8bd04b47d651b52518b055a9154bd">PHOTO_SHADOW</a> - 1 ); <a name="l00229"></a>00229 photoInfoRect.setRight( photoInfoRect.left() + fm.height() ); <a name="l00230"></a>00230 photoInfoRect.setTop( y() + rect().<a class="code" href="blur_8cpp.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>() - fm.height() - <a class="code" href="photoPreviewWidget_8h.html#a51af35a52d737b53581977578ece2eb2">PHOTO_MARGIN</a> - <a class="code" href="photoPreviewWidget_8h.html#a10c8bd04b47d651b52518b055a9154bd">PHOTO_SHADOW</a> - 1 ); <a name="l00231"></a>00231 photoInfoRect.setBottom( photoInfoRect.top() + fm.height() ); <a name="l00232"></a>00232 <span class="keywordflow">return</span> photoInfoRect; <a name="l00233"></a>00233 } </pre></div></p> </div> </div> <a class="anchor" id="afdd4a5baee26b0cb4f12fee37a165263"></a><!-- doxytag: member="PhotoPreviewWidget::getPhotoPos" ref="afdd4a5baee26b0cb4f12fee37a165263" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QPoint PhotoPreviewWidget::getPhotoPos </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="photoPreviewWidget_8cpp_source.html#l00235">235</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p>References <a class="el" href="photoPreviewWidget_8h_source.html#l00083">pixmapXOffset</a>, and <a class="el" href="photoPreviewWidget_8h_source.html#l00083">pixmapYOffset</a>.</p> <p>Referenced by <a class="el" href="photoDescEdit_8cpp_source.html#l00047">PhotoDescEdit::PhotoDescEdit()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00236"></a>00236 { <a name="l00237"></a>00237 <span class="comment">//get widget coordiantes of item</span> <a name="l00238"></a>00238 <span class="keywordtype">int</span> xpos,ypos; <a name="l00239"></a>00239 xpos = x() + pixmapRect().x() + <a class="code" href="classPhotoPreviewWidget.html#a85c95ac886de95d09abfc1474153ac22" title="offsets used to center pixmap">pixmapXOffset</a> + 1; <a name="l00240"></a>00240 ypos = y() + pixmapRect().y() + <a class="code" href="classPhotoPreviewWidget.html#a18e6c66b12c8f635dbf367190b090787">pixmapYOffset</a> + 1; <a name="l00241"></a>00241 <a name="l00242"></a>00242 <span class="comment">//shift by scrolled amount</span> <a name="l00243"></a>00243 xpos-= iconView()->contentsX(); <a name="l00244"></a>00244 ypos-= iconView()->contentsY(); <a name="l00245"></a>00245 <a name="l00246"></a>00246 <span class="comment">//offset by viewport top left</span> <a name="l00247"></a>00247 <span class="comment">//(why not iconview topleft? item actually placed in viewport which is placed in iconview. this</span> <a name="l00248"></a>00248 <span class="comment">//viewport can be offset (and when I wrote this code it was) from the iconview depending on Trolltech's</span> <a name="l00249"></a>00249 <span class="comment">//scrollview code which can using spacing between the viewport and scrolls widgets. since the viewport</span> <a name="l00250"></a>00250 <span class="comment">//is a full blown widget, we can figure out it's reall screen coordinates and need not consult the iconview object at all.</span> <a name="l00251"></a>00251 QPoint viewportTL = iconView()->viewport()->mapToGlobal( QPoint(0,0) ); <a name="l00252"></a>00252 xpos+= viewportTL.x(); <a name="l00253"></a>00253 ypos+= viewportTL.y(); <a name="l00254"></a>00254 <a name="l00255"></a>00255 <span class="keywordflow">return</span> QPoint(xpos,ypos); <a name="l00256"></a>00256 } </pre></div></p> </div> </div> <a class="anchor" id="a1719368fda87885100c3b440be3db526"></a><!-- doxytag: member="PhotoPreviewWidget::initializeItemRect" ref="a1719368fda87885100c3b440be3db526" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PhotoPreviewWidget::initializeItemRect </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="photoPreviewWidget_8cpp_source.html#l00187">187</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p>References <a class="el" href="photoPreviewWidget_8h_source.html#l00021">PHOTO_MARGIN</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00022">PHOTO_SHADOW</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00024">PHOTO_TEXT_MARGIN</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00083">pixmapXOffset</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00083">pixmapYOffset</a>, <a class="el" href="config_8h_source.html#l00025">THUMBNAIL_HEIGHT</a>, and <a class="el" href="config_8h_source.html#l00024">THUMBNAIL_WIDTH</a>.</p> <p>Referenced by <a class="el" href="photoPreviewWidget_8cpp_source.html#l00029">PhotoPreviewWidget()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00188"></a>00188 { <a name="l00189"></a>00189 <span class="comment">//set pixmap rect to be offset slightly from top left corner (by photo margin)</span> <a name="l00190"></a>00190 QRect pr = pixmapRect(); <a name="l00191"></a>00191 <span class="keywordtype">int</span> itemLeft = x(); <a name="l00192"></a>00192 <span class="keywordtype">int</span> itemTop = y(); <a name="l00193"></a>00193 <a name="l00194"></a>00194 <a class="code" href="classPhotoPreviewWidget.html#a85c95ac886de95d09abfc1474153ac22" title="offsets used to center pixmap">pixmapXOffset</a> = (<a class="code" href="config_8h.html#af562473223519f4a32c8b5428c19c71e">THUMBNAIL_WIDTH</a> - pixmap()->width() ) / 2; <a name="l00195"></a>00195 <a class="code" href="classPhotoPreviewWidget.html#a18e6c66b12c8f635dbf367190b090787">pixmapYOffset</a> = (<a class="code" href="config_8h.html#a9a75757764d4f913469df0670d255050">THUMBNAIL_HEIGHT</a> - pixmap()->height() ) / 2; <a name="l00196"></a>00196 <a name="l00197"></a>00197 pr.setLeft( x() + <a class="code" href="photoPreviewWidget_8h.html#a51af35a52d737b53581977578ece2eb2">PHOTO_MARGIN</a> ); <a name="l00198"></a>00198 pr.setRight( pr.left() + <a class="code" href="config_8h.html#af562473223519f4a32c8b5428c19c71e">THUMBNAIL_WIDTH</a> ); <a name="l00199"></a>00199 pr.setTop( y() + <a class="code" href="photoPreviewWidget_8h.html#a51af35a52d737b53581977578ece2eb2">PHOTO_MARGIN</a> ); <a name="l00200"></a>00200 pr.setBottom( pr.top() + <a class="code" href="config_8h.html#a9a75757764d4f913469df0670d255050">THUMBNAIL_HEIGHT</a> ); <a name="l00201"></a>00201 setPixmapRect( pr ); <a name="l00202"></a>00202 <a name="l00203"></a>00203 <span class="comment">//move text rect to be below new pixmap region.</span> <a name="l00204"></a>00204 <span class="comment">//reset height to allow for up to 3 lines of text.</span> <a name="l00205"></a>00205 QFontMetrics fm( qApp->font() ); <a name="l00206"></a>00206 QRect tr = QRect(); <a name="l00207"></a>00207 tr.setLeft( x() + <a class="code" href="photoPreviewWidget_8h.html#a51af35a52d737b53581977578ece2eb2">PHOTO_MARGIN</a> ); <a name="l00208"></a>00208 tr.setRight( tr.left() +<a class="code" href="config_8h.html#af562473223519f4a32c8b5428c19c71e">THUMBNAIL_WIDTH</a> ); <a name="l00209"></a>00209 tr.setTop( y() + <a class="code" href="photoPreviewWidget_8h.html#a51af35a52d737b53581977578ece2eb2">PHOTO_MARGIN</a> + <a class="code" href="config_8h.html#a9a75757764d4f913469df0670d255050">THUMBNAIL_HEIGHT</a> + <a class="code" href="photoPreviewWidget_8h.html#aa85ac1cb0d23fe80344f98942a4b67b7">PHOTO_TEXT_MARGIN</a> ); <a name="l00210"></a>00210 tr.setBottom( tr.top() + 0*fm.leading() + 1*fm.height() ); <a name="l00211"></a>00211 setTextRect( tr ); <a name="l00212"></a>00212 <a name="l00213"></a>00213 <span class="comment">//set overall item rect</span> <a name="l00214"></a>00214 <span class="keywordtype">int</span> itemW = <a class="code" href="config_8h.html#af562473223519f4a32c8b5428c19c71e">THUMBNAIL_WIDTH</a> + 2*<a class="code" href="photoPreviewWidget_8h.html#a51af35a52d737b53581977578ece2eb2">PHOTO_MARGIN</a> + <a class="code" href="photoPreviewWidget_8h.html#a10c8bd04b47d651b52518b055a9154bd">PHOTO_SHADOW</a>; <a name="l00215"></a>00215 <span class="keywordtype">int</span> itemH = <a class="code" href="config_8h.html#a9a75757764d4f913469df0670d255050">THUMBNAIL_HEIGHT</a> + <a class="code" href="photoPreviewWidget_8h.html#aa85ac1cb0d23fe80344f98942a4b67b7">PHOTO_TEXT_MARGIN</a> + textRect().height() + 2*<a class="code" href="photoPreviewWidget_8h.html#a51af35a52d737b53581977578ece2eb2">PHOTO_MARGIN</a> + PHOTO_SHADOW; <a name="l00216"></a>00216 setItemRect( QRect( itemLeft, itemTop, itemW, itemH ) ); <a name="l00217"></a>00217 } </pre></div></p> </div> </div> <a class="anchor" id="a5a1d2b680d796a9e89eb5af1c0ad3285"></a><!-- doxytag: member="PhotoPreviewWidget::paint" ref="a5a1d2b680d796a9e89eb5af1c0ad3285" args="(QPainter *p)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PhotoPreviewWidget::paint </td> <td>(</td> <td class="paramtype">QPainter * </td> <td class="paramname"> <em>p</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="photoPreviewWidget_8cpp_source.html#l00076">76</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p>References <a class="el" href="blur_8cpp_source.html#l00079">height</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00021">PHOTO_MARGIN</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00024">PHOTO_TEXT_MARGIN</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00083">pixmapXOffset</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00083">pixmapYOffset</a>, and <a class="el" href="blur_8cpp_source.html#l00079">width</a>.</p> <p>Referenced by <a class="el" href="photoPreviewWidget_8cpp_source.html#l00109">paintItem()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00077"></a>00077 { <a name="l00078"></a>00078 <span class="comment">//create colors</span> <a name="l00079"></a>00079 QColor offWhite( 255, 255, 255 ); <a name="l00080"></a>00080 QColor darkBlue(35, 75, 139); <a name="l00081"></a>00081 QColor paperColor; <a name="l00082"></a>00082 <a name="l00083"></a>00083 <span class="comment">//draw offwhite or selected color depending on if photo is selected</span> <a name="l00084"></a>00084 QRect paperRect( x(), y(), <a name="l00085"></a>00085 2*<a class="code" href="photoPreviewWidget_8h.html#a51af35a52d737b53581977578ece2eb2">PHOTO_MARGIN</a> + pixmapRect().<a class="code" href="blur_8cpp.html#a2474a5474cbff19523a51eb1de01cda4">width</a>(), <a name="l00086"></a>00086 2*<a class="code" href="photoPreviewWidget_8h.html#a51af35a52d737b53581977578ece2eb2">PHOTO_MARGIN</a> + pixmapRect().<a class="code" href="blur_8cpp.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>() + <a class="code" href="photoPreviewWidget_8h.html#aa85ac1cb0d23fe80344f98942a4b67b7">PHOTO_TEXT_MARGIN</a> + textRect().<a class="code" href="blur_8cpp.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>() ); <a name="l00087"></a>00087 <span class="keywordflow">if</span>(isSelected()) <a name="l00088"></a>00088 paperColor = darkBlue; <a name="l00089"></a>00089 <span class="keywordflow">else</span> <a name="l00090"></a>00090 paperColor = offWhite; <a name="l00091"></a>00091 p->fillRect( paperRect, QBrush( paperColor ) ); <a name="l00092"></a>00092 <a name="l00093"></a>00093 <span class="comment">//paint pixmap</span> <a name="l00094"></a>00094 p->drawPixmap( x() + pixmapRect().x() + <a class="code" href="classPhotoPreviewWidget.html#a85c95ac886de95d09abfc1474153ac22" title="offsets used to center pixmap">pixmapXOffset</a> + 1, <a name="l00095"></a>00095 y() + pixmapRect().y() + <a class="code" href="classPhotoPreviewWidget.html#a18e6c66b12c8f635dbf367190b090787">pixmapYOffset</a> + 1, <a name="l00096"></a>00096 *pixmap()); <a name="l00097"></a>00097 <a name="l00098"></a>00098 <span class="comment">//paint text</span> <a name="l00099"></a>00099 <span class="keywordtype">int</span> align = AlignLeft | AlignTop | BreakAnywhere; <a name="l00100"></a>00100 <span class="keywordflow">if</span>(isSelected()) <a name="l00101"></a>00101 p->setPen( white ); <a name="l00102"></a>00102 <span class="keywordflow">else</span> <a name="l00103"></a>00103 p->setPen( black ); <a name="l00104"></a>00104 p->drawText( x() + textRect().x() + 1, y() + textRect().y() + 1, <a name="l00105"></a>00105 textRect().<a class="code" href="blur_8cpp.html#a2474a5474cbff19523a51eb1de01cda4">width</a>(), textRect().<a class="code" href="blur_8cpp.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>(), <a name="l00106"></a>00106 align, text() ); <a name="l00107"></a>00107 } </pre></div></p> </div> </div> <a class="anchor" id="ad40116f02fe920262585aefcd929f7eb"></a><!-- doxytag: member="PhotoPreviewWidget::paintFocus" ref="ad40116f02fe920262585aefcd929f7eb" args="(QPainter *p, const QColorGroup &cg)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PhotoPreviewWidget::paintFocus </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><td> </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="photoPreviewWidget_8cpp_source.html#l00168">168</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00168"></a>00168 { } </pre></div></p> </div> </div> <a class="anchor" id="acf01b867b25b67203ecf3ca72a6d5c53"></a><!-- doxytag: member="PhotoPreviewWidget::paintItem" ref="acf01b867b25b67203ecf3ca72a6d5c53" args="(QPainter *p, const QColorGroup &cg)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PhotoPreviewWidget::paintItem </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><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Repain iconview item. </p> <p>Definition at line <a class="el" href="photoPreviewWidget_8cpp_source.html#l00109">109</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p>References <a class="el" href="blur_8cpp_source.html#l00080">buffer</a>, <a class="el" href="photoPreviewWidget_8cpp_source.html#l00224">getPhotoInfoRect()</a>, <a class="el" href="blur_8cpp_source.html#l00079">height</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00078">mousedOver</a>, <a class="el" href="photoPreviewWidget_8cpp_source.html#l00076">paint()</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00022">PHOTO_SHADOW</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00023">PHOTO_SHADOW_END_OFFSET</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00080">photoInfoRect</a>, <a class="el" href="window_8h_source.html#l00063">Window::shadowB</a>, <a class="el" href="window_8h_source.html#l00063">Window::shadowBL</a>, <a class="el" href="window_8h_source.html#l00063">Window::shadowBR</a>, <a class="el" href="window_8h_source.html#l00063">Window::shadowR</a>, <a class="el" href="window_8h_source.html#l00063">Window::shadowTR</a>, and <a class="el" href="blur_8cpp_source.html#l00079">width</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00110"></a>00110 { <a name="l00111"></a>00111 <span class="comment">//resize old static buffer to new needed size, fill with widget background color</span> <a name="l00112"></a>00112 <span class="keyword">static</span> QPixmap <a class="code" href="blur_8cpp.html#afa761c0753ecc94346e155a39bd9ed9c">buffer</a>; <a name="l00113"></a>00113 QRect r = rect(); <a name="l00114"></a>00114 QSize newSize = r.size().expandedTo(buffer.size() ); <a name="l00115"></a>00115 buffer.resize(newSize); <a name="l00116"></a>00116 buffer.fill( white ); <a name="l00117"></a>00117 <a name="l00118"></a>00118 <span class="comment">//construct painter for buffer</span> <a name="l00119"></a>00119 QPainter bufferPainter(&buffer, <span class="keyword">this</span>); <a name="l00120"></a>00120 bufferPainter.translate( -r.x(), -r.y() ); <a name="l00121"></a>00121 <a name="l00122"></a>00122 <span class="comment">//paint item</span> <a name="l00123"></a>00123 <a class="code" href="classPhotoPreviewWidget.html#a5a1d2b680d796a9e89eb5af1c0ad3285">paint</a>(&bufferPainter); <a name="l00124"></a>00124 <a name="l00125"></a>00125 <span class="comment">//paint edit button</span> <a name="l00126"></a>00126 <span class="keywordflow">if</span>(<a class="code" href="classPhotoPreviewWidget.html#a470f63209ed369c3f9c147f11d0f11e6">mousedOver</a>) <a name="l00127"></a>00127 { <a name="l00128"></a>00128 QRect <a class="code" href="classPhotoPreviewWidget.html#ac59e9c7026c537f86d06dd445d5e1433">photoInfoRect</a> = <a class="code" href="classPhotoPreviewWidget.html#aa0a4a1da54f1ce102f3d3512afd2fb49">getPhotoInfoRect</a>(); <a name="l00129"></a>00129 bufferPainter.drawPixmap( photoInfoRect, * (((<a class="code" href="classWindow.html" title="Top level widget, encapsulates the title widget, the layout widget, and the toolbar...">Window</a>*) qApp->mainWidget())->photoInfo) ); <a name="l00130"></a>00130 } <a name="l00131"></a>00131 <a name="l00132"></a>00132 <span class="comment">//paint shadows</span> <a name="l00133"></a>00133 QPixmap* shadowBL, *shadowB, *shadowBR, *shadowR, *shadowTR; <a name="l00134"></a>00134 <a class="code" href="classWindow.html" title="Top level widget, encapsulates the title widget, the layout widget, and the toolbar...">Window</a>* window = (<a class="code" href="classWindow.html" title="Top level widget, encapsulates the title widget, the layout widget, and the toolbar...">Window</a>*) qApp->mainWidget(); <a name="l00135"></a>00135 shadowBL = window-><a class="code" href="classWindow.html#ad68f87a6a1e7fdd961b9f61a6dc5b77e">shadowBL</a>; <a name="l00136"></a>00136 shadowB = window-><a class="code" href="classWindow.html#a3a7de75fd4ecd6de02bb84768a477a30">shadowB</a>; <a name="l00137"></a>00137 shadowBR = window-><a class="code" href="classWindow.html#abd26badbcdfdcefe9068074ce49f2e07">shadowBR</a>; <a name="l00138"></a>00138 shadowR = window-><a class="code" href="classWindow.html#a9aead52d78f783c05ccf575c957e9cc4">shadowR</a>; <a name="l00139"></a>00139 shadowTR = window-><a class="code" href="classWindow.html#a20283cd11a7dd0d1ec4bd3d501d99f36">shadowTR</a>; <a name="l00140"></a>00140 <a name="l00141"></a>00141 QRect shadowRect; <a name="l00142"></a>00142 shadowRect.setLeft( x() + <a class="code" href="photoPreviewWidget_8h.html#aba57c2d0765d2249bcc18706eb86cdc4">PHOTO_SHADOW_END_OFFSET</a> ); <a name="l00143"></a>00143 shadowRect.setRight( shadowRect.left() + <a class="code" href="photoPreviewWidget_8h.html#a10c8bd04b47d651b52518b055a9154bd">PHOTO_SHADOW</a> ); <a name="l00144"></a>00144 shadowRect.setTop( y() + rect().<a class="code" href="blur_8cpp.html#ad12fc34ce789bce6c8a05d8a17138534">height</a>() - <a class="code" href="photoPreviewWidget_8h.html#a10c8bd04b47d651b52518b055a9154bd">PHOTO_SHADOW</a> ); <a name="l00145"></a>00145 shadowRect.setBottom( shadowRect.top() + <a class="code" href="photoPreviewWidget_8h.html#a10c8bd04b47d651b52518b055a9154bd">PHOTO_SHADOW</a> ); <a name="l00146"></a>00146 bufferPainter.drawPixmap( shadowRect, *shadowBL ); <a name="l00147"></a>00147 <a name="l00148"></a>00148 shadowRect.setLeft( shadowRect.right() + 1 ); <a name="l00149"></a>00149 shadowRect.setRight( x() + rect().<a class="code" href="blur_8cpp.html#a2474a5474cbff19523a51eb1de01cda4">width</a>() - <a class="code" href="photoPreviewWidget_8h.html#a10c8bd04b47d651b52518b055a9154bd">PHOTO_SHADOW</a> - 1 ); <a name="l00150"></a>00150 bufferPainter.drawPixmap( shadowRect, *shadowB ); <a name="l00151"></a>00151 <a name="l00152"></a>00152 shadowRect.setLeft( shadowRect.right() + 1 ); <a name="l00153"></a>00153 shadowRect.setRight( shadowRect.left() + <a class="code" href="photoPreviewWidget_8h.html#a10c8bd04b47d651b52518b055a9154bd">PHOTO_SHADOW</a> ); <a name="l00154"></a>00154 bufferPainter.drawPixmap( shadowRect, *shadowBR ); <a name="l00155"></a>00155 <a name="l00156"></a>00156 shadowRect.setBottom( shadowRect.top() - 1 ); <a name="l00157"></a>00157 shadowRect.setTop( y() +<a class="code" href="photoPreviewWidget_8h.html#aba57c2d0765d2249bcc18706eb86cdc4">PHOTO_SHADOW_END_OFFSET</a> + <a class="code" href="photoPreviewWidget_8h.html#a10c8bd04b47d651b52518b055a9154bd">PHOTO_SHADOW</a> ); <a name="l00158"></a>00158 bufferPainter.drawPixmap( shadowRect, *shadowR ); <a name="l00159"></a>00159 <a name="l00160"></a>00160 shadowRect.setBottom( shadowRect.top() - 1 ); <a name="l00161"></a>00161 shadowRect.setTop( y() +<a class="code" href="photoPreviewWidget_8h.html#aba57c2d0765d2249bcc18706eb86cdc4">PHOTO_SHADOW_END_OFFSET</a> ); <a name="l00162"></a>00162 bufferPainter.drawPixmap( shadowRect, *shadowTR ); <a name="l00163"></a>00163 <a name="l00164"></a>00164 <span class="comment">//draw buffer to screen</span> <a name="l00165"></a>00165 p->drawPixmap( x(), y(), buffer ); <a name="l00166"></a>00166 } </pre></div></p> </div> </div> <a class="anchor" id="a81806a5a36fa6fbae947dd1aa2f09210"></a><!-- doxytag: member="PhotoPreviewWidget::setMousedOver" ref="a81806a5a36fa6fbae947dd1aa2f09210" args="(bool val)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PhotoPreviewWidget::setMousedOver </td> <td>(</td> <td class="paramtype">bool </td> <td class="paramname"> <em>val</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="photoPreviewWidget_8cpp_source.html#l00219">219</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p>References <a class="el" href="photoPreviewWidget_8h_source.html#l00078">mousedOver</a>.</p> <p>Referenced by <a class="el" href="photosIconView_8cpp_source.html#l00376">PhotosIconView::clearPseudoSelection()</a>, and <a class="el" href="photosIconView_8cpp_source.html#l00362">PhotosIconView::repaintGroup()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00220"></a>00220 { <a name="l00221"></a>00221 <a class="code" href="classPhotoPreviewWidget.html#a470f63209ed369c3f9c147f11d0f11e6">mousedOver</a> = val; <a name="l00222"></a>00222 } </pre></div></p> </div> </div> <a class="anchor" id="a0622139cdc67fe47a5948fcf9c791b3b"></a><!-- doxytag: member="PhotoPreviewWidget::setPixmap" ref="a0622139cdc67fe47a5948fcf9c791b3b" args="(const QPixmap &p, bool redraw)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PhotoPreviewWidget::setPixmap </td> <td>(</td> <td class="paramtype">const QPixmap & </td> <td class="paramname"> <em>p</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>redraw</em></td><td> </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="photoPreviewWidget_8cpp_source.html#l00059">59</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p>References <a class="el" href="photoPreviewWidget_8h_source.html#l00083">pixmapXOffset</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00083">pixmapYOffset</a>, <a class="el" href="config_8h_source.html#l00025">THUMBNAIL_HEIGHT</a>, and <a class="el" href="config_8h_source.html#l00024">THUMBNAIL_WIDTH</a>.</p> <p>Referenced by <a class="el" href="photoPreviewWidget_8cpp_source.html#l00054">updateImage()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00060"></a>00060 { <a name="l00061"></a>00061 <a class="code" href="classPhotoPreviewWidget.html#a85c95ac886de95d09abfc1474153ac22" title="offsets used to center pixmap">pixmapXOffset</a> = (<a class="code" href="config_8h.html#af562473223519f4a32c8b5428c19c71e">THUMBNAIL_WIDTH</a> - p.width() ) / 2; <a name="l00062"></a>00062 <a class="code" href="classPhotoPreviewWidget.html#a18e6c66b12c8f635dbf367190b090787">pixmapYOffset</a> = (<a class="code" href="config_8h.html#a9a75757764d4f913469df0670d255050">THUMBNAIL_HEIGHT</a> - p.height() ) / 2; <a name="l00063"></a>00063 <a class="code" href="classPhotoPreviewWidget.html#a0622139cdc67fe47a5948fcf9c791b3b">QIconViewItem::setPixmap</a>( p, redraw ); <a name="l00064"></a>00064 } </pre></div></p> </div> </div> <a class="anchor" id="addb523fc7dd928131a9931b01be0f2b6"></a><!-- doxytag: member="PhotoPreviewWidget::setText" ref="addb523fc7dd928131a9931b01be0f2b6" args="(const QString &text)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PhotoPreviewWidget::setText </td> <td>(</td> <td class="paramtype">const QString & </td> <td class="paramname"> <em>text</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="photoPreviewWidget_8cpp_source.html#l00071">71</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p>References <a class="el" href="photoPreviewWidget_8h_source.html#l00076">calibratedWidth</a>, and <a class="el" href="guiTools_8cpp_source.html#l00071">clipText()</a>.</p> <p>Referenced by <a class="el" href="photoDescEdit_8cpp_source.html#l00518">PhotoDescEdit::disappear()</a>, <a class="el" href="photoPreviewWidget_8cpp_source.html#l00029">PhotoPreviewWidget()</a>, and <a class="el" href="photoPreviewWidget_8cpp_source.html#l00066">updateDescription()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00072"></a>00072 { <a name="l00073"></a>00073 <a class="code" href="classPhotoPreviewWidget.html#addb523fc7dd928131a9931b01be0f2b6">QIconViewItem::setText</a>( <a class="code" href="guiTools_8cpp.html#aa11db678e68ab73691473aa2d4ff8bfc" title="clip text to fit within numer of lines and max width">clipText</a>(text, 1, <a class="code" href="classPhotoPreviewWidget.html#ad2975bd54873312f3b3a799ec14d8852">calibratedWidth</a>), <span class="keyword">false</span> ); <a name="l00074"></a>00074 } </pre></div></p> </div> </div> <a class="anchor" id="aa2645b8d8e9d18731397692dbb260137"></a><!-- doxytag: member="PhotoPreviewWidget::updateDescription" ref="aa2645b8d8e9d18731397692dbb260137" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PhotoPreviewWidget::updateDescription </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Update photo description. </p> <p>Definition at line <a class="el" href="photoPreviewWidget_8cpp_source.html#l00066">66</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p>References <a class="el" href="photo_8cpp_source.html#l00207">Photo::getDescription()</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00074">phto</a>, and <a class="el" href="photoPreviewWidget_8cpp_source.html#l00071">setText()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00067"></a>00067 { <a name="l00068"></a>00068 <a class="code" href="classPhotoPreviewWidget.html#addb523fc7dd928131a9931b01be0f2b6">setText</a>( <a class="code" href="classPhotoPreviewWidget.html#a482d401a94fe00a2a5bd1c2f9a999ad4" title="Pointer to photo backend object.">phto</a>-><a class="code" href="classPhoto.html#adb7ed08547098feeaff5753f2600f4bc" title="Gets the description.">getDescription</a>() ); <a name="l00069"></a>00069 } </pre></div></p> </div> </div> <a class="anchor" id="a32d90bce58cce24b83851f051dce3714"></a><!-- doxytag: member="PhotoPreviewWidget::updateImage" ref="a32d90bce58cce24b83851f051dce3714" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PhotoPreviewWidget::updateImage </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Update photo thumbnail from background object. </p> <p>Definition at line <a class="el" href="photoPreviewWidget_8cpp_source.html#l00054">54</a> of file <a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.cpp</a>.</p> <p>References <a class="el" href="photo_8cpp_source.html#l00193">Photo::getThumbnailFilename()</a>, <a class="el" href="photoPreviewWidget_8h_source.html#l00074">phto</a>, and <a class="el" href="photoPreviewWidget_8cpp_source.html#l00059">setPixmap()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00055"></a>00055 { <a name="l00056"></a>00056 <a class="code" href="classPhotoPreviewWidget.html#a0622139cdc67fe47a5948fcf9c791b3b">setPixmap</a>( QPixmap(<a class="code" href="classPhotoPreviewWidget.html#a482d401a94fe00a2a5bd1c2f9a999ad4" title="Pointer to photo backend object.">phto</a>-><a class="code" href="classPhoto.html#a937a069696ef937d5ddd030b16946ded" title="Gets the thumbnail filename.">getThumbnailFilename</a>()), <span class="keyword">false</span>); <a name="l00057"></a>00057 } </pre></div></p> </div> </div> <hr/><h2>Member Data Documentation</h2> <a class="anchor" id="ad2975bd54873312f3b3a799ec14d8852"></a><!-- doxytag: member="PhotoPreviewWidget::calibratedWidth" ref="ad2975bd54873312f3b3a799ec14d8852" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="classPhotoPreviewWidget.html#ad2975bd54873312f3b3a799ec14d8852">PhotoPreviewWidget::calibratedWidth</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="photoPreviewWidget_8h_source.html#l00076">76</a> of file <a class="el" href="photoPreviewWidget_8h_source.html">photoPreviewWidget.h</a>.</p> <p>Referenced by <a class="el" href="photoPreviewWidget_8cpp_source.html#l00029">PhotoPreviewWidget()</a>, and <a class="el" href="photoPreviewWidget_8cpp_source.html#l00071">setText()</a>.</p> </div> </div> <a class="anchor" id="a470f63209ed369c3f9c147f11d0f11e6"></a><!-- doxytag: member="PhotoPreviewWidget::mousedOver" ref="a470f63209ed369c3f9c147f11d0f11e6" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool <a class="el" href="classPhotoPreviewWidget.html#a470f63209ed369c3f9c147f11d0f11e6">PhotoPreviewWidget::mousedOver</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="photoPreviewWidget_8h_source.html#l00078">78</a> of file <a class="el" href="photoPreviewWidget_8h_source.html">photoPreviewWidget.h</a>.</p> <p>Referenced by <a class="el" href="photoPreviewWidget_8cpp_source.html#l00109">paintItem()</a>, <a class="el" href="photoPreviewWidget_8cpp_source.html#l00029">PhotoPreviewWidget()</a>, and <a class="el" href="photoPreviewWidget_8cpp_source.html#l00219">setMousedOver()</a>.</p> </div> </div> <a class="anchor" id="ac59e9c7026c537f86d06dd445d5e1433"></a><!-- doxytag: member="PhotoPreviewWidget::photoInfoRect" ref="ac59e9c7026c537f86d06dd445d5e1433" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QRect <a class="el" href="classPhotoPreviewWidget.html#ac59e9c7026c537f86d06dd445d5e1433">PhotoPreviewWidget::photoInfoRect</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="photoPreviewWidget_8h_source.html#l00080">80</a> of file <a class="el" href="photoPreviewWidget_8h_source.html">photoPreviewWidget.h</a>.</p> <p>Referenced by <a class="el" href="photoPreviewWidget_8cpp_source.html#l00224">getPhotoInfoRect()</a>, and <a class="el" href="photoPreviewWidget_8cpp_source.html#l00109">paintItem()</a>.</p> </div> </div> <a class="anchor" id="a482d401a94fe00a2a5bd1c2f9a999ad4"></a><!-- doxytag: member="PhotoPreviewWidget::phto" ref="a482d401a94fe00a2a5bd1c2f9a999ad4" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classPhoto.html">Photo</a>* <a class="el" href="classPhotoPreviewWidget.html#a482d401a94fe00a2a5bd1c2f9a999ad4">PhotoPreviewWidget::phto</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Pointer to photo backend object. </p> <p>Definition at line <a class="el" href="photoPreviewWidget_8h_source.html#l00074">74</a> of file <a class="el" href="photoPreviewWidget_8h_source.html">photoPreviewWidget.h</a>.</p> <p>Referenced by <a class="el" href="photoPreviewWidget_8cpp_source.html#l00049">getPhoto()</a>, <a class="el" href="photoPreviewWidget_8cpp_source.html#l00066">updateDescription()</a>, and <a class="el" href="photoPreviewWidget_8cpp_source.html#l00054">updateImage()</a>.</p> </div> </div> <a class="anchor" id="a85c95ac886de95d09abfc1474153ac22"></a><!-- doxytag: member="PhotoPreviewWidget::pixmapXOffset" ref="a85c95ac886de95d09abfc1474153ac22" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="classPhotoPreviewWidget.html#a85c95ac886de95d09abfc1474153ac22">PhotoPreviewWidget::pixmapXOffset</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>offsets used to center pixmap </p> <p>Definition at line <a class="el" href="photoPreviewWidget_8h_source.html#l00083">83</a> of file <a class="el" href="photoPreviewWidget_8h_source.html">photoPreviewWidget.h</a>.</p> <p>Referenced by <a class="el" href="photoPreviewWidget_8cpp_source.html#l00235">getPhotoPos()</a>, <a class="el" href="photoPreviewWidget_8cpp_source.html#l00187">initializeItemRect()</a>, <a class="el" href="photoPreviewWidget_8cpp_source.html#l00076">paint()</a>, and <a class="el" href="photoPreviewWidget_8cpp_source.html#l00059">setPixmap()</a>.</p> </div> </div> <a class="anchor" id="a18e6c66b12c8f635dbf367190b090787"></a><!-- doxytag: member="PhotoPreviewWidget::pixmapYOffset" ref="a18e6c66b12c8f635dbf367190b090787" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="classPhotoPreviewWidget.html#a18e6c66b12c8f635dbf367190b090787">PhotoPreviewWidget::pixmapYOffset</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="photoPreviewWidget_8h_source.html#l00083">83</a> of file <a class="el" href="photoPreviewWidget_8h_source.html">photoPreviewWidget.h</a>.</p> <p>Referenced by <a class="el" href="photoPreviewWidget_8cpp_source.html#l00235">getPhotoPos()</a>, <a class="el" href="photoPreviewWidget_8cpp_source.html#l00187">initializeItemRect()</a>, <a class="el" href="photoPreviewWidget_8cpp_source.html#l00076">paint()</a>, and <a class="el" href="photoPreviewWidget_8cpp_source.html#l00059">setPixmap()</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="photoPreviewWidget_8h_source.html">photoPreviewWidget.h</a></li> <li><a class="el" href="photoPreviewWidget_8cpp_source.html">photoPreviewWidget.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>