1 /* 2 SPDX-FileCopyrightText: 2010 Friedrich W. H. Kossebau <kossebau@kde.org> 3 4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 5 */ 6 7 #include "oktetaview.h" 8 9 // lib 10 #include "oktetaplugin.h" 11 #include "oktetadocument.h" 12 #include "oktetawidget.h" 13 // Okteta Kasten 14 #include <Kasten/Okteta/ByteArrayView> 15 16 17 namespace KDevelop 18 { 19 OktetaView(OktetaDocument * document,Kasten::ByteArrayViewProfileSynchronizer * viewProfileSynchronizer)20OktetaView::OktetaView( OktetaDocument* document, Kasten::ByteArrayViewProfileSynchronizer* viewProfileSynchronizer ) 21 : Sublime::View( document, View::TakeOwnership ), 22 mByteArrayView( new Kasten::ByteArrayView( document->byteArrayDocument(), viewProfileSynchronizer ) ) 23 { 24 } 25 createWidget(QWidget * parent)26QWidget* OktetaView::createWidget( QWidget* parent ) 27 { 28 OktetaPlugin* plugin = static_cast<OktetaDocument*>( document() )->plugin(); 29 30 return new OktetaWidget( parent, mByteArrayView, plugin ); 31 } 32 ~OktetaView()33OktetaView::~OktetaView() 34 { 35 delete mByteArrayView; 36 } 37 38 } 39