• 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
bytearraycolumnview_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 2003,2007-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_BYTEARRAYCOLUMNVIEW_P_H
24 #define OKTETA_BYTEARRAYCOLUMNVIEW_P_H
25 
26 // lib
27 #include "bytearraycolumnview.h"
28 #include "abstractbytearrayview_p.h"
29 #include "valuebytearraycolumnrenderer.h"
30 #include "charbytearraycolumnrenderer.h"
31 
32 
33 namespace Okteta
34 {
35 class Coord;
36 
37 
38 class ByteArrayColumnViewPrivate : public AbstractByteArrayViewPrivate
39 {
40  Q_DECLARE_PUBLIC( ByteArrayColumnView )
41 
42  public:
43  explicit ByteArrayColumnViewPrivate( ByteArrayColumnView* parent );
44  virtual ~ByteArrayColumnViewPrivate();
45 
46  public:
47  void init();
48 
49  public:
50  // value column
51  int/*PixelX*/ byteSpacingWidth() const;
52  int noOfGroupedBytes() const;
53  int/*PixelX*/ groupSpacingWidth() const;
54  int/*PixelX*/ binaryGapWidth() const;
55 
56  // char column
57  bool showsNonprinting() const;
58  QChar substituteChar() const;
59  QChar undefinedChar() const;
60 
61  bool isByteTypeColored() const;
62 
63  public: // logic value service
64  QSize minimumSizeHint() const;
65 
66  public: // modification access
67  void setByteArrayModel( AbstractByteArrayModel* byteArrayModel );
68 // void repaintByte( int row, int column, bool Erase = true );
69 // void updateByte( int row, int column );
70 // void ensureByteVisible( int row, int column );
71 
72  public: // AbstractByteArrayViewPrivate API
73  virtual void ensureVisible( const AddressRange& range, bool ensureStartVisible );
74  virtual void ensureCursorVisible();
75  virtual void placeCursor( const QPoint& point );
76  virtual QRect cursorRect() const;
77  virtual Address indexByPoint( const QPoint& point ) const;
78  virtual void blinkCursor();
79 
80  public:
81  // value column parameters
82  void setByteSpacingWidth( int/*PixelX*/ byteSpacingWidth ) ;
83  void setNoOfGroupedBytes( int noOfGroupedBytes );
84  void setGroupSpacingWidth( int/*PixelX*/ groupSpacingWidth );
85  void setBinaryGapWidth( int binaryGapWidth );
86  void setBufferSpacing( /*PixelX*/int byteSpacingWidth, int noOfGroupedBytes, /*PixelX*/int groupSpacingWidth );
87  void setValueCoding( AbstractByteArrayView::ValueCoding valueCoding );
88  // char column parameters
89  void setShowsNonprinting( bool showsNonprinting = true );
90  void setSubstituteChar( QChar substituteChar );
91  void setUndefinedChar( QChar undefinedChar );
92  void setCharCoding( AbstractByteArrayView::CharCoding charCoding );
93  void setCharCoding( const QString& charCodingName );
94  void setByteTypeColored( bool isColored );
95 
96  protected: // drawing related operations
98  void createCursorPixmaps();
100  void drawActiveCursor( QPainter* painter );
101  void drawInactiveCursor( QPainter* painter );
102  void updateCursor( const AbstractByteArrayColumnRenderer& column );
103 
104  protected: // partial operations
105  void changeEvent( QEvent* event );
106 
107  protected:
111  void ensureVisible( const AbstractByteArrayColumnRenderer& column, const Coord& coord );
112  void renderColumns( QPainter* painter, int cx, int cy, int cw, int ch );
113 
114  protected: // AbstractByteArrayViewPrivate API
115  // cursor control
116  virtual void pauseCursor();
117  virtual void updateCursors();
118 
119  virtual void setActiveCoding( AbstractByteArrayView::CodingTypeId codingId );
120  virtual void setVisibleCodings( int visibleCodings );
121 
122  protected: // AbstractByteArrayViewPrivate API
123  virtual AbstractByteArrayView::CodingTypeId activeCoding() const;
124  virtual AbstractByteArrayView::CodingTypes visibleCodings() const;
125  virtual int fittingBytesPerLine() const;
126  virtual void adjustToLayoutNoOfBytesPerLine();
127  virtual void updateChanged();
128 
129  protected:
130  ValueByteArrayColumnRenderer* mValueColumn;
131  BorderColumnRenderer* mMiddleBorderColumn;
132  CharByteArrayColumnRenderer* mCharColumn;
133 
135  AbstractByteArrayColumnRenderer* mActiveColumn;
137  AbstractByteArrayColumnRenderer* mInactiveColumn;
138 };
139 
140 
141 inline PixelX ByteArrayColumnViewPrivate::byteSpacingWidth() const { return mValueColumn->byteSpacingWidth(); }
142 inline int ByteArrayColumnViewPrivate::noOfGroupedBytes() const { return mValueColumn->noOfGroupedBytes(); }
143 inline PixelX ByteArrayColumnViewPrivate::groupSpacingWidth() const { return mValueColumn->groupSpacingWidth(); }
144 inline PixelX ByteArrayColumnViewPrivate::binaryGapWidth() const { return mValueColumn->binaryGapWidth(); }
145 inline bool ByteArrayColumnViewPrivate::showsNonprinting() const { return mCharColumn->isShowingNonprinting(); }
146 inline QChar ByteArrayColumnViewPrivate::substituteChar() const { return mCharColumn->substituteChar(); }
147 inline QChar ByteArrayColumnViewPrivate::undefinedChar() const { return mCharColumn->undefinedChar(); }
148 inline bool ByteArrayColumnViewPrivate::isByteTypeColored() const { return mValueColumn->isByteTypeColored(); }
149 
150 }
151 
152 #endif
Okteta::ByteArrayColumnViewPrivate::substituteChar
QChar substituteChar() const
Definition: bytearraycolumnview_p.h:146
Okteta::ByteArrayColumnViewPrivate::ensureCursorVisible
virtual void ensureCursorVisible()
Okteta::Address
qint32 Address
Definition: address.h:34
Okteta::ByteArrayColumnViewPrivate::renderColumns
void renderColumns(QPainter *painter, int cx, int cy, int cw, int ch)
Okteta::ByteArrayColumnViewPrivate::setGroupSpacingWidth
void setGroupSpacingWidth(int groupSpacingWidth)
Okteta::AbstractByteArrayModel
could it be useful to hide the data access behind an iterator? * class KDataBufferIterator { public: ...
Definition: abstractbytearraymodel.h:79
Okteta::ByteArrayColumnViewPrivate::visibleCodings
virtual AbstractByteArrayView::CodingTypes visibleCodings() const
Okteta::ByteArrayColumnViewPrivate::init
void init()
Okteta::ByteArrayColumnViewPrivate::drawActiveCursor
void drawActiveCursor(QPainter *painter)
draws the blinking cursor or removes it
Okteta::ByteArrayColumnViewPrivate::undefinedChar
QChar undefinedChar() const
Definition: bytearraycolumnview_p.h:147
Okteta::ByteArrayColumnViewPrivate::groupSpacingWidth
int groupSpacingWidth() const
Definition: bytearraycolumnview_p.h:143
Okteta::AbstractByteArrayView::CharCoding
CharCoding
Definition: abstractbytearrayview.h:99
Okteta::ByteArrayColumnViewPrivate
Definition: bytearraycolumnview_p.h:38
Okteta::ByteArrayColumnViewPrivate::mCharColumn
CharByteArrayColumnRenderer * mCharColumn
Definition: bytearraycolumnview_p.h:132
Okteta::AbstractByteArrayViewPrivate::charCoding
AbstractByteArrayView::CharCoding charCoding() const
Definition: abstractbytearrayview_p.h:337
KDE::NumberRange< Address, Size >
Okteta::ByteArrayColumnViewPrivate::drawInactiveCursor
void drawInactiveCursor(QPainter *painter)
Okteta::ByteArrayColumnViewPrivate::fittingBytesPerLine
virtual int fittingBytesPerLine() const
Okteta::ByteArrayColumnViewPrivate::blinkCursor
virtual void blinkCursor()
Okteta::ByteArrayColumnViewPrivate::setValueCoding
void setValueCoding(AbstractByteArrayView::ValueCoding valueCoding)
Okteta::ByteArrayColumnViewPrivate::cursorRect
virtual QRect cursorRect() const
Okteta::ByteArrayColumnViewPrivate::setBinaryGapWidth
void setBinaryGapWidth(int binaryGapWidth)
Okteta::AbstractByteArrayColumnRenderer::groupSpacingWidth
PixelX groupSpacingWidth() const
Definition: abstractbytearraycolumnrenderer.h:252
Okteta::ByteArrayColumnView
the main widget
Definition: bytearraycolumnview.h:48
Okteta::BorderColumnRenderer
column that does nothing but draw a vertical line in the middle of the column
Definition: bordercolumnrenderer.h:38
valuebytearraycolumnrenderer.h
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::ValueByteArrayColumnRenderer
buffer column which displays the numerical values of the bytes
Definition: valuebytearraycolumnrenderer.h:39
Okteta::ByteArrayColumnViewPrivate::setShowsNonprinting
void setShowsNonprinting(bool showsNonprinting=true)
Okteta::AbstractByteArrayViewPrivate::valueCoding
AbstractByteArrayView::ValueCoding valueCoding() const
Definition: abstractbytearrayview_p.h:335
Okteta::ByteArrayColumnViewPrivate::updateCursors
virtual void updateCursors()
Okteta::ByteArrayColumnViewPrivate::activeCoding
virtual AbstractByteArrayView::CodingTypeId activeCoding() const
Okteta::ByteArrayColumnViewPrivate::setCharCoding
void setCharCoding(AbstractByteArrayView::CharCoding charCoding)
Okteta::ByteArrayColumnViewPrivate::setUndefinedChar
void setUndefinedChar(QChar undefinedChar)
Okteta::ByteArrayColumnViewPrivate::binaryGapWidth
int binaryGapWidth() const
Definition: bytearraycolumnview_p.h:144
Okteta::PixelX
int PixelX
Definition: kadds.h:34
Okteta::ByteArrayColumnViewPrivate::noOfGroupedBytes
int noOfGroupedBytes() const
Definition: bytearraycolumnview_p.h:142
Okteta::ByteArrayColumnViewPrivate::setNoOfGroupedBytes
void setNoOfGroupedBytes(int noOfGroupedBytes)
Okteta::CharByteArrayColumnRenderer::substituteChar
QChar substituteChar() const
returns the actually used substitute character for "unprintable" chars, default is '...
Definition: charbytearraycolumnrenderer.h:87
Okteta::ByteArrayColumnViewPrivate::setSubstituteChar
void setSubstituteChar(QChar substituteChar)
Okteta::ByteArrayColumnViewPrivate::updateCursor
void updateCursor(const AbstractByteArrayColumnRenderer &column)
Okteta::ByteArrayColumnViewPrivate::minimumSizeHint
QSize minimumSizeHint() const
Okteta::ByteArrayColumnViewPrivate::createCursorPixmaps
void createCursorPixmaps()
recreates the cursor pixmaps and paints active and inactive cursors if doable
Okteta::ByteArrayColumnViewPrivate::indexByPoint
virtual Address indexByPoint(const QPoint &point) const
Okteta::ByteArrayColumnViewPrivate::setByteSpacingWidth
void setByteSpacingWidth(int byteSpacingWidth)
Okteta::ByteArrayColumnViewPrivate::adjustToLayoutNoOfBytesPerLine
virtual void adjustToLayoutNoOfBytesPerLine()
recalcs all dependant values with the actual NoOfBytesPerLine
Okteta::ByteArrayColumnViewPrivate::mMiddleBorderColumn
BorderColumnRenderer * mMiddleBorderColumn
Definition: bytearraycolumnview_p.h:131
Okteta::ByteArrayColumnViewPrivate::ByteArrayColumnViewPrivate
ByteArrayColumnViewPrivate(ByteArrayColumnView *parent)
Okteta::AbstractByteArrayColumnRenderer
base class of all buffer column displayers holds all information about the vertical layout of a buffe...
Definition: abstractbytearraycolumnrenderer.h:60
Okteta::CharByteArrayColumnRenderer::undefinedChar
QChar undefinedChar() const
returns the actually used undefined character for "undefined" chars, default is '?'
Definition: charbytearraycolumnrenderer.h:88
Okteta::ByteArrayColumnViewPrivate::byteSpacingWidth
int byteSpacingWidth() const
Definition: bytearraycolumnview_p.h:141
Okteta::ByteArrayColumnViewPrivate::setByteTypeColored
void setByteTypeColored(bool isColored)
Okteta::ByteArrayColumnViewPrivate::changeEvent
void changeEvent(QEvent *event)
Okteta::ValueByteArrayColumnRenderer::binaryGapWidth
PixelX binaryGapWidth() const
Definition: valuebytearraycolumnrenderer.h:84
abstractbytearrayview_p.h
Okteta::AbstractByteArrayViewPrivate
Definition: abstractbytearrayview_p.h:59
Okteta::ByteArrayColumnViewPrivate::mValueColumn
ValueByteArrayColumnRenderer * mValueColumn
Definition: bytearraycolumnview_p.h:130
Okteta::AbstractByteArrayViewPrivate::charCodingName
const QString & charCodingName() const
Definition: abstractbytearrayview_p.h:341
Okteta::AbstractByteArrayView::ValueCoding
ValueCoding
Definition: abstractbytearrayview.h:98
bytearraycolumnview.h
Okteta::ByteArrayColumnViewPrivate::mInactiveColumn
AbstractByteArrayColumnRenderer * mInactiveColumn
points to the column without keyboard focus (if there is)
Definition: bytearraycolumnview_p.h:137
Okteta::ByteArrayColumnViewPrivate::setVisibleCodings
virtual void setVisibleCodings(int visibleCodings)
Okteta::ByteArrayColumnViewPrivate::setByteArrayModel
void setByteArrayModel(AbstractByteArrayModel *byteArrayModel)
Okteta::ByteArrayColumnViewPrivate::setActiveCoding
virtual void setActiveCoding(AbstractByteArrayView::CodingTypeId codingId)
Okteta::ByteArrayColumnViewPrivate::~ByteArrayColumnViewPrivate
virtual ~ByteArrayColumnViewPrivate()
Okteta::AbstractByteArrayViewPrivate::byteArrayModel
AbstractByteArrayModel * byteArrayModel() const
Definition: abstractbytearrayview_p.h:320
Okteta::AbstractByteArrayViewPrivate::event
bool event(QEvent *event)
Okteta::CharByteArrayColumnRenderer::isShowingNonprinting
bool isShowingNonprinting() const
returns true if "unprintable" chars (>32) are displayed in the char column with their corresponding c...
Definition: charbytearraycolumnrenderer.h:86
Okteta::ByteArrayColumnViewPrivate::isByteTypeColored
bool isByteTypeColored() const
Definition: bytearraycolumnview_p.h:148
Okteta::ByteArrayColumnViewPrivate::setBufferSpacing
void setBufferSpacing(int byteSpacingWidth, int noOfGroupedBytes, int groupSpacingWidth)
Okteta::ByteArrayColumnViewPrivate::mActiveColumn
AbstractByteArrayColumnRenderer * mActiveColumn
points to the column with keyboard focus
Definition: bytearraycolumnview_p.h:135
Okteta::CharByteArrayColumnRenderer
buffer column that interprets the bytes as chars
Definition: charbytearraycolumnrenderer.h:37
charbytearraycolumnrenderer.h
Okteta::ByteArrayColumnViewPrivate::ensureVisible
virtual void ensureVisible(const AddressRange &range, bool ensureStartVisible)
Okteta::ByteArrayColumnViewPrivate::showsNonprinting
bool showsNonprinting() const
Definition: bytearraycolumnview_p.h:145
Okteta::AbstractByteArrayColumnRenderer::noOfGroupedBytes
int noOfGroupedBytes() const
Definition: abstractbytearraycolumnrenderer.h:254
Okteta::AbstractByteArrayColumnRenderer::byteSpacingWidth
PixelX byteSpacingWidth() const
Definition: abstractbytearraycolumnrenderer.h:251
Okteta::ByteArrayColumnViewPrivate::updateChanged
virtual void updateChanged()
repaints all the parts that are signed as changed
Okteta::ByteArrayColumnViewPrivate::placeCursor
virtual void placeCursor(const QPoint &point)
Okteta::AbstractByteArrayView::CodingTypes
CodingTypes
Definition: abstractbytearrayview.h:104
Okteta::ByteArrayColumnViewPrivate::pauseCursor
virtual void pauseCursor()
Okteta::AbstractByteArrayColumnRenderer::isByteTypeColored
bool isByteTypeColored() const
Definition: abstractbytearraycolumnrenderer.h:271
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