File indexing completed on 2024-10-13 04:15:34

0001 /*
0002  * SPDX-FileCopyrightText: 2009 Kare Sars <kare dot sars at iki dot fi>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005  */
0006 
0007 #ifndef KSANE_STRING_OPTION_H
0008 #define KSANE_STRING_OPTION_H
0009 
0010 #include "baseoption.h"
0011 
0012 namespace KSaneCore
0013 {
0014 
0015 class StringOption : public BaseOption
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     StringOption(const SANE_Handle handle, const int index);
0021 
0022     void readValue() override;
0023 
0024     QVariant value() const override;
0025     int valueSize() const override;
0026     QString valueAsString() const override;
0027 
0028 public Q_SLOTS:
0029     bool setValue(const QVariant &val) override;
0030 
0031 private:
0032     QString       m_string;
0033 };
0034 
0035 } // namespace KSaneCore
0036 
0037 #endif // KSANE_STRING_OPTION_H