digiKam
smugitem.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 : 2008-12-01
7  * Description : a tool to export images to Smugmug web service
8  *
9  * Copyright (C) 2008-2009 by Luka Renko <lure at kubuntu dot org>
10  * Copyright (C) 2008-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  * Copyright (C) 2018 by Thanh Trung Dinh <dinhthanhtrung1996 at gmail dot com>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option) 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_SMUG_ITEM_H
26 #define DIGIKAM_SMUG_ITEM_H
27 
28 // Qt includes
29 
30 #include <QString>
31 
33 {
34 
35 class SmugUser
36 {
37 
38 public:
39 
40  explicit SmugUser()
41  : fileSizeLimit(0)
42  {
43  }
44 
45  void clear()
46  {
47  email.clear();
48  nickName.clear();
49  displayName.clear();
50  accountType.clear();
51  userUri.clear();
52  nodeUri.clear();
53  folderUri.clear();
54  fileSizeLimit = 0;
55  }
56 
57 public:
58 
59  QString email;
60  QString nickName;
61  QString displayName;
62  QString accountType;
63  QString userUri;
64  QString nodeUri;
65  QString folderUri;
67 };
68 
69 // ---------------------------------------------------------------------------------
70 
71 class SmugAlbum
72 {
73 
74 public:
75 
76  explicit SmugAlbum()
77  : id (-1),
78  categoryID (-1),
79  subCategoryID(-1),
80  isPublic (true),
81  canShare (true),
82  imageCount (0),
83  tmplID (-1)
84  {
85  }
86 
87 public:
88 
89  qint64 id;
90  QString nodeID;
91 
92  QString name;
93  QString key;
94  QString title;
95  QString description;
96  QString keywords;
97 
98  qint64 categoryID;
99  QString category;
100 
102  QString subCategory;
103 
104  bool isPublic;
105  QString password;
106  bool canShare;
107  QString passwordHint;
108 
110 
112  qint64 tmplID;
113  QString tmpl;
114 
115  static bool lessThan(SmugAlbum& a, SmugAlbum& b)
116  {
117  return a.title.toLower() < b.title.toLower();
118  }
119 };
120 
121 // ---------------------------------------------------------------------------------
122 
124 {
125 
126 public:
127 
128  explicit SmugPhoto()
129  : id(-1)
130  {
131  }
132 
133 public:
134 
135  qint64 id;
136 
137  QString key;
138  QString caption;
139  QString keywords;
140 
141  QString thumbURL;
142  QString originalURL;
143 };
144 
145 // ---------------------------------------------------------------------------------
146 
148 {
149 
150 public:
151 
152  explicit SmugAlbumTmpl()
153  : id(-1),
154  isPublic(true)
155  {
156  }
157 
158 public:
159 
160  qint64 id;
161  QString name;
162  QString uri;
163 
164  bool isPublic;
165  QString password;
166  QString passwordHint;
167 };
168 
169 // ---------------------------------------------------------------------------------
170 
172 {
173 
174 public:
175 
176  explicit SmugCategory()
177  : id(-1)
178  {
179  }
180 
181 public:
182 
183  qint64 id;
184  QString name;
185 };
186 
187 } // namespace DigikamGenericSmugPlugin
188 
189 #endif // DIGIKAM_SMUG_ITEM_H
Definition: smugitem.h:148
SmugAlbumTmpl()
Definition: smugitem.h:152
qint64 id
Definition: smugitem.h:160
QString uri
Definition: smugitem.h:162
bool isPublic
Definition: smugitem.h:164
QString passwordHint
Definition: smugitem.h:166
QString name
Definition: smugitem.h:161
QString password
Definition: smugitem.h:165
Definition: smugitem.h:72
QString subCategory
Definition: smugitem.h:102
QString password
Definition: smugitem.h:105
QString category
Definition: smugitem.h:99
QString key
Definition: smugitem.h:93
QString passwordHint
Definition: smugitem.h:107
QString nodeID
Definition: smugitem.h:90
qint64 tmplID
below fields only used by createAlbum (and not by listAlbums)
Definition: smugitem.h:112
QString tmpl
Definition: smugitem.h:113
QString title
Definition: smugitem.h:94
QString keywords
Definition: smugitem.h:96
qint64 categoryID
Definition: smugitem.h:98
SmugAlbum()
Definition: smugitem.h:76
bool isPublic
Definition: smugitem.h:104
qint64 subCategoryID
Definition: smugitem.h:101
qint64 id
Definition: smugitem.h:89
static bool lessThan(SmugAlbum &a, SmugAlbum &b)
Definition: smugitem.h:115
bool canShare
Definition: smugitem.h:106
QString name
Definition: smugitem.h:92
QString description
Definition: smugitem.h:95
int imageCount
Definition: smugitem.h:109
Definition: smugitem.h:172
SmugCategory()
Definition: smugitem.h:176
qint64 id
Definition: smugitem.h:183
QString name
Definition: smugitem.h:184
Definition: smugitem.h:124
QString thumbURL
Definition: smugitem.h:141
QString keywords
Definition: smugitem.h:139
qint64 id
Definition: smugitem.h:135
QString key
Definition: smugitem.h:137
QString caption
Definition: smugitem.h:138
QString originalURL
Definition: smugitem.h:142
SmugPhoto()
Definition: smugitem.h:128
Definition: smugitem.h:36
QString folderUri
Definition: smugitem.h:65
QString displayName
Definition: smugitem.h:61
void clear()
Definition: smugitem.h:45
QString accountType
Definition: smugitem.h:62
int fileSizeLimit
Definition: smugitem.h:66
QString email
Definition: smugitem.h:59
QString nodeUri
Definition: smugitem.h:64
QString userUri
Definition: smugitem.h:63
QString nickName
Definition: smugitem.h:60
SmugUser()
Definition: smugitem.h:40
Definition: smugitem.h:33