\section{KHE::Bytes\-Edit\-Interface Class Reference}
\label{classKHE_1_1BytesEditInterface}\index{KHE::BytesEditInterface@{KHE::BytesEditInterface}}
An interface for a hex edit editor/viewer for arrays of byte.  


{\tt \#include $<$byteseditinterface.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf set\-Data} (char $\ast$D, int S, int RS=-1, bool KM=true)=0
\item 
virtual void {\bf set\-Read\-Only} (bool RO=true)=0
\item 
virtual void {\bf set\-Max\-Data\-Size} (int MS)=0
\item 
virtual void {\bf set\-Auto\-Delete} (bool AD=true)=0
\item 
virtual void {\bf set\-Keeps\-Memory} (bool KM=true)=0
\item 
virtual void {\bf set\-Overwrite\-Only} (bool b)=0
\item 
virtual void {\bf set\-Overwrite\-Mode} (bool b)=0
\item 
virtual void {\bf set\-Modified} (bool b)=0
\item 
virtual char $\ast$ {\bf data} () const =0
\item 
virtual int {\bf data\-Size} () const =0
\item 
virtual int {\bf max\-Data\-Size} () const =0
\item 
virtual bool {\bf is\-Auto\-Delete} () const =0
\item 
virtual bool {\bf keeps\-Memory} () const =0
\item 
virtual bool {\bf is\-Overwrite\-Mode} () const =0
\item 
virtual bool {\bf is\-Overwrite\-Only} () const =0
\item 
virtual bool {\bf is\-Read\-Only} () const =0
\item 
virtual bool {\bf is\-Modified} () const =0
\item 
virtual void {\bf repaint\-Range} (int i1, int i2)=0
\end{CompactItemize}


\subsection{Detailed Description}
An interface for a hex edit editor/viewer for arrays of byte. 



\footnotesize\begin{verbatim}  KHE::BytesEditInterface *BytesEdit = KHE::bytesEditInterface( BytesEditWidget );
\end{verbatim}
\normalsize


It can be used in different ways: \begin{itemize}
\item as an viewer for array char$\ast$ Data, sized Data\-Size 

\footnotesize\begin{verbatim} BytesEdit->setData( Data, DataSize );
 BytesEdit->setReadOnly( true );
\end{verbatim}
\normalsize


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

\footnotesize\begin{verbatim} BytesEdit->setData( Data, DataSize );
 BytesEdit->setOverWriteOnly( true );
\end{verbatim}
\normalsize


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

\footnotesize\begin{verbatim} BytesEdit->setData( Data, DataSize, -1, false );
 BytesEdit->setMaxDataSize( MaxDataSize );
 BytesEdit->setOverWriteMode( false );
\end{verbatim}
\normalsize


\item as an editor for a new to be created array of chars, max. with Max\-Data\-Size 

\footnotesize\begin{verbatim} BytesEdit->setMaxDataSize( MaxDataSize );
 ...
 QByteArray BA;
 BA.setRawData( BytesEdit->data(), BytesEdit->dataSize() );
\end{verbatim}
\normalsize
 \end{itemize}


\begin{Desc}
\item[Author:]Friedrich W. H. Kossebau $<${\tt Friedrich.W.H@Kossebau.de}$>$ \end{Desc}
\begin{Desc}
\item[See also:]{\bf create\-Bytes\-Edit\-Widget()}{\rm (p.\,\pageref{namespaceKHE_a1})}, {\bf bytes\-Edit\-Interface()}{\rm (p.\,\pageref{namespaceKHE_a0})} \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}




Definition at line 76 of file byteseditinterface.h.

\subsection{Member Function Documentation}
\index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!setData@{setData}}
\index{setData@{setData}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KHE::Bytes\-Edit\-Interface::set\-Data (char $\ast$ {\em D}, int {\em S}, int {\em RS} = {\tt -1}, bool {\em KM} = {\tt true})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a0}


hands over to the editor a new byte array. 

If there exists an old one and autodelete is set the old one gets deleted. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em D}]pointer to memory \item[{\em S}]size of used memory \item[{\em RS}]real size of the memory, -1 means S is the real size \item[{\em KM}]keep the memory on resize (RS is the maximum size) \end{description}
\end{Desc}
\index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!setReadOnly@{setReadOnly}}
\index{setReadOnly@{setReadOnly}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KHE::Bytes\-Edit\-Interface::set\-Read\-Only (bool {\em RO} = {\tt true})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a1}


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

