1 /* ============================================================ 2 * 3 * SPDX-FileCopyrightText: 2009 Kare Sars <kare dot sars at iki dot fi> 4 * SPDX-FileCopyrightText: 2021 Alexander Stippich <a.stippich@gmx.net> 5 * 6 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 7 * 8 * ============================================================ */ 9 10 #ifndef KSANE_DOUBLE_OPTION_H 11 #define KSANE_DOUBLE_OPTION_H 12 13 #include "ksanebaseoption.h" 14 15 namespace KSaneIface 16 { 17 18 class KSaneDoubleOption : public KSaneBaseOption 19 { 20 Q_OBJECT 21 22 public: 23 KSaneDoubleOption(const SANE_Handle handle, const int index); 24 25 void readValue() override; 26 void readOption() override; 27 28 QVariant minimumValue() const override; 29 QVariant maximumValue() const override; 30 QVariant stepValue() const override; 31 QVariant value() const override; 32 QString valueAsString() const override; 33 34 public Q_SLOTS: 35 bool setValue(const QVariant &value) override; 36 37 private: 38 double m_value = 0; 39 double m_minChange = 0.0001; 40 }; 41 42 } // NameSpace KSaneIface 43 44 #endif // KSANE_DOUBLE_OPTION_H 45