digiKam
dsavesettingswidget.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 : 2006-09-13
7  * Description : a widget to provide options to save image.
8  *
9  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * ============================================================ */
22 
23 #ifndef DIGIKAM_DSAVE_SETTINGS_WIDGET_H
24 #define DIGIKAM_DSAVE_SETTINGS_WIDGET_H
25 
26 // Qt includes
27 
28 #include <QWidget>
29 
30 // Local includes
31 
32 #include "digikam_export.h"
33 #include "filesaveconflictbox.h"
34 
35 class KConfigGroup;
36 
37 namespace Digikam
38 {
39 
40 class DIGIKAM_EXPORT DSaveSettingsWidget : public QWidget
41 {
42  Q_OBJECT
43 
44 public:
45 
47  {
48  OUTPUT_PNG = 0,
51  OUTPUT_PPM
52  };
53 
54 public:
55 
56  explicit DSaveSettingsWidget(QWidget* const parent);
57  ~DSaveSettingsWidget() override;
58 
59 public:
60 
61  void setCustomSettingsWidget(QWidget* const custom);
62 
63  OutputFormat fileFormat() const;
64  void setFileFormat(OutputFormat f);
65 
66  FileSaveConflictBox::ConflictRule conflictRule() const;
67  void setConflictRule(FileSaveConflictBox::ConflictRule r);
68 
69  QString extension() const;
70  QString typeMime() const;
71 
72  void resetToDefault();
73 
74  void readSettings(KConfigGroup& group);
75  void writeSettings(KConfigGroup& group);
76 
77  static QString extensionForFormat(OutputFormat format);
78 
79 public Q_SLOTS:
80 
81  void slotPopulateImageFormat(bool sixteenBits);
82 
83 Q_SIGNALS:
84 
87 
88 private:
89 
90  class Private;
91  Private* const d;
92 };
93 
94 } // namespace Digikam
95 
96 #endif // DIGIKAM_DSAVE_SETTINGS_WIDGET_H
Definition: dsavesettingswidget.h:41
OutputFormat
Definition: dsavesettingswidget.h:47
@ OUTPUT_JPEG
Definition: dsavesettingswidget.h:50
@ OUTPUT_TIFF
Definition: dsavesettingswidget.h:49
ConflictRule
Definition: filesaveconflictbox.h:46
Definition: datefolderview.cpp:43