• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

digikam

albumlister.h

Go to the documentation of this file.
00001 /* ============================================================
00002  *
00003  * This file is a part of digiKam project
00004  * http://www.digikam.org
00005  *
00006  * Date        : 2004-06-26
00007  * Description : Albums lister. 
00008  *
00009  * Copyright (C) 2004-2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
00010  * Copyright (C) 2007-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
00011  * Copyright (C) 2007 by Arnd Baecker <arnd dot baecker at web dot de> 
00012  *
00013  * This program is free software; you can redistribute it
00014  * and/or modify it under the terms of the GNU General
00015  * Public License as published by the Free Software Foundation;
00016  * either version 2, or (at your option)
00017  * any later version.
00018  *
00019  * This program is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  * GNU General Public License for more details.
00023  *
00024  * ============================================================ */
00025 
00026 #ifndef ALBUMLISTER_H
00027 #define ALBUMLISTER_H
00028 
00031 // Qt includes
00032 
00033 #include <QString>
00034 #include <QObject>
00035 #include <QByteArray>
00036 #include <QDateTime>
00037 #include <QList>
00038 
00039 // Local includes
00040 
00041 #include "searchtextbar.h"
00042 #include "imageinfo.h"
00043 
00044 namespace KIO
00045 {
00046 class Job;
00047 }
00048 class KJob;
00049 
00050 namespace Digikam
00051 {
00052 
00053 class ImageChangeset;
00054 class ImageTagChangeset;
00055 class CollectionImageChangeset;
00056 class SearchChangeset;
00057 class Album;
00058 class AlbumListerPriv;
00059 
00069 class AlbumLister : public QObject
00070 {
00071     Q_OBJECT
00072 
00073 public:
00074 
00078     enum MatchingCondition
00079     {
00080         OrCondition = 0,
00081         AndCondition
00082     };
00083 
00087     enum RatingCondition
00088     {
00089         GreaterEqualCondition = 0,
00090         EqualCondition,
00091         LessEqualCondition
00092     };
00093 
00094 public:
00095 
00096     static AlbumLister* instance();
00097     static void cleanUp();
00098 
00099     ~AlbumLister();
00100 
00104     void openAlbum(Album *album);
00105     void stop();
00106 
00110     void refresh();
00111 
00112     void setDayFilter(const QList<QDateTime>& days);
00113 
00114     void setTagFilter(const QList<int>& tags, const MatchingCondition& matchingCond,
00115                       bool showUnTagged=false);
00116 
00117     void setRatingFilter(int rating, const RatingCondition& ratingCond);
00118 
00119     void setMimeTypeFilter(int mimeTypeFilter);
00120 
00121     void setTextFilter(const SearchTextSettings& settings);
00122 
00123     void setRecurseAlbums(bool recursive);
00124     void setRecurseTags(bool recursive);
00125 
00130     void invalidateItem(const ImageInfo& item);
00131 
00132     bool tagFiltersIsActive();
00133     bool filterIsActive();
00134 
00135 Q_SIGNALS:
00136 
00137     void signalNewItems(const ImageInfoList& items);
00138     void signalDeleteItem(const ImageInfo& item);
00139     void signalNewFilteredItems(const ImageInfoList& items);
00140     void signalDeleteFilteredItem(const ImageInfo& item);
00141     void signalClear();
00142     void signalCompleted();
00143     void signalItemsTextFilterMatch(bool);
00144     void signalItemsFilterMatch(bool);
00145 
00146 private Q_SLOTS:
00147 
00148     void slotFilterItems();
00149 
00150     void slotResult(KJob* job);
00151     void slotData(KIO::Job* job, const QByteArray& data);
00152 
00153     void slotNextRefresh();
00154     void slotImageChange(const ImageChangeset& changeset);
00155     void slotImageTagChange(const ImageTagChangeset& changeset);
00156     void slotCollectionImageChange(const CollectionImageChangeset& changeset);
00157     void slotSearchChange(const SearchChangeset& changeset);
00158 
00159 private:
00160 
00161     AlbumLister();
00162     bool matchesFilter(const ImageInfo& info, bool& foundText);
00163     void startListJob(const KUrl& url);
00164 
00165 private:
00166 
00167     AlbumListerPriv* const d;
00168 
00169     static AlbumLister *m_instance;
00170 };
00171 
00172 }  // namespace Digikam
00173 
00174 #endif /* ALBUMLISTER_H */

digikam

Skip menu "digikam"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • digikam
Generated for API Reference by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal