Logo Search packages:      
Sourcecode: kdeutils version File versions

KHE::KHexEdit Class Reference

#include <khexedit.h>

Inheritance diagram for KHE::KHexEdit:

KHE::KColumnsView KHE::KBytesEdit

List of all members.

Detailed Description

the main widget

The functions split up in helper functions and those that are complete.

Complete functions can be called from the outside and leave the widget in a consistent state. They care for exceptions so one can safely call them in all situations (like empty buffer, cursor behind end etc.)

Helper functions do only partial tasks and need to be completed. They often do not check for exceptions so one has to care for this.

Friedrich W. H. Kossebau

Definition at line 67 of file khexedit.h.

Public Types

enum  KCoding {
  HexadecimalCoding = 0, DecimalCoding = 1, OctalCoding = 2, BinaryCoding = 3,
  MaxCodingId = 0xFFFF
enum  KEncoding { LocalEncoding = 0, ISO8859_1Encoding = 1, MaxEncodingId = 0xFFFF }
enum  KKeyboardAction { ActionDelete, ActionWordDelete, ActionBackspace, ActionWordBackspace }
enum  KMoveAction {
  MoveBackward, MoveWordBackward, MoveForward, MoveWordForward,
  MoveUp, MovePgUp, MoveDown, MovePgDown,
  MoveLineStart, MoveHome, MoveLineEnd, MoveEnd
enum  KResizeStyle { NoResize = 0, LockGrouping = 1, FullSizeUsage = 2, MaxResizeStyleId = 0xFF }

Public Slots

virtual void copy ()
virtual void cut ()
bool decByte ()
void doKeyboardAction (KKeyboardAction Action)
void ensureCursorVisible ()
bool goInsideByte ()
void goOutsideByte (bool MoveToNext=false)
bool incByte ()
virtual void insert (const QByteArray &D)
void moveCursor (KMoveAction Action, bool Select)
virtual void paste ()
virtual void pauseCursor (bool LeaveEdit=false)
virtual void removeSelectedData ()
void selectAll (bool select)
bool selectWord (int Index)
void setBinaryGapWidth (int BGW)
void setBufferSpacing (KPixelX ByteSpacingWidth, int NoOfGroupedBytes=0, KPixelX GroupSpacingWidth=0)
void setByteSpacingWidth (int BSW)
void setCoding (KCoding C)
void setDataBuffer (KDataBuffer *B)
void setEncoding (KEncoding C)
void setFirstLineOffset (int FLO)
void setGroupSpacingWidth (int GSW)
virtual void setModified (bool b)
virtual void setNoOfBytesPerLine (int NoCpL)
void setNoOfGroupedBytes (int NoGB)
virtual void setOverwriteMode (bool b)
virtual void setOverwriteOnly (bool b)
virtual void setReadOnly (bool b)
void setResizeStyle (KResizeStyle Style)
void setShowUnprintable (bool SU=true)
void setStartOffset (int SO)
void setSubstituteChar (QChar SC)
virtual void setTabChangesFocus (bool b=true)
virtual void startCursor ()
virtual void stopCursor ()
virtual void unpauseCursor ()
virtual void unZoom ()
virtual void zoomIn ()
virtual void zoomIn (int PointInc)
virtual void zoomOut ()
virtual void zoomOut (int PointInc)
virtual void zoomTo (int PointSize)


void bufferChanged ()
void clicked (int Index)
void copyAvailable (bool Really)
void cursorPositionChanged (int Index)
void cutAvailable (bool Really)
void doubleClicked (int Index)
void inputFailed ()
void selectionChanged ()

Public Member Functions

int binaryGapWidth () const
int byteSpacingWidth () const
KCoding coding () const
virtual void drawContents (QPainter *p, int cx, int cy, int cw, int ch)
KEncoding encoding () const
virtual bool eventFilter (QObject *O, QEvent *E)
int firstLineOffset () const
int fittingBytesPerLine (const QSize &TestSize) const
int groupSpacingWidth () const
bool hasSelectedData () const
int indexByPoint (const QPoint &Point) const
bool isModified () const
bool isOverwriteMode () const
bool isOverwriteOnly () const
bool isReadOnly () const
 KHexEdit (KDataBuffer *Buffer=0, QWidget *Parent=0, const char *Name=0, WFlags F=0)
int lineAt (KPixelY y) const
KPixelY lineHeight () const
virtual QSize minimumSizeHint () const
void moveCursor (KMoveAction Action)
int noOfBytesPerLine () const
int noOfGroupedBytes () const
int noOfLines () const
int noOfLinesPerPage () const
virtual void paintEmptyArea (QPainter *p, int cx, int cy, int cw, int ch)
void placeCursor (const QPoint &Point)
KResizeStyle resizeStyle () const
QByteArray selectedData () const
void setCursorPosition (int Index)
bool showUnprintable () const
virtual QSize sizeHint () const
int startOffset () const
QChar substituteChar () const
bool tabChangesFocus () const
KPixelY totalHeight () const
QSize totalViewSize () const
KPixelX totalWidth () const
KSection visibleLines (KPixelYs YPixels) const
KSection visibleLines () const

Protected Slots

void autoScrollTimerDone ()
void blinkCursor ()
void clipboardChanged ()
virtual void fontChange (const QFont &OldFont)
void startDrag ()

Protected Member Functions

const KBufferColumnactiveColumn () const
KBufferColumnactiveColumn ()
void addColumn (KColumn *C)
void adjustLayoutToSize ()
void adjustToLayoutNoOfBytesPerLine ()
const KCharColumncharColumn () const
KCharColumncharColumn ()
virtual void contentsDragEnterEvent (QDragEnterEvent *e)
virtual void contentsDragLeaveEvent (QDragLeaveEvent *)
virtual void contentsDragMoveEvent (QDragMoveEvent *e)
virtual void contentsDropEvent (QDropEvent *e)
virtual void contentsMouseDoubleClickEvent (QMouseEvent *e)
virtual void contentsMouseMoveEvent (QMouseEvent *e)
virtual void contentsMousePressEvent (QMouseEvent *e)
virtual void contentsMouseReleaseEvent (QMouseEvent *e)
virtual void contentsWheelEvent (QWheelEvent *e)
void createCursorPixmaps ()
KBufferDragdragObject (bool F=false, QWidget *Parent=0) const
bool handleByteEditKey (QKeyEvent *KeyEvent)
void handleInternalDrag (QDropEvent *e)
bool handleLetter (QKeyEvent *KeyEvent)
void handleMouseMove (const QPoint &Point)
bool hasChanged (const KCoordRange &VisibleRange, KCoordRange *ChangedRange) const
const KBufferColumninactiveColumn () const
KBufferColumninactiveColumn ()
virtual void keyPressEvent (QKeyEvent *KeyEvent)
const KOffsetColumnoffsetColumn () const
KOffsetColumnoffsetColumn ()
void paintActiveCursor (bool CursorOn)
void paintEditedByte (bool Edited)
void paintInactiveCursor (bool CursorOn)
void paintLine (KBufferColumn *C, int Line, KSection Positions)
void pasteFromSource (QMimeSource *Source)
void pointPainterToCursor (QPainter &Painter, const KBufferColumn &Column) const
void removeColumn (KColumn *C)
void removeData (KSection Indizes)
void repaintChanged ()
void repaintView ()
virtual void resizeEvent (QResizeEvent *ResizeEvent)
virtual void setLineHeight (KPixelY NewLineHeight)
virtual void setNoOfLines (int NewNoOfLines)
virtual void showEvent (QShowEvent *e)
void syncEditedByte ()
void updateColumn (KColumn &Column)
void updateCursor ()
void updateLength ()
void updateLineBufferSize ()
void updateView ()
void updateViewByWidth ()
void updateWidths ()
const KValueColumnvalueColumn () const
KValueColumnvalueColumn ()

Protected Attributes

bool BlinkCursorVisible:1
char * ByteBuffer
QClipboard::Mode ClipboardMode
QPtrList< KColumnColumns
QTimer * CursorBlinkTimer
bool CursorPaused:1
int DefaultFontSize
int DoubleClickLine
QPoint DoubleClickPoint
QPoint DragStartPoint
bool DragStartPossible:1
QTimer * DragStartTimer
bool EditModeByInsert:1
unsigned char EditValue
bool HorizontalGrid
bool InDnD:1
bool InDoubleClick:1
bool InEditMode:1
bool InZooming:1
int LengthOfByteBuffer
QPixmap LineBuffer
KPixelY LineHeight
bool MousePressed:1
int NoOfLines
unsigned char OldValue
bool OverWrite:1
bool OverWriteOnly:1
QTimer * ScrollTimer
KPixelX TotalWidth
QTimer * TrippleClickTimer


int BinaryGapWidth
int ByteSpacingWidth
KCoding Coding
int FirstLineOffset
int GroupSpacingWidth
bool Modified
int NoOfBytesPerLine
int NoOfGroupedBytes
bool OverwriteMode
bool OverwriteOnly
bool ReadOnly
KResizeStyle ResizeStyle
bool ShowUnprintable
int StartOffset
QChar SubstituteChar
bool TabChangesFocus

Private Member Functions

 KHexEdit (const KHexEdit &)
KHexEditoperator= (const KHexEdit &)

Private Attributes

KHexEditPrivate * d

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index