Debian Codegraph @

core/dplugins/generic/tools/jalbum/generator/jalbumsettings.h

raw
1 /* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2006-04-04
7 * Description : a tool to generate jAlbum image galleries
8 *
9 * SPDX-FileCopyrightText: 2013-2019 by Andrew Goodbody <ajg zero two at elfringham dot co dot uk>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15 #pragma once
16
17 // Qt includes
18
19 #include <QList>
20 #include <QUrl>
21 #include <QDebug>
22
23 // Local includes
24
25 #include "dinfointerface.h"
26
27 using namespace Digikam;
28
29 class KConfigGroup;
30
31 namespace DigikamGenericJAlbumPlugin
32 {
33
34 /**
35 * This class stores all the export settings. It is initialized by the
36 * Wizard and read by the Generator.
37 */
38 class JAlbumSettings
39 {
40 public:
41
42 enum ImageGetOption
43 {
44 ALBUMS = 0,
45 IMAGES
46 };
47
48 public:
49
50 explicit JAlbumSettings(DInfoInterface* const iface = nullptr);
51 ~JAlbumSettings() = default;
52
53 /**
54 * Read and write settings in config file between sessions.
55 */
56 void readSettings(const KConfigGroup& group);
57 void writeSettings(KConfigGroup& group);
58
59 public:
60
61 QString m_destPath;
62 QString m_jalbumPath; ///< jAlbum java archive path.
63 QString m_javaPath; ///< Java executable path.
64 QString m_imageSelectionTitle; ///< Jalbum title to use for JAlbumSettings::ImageGetOption::IMAGES selection.
65
66 ImageGetOption m_getOption = IMAGES; ///< Type of image selection (albums or images list).
67
68 DInfoInterface::DAlbumIDs m_albumList; ///< Albums list for ImageGetOption::ALBUMS selection.
69
70 QList<QUrl> m_imageList; ///< Images list for ImageGetOption::IMAGES selection.
71
72 DInfoInterface* m_iface = nullptr; ///< Interface to handle items information.
73 };
74
75 //! qDebug() stream operator. Writes property @a t to the debug output in a nicely formatted way.
76 QDebug operator<<(QDebug dbg, const JAlbumSettings& t);
77
78 } // namespace DigikamGenericJAlbumPlugin