summaryrefslogtreecommitdiffstats
path: root/khexedit/parts
diff options
context:
space:
mode:
Diffstat (limited to 'khexedit/parts')
-rw-r--r--khexedit/parts/Makefile.am1
-rw-r--r--khexedit/parts/README3
-rw-r--r--khexedit/parts/kbytesedit/Makefile.am15
-rw-r--r--khexedit/parts/kbytesedit/README23
-rw-r--r--khexedit/parts/kbytesedit/kbyteseditwidget.cpp319
-rw-r--r--khexedit/parts/kbytesedit/kbyteseditwidget.desktop52
-rw-r--r--khexedit/parts/kbytesedit/kbyteseditwidget.h185
-rw-r--r--khexedit/parts/kpart/Makefile.am21
-rw-r--r--khexedit/parts/kpart/khebrowserextension.cpp95
-rw-r--r--khexedit/parts/kpart/khebrowserextension.h58
-rw-r--r--khexedit/parts/kpart/khepart.cpp213
-rw-r--r--khexedit/parts/kpart/khepart.h95
-rw-r--r--khexedit/parts/kpart/khepartfactory.cpp90
-rw-r--r--khexedit/parts/kpart/khepartfactory.h47
-rw-r--r--khexedit/parts/kpart/khexedit2part.desktop101
-rw-r--r--khexedit/parts/kpart/khexedit2partui.rc42
16 files changed, 1360 insertions, 0 deletions
diff --git a/khexedit/parts/Makefile.am b/khexedit/parts/Makefile.am
new file mode 100644
index 0000000..7e2726b
--- /dev/null
+++ b/khexedit/parts/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = kbytesedit kpart
diff --git a/khexedit/parts/README b/khexedit/parts/README
new file mode 100644
index 0000000..a484f1e
--- /dev/null
+++ b/khexedit/parts/README
@@ -0,0 +1,3 @@
+hex editor parts
+==================
+in each subdirectory one part based on the KHexEdit2 library
diff --git a/khexedit/parts/kbytesedit/Makefile.am b/khexedit/parts/kbytesedit/Makefile.am
new file mode 100644
index 0000000..b8be127
--- /dev/null
+++ b/khexedit/parts/kbytesedit/Makefile.am
@@ -0,0 +1,15 @@
+kde_module_LTLIBRARIES = libkbyteseditwidget.la
+
+INCLUDES = -I$(srcdir)/../../lib $(all_includes)
+
+noinst_HEADERS = kbyteseditwidget.h
+
+METASOURCES = AUTO
+
+libkbyteseditwidget_la_SOURCES = kbyteseditwidget.cpp
+
+libkbyteseditwidget_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module -avoid-version -no-undefined
+libkbyteseditwidget_la_LIBADD = ../../lib/libkhexeditcommon.la $(LIB_KPARTS)
+
+service_DATA = kbyteseditwidget.desktop
+servicedir = $(kde_servicesdir)
diff --git a/khexedit/parts/kbytesedit/README b/khexedit/parts/kbytesedit/README
new file mode 100644
index 0000000..e3aa164
--- /dev/null
+++ b/khexedit/parts/kbytesedit/README
@@ -0,0 +1,23 @@
+KBytesEdit widget modul
+=======================
+part of the KHexEdit 2 project (kdenonbeta/khexedit2)
+Author/Maintainer: Friedrich W. H. Kossebau <Friedrich.W.H@Kossebau.de>
+
+
+description:
+------------
+This module delivers a service for the service type "KHexEdit/KBytesEdit".
+It is a hex edit widget that operates on an array of chars given by
+the programmer.
+It serves right now the interfaces
+HexColumnInterface, TextColumnInterface, ZoomInterface, ClipBoardInterface.
+
+
+installing:
+-----------
+Installs the .desktop file describing the service and the module library.
+
+
+usage:
+------
+Only official known usage is by KPilot (kdepim/kpilot) for now. \ No newline at end of file
diff --git a/khexedit/parts/kbytesedit/kbyteseditwidget.cpp b/khexedit/parts/kbytesedit/kbyteseditwidget.cpp
new file mode 100644
index 0000000..4cc91ab
--- /dev/null
+++ b/khexedit/parts/kbytesedit/kbyteseditwidget.cpp
@@ -0,0 +1,319 @@
+/***************************************************************************
+ kbyteseditwidget.cpp - description
+ -------------------
+ begin : Fri Aug 29 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. *
+ * *
+ ***************************************************************************/
+
+
+// qt specific
+#include <qlayout.h>
+// kde specific
+#include <klocale.h>
+#include <kgenericfactory.h>
+#include <kapplication.h>
+// lib specific
+#include "kbytesedit.h"
+#include "kbyteseditwidget.h"
+
+
+KBytesEditWidget::KBytesEditWidget( QWidget *parent, const char *name, const QStringList & )
+ : QWidget( parent, name)
+{
+ QHBoxLayout* Layout = new QHBoxLayout( this );
+ BytesEdit = new KHE::KBytesEdit( this, "BytesEdit" );
+ Layout->addWidget( BytesEdit );
+// connect( _editor, SIGNAL( canUndo(bool) ), this, SIGNAL( canUndo(bool) ) );
+ connect( BytesEdit, SIGNAL(copyAvailable( bool )), this, SIGNAL(copyAvailable( bool )) );
+}
+
+
+
+void KBytesEditWidget::setData( char *D, int S, int RS, bool KM )
+{
+ BytesEdit->setData( D, S, RS, KM );
+}
+
+
+void KBytesEditWidget::setReadOnly( bool RO )
+{
+ BytesEdit->setReadOnly( RO );
+}
+
+void KBytesEditWidget::setMaxDataSize( int MS )
+{
+ BytesEdit->setMaxDataSize( MS );
+}
+
+void KBytesEditWidget::setAutoDelete( bool AD )
+{
+ BytesEdit->setAutoDelete( AD );
+}
+
+
+void KBytesEditWidget::setKeepsMemory( bool KM )
+{
+ BytesEdit->setKeepsMemory( KM );
+}
+
+
+void KBytesEditWidget::setCursorPosition( int Index )
+{
+ BytesEdit->setCursorPosition( Index );
+}
+
+void KBytesEditWidget::setCoding( KCoding C )
+{
+ BytesEdit->setCoding( (KHE::KHexEdit::KCoding) C );
+}
+
+void KBytesEditWidget::setResizeStyle( KResizeStyle Style )
+{
+ BytesEdit->setResizeStyle( (KHE::KHexEdit::KResizeStyle) Style );
+}
+int KBytesEditWidget::noOfBytesPerLine() const
+{
+ return BytesEdit->noOfBytesPerLine();
+}
+
+KBytesEditWidget::KResizeStyle KBytesEditWidget::resizeStyle() const
+{
+ return (KResizeStyle)BytesEdit->resizeStyle();
+}
+void KBytesEditWidget::setNoOfBytesPerLine( int NoCpL )
+{
+ BytesEdit->setNoOfBytesPerLine( NoCpL );
+}
+
+
+
+void KBytesEditWidget::setOverwriteOnly( bool b )
+{
+ BytesEdit->setOverwriteOnly( b );
+}
+
+
+void KBytesEditWidget::setOverwriteMode( bool b )
+{
+ BytesEdit->setOverwriteMode( b );
+}
+
+
+void KBytesEditWidget::setModified( bool b )
+{
+ BytesEdit->setModified( b );
+}
+
+
+void KBytesEditWidget::setByteSpacingWidth( int BSW )
+{
+ BytesEdit->setByteSpacingWidth( BSW );
+}
+
+void KBytesEditWidget::setNoOfGroupedBytes( int NoGB )
+{
+ BytesEdit->setNoOfGroupedBytes( NoGB );
+}
+
+void KBytesEditWidget::setGroupSpacingWidth( int GSW )
+{
+ BytesEdit->setGroupSpacingWidth( GSW );
+}
+
+void KBytesEditWidget::setBinaryGapWidth( int BGW )
+{
+ BytesEdit->setBinaryGapWidth( BGW );
+}
+
+void KBytesEditWidget::setEncoding( KEncoding C )
+{
+ BytesEdit->setEncoding( (KHE::KHexEdit::KEncoding)C );
+}
+
+void KBytesEditWidget::setShowUnprintable( bool SU )
+{
+ BytesEdit->setShowUnprintable( SU );
+}
+
+void KBytesEditWidget::setSubstituteChar( QChar SC )
+{
+ BytesEdit->setSubstituteChar( SC );
+}
+
+
+char *KBytesEditWidget::data() const
+{
+ return BytesEdit->data();
+}
+
+int KBytesEditWidget::dataSize() const
+{
+ return BytesEdit->dataSize();
+}
+int KBytesEditWidget::maxDataSize () const
+{
+ return BytesEdit->maxDataSize();
+}
+bool KBytesEditWidget::isAutoDelete() const
+{
+ return BytesEdit->isAutoDelete();
+}
+
+bool KBytesEditWidget::keepsMemory() const
+{
+ return BytesEdit->keepsMemory();
+}
+
+bool KBytesEditWidget::isOverwriteMode() const
+{
+ return BytesEdit->isOverwriteMode();
+}
+
+bool KBytesEditWidget::isOverwriteOnly() const
+{
+ return BytesEdit->isOverwriteOnly();
+}
+
+bool KBytesEditWidget::isModified() const
+{
+ return BytesEdit->isModified();
+}
+
+bool KBytesEditWidget::isReadOnly() const
+{
+ return BytesEdit->isReadOnly();
+}
+
+
+// bool KBytesEditWidget::tabChangesFocus() const
+// {
+// }
+
+
+
+KBytesEditWidget::KCoding KBytesEditWidget::coding() const
+{
+ return (KCoding)BytesEdit->coding();
+}
+
+int KBytesEditWidget::byteSpacingWidth() const
+{
+ return BytesEdit->byteSpacingWidth();
+}
+
+int KBytesEditWidget::noOfGroupedBytes() const
+{
+ return BytesEdit->noOfGroupedBytes();
+}
+
+int KBytesEditWidget::groupSpacingWidth() const
+{
+ return BytesEdit->groupSpacingWidth();
+}
+
+int KBytesEditWidget::binaryGapWidth() const
+{
+ return BytesEdit->binaryGapWidth();
+}
+
+bool KBytesEditWidget::showUnprintable() const
+{
+ return BytesEdit->showUnprintable();
+}
+
+QChar KBytesEditWidget::substituteChar() const
+{
+ return BytesEdit->substituteChar();
+}
+
+KBytesEditWidget::KEncoding KBytesEditWidget::encoding() const
+{
+ return (KEncoding)BytesEdit->encoding();
+}
+
+
+bool KBytesEditWidget::hasSelectedData() const
+{
+ return BytesEdit->hasSelectedData();
+}
+
+
+void KBytesEditWidget::repaintRange( int i1, int i2 )
+{
+ BytesEdit->repaintRange( i1, i2 );
+}
+
+
+void KBytesEditWidget::insert( const QByteArray &D )
+{
+ BytesEdit->insert( D );
+}
+
+
+void KBytesEditWidget::selectAll( bool Select )
+{
+ BytesEdit->selectAll( Select );
+}
+
+ // clipboard interface
+void KBytesEditWidget::copy()
+{
+ BytesEdit->copy();
+}
+
+void KBytesEditWidget::cut()
+{
+ BytesEdit->cut();
+}
+
+void KBytesEditWidget::paste()
+{
+ BytesEdit->paste();
+}
+
+// zooming interface
+void KBytesEditWidget::zoomIn( int PointInc )
+{
+ BytesEdit->zoomIn( PointInc );
+}
+
+void KBytesEditWidget::zoomIn()
+{
+ BytesEdit->zoomIn();
+}
+
+void KBytesEditWidget::zoomOut( int PointDec )
+{
+ BytesEdit->zoomOut( PointDec );
+}
+
+void KBytesEditWidget::zoomOut()
+{
+ BytesEdit->zoomOut();
+}
+
+void KBytesEditWidget::zoomTo( int PointSize )
+{
+ BytesEdit->zoomTo( PointSize );
+}
+
+void KBytesEditWidget::unZoom()
+{
+ BytesEdit->unZoom();
+}
+
+
+typedef K_TYPELIST_1( KBytesEditWidget ) Product;
+K_EXPORT_COMPONENT_FACTORY( libkbyteseditwidget, KGenericFactory<Product>( "kbytesedit" ) )
+//K_EXPORT_COMPONENT_FACTORY( libkbyteseditwidget, KGenericFactory<MyPlugin> )
+
+#include "kbyteseditwidget.moc"
diff --git a/khexedit/parts/kbytesedit/kbyteseditwidget.desktop b/khexedit/parts/kbytesedit/kbyteseditwidget.desktop
new file mode 100644
index 0000000..4a050a6
--- /dev/null
+++ b/khexedit/parts/kbytesedit/kbyteseditwidget.desktop
@@ -0,0 +1,52 @@
+[Desktop Entry]
+Type=Service
+Name=BytesEdit Widget
+Name[ar]=كائن BytesEdit
+Name[bg]=Модул за двоично редактиране на файлове
+Name[bs]=BytesEdit grafički element
+Name[ca]=Estri BytesEdit
+Name[cy]=Celfigyn GolyguBeit
+Name[de]=BytesEdit-Bedienelement
+Name[el]=Γραφικό συστατικό BytesEdit
+Name[eo]=BytesEdit-fenestraĵo
+Name[es]=Ventana de edición de bytes
+Name[et]=Baitide redigeerimise komponent
+Name[eu]=Byteak Editatzeko Widget-a
+Name[fa]=عنصر ویرایش بایت
+Name[fi]=BytesEdit käyttöliittymäkomponentti
+Name[fr]=Composant éditeur binaire
+Name[ga]=Giuirléid BytesEdit
+Name[he]=פריט עורך הביטויים הסדירים
+Name[hi]=बाइट्स-एडिट विजेट
+Name[hu]=BytesEdit grafikus elem
+Name[is]=Græja til að sýsla með bætaskrár
+Name[it]=Elemento grafico editor di byte
+Name[ja]=バイトエディットウィジェット
+Name[kk]=Бинарлы деректерді өңдеу бөлшегі
+Name[km]=វត្ថុមើលឃើញ BytesEdit
+Name[lt]=BytesEdit valdiklis
+Name[mk]=BytesEdit - графичка контрола
+Name[nb]=BytesEdit skjermelement
+Name[nds]=BytesEdit-Bedeenelement
+Name[ne]=बाइट सम्पादन विजेट
+Name[nn]=BytesEdit-skjermelement
+Name[pa]=ਬਾਈਟ ਸੋਧ ਸਹਾਇਕ
+Name[pl]=Okienko BytesEdit
+Name[pt]=Editor de Bytes
+Name[pt_BR]=Widget do Editor de Bytes
+Name[ro]=Componentă de editare octeţi
+Name[ru]=Виджет редактирования двоичных данных
+Name[sk]=Prvok BytesEdit
+Name[sl]=Gradnik BytesEdit
+Name[sr]=Контрола за бинарно уређивање
+Name[sr@Latn]=Kontrola za binarno uređivanje
+Name[sv]=Grafisk komponent för att redigera binärdata
+Name[ta]= பைட்ஸ்தொகுப்பு சாளரம்
+Name[tg]=Элементи Таҳрири Додаҳои Дуӣ
+Name[uk]=Віджет побайтового редагування
+Name[zh_CN]=字节编辑部件
+Name[zh_TW]=位元編輯器元件
+X-KDE-Library=libkbyteseditwidget
+InitialPreference=2
+ServiceTypes=KHexEdit/KBytesEdit
+
diff --git a/khexedit/parts/kbytesedit/kbyteseditwidget.h b/khexedit/parts/kbytesedit/kbyteseditwidget.h
new file mode 100644
index 0000000..78e4dba
--- /dev/null
+++ b/khexedit/parts/kbytesedit/kbyteseditwidget.h
@@ -0,0 +1,185 @@
+/***************************************************************************
+ kbyteseditwidget.h - description
+ -------------------
+ begin : Fri Aug 29 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 KBYTESEDITWIDGET_H
+#define KBYTESEDITWIDGET_H
+
+// qt specific
+#include <qwidget.h>
+// kde specific
+#include <khexedit/byteseditinterface.h>
+#include <khexedit/valuecolumninterface.h>
+#include <khexedit/charcolumninterface.h>
+#include <khexedit/zoominterface.h>
+#include <khexedit/clipboardinterface.h>
+
+
+namespace KHE {
+class KBytesEdit;
+}
+
+/**
+ hex editor/viewer.
+
+ @author Friedrich W. H. Kossebau <Friedrich.W.H@Kossebau.de>
+ @version 0.1
+ **/
+class KBytesEditWidget : public QWidget, public KHE::BytesEditInterface,
+ public KHE::ValueColumnInterface, public KHE::CharColumnInterface,
+ public KHE::ZoomInterface, public KHE::ClipboardInterface
+{
+ Q_OBJECT
+
+ public:
+ /** constructor API as demanded by KGenericFactory */
+ KBytesEditWidget( QWidget *parent, const char *name, const QStringList & = QStringList() );
+
+ public: // bytesedit interface
+ /** hands over to the editor a new byte array.
+ * If there exists an old one and autodelete is set the old one gets deleted.
+ * @param D pointer to memory
+ * @param DS_ size of used memory
+ * @param RS_ real size of the memory
+ * @param KM keep the memory on resize (RS_ is the maximum size)
+ */
+ virtual void setData( char *D, int DS_, int RS_ = -1, bool KM = true );
+
+ /** 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
+ */
+ virtual void setMaxDataSize( int MS );
+ /** sets whether the array should be deleted on the widget's end or if a new array is set.
+ * Default is false
+ */
+ virtual void setAutoDelete( bool AD = true );
+ /** sets whether the memory given by setData or in the constructor should be kept on resize
+ */
+ virtual void setKeepsMemory( bool KM = true );
+ /** */
+ virtual char *data() const;
+ /** returns the size of the actual byte array */
+ virtual int dataSize() const;
+ /** returns the maximal allowed size for the byte array */
+ virtual int maxDataSize () const;
+ /** returns whether autodelete is set for the byte array */
+ virtual bool isAutoDelete() const;
+ /** returns whether the memory of the byte array is kept */
+ virtual bool keepsMemory() const;
+ /** */
+ virtual bool isOverwriteMode() const;
+ virtual bool isOverwriteOnly() const;
+ virtual bool isReadOnly() const;
+ virtual bool isModified() const;
+ /** repaint the indizes from i1 to i2 */
+ virtual void repaintRange( int i1, int i2 );
+
+ public: // cursor interface
+ /** */
+ virtual void setCursorPosition( int Index );
+// virtual bool tabChangesFocus() const;
+
+ public: // layout interface ??
+ /** sets the resizestyle for the value column. Default is KHE::FullSizeUsage */
+ virtual void setResizeStyle( KResizeStyle Style );
+ /** sets the number of bytes per line, switching the resize style to KHE::NoResize */
+ virtual void setNoOfBytesPerLine( int NoCpL );
+
+ virtual int noOfBytesPerLine() const;
+ virtual KResizeStyle resizeStyle() const;
+
+ public: // value column
+ /** sets the format of the value column. Default is KHE::HexadecimalCoding */
+ virtual void setCoding( KCoding C );
+ /** sets the spacing between the bytes in pixels */
+ virtual void setByteSpacingWidth( int BSW );
+ /** sets the numbers of grouped bytes, 0 means no grouping, Default is 4 */
+ virtual void setNoOfGroupedBytes( int NoGB );
+ /** sets the spacing between the groups in pixels */
+ virtual void setGroupSpacingWidth( int GSW );
+ /** sets the spacing in the middle of a binary byte in the value column
+ * @param BGW spacing in the middle of a binary in pixels
+ */
+ virtual void setBinaryGapWidth( int BGW );
+
+ virtual KCoding coding() const;
+ virtual int byteSpacingWidth() const;
+
+ virtual int noOfGroupedBytes() const;
+ virtual int groupSpacingWidth() const;
+ virtual int binaryGapWidth() const;
+
+ public: // char column
+ /** sets whether "unprintable" chars (>32) should be displayed in the char column
+ * with their corresponding character.
+ * @param SU
+ * returns true if there was a change
+ */
+ virtual void setShowUnprintable( bool SU = true );
+ /** sets the substitute character for "unprintable" chars
+ * returns true if there was a change
+ */
+ virtual void setSubstituteChar( QChar SC );
+ /** sets the encoding of the char column. Default is KHE::LocalEncoding.
+ * If the encoding is not available the format will not be changed. */
+ virtual void setEncoding( KEncoding C );
+ /** returns true if "unprintable" chars (>32) are displayed in the char column
+ * with their corresponding character, default is false
+ */
+ virtual bool showUnprintable() const;
+ /** returns the actually used substitute character for "unprintable" chars, default is '.' */
+ virtual QChar substituteChar() const;
+ /** */
+ virtual KEncoding encoding() const;
+
+ public: // edit interface
+ /** */
+ virtual void insert( const QByteArray &D );
+ /** de-/selects all data */
+ virtual void selectAll( bool select );
+ /** returns true if there is a selected range in the array */
+ virtual bool hasSelectedData() const;
+
+ public slots:
+ // bytesedit interface
+ virtual void setReadOnly( bool RO = true );
+ virtual void setOverwriteOnly( bool b );
+ virtual void setOverwriteMode( bool b );
+ virtual void setModified( bool b );
+
+ // clipboard interface
+ virtual void copy();
+ virtual void cut();
+ virtual void paste();
+
+ // zooming interface
+ virtual void zoomIn( int PointInc );
+ virtual void zoomIn();
+ virtual void zoomOut( int PointDec );
+ virtual void zoomOut();
+ virtual void zoomTo( int PointSize );
+ virtual void unZoom();
+
+ signals:
+ // clipboard interface
+ virtual void copyAvailable( bool Really );
+
+ protected:
+ KHE::KBytesEdit* BytesEdit;
+};
+
+#endif
diff --git a/khexedit/parts/kpart/Makefile.am b/khexedit/parts/kpart/Makefile.am
new file mode 100644
index 0000000..42d9c77
--- /dev/null
+++ b/khexedit/parts/kpart/Makefile.am
@@ -0,0 +1,21 @@
+kde_module_LTLIBRARIES = libkhexedit2part.la
+
+INCLUDES = -I$(srcdir)/../../lib $(all_includes)
+
+noinst_HEADERS = khepart.h khebrowserextension.h khepartfactory.h
+
+METASOURCES = AUTO
+
+libkhexedit2part_la_SOURCES = khepart.cpp khebrowserextension.cpp khepartfactory.cpp
+
+libkhexedit2part_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module -no-undefined
+libkhexedit2part_la_LIBADD = ../../lib/libkhexeditcommon.la $(LIB_KPARTS) $(LIB_KIO)
+
+partdesktop_DATA = khexedit2part.desktop
+partdesktopdir = $(kde_servicesdir)
+
+partrc_DATA = khexedit2partui.rc
+partrcdir = $(kde_datadir)/khexedit2part
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/khexedit2part.pot
diff --git a/khexedit/parts/kpart/khebrowserextension.cpp b/khexedit/parts/kpart/khebrowserextension.cpp
new file mode 100644
index 0000000..d4fc3f3
--- /dev/null
+++ b/khexedit/parts/kpart/khebrowserextension.cpp
@@ -0,0 +1,95 @@
+/***************************************************************************
+ khebrowserextension.cpp - description
+ -------------------
+ begin : Di Nov 16 2004
+ copyright : (C) 2004 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. *
+ * *
+ ***************************************************************************/
+
+
+// qt specific
+#include <kaction.h>
+// app specific
+#include "khexedit.h"
+#include "khepart.h"
+#include "khebrowserextension.h"
+
+using namespace KHE;
+
+
+KHexEditBrowserExtension::KHexEditBrowserExtension( KHexEditPart *P )
+ : KParts::BrowserExtension( P, "khexeditpartbrowserextension" ),
+ HexEditPart( P )
+{
+ connect( HexEditPart->HexEdit, SIGNAL( selectionChanged() ), this, SLOT( slotSelectionChanged() ) );
+}
+
+void KHexEditBrowserExtension::copy()
+{
+ HexEditPart->HexEdit->copy();
+}
+
+
+void KHexEditBrowserExtension::slotSelectionChanged()
+{
+ emit enableAction( "copy", HexEditPart->HexEdit->hasSelectedData() );
+}
+
+
+void KHexEditBrowserExtension::saveState( QDataStream &stream )
+{
+ KParts::BrowserExtension::saveState( stream );
+
+ KHexEdit *HexEdit = HexEditPart->HexEdit;
+
+ stream << (int)HexEdit->offsetColumnVisible() << HexEdit->visibleBufferColumns()
+ << (int)HexEdit->resizeStyle() << (int)HexEdit->coding()
+ << HexEdit->encodingName() << (int)HexEdit->showUnprintable()
+ << HexEdit->contentsX() << HexEdit->contentsY()
+ << HexEdit->cursorPosition() << (int)HexEdit->isCursorBehind()
+ << HexEdit->cursorColumn();
+}
+
+
+void KHexEditBrowserExtension::restoreState( QDataStream &stream )
+{
+ KParts::BrowserExtension::restoreState( stream );
+
+ int OffsetColumnVisible;
+ int VisibleBufferColumns;
+ int ResizeStyle;
+ int Coding;
+ QString EncodingName;
+ int ShowUnprintable;
+ int x, y;
+ int Position;
+ int CursorBehind;
+ int CursorColumn;
+
+ stream >> OffsetColumnVisible >> VisibleBufferColumns >> ResizeStyle >> Coding >> EncodingName >> ShowUnprintable
+ >> x >> y >> Position >> CursorBehind >> CursorColumn;
+
+ KHexEdit *HexEdit = HexEditPart->HexEdit;
+
+ HexEdit->toggleOffsetColumn( OffsetColumnVisible );
+ HexEdit->showBufferColumns( VisibleBufferColumns );
+ HexEdit->setResizeStyle( (KHexEdit::KResizeStyle)ResizeStyle );
+ HexEdit->setCoding( (KHexEdit::KCoding)Coding );
+ HexEdit->setEncoding( EncodingName );
+ HexEdit->setShowUnprintable( ShowUnprintable );
+ HexEdit->setContentsPos( x, y );
+ HexEdit->setCursorPosition( Position, CursorBehind );
+ HexEdit->setCursorColumn( (KHexEdit::KBufferColumnId)CursorColumn );
+
+ HexEditPart->fitActionSettings();
+}
+
+#include "khebrowserextension.moc"
diff --git a/khexedit/parts/kpart/khebrowserextension.h b/khexedit/parts/kpart/khebrowserextension.h
new file mode 100644
index 0000000..4638944
--- /dev/null
+++ b/khexedit/parts/kpart/khebrowserextension.h
@@ -0,0 +1,58 @@
+/***************************************************************************
+ khebrowserextension.h - description
+ -------------------
+ begin : Di Nov 16 2004
+ copyright : (C) 2004 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 KHEBROWSEREXTENSION_H
+#define KHEBROWSEREXTENSION_H
+
+// kde specific
+#include <kparts/browserextension.h>
+
+namespace KHE
+{
+
+// forward declaration
+class KHexEditPart;
+
+/**
+ * @short Extension for better support for embedding in browsers
+ * @author Friedrich W. H. Kossebau <Friedrich.W.H@Kossebau.de>
+ */
+class KHexEditBrowserExtension : public KParts::BrowserExtension
+{
+ Q_OBJECT
+
+ public:
+ KHexEditBrowserExtension( KHexEditPart *P );
+
+ public: // KParts::BrowserExtension API
+ virtual void saveState( QDataStream &stream );
+ virtual void restoreState( QDataStream &stream );
+
+ public slots:
+ /** copy text to clipboard */
+ void copy();
+
+ /** selection has changed */
+ void slotSelectionChanged();
+
+ protected:
+ KHexEditPart *HexEditPart;
+};
+
+}
+
+#endif
diff --git a/khexedit/parts/kpart/khepart.cpp b/khexedit/parts/kpart/khepart.cpp
new file mode 100644
index 0000000..e9b9ed5
--- /dev/null
+++ b/khexedit/parts/kpart/khepart.cpp
@@ -0,0 +1,213 @@
+/***************************************************************************
+ khepart.cpp - 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. *
+ * *
+ ***************************************************************************/
+
+
+// kde specific
+#include <klocale.h>
+//#include <kinstance.h>
+#include <kaction.h>
+#include <kstdaction.h>
+//#include <kglobalsettings.h>
+// app specific
+#include "khexedit.h"
+#include "kcharcodec.h"
+#include "khepartfactory.h"
+#include "khebrowserextension.h"
+#include "khepart.h"
+
+using namespace KHE;
+
+static const char RCFileName[] = "khexedit2partui.rc";
+
+KHexEditPart::KHexEditPart( QWidget *ParentWidget, const char *WidgetName,
+ QObject *Parent, const char *Name,
+ bool BrowserViewWanted )
+ : KParts::ReadOnlyPart( Parent, Name )
+{
+ setInstance( KHexEditPartFactory::instance() );
+
+ HexEdit = new KHexEdit( &Wrapping, ParentWidget, WidgetName );
+ HexEdit->setNoOfBytesPerLine( 16 );
+ HexEdit->setBufferSpacing( 3, 4, 10 );
+ HexEdit->setShowUnprintable( false );
+
+ // notify the part that this is our internal widget
+ setWidget( HexEdit );
+
+ setupActions( BrowserViewWanted );
+
+ if( CopyAction )
+ {
+ connect( HexEdit, SIGNAL(copyAvailable(bool)), CopyAction,SLOT(setEnabled(bool)) );
+ connect( HexEdit, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()) );
+ CopyAction->setEnabled( false );
+ }
+
+ // plugin to browsers
+ if( BrowserViewWanted )
+ new KHexEditBrowserExtension( this );
+}
+
+
+KHexEditPart::~KHexEditPart()
+{
+}
+
+/*
+void KHexEditPart::setupTools( bool BrowserViewWanted )
+{
+ if( !BrowserViewWanted ) new KClipboardTool( this );
+
+ new KZoomToolet( this );
+ new KSelectToolet( this );
+ new KHEValueCodingToolet( this );
+ new KHECharEncodingToolet( this );
+ new KHEResizeStyleToolet( this );
+ new KHEColumnToggleToolet( this );
+}
+*/
+void KHexEditPart::setupActions( bool BrowserViewWanted )
+{
+ KActionCollection *AC = actionCollection();
+ // create our actions
+ CopyAction = BrowserViewWanted ? 0 : KStdAction::copy( HexEdit, SLOT(copy()), AC );
+
+ KStdAction::selectAll( this, SLOT(slotSelectAll()), AC );
+ KStdAction::deselect( this, SLOT(slotUnselect()), AC );
+
+ // value encoding
+ CodingAction = new KSelectAction( i18n("&Value Coding"), 0, AC, "view_valuecoding" );
+ QStringList List;
+ List.append( i18n("&Hexadecimal") );
+ List.append( i18n("&Decimal") );
+ List.append( i18n("&Octal") );
+ List.append( i18n("&Binary") );
+ CodingAction->setItems( List );
+ connect( CodingAction, SIGNAL(activated(int)), this, SLOT(slotSetCoding(int)) );
+
+ // document encoding
+ EncodingAction = new KSelectAction( i18n("&Char Encoding"), 0, AC, "view_charencoding" );
+ EncodingAction->setItems( KCharCodec::codecNames() );
+ connect( EncodingAction, SIGNAL(activated(int)), this, SLOT(slotSetEncoding(int)) );
+
+ ShowUnprintableAction = new KToggleAction( i18n("Show &Unprintable Chars (<32)"), 0, this, SLOT(slotSetShowUnprintable()), actionCollection(), "view_showunprintable" );
+
+ KStdAction::zoomIn( HexEdit, SLOT(zoomIn()), actionCollection() );
+ KStdAction::zoomOut( HexEdit, SLOT(zoomOut()), actionCollection() );
+
+ // resize style
+ ResizeStyleAction = new KSelectAction( i18n("&Resize Style"), 0, AC, "resizestyle" );
+ List.clear();
+ List.append( i18n("&No Resize") );
+ List.append( i18n("&Lock Groups") );
+ List.append( i18n("&Full Size Usage") );
+ ResizeStyleAction->setItems( List );
+ connect( ResizeStyleAction, SIGNAL(activated(int)), this, SLOT(slotSetResizeStyle(int)) );
+
+ ShowOffsetColumnAction = new KToggleAction( i18n("&Line Offset"), Key_F11, this, SLOT(slotToggleOffsetColumn()), AC, "view_lineoffset" );
+
+ // show buffer columns
+ ToggleColumnsAction = new KSelectAction( i18n("&Columns"), 0, AC, "togglecolumns" );
+ List.clear();
+ List.append( i18n("&Values Column") );
+ List.append( i18n("&Chars Column") );
+ List.append( i18n("&Both Columns") );
+ ToggleColumnsAction->setItems( List );
+ connect( ToggleColumnsAction, SIGNAL(activated(int)), this, SLOT(slotToggleValueCharColumns(int)) );
+
+ fitActionSettings();
+
+ // set our XML-UI resource file
+ setXMLFile( RCFileName );
+}
+
+
+void KHexEditPart::fitActionSettings()
+{
+ ShowOffsetColumnAction->setChecked( HexEdit->offsetColumnVisible() );
+ ShowUnprintableAction->setChecked( HexEdit->showUnprintable() );
+
+ CodingAction->setCurrentItem( (int)HexEdit->coding() );
+ EncodingAction->setCurrentItem( KCharCodec::codecNames().findIndex(HexEdit->encodingName()) );
+
+ ResizeStyleAction->setCurrentItem( (int)HexEdit->resizeStyle() );
+
+ ToggleColumnsAction->setCurrentItem( (int)HexEdit->visibleBufferColumns()-1 );
+}
+
+
+bool KHexEditPart::openFile()
+{
+ Wrapping.open( m_file );
+ HexEdit->setDataBuffer( &Wrapping );
+ HexEdit->setCursorPosition( 0 );
+ HexEdit->selectAll( false );
+
+ return true;
+}
+
+
+
+void KHexEditPart::slotSelectionChanged()
+{
+ bool State = HexEdit->hasSelectedData();
+ CopyAction->setEnabled( State );
+}
+
+
+void KHexEditPart::slotSelectAll()
+{
+ HexEdit->selectAll( true );
+}
+
+
+void KHexEditPart::slotUnselect()
+{
+ HexEdit->selectAll( false );
+}
+
+
+void KHexEditPart::slotSetCoding( int Coding )
+{
+ HexEdit->setCoding( (KHexEdit::KCoding)Coding );
+}
+
+void KHexEditPart::slotSetShowUnprintable()
+{
+ HexEdit->setShowUnprintable( ShowUnprintableAction->isChecked() );
+}
+
+void KHexEditPart::slotToggleOffsetColumn()
+{
+ HexEdit->toggleOffsetColumn( ShowOffsetColumnAction->isChecked() );
+}
+
+void KHexEditPart::slotSetResizeStyle( int ResizeStyle )
+{
+ HexEdit->setResizeStyle( (KHexEdit::KResizeStyle)ResizeStyle );
+}
+
+void KHexEditPart::slotSetEncoding( int Encoding )
+{
+ HexEdit->setEncoding( KCharCodec::codecNames()[Encoding] );
+}
+
+void KHexEditPart::slotToggleValueCharColumns( int VisibleColumns)
+{
+ HexEdit->showBufferColumns( VisibleColumns+1 );
+}
+
+#include "khepart.moc"
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
diff --git a/khexedit/parts/kpart/khepartfactory.cpp b/khexedit/parts/kpart/khepartfactory.cpp
new file mode 100644
index 0000000..f85d8a9
--- /dev/null
+++ b/khexedit/parts/kpart/khepartfactory.cpp
@@ -0,0 +1,90 @@
+/***************************************************************************
+ khepartfactory.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. *
+ * *
+ ***************************************************************************/
+
+
+// kde specific
+#include <kinstance.h>
+#include <kaboutdata.h>
+#include <klocale.h>
+// app specific
+#include "khepart.h"
+#include "khepartfactory.h"
+
+using namespace KHE;
+
+// Part
+static const char PartId[] = "khexedit2part";
+static const char PartName[] = I18N_NOOP("KHexEdit2Part");
+static const char PartDescription[] = I18N_NOOP("Embedded hex editor");
+static const char PartVersion[] = "0.2.0";
+static const char PartCopyright[] = "(C) 2003-2004 Friedrich W. H. Kossebau";
+// Author
+static const char FWHKName[] = "Friedrich W. H. Kossebau";
+static const char FWHKTask[] = I18N_NOOP("Author");
+static const char FWHKEmailAddress[] = "Friedrich.W.H@Kossebau.de";
+// static const char FWHKWebAddress[] = "http://www.kossebau.de";
+
+
+KInstance* KHexEditPartFactory::s_instance = 0L;
+KAboutData* KHexEditPartFactory::s_about = 0L;
+
+
+KHexEditPartFactory::KHexEditPartFactory()
+ : KParts::Factory()
+{
+}
+
+
+KHexEditPartFactory::~KHexEditPartFactory()
+{
+ delete s_instance;
+ delete s_about;
+
+ s_instance = 0;
+}
+
+
+KParts::Part* KHexEditPartFactory::createPartObject( QWidget *ParentWidget, const char *WidgetName,
+ QObject *Parent, const char *Name,
+ const char *CN, const QStringList &/*args*/ )
+{
+ QCString Classname( CN );
+ bool BrowserViewWanted = ( Classname == "Browser/View" );
+ //bool ReadOnlyWanted = (BrowserViewWanted || ( Classname == "KParts::ReadOnlyPart" ));
+
+ // Create an instance of our Part
+ KHexEditPart* HexEditPart = new KHexEditPart( ParentWidget, WidgetName, Parent, Name, BrowserViewWanted );
+
+ return HexEditPart;
+}
+
+
+KInstance* KHexEditPartFactory::instance()
+{
+ if( !s_instance )
+ {
+ s_about = new KAboutData( PartId, PartName, PartVersion, PartDescription,
+ KAboutData::License_GPL_V2, PartCopyright, 0, 0, FWHKEmailAddress );
+ s_about->addAuthor( FWHKName, FWHKTask, FWHKEmailAddress );
+ s_instance = new KInstance( s_about );
+ }
+ return s_instance;
+}
+
+
+K_EXPORT_COMPONENT_FACTORY( libkhexedit2part, KHexEditPartFactory )
+
+#include "khepartfactory.moc"
diff --git a/khexedit/parts/kpart/khepartfactory.h b/khexedit/parts/kpart/khepartfactory.h
new file mode 100644
index 0000000..7cd6c7e
--- /dev/null
+++ b/khexedit/parts/kpart/khepartfactory.h
@@ -0,0 +1,47 @@
+/***************************************************************************
+ khepartfactory.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 KHEPARTFACTORY_H
+#define KHEPARTFACTORY_H
+
+#include <kparts/factory.h>
+
+class KInstance;
+class KAboutData;
+
+
+class KHexEditPartFactory : public KParts::Factory
+{
+ Q_OBJECT
+
+ public:
+ KHexEditPartFactory();
+ virtual ~KHexEditPartFactory();
+
+ public:
+ virtual KParts::Part* createPartObject( QWidget *parentWidget, const char *widgetName,
+ QObject *parent, const char *name,
+ const char *classname, const QStringList &args );
+ static KInstance* instance();
+
+
+ private:
+ static KInstance* s_instance;
+ static KAboutData* s_about;
+};
+
+#endif
diff --git a/khexedit/parts/kpart/khexedit2part.desktop b/khexedit/parts/kpart/khexedit2part.desktop
new file mode 100644
index 0000000..60f4132
--- /dev/null
+++ b/khexedit/parts/kpart/khexedit2part.desktop
@@ -0,0 +1,101 @@
+[Desktop Entry]
+Type=Service
+Icon=khexedit
+Name=Embedded Binary Viewer
+Name[ar]=عارض ثنائى مدمج
+Name[bg]=Вграден двоичен преглед
+Name[br]=Gweler HTML enframmus
+Name[bs]=Ugrađeni preglednik binarnih datoteka
+Name[ca]=Visor binari encastat
+Name[cs]=Zabudovaný binární prohlížeč
+Name[da]=Indlejret binær fremviser
+Name[de]=Eingebettetes Anzeigeprogramm für Binärdateien
+Name[el]=Ενσωματωμένος προβολέας δυαδικών αρχείων
+Name[eo]=Enkonstruita duum-rigardilo
+Name[es]=Visor binario empotrado
+Name[et]=Põimitud binaarfailide näitaja
+Name[eu]=Ikusgailu binario txertagarria
+Name[fa]=مشاهده‌گر دوگانی نهفته
+Name[fi]=Sulautettu binääritiedostojen näytin
+Name[fr]=Afficheur de binaires intégré
+Name[ga]=Amharcán Leabaithe Dénártha
+Name[he]=עורך הקסאדצימלי משובץ
+Name[hu]=Beágyazott nézegető bináris fájlokhoz
+Name[is]=Innbyggður tvíundakerfisskoðari
+Name[it]=Visore binario integrabile
+Name[ja]=埋め込みバイナリビューア
+Name[kk]=Ендірілетін бинарлық қарау құралы
+Name[km]=កម្មវិធី​មើល​គោលពីរ​ដែល​បាន​បង្កប់
+Name[lt]=Įdedama dvejetainių duomenų žiūryklė
+Name[nb]=Innebygget Binærfremviser
+Name[nds]=Inbett Bineerdaten-Kieker
+Name[ne]=सम्मिलित बाइनरी दर्शक
+Name[nl]=Ingebedde binaire viewer
+Name[nn]=Innebygd binærframvisar
+Name[pa]=ਸ਼ਾਮਲ ਬਾਈਨਰੀ ਦਰਸ਼ਕ
+Name[pl]=Wbudowana przeglądarka binarna
+Name[pt]=Visualizador Binário Incorporado
+Name[pt_BR]=Visualizador Binário Embutido
+Name[ru]=Компонент просмотра двоичных данных
+Name[sk]=Vložený binárny prezerač
+Name[sl]=Vgrajen binarni pregledovalnik
+Name[sr]=Уградиви приказивач бинарног
+Name[sr@Latn]=Ugradivi prikazivač binarnog
+Name[sv]=Inbäddad binärvisning
+Name[ta]=உட்பொதிந்த இருநிலை காட்சியாளன்
+Name[tr]=Gömülü İkili dosya Görüntüleyici
+Name[uk]=Вбудований переглядач для двійкових даних
+Name[zh_CN]=嵌入式二进制查看器
+Name[zh_TW]=嵌入式二進位顯示器
+Comment=Embedded Binary Viewer
+Comment[ar]=عارض ثنائى مدمج
+Comment[bg]=Вградена програма за преглед на двоични файлове
+Comment[br]=Gweler HTML enframmus
+Comment[bs]=Ugrađeni preglednik binarnih datoteka
+Comment[ca]=Visor binari encastat
+Comment[cs]=Zabudovaný binární prohlížeč
+Comment[da]=Indlejret binær fremviser
+Comment[de]=Eingebettetes Anzeigeprogramm für Binärdateien
+Comment[el]=Ενσωματωμένος προβολέας δυαδικών αρχείων
+Comment[eo]=Enkonstruita duum-rigardilo
+Comment[es]=Visor binario empotrado
+Comment[et]=Põimitud binaarfailide näitaja
+Comment[eu]=Ikusgailu binario txertagarria
+Comment[fa]=مشاهده‌گر دوگانی نهفته
+Comment[fi]=Sulautettu binääritiedostojen näytin
+Comment[fr]=Afficheur de binaires intégré
+Comment[ga]=Amharcán Leabaithe Dénártha
+Comment[he]=עורך הקסאדצימלי משובץ
+Comment[hu]=Beágyazott fájlmegjelenítő bináris fájlokhoz
+Comment[is]=Innbyggður tvíundakerfisskoðari
+Comment[it]=Visore binario integrabile
+Comment[ja]=埋め込みバイナリビューア
+Comment[ka]=ჩაშენებული ბინარული დამთვალიერებელი
+Comment[kk]=Ендірілетін бинарлық қарау құралы
+Comment[km]=កម្មវិធី​មើល​គោលពីរ​ដែល​បាន​បង្កប់
+Comment[lt]=Įdedama dvejetainių duomenų žiūryklė
+Comment[nb]=Innebygget Binærfremviser
+Comment[nds]=Inbett Bineerdaten-Kieker
+Comment[ne]=सम्मिलित बाइनरी दर्शक
+Comment[nl]=Ingebedde binaire viewer
+Comment[nn]=Innebygd binærframvisar
+Comment[pa]=ਸ਼ਾਮਲ ਬਾਈਨਰੀ ਦਰਸ਼ਕ
+Comment[pl]=Wbudowana przeglądarka binarna
+Comment[pt]=Visualizador Binário Incorporado
+Comment[pt_BR]=Visualizador Binário Embutido
+Comment[ru]=Компонент просмотра двоичных данных
+Comment[sk]=Vložený binárny prezerač
+Comment[sl]=Vgrajen binarni pregledovalnik
+Comment[sr]=Уградиви приказивач бинарног
+Comment[sr@Latn]=Ugradivi prikazivač binarnog
+Comment[sv]=Inbäddad binärvisning
+Comment[ta]=உட்பொதிந்த இருநிலை காட்சியாளன்
+Comment[tr]=Gömülü İkili dosya Görüntüleyici
+Comment[uk]=Вбудований переглядач для двійкових даних
+Comment[zh_CN]=嵌入式二进制查看器
+Comment[zh_TW]=嵌入式二進位顯示器
+#MimeType=all/allfiles
+MimeType=application/octet-stream
+ServiceTypes=KParts/ReadOnlyPart,Browser/View
+#,KParts/ReadWritePart
+X-KDE-Library=libkhexedit2part
diff --git a/khexedit/parts/kpart/khexedit2partui.rc b/khexedit/parts/kpart/khexedit2partui.rc
new file mode 100644
index 0000000..82b40eb
--- /dev/null
+++ b/khexedit/parts/kpart/khexedit2partui.rc
@@ -0,0 +1,42 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="khexedit2part" version="1">
+<MenuBar>
+ <Menu name="edit"><text>&amp;Edit</text>
+ <Action name="edit_copy" group="edit_paste_merge" />
+ <Action name="edit_select_all" group="edit_select_merge" />
+ <Action name="edit_deselect" group="edit_select_merge" />
+ </Menu>
+ <Menu name="view"><text>&amp;View</text>
+ <Separator/>
+ <Action name="view_zoom_in" />
+ <Action name="view_zoom_out" />
+ <Separator/>
+ <Action name="view_showunprintable" />
+ <Action name="view_lineoffset" />
+ <Separator/>
+ <Action name="view_valuecoding" />
+ <Action name="view_charencoding" />
+ </Menu>
+ <Menu name="settings"><text>&amp;Settings</text>
+ <Separator/>
+ <Action name="resizestyle" group="show_merge" />
+ <Action name="togglecolumns" group="show_merge" />
+ </Menu>
+</MenuBar>
+
+<ToolBar name="mainToolBar"><text>Main Toolbar</text>
+ <Action name="edit_copy" />
+ <Action name="view_zoom_in" />
+ <Action name="view_zoom_out" />
+</ToolBar>
+
+<!-- Editor popup menu //-->
+<Menu name="editor_popup">
+ <Action name="view_hexcoding" />
+ <Action name="view_deccoding" />
+ <Action name="view_octcoding" />
+ <Action name="view_bincoding" />
+ <Separator/>
+ <Action name="resize_lock" />
+</Menu>
+</kpartgui>