File indexing completed on 2024-12-08 07:19:38

0001 /*
0002  * SPDX-FileCopyrightText: 2021 Alexander Stippich <a.stippich@gmx.net>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005  */
0006 
0007 #ifndef KSANE_DELAY_OPTION_H
0008 #define KSANE_DELAY_OPTION_H
0009 
0010 #include "baseoption.h"
0011 #include "option.h"
0012 
0013 namespace KSaneCore
0014 {
0015 
0016 static const QString BatchDelayOptionName = QStringLiteral("KSane::BatchTimeDelay");
0017 
0018 class BatchDelayOption : public BaseOption
0019 {
0020     Q_OBJECT
0021 
0022 public:
0023     BatchDelayOption();
0024 
0025     Option::OptionState state() const override;
0026     QString name() const override;
0027     QString title() const override;
0028     QString description() const override;
0029 
0030     QVariant minimumValue() const override;
0031     QVariant maximumValue() const override;
0032     QVariant stepValue() const override;
0033     QVariant value() const override;
0034     QString valueAsString() const override;
0035     Option::OptionUnit valueUnit() const override;
0036 
0037 public Q_SLOTS:
0038     bool setValue(const QVariant &value) override;
0039 
0040 private:
0041     Option::OptionState m_state = Option::StateHidden;
0042     int m_delayValue = 10;
0043 };
0044 
0045 } // NameSpace KSaneCore
0046 
0047 #endif // KSANE_DELAY_OPTION_H