interfaces Library API Documentation

KHE Namespace Reference

KHE (short for KHexEdit) is KDE's namespace for all things related to the viewing/editing of bytes. More...


Classes

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

class  CharColumnInterface
 A simple interface for the access to the char column of a hex edit widget. More...

class  ClipboardInterface
 A simple interface for interaction with the clipboard. More...

class  ValueColumnInterface
 Interface for the value displaying column of a hexedit widget. More...

class  ZoomInterface
 A simple interface for zooming. More...


Functions

template<class T> BytesEditInterfacebytesEditInterface (T *t)
QWidgetcreateBytesEditWidget (QWidget *Parent=0, const char *Name=0)
template<class T> CharColumnInterfacecharColumnInterface (T *t)
template<class T> ClipboardInterfaceclipboardInterface (T *t)
template<class T> ValueColumnInterfacevalueColumnInterface (T *t)
template<class T> ZoomInterfacezoomInterface (T *t)


Detailed Description

KHE (short for KHexEdit) is KDE's namespace for all things related to the viewing/editing of bytes.

Since:
3.2


Function Documentation

template<class T>
BytesEditInterface* bytesEditInterface T *  t  )  [inline]
 

tries to get the bytesedit interface of t

Returns:
a pointer to the interface, otherwise 0
Author:
Friedrich W. H. Kossebau <Friedrich.W.H@Kossebau.de>
Since:
3.2

Definition at line 157 of file byteseditinterface.h.

QWidget* createBytesEditWidget QWidget Parent = 0,
const char *  Name = 0
[inline]
 

tries to create an instance of a hexedit widget for arrays of chars (char[])

Usage:

#include <khexedit/byteseditinterface.h> #include <khexedit/valuecolumninterface.h> #include <khexedit/charcolumninterface.h> #include <khexedit/clipboardinterface.h> ... QWidget *BytesEditWidget = KHE::createBytesEditWidget( this, "BytesEditWidget" ); // is e.g. kdeutils (incl. khexedit2) installed, so a widget could be found and created? if( BytesEditWidget ) {   // fetch the editor interface   KHE::BytesEditInterface *BytesEdit = KHE::bytesEditInterface( BytesEditWidget );   Q_ASSERT( BytesEdit ); // This should not fail!   // now use the editor.   BytesEdit->setData( Buffer, BufferSize, -1 );   BytesEdit->setMaxDataSize( BufferSize );   BytesEdit->setReadOnly( false );   BytesEdit->setAutoDelete( true );   KHE::ValueColumnInterface *ValueColumn = KHE::valueColumnInterface( BytesEditWidget );   if( ValueColumn )   {     ValueColumn->setCoding( KHE::ValueColumnInterface::BinaryCoding );     ValueColumn->setByteSpacingWidth( 2 );     ValueColumn->setNoOfGroupedBytes( 4 );     ValueColumn->setGroupSpacingWidth( 12 );   }   KHE::CharColumnInterface *CharColumn = KHE::charColumnInterface( BytesEditWidget );   if( CharColumn )   {     CharColumn->setShowUnprintable( false );     CharColumn->setSubstituteChar( '*' );   }   KHE::ClipboardInterface *Clipboard = KHE::clipboardInterface( BytesEditWidget );   if( Clipboard )   {     // Yes, use BytesEditWidget, not Clipboard, because that's the QObject, indeed hacky...     connect( BytesEditWidget, SIGNAL(copyAvailable(bool)), this, SLOT(offerCopy(bool)) );   } }

Parameters:
Parent parent widget
Name identifier
Returns:
a pointer to the widget, otherwise 0
Author:
Friedrich W. H. Kossebau <Friedrich.W.H@Kossebau.de>
See also:
BytesEditInterface, ValueColumnInterface, CharColumnInterface, ZoomInterface, ClipboardInterface
Since:
3.2

Definition at line 221 of file byteseditinterface.h.

template<class T>
CharColumnInterface* charColumnInterface T *  t  ) 
 

tries to get the charcolumn interface of t

Returns:
a pointer to the interface, otherwise 0
Author:
Friedrich W. H. Kossebau <Friedrich.W.H@Kossebau.de>
Since:
3.2

Definition at line 95 of file charcolumninterface.h.

template<class T>
ClipboardInterface* clipboardInterface T *  t  ) 
 

tries to get the clipboard interface of t

Returns:
a pointer to the interface, otherwise 0
Author:
Friedrich W. H. Kossebau <Friedrich.W.H@Kossebau.de>
Since:
3.2

Definition at line 76 of file khexedit/clipboardinterface.h.

template<class T>
ValueColumnInterface* valueColumnInterface T *  t  ) 
 

tries to get the valuecolumn interface of t

Returns:
a pointer to the interface, otherwise 0
Author:
Friedrich W. H. Kossebau <Friedrich.W.H@Kossebau.de>
Since:
3.2

Definition at line 160 of file valuecolumninterface.h.

template<class T>
ZoomInterface* zoomInterface T *  t  ) 
 

tries to get the zoom interface of t

Returns:
a pointer to the interface, otherwise 0
Author:
Friedrich W. H. Kossebau <Friedrich.W.H@Kossebau.de>
Since:
3.2

Definition at line 69 of file zoominterface.h.

KDE Logo
This file is part of the documentation for interfaces Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed May 5 07:17:38 2004 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003