Warning, file /utilities/okteta/kasten/gui/liboktetawidgets/addresscombobox.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: 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_ADDRESSCOMBOBOX_HPP
0010 #define KASTEN_ADDRESSCOMBOBOX_HPP
0011 
0012 // lib
0013 #include "oktetakastengui_export.hpp"
0014 // Okteta core
0015 #include <Okteta/Address>
0016 // Qt
0017 #include <QWidget>
0018 
0019 class QString;
0020 class QByteArray;
0021 
0022 namespace Okteta {
0023 
0024 class AddressComboBoxPrivate;
0025 
0026 class OKTETAKASTENGUI_EXPORT AddressComboBox : public QWidget
0027 {
0028     Q_OBJECT
0029 
0030 public:
0031     // TODO: same as in kbytearrayvalidator.h, we need a global enum containing both value and char codings...
0032     // matching Okteta::ValueCoding
0033     // TODO: turn into flags, so the codings to be used can be defined
0034     enum Coding
0035     {
0036         InvalidCoding = -1,
0037         HexadecimalCoding = 0,
0038         DecimalCoding = 1,
0039         ExpressionCoding = 2,
0040         /// Not used
0041         OctalCoding = 2,
0042         /// Not used
0043         BinaryCoding = 3,
0044         /// Not used
0045         CharCoding = 4
0046     };
0047 
0048 public:
0049     explicit AddressComboBox(QWidget* parent = nullptr);
0050     ~AddressComboBox() override;
0051 
0052 public: // set
0053     void setFormat(Coding codingId);
0054     void rememberCurrentAddress();
0055 
0056 public: // get
0057     Address address() const;
0058     int format() const;
0059     /** Is actually of type AddressValidator::AddressType */
0060     int addressType() const;
0061 
0062 Q_SIGNALS:
0063     void addressChanged(Okteta::Address address);
0064     void addressTypeChanged(int newAddressType);
0065     void formatChanged(int index);
0066 
0067 protected:
0068     const QScopedPointer<AddressComboBoxPrivate> d_ptr;
0069 
0070 private:
0071     Q_DECLARE_PRIVATE(AddressComboBox)
0072 };
0073 
0074 }
0075 
0076 #endif