File indexing completed on 2024-04-14 15:52:51
0001 /* 0002 This file is part of the Okteta Gui library, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2003, 2007-2010 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 #include "bytearraycolumnview.hpp" 0010 #include "bytearraycolumnview_p.hpp" 0011 0012 namespace Okteta { 0013 0014 ByteArrayColumnView::ByteArrayColumnView(QWidget* parent) 0015 : AbstractByteArrayView(new ByteArrayColumnViewPrivate(this), parent) 0016 { 0017 Q_D(ByteArrayColumnView); 0018 0019 d->init(); 0020 } 0021 0022 ByteArrayColumnView::~ByteArrayColumnView() = default; 0023 0024 PixelX ByteArrayColumnView::byteSpacingWidth() const 0025 { 0026 Q_D(const ByteArrayColumnView); 0027 return d->byteSpacingWidth(); 0028 } 0029 int ByteArrayColumnView::noOfGroupedBytes() const 0030 { 0031 Q_D(const ByteArrayColumnView); 0032 return d->noOfGroupedBytes(); 0033 } 0034 PixelX ByteArrayColumnView::groupSpacingWidth() const 0035 { 0036 Q_D(const ByteArrayColumnView); 0037 return d->groupSpacingWidth(); 0038 } 0039 PixelX ByteArrayColumnView::binaryGapWidth() const 0040 { 0041 Q_D(const ByteArrayColumnView); 0042 return d->binaryGapWidth(); 0043 } 0044 bool ByteArrayColumnView::showsNonprinting() const 0045 { 0046 Q_D(const ByteArrayColumnView); 0047 return d->showsNonprinting(); 0048 } 0049 QChar ByteArrayColumnView::substituteChar() const 0050 { 0051 Q_D(const ByteArrayColumnView); 0052 return d->substituteChar(); 0053 } 0054 QChar ByteArrayColumnView::undefinedChar() const 0055 { 0056 Q_D(const ByteArrayColumnView); 0057 return d->undefinedChar(); 0058 } 0059 bool ByteArrayColumnView::isByteTypeColored() const 0060 { 0061 Q_D(const ByteArrayColumnView); 0062 return d->isByteTypeColored(); 0063 } 0064 0065 void ByteArrayColumnView::setByteArrayModel(AbstractByteArrayModel* _byteArrayModel) 0066 { 0067 Q_D(ByteArrayColumnView); 0068 d->setByteArrayModel(_byteArrayModel); 0069 } 0070 0071 void ByteArrayColumnView::setBufferSpacing(/*PixelX*/ int byteSpacing, int noOfGroupedBytes, /*PixelX*/ int groupSpacing) 0072 { 0073 Q_D(ByteArrayColumnView); 0074 d->setBufferSpacing(byteSpacing, noOfGroupedBytes, groupSpacing); 0075 } 0076 0077 void ByteArrayColumnView::setValueCoding(ValueCoding valueCoding) 0078 { 0079 Q_D(ByteArrayColumnView); 0080 d->setValueCoding(valueCoding); 0081 } 0082 0083 void ByteArrayColumnView::setByteSpacingWidth(int /*PixelX*/ byteSpacingWidth) 0084 { 0085 Q_D(ByteArrayColumnView); 0086 d->setByteSpacingWidth(byteSpacingWidth); 0087 } 0088 0089 void ByteArrayColumnView::setNoOfGroupedBytes(int noOfGroupedBytes) 0090 { 0091 Q_D(ByteArrayColumnView); 0092 d->setNoOfGroupedBytes(noOfGroupedBytes); 0093 } 0094 0095 void ByteArrayColumnView::setGroupSpacingWidth(int /*PixelX*/ groupSpacingWidth) 0096 { 0097 Q_D(ByteArrayColumnView); 0098 d->setGroupSpacingWidth(groupSpacingWidth); 0099 } 0100 0101 void ByteArrayColumnView::setBinaryGapWidth(int /*PixelX*/ binaryGapWidth) 0102 { 0103 Q_D(ByteArrayColumnView); 0104 d->setBinaryGapWidth(binaryGapWidth); 0105 } 0106 0107 void ByteArrayColumnView::setSubstituteChar(QChar substituteChar) 0108 { 0109 Q_D(ByteArrayColumnView); 0110 d->setSubstituteChar(substituteChar); 0111 } 0112 0113 void ByteArrayColumnView::setUndefinedChar(QChar undefinedChar) 0114 { 0115 Q_D(ByteArrayColumnView); 0116 d->setUndefinedChar(undefinedChar); 0117 } 0118 0119 void ByteArrayColumnView::setShowsNonprinting(bool showingNonprinting) 0120 { 0121 Q_D(ByteArrayColumnView); 0122 d->setShowsNonprinting(showingNonprinting); 0123 } 0124 0125 void ByteArrayColumnView::setCharCoding(CharCoding charCoding) 0126 { 0127 Q_D(ByteArrayColumnView); 0128 d->setCharCoding(charCoding); 0129 } 0130 0131 // TODO: join with function above! 0132 void ByteArrayColumnView::setCharCoding(const QString& charCodingName) 0133 { 0134 Q_D(ByteArrayColumnView); 0135 d->setCharCoding(charCodingName); 0136 } 0137 0138 void ByteArrayColumnView::setByteTypeColored(bool isColored) 0139 { 0140 Q_D(ByteArrayColumnView); 0141 d->setByteTypeColored(isColored); 0142 } 0143 0144 void ByteArrayColumnView::changeEvent(QEvent* event) 0145 { 0146 Q_D(ByteArrayColumnView); 0147 0148 d->changeEvent(event); 0149 } 0150 0151 QSize ByteArrayColumnView::minimumSizeHint() const 0152 { 0153 Q_D(const ByteArrayColumnView); 0154 // TODO: better minimal width (visibility!) 0155 return d->minimumSizeHint(); 0156 } 0157 0158 void ByteArrayColumnView::renderColumns(QPainter* painter, int cx, int cy, int cw, int ch) 0159 { 0160 Q_D(ByteArrayColumnView); 0161 d->renderColumns(painter, cx, cy, cw, ch); 0162 } 0163 0164 } 0165 0166 #include "moc_bytearraycolumnview.cpp"