File indexing completed on 2024-06-23 05:48:45
0001 /* 0002 This file is part of the Okteta Kasten module, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2007-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_BYTETABLETOOL_HPP 0010 #define KASTEN_BYTETABLETOOL_HPP 0011 0012 // Kasten core 0013 #include <Kasten/AbstractTool> 0014 0015 namespace Okteta { 0016 class AbstractByteArrayModel; 0017 } 0018 0019 namespace Kasten { 0020 0021 class ByteTableModel; 0022 class ByteArrayView; 0023 0024 /** 0025 */ 0026 class ByteTableTool : public AbstractTool 0027 { 0028 Q_OBJECT 0029 0030 public: 0031 ByteTableTool(); 0032 ~ByteTableTool() override; 0033 0034 public: // AbstractTool API 0035 // virtual AbstractModel* targetModel() const; 0036 QString title() const override; 0037 0038 void setTargetModel(AbstractModel* model) override; 0039 0040 public: 0041 void insert(unsigned char byte, int count); 0042 0043 public: 0044 ByteTableModel* byteTableModel() const; 0045 bool hasWriteable() const; 0046 0047 Q_SIGNALS: 0048 void hasWriteableChanged(bool hasWriteable); 0049 0050 private Q_SLOTS: 0051 void onReadOnlyChanged(bool isReadOnly); 0052 0053 private: 0054 ByteTableModel* mByteTableModel; 0055 0056 ByteArrayView* mByteArrayView = nullptr; 0057 Okteta::AbstractByteArrayModel* mByteArrayModel = nullptr; 0058 }; 0059 0060 } 0061 0062 #endif