From 2bda8f7717adf28da4af0d34fb82f63d2868c31d Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- khexedit/parts/kpart/khepart.h | 95 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 khexedit/parts/kpart/khepart.h (limited to 'khexedit/parts/kpart/khepart.h') diff --git a/khexedit/parts/kpart/khepart.h b/khexedit/parts/kpart/khepart.h new file mode 100644 index 0000000..54befa0 --- /dev/null +++ b/khexedit/parts/kpart/khepart.h @@ -0,0 +1,95 @@ +/*************************************************************************** + khepart.h - description + ------------------- + begin : Don Jun 19 2003 + copyright : (C) 2003 by Friedrich W. H. Kossebau + email : Friedrich.W.H@Kossebau.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License version 2 as published by the Free Software Foundation. * + * * + ***************************************************************************/ + + +#ifndef KHEPART_H +#define KHEPART_H + +// kde specific +#include +// app specific +#include "kbigbuffer.h" + +// forward declarations +class KRadioAction; +class KToggleAction; +class KSelectAction; + +namespace KHE +{ + +// forward declarations +class KHexEdit; + +/** + * This is a "Part". It that does all the real work in a KPart + * application. + * + * @short Main Part + * @author Friedrich W. H. Kossebau + * @version 0.1.0 + */ +class KHexEditPart : public KParts::ReadOnlyPart +{ + Q_OBJECT + + friend class KHexEditBrowserExtension; + + public: + KHexEditPart( QWidget *ParentWidget, const char *WidgetName, QObject *Parent, const char *Name, + bool BrowserViewWanted ); + virtual ~KHexEditPart(); + + + protected: // KParts::ReadOnlyPart API + virtual bool openFile(); + + protected: + void setupActions( bool BrowserViewWanted ); + void fitActionSettings(); + + protected slots: + // used to catch changes in the HexEdit widget + void slotSelectionChanged(); + protected slots: // action slots + void slotSelectAll(); + void slotUnselect(); + void slotSetCoding( int Coding ); + void slotSetEncoding( int Encoding ); + void slotSetShowUnprintable(); + void slotSetResizeStyle( int Style ); + void slotToggleOffsetColumn(); + void slotToggleValueCharColumns( int VisibleColunms ); + + private: + KHexEdit *HexEdit; + KBigBuffer Wrapping; + + // edit menu + KAction *CopyAction; + // view menu + KSelectAction *CodingAction; + KSelectAction *EncodingAction; + KToggleAction *ShowUnprintableAction; + // settings menu + KSelectAction *ResizeStyleAction; + KToggleAction *ShowOffsetColumnAction; + KSelectAction *ToggleColumnsAction; +}; + +} + +#endif -- cgit v1.2.1