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

interfaces

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

#include <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
 

Detailed Description

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

KHE::BytesEditInterface *BytesEdit = KHE::bytesEditInterface( BytesEditWidget );
KHE::BytesEditInterface
An interface for a hex edit editor/viewer for arrays of byte.
Definition: byteseditinterface.h:77
KHE::bytesEditInterface
BytesEditInterface * bytesEditInterface(T *t)
tries to get the bytesedit interface of t
Definition: byteseditinterface.h:157

It can be used in different ways:

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

    BytesEdit->setData( Data, DataSize );
    BytesEdit->setReadOnly( true );
    KHE::BytesEditInterface::setReadOnly
    virtual void setReadOnly(bool RO=true)=0
    sets whether the given array should be handled read only or not.
    KHE::BytesEditInterface::setData
    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->setMaxDataSize( MaxDataSize );
    BytesEdit->setOverWriteMode( false );
    KHE::BytesEditInterface::setMaxDataSize
    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
    BytesEdit->setMaxDataSize( MaxDataSize );
    ...
    TQByteArray BA;
    BA.setRawData( BytesEdit->data(), BytesEdit->dataSize() );
    KHE::BytesEditInterface::dataSize
    virtual int dataSize() const =0
    KHE::BytesEditInterface::data
    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.

Member Function Documentation

◆ 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
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)

◆ 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
MSnew maximal data size

◆ 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:
  • byteseditinterface.h

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.