digiKam
yfalbum.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 : 2010-11-18
7  * Description : a tool to export items to YandexFotki web service
8  *
9  * Copyright (C) 2010 by Roman Tsisyk <roman at tsisyk dot com>
10  * Copyright (C) 2010-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) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_YF_ALBUM_H
25 #define DIGIKAM_YF_ALBUM_H
26 
27 // Qt includes
28 
29 #include <QObject>
30 #include <QString>
31 #include <QDateTime>
32 #include <QDebug>
33 
34 namespace DigikamGenericYFPlugin
35 {
36 
38 {
39 public:
40 
41  YandexFotkiAlbum() = default;
42  YandexFotkiAlbum(const YandexFotkiAlbum& other);
43  ~YandexFotkiAlbum() = default;
44 
46 
47 public:
48 
49  const QString& urn() const
50  {
51  return m_urn;
52  }
53 
54  const QString& author() const
55  {
56  return m_author;
57  }
58 
59  const QString& title() const
60  {
61  return m_title;
62  }
63 
64  void setTitle(const QString& title)
65  {
66  m_title = title;
67  }
68 
69  const QString& summary() const
70  {
71  return m_summary;
72  }
73 
74  void setSummary(const QString& summary)
75  {
76  m_summary = summary;
77  }
78 
79  const QDateTime& publishedDate() const
80  {
81  return m_publishedDate;
82  }
83 
84  const QDateTime& editedDate() const
85  {
86  return m_editedDate;
87  }
88 
89  const QDateTime& updatedDate() const
90  {
91  return m_updatedDate;
92  }
93 
94  bool isProtected() const
95  {
96  return !m_password.isNull();
97  }
98 
99  void setPassword(const QString& password)
100  {
101  m_password = password;
102  }
103 
104  QString toString() const
105  {
106  return m_title;
107  }
108 
109 protected:
110 
111  YandexFotkiAlbum(const QString& urn,
112  const QString& author,
113  const QString& title,
114  const QString& summary,
115  const QString& apiEditUrl,
116  const QString& apiSelfUrl,
117  const QString& apiPhotosUrl,
118  const QDateTime& publishedDate,
119  const QDateTime& editedDate,
120  const QDateTime& updatedDate,
121  const QString& password);
122 
123 private:
124 
125  QString m_urn;
126  QString m_author;
127  QString m_title;
128  QString m_summary;
129 
130  QString m_apiEditUrl;
131  QString m_apiSelfUrl;
132  QString m_apiPhotosUrl;
133 
134  QDateTime m_publishedDate;
135  QDateTime m_editedDate;
136  QDateTime m_updatedDate;
137 
138  QString m_password;
139 
140 private:
141 
142  friend class YFTalker;
143 
144  friend QDebug operator<<(QDebug d, const YandexFotkiAlbum& p);
145 };
146 
147 QDebug operator<<(QDebug d, const YandexFotkiAlbum& p);
148 
149 } // namespace DigikamGenericYFPlugin
150 
151 #endif // DIGIKAM_YF_ALBUM_H
Definition: yftalker.h:44
bool isProtected() const
Definition: yfalbum.h:94
const QString & summary() const
Definition: yfalbum.h:69
const QString & title() const
Definition: yfalbum.h:59
const QDateTime & editedDate() const
Definition: yfalbum.h:84
const QString & author() const
Definition: yfalbum.h:54
void setPassword(const QString &password)
Definition: yfalbum.h:99
YandexFotkiAlbum & operator=(const YandexFotkiAlbum &other)
Definition: yfalbum.cpp:71
const QDateTime & publishedDate() const
Definition: yfalbum.h:79
QString toString() const
Definition: yfalbum.h:104
void setSummary(const QString &summary)
Definition: yfalbum.h:74
const QString & urn() const
Definition: yfalbum.h:49
friend QDebug operator<<(QDebug d, const YandexFotkiAlbum &p)
Definition: yfalbum.cpp:88
const QDateTime & updatedDate() const
Definition: yfalbum.h:89
void setTitle(const QString &title)
Definition: yfalbum.h:64
Definition: yfalbum.cpp:27
QDebug operator<<(QDebug d, const YandexFotkiAlbum &a)
Definition: yfalbum.cpp:88