• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegraphics API Reference
  • KDE Home
  • Contact Us
 

libs/libksane/libksane

  • sources
  • kde-4.14
  • kdegraphics
  • libs
  • libksane
  • libksane
  • widgets
labeled_gamma.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is part of the KDE project
4  *
5  * Date : 2007-09-13
6  * Description : Sane interface for KDE
7  *
8  * Copyright (C) 2007-2011 by Kare Sars <kare.sars@iki .fi>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2.1 of the License, or (at your option) version 3, or any
14  * later version accepted by the membership of KDE e.V. (or its
15  * successor approved by the membership of KDE e.V.), which shall
16  * act as a proxy defined in Section 6 of version 3 of the license.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with this program. If not, see <http://www.gnu.org/licenses/>.
25  *
26  * ============================================================ */
27 
28 #ifndef LABELED_GAMMA_H
29 #define LABELED_GAMMA_H
30 
31 // Local includes
32 #include "labeled_slider.h"
33 #include "gamma_disp.h"
34 
39 namespace KSaneIface
40 {
41 
45 class LabeledGamma : public KSaneOptionWidget
46 {
47  Q_OBJECT
48 
49 public:
50 
57  LabeledGamma(QWidget *parent, const QString& text, int elements);
58  ~LabeledGamma();
59 
60  void setColor(const QColor &color);
61  void setSize(int size);
62  const QVector<int> &gammaTablePtr() { return m_gam_tbl; }
63  int size() {return (int)(m_max_val+1);}
64 
65  bool getValues(int &bri, int &con, int &gam);
66 
67 public Q_SLOTS:
68  void setValues(int bri, int con, int gam);
69  void setValues(const QString &values);
70 
71 private Q_SLOTS:
72  void calculateGT();
73 
74 Q_SIGNALS:
75 
76  void gammaChanged(int bri, int con, int gam);
77  void gammaTableChanged(const QVector<int> &gamma_tbl);
78 
79 private:
80 
81  LabeledSlider *m_bri_slider;
82  LabeledSlider *m_con_slider;
83  LabeledSlider *m_gam_slider;
84 
85  QVector<int> m_gam_tbl;
86  double m_max_val;
87 
88  GammaDisp *m_gamma_disp;
89 };
90 
91 } // NameSpace KSaneIface
92 
93 #endif // LABELED_GAMMA_H
QWidget
KSaneIface::LabeledGamma::gammaTablePtr
const QVector< int > & gammaTablePtr()
Definition: labeled_gamma.h:62
KSaneIface::LabeledSlider
A combination of a label a slider and a spinbox.
Definition: labeled_slider.h:50
gamma_disp.h
KSaneIface::LabeledGamma::setValues
void setValues(int bri, int con, int gam)
Definition: labeled_gamma.cpp:100
KSaneIface::LabeledGamma::gammaChanged
void gammaChanged(int bri, int con, int gam)
KSaneIface::KSaneOptionWidget
A wrapper for a checkbox.
Definition: ksane_option_widget.h:45
KSaneIface::LabeledGamma
A wrapper for a checkbox.
Definition: labeled_gamma.h:45
QString
QColor
KSaneIface::LabeledGamma::size
int size()
Definition: labeled_gamma.h:63
KSaneIface::LabeledGamma::setColor
void setColor(const QColor &color)
Definition: labeled_gamma.cpp:93
KSaneIface::LabeledGamma::~LabeledGamma
~LabeledGamma()
Definition: labeled_gamma.cpp:89
QVector< int >
KSaneIface::GammaDisp
Definition: gamma_disp.h:44
KSaneIface::LabeledGamma::gammaTableChanged
void gammaTableChanged(const QVector< int > &gamma_tbl)
KSaneIface::LabeledGamma::LabeledGamma
LabeledGamma(QWidget *parent, const QString &text, int elements)
Create the checkbox.
Definition: labeled_gamma.cpp:44
KSaneIface::LabeledGamma::setSize
void setSize(int size)
Definition: labeled_gamma.cpp:156
QObject::parent
QObject * parent() const
KSaneIface::LabeledGamma::getValues
bool getValues(int &bri, int &con, int &gam)
Definition: labeled_gamma.cpp:147
labeled_slider.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:19:47 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libs/libksane/libksane

Skip menu "libs/libksane/libksane"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal