• Skip to content
  • Skip to link menu
KDE 4.2 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 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 namespace AlbumRoot
00044 {
00045     enum Type
00046     {
00047         // Keep values constant
00048         UndefinedType   = 0,
00049         VolumeHardWired = 1,
00050         VolumeRemovable = 2,
00051         Network         = 3
00052     };
00053 }
00054 
00058 class AlbumRootInfo
00059 {
00060 public:
00061 
00062     AlbumRootInfo() : id(0), type(AlbumRoot::UndefinedType) {};
00063 
00064     int id;
00065     QString label;
00066     AlbumRoot::Type type;
00067     int status;
00068     QString identifier;
00069     QString specificPath;
00070 };
00071 
00077 class AlbumInfo
00078 {
00079 public:
00080 
00081     AlbumInfo() : id(0), iconAlbumRootId(0) {};
00082 
00083     typedef QList<AlbumInfo> List;
00084 
00085     int      id;
00086     int      albumRootId;
00087     QString  relativePath;
00088     QString  caption;
00089     QString  collection;
00090     QDate    date;
00091     int      iconAlbumRootId;
00092     QString  iconRelativePath;
00093 
00097     bool operator<(const AlbumInfo& info) const
00098     {
00099         // include album root id?
00100         return relativePath < info.relativePath;
00101     }
00102 };
00103 
00109 class TagInfo
00110 {
00111 public:
00112 
00113     TagInfo() : id(0), pid(0), iconAlbumRootId(0) {};
00114 
00115     typedef QList<TagInfo> List;
00116 
00117     int      id;
00118     int      pid;
00119     QString  name;
00120     QString  icon;
00121     int      iconAlbumRootId;
00122     QString  iconRelativePath;
00123 
00124     bool operator<(const TagInfo& info) const
00125     {
00126         return name < info.name;
00127     }
00128 };
00129 
00130 namespace DatabaseSearch
00131 {
00132     enum Type
00133     {
00134         UndefinedType,
00135         KeywordSearch,
00136         AdvancedSearch,
00137         LegacyUrlSearch,
00138         TimeLineSearch,
00139         HaarSearch,
00140         MapSearch,
00141         DuplicatesSearch
00142     };
00143 }
00144 
00150 class SearchInfo
00151 {
00152 public:
00153 
00154     SearchInfo() : id(0), type(DatabaseSearch::UndefinedType) {};
00155 
00156     typedef QList<SearchInfo> List;
00157 
00158     int                  id;
00159     QString              name;
00160     DatabaseSearch::Type type;
00161     QString              query;
00162 
00166     bool operator<(const SearchInfo& info) const
00167     {
00168         return id < info.id;
00169     }
00170 };
00171 
00172 class AlbumShortInfo
00173 {
00174 public:
00175 
00176     AlbumShortInfo() : id(0) {};
00177 
00178     int         id;
00179     QString     relativePath;
00180     int         albumRootId;
00181 };
00182 
00183 namespace DatabaseItem
00184 {
00185     enum Status
00186     {
00187         // Keep values constant
00188         UndefinedStatus = 0,
00189         Visible         = 1,
00190         Hidden          = 2,
00191         Removed         = 3
00192     };
00193 
00194     enum Category
00195     {
00196         // Keep values constant
00197         UndefinedCategory = 0,
00198         Image             = 1,
00199         Video             = 2,
00200         Audio             = 3,
00201         Other             = 4
00202     };
00203 }
00204 
00205 class ItemShortInfo
00206 {
00207 public:
00208 
00209     ItemShortInfo() : id(0), albumID(0) {};
00210 
00211     qlonglong   id;
00212     QString     itemName;
00213     int         albumID;
00214     int         albumRootID;
00215     QString     album;
00216 };
00217 
00218 class ItemScanInfo
00219 {
00220 public:
00221 
00222     ItemScanInfo()
00223         : id(0), albumID(0), status(DatabaseItem::UndefinedStatus),
00224           category(DatabaseItem::UndefinedCategory)
00225     {};
00226 
00227     qlonglong              id;
00228     int                    albumID;
00229     QString                itemName;
00230     DatabaseItem::Status   status;
00231     DatabaseItem::Category category;
00232     QDateTime              modificationDate;
00233     QString                uniqueHash;
00234 };
00235 
00236 namespace DatabaseComment
00237 {
00238     enum Type
00239     {
00240         // Keep values constant
00242         UndefinedType   = 0,
00250         Comment         = 1,
00252         Headline        = 2,
00254         Title           = 3
00255         // Feel free to add here any more types that you need!
00256     };
00257 }
00258 
00259 class CommentInfo
00260 {
00261 public:
00262 
00263     CommentInfo() : imageId(-1), type(DatabaseComment::UndefinedType) {};
00264 
00265     int                     id;
00266     qlonglong               imageId;
00267     DatabaseComment::Type   type;
00268     QString                 author;
00269     QString                 language;
00270     QDateTime               date;
00271     QString                 comment;
00272 };
00273 
00274 class CopyrightInfo
00275 {
00276 public:
00277 
00278     CopyrightInfo() : id(-1) {};
00279 
00280     qlonglong id;
00281     QString   property;
00282     QString   value;
00283     QString   extraValue;
00284 };
00285 
00286 }  // namespace Digikam
00287 
00288 #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.4
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