File indexing completed on 2025-01-05 03:52:07

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2006-04-04
0007  * Description : a tool to generate jAlbum image galleries
0008  *
0009  * SPDX-FileCopyrightText: 2013-2019 by Andrew Goodbody <ajg zero two at elfringham dot co dot uk>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_JALBUM_SETTINGS_H
0016 #define DIGIKAM_JALBUM_SETTINGS_H
0017 
0018 // Qt includes
0019 
0020 #include <QList>
0021 #include <QUrl>
0022 #include <QDebug>
0023 
0024 // Local includes
0025 
0026 #include "dinfointerface.h"
0027 
0028 using namespace Digikam;
0029 
0030 class KConfigGroup;
0031 
0032 namespace DigikamGenericJAlbumPlugin
0033 {
0034 
0035 /**
0036  * This class stores all the export settings. It is initialized by the
0037  * Wizard and read by the Generator.
0038  */
0039 class JAlbumSettings
0040 {
0041 public:
0042 
0043     enum ImageGetOption
0044     {
0045         ALBUMS = 0,
0046         IMAGES
0047     };
0048 
0049 public:
0050 
0051     explicit JAlbumSettings(DInfoInterface* const iface = nullptr);
0052     ~JAlbumSettings();
0053 
0054     // Read and write settings in config file between sessions.
0055     void  readSettings(KConfigGroup& group);
0056     void  writeSettings(KConfigGroup& group);
0057 
0058 public:
0059 
0060     QString                   m_destPath;
0061     QString                   m_jalbumPath;          // jAlbum java archive path.
0062     QString                   m_javaPath;            // Java executable path.
0063     QString                   m_imageSelectionTitle; // Jalbum title to use for JAlbumSettings::ImageGetOption::IMAGES selection.
0064 
0065     ImageGetOption            m_getOption;           // Type of image selection (albums or images list).
0066 
0067     DInfoInterface::DAlbumIDs m_albumList;           // Albums list for ImageGetOption::ALBUMS selection.
0068 
0069     QList<QUrl>               m_imageList;           // Images list for ImageGetOption::IMAGES selection.
0070 
0071     DInfoInterface*           m_iface;               // Interface to handle items information.
0072 };
0073 
0074 //! qDebug() stream operator. Writes property @a t to the debug output in a nicely formatted way.
0075 QDebug operator<<(QDebug dbg, const JAlbumSettings& t);
0076 
0077 } // namespace DigikamGenericJAlbumPlugin
0078 
0079 #endif // DIGIKAM_JALBUM_SETTINGS_H