KHE::BytesEditInterface Class Reference

#include <byteseditinterface.h>

List of all members.


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 <Friedrich.W.H@Kossebau.de>
See also:
createBytesEditWidget(), bytesEditInterface()
Since:
3.2

Definition at line 76 of file byteseditinterface.h.


Public Member Functions

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

Member Function Documentation

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:
D pointer to memory
S size of used memory
RS real size of the memory, -1 means S is the real size
KM keep the memory on resize (RS is the maximum size)

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.

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:
MS new maximal data size

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::setKeepsMemory ( bool  KM = true  )  [pure virtual]

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::setOverwriteOnly ( bool  b  )  [pure virtual]

sets whether the widget is overwriteonly or not.

Default is false.

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::setModified ( bool  b  )  [pure virtual]

sets whether the data should be treated modified or not

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 int KHE::BytesEditInterface::maxDataSize (  )  const [pure virtual]

Returns:
the maximal allowed size for the byte array

virtual bool KHE::BytesEditInterface::isAutoDelete (  )  const [pure virtual]

Returns:
whether autodelete is set for the byte array

virtual bool KHE::BytesEditInterface::keepsMemory (  )  const [pure virtual]

Returns:
true if the memory of the byte array is kept, 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::isModified (  )  const [pure virtual]

Returns:
true if the Modified flag is set, otherwise false

virtual void KHE::BytesEditInterface::repaintRange ( int  i1,
int  i2 
) [pure virtual]

repaint the indizes from i1 to i2


The documentation for this class was generated from the following file:
KDE Home | KDE Accessibility Home | Description of Access Keys