#include <byteseditinterface.h>
An interface for a hex edit editor/viewer for arrays of byte.
An interface for a hex edit editor/viewer for arrays of byte.
BytesEditInterface * bytesEditInterface(T *t)
tries to get the bytesedit interface of t
It can be used in different ways:
-
as an viewer for array char* Data, sized DataSize
BytesEdit->
setData( Data, DataSize );
virtual void setReadOnly(bool RO=true)=0
sets whether the given array should be handled read only or not.
virtual void setData(char *D, int S, int RS=-1, bool KM=true)=0
hands over to the editor a new byte array.
-
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->setOverWriteMode( false );
virtual void setMaxDataSize(int MS)=0
sets the maximal size of the actual byte array.
-
as an editor for a new to be created array of chars, max. with MaxDataSize
...
TQByteArray BA;
virtual int dataSize() const =0
virtual char * data() const =0
- Author
- Friedrich W. H. Kossebau Fried.nosp@m.rich.nosp@m..W.H@.nosp@m.Koss.nosp@m.ebau..nosp@m.de
- See also
- createBytesEditWidget(), bytesEditInterface()
- Since
- 3.2
Definition at line 76 of file byteseditinterface.h.
◆ data()
virtual char* KHE::BytesEditInterface::data |
( |
| ) |
const |
|
pure virtual |
- Returns
- a pointer to the actual byte array
◆ dataSize()
virtual int KHE::BytesEditInterface::dataSize |
( |
| ) |
const |
|
pure virtual |
- Returns
- the size of the actual byte array
◆ isAutoDelete()
virtual bool KHE::BytesEditInterface::isAutoDelete |
( |
| ) |
const |
|
pure virtual |
- Returns
- whether autodelete is set for the byte array
◆ isModified()
virtual bool KHE::BytesEditInterface::isModified |
( |
| ) |
const |
|
pure virtual |
- Returns
true
if the Modified flag is set, otherwise false
◆ isOverwriteMode()
virtual bool KHE::BytesEditInterface::isOverwriteMode |
( |
| ) |
const |
|
pure virtual |
- Returns
true
if the edit mode is overwrite, otherwise false
for insert mode
◆ isOverwriteOnly()
virtual bool KHE::BytesEditInterface::isOverwriteOnly |
( |
| ) |
const |
|
pure virtual |
- Returns
true
if the memory of the byte array is kept, otherwise false
◆ isReadOnly()
virtual bool KHE::BytesEditInterface::isReadOnly |
( |
| ) |
const |
|
pure virtual |
- Returns
true
if the ReadOnly flag is set, otherwise false
◆ keepsMemory()
virtual bool KHE::BytesEditInterface::keepsMemory |
( |
| ) |
const |
|
pure virtual |
- Returns
true
if the memory of the byte array is kept, otherwise false
◆ maxDataSize()
virtual int KHE::BytesEditInterface::maxDataSize |
( |
| ) |
const |
|
pure virtual |
- Returns
- the maximal allowed size for the byte array
◆ repaintRange()
virtual void KHE::BytesEditInterface::repaintRange |
( |
int |
i1, |
|
|
int |
i2 |
|
) |
| |
|
pure virtual |
repaint the indizes from i1 to i2
◆ setAutoDelete()
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
◆ setData()
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) |
◆ setKeepsMemory()
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.
◆ setMaxDataSize()
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
-
◆ setModified()
virtual void KHE::BytesEditInterface::setModified |
( |
bool |
b | ) |
|
|
pure virtual |
sets whether the data should be treated modified or not
◆ setOverwriteMode()
virtual void KHE::BytesEditInterface::setOverwriteMode |
( |
bool |
b | ) |
|
|
pure virtual |
sets whether the widget is in overwrite mode or not.
Default is true.
◆ setOverwriteOnly()
virtual void KHE::BytesEditInterface::setOverwriteOnly |
( |
bool |
b | ) |
|
|
pure virtual |
sets whether the widget is overwriteonly or not.
Default is false.
◆ setReadOnly()
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: