KSane

labeledgamma.h
1/*
2 * SPDX-FileCopyrightText: 2007-2011 Kare Sars <kare.sars@iki .fi>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6
7#ifndef LABELED_GAMMA_H
8#define LABELED_GAMMA_H
9
10// Local includes
11#include "labeledslider.h"
12#include "gammadisp.h"
13
14/**
15 *@author Kåre Särs
16 */
17
18namespace KSaneIface
19{
20
21/**
22 * A wrapper for a checkbox
23 */
25{
27
28public:
29
30 /**
31 * Create the labeled gamma widget.
32 *
33 * \param parent parent widget
34 * \param text is the text describing the checkbox.
35 * \param max is the maximum gamma-table-value
36 */
37 LabeledGamma(QWidget *parent, const QString &text, int max);
38
40
41 ~LabeledGamma() override;
42
43 void setColor(const QColor &color);
44
45 int maxValue();
46
47 bool getValues(int &brightness, int &contrast, int &gamma);
48
49public Q_SLOTS:
50 void setValues(const QVariant &values);
51
53 void valuesChanged(const QVariant &values);
54
55private Q_SLOTS:
56 void emitNewValues();
57
58private:
59 void initGamma(QString text, int max);
60
61 LabeledSlider *m_brightSlider;
62 LabeledSlider *m_contrastSlider;
63 LabeledSlider *m_gammaSlider;
64
65 int m_brightness = 0;
66 int m_contrast = 0;
67 int m_gamma = 0;
68 int m_maxValue;
69
70 GammaDisp *m_gammaDisplay;
71};
72
73} // NameSpace KSaneIface
74
75#endif // LABELED_GAMMA_H
Base class for option widgets.
A wrapper for a checkbox.
LabeledGamma(QWidget *parent, const QString &text, int max)
Create the labeled gamma widget.
A combination of a label a slider and a spinbox.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:08:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.