<!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: PanningPreviewInterface 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>PanningPreviewInterface Class Reference</h1><!-- doxytag: class="PanningPreviewInterface" --><!-- doxytag: inherits="SplitViewInterface" --> <p><code>#include <<a class="el" href="panningPreviewInterface_8h_source.html">panningPreviewInterface.h</a>></code></p> <div class="dynheader"> Inheritance diagram for PanningPreviewInterface:</div> <div class="dynsection"> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <div class="dynheader"> Collaboration diagram for PanningPreviewInterface:</div> <div class="dynsection"> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classPanningPreviewInterface-members.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Slots</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPanningPreviewInterface.html#a8c4e6125ea261a0506441736224a9a96">setSelection</a> (QRect <a class="el" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e">selection</a>)</td></tr> <tr><td colspan="2"><h2>Signals</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPanningPreviewInterface.html#ac0276e9177e6ff67c038659ceb63af9b">selectionChanged</a> ()</td></tr> <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="classPanningPreviewInterface.html#a774581c6fdb7939ed31f9d7cd9ddb4b3">PanningPreviewInterface</a> (QString imageFilename, <a class="el" href="classQWidget.html">QWidget</a> *parent=0, const char *name=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates layout. <a href="#a774581c6fdb7939ed31f9d7cd9ddb4b3"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual QSize </td><td class="memItemRight" valign="bottom"><a class="el" href="classPanningPreviewInterface.html#a181e8b15629fb913e41d7476df90745e">sizeHint</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><a class="el" href="classPanningPreviewInterface.html#a4b3332b2006f61fab9a290bd3637db10">getSelection</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><a class="el" href="classPanningPreviewInterface.html#a8eca66ff583ebe33a194864a802f1dcd">paintingSize</a> ()</td></tr> <tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPanningPreviewInterface.html#a2895eb5c0614dfaebf3bc8d69ac3e989">resizeEvent</a> (QResizeEvent *)</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="classPanningPreviewInterface.html#acf1d9fbd7cb9b61f3632dc5d93a9fbed">generateOrigImage</a> ()</td></tr> <tr><td colspan="2"><h2>Private Attributes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">QImage </td><td class="memItemRight" valign="bottom"><a class="el" href="classPanningPreviewInterface.html#ae9d723a64dc61d1913635a135b538c00">fullSizeImage</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Full size image. <a href="#ae9d723a64dc61d1913635a135b538c00"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><a class="el" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e">selection</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Current selection. <a href="#a071ba54dffe1ed00e809510ebda6f19e"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Definition at line <a class="el" href="panningPreviewInterface_8h_source.html#l00021">21</a> of file <a class="el" href="panningPreviewInterface_8h_source.html">panningPreviewInterface.h</a>.</p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a774581c6fdb7939ed31f9d7cd9ddb4b3"></a><!-- doxytag: member="PanningPreviewInterface::PanningPreviewInterface" ref="a774581c6fdb7939ed31f9d7cd9ddb4b3" args="(QString imageFilename, QWidget *parent=0, const char *name=0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PanningPreviewInterface::PanningPreviewInterface </td> <td>(</td> <td class="paramtype">QString </td> <td class="paramname"> <em>imageFilename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classQWidget.html">QWidget</a> * </td> <td class="paramname"> <em>parent</em> = <code>0</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>name</em> = <code>0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Creates layout. </p> <p>Definition at line <a class="el" href="panningPreviewInterface_8cpp_source.html#l00015">15</a> of file <a class="el" href="panningPreviewInterface_8cpp_source.html">panningPreviewInterface.cpp</a>.</p> <p>References <a class="el" href="panningPreviewInterface_8h_source.html#l00046">fullSizeImage</a>, and <a class="el" href="panningPreviewInterface_8h_source.html#l00049">selection</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00016"></a>00016 : <a name="l00017"></a>00017 <a class="code" href="classSplitViewInterface.html#aa592a0955919f185e1a0396b7fbc7918" title="Creates layout.">SplitViewInterface</a> (parent, name ) <a name="l00018"></a>00018 { <a name="l00019"></a>00019 <span class="comment">//load full size image</span> <a name="l00020"></a>00020 <a class="code" href="classPanningPreviewInterface.html#ae9d723a64dc61d1913635a135b538c00" title="Full size image.">fullSizeImage</a> = QImage( imageFilename ); <a name="l00021"></a>00021 <a name="l00022"></a>00022 <span class="comment">//a 0-width selection is invalid and prevents </span> <a name="l00023"></a>00023 <span class="comment">//resize events from triggering painting</span> <a name="l00024"></a>00024 <span class="comment">//until the true selection region is set</span> <a name="l00025"></a>00025 <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.setWidth( 0 ); <a name="l00026"></a>00026 } </pre></div></p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="acf1d9fbd7cb9b61f3632dc5d93a9fbed"></a><!-- doxytag: member="PanningPreviewInterface::generateOrigImage" ref="acf1d9fbd7cb9b61f3632dc5d93a9fbed" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PanningPreviewInterface::generateOrigImage </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="panningPreviewInterface_8cpp_source.html#l00105">105</a> of file <a class="el" href="panningPreviewInterface_8cpp_source.html">panningPreviewInterface.cpp</a>.</p> <p>References <a class="el" href="panningPreviewInterface_8h_source.html#l00046">fullSizeImage</a>, <a class="el" href="panningPreviewInterface_8h_source.html#l00049">selection</a>, <a class="el" href="classPanningPreviewInterface.html#ac0276e9177e6ff67c038659ceb63af9b">selectionChanged()</a>, and <a class="el" href="splitViewInterface_8cpp_source.html#l00415">SplitViewInterface::setImages()</a>.</p> <p>Referenced by <a class="el" href="panningPreviewInterface_8cpp_source.html#l00074">setSelection()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00106"></a>00106 { <a name="l00107"></a>00107 <span class="comment">//generate orig image</span> <a name="l00108"></a>00108 <span class="comment">//set adjusted image to null so repain won't occur until it is reset</span> <a name="l00109"></a>00109 <a class="code" href="classSplitViewInterface.html#a7c60276f4afa1fa1fc3dfc201b6311aa">setImages</a>( <a class="code" href="classPanningPreviewInterface.html#ae9d723a64dc61d1913635a135b538c00" title="Full size image.">fullSizeImage</a>.copy( <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.left(), <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.top(), <a name="l00110"></a>00110 <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.width(), <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.height() ), <a name="l00111"></a>00111 QImage() ); <a name="l00112"></a>00112 <a name="l00113"></a>00113 <span class="comment">//emit signal indicating adjusted image is out of date</span> <a name="l00114"></a>00114 emit <a class="code" href="classPanningPreviewInterface.html#ac0276e9177e6ff67c038659ceb63af9b">selectionChanged</a>(); <a name="l00115"></a>00115 } </pre></div></p> </div> </div> <a class="anchor" id="a4b3332b2006f61fab9a290bd3637db10"></a><!-- doxytag: member="PanningPreviewInterface::getSelection" ref="a4b3332b2006f61fab9a290bd3637db10" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QRect PanningPreviewInterface::getSelection </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="panningPreviewInterface_8cpp_source.html#l00117">117</a> of file <a class="el" href="panningPreviewInterface_8cpp_source.html">panningPreviewInterface.cpp</a>.</p> <p>References <a class="el" href="panningPreviewInterface_8h_source.html#l00049">selection</a>.</p> <p>Referenced by <a class="el" href="grainEditor_8cpp_source.html#l00249">GrainEditor::generateAdjustedPreviewImage()</a>, and <a class="el" href="grainEditor_8cpp_source.html#l00240">GrainEditor::previewResized()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00118"></a>00118 { <span class="keywordflow">return</span> <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>; } </pre></div></p> </div> </div> <a class="anchor" id="a8eca66ff583ebe33a194864a802f1dcd"></a><!-- doxytag: member="PanningPreviewInterface::paintingSize" ref="a8eca66ff583ebe33a194864a802f1dcd" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QSize PanningPreviewInterface::paintingSize </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="panningPreviewInterface_8cpp_source.html#l00034">34</a> of file <a class="el" href="panningPreviewInterface_8cpp_source.html">panningPreviewInterface.cpp</a>.</p> <p>References <a class="el" href="panningPreviewInterface_8h_source.html#l00046">fullSizeImage</a>.</p> <p>Referenced by <a class="el" href="panningPreviewInterface_8cpp_source.html#l00040">resizeEvent()</a>, and <a class="el" href="panningPreviewInterface_8cpp_source.html#l00074">setSelection()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00035"></a>00035 { <a name="l00036"></a>00036 <span class="keywordflow">return</span> QSize( QMIN( <a class="code" href="classPanningPreviewInterface.html#ae9d723a64dc61d1913635a135b538c00" title="Full size image.">fullSizeImage</a>.width(), size().width() ), <a name="l00037"></a>00037 QMIN( <a class="code" href="classPanningPreviewInterface.html#ae9d723a64dc61d1913635a135b538c00" title="Full size image.">fullSizeImage</a>.height(), size().height() ) ); <a name="l00038"></a>00038 } </pre></div></p> </div> </div> <a class="anchor" id="a2895eb5c0614dfaebf3bc8d69ac3e989"></a><!-- doxytag: member="PanningPreviewInterface::resizeEvent" ref="a2895eb5c0614dfaebf3bc8d69ac3e989" args="(QResizeEvent *)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PanningPreviewInterface::resizeEvent </td> <td>(</td> <td class="paramtype">QResizeEvent * </td> <td class="paramname"></td> <td> ) </td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Implements <a class="el" href="classSplitViewInterface.html#a9d7c7229f759ea139d01f0807c10f632">SplitViewInterface</a>.</p> <p>Definition at line <a class="el" href="panningPreviewInterface_8cpp_source.html#l00040">40</a> of file <a class="el" href="panningPreviewInterface_8cpp_source.html">panningPreviewInterface.cpp</a>.</p> <p>References <a class="el" href="panningPreviewInterface_8h_source.html#l00046">fullSizeImage</a>, <a class="el" href="panningPreviewInterface_8cpp_source.html#l00034">paintingSize()</a>, <a class="el" href="panningPreviewInterface_8h_source.html#l00049">selection</a>, and <a class="el" href="panningPreviewInterface_8cpp_source.html#l00074">setSelection()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00041"></a>00041 { <a name="l00042"></a>00042 <span class="comment">//center of new selection...</span> <a name="l00043"></a>00043 QPoint center; <a name="l00044"></a>00044 <a name="l00045"></a>00045 <span class="comment">//if selection not set then default to center of image</span> <a name="l00046"></a>00046 <span class="keywordflow">if</span>( <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.width() == 0) <a name="l00047"></a>00047 { <a name="l00048"></a>00048 <span class="comment">//compute center selection center</span> <a name="l00049"></a>00049 center = QPoint( <a class="code" href="classPanningPreviewInterface.html#ae9d723a64dc61d1913635a135b538c00" title="Full size image.">fullSizeImage</a>.width() / 2, <a name="l00050"></a>00050 <a class="code" href="classPanningPreviewInterface.html#ae9d723a64dc61d1913635a135b538c00" title="Full size image.">fullSizeImage</a>.height() / 2 ); <a name="l00051"></a>00051 } <a name="l00052"></a>00052 <span class="comment">//else construct new selection that is centered over old selection</span> <a name="l00053"></a>00053 <span class="keywordflow">else</span> <a name="l00054"></a>00054 { <a name="l00055"></a>00055 <span class="comment">//compute center selection center</span> <a name="l00056"></a>00056 center = QPoint( <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.left() + <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.width()/2, <a name="l00057"></a>00057 <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.top() + <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.height()/2 ); <a name="l00058"></a>00058 } <a name="l00059"></a>00059 <a name="l00060"></a>00060 <span class="comment">//determine width/height that will be used for painting</span> <a name="l00061"></a>00061 QSize actualSize = <a class="code" href="classPanningPreviewInterface.html#a8eca66ff583ebe33a194864a802f1dcd">paintingSize</a>(); <a name="l00062"></a>00062 <a name="l00063"></a>00063 <span class="comment">//compute new selection area centerd over old selection region</span> <a name="l00064"></a>00064 QRect newSelection; <a name="l00065"></a>00065 newSelection.setLeft( center.x() - actualSize.width() /2 ); <a name="l00066"></a>00066 newSelection.setTop ( center.y() - actualSize.height()/2 ); <a name="l00067"></a>00067 newSelection.setRight( newSelection.left() + actualSize.width() - 1 ); <a name="l00068"></a>00068 newSelection.setBottom( newSelection.top() + actualSize.height() - 1 ); <a name="l00069"></a>00069 <a name="l00070"></a>00070 <span class="comment">//set selection which will result in regenerating of orig and adjusted images</span> <a name="l00071"></a>00071 <a class="code" href="classPanningPreviewInterface.html#a8c4e6125ea261a0506441736224a9a96">setSelection</a>( newSelection ); <a name="l00072"></a>00072 } </pre></div></p> </div> </div> <a class="anchor" id="ac0276e9177e6ff67c038659ceb63af9b"></a><!-- doxytag: member="PanningPreviewInterface::selectionChanged" ref="ac0276e9177e6ff67c038659ceb63af9b" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PanningPreviewInterface::selectionChanged </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [signal]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Referenced by <a class="el" href="panningPreviewInterface_8cpp_source.html#l00105">generateOrigImage()</a>.</p> </div> </div> <a class="anchor" id="a8c4e6125ea261a0506441736224a9a96"></a><!-- doxytag: member="PanningPreviewInterface::setSelection" ref="a8c4e6125ea261a0506441736224a9a96" args="(QRect selection)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void PanningPreviewInterface::setSelection </td> <td>(</td> <td class="paramtype">QRect </td> <td class="paramname"> <em>selection</em></td> <td> ) </td> <td><code> [slot]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="panningPreviewInterface_8cpp_source.html#l00074">74</a> of file <a class="el" href="panningPreviewInterface_8cpp_source.html">panningPreviewInterface.cpp</a>.</p> <p>References <a class="el" href="panningPreviewInterface_8h_source.html#l00046">fullSizeImage</a>, <a class="el" href="panningPreviewInterface_8cpp_source.html#l00105">generateOrigImage()</a>, <a class="el" href="panningPreviewInterface_8cpp_source.html#l00034">paintingSize()</a>, and <a class="el" href="panningPreviewInterface_8h_source.html#l00049">selection</a>.</p> <p>Referenced by <a class="el" href="panningPreviewInterface_8cpp_source.html#l00040">resizeEvent()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00075"></a>00075 { <a name="l00076"></a>00076 <span class="comment">//set the selection</span> <a name="l00077"></a>00077 <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a> = s; <a name="l00078"></a>00078 <a name="l00079"></a>00079 <span class="comment">//get the available painting size</span> <a name="l00080"></a>00080 QSize actualSize = <a class="code" href="classPanningPreviewInterface.html#a8eca66ff583ebe33a194864a802f1dcd">paintingSize</a>(); <a name="l00081"></a>00081 <a name="l00082"></a>00082 <span class="comment">//if too wide or tall shrink selection</span> <a name="l00083"></a>00083 <span class="keywordflow">if</span>( <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.width() > actualSize.width() ) <a name="l00084"></a>00084 <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.setRight( <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.left() + actualSize.width() - 1 ); <a name="l00085"></a>00085 <span class="keywordflow">if</span>( <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.height() > actualSize.height() ) <a name="l00086"></a>00086 <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.setBottom( <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.top() + actualSize.height() - 1 ); <a name="l00087"></a>00087 <a name="l00088"></a>00088 <span class="comment">//shift selection area if it extends beyond image boundary</span> <a name="l00089"></a>00089 <span class="keywordflow">if</span>( <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.left() < 0 ) <a name="l00090"></a>00090 <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.moveBy( -<a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.left(), 0 ); <a name="l00091"></a>00091 <a name="l00092"></a>00092 <span class="keywordflow">if</span>( <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.top() < 0 ) <a name="l00093"></a>00093 <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.moveBy( 0, -<a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.top() ); <a name="l00094"></a>00094 <a name="l00095"></a>00095 <span class="keywordflow">if</span>( <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.right() > <a class="code" href="classPanningPreviewInterface.html#ae9d723a64dc61d1913635a135b538c00" title="Full size image.">fullSizeImage</a>.width()-1 ) <a name="l00096"></a>00096 <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.moveBy( (<a class="code" href="classPanningPreviewInterface.html#ae9d723a64dc61d1913635a135b538c00" title="Full size image.">fullSizeImage</a>.width()-1) - <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.right(), 0 ); <a name="l00097"></a>00097 <a name="l00098"></a>00098 <span class="keywordflow">if</span>( <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.bottom() > <a class="code" href="classPanningPreviewInterface.html#ae9d723a64dc61d1913635a135b538c00" title="Full size image.">fullSizeImage</a>.height()-1 ) <a name="l00099"></a>00099 <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.moveBy( 0, (<a class="code" href="classPanningPreviewInterface.html#ae9d723a64dc61d1913635a135b538c00" title="Full size image.">fullSizeImage</a>.height()-1) - <a class="code" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e" title="Current selection.">selection</a>.bottom() ); <a name="l00100"></a>00100 <a name="l00101"></a>00101 <span class="comment">//regenerate orig and adjusted images</span> <a name="l00102"></a>00102 <a class="code" href="classPanningPreviewInterface.html#acf1d9fbd7cb9b61f3632dc5d93a9fbed">generateOrigImage</a>(); <a name="l00103"></a>00103 } </pre></div></p> </div> </div> <a class="anchor" id="a181e8b15629fb913e41d7476df90745e"></a><!-- doxytag: member="PanningPreviewInterface::sizeHint" ref="a181e8b15629fb913e41d7476df90745e" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QSize PanningPreviewInterface::sizeHint </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Implements <a class="el" href="classSplitViewInterface.html#ab66146bb7001efb0cf8511a0d0b5a664">SplitViewInterface</a>.</p> <p>Definition at line <a class="el" href="panningPreviewInterface_8cpp_source.html#l00028">28</a> of file <a class="el" href="panningPreviewInterface_8cpp_source.html">panningPreviewInterface.cpp</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00029"></a>00029 { <a name="l00030"></a>00030 <span class="comment">//subjetively chosen default size :)</span> <a name="l00031"></a>00031 <span class="keywordflow">return</span> QSize( 500, 400 ); <a name="l00032"></a>00032 } </pre></div></p> </div> </div> <hr/><h2>Member Data Documentation</h2> <a class="anchor" id="ae9d723a64dc61d1913635a135b538c00"></a><!-- doxytag: member="PanningPreviewInterface::fullSizeImage" ref="ae9d723a64dc61d1913635a135b538c00" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QImage <a class="el" href="classPanningPreviewInterface.html#ae9d723a64dc61d1913635a135b538c00">PanningPreviewInterface::fullSizeImage</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Full size image. </p> <p>Definition at line <a class="el" href="panningPreviewInterface_8h_source.html#l00046">46</a> of file <a class="el" href="panningPreviewInterface_8h_source.html">panningPreviewInterface.h</a>.</p> <p>Referenced by <a class="el" href="panningPreviewInterface_8cpp_source.html#l00105">generateOrigImage()</a>, <a class="el" href="panningPreviewInterface_8cpp_source.html#l00034">paintingSize()</a>, <a class="el" href="panningPreviewInterface_8cpp_source.html#l00015">PanningPreviewInterface()</a>, <a class="el" href="panningPreviewInterface_8cpp_source.html#l00040">resizeEvent()</a>, and <a class="el" href="panningPreviewInterface_8cpp_source.html#l00074">setSelection()</a>.</p> </div> </div> <a class="anchor" id="a071ba54dffe1ed00e809510ebda6f19e"></a><!-- doxytag: member="PanningPreviewInterface::selection" ref="a071ba54dffe1ed00e809510ebda6f19e" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QRect <a class="el" href="classPanningPreviewInterface.html#a071ba54dffe1ed00e809510ebda6f19e">PanningPreviewInterface::selection</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Current selection. </p> <p>Definition at line <a class="el" href="panningPreviewInterface_8h_source.html#l00049">49</a> of file <a class="el" href="panningPreviewInterface_8h_source.html">panningPreviewInterface.h</a>.</p> <p>Referenced by <a class="el" href="panningPreviewInterface_8cpp_source.html#l00105">generateOrigImage()</a>, <a class="el" href="panningPreviewInterface_8cpp_source.html#l00117">getSelection()</a>, <a class="el" href="panningPreviewInterface_8cpp_source.html#l00015">PanningPreviewInterface()</a>, <a class="el" href="panningPreviewInterface_8cpp_source.html#l00040">resizeEvent()</a>, and <a class="el" href="panningPreviewInterface_8cpp_source.html#l00074">setSelection()</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="panningPreviewInterface_8h_source.html">panningPreviewInterface.h</a></li> <li><a class="el" href="panningPreviewInterface_8cpp_source.html">panningPreviewInterface.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>