KSaneCore

doubleoption.h
1/*
2 * SPDX-FileCopyrightText: 2009 Kare Sars <kare dot sars at iki dot fi>
3 * SPDX-FileCopyrightText: 2021 Alexander Stippich <a.stippich@gmx.net>
4 *
5 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7
8#ifndef KSANE_DOUBLE_OPTION_H
9#define KSANE_DOUBLE_OPTION_H
10
11#include "baseoption.h"
12
13namespace KSaneCore
14{
15
16class DoubleOption : public BaseOption
17{
19
20public:
21 DoubleOption(const SANE_Handle handle, const int index);
22
23 void readValue() override;
24 void readOption() override;
25
26 QVariant minimumValue() const override;
27 QVariant maximumValue() const override;
28 QVariant stepValue() const override;
29 QVariant value() const override;
30 QString valueAsString() const override;
31
32public Q_SLOTS:
33 bool setValue(const QVariant &value) override;
34
35private:
36 double m_value = 0;
37 double m_minChange = 0.0001;
38};
39
40} // namespace KSaneCore
41
42#endif // KSANE_DOUBLE_OPTION_H
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:54:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.