Krita Source Code Documentation
Loading...
Searching...
No Matches
KisLevelsConfigWidget.h
Go to the documentation of this file.
1/*
2 * This file is part of Krita
3 *
4 * SPDX-FileCopyrightText: 2006 Frederic Coiffier <fcoiffie@gmail.com>
5 * SPDX-FileCopyrightText: 2021 Deif Lou <ginoba@gmail.com>
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10#ifndef KIS_LEVEL_CONFIG_WIDGET_H
11#define KIS_LEVEL_CONFIG_WIDGET_H
12
13#include <QPair>
14
15#include <kis_config_widget.h>
16#include <KisLevelsCurve.h>
17
19
20#include "ui_KisLevelsConfigWidget.h"
21
22class KisHistogram;
23class QWidget;
25
27{
28 Q_OBJECT
29
30public:
31 KisLevelsConfigWidget(QWidget * parent, KisPaintDeviceSP dev, const KoColorSpace* colorSpace);
32 ~KisLevelsConfigWidget() override;
33
35 void setConfiguration(const KisPropertiesConfigurationSP config) override;
36
37private Q_SLOTS:
38 void resetAll();
39 void resetInputLevels();
40 void resetOutputLevels();
41 void resetAllChannels();
42 void setActiveChannel(int ch);
43
44 void slot_buttonGroupMode_buttonToggled(QAbstractButton *button, bool checked);
45 void slot_comboBoxChannel_activated(int index);
46 void slot_buttonGroupHistogramMode_buttonToggled(QAbstractButton *button, bool checked);
61
63 void updateWidgets();
64 void updateHistograms();
66 void setButtonsIcons();
67
68private:
69 Ui::LevelsConfigWidget m_page;
74 QPair<int, int> m_lightnessMinMaxRanges;
80 QScopedPointer<KisHistogram> m_channelsHistogram;
81 QScopedPointer<KisHistogram> m_lightnessHistogram;
83
84 bool event(QEvent *e) override;
85};
86
87#endif
float value(const T *src, size_t ch)
A widget that allows to select a combination of auto levels parameters.
KisLevelsCurve m_lightnessLevelsCurve
void slot_sliderInputLevels_blackPointChanged(qreal value)
void slot_spinBoxOutputWhitePoint_valueChanged(int value)
const KoColorSpace * m_colorSpace
void slot_buttonGroupHistogramMode_buttonToggled(QAbstractButton *button, bool checked)
void slot_sliderOutputLevels_blackPointChanged(qreal value)
void slot_autoLevelsWidgetAllChannels_parametersChanged()
void slot_sliderInputLevels_gammaChanged(qreal value)
KisLevelsCurve * m_activeLevelsCurve
void slot_sliderOutputLevels_whitePointChanged(qreal value)
void slot_buttonGroupMode_buttonToggled(QAbstractButton *button, bool checked)
KisPropertiesConfigurationSP configuration() const override
void slot_spinBoxInputWhitePoint_valueChanged(int value)
void setConfiguration(const KisPropertiesConfigurationSP config) override
KisLevelsConfigWidget(QWidget *parent, KisPaintDeviceSP dev, const KoColorSpace *colorSpace)
KisAutoLevelsWidget * m_autoLevelsWidget
QScopedPointer< KisHistogram > m_lightnessHistogram
QVector< VirtualChannelInfo > m_virtualChannels
void slot_sliderInputLevels_whitePointChanged(qreal value)
void slot_comboBoxChannel_activated(int index)
void slot_spinBoxInputBlackPoint_valueChanged(int value)
Ui::LevelsConfigWidget m_page
void slot_spinBoxOutputBlackPoint_valueChanged(int value)
QPair< int, int > m_lightnessMinMaxRanges
QVector< QPair< int, int > > m_virtualChannelsMinMaxRanges
bool event(QEvent *e) override
QVector< KisLevelsCurve > m_levelsCurves
QScopedPointer< KisHistogram > m_channelsHistogram
void slot_spinBoxInputGamma_valueChanged(qreal value)
This class holds the parameters for a levels adjustment. It is modeled after KisCubicCurve and has si...
QString button(const QWheelEvent &ev)