• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KHexEdit

  • interfaces
  • khexedit
valuecolumninterface.h
Go to the documentation of this file.
1/***************************************************************************
2 valuecolumninterface.h - description
3 -------------------
4 begin : Fri Sep 12 2003
5 copyright : (C) 2003 by Friedrich W. H. Kossebau
6 email : kossebau@kde.org
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 KHE_VALUECOLUMNINTERFACE_H
19#define KHE_VALUECOLUMNINTERFACE_H
20
21#include <QtCore/QObject>
22
23namespace KHE
24{
25
33class ValueColumnInterface
34{
35 public:
36 virtual ~ValueColumnInterface() {}
37
38 public:
40 enum KCoding
41 {
43 HexadecimalCoding=0,
45 DecimalCoding=1,
47 OctalCoding=2,
49 BinaryCoding=3,
51 MaxCodingId=0xFFFF
52 };
53
55 enum KResizeStyle
56 {
60 NoResize=0,
65 LockGrouping=1,
68 FullSizeUsage=2,
70 MaxResizeStyleId=0xFF
71 };
72
73
74 public: // get methods
78 virtual KResizeStyle resizeStyle() const = 0;
82 virtual int noOfBytesPerLine() const = 0;
83
87 virtual KCoding coding() const = 0;
91 virtual int byteSpacingWidth() const = 0;
92
96 virtual int noOfGroupedBytes() const = 0;
100 virtual int groupSpacingWidth() const = 0;
101
105 virtual int binaryGapWidth() const = 0;
106
107
108 public: // set methods
114 virtual void setResizeStyle( KResizeStyle Style ) = 0;
120 virtual void setNoOfBytesPerLine( int NoCpL ) = 0;
121
128 virtual void setCoding( KCoding C ) = 0;
134 virtual void setByteSpacingWidth( int BSW ) = 0;
135
141 virtual void setNoOfGroupedBytes( int NoGB ) = 0;
147 virtual void setGroupSpacingWidth( int GSW ) = 0;
148
154 virtual void setBinaryGapWidth( int BGW ) = 0;
155};
156
157
162template<class T>
163ValueColumnInterface *valueColumnInterface( T *t )
164{
165 return t ? qobject_cast<KHE::ValueColumnInterface *>( t ) : 0;
166}
167
168}
169
170Q_DECLARE_INTERFACE( KHE::ValueColumnInterface, "org.kde.khe.valuecolumninterface/1.0" )
171
172#endif
KHE::ValueColumnInterface
Interface for the value displaying column of a hexedit widget.
Definition: valuecolumninterface.h:34
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:56
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:65
KHE::ValueColumnInterface::NoResize
@ NoResize
we don't care about the actual sizing of the widget but stick to the given NoOfBytesPerLine
Definition: valuecolumninterface.h:60
KHE::ValueColumnInterface::MaxResizeStyleId
@ MaxResizeStyleId
Definition: valuecolumninterface.h:70
KHE::ValueColumnInterface::FullSizeUsage
@ FullSizeUsage
we try to fit as many bytes into the width as possible, with minimum of 1 byte
Definition: valuecolumninterface.h:68
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:41
KHE::ValueColumnInterface::MaxCodingId
@ MaxCodingId
Definition: valuecolumninterface.h:51
KHE::ValueColumnInterface::HexadecimalCoding
@ HexadecimalCoding
hexadecimal encoding
Definition: valuecolumninterface.h:43
KHE::ValueColumnInterface::DecimalCoding
@ DecimalCoding
decimal encoding
Definition: valuecolumninterface.h:45
KHE::ValueColumnInterface::BinaryCoding
@ BinaryCoding
bit by bit coding
Definition: valuecolumninterface.h:49
KHE::ValueColumnInterface::OctalCoding
@ OctalCoding
octal encoding
Definition: valuecolumninterface.h:47
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::~ValueColumnInterface
virtual ~ValueColumnInterface()
Definition: valuecolumninterface.h:36
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:31
KHE::valueColumnInterface
ValueColumnInterface * valueColumnInterface(T *t)
tries to get the valuecolumn interface of t
Definition: valuecolumninterface.h:163
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHexEdit

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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