1 /* ============================================================
2  * Date        : 2010-07-07
3  * Description : Save location settings dialog.
4  *
5  * SPDX-FileCopyrightText: 2008-2012 Kåre Särs <kare.sars@iki .fi>
6  * SPDX-FileCopyrightText: 2014 Gregor Mitsch : port to KDE5 frameworks
7  *
8  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
9  *
10  * ============================================================ */
11 
12 #ifndef SAVE_LOCATION_H
13 #define SAVE_LOCATION_H
14 
15 #include <QDialog>
16 
17 class Ui_SaveLocation;
18 class QShowEvent;
19 
20 class SaveLocation : public QDialog
21 {
22     Q_OBJECT
23 public:
24     explicit SaveLocation(QWidget *parent = nullptr);
25     ~SaveLocation() override;
26 
27     QUrl folderUrl() const;
28     QString imagePrefix() const;
29     QString imageMimetype() const;
30     QString imageSuffix() const;
31     int startNumber() const;
32     int startNumberMax() const;
33 
34     void setFolderUrl(const QUrl &url);
35     void setImagePrefix(const QString &prefix);
36     void setImageFormat(const QString &suffix);
37     void setImageFormatIndex(int index);
38     void addImageFormat(const QString &type, const QString &mimetype);
39     void setStartNumber(int number);
40 
41     void setOpenRequesterOnShow(bool open);
42 
43 protected:
44     void showEvent(QShowEvent *event) override;
45 
46 private Q_SLOTS:
47     void updateGui();
48 
49 private:
50     Ui_SaveLocation *m_ui = nullptr;
51     bool m_openRequesterOnShow = false;
52 };
53 
54 #endif
55 
56