KSaneCore

listoption.h
1/*
2 * SPDX-FileCopyrightText: 2009 Kare Sars <kare dot sars at iki dot fi>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6
7#ifndef KSANE_VALUELIST_OPTION_H
8#define KSANE_VALUELIST_OPTION_H
9
10#include "baseoption.h"
11
12namespace KSaneCore
13{
14
15class ListOption : public BaseOption
16{
18
19public:
20 ListOption(const SANE_Handle handle, const int index);
21
22 void readValue() override;
23 void readOption() override;
24
25 QVariant minimumValue() const override;
26 QVariant value() const override;
27 QString valueAsString() const override;
28 QVariantList valueList() const override;
29 QVariantList internalValueList() const override;
30 Option::OptionState state() const override;
31
32public Q_SLOTS:
33 bool setValue(const QVariant &value) override;
34
35private:
36 bool setValue(double value);
37 bool setValue(const QString &value);
38 void countEntries();
39
40 QVariant m_currentValue;
41 int m_entriesCount = 0;
42};
43
44} // namespace KSaneCore
45
46#endif // KSANE_VALUELIST_OPTION_H
OptionState
This enumeration describes the current statue of the value of the option, indicating if this option s...
Definition option.h:46
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:57:02 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.