digiKam
Loading...
Searching...
No Matches
wssettings.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 : 2017-01-24
7 * Description : Web Service settings container.
8 *
9 * SPDX-FileCopyrightText: 2017-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2018 by Thanh Trung Dinh <dinhthanhtrung1996 at gmail dot com>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16#pragma once
17
18// Qt includes
19
20#include <QObject>
21#include <QtGlobal>
22#include <QList>
23#include <QString>
24#include <QStringList>
25#include <QUrl>
26#include <QMap>
27#include <QSettings>
28
29// Local includes
30
31#include "digikam_export.h"
32#include "o0settingsstore.h"
33
34class KConfigGroup;
35
36namespace Digikam
37{
38
39class DIGIKAM_EXPORT WSSettings : public QObject
40{
41 Q_OBJECT
42
43public:
44
47 {
48 EXPORT = 0,
49 IMPORT
50 };
51
53 {
54 FLICKR = 0,
60 GPHOTO
61 };
62
64 {
65 JPEG = 0,
66 PNG
67 };
68
69public:
70
71 explicit WSSettings(QObject* const parent = nullptr);
72 ~WSSettings() override;
73
76 void readSettings(const KConfigGroup& group);
77 void writeSettings(KConfigGroup& group);
79
80 QString format() const;
81
84 static QMap<WebService, QString> webServiceNames();
85 static QMap<ImageFormat, QString> imageFormatNames();
87
89 QStringList allUserNames(const QString& serviceName);
90
91public:
92
93 Selection selMode = EXPORT;
94
95 QList<QUrl> inputImages;
96
97 bool addFileProperties = false;
98 bool imagesChangeProp = false;
99
100 bool removeMetadata = false;
101
102 int imageCompression = 75;
103
104 qint64 attLimitInMbytes = 17;
105
106 WebService webService = FLICKR;
107
108 QString userName;
109
110 QSettings* oauthSettings = nullptr;
111 O0SettingsStore* oauthSettingsStore = nullptr;
112
114
115 int imageSize = 1024;
116
117 ImageFormat imageFormat = JPEG;
118
119 QMap<QUrl, QUrl> itemsList;
120};
121
122} // namespace Digikam
Definition wssettings.h:40
QMap< QUrl, QUrl > itemsList
Map of original item and attached item (can be resized).
Definition wssettings.h:119
QString currentAlbumId
Selected album to upload to.
Definition wssettings.h:113
WebService
Definition wssettings.h:53
@ SMUGMUG
Definition wssettings.h:58
@ DROPBOX
Definition wssettings.h:55
@ FACEBOOK
Definition wssettings.h:57
@ IMGUR
Definition wssettings.h:56
@ GDRIVE
Definition wssettings.h:59
ImageFormat
Definition wssettings.h:64
QList< QUrl > inputImages
Selected items to upload.
Definition wssettings.h:95
Selection
Images selection mode.
Definition wssettings.h:47
QString userName
Definition wssettings.h:108
Definition datefolderview.cpp:34