Sophie

Sophie

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

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: AddPhotosDialog 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&nbsp;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&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>AddPhotosDialog Class Reference</h1><!-- doxytag: class="AddPhotosDialog" --><!-- doxytag: inherits="QFileDialog" -->
<p>Simple dialog for browsing and select photos to add to a subalbum.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="addPhotosDialog_8h_source.html">addPhotosDialog.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for AddPhotosDialog:</div>
<div class="dynsection">
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for AddPhotosDialog:</div>
<div class="dynsection">
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classAddPhotosDialog-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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAddPhotosDialog.html#a6627eb29f74eddf8acd16649c25ab5ac">AddPhotosDialog</a> (QString path, <a class="el" href="classQWidget.html">QWidget</a> *parent=0, const char *name=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QStringList&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAddPhotosDialog.html#ac65dc3e26f23e8db4fc50b53f281006b">getFilenames</a> (bool &amp;<a class="el" href="classAddPhotosDialog.html#a97045556080874842dc414eacd5306ea">setDescriptions</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">returns the list of selected filenames, while setting setDescritions to the state the checkbox was left in.  <a href="#ac65dc3e26f23e8db4fc50b53f281006b"></a><br/></td></tr>
<tr><td colspan="2"><h2>Private Slots</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAddPhotosDialog.html#aa264f1c88fd5aa219c5de8c177d7ef5a">updatePreview</a> (const QString &amp;filename)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">handle the user selecting items by updating the file preview fields  <a href="#aa264f1c88fd5aa219c5de8c177d7ef5a"></a><br/></td></tr>
<tr><td colspan="2"><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QCheckBox *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAddPhotosDialog.html#a97045556080874842dc414eacd5306ea">setDescriptions</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checkbox asking if filenames should be used to set image descriptions.  <a href="#a97045556080874842dc414eacd5306ea"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classFilePreview.html">FilePreview</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAddPhotosDialog.html#a437577da2a4b0c1948527663af70ee88">filePreview</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used to preview selected files.  <a href="#a437577da2a4b0c1948527663af70ee88"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Simple dialog for browsing and select photos to add to a subalbum. </p>

