<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>AlbumShaper: subalbumWidget.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.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main 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 List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <h1>subalbumWidget.h</h1><a href="subalbumWidget_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_SUBALBUMWIDGET_H</span> <a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define GUI_SUBALBUMWIDGET_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="keyword">class </span>QGridLayout; <a name="l00017"></a>00017 <span class="keyword">class </span>QPixmap; <a name="l00018"></a>00018 <span class="keyword">class </span><a class="code" href="classQIconView.html">QIconView</a>; <a name="l00019"></a>00019 <span class="keyword">class </span><a class="code" href="classPhotosIconView.html" title="Extension of iconview, used to list all photos in a subalbum. supports drag-n-drop...">PhotosIconView</a>; <a name="l00020"></a>00020 <span class="keyword">class </span>QToolButton; <a name="l00021"></a>00021 <span class="keyword">class </span><a class="code" href="classQFrame.html">QFrame</a>; <a name="l00022"></a>00022 <span class="keyword">class </span><a class="code" href="classSubalbum.html" title="A subalbum contains photos.">Subalbum</a>; <a name="l00023"></a>00023 <span class="keyword">class </span><a class="code" href="classLayoutWidget.html" title="Displays list of subalbums and a particular subalbum layout.">LayoutWidget</a>; <a name="l00024"></a>00024 <span class="keyword">class </span><a class="code" href="classPhoto.html" title="A photo consists of a full size image, a smaller slide show image, a very small thumbnail...">Photo</a>; <a name="l00025"></a>00025 <a name="l00026"></a>00026 <span class="keyword">class </span><a class="code" href="classQIconViewItem.html">QIconViewItem</a>; <a name="l00027"></a>00027 <span class="comment">//--------------------</span> <a name="l00028"></a>00028 <a name="l00029"></a>00029 <span class="preprocessor">#include <qwidget.h></span> <a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="comment">//=====================================</span> <a name="l00034"></a>00034 <span class="comment"></span><span class="comment">//=====================================</span> <a name="l00035"></a><a class="code" href="classSubalbumWidget.html">00035</a> <span class="keyword">class </span><a class="code" href="classSubalbumWidget.html" title="Displays subalbum layout.">SubalbumWidget</a> : <span class="keyword">public</span> <a class="code" href="classQWidget.html">QWidget</a> <a name="l00036"></a>00036 { <a name="l00037"></a>00037 Q_OBJECT <a name="l00038"></a>00038 <a name="l00039"></a>00039 <span class="keyword">public</span>: <a name="l00041"></a>00041 <a class="code" href="classSubalbumWidget.html#711c0c541a032bd4e0f4048273f8fbff" title="Creates layout based on backend object.">SubalbumWidget</a>(<a class="code" href="classSubalbum.html" title="A subalbum contains photos.">Subalbum</a>* salbum, <a name="l00042"></a>00042 <a class="code" href="classQWidget.html">QWidget</a> *parent=0, <a name="l00043"></a>00043 <span class="keyword">const</span> <span class="keywordtype">char</span>* name=0); <a name="l00044"></a>00044 <a name="l00046"></a>00046 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#1ab4edd806312f51d5fc421ca2f69770" title="Resets the subalbum this subalbum widget is displaying.">setSubalbum</a>(<a class="code" href="classSubalbum.html" title="A subalbum contains photos.">Subalbum</a>* salbum); <a name="l00047"></a>00047 <a name="l00050"></a>00050 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#099a0fd80c76ee639527a4a8ebd8834c" title="clears and reinserts all photos for the current collection the current selection...">refreshPhotos</a>(); <a name="l00051"></a>00051 <a name="l00053"></a>00053 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#4adf83eb17583a370a196f17ae4a1183" title="refreshes all photos, selections are preserved">refreshAllPhotos</a>(); <a name="l00054"></a>00054 <a name="l00056"></a>00056 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#56c247e395a7173ad01c138a66516019" title="refreshes selected photos, selections are preserved">refreshSelectedPhotos</a>(); <a name="l00057"></a>00057 <a name="l00059"></a>00059 <a class="code" href="classSubalbum.html" title="A subalbum contains photos.">Subalbum</a>* <a class="code" href="classSubalbumWidget.html#c02ec35e2bcb4e2e76b545e316bb9333" title="returns a pointer to the backend subalbum">getSubalbum</a>(); <a name="l00060"></a>00060 <a name="l00062"></a>00062 <a class="code" href="classPhoto.html" title="A photo consists of a full size image, a smaller slide show image, a very small thumbnail...">Photo</a>* <a class="code" href="classSubalbumWidget.html#08a6ad175432af3b13028550f7fec167" title="Returns currently selected photo. If no or multiple photos selected returns NULL...">getSelectedPhoto</a>(); <a name="l00063"></a>00063 <a name="l00065"></a>00065 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#5f140f7534fcefa7311b60b1ab1b7d58" title="Sets the selected photo to selection and ensures it is visible.">setSelectedPhoto</a>(<a class="code" href="classPhoto.html" title="A photo consists of a full size image, a smaller slide show image, a very small thumbnail...">Photo</a>* selection); <a name="l00066"></a>00066 <a name="l00068"></a>00068 <a class="code" href="classPhoto.html" title="A photo consists of a full size image, a smaller slide show image, a very small thumbnail...">Photo</a>* <a class="code" href="classSubalbumWidget.html#c610ac88f0b949748c30028e9cdd4635" title="Returns first selected photo.">getFirstSelectedPhoto</a>(); <a name="l00069"></a>00069 <a name="l00071"></a>00071 <span class="keywordtype">bool</span> <a class="code" href="classSubalbumWidget.html#6838d0b74aadb6cced433b6151d0cf04" title="Returns true if any phtos are selected.">anyPhotosSelected</a>(); <a name="l00072"></a>00072 <a name="l00074"></a>00074 <span class="keywordtype">bool</span> <a class="code" href="classSubalbumWidget.html#f66535c26047abbe2d2b75d4941617e1" title="Returns true if any selected photos are revertable.">anySelectedPhotosRevertable</a>(); <a name="l00075"></a>00075 <a name="l00077"></a>00077 <a class="code" href="classQIconView.html">QIconView</a>* <a class="code" href="classSubalbumWidget.html#445ee3b90db7db75514990c6b1624077" title="Returns pointer to icon view.">getPhotos</a>(); <a name="l00078"></a>00078 <a name="l00080"></a>00080 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#24e68f674aaa52764fe0210daeea2d6a" title="Activates/Deactives remove/rotate buttons depending on if an image is selected.">updateButtons</a>(<span class="keywordtype">bool</span> enable); <a name="l00081"></a>00081 <a name="l00083"></a>00083 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#9e564e5c218d2d7b9bbc267698d4b112" title="Strip descriptions from selected photos.">stripDescriptionsFromSelectedPhotos</a>(); <a name="l00084"></a>00084 <a name="l00086"></a>00086 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#d8593d9016ed6b8639f51d751620e0e1" title="Revert selected photos to their original form.">revertSelectedPhotos</a>(); <a name="l00087"></a>00087 <span class="comment">//----------------------</span> <a name="l00088"></a>00088 signals: <a name="l00089"></a>00089 <span class="comment">//signal emitted when the selection or the state of the selection changes </span> <a name="l00090"></a>00090 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#1cde0b4ccbdf1113d0b09b28038cf5a5">selectedPhotoStateChanged</a>(); <a name="l00091"></a>00091 <span class="comment">//----------------------</span> <a name="l00092"></a>00092 <span class="keyword">private</span> slots: <a name="l00094"></a>00094 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#732831115d20a2909732e9b3e919f314" title="set desktop wallpaper">setWallpaperAction</a>(); <a name="l00095"></a>00095 <a name="l00097"></a>00097 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#d874ee980f8dc0bc387bb82867a12f30" title="handles changing selections">selectionChangedEvent</a>(); <a name="l00098"></a>00098 <a name="l00100"></a>00100 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#24e68f674aaa52764fe0210daeea2d6a" title="Activates/Deactives remove/rotate buttons depending on if an image is selected.">updateButtons</a>(); <a name="l00101"></a>00101 <a name="l00103"></a>00103 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#538a85659280a550fa40d5d3179761a7" title="Adds an image to the subalbum.">addImageAction</a>(); <a name="l00104"></a>00104 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#538a85659280a550fa40d5d3179761a7" title="Adds an image to the subalbum.">addImageAction</a>(QStringList fileNames, <span class="keywordtype">bool</span> setDescriptions=<span class="keyword">false</span>); <a name="l00105"></a>00105 <a name="l00107"></a>00107 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#e6d0517f1620d412cab20351ded6cfe7" title="Remove an image from the subalbum.">removeImageAction</a>(); <a name="l00108"></a>00108 <a name="l00110"></a>00110 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#04e384834c5debfac79cd5f362fb15a5" title="Rotate clockwise selected images.">rotate90ImageAction</a>(); <a name="l00111"></a>00111 <a name="l00113"></a>00113 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#2d708d3126d4ff9ff8062312fe96127b" title="Rotate counter-clockwise selected images.">rotate270ImageAction</a>(); <a name="l00114"></a>00114 <a name="l00115"></a>00115 <span class="comment">//Rearranges subalbums in grid</span> <a name="l00116"></a>00116 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#8e766c9a557843082256890076bebed1">reorder</a>(); <a name="l00117"></a>00117 <a name="l00118"></a>00118 <span class="comment">//Deselect all photos</span> <a name="l00119"></a>00119 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#1117485c7c5dbef6e45a42dd493921f3">deselectAll</a>(); <a name="l00120"></a>00120 <span class="comment">//----------------------</span> <a name="l00121"></a>00121 <span class="keyword">protected</span>: <a name="l00122"></a>00122 <span class="keywordtype">void</span> <a class="code" href="classSubalbumWidget.html#aa2a2ccabd6370891223bbfbc88576a4">resizeEvent</a>( QResizeEvent * ); <a name="l00123"></a>00123 <span class="comment">//----------------------</span> <a name="l00124"></a>00124 <span class="keyword">private</span>: <a name="l00126"></a><a class="code" href="classSubalbumWidget.html#56b16acc3fe69d3e44c15b5af0bf6294">00126</a> QGridLayout* <a class="code" href="classSubalbumWidget.html#56b16acc3fe69d3e44c15b5af0bf6294" title="Grids widgets are placed in.">mainGrid</a>; <a name="l00127"></a><a class="code" href="classSubalbumWidget.html#f0cf11607e31ff6b580ad597c85d6b82">00127</a> QGridLayout* <a class="code" href="classSubalbumWidget.html#f0cf11607e31ff6b580ad597c85d6b82">buttonsGrid</a>; <a name="l00128"></a>00128 <a name="l00130"></a><a class="code" href="classSubalbumWidget.html#b51b57749620cadc4d3e0e1c5ad96f7f">00130</a> <a class="code" href="classQFrame.html">QFrame</a>* <a class="code" href="classSubalbumWidget.html#b51b57749620cadc4d3e0e1c5ad96f7f" title="Grid lower buttons are placed in.">thumbnailFrame</a>; <a name="l00131"></a><a class="code" href="classSubalbumWidget.html#14d6bb8e1c96f121aeb5f3df98154805">00131</a> <a class="code" href="classQFrame.html">QFrame</a>* <a class="code" href="classSubalbumWidget.html#14d6bb8e1c96f121aeb5f3df98154805">buttonsFrame</a>; <a name="l00132"></a>00132 <a name="l00134"></a><a class="code" href="classSubalbumWidget.html#8f77681e9fac42d6a85ae38e13c9b0d6">00134</a> <a class="code" href="classPhotosIconView.html" title="Extension of iconview, used to list all photos in a subalbum. supports drag-n-drop...">PhotosIconView</a>* <a class="code" href="classSubalbumWidget.html#8f77681e9fac42d6a85ae38e13c9b0d6" title="Photos layout.">photos</a>; <a name="l00135"></a>00135 <a name="l00137"></a><a class="code" href="classSubalbumWidget.html#9473b9dbe4dbe31fec85b2c311acbd1c">00137</a> <a class="code" href="classSubalbum.html" title="A subalbum contains photos.">Subalbum</a>* <a class="code" href="classSubalbumWidget.html#9473b9dbe4dbe31fec85b2c311acbd1c" title="Pointer to backend subalbum.">subalbum</a>; <a name="l00138"></a>00138 <a name="l00140"></a><a class="code" href="classSubalbumWidget.html#a854f12a2199db0ba31f88794421314f">00140</a> QToolButton* <a class="code" href="classSubalbumWidget.html#a854f12a2199db0ba31f88794421314f" title="&quot;Add&quot; button">addImage</a>; <a name="l00141"></a>00141 <a name="l00143"></a><a class="code" href="classSubalbumWidget.html#4fb75557858a4a6675aa219dcd05f8dd">00143</a> QToolButton* <a class="code" href="classSubalbumWidget.html#4fb75557858a4a6675aa219dcd05f8dd" title="&quot;Remove&quot; button">removeImage</a>; <a name="l00144"></a>00144 <a name="l00146"></a><a class="code" href="classSubalbumWidget.html#7568031275edab6590552a4acaf159cd">00146</a> QToolButton* <a class="code" href="classSubalbumWidget.html#7568031275edab6590552a4acaf159cd" title="&quot;Rotate 90&quot; button">rotate90Image</a>; <a name="l00147"></a>00147 <a name="l00149"></a><a class="code" href="classSubalbumWidget.html#1e7b7dae88e35807909e47842fa9e4e3">00149</a> QToolButton* <a class="code" href="classSubalbumWidget.html#1e7b7dae88e35807909e47842fa9e4e3" title="&quot;Rotate 270&quot; button">rotate270Image</a>; <a name="l00150"></a>00150 <a name="l00152"></a><a class="code" href="classSubalbumWidget.html#8ee98b030e8e909fd94d6e83475e9a16">00152</a> QToolButton* <a class="code" href="classSubalbumWidget.html#8ee98b030e8e909fd94d6e83475e9a16" title="Set desktop wallpaper button.">setDesktopBtn</a>; <a name="l00153"></a>00153 <a name="l00155"></a><a class="code" href="classSubalbumWidget.html#84b9704a97ddda48d6b680bf75c09fc5">00155</a> <a class="code" href="classLayoutWidget.html" title="Displays list of subalbums and a particular subalbum layout.">LayoutWidget</a>* <a class="code" href="classSubalbumWidget.html#84b9704a97ddda48d6b680bf75c09fc5" title="Pointer to the parent layout widget.">layout</a>; <a name="l00156"></a>00156 <a name="l00158"></a><a class="code" href="classSubalbumWidget.html#801a29ed5560ac63b0e1a147b0c57090">00158</a> <span class="keywordtype">bool</span> <a class="code" href="classSubalbumWidget.html#801a29ed5560ac63b0e1a147b0c57090" title="cached enabled/disabled state of buttons">buttonsState</a>; <a name="l00159"></a>00159 <a name="l00161"></a><a class="code" href="classSubalbumWidget.html#0732c70d8c5c86002d2b04b7f3b9217a">00161</a> <span class="keywordtype">bool</span> <a class="code" href="classSubalbumWidget.html#0732c70d8c5c86002d2b04b7f3b9217a" title="cached enabled/distable state of set wallpaper button">wallpaperButtonState</a>; <a name="l00162"></a>00162 <span class="comment">//----------------------</span> <a name="l00163"></a>00163 }; <a name="l00164"></a>00164 <span class="comment">//======================</span> <a name="l00165"></a>00165 <a name="l00166"></a>00166 <span class="preprocessor">#endif //GUI_SUBALBUMWIDGET_H</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Sun Aug 23 02:34:28 2009 for AlbumShaper by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> </body> </html>