1 /* 2 This file is part of the Okteta Kasten module, made within the KDE community. 3 4 SPDX-FileCopyrightText: 2003, 2008 Friedrich W. H. Kossebau <kossebau@kde.org> 5 6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 7 */ 8 9 #ifndef KASTEN_CHARBYTEARRAYCOLUMNTEXTRENDERER_HPP 10 #define KASTEN_CHARBYTEARRAYCOLUMNTEXTRENDERER_HPP 11 12 // lib 13 #include "abstractbytearraycolumntextrenderer.hpp" 14 // Qt 15 #include <QChar> 16 17 namespace Okteta { 18 class CharCodec; 19 } 20 21 namespace Kasten { 22 23 class CharByteArrayColumnTextRenderer : public AbstractByteArrayColumnTextRenderer 24 { 25 public: 26 CharByteArrayColumnTextRenderer(const Okteta::AbstractByteArrayModel* byteArrayModel, Okteta::Address offset, 27 const Okteta::CoordRange& coordRange, 28 int noOfBytesPerLine, int byteSpacingWidth, int noOfGroupedBytes, 29 const QString& charCodecName, QChar substituteChar, QChar undefinedChar); 30 31 ~CharByteArrayColumnTextRenderer() override; 32 33 protected: // AbstractByteArrayColumnTextRenderer API 34 void renderLine(QTextStream* stream, bool isSubline) const override; 35 36 private: 37 const Okteta::CharCodec* mCharCodec; 38 const QChar mSubstituteChar; 39 const QChar mUndefinedChar; 40 }; 41 42 } 43 44 #endif 45