File indexing completed on 2025-01-19 05:20:18
0001 /* 0002 This file is part of the Kasten Framework, 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_BYTEARRAYPATTERNGENERATORCONFIGEDITOR_HPP 0010 #define KASTEN_BYTEARRAYPATTERNGENERATORCONFIGEDITOR_HPP 0011 0012 // lib 0013 #include "bytearraypatterngenerator.hpp" 0014 // Kasten gui 0015 #include <Kasten/AbstractModelDataGeneratorConfigEditor> 0016 0017 namespace Okteta { 0018 class ByteArrayComboBox; 0019 } 0020 class QSpinBox; 0021 0022 namespace Kasten { 0023 0024 class ByteArrayPatternGeneratorConfigEditor : public AbstractModelDataGeneratorConfigEditor 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 explicit ByteArrayPatternGeneratorConfigEditor(ByteArrayPatternGenerator* generator, QWidget* parent = nullptr); 0030 0031 ~ByteArrayPatternGeneratorConfigEditor() override; 0032 0033 public: // AbstractModelDataGeneratorConfigEditor API 0034 bool isValid() const override; 0035 QString name() const override; 0036 0037 private Q_SLOTS: 0038 void onSettingsChanged(); 0039 void onPatternChanged(const QByteArray& pattern); 0040 0041 private: 0042 ByteArrayPatternGenerator* mGenerator; 0043 ByteArrayPatternGeneratorSettings mSettings; 0044 0045 QSpinBox* mNumberInput; 0046 Okteta::ByteArrayComboBox* mPatternEdit; 0047 }; 0048 0049 } 0050 0051 #endif