• 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.cpp
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 #include "bytearraycolumnview.h"
24 #include "bytearraycolumnview_p.h"
25 #include "bytearraycolumnview.moc" // due to Q_PRIVATE_SLOT
26 
27 
28 namespace Okteta
29 {
30 
31 ByteArrayColumnView::ByteArrayColumnView( QWidget* parent )
32  : AbstractByteArrayView( new ByteArrayColumnViewPrivate(this), parent )
33 {
34  Q_D( ByteArrayColumnView );
35 
36  d->init();
37 }
38 
39 PixelX ByteArrayColumnView::byteSpacingWidth() const
40 {
41  Q_D( const ByteArrayColumnView );
42  return d->byteSpacingWidth();
43 }
44 int ByteArrayColumnView::noOfGroupedBytes() const
45 {
46  Q_D( const ByteArrayColumnView );
47  return d->noOfGroupedBytes();
48 }
49 PixelX ByteArrayColumnView::groupSpacingWidth() const
50 {
51  Q_D( const ByteArrayColumnView );
52  return d->groupSpacingWidth();
53 }
54 PixelX ByteArrayColumnView::binaryGapWidth() const
55 {
56  Q_D( const ByteArrayColumnView );
57  return d->binaryGapWidth();
58 }
59 bool ByteArrayColumnView::showsNonprinting() const
60 {
61  Q_D( const ByteArrayColumnView );
62  return d->showsNonprinting();
63 }
64 QChar ByteArrayColumnView::substituteChar() const
65 {
66  Q_D( const ByteArrayColumnView );
67  return d->substituteChar();
68 }
69 QChar ByteArrayColumnView::undefinedChar() const
70 {
71  Q_D( const ByteArrayColumnView );
72  return d->undefinedChar();
73 }
74 bool ByteArrayColumnView::isByteTypeColored() const
75 {
76  Q_D( const ByteArrayColumnView );
77  return d->isByteTypeColored();
78 }
79 
80 
81 void ByteArrayColumnView::setByteArrayModel( AbstractByteArrayModel* _byteArrayModel )
82 {
83  Q_D( ByteArrayColumnView );
84  d->setByteArrayModel( _byteArrayModel );
85 }
86 
87 void ByteArrayColumnView::setBufferSpacing( /*PixelX*/int byteSpacing, int noOfGroupedBytes, /*PixelX*/int groupSpacing )
88 {
89  Q_D( ByteArrayColumnView );
90  d->setBufferSpacing( byteSpacing, noOfGroupedBytes, groupSpacing );
91 }
92 
93 
94 void ByteArrayColumnView::setValueCoding( ValueCoding valueCoding )
95 {
96  Q_D( ByteArrayColumnView );
97  d->setValueCoding( valueCoding );
98 }
99 
100 void ByteArrayColumnView::setByteSpacingWidth( int/*PixelX*/ byteSpacingWidth )
101 {
102  Q_D( ByteArrayColumnView );
103  d->setByteSpacingWidth( byteSpacingWidth );
104 }
105 
106 void ByteArrayColumnView::setNoOfGroupedBytes( int noOfGroupedBytes )
107 {
108  Q_D( ByteArrayColumnView );
109  d->setNoOfGroupedBytes( noOfGroupedBytes );
110 }
111 
112 
113 void ByteArrayColumnView::setGroupSpacingWidth( int/*PixelX*/ groupSpacingWidth )
114 {
115  Q_D( ByteArrayColumnView );
116  d->setGroupSpacingWidth( groupSpacingWidth );
117 }
118 
119 
120 void ByteArrayColumnView::setBinaryGapWidth( int/*PixelX*/ binaryGapWidth )
121 {
122  Q_D( ByteArrayColumnView );
123  d->setBinaryGapWidth( binaryGapWidth );
124 }
125 
126 
127 void ByteArrayColumnView::setSubstituteChar( QChar substituteChar )
128 {
129  Q_D( ByteArrayColumnView );
130  d->setSubstituteChar( substituteChar );
131 }
132 
133 void ByteArrayColumnView::setUndefinedChar( QChar undefinedChar )
134 {
135  Q_D( ByteArrayColumnView );
136  d->setUndefinedChar( undefinedChar );
137 }
138 
139 void ByteArrayColumnView::setShowsNonprinting( bool showingNonprinting )
140 {
141  Q_D( ByteArrayColumnView );
142  d->setShowsNonprinting( showingNonprinting );
143 }
144 
145 
146 void ByteArrayColumnView::setCharCoding( CharCoding charCoding )
147 {
148  Q_D( ByteArrayColumnView );
149  d->setCharCoding( charCoding );
150 }
151 
152 // TODO: join with function above!
153 void ByteArrayColumnView::setCharCoding( const QString& charCodingName )
154 {
155  Q_D( ByteArrayColumnView );
156  d->setCharCoding( charCodingName );
157 }
158 
159 void ByteArrayColumnView::setByteTypeColored( bool isColored )
160 {
161  Q_D( ByteArrayColumnView );
162  d->setByteTypeColored( isColored );
163 }
164 
165 
166 void ByteArrayColumnView::changeEvent( QEvent* event )
167 {
168  Q_D( ByteArrayColumnView );
169 
170  d->changeEvent( event );
171 }
172 
173 
174 QSize ByteArrayColumnView::minimumSizeHint() const
175 {
176  Q_D( const ByteArrayColumnView );
177  // TODO: better minimal width (visibility!)
178  return d->minimumSizeHint();
179 }
180 
181 
182 void ByteArrayColumnView::renderColumns( QPainter* painter, int cx, int cy, int cw, int ch )
183 {
184  Q_D( ByteArrayColumnView );
185  d->renderColumns( painter, cx, cy, cw, ch );
186 }
187 
188 
189 ByteArrayColumnView::~ByteArrayColumnView()
190 {
191 }
192 
193 }
Okteta::AbstractByteArrayModel
could it be useful to hide the data access behind an iterator? * class KDataBufferIterator { public: ...
Definition: abstractbytearraymodel.h:79
Okteta::ByteArrayColumnView::renderColumns
virtual void renderColumns(QPainter *painter, int cx, int cy, int cw, int ch)
draws all columns in columns coordinates
Definition: bytearraycolumnview.cpp:182
Okteta::ByteArrayColumnView::byteSpacingWidth
virtual int byteSpacingWidth() const
Definition: bytearraycolumnview.cpp:39
Okteta::AbstractByteArrayView::CharCoding
CharCoding
Definition: abstractbytearrayview.h:99
Okteta::ByteArrayColumnViewPrivate
Definition: bytearraycolumnview_p.h:38
Okteta::ByteArrayColumnView::setValueCoding
virtual void setValueCoding(ValueCoding valueCoding)
sets the format of the value column.
Definition: bytearraycolumnview.cpp:94
Okteta::ByteArrayColumnView::undefinedChar
virtual QChar undefinedChar() const
returns the actually used undefined character for "undefined" chars, default is '?'
Definition: bytearraycolumnview.cpp:69
QWidget
Okteta::ByteArrayColumnView::setByteArrayModel
virtual void setByteArrayModel(AbstractByteArrayModel *byteArrayModel)
Definition: bytearraycolumnview.cpp:81
Okteta::ByteArrayColumnView::substituteChar
virtual QChar substituteChar() const
gives the used substitute character for "unprintable" chars, default is '.
Definition: bytearraycolumnview.cpp:64
Okteta::ByteArrayColumnView
the main widget
Definition: bytearraycolumnview.h:48
Okteta::ByteArrayColumnView::setSubstituteChar
virtual void setSubstituteChar(QChar substituteChar)
sets the substitute character for "non-printing" chars returns true if there was a change ...
Definition: bytearraycolumnview.cpp:127
Okteta::AbstractByteArrayView
Definition: abstractbytearrayview.h:55
Okteta::ByteArrayColumnView::showsNonprinting
virtual bool showsNonprinting() const
reports if "non-printing" chars are displayed in the char column with their original character...
Definition: bytearraycolumnview.cpp:59
Okteta::ByteArrayColumnView::setUndefinedChar
virtual void setUndefinedChar(QChar undefinedChar)
sets the undefined character for "undefined" chars returns true if there was a change ...
Definition: bytearraycolumnview.cpp:133
Okteta::PixelX
int PixelX
Definition: kadds.h:34
Okteta::ByteArrayColumnView::changeEvent
virtual void changeEvent(QEvent *event)
calculates the number of bytes per line that fit into a widget with the given size tests whether a ve...
Definition: bytearraycolumnview.cpp:166
Okteta::ByteArrayColumnView::setGroupSpacingWidth
virtual void setGroupSpacingWidth(int groupSpacingWidth)
sets the spacing between the groups of bytes in the value column
Definition: bytearraycolumnview.cpp:113
Okteta::ByteArrayColumnView::setCharCoding
virtual void setCharCoding(CharCoding charCoding)
sets the encoding of the char column.
Definition: bytearraycolumnview.cpp:146
bytearraycolumnview_p.h
Okteta::ByteArrayColumnView::setByteTypeColored
virtual void setByteTypeColored(bool isColored)
Definition: bytearraycolumnview.cpp:159
Okteta::ByteArrayColumnView::isByteTypeColored
virtual bool isByteTypeColored() const
Definition: bytearraycolumnview.cpp:74
Okteta::ByteArrayColumnView::ByteArrayColumnView
ByteArrayColumnView(QWidget *parent=0)
Definition: bytearraycolumnview.cpp:31
Okteta::ByteArrayColumnView::~ByteArrayColumnView
virtual ~ByteArrayColumnView()
Definition: bytearraycolumnview.cpp:189
Okteta::AbstractByteArrayView::ValueCoding
ValueCoding
Definition: abstractbytearrayview.h:98
Okteta::ByteArrayColumnView::setByteSpacingWidth
virtual void setByteSpacingWidth(int byteSpacingWidth)
sets the spacing between the bytes in the value column
Definition: bytearraycolumnview.cpp:100
bytearraycolumnview.h
Okteta::ByteArrayColumnView::binaryGapWidth
virtual int binaryGapWidth() const
Definition: bytearraycolumnview.cpp:54
Okteta::ByteArrayColumnView::groupSpacingWidth
virtual int groupSpacingWidth() const
Definition: bytearraycolumnview.cpp:49
Okteta::ByteArrayColumnView::setNoOfGroupedBytes
virtual void setNoOfGroupedBytes(int noOfGroupedBytes)
sets the number of grouped bytes in the value column
Definition: bytearraycolumnview.cpp:106
Okteta::ByteArrayColumnView::setBufferSpacing
virtual void setBufferSpacing(int byteSpacingWidth, int noOfGroupedBytes=0, int groupSpacingWidth=0)
sets the spacing in the value column
Definition: bytearraycolumnview.cpp:87
Okteta::ByteArrayColumnView::setBinaryGapWidth
virtual void setBinaryGapWidth(int binaryGapWidth)
sets the spacing in the middle of a binary byte in the value column
Definition: bytearraycolumnview.cpp:120
Okteta::ByteArrayColumnView::minimumSizeHint
virtual QSize minimumSizeHint() const
Definition: bytearraycolumnview.cpp:174
Okteta::ByteArrayColumnView::setShowsNonprinting
virtual void setShowsNonprinting(bool showsNonprinting=true)
sets whether control chars or "non-printing" chars should be displayed in the char column with their ...
Definition: bytearraycolumnview.cpp:139
Okteta::ByteArrayColumnView::noOfGroupedBytes
virtual int noOfGroupedBytes() const
Definition: bytearraycolumnview.cpp:44
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