digikam
albuminfo.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef ALBUMINFO_H
00026 #define ALBUMINFO_H
00027
00030
00031
00032 #include <QString>
00033 #include <QList>
00034 #include <QDateTime>
00035
00036
00037
00038 #include <kurl.h>
00039
00040 namespace Digikam
00041 {
00042
00043 namespace AlbumRoot
00044 {
00045 enum Type
00046 {
00047
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
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
00188 UndefinedStatus = 0,
00189 Visible = 1,
00190 Hidden = 2,
00191 Removed = 3
00192 };
00193
00194 enum Category
00195 {
00196
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
00242 UndefinedType = 0,
00250 Comment = 1,
00252 Headline = 2,
00254 Title = 3
00255
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 }
00287
00288 #endif