• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • interfaces
 

interfaces

  • interfaces
  • khexedit
valuecolumninterface.h
1/***************************************************************************
2 valuecolumninterface.h - description
3 -------------------
4 begin : Fri Sep 12 2003
5 copyright : (C) 2003 by Friedrich W. H. Kossebau
6 email : Friedrich.W.H@Kossebau.de
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This library is free software; you can redistribute it and/or *
12 * modify it under the terms of the GNU Library General Public *
13 * License version 2 as published by the Free Software Foundation. *
14 * *
15 ***************************************************************************/
16
17
18#ifndef VALUECOLUMNINTERFACE_H
19#define VALUECOLUMNINTERFACE_H
20
21namespace KHE
22{
23
32class ValueColumnInterface
33{
34 public:
36 enum KCoding
37 {
39 HexadecimalCoding=0,
41 DecimalCoding=1,
43 OctalCoding=2,
45 BinaryCoding=3,
47 MaxCodingId=0xFFFF
48 };
49
51 enum KResizeStyle
52 {
56 NoResize=0,
61 LockGrouping=1,
64 FullSizeUsage=2,
66 MaxResizeStyleId=0xFF
67 };
68
69
70 public: // get methods
74 virtual KResizeStyle resizeStyle() const = 0;
78 virtual int noOfBytesPerLine() const = 0;
79
83 virtual KCoding coding() const = 0;
87 virtual int byteSpacingWidth() const = 0;
88
92 virtual int noOfGroupedBytes() const = 0;
96 virtual int groupSpacingWidth() const = 0;
97
101 virtual int binaryGapWidth() const = 0;
102
103
104 public: // set methods
110 virtual void setResizeStyle( KResizeStyle Style ) = 0;
116 virtual void setNoOfBytesPerLine( int NoCpL ) = 0;
117
124 virtual void setCoding( KCoding C ) = 0;
130 virtual void setByteSpacingWidth( int BSW ) = 0;
131
137 virtual void setNoOfGroupedBytes( int NoGB ) = 0;
143 virtual void setGroupSpacingWidth( int GSW ) = 0;
144
150 virtual void setBinaryGapWidth( int BGW ) = 0;
151};
152
153
159template<class T>
160ValueColumnInterface *valueColumnInterface( T *t )
161{
162 if( !t )
163 return 0;
164
165 return dynamic_cast<KHE::ValueColumnInterface*>( t );
166}
167
168}
169
170#endif
KHE::ValueColumnInterface
Interface for the value displaying column of a hexedit widget.
Definition: valuecolumninterface.h:33
KHE::ValueColumnInterface::coding
virtual KCoding coding() const =0
KHE::ValueColumnInterface::setCoding
virtual void setCoding(KCoding C)=0
sets the format of the hex column.
KHE::ValueColumnInterface::KResizeStyle
KResizeStyle
collection of ids for the fitting of the layout into the available widget's width
Definition: valuecolumninterface.h:52
KHE::ValueColumnInterface::LockGrouping
@ LockGrouping
we try to fit the layout to the available width but only with full groups like set in NoOfGroupedByte...
Definition: valuecolumninterface.h:61
KHE::ValueColumnInterface::NoResize
@ NoResize
we don't care about the actual sizing of the widget but stick to the given NoOfBytesPerLine
Definition: valuecolumninterface.h:56
KHE::ValueColumnInterface::FullSizeUsage
@ FullSizeUsage
we try to fit as many bytes into the width as possible, with minimum of 1 byte
Definition: valuecolumninterface.h:64
KHE::ValueColumnInterface::noOfGroupedBytes
virtual int noOfGroupedBytes() const =0
KHE::ValueColumnInterface::byteSpacingWidth
virtual int byteSpacingWidth() const =0
KHE::ValueColumnInterface::groupSpacingWidth
virtual int groupSpacingWidth() const =0
KHE::ValueColumnInterface::binaryGapWidth
virtual int binaryGapWidth() const =0
KHE::ValueColumnInterface::noOfBytesPerLine
virtual int noOfBytesPerLine() const =0
KHE::ValueColumnInterface::setResizeStyle
virtual void setResizeStyle(KResizeStyle Style)=0
sets the resize style for the hex column.
KHE::ValueColumnInterface::setByteSpacingWidth
virtual void setByteSpacingWidth(int BSW)=0
sets the spacing between the bytes.
KHE::ValueColumnInterface::KCoding
KCoding
collection of ids for the different numeric codings of a byte
Definition: valuecolumninterface.h:37
KHE::ValueColumnInterface::HexadecimalCoding
@ HexadecimalCoding
hexadecimal encoding
Definition: valuecolumninterface.h:39
KHE::ValueColumnInterface::DecimalCoding
@ DecimalCoding
decimal encoding
Definition: valuecolumninterface.h:41
KHE::ValueColumnInterface::BinaryCoding
@ BinaryCoding
bit by bit coding
Definition: valuecolumninterface.h:45
KHE::ValueColumnInterface::OctalCoding
@ OctalCoding
octal encoding
Definition: valuecolumninterface.h:43
KHE::ValueColumnInterface::setNoOfBytesPerLine
virtual void setNoOfBytesPerLine(int NoCpL)=0
sets the number of bytes per line, switching the resize style to NoResize Default is 16.
KHE::ValueColumnInterface::resizeStyle
virtual KResizeStyle resizeStyle() const =0
KHE::ValueColumnInterface::setGroupSpacingWidth
virtual void setGroupSpacingWidth(int GSW)=0
sets the spacing between the groups.
KHE::ValueColumnInterface::setNoOfGroupedBytes
virtual void setNoOfGroupedBytes(int NoGB)=0
sets the numbers of grouped bytes, 0 means no grouping.
KHE::ValueColumnInterface::setBinaryGapWidth
virtual void setBinaryGapWidth(int BGW)=0
sets the spacing in the middle of a binary encoded byte.
KHE
KHE (short for KHexEdit) is KDE's namespace for all things related to the viewing/editing of bytes.
Definition: byteseditinterface.h:33
KHE::valueColumnInterface
ValueColumnInterface * valueColumnInterface(T *t)
tries to get the valuecolumn interface of t
Definition: valuecolumninterface.h:160

interfaces

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

interfaces

Skip menu "interfaces"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for interfaces by doxygen 1.9.4
This website is maintained by Timothy Pearson.