Sophie

Sophie

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

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>AlbumShaper: selectionPlacementInterface.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>selectionPlacementInterface.h</h1><a href="selectionPlacementInterface_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//==============================================</span>
<a name="l00002"></a>00002 <span class="comment">//  copyright            : (C) 2003-2005 by Will Stokes</span>
<a name="l00003"></a>00003 <span class="comment">//==============================================</span>
<a name="l00004"></a>00004 <span class="comment">//  This program is free software; you can redistribute it </span>
<a name="l00005"></a>00005 <span class="comment">//  and/or modify it under the terms of the GNU General </span>
<a name="l00006"></a>00006 <span class="comment">//  Public License as published by the Free Software </span>
<a name="l00007"></a>00007 <span class="comment">//  Foundation; either version 2 of the License, or  </span>
<a name="l00008"></a>00008 <span class="comment">//  (at your option) any later version.         </span>
<a name="l00009"></a>00009 <span class="comment">//==============================================</span>
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 <span class="preprocessor">#ifndef GUI_EDITING_SELECTIONPLACEMENTINTERFACE_H</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define GUI_EDITING_SELECTIONPLACEMENTINTERFACE_H</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span>
<a name="l00014"></a>00014 <span class="comment">//--------------------</span>
<a name="l00015"></a>00015 <span class="comment">//forward declarations</span>
<a name="l00016"></a>00016 <span class="comment">//--------------------</span>
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;qwidget.h&gt;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;qimage.h&gt;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;qpoint.h&gt;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;qsize.h&gt;</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 <span class="comment">//=====================================</span>
<a name="l00025"></a>00025 <span class="comment"></span><span class="comment">//=====================================</span>
<a name="l00026"></a><a class="code" href="classSelectionPlacementInterface.html">00026</a> <span class="keyword">class </span><a class="code" href="classSelectionPlacementInterface.html" title="A selection region placement interface.">SelectionPlacementInterface</a> : <span class="keyword">public</span> <a class="code" href="classQWidget.html">QWidget</a>
<a name="l00027"></a>00027 {
<a name="l00028"></a>00028 Q_OBJECT
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="keyword">public</span>:
<a name="l00032"></a>00032   <a class="code" href="classSelectionPlacementInterface.html#add203016605cac46857a8f341beff67a" title="Creates layout.">SelectionPlacementInterface</a>(QString imageFilename,
<a name="l00033"></a>00033                               <a class="code" href="classQWidget.html">QWidget</a> *parent=0, 
<a name="l00034"></a>00034                               <span class="keyword">const</span> <span class="keywordtype">char</span>* name=0);
<a name="l00035"></a>00035                  
<a name="l00037"></a>00037   <a class="code" href="classSelectionPlacementInterface.html#a3dd71dd7e7a54d22987c1d966872d3ec" title="Deletes objects.">~SelectionPlacementInterface</a>();
<a name="l00038"></a>00038   
<a name="l00040"></a>00040   QRect <a class="code" href="classSelectionPlacementInterface.html#a56666189d8fdea0ee0d7c39612597e6d" title="Returns the selected region in image space.">getSelectedRegion</a>();
<a name="l00041"></a>00041 
<a name="l00043"></a>00043   <span class="keywordtype">void</span> <a class="code" href="classSelectionPlacementInterface.html#af099a62a94a034e3ba1b11357d96a92c" title="Set the select region using image space coordinates.">setSelectedRegion</a>(QRect <a class="code" href="classSelectionPlacementInterface.html#af18984dab577a7b0357da741e880a857" title="selection">selection</a>);
<a name="l00044"></a>00044   
<a name="l00045"></a>00045   <span class="keyword">virtual</span> QSize <a class="code" href="classSelectionPlacementInterface.html#a849dd7f85c84de7fc7f238c21c384186">sizeHint</a>() <span class="keyword">const</span>;
<a name="l00046"></a>00046   <span class="keyword">virtual</span> QSize <a class="code" href="classSelectionPlacementInterface.html#ae3f1b29e015d6b33b88e86d2537ce7b7">minimumSizeHint</a>() <span class="keyword">const</span>;
<a name="l00047"></a>00047   <span class="comment">//----------------------</span>
<a name="l00048"></a>00048 <span class="keyword">protected</span>:
<a name="l00049"></a>00049   <span class="keywordtype">void</span> <a class="code" href="classSelectionPlacementInterface.html#ab2b2a111aa81f4906ad06a89d5a5a778">paintEvent</a>( QPaintEvent *e);
<a name="l00050"></a>00050   <span class="keywordtype">void</span> <a class="code" href="classSelectionPlacementInterface.html#a87d4dc117f86e06623807da2d369cc76">mousePressEvent</a>( QMouseEvent *e);
<a name="l00051"></a>00051   <span class="keywordtype">void</span> <a class="code" href="classSelectionPlacementInterface.html#a555162bb2afad65c1e07f4b903072400">mouseReleaseEvent</a>( QMouseEvent *);
<a name="l00052"></a>00052   <span class="keywordtype">void</span> <a class="code" href="classSelectionPlacementInterface.html#a2ef0a91e4248e9410b5de0dc95bdc83b">mouseMoveEvent</a>( QMouseEvent *e);
<a name="l00053"></a>00053   <span class="comment">//----------------------</span>
<a name="l00054"></a>00054 <span class="keyword">private</span>:
<a name="l00056"></a>00056   QRect <a class="code" href="classSelectionPlacementInterface.html#a6b537be16ed8beace1f18bff8298ff23" title="convert rectangle from image coordinates to display coordinates">imageToDisplay</a>( QRect r );
<a name="l00057"></a>00057 
<a name="l00059"></a>00059   <span class="keywordtype">bool</span> <a class="code" href="classSelectionPlacementInterface.html#a6754ab2e0713bcbfe7033f92bf1b50a3" title="util function used to determine if mouse is over selected region">overRegion</a>( QPoint p );
<a name="l00060"></a>00060   
<a name="l00062"></a>00062   <span class="keywordtype">void</span> <a class="code" href="classSelectionPlacementInterface.html#a2434061757fb2a383145bf233e26c4a5" title="util function used to center selection about mouse location">recenterSelection</a>(QPoint mousePosition);
<a name="l00063"></a>00063   
<a name="l00065"></a><a class="code" href="classSelectionPlacementInterface.html#ad33be07cf77a533429daa950b6a1f7a1">00065</a>   QImage <a class="code" href="classSelectionPlacementInterface.html#ad33be07cf77a533429daa950b6a1f7a1" title="Scaled image used for display purposes.">scaledImage</a>;
<a name="l00066"></a>00066    
<a name="l00068"></a><a class="code" href="classSelectionPlacementInterface.html#a29d6371c917ec8ca66fb3f45de4cb2ba">00068</a>   QImage <a class="code" href="classSelectionPlacementInterface.html#a29d6371c917ec8ca66fb3f45de4cb2ba" title="Unselected scaled image (desaturated version of scaled image).">unselectedScaledImage</a>;
<a name="l00069"></a>00069   
<a name="l00071"></a><a class="code" href="classSelectionPlacementInterface.html#ab365a415a03f4300ee0fa7a4c67a143c">00071</a>   QSize <a class="code" href="classSelectionPlacementInterface.html#ab365a415a03f4300ee0fa7a4c67a143c" title="original image dimensions">origImageSize</a>;  
<a name="l00072"></a>00072 
<a name="l00074"></a><a class="code" href="classSelectionPlacementInterface.html#af18984dab577a7b0357da741e880a857">00074</a>   QRect selection;
<a name="l00075"></a>00075 
<a name="l00078"></a><a class="code" href="classSelectionPlacementInterface.html#a001d6380211ba469b7e3255491bf1a60">00078</a>   <span class="keywordtype">bool</span> <a class="code" href="classSelectionPlacementInterface.html#a001d6380211ba469b7e3255491bf1a60" title="dragging the mouse only moves the selection if the mouse button is pressed first...">currentlyDragging</a>;
<a name="l00079"></a>00079 
<a name="l00082"></a><a class="code" href="classSelectionPlacementInterface.html#aa2cb8adcbf93d1299430045444c624c2">00082</a>   <span class="keywordtype">bool</span> <a class="code" href="classSelectionPlacementInterface.html#aa2cb8adcbf93d1299430045444c624c2" title="current mouse shape.">currentMouseShapeIsDrag</a>;
<a name="l00083"></a>00083   <span class="comment">//----------------------</span>
<a name="l00084"></a>00084 signals:
<a name="l00085"></a>00085   <span class="comment">//emitted as the user drags the selection around</span>
<a name="l00086"></a>00086   <span class="keywordtype">void</span> <a class="code" href="classSelectionPlacementInterface.html#af57125814cf627385b460d5f44ae68cc">placementChanged</a>( QRect );  
<a name="l00087"></a>00087   <span class="comment">//----------------------</span>
<a name="l00088"></a>00088 };
<a name="l00089"></a>00089 <span class="comment">//======================</span>
<a name="l00090"></a>00090 
<a name="l00091"></a>00091 <span class="preprocessor">#endif //GUI_EDITING_SELECTIONPLACEMENTINTERFACE_H</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>