<!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: recentAlbums.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>recentAlbums.h</h1><a href="recentAlbums_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 BACKEND_RECENTALBUMS_H</span> <a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define BACKEND_RECENTALBUMS_H</span> <a name="l00013"></a>00013 <span class="preprocessor"></span> <a name="l00014"></a>00014 <span class="preprocessor">#include <qstringlist.h></span> <a name="l00015"></a>00015 <a name="l00016"></a>00016 <span class="comment">//--------------------</span> <a name="l00017"></a>00017 <span class="comment">//forward declarations</span> <a name="l00018"></a>00018 <span class="comment">//--------------------</span> <a name="l00019"></a>00019 <a name="l00020"></a>00020 <span class="comment">//=====================================</span> <a name="l00024"></a>00024 <span class="comment"></span><span class="comment">//=====================================</span> <a name="l00025"></a>00025 <a name="l00026"></a><a class="code" href="classRecentAlbums.html">00026</a> <span class="keyword">class </span><a class="code" href="classRecentAlbums.html" title="This class maintains and handles saving and loading a list of recently viewed albums...">RecentAlbums</a> <a name="l00027"></a>00027 { <a name="l00028"></a>00028 <span class="comment">//------------------------------------------------------</span> <a name="l00029"></a>00029 <span class="keyword">public</span>: <a name="l00030"></a>00030 <span class="comment">//constructs a recent albums object</span> <a name="l00031"></a>00031 <a class="code" href="classRecentAlbums.html#2b7d9ceef7bb8d10b0a844a0fed63a9e">RecentAlbums</a>(); <a name="l00032"></a>00032 <a name="l00033"></a>00033 <span class="comment">//clears listing of recent albums</span> <a name="l00034"></a>00034 <span class="keywordtype">void</span> <a class="code" href="classRecentAlbums.html#9c26ecee7fb362d2ab57d4f2d94697c1">clearList</a>(); <a name="l00035"></a>00035 <a name="l00036"></a>00036 <span class="comment">//returns the number of entries in the listing</span> <a name="l00037"></a>00037 <span class="keywordtype">int</span> <a class="code" href="classRecentAlbums.html#9317f48a9b255a663f8581dccd7871a1">numEntries</a>(); <a name="l00038"></a>00038 <a name="l00039"></a>00039 <span class="comment">//retunrs the max number of entries the listing will support</span> <a name="l00040"></a>00040 <span class="keywordtype">int</span> <a class="code" href="classRecentAlbums.html#294c4ca6e52cf3fd35e259b55d03eab9">getMaxItems</a>(); <a name="l00041"></a>00041 <a name="l00042"></a>00042 <span class="comment">//obtains entry from index</span> <a name="l00043"></a>00043 <span class="keywordtype">void</span> <a class="code" href="classRecentAlbums.html#42c965a7ddc3cd255c99489ce08ffd9f">getEntry</a> ( <span class="keywordtype">int</span> index, QString& name, <a name="l00044"></a>00044 QString& location, QString& photoCount ); <a name="l00045"></a>00045 <a name="l00046"></a>00046 <span class="comment">//inserts an album to the list, removes prior refferences if they </span> <a name="l00047"></a>00047 <span class="comment">//exists. if too many items are in list last item is removed.</span> <a name="l00048"></a>00048 <span class="keywordtype">void</span> <a class="code" href="classRecentAlbums.html#85a976a736d0b794f2469fd5029f495b">insertEntry</a> ( QString name, <a name="l00049"></a>00049 QString location, <a name="l00050"></a>00050 QString photos = <span class="stringliteral">"-1"</span>, <a name="l00051"></a>00051 <span class="keywordtype">bool</span> insertAtBack = <span class="keyword">true</span> ); <a name="l00052"></a>00052 <span class="comment">//------------------------------------------------------</span> <a name="l00053"></a>00053 <span class="keyword">private</span>: <a name="l00055"></a><a class="code" href="classRecentAlbums.html#3a385fc2e0091cdeb81ac006f8c9993f">00055</a> QStringList <a class="code" href="classRecentAlbums.html#3a385fc2e0091cdeb81ac006f8c9993f" title="lists of album names and locations">albumNames</a>; <a name="l00056"></a><a class="code" href="classRecentAlbums.html#cd530b6a335dfb33daed5d84eb148e8c">00056</a> QStringList <a class="code" href="classRecentAlbums.html#cd530b6a335dfb33daed5d84eb148e8c">albumLocations</a>; <a name="l00057"></a><a class="code" href="classRecentAlbums.html#6c5670926bda752b6133634c9b4fb563">00057</a> QStringList <a class="code" href="classRecentAlbums.html#6c5670926bda752b6133634c9b4fb563">albumPhotoCounts</a>; <a name="l00058"></a>00058 <a name="l00060"></a><a class="code" href="classRecentAlbums.html#9e817f14ffe9a73f810e4a0a0e97498b">00060</a> uint <a class="code" href="classRecentAlbums.html#9e817f14ffe9a73f810e4a0a0e97498b" title="max allowable items in list">maxItems</a>; <a name="l00061"></a>00061 <span class="comment">//------------------------------------------------------</span> <a name="l00062"></a>00062 }; <a name="l00063"></a>00063 <a name="l00064"></a>00064 <span class="preprocessor">#endif //BACKEND_RECENTALBUMS_H</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Sun Aug 23 02:34:27 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>