• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

okteta

  • sources
  • kde-4.12
  • kdesdk
  • okteta
  • kasten
  • gui
  • io
  • streamencoder
  • viewtext
abstractbytearraycolumntextrenderer.h
Go to the documentation of this file.
1 /*
2  This file is part of the Okteta Kasten module, made within the KDE community.
3 
4  Copyright 2003,2008 Friedrich W. H. Kossebau <kossebau@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) version 3, or any
10  later version accepted by the membership of KDE e.V. (or its
11  successor approved by the membership of KDE e.V.), which shall
12  act as a proxy defined in Section 6 of version 3 of the license.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #ifndef ABSTRACTBYTEARRAYCOLUMNTEXTRENDERER_H
24 #define ABSTRACTBYTEARRAYCOLUMNTEXTRENDERER_H
25 
26 // lib
27 #include "abstractcolumntextrenderer.h"
28 // Okteta gui
29 #include <coordrange.h>
30 
31 
32 namespace Okteta {
33 class AbstractByteArrayModel;
34 }
35 
36 
37 namespace Kasten2
38 {
39 
40 // TODO: offset should be set in renderFirstLine, calculated using coordRange,
41 // in constructor instead take startOffset
42 class AbstractByteArrayColumnTextRenderer : public AbstractColumnTextRenderer
43 {
44  private:
45  static const int DefaultTRByteSpacingWidth = 1;
46  static const int TRGroupSpacingWidth = 2;
47 
48  public:
49  AbstractByteArrayColumnTextRenderer( const Okteta::AbstractByteArrayModel* byteArrayModel, Okteta::Address offset,
50  const Okteta::CoordRange& coordRange,
51  int noOfBytesPerLine );
52  virtual ~AbstractByteArrayColumnTextRenderer();
53 
54  public: // AbstractColumnTextRenderer API
55  virtual void renderFirstLine( QTextStream* stream, int lineIndex ) const;
56  virtual void renderNextLine( QTextStream* stream, bool isSubline ) const;
57 
58  protected: // API to be reimplemented by subclasses
59  virtual void renderLine( QTextStream* stream, bool isSubline ) const = 0;
60 
61  protected:
62  void setWidths( int byteWidth, int byteSpacingWidth, int noOfGroupedBytes );
63 
64  protected:
65  const Okteta::AbstractByteArrayModel* mByteArrayModel;
66 
67  const Okteta::CoordRange mCoordRange;
68 
69  const int mNoOfBytesPerLine;
70 
72  mutable int mRenderLine;
74  mutable Okteta::Address mOffset;
75 
77  int mNoOfCharsPerLine;
78  // positions where to paint the
79  int* const mLinePositions;
80 };
81 
82 }
83 
84 #endif
Okteta::CoordRange
describes a range in the buffercoord
Definition: coordrange.h:51
Okteta::Address
qint32 Address
Definition: address.h:34
Okteta::AbstractByteArrayModel
could it be useful to hide the data access behind an iterator? * class KDataBufferIterator { public: ...
Definition: abstractbytearraymodel.h:79
Kasten2::AbstractByteArrayColumnTextRenderer::renderNextLine
virtual void renderNextLine(QTextStream *stream, bool isSubline) const
Definition: abstractbytearraycolumntextrenderer.cpp:84
Kasten2::AbstractColumnTextRenderer
interface for the text export of columns
Definition: abstractcolumntextrenderer.h:36
Kasten2::AbstractByteArrayColumnTextRenderer::mNoOfBytesPerLine
const int mNoOfBytesPerLine
Definition: abstractbytearraycolumntextrenderer.h:69
Kasten2::AbstractByteArrayColumnTextRenderer::setWidths
void setWidths(int byteWidth, int byteSpacingWidth, int noOfGroupedBytes)
Definition: abstractbytearraycolumntextrenderer.cpp:43
Kasten2::AbstractByteArrayColumnTextRenderer::renderLine
virtual void renderLine(QTextStream *stream, bool isSubline) const =0
Kasten2::AbstractByteArrayColumnTextRenderer::mCoordRange
const Okteta::CoordRange mCoordRange
Definition: abstractbytearraycolumntextrenderer.h:67
abstractcolumntextrenderer.h
Kasten2::AbstractByteArrayColumnTextRenderer::mLinePositions
int *const mLinePositions
Definition: abstractbytearraycolumntextrenderer.h:79
Kasten2::AbstractByteArrayColumnTextRenderer
Definition: abstractbytearraycolumntextrenderer.h:42
Kasten2::AbstractByteArrayColumnTextRenderer::mByteArrayModel
const Okteta::AbstractByteArrayModel * mByteArrayModel
Definition: abstractbytearraycolumntextrenderer.h:65
Kasten2::AbstractByteArrayColumnTextRenderer::mNoOfCharsPerLine
int mNoOfCharsPerLine
buffered value of how many chars a line needs
Definition: abstractbytearraycolumntextrenderer.h:77
Kasten2::AbstractByteArrayColumnTextRenderer::mOffset
Okteta::Address mOffset
Data to print.
Definition: abstractbytearraycolumntextrenderer.h:74
Kasten2::AbstractByteArrayColumnTextRenderer::AbstractByteArrayColumnTextRenderer
AbstractByteArrayColumnTextRenderer(const Okteta::AbstractByteArrayModel *byteArrayModel, Okteta::Address offset, const Okteta::CoordRange &coordRange, int noOfBytesPerLine)
Definition: abstractbytearraycolumntextrenderer.cpp:32
Kasten2::AbstractByteArrayColumnTextRenderer::mRenderLine
int mRenderLine
Line to print.
Definition: abstractbytearraycolumntextrenderer.h:72
Kasten2::AbstractByteArrayColumnTextRenderer::~AbstractByteArrayColumnTextRenderer
virtual ~AbstractByteArrayColumnTextRenderer()
Definition: abstractbytearraycolumntextrenderer.cpp:89
coordrange.h
Kasten2::AbstractByteArrayColumnTextRenderer::renderFirstLine
virtual void renderFirstLine(QTextStream *stream, int lineIndex) const
Definition: abstractbytearraycolumntextrenderer.cpp:77
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

Skip menu "okteta"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal