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 typedef QPair<int, int> YearMonth;
00044
00045 namespace AlbumRoot
00046 {
00047 enum Type
00048 {
00049
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
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
00198 UndefinedStatus = 0,
00199 Visible = 1,
00200 Hidden = 2,
00201 Removed = 3
00202 };
00203
00204 enum Category
00205 {
00206
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
00256 UndefinedType = 0,
00264 Comment = 1,
00266 Headline = 2,
00268 Title = 3
00269
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 }
00305
00306 #endif