File indexing completed on 2024-12-08 07:19:38
0001 /* 0002 * SPDX-FileCopyrightText: 2009 Kare Sars <kare dot sars at iki dot fi> 0003 * SPDX-FileCopyrightText: 2021 Alexander Stippich <a.stippich@gmx.net> 0004 * 0005 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 */ 0007 0008 #ifndef KSANE_DOUBLE_OPTION_H 0009 #define KSANE_DOUBLE_OPTION_H 0010 0011 #include "baseoption.h" 0012 0013 namespace KSaneCore 0014 { 0015 0016 class DoubleOption : public BaseOption 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 DoubleOption(const SANE_Handle handle, const int index); 0022 0023 void readValue() override; 0024 void readOption() override; 0025 0026 QVariant minimumValue() const override; 0027 QVariant maximumValue() const override; 0028 QVariant stepValue() const override; 0029 QVariant value() const override; 0030 QString valueAsString() const override; 0031 0032 public Q_SLOTS: 0033 bool setValue(const QVariant &value) override; 0034 0035 private: 0036 double m_value = 0; 0037 double m_minChange = 0.0001; 0038 }; 0039 0040 } // namespace KSaneCore 0041 0042 #endif // KSANE_DOUBLE_OPTION_H