File indexing completed on 2024-09-22 05:15:39

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     Public domain.
0007 */
0008 
0009 //// ADAPT(start)
0010 //// rename "TEMPLATE_BYTEARRAYCHECKSUMPARAMETERSETEDIT_HPP" to an include guard matching your class/file name
0011 //// e.g. "MYBYTEARRAYCHECKSUMPARAMETERSETEDIT_HPP"
0012 #ifndef KASTEN_TEMPLATE_BYTEARRAYCHECKSUMPARAMETERSETEDIT_HPP
0013 #define KASTEN_TEMPLATE_BYTEARRAYCHECKSUMPARAMETERSETEDIT_HPP
0014 //// ADAPT(end)
0015 
0016 // lib
0017 #include "abstractbytearraychecksumparametersetedit.hpp"
0018 
0019 //// ADAPT(start)
0020 //// add here all needed headers and forward declarations for the members of the widget
0021 class QSpinBox;
0022 //// ADAPT(end)
0023 
0024 //// ADAPT(start)
0025 //// rename the class name from Template_ByteArrayChecksumParameterSetEdit to a proper name, both here and in the .cpp file
0026 //// e.g. MyByteArrayChecksumParameterSetEdit
0027 class Template_ByteArrayChecksumParameterSetEdit : public AbstractByteArrayChecksumParameterSetEdit
0028 //// ADAPT(end)
0029 {
0030     Q_OBJECT
0031 
0032 public:
0033     static const char Id[];
0034 
0035 public:
0036     explicit Template_ByteArrayChecksumParameterSetEdit(QWidget* parent = nullptr);
0037 
0038     ~Template_ByteArrayChecksumParameterSetEdit() override;
0039 
0040 public: // AbstractByteArrayFilterParameterSetEdit API
0041     void setParameterSet(const AbstractByteArrayChecksumParameterSet* parameterSet) override;
0042     void getParameterSet(AbstractByteArrayChecksumParameterSet* parameterSet) const override;
0043 //// ADAPT(start)
0044 //// if the values in the widget can reach invalid states, which should not be used for the parameters,
0045 //// keep the declaration of "isValid()", otherwise remove the next line
0046     bool isValid() const override;
0047 //// ADAPT(end)
0048 
0049 //// ADAPT(start)
0050 //// define slots to catch changes in the values to check if the current state is valid or not
0051 //// not needed if there cannot be invalid states
0052 
0053 private Q_SLOTS:
0054     void onBitNumberChanged(int value);
0055 //// ADAPT(end)
0056 
0057 //// ADAPT(start)
0058 //// here list the UI elements as usual
0059 
0060 private:
0061     QSpinBox* mBitNumberEdit;
0062 
0063     bool mIsValid : 1;
0064 //// ADAPT(end)
0065 };
0066 
0067 #endif