• 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
  • gui
bytearrayrowview_p.h
Go to the documentation of this file.
1 /*
2  This file is part of the Okteta Gui library, made within the KDE community.
3 
4  Copyright 2008-2010 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 OKTETA_BYTEARRAYROWVIEW_P_H
24 #define OKTETA_BYTEARRAYROWVIEW_P_H
25 
26 // lib
27 #include "bytearrayrowview.h"
28 #include "abstractbytearrayview_p.h"
29 #include "bytearrayrowcolumnrenderer.h"
30 
31 
32 namespace Okteta
33 {
34 class Coord;
35 
36 
37 class ByteArrayRowViewPrivate : public AbstractByteArrayViewPrivate
38 {
39  Q_DECLARE_PUBLIC( ByteArrayRowView )
40 
41  public:
42  explicit ByteArrayRowViewPrivate( ByteArrayRowView* parent );
43  virtual ~ByteArrayRowViewPrivate();
44 
45  public:
46  void init();
47 
48  public:
49  // value column
50  int/*PixelX*/ byteSpacingWidth() const;
51  int noOfGroupedBytes() const;
52  int/*PixelX*/ groupSpacingWidth() const;
53  int/*PixelX*/ binaryGapWidth() const;
54 
55  // char column
56  bool showsNonprinting() const;
57  QChar substituteChar() const;
58  QChar undefinedChar() const;
59 
60  bool isByteTypeColored() const;
61 
62  public: // logic value service
63  QSize minimumSizeHint() const;
64 
65  public: // modification access
66  void setByteArrayModel( AbstractByteArrayModel* byteArrayModel );
67 
68  public: // AbstractByteArrayViewPrivate API
69  virtual void ensureVisible( const AddressRange& range, bool ensureStartVisible );
70  virtual void ensureCursorVisible();
71  virtual void placeCursor( const QPoint& point );
72  virtual QRect cursorRect() const;
73  virtual Address indexByPoint( const QPoint& point ) const;
74  virtual void blinkCursor();
75 
76  public:
77  // setting parameters
78  // value column parameters
79  void setByteSpacingWidth( int/*PixelX*/ byteSpacingWidth ) ;
80  void setNoOfGroupedBytes( int noOfGroupedBytes );
81  void setGroupSpacingWidth( int/*PixelX*/ groupSpacingWidth );
82  void setBinaryGapWidth( int binaryGapWidth );
83  void setBufferSpacing( /*PixelX*/int byteSpacingWidth, int noOfGroupedBytes, /*PixelX*/int groupSpacingWidth );
84  void setValueCoding( AbstractByteArrayView::ValueCoding valueCoding );
85  // char column parameters
86  void setShowsNonprinting( bool showsNonprinting = true );
87  void setSubstituteChar( QChar substituteChar );
88  void setUndefinedChar( QChar undefinedChar );
89  void setCharCoding( AbstractByteArrayView::CharCoding charCoding );
90  void setCharCoding( const QString& charCodingName );
91  void setByteTypeColored( bool isColored );
92 
93  protected: // drawing related operations
95  void createCursorPixmaps();
97  void drawActiveCursor( QPainter* painter );
98  void drawInactiveCursor( QPainter* painter );
99  void updateCursor( const ByteArrayRowColumnRenderer& column, AbstractByteArrayView::CodingTypeId codingId );
100 
101  protected: // partial operations
102  void changeEvent( QEvent* event );
103 
104  protected:
108  void ensureVisible( const ByteArrayRowColumnRenderer& column, const Coord& coord );
109  void renderColumns( QPainter* painter, int cx, int cy, int cw, int ch );
110 
111  protected: // AbstractByteArrayViewPrivate API
112  // cursor control
113  virtual void pauseCursor();
114  virtual void updateCursors();
115 
116  virtual void setActiveCoding( AbstractByteArrayView::CodingTypeId codingId );
117  virtual void setVisibleCodings( int visibleCodings );
118 
119  protected: // AbstractByteArrayViewPrivate API
120  virtual AbstractByteArrayView::CodingTypeId activeCoding() const;
121  virtual AbstractByteArrayView::CodingTypes visibleCodings() const;
122  virtual int fittingBytesPerLine() const;
123  virtual void adjustToLayoutNoOfBytesPerLine();
124  virtual void updateChanged();
125 
126  protected:
127  ByteArrayRowColumnRenderer* mByteArrayColumn;
128 
129  ByteArrayRowView::CodingTypeId mActiveCoding;
130  ByteArrayRowView::CodingTypeId mInactiveCoding;
131 };
132 
133 
134 inline PixelX ByteArrayRowViewPrivate::byteSpacingWidth() const { return mByteArrayColumn->byteSpacingWidth(); }
135 inline int ByteArrayRowViewPrivate::noOfGroupedBytes() const { return mByteArrayColumn->noOfGroupedBytes(); }
136 inline PixelX ByteArrayRowViewPrivate::groupSpacingWidth() const { return mByteArrayColumn->groupSpacingWidth(); }
137 inline PixelX ByteArrayRowViewPrivate::binaryGapWidth() const { return mByteArrayColumn->binaryGapWidth(); }
138 inline bool ByteArrayRowViewPrivate::showsNonprinting() const { return mByteArrayColumn->isShowingNonprinting(); }
139 inline QChar ByteArrayRowViewPrivate::substituteChar() const { return mByteArrayColumn->substituteChar(); }
140 inline QChar ByteArrayRowViewPrivate::undefinedChar() const { return mByteArrayColumn->undefinedChar(); }
141 inline bool ByteArrayRowViewPrivate::isByteTypeColored() const { return mByteArrayColumn->isByteTypeColored(); }
142 
143 }
144 
145 #endif
Okteta::ByteArrayRowViewPrivate::updateChanged
virtual void updateChanged()
repaints all the parts that are signed as changed
Okteta::ByteArrayRowView
Definition: bytearrayrowview.h:35
Okteta::ByteArrayRowViewPrivate::updateCursors
virtual void updateCursors()
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
Okteta::ByteArrayRowViewPrivate::fittingBytesPerLine
virtual int fittingBytesPerLine() const
Okteta::ByteArrayRowViewPrivate::ByteArrayRowViewPrivate
ByteArrayRowViewPrivate(ByteArrayRowView *parent)
Okteta::ByteArrayRowViewPrivate::pauseCursor
virtual void pauseCursor()
Okteta::ByteArrayRowViewPrivate::blinkCursor
virtual void blinkCursor()
Okteta::ByteArrayRowViewPrivate::~ByteArrayRowViewPrivate
virtual ~ByteArrayRowViewPrivate()
Okteta::ByteArrayRowViewPrivate::setByteTypeColored
void setByteTypeColored(bool isColored)
Okteta::ByteArrayRowViewPrivate::mInactiveCoding
ByteArrayRowView::CodingTypeId mInactiveCoding
Definition: bytearrayrowview_p.h:130
Okteta::ByteArrayRowViewPrivate::init
void init()
Okteta::ByteArrayRowViewPrivate::mByteArrayColumn
ByteArrayRowColumnRenderer * mByteArrayColumn
Definition: bytearrayrowview_p.h:127
Okteta::AbstractByteArrayView::CharCoding
CharCoding
Definition: abstractbytearrayview.h:99
Okteta::ByteArrayRowColumnRenderer::undefinedChar
QChar undefinedChar() const
returns the actually used undefined character for "undefined" chars, default is '?'
Definition: bytearrayrowcolumnrenderer.h:351
Okteta::ByteArrayRowViewPrivate::binaryGapWidth
int binaryGapWidth() const
Definition: bytearrayrowview_p.h:137
Okteta::ByteArrayRowViewPrivate::setVisibleCodings
virtual void setVisibleCodings(int visibleCodings)
Okteta::AbstractByteArrayViewPrivate::charCoding
AbstractByteArrayView::CharCoding charCoding() const
Definition: abstractbytearrayview_p.h:337
Okteta::ByteArrayRowViewPrivate::setBinaryGapWidth
void setBinaryGapWidth(int binaryGapWidth)
KDE::NumberRange< Address, Size >
Okteta::ByteArrayRowViewPrivate::setCharCoding
void setCharCoding(AbstractByteArrayView::CharCoding charCoding)
Okteta::ByteArrayRowViewPrivate::updateCursor
void updateCursor(const ByteArrayRowColumnRenderer &column, AbstractByteArrayView::CodingTypeId codingId)
Okteta::ByteArrayRowViewPrivate::setActiveCoding
virtual void setActiveCoding(AbstractByteArrayView::CodingTypeId codingId)
Okteta::AbstractByteArrayView::CodingTypeId
CodingTypeId
Definition: abstractbytearrayview.h:103
Okteta::Coord
a class which represents a coord in a 2-dim.
Definition: coord.h:47
Okteta::ByteArrayRowColumnRenderer::isShowingNonprinting
bool isShowingNonprinting() const
returns true if "unprintable" chars (>32) are displayed in the char column with their corresponding c...
Definition: bytearrayrowcolumnrenderer.h:349
Okteta::ByteArrayRowColumnRenderer::isByteTypeColored
bool isByteTypeColored() const
Definition: bytearrayrowcolumnrenderer.h:345
Okteta::AbstractByteArrayViewPrivate::valueCoding
AbstractByteArrayView::ValueCoding valueCoding() const
Definition: abstractbytearrayview_p.h:335
Okteta::ByteArrayRowViewPrivate::changeEvent
void changeEvent(QEvent *event)
Okteta::ByteArrayRowViewPrivate::setByteSpacingWidth
void setByteSpacingWidth(int byteSpacingWidth)
Okteta::ByteArrayRowViewPrivate::visibleCodings
virtual AbstractByteArrayView::CodingTypes visibleCodings() const
Okteta::PixelX
int PixelX
Definition: kadds.h:34
bytearrayrowcolumnrenderer.h
Okteta::ByteArrayRowViewPrivate::adjustToLayoutNoOfBytesPerLine
virtual void adjustToLayoutNoOfBytesPerLine()
recalcs all dependant values with the actual NoOfBytesPerLine
Okteta::ByteArrayRowViewPrivate::setBufferSpacing
void setBufferSpacing(int byteSpacingWidth, int noOfGroupedBytes, int groupSpacingWidth)
Okteta::ByteArrayRowColumnRenderer::byteSpacingWidth
PixelX byteSpacingWidth() const
Definition: bytearrayrowcolumnrenderer.h:325
Okteta::ByteArrayRowColumnRenderer::substituteChar
QChar substituteChar() const
returns the actually used substitute character for "unprintable" chars, default is '...
Definition: bytearrayrowcolumnrenderer.h:350
Okteta::ByteArrayRowViewPrivate::noOfGroupedBytes
int noOfGroupedBytes() const
Definition: bytearrayrowview_p.h:135
Okteta::ByteArrayRowViewPrivate::activeCoding
virtual AbstractByteArrayView::CodingTypeId activeCoding() const
Okteta::ByteArrayRowViewPrivate::minimumSizeHint
QSize minimumSizeHint() const
Okteta::ByteArrayRowViewPrivate::mActiveCoding
ByteArrayRowView::CodingTypeId mActiveCoding
Definition: bytearrayrowview_p.h:129
Okteta::ByteArrayRowViewPrivate::byteSpacingWidth
int byteSpacingWidth() const
Definition: bytearrayrowview_p.h:134
Okteta::ByteArrayRowViewPrivate::cursorRect
virtual QRect cursorRect() const
Okteta::ByteArrayRowColumnRenderer
base class of all buffer column displayers holds all information about the vertical layout of a buffe...
Definition: bytearrayrowcolumnrenderer.h:62
Okteta::ByteArrayRowColumnRenderer::noOfGroupedBytes
Size noOfGroupedBytes() const
Definition: bytearrayrowcolumnrenderer.h:328
Okteta::ByteArrayRowColumnRenderer::binaryGapWidth
PixelX binaryGapWidth() const
Definition: bytearrayrowcolumnrenderer.h:347
Okteta::ByteArrayRowViewPrivate::setValueCoding
void setValueCoding(AbstractByteArrayView::ValueCoding valueCoding)
Okteta::ByteArrayRowViewPrivate::placeCursor
virtual void placeCursor(const QPoint &point)
Okteta::ByteArrayRowViewPrivate::setByteArrayModel
void setByteArrayModel(AbstractByteArrayModel *byteArrayModel)
abstractbytearrayview_p.h
Okteta::AbstractByteArrayViewPrivate
Definition: abstractbytearrayview_p.h:59
Okteta::ByteArrayRowViewPrivate::showsNonprinting
bool showsNonprinting() const
Definition: bytearrayrowview_p.h:138
Okteta::ByteArrayRowViewPrivate::groupSpacingWidth
int groupSpacingWidth() const
Definition: bytearrayrowview_p.h:136
Okteta::AbstractByteArrayViewPrivate::charCodingName
const QString & charCodingName() const
Definition: abstractbytearrayview_p.h:341
Okteta::ByteArrayRowViewPrivate::renderColumns
void renderColumns(QPainter *painter, int cx, int cy, int cw, int ch)
Okteta::AbstractByteArrayView::ValueCoding
ValueCoding
Definition: abstractbytearrayview.h:98
Okteta::ByteArrayRowViewPrivate::setShowsNonprinting
void setShowsNonprinting(bool showsNonprinting=true)
Okteta::ByteArrayRowViewPrivate::isByteTypeColored
bool isByteTypeColored() const
Definition: bytearrayrowview_p.h:141
Okteta::ByteArrayRowViewPrivate::setNoOfGroupedBytes
void setNoOfGroupedBytes(int noOfGroupedBytes)
Okteta::ByteArrayRowViewPrivate::createCursorPixmaps
void createCursorPixmaps()
recreates the cursor pixmaps and paints active and inactive cursors if doable
Okteta::ByteArrayRowViewPrivate::ensureVisible
virtual void ensureVisible(const AddressRange &range, bool ensureStartVisible)
bytearrayrowview.h
Okteta::ByteArrayRowViewPrivate::undefinedChar
QChar undefinedChar() const
Definition: bytearrayrowview_p.h:140
Okteta::ByteArrayRowViewPrivate::setSubstituteChar
void setSubstituteChar(QChar substituteChar)
Okteta::AbstractByteArrayViewPrivate::byteArrayModel
AbstractByteArrayModel * byteArrayModel() const
Definition: abstractbytearrayview_p.h:320
Okteta::ByteArrayRowViewPrivate::indexByPoint
virtual Address indexByPoint(const QPoint &point) const
Okteta::AbstractByteArrayViewPrivate::event
bool event(QEvent *event)
Okteta::ByteArrayRowViewPrivate::ensureCursorVisible
virtual void ensureCursorVisible()
Okteta::ByteArrayRowViewPrivate::setUndefinedChar
void setUndefinedChar(QChar undefinedChar)
Okteta::ByteArrayRowColumnRenderer::groupSpacingWidth
PixelX groupSpacingWidth() const
Definition: bytearrayrowcolumnrenderer.h:326
Okteta::ByteArrayRowViewPrivate::drawActiveCursor
void drawActiveCursor(QPainter *painter)
draws the blinking cursor or removes it
Okteta::ByteArrayRowViewPrivate::setGroupSpacingWidth
void setGroupSpacingWidth(int groupSpacingWidth)
Okteta::ByteArrayRowViewPrivate::substituteChar
QChar substituteChar() const
Definition: bytearrayrowview_p.h:139
Okteta::ByteArrayRowViewPrivate::drawInactiveCursor
void drawInactiveCursor(QPainter *painter)
Okteta::ByteArrayRowViewPrivate
Definition: bytearrayrowview_p.h:37
Okteta::AbstractByteArrayView::CodingTypes
CodingTypes
Definition: abstractbytearrayview.h:104
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

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