File indexing completed on 2024-04-28 09:48:40
0001 /* 0002 This file is part of the Okteta Gui library, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2003, 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 OKTETA_CHARBYTEARRAYCOLUMNRENDERER_HPP 0010 #define OKTETA_CHARBYTEARRAYCOLUMNRENDERER_HPP 0011 0012 // lib 0013 #include "abstractbytearraycolumnrenderer.hpp" 0014 0015 class QChar; 0016 0017 namespace Okteta { 0018 0019 class CharByteArrayColumnRendererPrivate; 0020 0021 /** buffer column that interprets the bytes as chars 0022 * 0023 * @author Friedrich W. H. Kossebau 0024 */ 0025 class OKTETAGUI_EXPORT CharByteArrayColumnRenderer : public AbstractByteArrayColumnRenderer 0026 { 0027 public: 0028 CharByteArrayColumnRenderer(AbstractColumnStylist* stylist, 0029 AbstractByteArrayModel* byteArrayModel, ByteArrayTableLayout* layout, ByteArrayTableRanges* ranges); 0030 ~CharByteArrayColumnRenderer() override; 0031 0032 public: // modification access 0033 /** sets whether "unprintable" chars (>32) should be displayed in the char column 0034 * with their corresponding character. 0035 * @param showingNonprinting 0036 * returns true if there was a change 0037 */ 0038 bool setShowingNonprinting(bool showingNonprinting = true); 0039 /** sets the substitute character for "unprintable" chars 0040 * returns true if there was a change 0041 */ 0042 bool setSubstituteChar(QChar substituteChar); 0043 /** sets the undefined character for "undefined" chars 0044 * returns true if there was a change 0045 */ 0046 bool setUndefinedChar(QChar undefinedChar); 0047 0048 public: // value access 0049 /** returns true if "unprintable" chars (>32) are displayed in the char column 0050 * with their corresponding character, default is false 0051 */ 0052 bool isShowingNonprinting() const; 0053 /** returns the actually used substitute character for "unprintable" chars, default is '.' */ 0054 QChar substituteChar() const; 0055 /** returns the actually used undefined character for "undefined" chars, default is '?' */ 0056 QChar undefinedChar() const; 0057 0058 private: 0059 Q_DECLARE_PRIVATE(CharByteArrayColumnRenderer) 0060 }; 0061 0062 } 0063 0064 #endif