digiKam
camiteminfo.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2004-09-18
7  * Description : camera item info container
8  *
9  * Copyright (C) 2004-2005 by Renchi Raju <renchi dot raju at gmail dot com>
10  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
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)
16  * any later version.
17  *
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.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_CAMITEM_INFO_H
26 #define DIGIKAM_CAMITEM_INFO_H
27 
28 // Qt includes
29 
30 #include <QList>
31 #include <QByteArray>
32 #include <QDateTime>
33 #include <QDebug>
34 #include <QUrl>
35 
36 // Local includes
37 
38 #include "photoinfocontainer.h"
39 #include "videoinfocontainer.h"
40 #include "digikam_export.h"
41 
42 class QDataStream;
43 
44 namespace Digikam
45 {
46 
47 class DIGIKAM_GUI_EXPORT CamItemInfo
48 {
49 
50 public:
51 
53  {
54  DownloadUnknown = -1,
55  DownloadedNo = 0,
56  DownloadedYes = 1,
57  DownloadFailed = 2,
58  DownloadStarted = 3,
59  NewPicture = 4
60  };
61 
62 public:
63 
64  explicit CamItemInfo();
65  ~CamItemInfo();
66 
70  bool isNull() const;
71 
75  QUrl url() const;
76 
80  bool operator==(const CamItemInfo& info) const;
81 
85  bool operator!=(const CamItemInfo& info) const;
86 
87 public:
88 
90  qint64 size;
91 
92  int width;
93  int height;
96 
97  QString name;
98  QString folder;
99  QString mime;
100 
101  QDateTime ctime;
102 
104 
107  QString downloadName;
108 
110  qlonglong id;
111 
112  int rating;
113 
114  int pickLabel;
115 
117 
120 };
121 
122 QDataStream& operator<<(QDataStream&, const CamItemInfo&);
123 QDataStream& operator>>(QDataStream&, CamItemInfo&);
124 
126 
128 QDebug operator<<(QDebug dbg, const CamItemInfo& info);
129 
130 } // namespace Digikam
131 
132 #endif // DIGIKAM_CAMITEM_INFO_H
Definition: camiteminfo.h:48
qint64 size
Static values taken from camera.
Definition: camiteminfo.h:90
QString mime
Type mime of camera file.
Definition: camiteminfo.h:99
int writePermissions
Write permission of camera file.
Definition: camiteminfo.h:95
qlonglong id
Unique image id.
Definition: camiteminfo.h:110
int pickLabel
Pre-picklabel value of camera file.
Definition: camiteminfo.h:114
QList< int > tagIds
Pre-tags ids of camera file.
Definition: camiteminfo.h:118
QString name
File name in camera file-system.
Definition: camiteminfo.h:97
QString downloadName
New file-name to use during download from camera.
Definition: camiteminfo.h:107
int colorLabel
Pre-picklabel value of camera file.
Definition: camiteminfo.h:116
QDateTime ctime
Created time stamp of camera file.
Definition: camiteminfo.h:101
int readPermissions
Read permission of camera file.
Definition: camiteminfo.h:94
QString folder
Folder path to access to file in camera.
Definition: camiteminfo.h:98
int width
Image width in pixels.
Definition: camiteminfo.h:92
bool previewPossible
Definition: camiteminfo.h:119
int rating
Pre-rating value of camera file.
Definition: camiteminfo.h:112
int height
Image height in pixels.
Definition: camiteminfo.h:93
PhotoInfoContainer photoInfo
Photo Info from camera file (get from file metadata)
Definition: camiteminfo.h:103
int downloaded
Variable values depending of user actions.
Definition: camiteminfo.h:106
DownloadStatus
Definition: camiteminfo.h:53
Definition: photoinfocontainer.h:41
Definition: datefolderview.cpp:43
QDebug operator<<(QDebug dbg, const DbEngineParameters &p)
Definition: dbengineparameters.cpp:863
QDataStream & operator>>(QDataStream &ds, PhotoInfoContainer &info)
Definition: photoinfocontainer.cpp:117
QList< CamItemInfo > CamItemInfoList
Definition: camiteminfo.h:125
bool operator==(const SearchTextSettings &a, const SearchTextSettings &b)
Definition: searchtextbar.cpp:49