summaryrefslogtreecommitdiffstats
path: root/khexedit/parts/kpart/khepart.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit2bda8f7717adf28da4af0d34fb82f63d2868c31d (patch)
tree8d927b7b47a90c4adb646482a52613f58acd6f8c /khexedit/parts/kpart/khepart.h
downloadtdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.tar.gz
tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.zip
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
Diffstat (limited to 'khexedit/parts/kpart/khepart.h')
-rw-r--r--khexedit/parts/kpart/khepart.h95
1 files changed, 95 insertions, 0 deletions
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 <kparts/part.h>
+// 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 <Friedrich.W.H@Kossebau.de>
+ * @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