• 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_fslider.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_FSLIDER_H
29 #define LABELED_FSLIDER_H
30 
31 #include "ksane_option_widget.h"
32 
33 // Qt includes
34 #include <QSlider>
35 #include <QDoubleSpinBox>
36 
41 namespace KSaneIface
42 {
43 
48 class LabeledFSlider : public KSaneOptionWidget
49 {
50  Q_OBJECT
51 
52 public:
53 
64  LabeledFSlider(QWidget *parent, const QString& text,
65  float min, float max, float st);
66  ~LabeledFSlider();
67 
71  float value() const {return (float)m_spinb->value();}
72  float step() const {return m_fstep;}
73 
74 public Q_SLOTS:
75 
77  void setValue(float);
78  void setRange(float, float);
79  void setStep(float);
81  void setSuffix(const QString &text);
82 
83 private Q_SLOTS:
84 
88  // FIXME this has to be changes later
89  void syncValues(int);
90  void syncValues(double);
91  void fixValue();
92 
93 Q_SIGNALS:
94 
98  void valueChanged(float);
99 
100 private:
101 
102  QSlider *m_slider;
103  QDoubleSpinBox *m_spinb;
104  float m_fstep;
105  int m_istep;
106 };
107 
108 } // NameSpace KSaneIface
109 
110 #endif // LABELED_SFSLIDER_H
QWidget
KSaneIface::LabeledFSlider::LabeledFSlider
LabeledFSlider(QWidget *parent, const QString &text, float min, float max, float st)
Create the slider.
Definition: labeled_fslider.cpp:39
QSlider
QDoubleSpinBox
KSaneIface::KSaneOptionWidget
A wrapper for a checkbox.
Definition: ksane_option_widget.h:45
KSaneIface::LabeledFSlider::setValue
void setValue(float)
Set the slider/spinbox value.
Definition: labeled_fslider.cpp:134
KSaneIface::LabeledFSlider::setStep
void setStep(float)
Definition: labeled_fslider.cpp:113
KSaneIface::LabeledFSlider::value
float value() const
Definition: labeled_fslider.h:71
KSaneIface::LabeledFSlider::setSuffix
void setSuffix(const QString &text)
Set the unit.
Definition: labeled_fslider.cpp:96
QDoubleSpinBox::value
value
KSaneIface::LabeledFSlider::valueChanged
void valueChanged(float)
Emit the slider value changes.
ksane_option_widget.h
QString
KSaneIface::LabeledFSlider
A combination of a label a slider and a spinbox.
Definition: labeled_fslider.h:48
KSaneIface::LabeledFSlider::setRange
void setRange(float, float)
Definition: labeled_fslider.cpp:101
KSaneIface::LabeledFSlider::step
float step() const
Definition: labeled_fslider.h:72
KSaneIface::LabeledFSlider::~LabeledFSlider
~LabeledFSlider()
Definition: labeled_fslider.cpp:92
QObject::parent
QObject * parent() const
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