<!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: addPhotosDialog.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 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>addPhotosDialog.h</h1><a href="addPhotosDialog_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_DIALOGS_ADDPHOTOSDIALOG_H</span> <a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define GUI_DIALOGS_ADDPHOTOSDIALOG_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><a class="code" href="classQFileDialog.html">QFileDialog</a>; <a name="l00018"></a>00018 <span class="keyword">class </span>QCheckBox; <a name="l00019"></a>00019 <span class="keyword">class </span><a class="code" href="classQLabel.html">QLabel</a>; <a name="l00020"></a>00020 <span class="comment">//--------------------</span> <a name="l00021"></a>00021 <a name="l00022"></a>00022 <span class="preprocessor">#include <qfiledialog.h></span> <a name="l00023"></a>00023 <span class="preprocessor">#include <qmutex.h></span> <a name="l00024"></a>00024 <span class="preprocessor">#include <qthread.h></span> <a name="l00025"></a>00025 <span class="keyword">class </span><a class="code" href="classFilePreview.html">FilePreview</a>; <a name="l00026"></a>00026 <span class="keyword">class </span><a class="code" href="classGeneratePreviewThread.html">GeneratePreviewThread</a>; <a name="l00027"></a>00027 <a name="l00028"></a>00028 <span class="comment">//================================</span> <a name="l00029"></a><a class="code" href="classGeneratePreviewThread.html">00029</a> <span class="keyword">class </span><a class="code" href="classGeneratePreviewThread.html">GeneratePreviewThread</a> : <span class="keyword">public</span> <a class="code" href="classQThread.html">QThread</a> <a name="l00030"></a>00030 { <a name="l00031"></a>00031 <span class="keyword">public</span>: <a name="l00032"></a>00032 <a class="code" href="classGeneratePreviewThread.html#a07eb50f20a9a67448e8b2d33c1252328">GeneratePreviewThread</a>( <a class="code" href="classFilePreview.html">FilePreview</a>* <a class="code" href="classGeneratePreviewThread.html#acced915beb70c76416f0518aea250104" title="handle on preview widget necessary for posting an update event once the current file...">previewWidget</a> ); <a name="l00033"></a>00033 <span class="keywordtype">void</span> <a class="code" href="classGeneratePreviewThread.html#a29affa3f16c4b04522de227d68ac2450">start</a>( QString <a class="code" href="classGeneratePreviewThread.html#acd55c605c796212412940d4988f4253a" title="current file being processed">filename</a>); <a name="l00034"></a>00034 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classGeneratePreviewThread.html#a1ea5bdb72a79bbc081829dd0fbcc6eb0">run</a>(); <a name="l00035"></a>00035 <span class="comment">//--------------</span> <a name="l00036"></a>00036 <span class="keyword">private</span>: <a name="l00038"></a><a class="code" href="classGeneratePreviewThread.html#acd55c605c796212412940d4988f4253a">00038</a> QString filename; <a name="l00039"></a>00039 <a name="l00042"></a><a class="code" href="classGeneratePreviewThread.html#acced915beb70c76416f0518aea250104">00042</a> <a class="code" href="classFilePreview.html">FilePreview</a>* previewWidget; <a name="l00043"></a>00043 <a name="l00045"></a><a class="code" href="classGeneratePreviewThread.html#a4809be79bf9c1c67561868fbcc88fd1f">00045</a> <span class="keywordtype">bool</span> <a class="code" href="classGeneratePreviewThread.html#a4809be79bf9c1c67561868fbcc88fd1f" title="is the worker thread currently generating a file preview?">updating</a>; <a name="l00046"></a>00046 <a name="l00048"></a><a class="code" href="classGeneratePreviewThread.html#ad7505a7bf8e25d9208d96ddb51f5ca65">00048</a> QString <a class="code" href="classGeneratePreviewThread.html#ad7505a7bf8e25d9208d96ddb51f5ca65" title="next file to be processed by worker thread">queue</a>; <a name="l00049"></a>00049 <a name="l00052"></a><a class="code" href="classGeneratePreviewThread.html#a6611d14aeaa6173cc6e256a817865984">00052</a> QMutex <a class="code" href="classGeneratePreviewThread.html#a6611d14aeaa6173cc6e256a817865984" title="locking mutex - necessary to prevent multiple threads from accessing the updating...">lockingMutex</a>; <a name="l00053"></a>00053 }; <a name="l00054"></a>00054 <span class="comment">//==============================================</span> <a name="l00055"></a><a class="code" href="classFilePreview.html">00055</a> <span class="keyword">class </span><a class="code" href="classFilePreview.html">FilePreview</a> : <span class="keyword">public</span> <a class="code" href="classQWidget.html">QWidget</a>, <span class="keyword">public</span> <a class="code" href="classQFilePreview.html">QFilePreview</a> <a name="l00056"></a>00056 { <a name="l00057"></a>00057 <span class="keyword">public</span>: <a name="l00058"></a>00058 <a class="code" href="classFilePreview.html#adbc18ed317e28adeed02779527168d9f">FilePreview</a>( <a class="code" href="classQWidget.html">QWidget</a>* parent=0 ); <a name="l00059"></a>00059 <a class="code" href="classFilePreview.html#a92c81c8fe975be2d2b385274b13414ea">~FilePreview</a>(); <a name="l00060"></a>00060 QSize <a class="code" href="classFilePreview.html#ab007946217dd7efc63b0e2ffdc88ecc9">minimumSizeHint</a> () <span class="keyword">const</span>; <a name="l00061"></a>00061 <a name="l00063"></a><a class="code" href="classFilePreview.html#a284b8e2753fea14cbd6c9f037082c72c">00063</a> <span class="keywordtype">void</span> <a class="code" href="classFilePreview.html#a284b8e2753fea14cbd6c9f037082c72c" title="declared to make base class happy. we&#39;ll use an updatePreview function instead...">previewUrl</a>( <span class="keyword">const</span> QUrl& ) {} <a name="l00064"></a>00064 <a name="l00066"></a>00066 <span class="keywordtype">void</span> <a class="code" href="classFilePreview.html#adeef143a0e947ab5a45835e1a3062602" title="call this function to update the file preview">updatePreview</a>( <span class="keyword">const</span> QString& path ); <a name="l00067"></a>00067 <a name="l00068"></a>00068 <span class="keyword">protected</span>: <a name="l00070"></a>00070 <span class="keywordtype">void</span> <a class="code" href="classFilePreview.html#a4011d44115502e66f28e1b9b5d866ca2" title="handle update events that come from the GeneratePreviewThread">customEvent</a>( <a class="code" href="classQCustomEvent.html">QCustomEvent</a> * e ); <a name="l00071"></a>00071 <a name="l00072"></a>00072 <span class="keyword">private</span>: <a name="l00074"></a><a class="code" href="classFilePreview.html#a93c12f19e09638dd16f4df9acc5a93ef">00074</a> <a class="code" href="classQLabel.html">QLabel</a>* <a class="code" href="classFilePreview.html#a93c12f19e09638dd16f4df9acc5a93ef" title="preview of last selected file">filePreview</a>; <a name="l00075"></a>00075 <a name="l00077"></a><a class="code" href="classFilePreview.html#a88cefa8ce11426e930e473142d940ad1">00077</a> <a class="code" href="classQLabel.html">QLabel</a>* <a class="code" href="classFilePreview.html#a88cefa8ce11426e930e473142d940ad1" title="details about last selected file">fileDetails</a>; <a name="l00078"></a>00078 <a name="l00082"></a><a class="code" href="classFilePreview.html#abc98931b02f0a31e2cb17bf3da3e3e07">00082</a> <a class="code" href="classGeneratePreviewThread.html">GeneratePreviewThread</a>* <a class="code" href="classFilePreview.html#abc98931b02f0a31e2cb17bf3da3e3e07" title="a worker thread that actually generates the file preview image and details information...">generatorThread</a>; <a name="l00083"></a>00083 }; <a name="l00084"></a>00084 <span class="comment">//=====================================</span> <a name="l00087"></a>00087 <span class="comment"></span><span class="comment">//=====================================</span> <a name="l00088"></a><a class="code" href="classAddPhotosDialog.html">00088</a> <span class="keyword">class </span><a class="code" href="classAddPhotosDialog.html" title="Simple dialog for browsing and select photos to add to a subalbum.">AddPhotosDialog</a> : <span class="keyword">public</span> <a class="code" href="classQFileDialog.html">QFileDialog</a> <a name="l00089"></a>00089 { <a name="l00090"></a>00090 Q_OBJECT <a name="l00091"></a>00091 <a name="l00092"></a>00092 <span class="keyword">public</span>: <a name="l00093"></a>00093 <a class="code" href="classAddPhotosDialog.html#a6627eb29f74eddf8acd16649c25ab5ac">AddPhotosDialog</a>(QString path, <a class="code" href="classQWidget.html">QWidget</a> *parent=0, <span class="keyword">const</span> <span class="keywordtype">char</span>* name=0); <a name="l00094"></a>00094 <a name="l00097"></a>00097 QStringList <a class="code" href="classAddPhotosDialog.html#ac65dc3e26f23e8db4fc50b53f281006b" title="returns the list of selected filenames, while setting setDescritions to the state...">getFilenames</a>(<span class="keywordtype">bool</span>& <a class="code" href="classAddPhotosDialog.html#a97045556080874842dc414eacd5306ea" title="Checkbox asking if filenames should be used to set image descriptions.">setDescriptions</a>); <a name="l00098"></a>00098 <span class="comment">//----------------------</span> <a name="l00099"></a>00099 <span class="keyword">private</span>: <a name="l00101"></a><a class="code" href="classAddPhotosDialog.html#a97045556080874842dc414eacd5306ea">00101</a> QCheckBox* setDescriptions; <a name="l00102"></a>00102 <a name="l00104"></a><a class="code" href="classAddPhotosDialog.html#a437577da2a4b0c1948527663af70ee88">00104</a> <a class="code" href="classFilePreview.html">FilePreview</a>* <a class="code" href="classAddPhotosDialog.html#a437577da2a4b0c1948527663af70ee88" title="Used to preview selected files.">filePreview</a>; <a name="l00105"></a>00105 <span class="comment">//----------------------</span> <a name="l00106"></a>00106 <span class="keyword">private</span> slots: <a name="l00108"></a>00108 <span class="keywordtype">void</span> <a class="code" href="classAddPhotosDialog.html#aa264f1c88fd5aa219c5de8c177d7ef5a" title="handle the user selecting items by updating the file preview fields">updatePreview</a>(<span class="keyword">const</span> QString& filename); <a name="l00109"></a>00109 <span class="comment">//----------------------</span> <a name="l00110"></a>00110 }; <a name="l00111"></a>00111 <span class="comment">//======================</span> <a name="l00112"></a>00112 <a name="l00113"></a>00113 <span class="preprocessor">#endif //GUI_DIALOGS_ADDPHOTOSDIALOG_H</span> </pre></div></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>