1
/* ============================================================
3
* This file is a part of digiKam project
4
* http://www.digikam.org
7
* Description : Structures to use in AlbumDB
9
* Copyright (C) 2007-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10
* Copyright (C) 2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
12
* This program is free software; you can redistribute it
13
* and/or modify it under the terms of the GNU General
14
* Public License as published by the Free Software Foundation;
15
* either version 2, or (at your option)
18
* This program is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
23
* ============================================================ */
28
/** @file albuminfo.h */
42
#include "databaseconstants.h"
47
typedef QPair<int, int> YearMonth;
50
* \class AlbumRootInfo
56
AlbumRootInfo() : id(0), type(AlbumRoot::UndefinedType), status(0) {};
66
// --------------------------------------------------------------------------
70
* A container class for transporting album information
71
* from the database to AlbumManager
77
AlbumInfo() : id(0), albumRootId(0), iconAlbumRootId(0) {};
79
typedef QList<AlbumInfo> List;
93
QString iconRelativePath;
98
bool operator<(const AlbumInfo& info) const
100
// include album root id?
101
return relativePath < info.relativePath;
105
// --------------------------------------------------------------------------
109
* A container class for transporting tag information
110
* from the database to AlbumManager
116
TagInfo() : id(0), pid(0), iconAlbumRootId(0) {};
118
typedef QList<TagInfo> List;
130
QString iconRelativePath;
132
bool operator<(const TagInfo& info) const
134
return name < info.name;
138
// --------------------------------------------------------------------------
142
* A container class for transporting search information
143
* from the database to AlbumManager
149
SearchInfo() : id(0), type(DatabaseSearch::UndefinedType) {};
151
typedef QList<SearchInfo> List;
160
DatabaseSearch::Type type;
166
bool operator<(const SearchInfo& info) const
172
// --------------------------------------------------------------------------
178
AlbumShortInfo() : id(0), albumRootId(0) {};
186
QString relativePath;
190
// --------------------------------------------------------------------------
196
TagShortInfo() : id(0), pid(0) {};
208
// --------------------------------------------------------------------------
214
ItemShortInfo() : id(0), albumID(0), albumRootID(0) {};
228
// --------------------------------------------------------------------------
235
: id(0), albumID(0), status(DatabaseItem::UndefinedStatus),
236
category(DatabaseItem::UndefinedCategory), fileSize(0)
247
DatabaseItem::Status status;
248
DatabaseItem::Category category;
249
QDateTime modificationDate;
254
// --------------------------------------------------------------------------
260
CommentInfo() : id(-1), imageId(-1), type(DatabaseComment::UndefinedType) {};
269
DatabaseComment::Type type;
276
// --------------------------------------------------------------------------
282
CopyrightInfo() : id(-1) {};
295
// --------------------------------------------------------------------------
297
class ImageHistoryEntry
301
ImageHistoryEntry() : imageId(0) {};
313
// --------------------------------------------------------------------------
319
ImageRelation() : subjectId(0), objectId(0), type(DatabaseRelation::UndefinedType) {}
323
DatabaseRelation::Type type;
326
// --------------------------------------------------------------------------
332
TagProperty() : tagId(-1) {};
344
// --------------------------------------------------------------------------
346
class ImageTagProperty
350
ImageTagProperty() : imageId(-1), tagId(-1) {};
354
return imageId == -1;
363
} // namespace Digikam
365
#endif /* ALBUMINFO_H */