Default is false. \index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!setMaxDataSize@{setMaxDataSize}}
\index{setMaxDataSize@{setMaxDataSize}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KHE::Bytes\-Edit\-Interface::set\-Max\-Data\-Size (int {\em MS})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a2}


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 Keeps\-Memory is set Max\-Data\-Size is limited to the real size of the array. Max\-Data\-Size == -1 means no limit. Default is -1. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em MS}]new maximal data size \end{description}
\end{Desc}
\index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!setAutoDelete@{setAutoDelete}}
\index{setAutoDelete@{setAutoDelete}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KHE::Bytes\-Edit\-Interface::set\-Auto\-Delete (bool {\em AD} = {\tt true})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a3}


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

Default is false \index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!setKeepsMemory@{setKeepsMemory}}
\index{setKeepsMemory@{setKeepsMemory}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KHE::Bytes\-Edit\-Interface::set\-Keeps\-Memory (bool {\em KM} = {\tt true})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a4}


sets whether the actual memory used to store the data (as given by set\-Data or in the constructor, or allocated by the class) should be kept on resize. 

If Max\-Data\-Size is set and greater than the raw size of the memory it is limited to the raw size. Default is false. \index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!setOverwriteOnly@{setOverwriteOnly}}
\index{setOverwriteOnly@{setOverwriteOnly}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KHE::Bytes\-Edit\-Interface::set\-Overwrite\-Only (bool {\em b})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a5}


sets whether the widget is overwriteonly or not. 

Default is false. \index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!setOverwriteMode@{setOverwriteMode}}
\index{setOverwriteMode@{setOverwriteMode}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KHE::Bytes\-Edit\-Interface::set\-Overwrite\-Mode (bool {\em b})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a6}


sets whether the widget is in overwrite mode or not. 

Default is true. \index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!setModified@{setModified}}
\index{setModified@{setModified}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KHE::Bytes\-Edit\-Interface::set\-Modified (bool {\em b})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a7}


sets whether the data should be treated modified or not 

\index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!data@{data}}
\index{data@{data}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual char$\ast$ KHE::Bytes\-Edit\-Interface::data () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a8}


\begin{Desc}
\item[Returns:]a pointer to the actual byte array \end{Desc}
\index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!dataSize@{dataSize}}
\index{dataSize@{dataSize}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int KHE::Bytes\-Edit\-Interface::data\-Size () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a9}


\begin{Desc}
\item[Returns:]the size of the actual byte array \end{Desc}
\index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!maxDataSize@{maxDataSize}}
\index{maxDataSize@{maxDataSize}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int KHE::Bytes\-Edit\-Interface::max\-Data\-Size () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a10}


\begin{Desc}
\item[Returns:]the maximal allowed size for the byte array \end{Desc}
\index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!isAutoDelete@{isAutoDelete}}
\index{isAutoDelete@{isAutoDelete}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KHE::Bytes\-Edit\-Interface::is\-Auto\-Delete () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a11}


\begin{Desc}
\item[Returns:]whether autodelete is set for the byte array \end{Desc}
\index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!keepsMemory@{keepsMemory}}
\index{keepsMemory@{keepsMemory}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KHE::Bytes\-Edit\-Interface::keeps\-Memory () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a12}


\begin{Desc}
\item[Returns:]{\tt true} if the memory of the byte array is kept, otherwise {\tt false} \end{Desc}
\index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!isOverwriteMode@{isOverwriteMode}}
\index{isOverwriteMode@{isOverwriteMode}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KHE::Bytes\-Edit\-Interface::is\-Overwrite\-Mode () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a13}


\begin{Desc}
\item[Returns:]{\tt true} if the edit mode is overwrite, otherwise {\tt false} for insert mode \end{Desc}
\index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!isOverwriteOnly@{isOverwriteOnly}}
\index{isOverwriteOnly@{isOverwriteOnly}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KHE::Bytes\-Edit\-Interface::is\-Overwrite\-Only () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a14}


\begin{Desc}
\item[Returns:]{\tt true} if the memory of the byte array is kept, otherwise {\tt false} \end{Desc}
\index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!isReadOnly@{isReadOnly}}
\index{isReadOnly@{isReadOnly}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KHE::Bytes\-Edit\-Interface::is\-Read\-Only () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a15}


\begin{Desc}
\item[Returns:]{\tt true} if the Read\-Only flag is set, otherwise {\tt false} \end{Desc}
\index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!isModified@{isModified}}
\index{isModified@{isModified}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KHE::Bytes\-Edit\-Interface::is\-Modified () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a16}


\begin{Desc}
\item[Returns:]{\tt true} if the Modified flag is set, otherwise {\tt false} \end{Desc}
\index{KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}!repaintRange@{repaintRange}}
\index{repaintRange@{repaintRange}!KHE::BytesEditInterface@{KHE::Bytes\-Edit\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KHE::Bytes\-Edit\-Interface::repaint\-Range (int {\em i1}, int {\em i2})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKHE_1_1BytesEditInterface_a17}


repaint the indizes from i1 to i2 



The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
byteseditinterface.h\end{CompactItemize}
