digiKam
vkontakte_groupinfo.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 : 2011-02-19
7  * Description : a tool to export images to VKontakte web service
8  *
9  * Copyright (C) 2011-2015 by Alexander Potashev <aspotashev at gmail dot com>
10  * Copyright (C) 2011-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_VKONTAKTE_GROUPINFO_H
25 #define DIGIKAM_VKONTAKTE_GROUPINFO_H
26 
27 // Qt includes
28 
29 #include <QSharedPointer>
30 
31 namespace Vkontakte
32 {
33 
34 // https://vk.com/dev/groups.get
35 class GroupInfo : public QObject
36 {
37  Q_OBJECT
38 
39  // gid
40  Q_PROPERTY(int gid WRITE setGid READ gid)
41 
42  // If "extended" was requested, then these fields will be also available:
43  // name, screen_name, is_closed, is_admin, photo, photo_medium, photo_big
44  Q_PROPERTY(QString name WRITE setName READ name)
45  Q_PROPERTY(QString screen_name WRITE setScreenName READ screenName)
46  Q_PROPERTY(bool is_closed WRITE setClosed READ isClosed)
47  Q_PROPERTY(bool is_admin WRITE setAdmin READ isAdmin)
48  Q_PROPERTY(QString photo WRITE setPhoto READ photo)
49  Q_PROPERTY(QString photo_medium WRITE setPhotoMedium READ photoMedium)
50  Q_PROPERTY(QString photo_big WRITE setPhotoBig READ photoBig)
51 
52 public:
53 
54  GroupInfo();
55  ~GroupInfo();
56 
57  void setGid(int gid);
58  int gid() const;
59 
60  void setName(const QString& name);
61  QString name() const;
62 
63  void setScreenName(const QString& screenName);
64  QString screenName() const;
65 
66  void setClosed(bool closed);
67  bool isClosed() const;
68 
69  void setAdmin(bool admin);
70  bool isAdmin() const;
71 
72  void setPhoto(const QString& photo);
73  QString photo() const;
74 
75  void setPhotoMedium(const QString& photoMedium);
76  QString photoMedium() const;
77 
78  void setPhotoBig(const QString& photoBig);
79  QString photoBig() const;
80 
81 private:
82 
83  class Private;
84  Private* const d;
85 };
86 
87 typedef QSharedPointer<GroupInfo> GroupInfoPtr;
88 
89 } // namespace Vkontakte
90 
91 #endif // DIGIKAM_VKONTAKTE_GROUPINFO_H