KSane

gammadisp.h
1/*
2 * SPDX-FileCopyrightText: 2007-2008 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 GAMMA_DISP_H
8#define GAMMA_DISP_H
9
10// Qt includes
11
12#include <QWidget>
13
14/**
15 *@author Kåre Särs
16 *
17 * This is the widget that displays the gamma table.
18 */
19
20namespace KSaneIface
21{
22
23class GammaDisp : public QWidget
24{
26
27public:
28
29 /**
30 * Create a gamma display.
31 * \param parent parent widget
32 * \param brightness the brightness value
33 * \param contrast the contrast value
34 * \param gamma the gamma value
35 * \param maxValue the maximum value
36 */
37 GammaDisp(QWidget *parent, int *brightness, int *contrast, int *gamma, int maxValue);
38 ~GammaDisp() override {}
39
40 QSize sizeHint() const override;
41 QSize minimumSizeHint() const override;
42
43 void setColor(const QColor &color);
44
45protected:
46
47 void paintEvent(QPaintEvent *) override;
48 void resizeEvent(QResizeEvent *) override;
49
50private:
51
52 int *m_brightness;
53 int *m_contrast;
54 int *m_gamma;
55 QColor m_gammaColor;
56 int m_maxValue;
57};
58
59} // NameSpace KSaneIface
60
61#endif // GAMMA_DISP_H
62
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.