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

KHexEdit

  • KHE
  • BytesEditInterface
Public Member Functions | List of all members
KHE::BytesEditInterface Class Referenceabstract

#include <byteseditinterface.h>

Public Member Functions

virtual ~BytesEditInterface ()
 
virtual char * data () const =0
 
virtual int dataSize () const =0
 
virtual bool isAutoDelete () const =0
 
virtual bool isModified () const =0
 
virtual bool isOverwriteMode () const =0
 
virtual bool isOverwriteOnly () const =0
 
virtual bool isReadOnly () const =0
 
virtual bool keepsMemory () const =0
 
virtual int maxDataSize () const =0
 
virtual void repaintRange (int i1, int i2)=0
 
virtual void setAutoDelete (bool AD=true)=0
 
virtual void setData (char *D, int S, int RS=-1, bool KM=true)=0
 
virtual void setKeepsMemory (bool KM=true)=0
 
virtual void setMaxDataSize (int MS)=0
 
virtual void setModified (bool b)=0
 
virtual void setOverwriteMode (bool b)=0
 
virtual void setOverwriteOnly (bool b)=0
 
virtual void setReadOnly (bool RO=true)=0
 

Detailed Description

An interface for a hex edit editor/viewer for arrays of byte.

KHE::BytesEditInterface *BytesEdit = KHE::bytesEditInterface( BytesEditWidget );

It can be used in different ways:

  • as an viewer for array char* Data, sized DataSize

    BytesEdit->setData( Data, DataSize );
    BytesEdit->setReadOnly( true );

  • as an editor for a given array of bytes with a fixed size

    BytesEdit->setData( Data, DataSize );
    BytesEdit->setOverWriteOnly( true );

  • as an editor for a given array of bytes with a limited size

    BytesEdit->setData( Data, DataSize, -1, false );
    BytesEdit->setMaxDataSize( MaxDataSize );
    BytesEdit->setOverWriteMode( false );

  • as an editor for a new to be created array of chars, max. with MaxDataSize
    BytesEdit->setMaxDataSize( MaxDataSize );
    ...
    QByteArray BA;
    BA.setRawData( BytesEdit->data(), BytesEdit->dataSize() );
Author
Friedrich W. H. Kossebau kosse.nosp@m.bau@.nosp@m.kde.o.nosp@m.rg
See also
createBytesEditWidget(), bytesEditInterface()

Definition at line 73 of file byteseditinterface.h.

Constructor & Destructor Documentation

virtual KHE::BytesEditInterface::~BytesEditInterface ( )
inlinevirtual

Definition at line 76 of file byteseditinterface.h.

Member Function Documentation

virtual char* KHE::BytesEditInterface::data ( ) const
pure virtual
Returns
a pointer to the actual byte array
virtual int KHE::BytesEditInterface::dataSize ( ) const
pure virtual
Returns
the size of the actual byte array
virtual bool KHE::BytesEditInterface::isAutoDelete ( ) const
pure virtual
Returns
whether autodelete is set for the byte array
virtual bool KHE::BytesEditInterface::isModified ( ) const
pure virtual
Returns
true if the Modified flag is set, otherwise false
virtual bool KHE::BytesEditInterface::isOverwriteMode ( ) const
pure virtual
Returns
true if the edit mode is overwrite, otherwise false for insert mode
virtual bool KHE::BytesEditInterface::isOverwriteOnly ( ) const
pure virtual
Returns
true if the memory of the byte array is kept, otherwise false
virtual bool KHE::BytesEditInterface::isReadOnly ( ) const
pure virtual
Returns
true if the ReadOnly flag is set, otherwise false
virtual bool KHE::BytesEditInterface::keepsMemory ( ) const
pure virtual
Returns
true if the memory of the byte array is kept, otherwise false
virtual int KHE::BytesEditInterface::maxDataSize ( ) const
pure virtual
Returns
the maximal allowed size for the byte array
virtual void KHE::BytesEditInterface::repaintRange ( int  i1,
int  i2 
)
pure virtual

repaint the indizes from i1 to i2

virtual void KHE::BytesEditInterface::setAutoDelete ( bool  AD = true)
pure virtual

sets whether the array should be deleted on the widget's end or if a new array is set.

Default is false

virtual void KHE::BytesEditInterface::setData ( char *  D,
int  S,
int  RS = -1,
bool  KM = true 
)
pure virtual

hands over to the editor a new byte array.

If there exists an old one and autodelete is set the old one gets deleted.

Parameters
Dpointer to memory
Ssize of used memory
RSreal size of the memory, -1 means S is the real size
KMkeep the memory on resize (RS is the maximum size)
virtual void KHE::BytesEditInterface::setKeepsMemory ( bool  KM = true)
pure virtual

switches the array

sets whether the actual memory used to store the data (as given by setData or in the constructor, or allocated by the class) should be kept on resize. If MaxDataSize is set and greater than the raw size of the memory it is limited to the raw size. Default is false.

virtual void KHE::BytesEditInterface::setMaxDataSize ( int  MS)
pure virtual

sets the maximal size of the actual byte array.

If the actual array is already larger it will not be modified but there can be only done non-inserting actions until the array's is below the limit If the flag KeepsMemory is set MaxDataSize is limited to the real size of the array. MaxDataSize == -1 means no limit. Default is -1.

Parameters
MSnew maximal data size
virtual void KHE::BytesEditInterface::setModified ( bool  b)
pure virtual

sets whether the data should be treated modified or not

virtual void KHE::BytesEditInterface::setOverwriteMode ( bool  b)
pure virtual

sets whether the widget is in overwrite mode or not.

Default is true.

virtual void KHE::BytesEditInterface::setOverwriteOnly ( bool  b)
pure virtual

sets whether the widget is overwriteonly or not.

Default is false.

virtual void KHE::BytesEditInterface::setReadOnly ( bool  RO = true)
pure virtual

sets whether the given array should be handled read only or not.

Default is false.


The documentation for this class was generated from the following file:
  • byteseditinterface.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:52:13 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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