<p>Definition at line <a class="el" href="addPhotosDialog_8h_source.html#l00088">88</a> of file <a class="el" href="addPhotosDialog_8h_source.html">addPhotosDialog.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6627eb29f74eddf8acd16649c25ab5ac"></a><!-- doxytag: member="AddPhotosDialog::AddPhotosDialog" ref="a6627eb29f74eddf8acd16649c25ab5ac" args="(QString path, QWidget *parent=0, const char *name=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">AddPhotosDialog::AddPhotosDialog </td>
          <td>(</td>
          <td class="paramtype">QString&nbsp;</td>
          <td class="paramname"> <em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classQWidget.html">QWidget</a> *&nbsp;</td>
          <td class="paramname"> <em>parent</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em> = <code>0</code></td><td>&nbsp;</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="addPhotosDialog_8cpp_source.html#l00238">238</a> of file <a class="el" href="addPhotosDialog_8cpp_source.html">addPhotosDialog.cpp</a>.</p>

<p>References <a class="el" href="addPhotosDialog_8h_source.html#l00104">filePreview</a>, <a class="el" href="addPhotosDialog_8h_source.html#l00101">setDescriptions</a>, and <a class="el" href="addPhotosDialog_8cpp_source.html#l00275">updatePreview()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00239"></a>00239                                                                                  :
<a name="l00240"></a>00240                                  <a class="code" href="classQFileDialog.html">QFileDialog</a>(path,
<a name="l00241"></a>00241                                  tr(<span class="stringliteral">&quot;Images&quot;</span>) + <span class="stringliteral">&quot; (*.gif *.jpg *.jpeg *.png *.xpm *.GIF *.JPG *.JPEG *.PNG *.XPM)&quot;</span>,
<a name="l00242"></a>00242                                  parent,name)
<a name="l00243"></a>00243  {
<a name="l00244"></a>00244    <span class="comment">//setup filter filter and modes</span>
<a name="l00245"></a>00245    setMode( QFileDialog::ExistingFiles );
<a name="l00246"></a>00246    setViewMode( QFileDialog::List );
<a name="l00247"></a>00247  
<a name="l00248"></a>00248    <a class="code" href="classAddPhotosDialog.html#a437577da2a4b0c1948527663af70ee88" title="Used to preview selected files.">filePreview</a> = <span class="keyword">new</span> <a class="code" href="classFilePreview.html">FilePreview</a>();
<a name="l00249"></a>00249    setContentsPreviewEnabled( <span class="keyword">true</span> );
<a name="l00250"></a>00250    setContentsPreview( <a class="code" href="classAddPhotosDialog.html#a437577da2a4b0c1948527663af70ee88" title="Used to preview selected files.">filePreview</a>, <a class="code" href="classAddPhotosDialog.html#a437577da2a4b0c1948527663af70ee88" title="Used to preview selected files.">filePreview</a> );
<a name="l00251"></a>00251    setPreviewMode( QFileDialog::Contents );
<a name="l00252"></a>00252    
<a name="l00253"></a>00253    <span class="comment">//create label and checkbox asking user if they want to</span>
<a name="l00254"></a>00254    <span class="comment">//set image descriptions from filenames</span>
<a name="l00255"></a>00255    <a class="code" href="classAddPhotosDialog.html#a97045556080874842dc414eacd5306ea" title="Checkbox asking if filenames should be used to set image descriptions.">setDescriptions</a> = <span class="keyword">new</span> QCheckBox( tr(<span class="stringliteral">&quot;Use filenames for descriptions.&quot;</span>), <span class="keyword">this</span> );
<a name="l00256"></a>00256    <a class="code" href="classAddPhotosDialog.html#a97045556080874842dc414eacd5306ea" title="Checkbox asking if filenames should be used to set image descriptions.">setDescriptions</a>-&gt;setChecked( <span class="keyword">false</span> );
<a name="l00257"></a>00257    addWidgets( NULL, <a class="code" href="classAddPhotosDialog.html#a97045556080874842dc414eacd5306ea" title="Checkbox asking if filenames should be used to set image descriptions.">setDescriptions</a>, NULL );
<a name="l00258"></a>00258 
<a name="l00259"></a>00259    <span class="comment">//set window description</span>
<a name="l00260"></a>00260   setCaption( tr(<span class="stringliteral">&quot;Add Photos&quot;</span>) );
<a name="l00261"></a>00261   
<a name="l00262"></a>00262   connect( <span class="keyword">this</span>, SIGNAL( fileHighlighted(<span class="keyword">const</span> QString&amp;)),
<a name="l00263"></a>00263            <span class="keyword">this</span>, SLOT( <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&amp;)) );
}
</pre></div></p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ac65dc3e26f23e8db4fc50b53f281006b"></a><!-- doxytag: member="AddPhotosDialog::getFilenames" ref="ac65dc3e26f23e8db4fc50b53f281006b" args="(bool &amp;setDescriptions)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QStringList AddPhotosDialog::getFilenames </td>
          <td>(</td>
          <td class="paramtype">bool &amp;&nbsp;</td>
          <td class="paramname"> <em>setDescriptions</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>returns the list of selected filenames, while setting setDescritions to the state the checkbox was left in. </p>

<p>Definition at line <a class="el" href="addPhotosDialog_8cpp_source.html#l00265">265</a> of file <a class="el" href="addPhotosDialog_8cpp_source.html">addPhotosDialog.cpp</a>.</p>

<p>References <a class="el" href="addPhotosDialog_8h_source.html#l00101">setDescriptions</a>.</p>

<p>Referenced by <a class="el" href="subalbumWidget_8cpp_source.html#l00236">SubalbumWidget::addImageAction()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00266"></a>00266 {
<a name="l00267"></a>00267   <span class="keywordflow">if</span>( exec() == QDialog::Accepted )
<a name="l00268"></a>00268   {
<a name="l00269"></a>00269     setDescriptionsBool = <a class="code" href="classAddPhotosDialog.html#a97045556080874842dc414eacd5306ea" title="Checkbox asking if filenames should be used to set image descriptions.">setDescriptions</a>-&gt;isChecked();
<a name="l00270"></a>00270     <span class="keywordflow">return</span> selectedFiles();
<a name="l00271"></a>00271   }
<a name="l00272"></a>00272   <span class="keywordflow">else</span> {  <span class="keywordflow">return</span> QStringList(); }
<a name="l00273"></a>00273 }
</pre></div></p>

</div>
</div>
<a class="anchor" id="aa264f1c88fd5aa219c5de8c177d7ef5a"></a><!-- doxytag: member="AddPhotosDialog::updatePreview" ref="aa264f1c88fd5aa219c5de8c177d7ef5a" args="(const QString &amp;filename)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void AddPhotosDialog::updatePreview </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>filename</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private, slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>handle the user selecting items by updating the file preview fields </p>

<p>Definition at line <a class="el" href="addPhotosDialog_8cpp_source.html#l00275">275</a> of file <a class="el" href="addPhotosDialog_8cpp_source.html">addPhotosDialog.cpp</a>.</p>

<p>References <a class="el" href="addPhotosDialog_8h_source.html#l00104">filePreview</a>, and <a class="el" href="addPhotosDialog_8cpp_source.html#l00226">FilePreview::updatePreview()</a>.</p>

<p>Referenced by <a class="el" href="addPhotosDialog_8cpp_source.html#l00238">AddPhotosDialog()</a>.</p>

<p><div class="fragment"><pre class="fragment"><a name="l00276"></a>00276 {
<a name="l00277"></a>00277   <a class="code" href="classAddPhotosDialog.html#a437577da2a4b0c1948527663af70ee88" title="Used to preview selected files.">filePreview</a>-&gt;<a class="code" href="classFilePreview.html#adeef143a0e947ab5a45835e1a3062602" title="call this function to update the file preview">updatePreview</a>( filename ); 
<a name="l00278"></a>00278 }
</pre></div></p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a437577da2a4b0c1948527663af70ee88"></a><!-- doxytag: member="AddPhotosDialog::filePreview" ref="a437577da2a4b0c1948527663af70ee88" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classFilePreview.html">FilePreview</a>* <a class="el" href="classAddPhotosDialog.html#a437577da2a4b0c1948527663af70ee88">AddPhotosDialog::filePreview</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Used to preview selected files. </p>

<p>Definition at line <a class="el" href="addPhotosDialog_8h_source.html#l00104">104</a> of file <a class="el" href="addPhotosDialog_8h_source.html">addPhotosDialog.h</a>.</p>

<p>Referenced by <a class="el" href="addPhotosDialog_8cpp_source.html#l00238">AddPhotosDialog()</a>, and <a class="el" href="addPhotosDialog_8cpp_source.html#l00275">updatePreview()</a>.</p>

</div>
</div>
<a class="anchor" id="a97045556080874842dc414eacd5306ea"></a><!-- doxytag: member="AddPhotosDialog::setDescriptions" ref="a97045556080874842dc414eacd5306ea" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QCheckBox* <a class="el" href="classAddPhotosDialog.html#a97045556080874842dc414eacd5306ea">AddPhotosDialog::setDescriptions</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Checkbox asking if filenames should be used to set image descriptions. </p>

<p>Definition at line <a class="el" href="addPhotosDialog_8h_source.html#l00101">101</a> of file <a class="el" href="addPhotosDialog_8h_source.html">addPhotosDialog.h</a>.</p>

<p>Referenced by <a class="el" href="addPhotosDialog_8cpp_source.html#l00238">AddPhotosDialog()</a>, and <a class="el" href="addPhotosDialog_8cpp_source.html#l00265">getFilenames()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="addPhotosDialog_8h_source.html">addPhotosDialog.h</a></li>
<li><a class="el" href="addPhotosDialog_8cpp_source.html">addPhotosDialog.cpp</a></li>
</ul>
</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>