File indexing completed on 2024-05-19 05:55:47
0001 /* 0002 SPDX-FileCopyrightText: 2016 RafaĆ Rzepecki <divided.mind@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 0006 */ 0007 0008 #ifndef KWHEXVIEW_H 0009 #define KWHEXVIEW_H 0010 0011 #include <QPlainTextEdit> 0012 0013 class KWHexView : public QPlainTextEdit 0014 { 0015 Q_OBJECT 0016 0017 public: 0018 explicit KWHexView(QWidget* parent = nullptr); 0019 void setData(const QByteArray &ba); 0020 0021 protected: 0022 void resizeEvent(QResizeEvent* e) override; 0023 0024 private: 0025 QByteArray data; 0026 0027 int calculateStride(); 0028 void showData(); 0029 }; 0030 0031 #endif // KWHEXVIEW_H