Warning, file /utilities/okteta/kasten/gui/liboktetawidgets/bytearraycombobox.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 This file is part of the Okteta Kasten module, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2006, 2009, 2011 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_BYTEARRAYCOMBOBOX_HPP 0010 #define KASTEN_BYTEARRAYCOMBOBOX_HPP 0011 0012 // lib 0013 #include "oktetakastengui_export.hpp" 0014 // Qt 0015 #include <QWidget> 0016 0017 class QString; 0018 class QByteArray; 0019 0020 namespace Okteta { 0021 class ByteArrayComboBoxPrivate; 0022 0023 class OKTETAKASTENGUI_EXPORT ByteArrayComboBox : public QWidget 0024 { 0025 Q_OBJECT 0026 0027 public: 0028 // TODO: same as in kbytearrayvalidator.h, we need a global enum containing both value and char codings... 0029 // matching Okteta::ValueCoding 0030 enum Coding 0031 { 0032 InvalidCoding = -1, 0033 HexadecimalCoding = 0, 0034 DecimalCoding = 1, 0035 OctalCoding = 2, 0036 BinaryCoding = 3, 0037 CharCoding = 4, 0038 Utf8Coding = 5 0039 }; 0040 0041 public: 0042 explicit ByteArrayComboBox(QWidget* parent = nullptr); 0043 ~ByteArrayComboBox() override; 0044 0045 public: // set 0046 void setByteArray(const QByteArray& byteArray); 0047 void setFormat(Coding codecId); 0048 void setCharCodec(const QString& charCodecName); 0049 void setMaxLength(int maxLength); 0050 void setMinLength(int minLength); 0051 void rememberCurrentByteArray(); 0052 0053 public: // get 0054 QByteArray byteArray() const; 0055 int format() const; 0056 int maxLength() const; 0057 int minLength() const; 0058 0059 Q_SIGNALS: 0060 void byteArrayChanged(const QByteArray& byteArray); 0061 void formatChanged(int index); 0062 0063 protected: 0064 const QScopedPointer<ByteArrayComboBoxPrivate> d_ptr; 0065 0066 private: 0067 Q_DECLARE_PRIVATE(ByteArrayComboBox) 0068 }; 0069 0070 } 0071 0072 #endif