File indexing completed on 2025-01-05 05:23:52
0001 /* 0002 This file is part of the Kasten Framework, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2008 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_BYTEARRAYSOURCECODESTREAMENCODERCONFIGEDITOR_HPP 0010 #define KASTEN_BYTEARRAYSOURCECODESTREAMENCODERCONFIGEDITOR_HPP 0011 0012 // lib 0013 #include "bytearraysourcecodestreamencoder.hpp" 0014 // Kasten gui 0015 #include <Kasten/AbstractModelStreamEncoderConfigEditor> 0016 0017 class KComboBox; 0018 class QSpinBox; 0019 class QCheckBox; 0020 class QLineEdit; 0021 0022 namespace Kasten { 0023 0024 class ByteArraySourceCodeStreamEncoderConfigEditor : public AbstractModelStreamEncoderConfigEditor 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 explicit ByteArraySourceCodeStreamEncoderConfigEditor(ByteArraySourceCodeStreamEncoder* encoder, QWidget* parent = nullptr); 0030 ~ByteArraySourceCodeStreamEncoderConfigEditor() override; 0031 0032 public: // AbstractModelStreamEncoderConfigEditor API 0033 bool isValid() const override; 0034 AbstractSelectionView* createPreviewView() const override; 0035 0036 private Q_SLOTS: 0037 void onSettingsChanged(); 0038 0039 private: 0040 ByteArraySourceCodeStreamEncoder* mEncoder; 0041 SourceCodeStreamEncoderSettings mSettings; 0042 0043 QLineEdit* mVariableNameEdit; 0044 QSpinBox* mItemsPerLineEdit; 0045 KComboBox* mDataTypeSelect; 0046 QCheckBox* mUnsignedAsHexadecimalCheck; 0047 }; 0048 0049 } 0050 0051 #endif