File indexing completed on 2024-06-16 05:24:51

0001 /*
0002     This file is part of the Okteta Kasten module, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2009 Friedrich W. H. Kossebau <kossebau@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 
0009 #ifndef KASTEN_ABSTRACTBYTEARRAYCHECKSUMPARAMETERSETEDIT_HPP
0010 #define KASTEN_ABSTRACTBYTEARRAYCHECKSUMPARAMETERSETEDIT_HPP
0011 
0012 // Qt
0013 #include <QWidget>
0014 // Std
0015 #include <memory>
0016 
0017 class AbstractByteArrayChecksumParameterSet;
0018 
0019 class AbstractByteArrayChecksumParameterSetEdit : public QWidget
0020 {
0021     Q_OBJECT
0022 
0023 protected:
0024     explicit AbstractByteArrayChecksumParameterSetEdit(QWidget* parent = nullptr);
0025 
0026 public:
0027     ~AbstractByteArrayChecksumParameterSetEdit() override;
0028 
0029 public: // API to be implemented
0030     virtual void setParameterSet(const AbstractByteArrayChecksumParameterSet* parameterSet) = 0;
0031     /// default does nothing
0032     virtual void getParameterSet(AbstractByteArrayChecksumParameterSet* parameterSet) const = 0;
0033     /// default returns true
0034     virtual bool isValid() const;
0035 
0036 Q_SIGNALS:
0037     void validityChanged(bool isValid);
0038     // TODO: hack, see checksum source
0039     void valuesChanged();
0040 
0041 private:
0042     const std::unique_ptr<class AbstractByteArrayChecksumParameterSetEditPrivate> d;
0043 };
0044 
0045 #endif