okteta
bytearraytablelayout.cpp
Go to the documentation of this file.
31 ByteArrayTableLayout::ByteArrayTableLayout( Size noOfBytesPerLine, Address firstLineOffset, Address startOffset,
203 return ( line == mCoordRange.start().line() ) ? mByteArrayOffset : line*mNoOfBytesPerLine-mRelativeStartOffset+mByteArrayOffset;
209 return ( line == mCoordRange.end().line() ) ? mLastByteArrayOffset : (line+1)*mNoOfBytesPerLine-mRelativeStartOffset+mByteArrayOffset-1;
256 return ( coord.line() == mCoordRange.start().line() ) ? coord.pos() == mCoordRange.start().pos():
275 return ( mCoordRange.start().isLaterInLineThan(coord) ) ? mCoordRange.start().pos() : coord.pos();
Address indexAtLastLinePosition(Line line) const
calculates the index of last pos in line.
Definition: bytearraytablelayout.cpp:207
Address correctIndex(Address index) const
returns the index if valid or the nearest valid index
Definition: bytearraytablelayout.cpp:237
Address startOffset() const
Definition: bytearraytablelayout.h:207
static const LineSize DefaultNoOfLinesPerPage
Definition: bytearraytablelayout.cpp:29
KDE::NumberRange< LinePosition, LinePositionSize > LinePositionRange
Definition: linepositionrange.h:34
void setNoOfLinesPerPage(LineSize noOfLinesPerPage)
sets number of lines per page, 1 as default
Definition: bytearraytablelayout.cpp:138
Size noOfBytesPerLine() const
returns number of bytes per line
Definition: bytearraytablelayout.h:209
static Coord fromIndex(Address index, LinePositionSize lineWidth)
constructs a section by width
Definition: coord.h:190
Address mFirstLineOffset
starting offset of the first displayed line
Definition: bytearraytablelayout.h:189
Address firstLineOffset() const
Definition: bytearraytablelayout.h:208
Line lineAtCIndex(Address index) const
calculates the line in which index is found If the index is below the first index the first line is r...
Definition: bytearraytablelayout.cpp:185
bool atLastLinePosition(const Coord &coord) const
returns true if the coord is the last in it's line.
Definition: bytearraytablelayout.cpp:260
Address mRelativeStartOffset
Definition: bytearraytablelayout.h:193
void calcStart()
calculates the start coord by startoffset and number of bytes per line
Definition: bytearraytablelayout.cpp:144
LinePositionRange linePositions(Line line) const
returns the used positions in line
Definition: bytearraytablelayout.cpp:267
LineSize noOfLinesPerPage() const
returns number of lines per visual page
Definition: bytearraytablelayout.h:220
bool setFirstLineOffset(Address firstLineOffset)
sets mStartOffset, returns true if changed
Definition: bytearraytablelayout.cpp:63
Coord correctCoord(const Coord &coord) const
returns the coord if valid or the nearest valid coord
Definition: bytearraytablelayout.cpp:245
Address indexAtCCoord(const Coord &coord) const
calculates the index of the coord If the coord is before the first coord the first index is returned...
Definition: bytearraytablelayout.cpp:175
void calcEnd()
calculates the final coord by startoffset, length, and number of bytes per line
Definition: bytearraytablelayout.cpp:150
bool hasContent(Line line) const
returns true if the line has content
Definition: bytearraytablelayout.cpp:293
Coord coordOfIndex(Address index) const
calculates the coord in which index is found.
Definition: bytearraytablelayout.cpp:223
CoordRange mCoordRange
Definition: bytearraytablelayout.h:203
LinePosition firstLinePosition(Line line) const
returns the first Pos in line.
Definition: bytearraytablelayout.cpp:283
Address indexAtCFirstLinePosition(Line line) const
calculates the index of the first pos in line.
Definition: bytearraytablelayout.cpp:159
Address indexAtCLastLinePosition(Line line) const
calculates the index of last pos in line If the line is below the first line the first index is retur...
Definition: bytearraytablelayout.cpp:167
LineSize mNoOfLinesPerPage
number of lines that are moved by page up/down
Definition: bytearraytablelayout.h:199
bool setByteArrayOffset(Address byteArrayOffset)
sets offset in the data to display, returns true if changed
Definition: bytearraytablelayout.cpp:99
Address indexAtCoord(const Coord &coord) const
calculates the index of coord.
Definition: bytearraytablelayout.cpp:213
CoordRange coordRangeOfIndizes(const AddressRange &indizes) const
calculates the range of coords in which the indizes are found.
Definition: bytearraytablelayout.cpp:228
Address mLastByteArrayOffset
last offset in the displayed bytearray section
Definition: bytearraytablelayout.h:197
ByteArrayTableLayout(Size noOfBytesPerLine, Address firstLineOffset, Address startOffset, Address byteArrayOffset, Size byteArrayLength)
Definition: bytearraytablelayout.cpp:31
bool setLength(Size length)
sets length of data to display, returns true if changed
Definition: bytearraytablelayout.cpp:119
Address indexAtFirstLinePosition(Line line) const
calculates the index of the first pos in line.
Definition: bytearraytablelayout.cpp:201
Address byteArrayOffset() const
returns the offset of the start of the displayed byte array section
Definition: bytearraytablelayout.h:210
~ByteArrayTableLayout()
Definition: bytearraytablelayout.cpp:298
bool atFirstLinePosition(const Coord &coord) const
returns true if the coord is the first in it's line.
Definition: bytearraytablelayout.cpp:254
Address mStartOffset
starting offset of the displayed bytearray
Definition: bytearraytablelayout.h:191
bool includesLine(Line line) const
tests if the given line is included by the range.
Definition: coordrange.h:107
Line lineAtIndex(Address index) const
calculates the line in which index is found.
Definition: bytearraytablelayout.cpp:218
bool setStartOffset(Address startOffset)
sets mStartOffset, returns true if changed
Definition: bytearraytablelayout.cpp:46
LinePosition lastLinePosition(Line line) const
returns the last Pos in line.
Definition: bytearraytablelayout.cpp:288
bool setNoOfBytesPerLine(LineSize noOfBytesPerLine)
sets number of bytes per line, returns true if changed
Definition: bytearraytablelayout.cpp:81
Address indexByLineWidth(LinePositionSize lineWidth) const
calculates the index the coord is at with a given line width If the coord is invalid the result is un...
Definition: coord.h:282
Coord coordOfCIndex(Address index) const
calculates the coord in which index is found If the index is below the first index the first coord is...
Definition: bytearraytablelayout.cpp:193
Size length() const
returns the length of the displayed byte array section
Definition: bytearraytablelayout.h:211
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.