okteta
KHEUI::ByteArrayTableLayout Class Reference
#include <bytearraytablelayout.h>
Detailed Description
the logical layout of a byte array table for a viewGiven the values for * number of bytes per line, * a possible offset of the first line displayed, * a possible offset of the displayed bytearray, and * length of the byte array * the number of lines per page jump the following values are calculated: * starting line of display, * starting position in this line, * final line of display, * final position in this line, and * the total number of lines (is final line +1 or 0)
This layout sees the buffer as a continuous stream of byte, thus uses each line after the start from the begin to the end.
If the buffer is empty the end coord will be set one pos left to the start coord to easen the cursor handling.
Definition at line 59 of file bytearraytablelayout.h.
Constructor & Destructor Documentation
| KHEUI::ByteArrayTableLayout::ByteArrayTableLayout | ( | int | noOfBytesPerLine, | |
| int | firstLineOffset, | |||
| int | startOffset, | |||
| int | length | |||
| ) |
Definition at line 31 of file bytearraytablelayout.cpp.
| KHEUI::ByteArrayTableLayout::~ByteArrayTableLayout | ( | ) |
Definition at line 272 of file bytearraytablelayout.cpp.
Member Function Documentation
| bool KHEUI::ByteArrayTableLayout::atFirstLinePosition | ( | const Coord & | coord | ) | const |
returns true if the coord is the first in it's line.
if coord is invalid the behaviour is undefinded
Definition at line 228 of file bytearraytablelayout.cpp.
| bool KHEUI::ByteArrayTableLayout::atLastLinePosition | ( | const Coord & | coord | ) | const |
returns true if the coord is the last in it's line.
if coord is invalid the behaviour is undefinded
Definition at line 234 of file bytearraytablelayout.cpp.
| void KHEUI::ByteArrayTableLayout::calcEnd | ( | ) | [protected] |
calculates the final coord by startoffset, length, and number of bytes per line
Definition at line 126 of file bytearraytablelayout.cpp.
| void KHEUI::ByteArrayTableLayout::calcStart | ( | ) | [protected] |
calculates the start coord by startoffset and number of bytes per line
Definition at line 120 of file bytearraytablelayout.cpp.
calculates the coord in which index is found If the index is below the first index the first coord is returned, if the index is above the last index the last coord is returned
Definition at line 167 of file bytearraytablelayout.cpp.
calculates the coord in which index is found.
if index is invalid the behaviour is undefinded
Definition at line 197 of file bytearraytablelayout.cpp.
| CoordRange KHEUI::ByteArrayTableLayout::coordRangeOfIndizes | ( | const KHE::KSection & | indizes | ) | const |
calculates the range of coords in which the indizes are found.
if indizes are invalid the behaviour is undefinded
Definition at line 202 of file bytearraytablelayout.cpp.
returns the coord if valid or the nearest valid coord
Definition at line 219 of file bytearraytablelayout.cpp.
returns the index if valid or the nearest valid index
Definition at line 211 of file bytearraytablelayout.cpp.
| Coord KHEUI::ByteArrayTableLayout::finalCoord | ( | ) | const [inline] |
| int KHEUI::ByteArrayTableLayout::finalLine | ( | ) | const [inline] |
Definition at line 207 of file bytearraytablelayout.h.
| int KHEUI::ByteArrayTableLayout::finalLinePosition | ( | ) | const [inline] |
Definition at line 205 of file bytearraytablelayout.h.
| int KHEUI::ByteArrayTableLayout::firstLineOffset | ( | ) | const [inline] |
Definition at line 198 of file bytearraytablelayout.h.
returns the valid Pos or the first Pos in line.
if coord is invalid the behaviour is undefinded
Definition at line 247 of file bytearraytablelayout.cpp.
returns the first Pos in line.
if line is invalid the behaviour is undefinded
Definition at line 257 of file bytearraytablelayout.cpp.
| bool KHEUI::ByteArrayTableLayout::hasContent | ( | int | line | ) | const |
calculates the index of the coord If the coord is before the first coord the first index is returned, if the coord is behind the last coord the last index is returned
Definition at line 149 of file bytearraytablelayout.cpp.
calculates the index of the first pos in line.
If the line is below the first line the first index is returned, if the line is above the last line the last index is returned
Definition at line 133 of file bytearraytablelayout.cpp.
calculates the index of last pos in line If the line is below the first line the first index is returned, if the line is above the last line the last index is returned
Definition at line 141 of file bytearraytablelayout.cpp.
calculates the index of coord.
if coord is invalid the behaviour is undefinded
Definition at line 187 of file bytearraytablelayout.cpp.
calculates the index of the first pos in line.
if line is invalid the behaviour is undefinded
Definition at line 175 of file bytearraytablelayout.cpp.
calculates the index of last pos in line.
if line is invalid the behaviour is undefinded
Definition at line 181 of file bytearraytablelayout.cpp.
returns the valid Pos or the last Pos in line.
if coord is invalid the behaviour is undefinded
Definition at line 252 of file bytearraytablelayout.cpp.
returns the last Pos in line.
if line is invalid the behaviour is undefinded
Definition at line 262 of file bytearraytablelayout.cpp.
| int KHEUI::ByteArrayTableLayout::length | ( | ) | const [inline] |
returns the length of the displayed byte array section
Definition at line 200 of file bytearraytablelayout.h.
calculates the line in which index is found If the index is below the first index the first line is returned, if the index is above the last index the last line is returned
Definition at line 159 of file bytearraytablelayout.cpp.
calculates the line in which index is found.
if index is invalid the behaviour is undefinded
Definition at line 192 of file bytearraytablelayout.cpp.
| KHE::KSection KHEUI::ByteArrayTableLayout::linePositions | ( | int | line | ) | const |
| int KHEUI::ByteArrayTableLayout::noOfBytesPerLine | ( | ) | const [inline] |
| int KHEUI::ByteArrayTableLayout::noOfLines | ( | ) | const [inline] |
tells how much lines this layout needs (incl.
blank leading lines due to mStartOffset and mFirstLineOffset)
Definition at line 209 of file bytearraytablelayout.h.
| int KHEUI::ByteArrayTableLayout::noOfLinesPerPage | ( | ) | const [inline] |
| bool KHEUI::ByteArrayTableLayout::setFirstLineOffset | ( | int | firstLineOffset | ) |
| bool KHEUI::ByteArrayTableLayout::setLength | ( | int | length | ) |
sets length of data to display, returns true if changed
Definition at line 97 of file bytearraytablelayout.cpp.
| bool KHEUI::ByteArrayTableLayout::setNoOfBytesPerLine | ( | int | noOfBytesPerLine | ) |
sets number of bytes per line, returns true if changed
Definition at line 79 of file bytearraytablelayout.cpp.
| void KHEUI::ByteArrayTableLayout::setNoOfLinesPerPage | ( | int | noOfLinesPerPage | ) |
sets number of lines per page, 1 as default
Definition at line 114 of file bytearraytablelayout.cpp.
| bool KHEUI::ByteArrayTableLayout::setStartOffset | ( | int | startOffset | ) |
| Coord KHEUI::ByteArrayTableLayout::startCoord | ( | ) | const [inline] |
| int KHEUI::ByteArrayTableLayout::startLine | ( | ) | const [inline] |
Definition at line 206 of file bytearraytablelayout.h.
| int KHEUI::ByteArrayTableLayout::startLinePosition | ( | ) | const [inline] |
Definition at line 204 of file bytearraytablelayout.h.
| int KHEUI::ByteArrayTableLayout::startOffset | ( | ) | const [inline] |
Definition at line 197 of file bytearraytablelayout.h.
Member Data Documentation
CoordRange KHEUI::ByteArrayTableLayout::mCoordRange [protected] |
Definition at line 193 of file bytearraytablelayout.h.
int KHEUI::ByteArrayTableLayout::mFirstLineOffset [protected] |
int KHEUI::ByteArrayTableLayout::mLength [protected] |
int KHEUI::ByteArrayTableLayout::mNoOfBytesPerLine [protected] |
int KHEUI::ByteArrayTableLayout::mNoOfLinesPerPage [protected] |
number of lines that are moved by page up/down
Definition at line 189 of file bytearraytablelayout.h.
int KHEUI::ByteArrayTableLayout::mRelativeStartOffset [protected] |
Definition at line 185 of file bytearraytablelayout.h.
int KHEUI::ByteArrayTableLayout::mStartOffset [protected] |
The documentation for this class was generated from the following files:
KDE 4.2 API Reference