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

digikam

albuminfo.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        : 2007-04-21
00007  * Description : Structures for use in AlbumDB
00008  *
00009  * Copyright (C) 2007-2009 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
00010  * Copyright (C) 2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
00011  *
00012  * This program is free software; you can redistribute it
00013  * and/or modify it under the terms of the GNU General
00014  * Public License as published by the Free Software Foundation;
00015  * either version 2, or (at your option)
00016  * any later version.
00017  *
00018  * This program is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.
00022  *
00023  * ============================================================ */
00024 
00025 #ifndef ALBUMINFO_H
00026 #define ALBUMINFO_H
00027 
00030 // Qt includes
00031 
00032 #include <QString>
00033 #include <QList>
00034 #include <QDateTime>
00035 
00036 // KDE includes
00037 
00038 #include <kurl.h>
00039 
00040 namespace Digikam
00041 {
00042 
00043 typedef QPair<int, int> YearMonth;
00044 
00045 namespace AlbumRoot
00046 {
00047     enum Type
00048     {
00049         // Keep values constant
00050         UndefinedType   = 0,
00051         VolumeHardWired = 1,
00052         VolumeRemovable = 2,
00053         Network         = 3
00054     };
00055 }
00056 
00060 class AlbumRootInfo
00061 {
00062 public:
00063 
00064     AlbumRootInfo() : id(0), type(AlbumRoot::UndefinedType) {};
00065 
00066     int             id;
00067     QString         label;
00068     AlbumRoot::Type type;
00069     int             status;
00070     QString         identifier;
00071     QString         specificPath;
00072 };
00073 
00079 class AlbumInfo
00080 {
00081 public:
00082 
00083     AlbumInfo() : id(0), iconAlbumRootId(0) {};
00084 
00085     typedef QList<AlbumInfo> List;
00086 
00087     bool isNull() { return id == 0; }
00088 
00089     int     id;
00090     int     albumRootId;
00091     QString relativePath;
00092     QString caption;
00093     QString category;
00094     QDate   date;
00095     int     iconAlbumRootId;
00096     QString iconRelativePath;
00097 
00101     bool operator<(const AlbumInfo& info) const
00102     {
00103         // include album root id?
00104         return relativePath < info.relativePath;
00105     }
00106 };
00107 
00113 class TagInfo
00114 {
00115 public:
00116 
00117     TagInfo() : id(0), pid(0), iconAlbumRootId(0) {};
00118 
00119     typedef QList<TagInfo> List;
00120 
00121     bool isNull() { return id == 0; }
00122 
00123     int     id;
00124     int     pid;
00125     QString name;
00126     QString icon;
00127     int     iconAlbumRootId;
00128     QString iconRelativePath;
00129 
00130     bool operator<(const TagInfo& info) const
00131     {
00132         return name < info.name;
00133     }
00134 };
00135 
00136 namespace DatabaseSearch
00137 {
00138     enum Type
00139     {
00140         UndefinedType,
00141         KeywordSearch,
00142         AdvancedSearch,
00143         LegacyUrlSearch,
00144         TimeLineSearch,
00145         HaarSearch,
00146         MapSearch,
00147         DuplicatesSearch
00148     };
00149 }
00150 
00156 class SearchInfo
00157 {
00158 public:
00159 
00160     SearchInfo() : id(0), type(DatabaseSearch::UndefinedType) {};
00161 
00162     typedef QList<SearchInfo> List;
00163 
00164     bool isNull() { return id == 0; }
00165 
00166     int                  id;
00167     QString              name;
00168     DatabaseSearch::Type type;
00169     QString              query;
00170 
00174     bool operator<(const SearchInfo& info) const
00175     {
00176         return id < info.id;
00177     }
00178 };
00179 
00180 class AlbumShortInfo
00181 {
00182 public:
00183 
00184     AlbumShortInfo() : id(0) {};
00185 
00186     bool isNull() { return id == 0; }
00187 
00188     int         id;
00189     QString     relativePath;
00190     int         albumRootId;
00191 };
00192 
00193 namespace DatabaseItem
00194 {
00195     enum Status
00196     {
00197         // Keep values constant
00198         UndefinedStatus = 0,
00199         Visible         = 1,
00200         Hidden          = 2,
00201         Removed         = 3
00202     };
00203 
00204     enum Category
00205     {
00206         // Keep values constant
00207         UndefinedCategory = 0,
00208         Image             = 1,
00209         Video             = 2,
00210         Audio             = 3,
00211         Other             = 4
00212     };
00213 }
00214 
00215 class ItemShortInfo
00216 {
00217 public:
00218 
00219     ItemShortInfo() : id(0), albumID(0) {};
00220 
00221     bool isNull() { return id == 0; }
00222 
00223     qlonglong id;
00224     QString   itemName;
00225     int       albumID;
00226     int       albumRootID;
00227     QString   album;
00228 };
00229 
00230 class ItemScanInfo
00231 {
00232 public:
00233 
00234     ItemScanInfo()
00235         : id(0), albumID(0), status(DatabaseItem::UndefinedStatus),
00236           category(DatabaseItem::UndefinedCategory)
00237     {};
00238 
00239     bool isNull() { return id == 0; }
00240 
00241     qlonglong              id;
00242     int                    albumID;
00243     QString                itemName;
00244     DatabaseItem::Status   status;
00245     DatabaseItem::Category category;
00246     QDateTime              modificationDate;
00247     QString                uniqueHash;
00248 };
00249 
00250 namespace DatabaseComment
00251 {
00252     enum Type
00253     {
00254         // Keep values constant
00256         UndefinedType   = 0,
00264         Comment         = 1,
00266         Headline        = 2,
00268         Title           = 3
00269         // Feel free to add here any more types that you need!
00270     };
00271 }
00272 
00273 class CommentInfo
00274 {
00275 public:
00276 
00277     CommentInfo() : id(-1), imageId(-1), type(DatabaseComment::UndefinedType) {};
00278 
00279     bool isNull() { return id == -1; }
00280 
00281     int                   id;
00282     qlonglong             imageId;
00283     DatabaseComment::Type type;
00284     QString               author;
00285     QString               language;
00286     QDateTime             date;
00287     QString               comment;
00288 };
00289 
00290 class CopyrightInfo
00291 {
00292 public:
00293 
00294     CopyrightInfo() : id(-1) {};
00295 
00296     bool isNull() { return id == -1; }
00297 
00298     qlonglong id;
00299     QString   property;
00300     QString   value;
00301     QString   extraValue;
00302 };
00303 
00304 }  // namespace Digikam
00305 
00306 #endif /* ALBUMINFO_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