okteta
bytearrayframerenderer.cpp
Go to the documentation of this file.
53 static const Okteta::ValueCoding DefaultValueCoding = Okteta::HexadecimalCoding; //krazy:exclude=staticobjects
54 static const Okteta::CharCoding DefaultCharCoding = Okteta::LocalEncoding; //krazy:exclude=staticobjects
68 mLayout = new Okteta::ByteArrayTableLayout( DefaultNoOfBytesPerLine, DefaultFirstLineOffset, DefaultStartOffset, 0, 0 );
105 Okteta::AbstractByteArrayModel* ByteArrayFrameRenderer::byteArrayModel() const { return mByteArrayModel; }
110 Okteta::Address ByteArrayFrameRenderer::firstLineOffset() const { return mLayout->firstLineOffset(); }
114 Okteta::PixelX ByteArrayFrameRenderer::byteSpacingWidth() const { return mValueColumnRenderer->byteSpacingWidth(); }
115 int ByteArrayFrameRenderer::noOfGroupedBytes() const { return mValueColumnRenderer->noOfGroupedBytes(); }
116 Okteta::PixelX ByteArrayFrameRenderer::groupSpacingWidth() const { return mValueColumnRenderer->groupSpacingWidth(); }
117 Okteta::PixelX ByteArrayFrameRenderer::binaryGapWidth() const { return mValueColumnRenderer->binaryGapWidth(); }
118 bool ByteArrayFrameRenderer::showsNonprinting() const { return mCharColumnRenderer->isShowingNonprinting(); }
119 QChar ByteArrayFrameRenderer::substituteChar() const { return mCharColumnRenderer->substituteChar(); }
120 QChar ByteArrayFrameRenderer::undefinedChar() const { return mCharColumnRenderer->undefinedChar(); }
124 bool ByteArrayFrameRenderer::offsetColumnVisible() const { return mOffsetColumnRenderer->isVisible(); }
126 { return (mValueColumnRenderer->isVisible() ? ValueCodingId : 0) | (mCharColumnRenderer->isVisible() ? CharCodingId : 0); }
195 void ByteArrayFrameRenderer::setBufferSpacing( Okteta::PixelX byteSpacing, int noOfGroupedBytes, Okteta::PixelX groupSpacing )
441 const Okteta::PixelX charByteWidth = mCharColumnRenderer->isVisible() ? mCharColumnRenderer->digitWidth() : 0;
442 const Okteta::PixelX valueByteWidth = mValueColumnRenderer->isVisible() ? mValueColumnRenderer->byteWidth() : 0;
443 const Okteta::PixelX valueByteSpacingWidth = mValueColumnRenderer->isVisible() ? mValueColumnRenderer->byteSpacingWidth() : 0;
454 valueByteGroupSpacingWidth = mValueColumnRenderer->isVisible() ? mValueColumnRenderer->groupSpacingWidth() : 0;
456 Okteta::PixelX valueByteGroupWidth = noOfGroupedBytes * valueByteWidth + (noOfGroupedBytes-1)*valueByteSpacingWidth;
458 Okteta::PixelX charAndValueGroupWidth = (valueByteGroupWidth + valueByteGroupSpacingWidth) + charByteGroupWidth;
462 // the last value byte group does not need a group spacing behind, but it gets into the calculation.
LineSize noOfLines() const
tells how much lines this layout needs (incl.
Definition: bytearraytablelayout.h:221
void setFirstLineOffset(Okteta::Address firstLineOffset)
Definition: bytearrayframerenderer.cpp:174
void updateWidths()
recalculates the positions of the columns and the total width
Definition: abstractcolumnframerenderer.cpp:115
Address startOffset() const
Definition: bytearraytablelayout.h:207
could it be useful to hide the data access behind an iterator? * class KDataBufferIterator { public: ...
Definition: abstractbytearraymodel.h:79
static ValueCodec * createCodec(ValueCoding valueCoding)
Definition: valuecodec.cpp:36
static const int DefaultNoOfBytesPerLine
Definition: bytearrayframerenderer.cpp:51
bool setSubstituteChar(QChar substituteChar)
sets the substitute character for "unprintable" chars returns true if there was a change ...
Definition: charbytearraycolumnrenderer.h:90
void setNoOfLinesPerPage(LineSize noOfLinesPerPage)
sets number of lines per page, 1 as default
Definition: bytearraytablelayout.cpp:138
a class to control all the ranges like marking and selections holds also all modified ranges and merg...
Definition: bytearraytableranges.h:45
Size noOfBytesPerLine() const
returns number of bytes per line
Definition: bytearraytablelayout.h:209
int visibleByteArrayCodings() const
Definition: bytearrayframerenderer.cpp:125
void setLayoutStyle(LayoutStyle style)
Definition: bytearrayframerenderer.cpp:204
Address firstLineOffset() const
Definition: bytearraytablelayout.h:208
Okteta::LineSize noOfLines() const
returns the number of all lines
Definition: abstractcolumnframerenderer.cpp:85
bool setBinaryGapWidth(PixelX binaryGapWidth)
sets the spacing in the middle of a binary byte in the value column
Definition: valuebytearraycolumnrenderer.cpp:65
Okteta::CharCodec * mCharCodec
Definition: bytearrayframerenderer.h:165
Okteta::PixelX binaryGapWidth() const
Definition: bytearrayframerenderer.cpp:117
Okteta::Address offset() const
Definition: bytearrayframerenderer.cpp:106
void showByteArrayColumns(int CCs)
Definition: bytearrayframerenderer.cpp:503
Okteta::PixelX byteSpacingWidth() const
Definition: bytearrayframerenderer.cpp:114
QChar undefinedChar() const
Definition: bytearrayframerenderer.cpp:120
Okteta::ValueCoding mValueCoding
Definition: bytearrayframerenderer.h:163
void setBinaryGapWidth(Okteta::PixelX binaryGapWidth)
Definition: bytearrayframerenderer.cpp:249
Okteta::PrintColumnStylist * mStylist
Definition: bytearrayframerenderer.h:157
Definition: bytearrayframerenderer.h:51
void resetXBuffer()
creates new buffer for x-values; to be called on any change of NoOfBytesPerLine or metrics ...
Definition: abstractbytearraycolumnrenderer.cpp:77
static const Okteta::ValueCoding DefaultValueCoding
Definition: bytearrayframerenderer.cpp:53
void setBufferSpacing(Okteta::PixelX byteSpacing, int noOfGroupedBytes, Okteta::PixelX groupSpacing)
Definition: bytearrayframerenderer.cpp:195
bool offsetColumnVisible() const
Definition: bytearrayframerenderer.cpp:124
Okteta::LineSize noOfLinesPerFrame() const
returns number of fully visible lines, at least 1 (as needed by page down/up) doesn't care about the ...
Definition: abstractcolumnframerenderer.cpp:121
Okteta::ByteArrayTableLayout * mLayout
holds the logical layout
Definition: bytearrayframerenderer.h:148
PixelX groupSpacingWidth() const
Definition: abstractbytearraycolumnrenderer.h:252
column that does nothing but draw a vertical line in the middle of the column
Definition: bordercolumnrenderer.h:38
void setGroupSpacingWidth(Okteta::PixelX groupSpacingWidth)
Definition: bytearrayframerenderer.cpp:241
buffer column which displays the numerical values of the bytes
Definition: valuebytearraycolumnrenderer.h:39
virtual void setLineHeight(Okteta::PixelY NewLineHeight)
sets height of all lines and propagates this information to all columns doesn't update the content si...
Definition: abstractcolumnframerenderer.cpp:100
void setShowsNonprinting(bool showsNonprinting)
Definition: bytearrayframerenderer.cpp:267
Okteta::PixelY columnsHeight() const
returns the height of all lines together
Definition: abstractcolumnframerenderer.cpp:88
bool setFirstLineOffset(Address firstLineOffset)
sets mStartOffset, returns true if changed
Definition: bytearraytablelayout.cpp:63
void adjustToLayoutNoOfBytesPerLine()
Definition: bytearrayframerenderer.cpp:386
Okteta::Size length() const
Definition: bytearrayframerenderer.cpp:107
the logical layout of a byte array table for a view
Definition: bytearraytablelayout.h:61
void setByteSpacingWidth(Okteta::PixelX byteSpacingWidth)
Definition: bytearrayframerenderer.cpp:226
PixelX digitWidth() const
Definition: abstractbytearraycolumnrenderer.h:250
virtual int framesCount() const
Definition: bytearrayframerenderer.cpp:131
void setValueCodec(ValueCoding valueCoding, const ValueCodec *valueCodec)
Definition: valuebytearraycolumnrenderer.cpp:51
PixelX byteWidth() const
Definition: abstractbytearraycolumnrenderer.h:249
virtual Size size() const =0
void setValueCoding(Okteta::ValueCoding valueCoding)
Definition: bytearrayframerenderer.cpp:273
Okteta::CharByteArrayColumnRenderer * mCharColumnRenderer
Definition: bytearrayframerenderer.h:156
Okteta::CharCoding charCoding() const
Definition: bytearrayframerenderer.cpp:121
QChar substituteChar() const
returns the actually used substitute character for "unprintable" chars, default is '...
Definition: charbytearraycolumnrenderer.h:87
Okteta::BorderColumnRenderer * mFirstBorderColumnRenderer
Definition: bytearrayframerenderer.h:153
PixelX visibleWidth() const
convenience: returns width if visible else 0
Definition: abstractcolumnrenderer.cpp:46
bool setShowingNonprinting(bool showingNonprinting=true)
sets whether "unprintable" chars (>32) should be displayed in the char column with their correspondin...
Definition: charbytearraycolumnrenderer.h:108
Definition: charcodec.h:42
int noOfGroupedBytes() const
Definition: bytearrayframerenderer.cpp:115
void showOffsetColumn(bool visible)
Definition: bytearrayframerenderer.cpp:394
virtual void setNoOfLines(Okteta::LineSize NewNoOfLines)
sets the number of lines doesn't update the content size
Definition: abstractcolumnframerenderer.cpp:91
virtual void renderFrame(QPainter *painter, int frameIndex)
Definition: abstractcolumnframerenderer.cpp:157
Okteta::AbstractByteArrayModel * mByteArrayModel
Definition: bytearrayframerenderer.h:144
Class that is able to convert codings to and from hexadecimal, decimal, octal, and binary...
Definition: valuecodec.h:45
virtual ~ByteArrayFrameRenderer()
Definition: bytearrayframerenderer.cpp:518
void setUndefinedChar(QChar undefinedChar)
Definition: bytearrayframerenderer.cpp:262
int fittingBytesPerLine() const
Definition: bytearrayframerenderer.cpp:430
static CharCodec * createCodec(CharCoding charCoding)
Definition: charcodec.cpp:68
static const Okteta::Address DefaultFirstLineOffset
Definition: bytearrayframerenderer.cpp:50
Okteta::ByteArrayTableRanges * mTableRanges
Definition: bytearrayframerenderer.h:149
void setSubstituteChar(QChar substituteChar)
Definition: bytearrayframerenderer.cpp:257
bool setNoOfGroupedBytes(int noOfGroupedBytes)
sets the number of grouped bytes in the hex column
Definition: abstractbytearraycolumnrenderer.cpp:140
Okteta::Address startOffset() const
Definition: bytearrayframerenderer.cpp:111
bool setGroupSpacingWidth(PixelX groupSpacingWidth)
sets the spacing between the groups of bytes in the hex column
Definition: abstractbytearraycolumnrenderer.cpp:154
QChar undefinedChar() const
returns the actually used undefined character for "undefined" chars, default is '?'
Definition: charbytearraycolumnrenderer.h:88
bool setSpacing(PixelX byteSpacingWidth, int noOfGroupedBytes=0, PixelX groupSpacingWidth=0)
sets the spacing in the hex column
Definition: abstractbytearraycolumnrenderer.cpp:106
LayoutStyle mResizeStyle
Definition: bytearrayframerenderer.h:170
void setByteArrayModel(Okteta::AbstractByteArrayModel *byteArrayModel, Okteta::Address offset=0, Okteta::Size length=-1)
Definition: bytearrayframerenderer.cpp:143
void setFont(const QFont &font)
Definition: bytearrayframerenderer.cpp:335
void set(AbstractByteArrayModel *byteArrayModel)
Definition: abstractbytearraycolumnrenderer.cpp:70
Okteta::PixelY lineHeight() const
returns the height of each line
Definition: abstractcolumnframerenderer.cpp:86
PixelX binaryGapWidth() const
Definition: valuebytearraycolumnrenderer.h:84
const QString & charCodingName() const
Definition: bytearrayframerenderer.cpp:122
QChar substituteChar() const
Definition: bytearrayframerenderer.cpp:119
bool setUndefinedChar(QChar undefinedChar)
sets the undefined character for "undefined" chars returns true if there was a change ...
Definition: charbytearraycolumnrenderer.h:99
Okteta::Address firstLineOffset() const
Definition: bytearrayframerenderer.cpp:110
bool setByteArrayOffset(Address byteArrayOffset)
sets offset in the data to display, returns true if changed
Definition: bytearraytablelayout.cpp:99
Okteta::ValueByteArrayColumnRenderer * mValueColumnRenderer
Definition: bytearrayframerenderer.h:154
Okteta::ValueCoding valueCoding() const
Definition: bytearrayframerenderer.cpp:113
bool showsNonprinting() const
Definition: bytearrayframerenderer.cpp:118
LayoutStyle layoutStyle() const
Definition: bytearrayframerenderer.cpp:112
void setStartOffset(Okteta::Address startOffset)
Definition: bytearrayframerenderer.cpp:184
Okteta::PixelX columnsWidth() const
returns the width of all visible columns together
Definition: abstractcolumnframerenderer.cpp:89
virtual const QString & name() const =0
Okteta::PixelX groupSpacingWidth() const
Definition: bytearrayframerenderer.cpp:116
void addColumn(Okteta::AbstractColumnRenderer *column)
takes ownership of column renderer
Definition: abstractcolumnframerenderer.cpp:137
bool setLength(Size length)
sets length of data to display, returns true if changed
Definition: bytearraytablelayout.cpp:119
static const LayoutStyle DefaultResizeStyle
Definition: bytearrayframerenderer.cpp:52
static const Okteta::CharCoding DefaultCharCoding
Definition: bytearrayframerenderer.cpp:54
int noOfBytesPerLine() const
Definition: bytearrayframerenderer.cpp:109
virtual void renderFrame(QPainter *painter, int frameIndex)
Definition: bytearrayframerenderer.cpp:358
void setHeight(int height)
Definition: bytearrayframerenderer.cpp:163
Okteta::OffsetColumnRenderer * mOffsetColumnRenderer
Definition: bytearrayframerenderer.h:152
Okteta::AbstractByteArrayModel * byteArrayModel() const
Definition: bytearrayframerenderer.cpp:105
bool isShowingNonprinting() const
returns true if "unprintable" chars (>32) are displayed in the char column with their corresponding c...
Definition: charbytearraycolumnrenderer.h:86
Definition: bytearrayframerenderer.h:51
void setNoOfGroupedBytes(int noOfGroupedBytes)
Definition: bytearrayframerenderer.cpp:233
void setFontMetrics(const QFontMetrics &fontMetrics)
Definition: offsetcolumnrenderer.cpp:124
virtual unsigned int encodingWidth() const =0
void adjustLayoutToSize()
Definition: bytearrayframerenderer.cpp:370
buffer column that interprets the bytes as chars
Definition: charbytearraycolumnrenderer.h:37
ByteArrayFrameRenderer()
Definition: bytearrayframerenderer.cpp:61
Okteta::ValueCodec * mValueCodec
Definition: bytearrayframerenderer.h:161
Okteta::BorderColumnRenderer * mSecondBorderColumnRenderer
Definition: bytearrayframerenderer.h:155
virtual void prepare()
painting will start, fix all things like Time and Data
Definition: bytearrayframerenderer.cpp:354
bool setStartOffset(Address startOffset)
sets mStartOffset, returns true if changed
Definition: bytearraytablelayout.cpp:46
Okteta::CharCoding mCharCoding
Definition: bytearrayframerenderer.h:167
void setCharCoding(Okteta::CharCoding charCoding)
Definition: bytearrayframerenderer.cpp:299
void setFontMetrics(const QFontMetrics &fontMetrics)
sets the metrics of the used font
Definition: abstractbytearraycolumnrenderer.cpp:91
bool setNoOfBytesPerLine(LineSize noOfBytesPerLine)
sets number of bytes per line, returns true if changed
Definition: bytearraytablelayout.cpp:81
int noOfGroupedBytes() const
Definition: abstractbytearraycolumnrenderer.h:254
bool setByteSpacingWidth(PixelX byteSpacingWidth)
sets the spacing between the bytes in the hex column
Definition: abstractbytearraycolumnrenderer.cpp:124
PixelX byteSpacingWidth() const
Definition: abstractbytearraycolumnrenderer.h:251
Definition: oktetacore.h:34
Size length() const
returns the length of the displayed byte array section
Definition: bytearraytablelayout.h:211
static const Okteta::Address DefaultStartOffset
Definition: bytearrayframerenderer.cpp:49
void setNoOfBytesPerLine(int noOfBytesPerLine)
Definition: bytearrayframerenderer.cpp:215
void setCharCodec(const CharCodec *charCodec)
sets the codec to be used by the char column.
Definition: abstractbytearraycolumnrenderer.h:262
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.