• 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
  • view
bytearrayjanusview.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 2008-2012 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 BYTEARRAYJANUSVIEW_H
24 #define BYTEARRAYJANUSVIEW_H
25 
26 // Okteta core
27 #include <addressrange.h>
28 // Qt
29 #include <QtGui/QWidget>
30 
31 class QHBoxLayout;
32 class QMimeData;
33 
34 
35 namespace Okteta
36 {
37 class AbstractByteArrayView;
38 class AbstractByteArrayModel;
39 
40 
41 class ByteArrayJanusView : public QWidget
42 {
43  Q_OBJECT
44 
45  public:
46  enum { ColumnViewId = 0, RowViewId };
47 
48  public:
49  explicit ByteArrayJanusView( QWidget* parent = 0 );
50  virtual ~ByteArrayJanusView();
51 
52  public:
53  void setByteArrayModel( AbstractByteArrayModel* byteArrayModel );
54 
55  void setZoomLevel( double Level );
56  double zoomLevel() const;
57 
58  public: //
59  void setReadOnly( bool isReadOnly );
60  bool isReadOnly() const;
61 
62  public: // cursor API
63  void setCursorPosition( Address cursorPosition );
64  void setSelectionCursorPosition( Address index );
65  Address cursorPosition() const;
66  QRect cursorRect() const;
67 
68  public: // codings
69  void setValueCoding( int valueCoding );
70  void setCharCoding( const QString& charCodingName );
71  QString charCodingName() const;
72  int valueCoding() const;
73 
74  public:
75  void setSelection( Address start, Address end );
76  void selectAll( bool selectAll );
77  void removeSelectedData();
78  void pasteData( const QMimeData* data );
79  void insert( const QByteArray& byteArray );
80  bool hasSelectedData() const;
81  QMimeData* selectionAsMimeData() const;
82  bool canReadData( const QMimeData* data ) const;
83  AddressRange selection() const;
84 
85  void setMarking( const AddressRange& marking );
86  void ensureVisible( const AddressRange& range );
87 
88  public: // overwrite
89  void setOverwriteMode( bool overwriteMode );
90  bool isOverwriteMode() const;
91  bool isOverwriteOnly() const;
92 
93  public: // elements
94  void toggleOffsetColumn( bool visible );
95  void setOffsetCoding( int offsetCoding );
96  void setVisibleCodings( int columns );
97  bool offsetColumnVisible() const;
98  int offsetCoding() const;
99  int visibleCodings() const;
100 
101  public: // table layout
102  void setLayoutStyle( int layoutStyle );
103  void setStartOffset( Address startOffset );
104  void setFirstLineOffset( Address firstLineOffset );
105  void setNoOfBytesPerLine( int noOfBytesPerLine );
106  Address startOffset() const;
107  Address firstLineOffset() const;
108  int noOfBytesPerLine() const;
109  int layoutStyle() const;
110 
111  public: // layout settings
112  void setShowsNonprinting( bool showsNonprinting = true );
113  void setNoOfGroupedBytes( int noOfGroupedBytes );
114  void setSubstituteChar( QChar substituteChar );
115  void setUndefinedChar( QChar undefinedChar );
116  QChar substituteChar() const;
117  QChar undefinedChar() const;
118  bool showsNonprinting() const;
119 
120  int byteSpacingWidth() const;
121  int noOfGroupedBytes() const;
122  int groupSpacingWidth() const;
123  int binaryGapWidth() const;
124 
125  public:
126  void setViewModus( int viewModus );
127  int viewModus() const;
128 
129  void setViewPos( const QPoint& pos );
130  QRect viewRect() const;
131 
132  // needed, as the zooming logic currently changes the font for the real view,
133  // so decouples from font change propagation
134  void propagateFont( const QFont &font );
135 
136  Q_SIGNALS:
137  void readOnlyChanged( bool );
138  void overwriteModeChanged( bool overwriteMode );
139  void hasSelectedDataChanged( bool hasSelectedData );
140  void selectionChanged( const Okteta::AddressRange& selection );
141  void cursorPositionChanged( Okteta::Address cursorPosition );
142  void valueCodingChanged( int valueCoding );
143  void charCodecChanged( const QString& charCodingName );
144  void focusChanged( bool hasFocus );
145  void offsetColumnVisibleChanged( bool visible );
146  void offsetCodingChanged( int offsetCoding );
147  void visibleByteArrayCodingsChanged( int columns );
148  void layoutStyleChanged( int layoutStyle );
149  void noOfBytesPerLineChanged( int noOfBytesPerLine );
150  void showsNonprintingChanged( bool showsNonprinting );
151  void substituteCharChanged( QChar substituteChar );
152  void undefinedCharChanged( QChar undefinedChar );
153  void noOfGroupedBytesChanged( int noOfGroupedBytes );
154  void viewModusChanged( int viewModus );
155 
156  private:
157  AbstractByteArrayView* mView;
158  int mViewModus;
159  QHBoxLayout* mLayout;
160 };
161 
162 inline int ByteArrayJanusView::viewModus() const { return mViewModus; }
163 
164 }
165 
166 #endif
Okteta::ByteArrayJanusView::substituteChar
QChar substituteChar() const
Definition: bytearrayjanusview.cpp:323
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::ByteArrayJanusView::setLayoutStyle
void setLayoutStyle(int layoutStyle)
Definition: bytearrayjanusview.cpp:313
Okteta::ByteArrayJanusView::RowViewId
Definition: bytearrayjanusview.h:46
Okteta::ByteArrayJanusView::offsetCoding
int offsetCoding() const
Definition: bytearrayjanusview.cpp:263
Okteta::ByteArrayJanusView::setZoomLevel
void setZoomLevel(double Level)
Definition: bytearrayjanusview.cpp:125
Okteta::ByteArrayJanusView::cursorRect
QRect cursorRect() const
Definition: bytearrayjanusview.cpp:177
Okteta::ByteArrayJanusView::charCodecChanged
void charCodecChanged(const QString &charCodingName)
Okteta::ByteArrayJanusView::setNoOfGroupedBytes
void setNoOfGroupedBytes(int noOfGroupedBytes)
Definition: bytearrayjanusview.cpp:288
Okteta::ByteArrayJanusView::setUndefinedChar
void setUndefinedChar(QChar undefinedChar)
Definition: bytearrayjanusview.cpp:298
Okteta::ByteArrayJanusView::undefinedCharChanged
void undefinedCharChanged(QChar undefinedChar)
Okteta::ByteArrayJanusView::focusChanged
void focusChanged(bool hasFocus)
Okteta::ByteArrayJanusView::setNoOfBytesPerLine
void setNoOfBytesPerLine(int noOfBytesPerLine)
Definition: bytearrayjanusview.cpp:190
Okteta::ByteArrayJanusView::setByteArrayModel
void setByteArrayModel(AbstractByteArrayModel *byteArrayModel)
Definition: bytearrayjanusview.cpp:46
Okteta::ByteArrayJanusView::ByteArrayJanusView
ByteArrayJanusView(QWidget *parent=0)
Definition: bytearrayjanusview.cpp:36
Okteta::ByteArrayJanusView::setFirstLineOffset
void setFirstLineOffset(Address firstLineOffset)
Definition: bytearrayjanusview.cpp:186
Okteta::ByteArrayJanusView::offsetColumnVisibleChanged
void offsetColumnVisibleChanged(bool visible)
Okteta::ByteArrayJanusView::ensureVisible
void ensureVisible(const AddressRange &range)
Definition: bytearrayjanusview.cpp:243
QWidget
KDE::NumberRange< Address, Size >
Okteta::ByteArrayJanusView::setCursorPosition
void setCursorPosition(Address cursorPosition)
Definition: bytearrayjanusview.cpp:165
Okteta::ByteArrayJanusView::setSubstituteChar
void setSubstituteChar(QChar substituteChar)
Definition: bytearrayjanusview.cpp:293
Okteta::ByteArrayJanusView::setVisibleCodings
void setVisibleCodings(int columns)
Definition: bytearrayjanusview.cpp:318
Okteta::ByteArrayJanusView
Definition: bytearrayjanusview.h:41
Okteta::ByteArrayJanusView::offsetColumnVisible
bool offsetColumnVisible() const
Definition: bytearrayjanusview.cpp:258
Okteta::ByteArrayJanusView::propagateFont
void propagateFont(const QFont &font)
Definition: bytearrayjanusview.cpp:373
Okteta::ByteArrayJanusView::setSelectionCursorPosition
void setSelectionCursorPosition(Address index)
Definition: bytearrayjanusview.cpp:169
Okteta::ByteArrayJanusView::noOfGroupedBytes
int noOfGroupedBytes() const
Definition: bytearrayjanusview.cpp:336
Okteta::AbstractByteArrayView
Definition: abstractbytearrayview.h:55
Okteta::ByteArrayJanusView::insert
void insert(const QByteArray &byteArray)
Definition: bytearrayjanusview.cpp:248
Okteta::ByteArrayJanusView::showsNonprintingChanged
void showsNonprintingChanged(bool showsNonprinting)
Okteta::ByteArrayJanusView::binaryGapWidth
int binaryGapWidth() const
Definition: bytearrayjanusview.cpp:344
Okteta::ByteArrayJanusView::canReadData
bool canReadData(const QMimeData *data) const
Definition: bytearrayjanusview.cpp:160
Okteta::ByteArrayJanusView::selectionChanged
void selectionChanged(const Okteta::AddressRange &selection)
Okteta::ByteArrayJanusView::zoomLevel
double zoomLevel() const
Definition: bytearrayjanusview.cpp:130
Okteta::ByteArrayJanusView::isOverwriteOnly
bool isOverwriteOnly() const
Definition: bytearrayjanusview.cpp:349
Okteta::ByteArrayJanusView::setMarking
void setMarking(const AddressRange &marking)
Definition: bytearrayjanusview.cpp:238
Okteta::ByteArrayJanusView::setViewPos
void setViewPos(const QPoint &pos)
Definition: bytearrayjanusview.cpp:359
addressrange.h
Okteta::ByteArrayJanusView::hasSelectedData
bool hasSelectedData() const
Definition: bytearrayjanusview.cpp:140
Okteta::ByteArrayJanusView::toggleOffsetColumn
void toggleOffsetColumn(bool visible)
Definition: bytearrayjanusview.cpp:303
Okteta::ByteArrayJanusView::setViewModus
void setViewModus(int viewModus)
Definition: bytearrayjanusview.cpp:51
Okteta::ByteArrayJanusView::pasteData
void pasteData(const QMimeData *data)
Definition: bytearrayjanusview.cpp:150
Okteta::ByteArrayJanusView::groupSpacingWidth
int groupSpacingWidth() const
Definition: bytearrayjanusview.cpp:340
Okteta::ByteArrayJanusView::readOnlyChanged
void readOnlyChanged(bool)
Okteta::ByteArrayJanusView::setValueCoding
void setValueCoding(int valueCoding)
Definition: bytearrayjanusview.cpp:218
Okteta::ByteArrayJanusView::cursorPosition
Address cursorPosition() const
Definition: bytearrayjanusview.cpp:173
Okteta::ByteArrayJanusView::setStartOffset
void setStartOffset(Address startOffset)
Definition: bytearrayjanusview.cpp:182
Okteta::ByteArrayJanusView::layoutStyleChanged
void layoutStyleChanged(int layoutStyle)
Okteta::ByteArrayJanusView::~ByteArrayJanusView
virtual ~ByteArrayJanusView()
Definition: bytearrayjanusview.cpp:379
Okteta::ByteArrayJanusView::setOffsetCoding
void setOffsetCoding(int offsetCoding)
Definition: bytearrayjanusview.cpp:308
Okteta::ByteArrayJanusView::setReadOnly
void setReadOnly(bool isReadOnly)
Definition: bytearrayjanusview.cpp:123
Okteta::ByteArrayJanusView::noOfBytesPerLine
int noOfBytesPerLine() const
Definition: bytearrayjanusview.cpp:202
Okteta::ByteArrayJanusView::layoutStyle
int layoutStyle() const
Definition: bytearrayjanusview.cpp:268
Okteta::ByteArrayJanusView::setShowsNonprinting
void setShowsNonprinting(bool showsNonprinting=true)
Definition: bytearrayjanusview.cpp:283
Okteta::ByteArrayJanusView::byteSpacingWidth
int byteSpacingWidth() const
Definition: bytearrayjanusview.cpp:332
Okteta::ByteArrayJanusView::isOverwriteMode
bool isOverwriteMode() const
Definition: bytearrayjanusview.cpp:278
Okteta::ByteArrayJanusView::offsetCodingChanged
void offsetCodingChanged(int offsetCoding)
Okteta::ByteArrayJanusView::undefinedChar
QChar undefinedChar() const
Definition: bytearrayjanusview.cpp:327
Okteta::ByteArrayJanusView::isReadOnly
bool isReadOnly() const
Definition: bytearrayjanusview.cpp:122
Okteta::ByteArrayJanusView::selection
AddressRange selection() const
Definition: bytearrayjanusview.cpp:228
Okteta::ByteArrayJanusView::setSelection
void setSelection(Address start, Address end)
Definition: bytearrayjanusview.cpp:233
Okteta::ByteArrayJanusView::cursorPositionChanged
void cursorPositionChanged(Okteta::Address cursorPosition)
Okteta::ByteArrayJanusView::startOffset
Address startOffset() const
Definition: bytearrayjanusview.cpp:194
Okteta::ByteArrayJanusView::hasSelectedDataChanged
void hasSelectedDataChanged(bool hasSelectedData)
Okteta::ByteArrayJanusView::overwriteModeChanged
void overwriteModeChanged(bool overwriteMode)
Okteta::ByteArrayJanusView::substituteCharChanged
void substituteCharChanged(QChar substituteChar)
Okteta::ByteArrayJanusView::viewModusChanged
void viewModusChanged(int viewModus)
Okteta::ByteArrayJanusView::visibleCodings
int visibleCodings() const
Definition: bytearrayjanusview.cpp:273
Okteta::ByteArrayJanusView::visibleByteArrayCodingsChanged
void visibleByteArrayCodingsChanged(int columns)
Okteta::ByteArrayJanusView::valueCoding
int valueCoding() const
Definition: bytearrayjanusview.cpp:208
Okteta::ByteArrayJanusView::selectAll
void selectAll(bool selectAll)
Definition: bytearrayjanusview.cpp:135
Okteta::ByteArrayJanusView::valueCodingChanged
void valueCodingChanged(int valueCoding)
Okteta::ByteArrayJanusView::noOfGroupedBytesChanged
void noOfGroupedBytesChanged(int noOfGroupedBytes)
Okteta::ByteArrayJanusView::selectionAsMimeData
QMimeData * selectionAsMimeData() const
Definition: bytearrayjanusview.cpp:145
Okteta::ByteArrayJanusView::charCodingName
QString charCodingName() const
Definition: bytearrayjanusview.cpp:213
Okteta::ByteArrayJanusView::firstLineOffset
Address firstLineOffset() const
Definition: bytearrayjanusview.cpp:198
Okteta::ByteArrayJanusView::showsNonprinting
bool showsNonprinting() const
Definition: bytearrayjanusview.cpp:253
Okteta::ByteArrayJanusView::setOverwriteMode
void setOverwriteMode(bool overwriteMode)
Definition: bytearrayjanusview.cpp:354
Okteta::ByteArrayJanusView::removeSelectedData
void removeSelectedData()
Definition: bytearrayjanusview.cpp:155
Okteta::ByteArrayJanusView::ColumnViewId
Definition: bytearrayjanusview.h:46
Okteta::ByteArrayJanusView::viewModus
int viewModus() const
Definition: bytearrayjanusview.h:162
Okteta::ByteArrayJanusView::viewRect
QRect viewRect() const
Definition: bytearrayjanusview.cpp:364
Okteta::ByteArrayJanusView::setCharCoding
void setCharCoding(const QString &charCodingName)
Definition: bytearrayjanusview.cpp:223
Okteta::ByteArrayJanusView::noOfBytesPerLineChanged
void noOfBytesPerLineChanged(int noOfBytesPerLine)
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