digiKam
Loading...
Searching...
No Matches
sharpsettings.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 : 2010-02-10
7 * Description : sharp settings view.
8 *
9 * SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Local includes
18
19#include <QWidget>
20
21// Local includes
22
23#include "digikam_export.h"
24
25class KConfigGroup;
26
27namespace Digikam
28{
29
30class DIGIKAM_EXPORT SharpContainer
31{
32
33public:
34
36 {
37 SimpleSharp = 0,
39 Refocus
40 };
41
42public:
43
44 SharpContainer() = default;
45 ~SharpContainer() = default;
46
47public:
48
49 int method = SimpleSharp;
50
52 int ssRadius = 0;
53
55 double umRadius = 1.0;
56 double umAmount = 1.0;
57 double umThreshold = 0.05;
58 bool umLumaOnly = false;
59
61 double rfRadius = 1.0;
62 double rfCorrelation = 0.5;
63 double rfNoise = 0.03;
64 double rfGauss = 0.0;
65 int rfMatrix = 5;
66};
67
68// -----------------------------------------------------------------------------------------------
69
70class DIGIKAM_EXPORT SharpSettings : public QWidget
71{
72 Q_OBJECT
73
74public:
75
76 explicit SharpSettings(QWidget* const parent);
77 ~SharpSettings() override;
78
79 SharpContainer defaultSettings() const;
80 void resetToDefault();
81
82 SharpContainer settings() const;
83 void setSettings(const SharpContainer& settings);
84
85 void readSettings(const KConfigGroup& group);
86 void writeSettings(KConfigGroup& group);
87
88 void loadSettings();
89 void saveAsSettings();
90
91Q_SIGNALS:
92
94
95private Q_SLOTS:
96
97 void slotSharpMethodChanged(int);
98
99private:
100
101 class Private;
102 Private* const d = nullptr;
103};
104
105} // namespace Digikam
Definition sharpsettings.h:31
SharpingMethods
Definition sharpsettings.h:36
@ UnsharpMask
Definition sharpsettings.h:38
Definition sharpsettings.h:71
Definition datefolderview.cpp:34