digiKam
adjustlevelstool.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 : 2004-07-20
7  * Description : image histogram adjust levels.
8  *
9  * Copyright (C) 2004-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)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_EDITOR_ADJUST_LEVELS_TOOL_H
25 #define DIGIKAM_EDITOR_ADJUST_LEVELS_TOOL_H
26 
27 // Local includes
28 
29 #include "editortool.h"
30 #include "dcolor.h"
31 
32 using namespace Digikam;
33 
35 {
36 
38 {
39  Q_OBJECT
40 
41 public:
42 
43  explicit AdjustLevelsTool(QObject* const parent);
44  ~AdjustLevelsTool() override;
45 
46 private Q_SLOTS:
47 
48  void slotSaveAsSettings() override;
49  void slotLoadSettings() override;
50  void slotResetSettings() override;
51  void slotResetCurrentChannel();
52  void slotAutoLevels();
53  void slotChannelChanged() override;
54  void slotScaleChanged() override;
55  void slotAdjustSliders();
56  void slotGammaInputchanged(double val);
57  void slotAdjustMinInputSpinBox(double val);
58  void slotAdjustMaxInputSpinBox(double val);
59  void slotAdjustMinOutputSpinBox(double val);
60  void slotAdjustMaxOutputSpinBox(double val);
61  void slotSpotColorChanged(const Digikam::DColor& color);
62  void slotColorSelectedFromTarget(const Digikam::DColor& color);
63  void slotPickerColorButtonActived(int);
64  void slotShowInputHistogramGuide(double v);
65  void slotShowOutputHistogramGuide(double v);
66 
67 private:
68 
69  void readSettings() override;
70  void writeSettings() override;
71  void preparePreview() override;
72  void prepareFinal() override;
73  void abortPreview();
74  void setPreviewImage() override;
75  void setFinalImage() override;
76 
77  void adjustSliders(int minIn, double gamIn, int maxIn, int minOut, int maxOut);
78  void adjustSlidersAndSpinboxes(int minIn, double gamIn, int maxIn, int minOut, int maxOut);
79  bool eventFilter(QObject*, QEvent*) override;
80 
81 private:
82 
83  class Private;
84  Private* const d;
85 };
86 
87 } // namespace DigikamEditorAdjustLevelsToolPlugin
88 
89 #endif // DIGIKAM_EDITOR_ADJUST_LEVELS_TOOL_H
Definition: dcolor.h:43
Definition: editortool.h:136
Definition: adjustlevelstool.cpp:68
Definition: datefolderview.cpp:43