summaryrefslogtreecommitdiffstats
path: root/khexedit/parts/kpart
diff options
context:
space:
mode:
Diffstat (limited to 'khexedit/parts/kpart')
-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
9 files changed, 762 insertions, 0 deletions
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>