File indexing completed on 2022-09-27 16:35:41

0001 /*
0002     This file is part of the Okteta Designer plugin, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2009 Friedrich W. H. Kossebau <kossebau@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 
0009 #include "bytearrayrowviewdesignerfactory.hpp"
0010 
0011 // plugin
0012 #include "fillerbytearraymodel.hpp"
0013 // Okteta gui
0014 #include <Okteta/ByteArrayRowView>
0015 
0016 // TODO: add translations for visible names
0017 ByteArrayRowViewDesignerFactory::ByteArrayRowViewDesignerFactory(QObject* parent)
0018     : QObject(parent)
0019 {
0020 }
0021 
0022 QWidget* ByteArrayRowViewDesignerFactory::createWidget(QWidget* parent)
0023 {
0024     auto* widget = new Okteta::ByteArrayRowView(parent);
0025     widget->setByteArrayModel(createFillerByteArrayModel(widget));
0026     return widget;
0027 }
0028 
0029 QString ByteArrayRowViewDesignerFactory::group() const
0030 {
0031     return QStringLiteral("Okteta");
0032 }
0033 
0034 QIcon ByteArrayRowViewDesignerFactory::icon() const
0035 {
0036     return {};
0037 }
0038 
0039 QString ByteArrayRowViewDesignerFactory::includeFile() const
0040 {
0041     return QStringLiteral("okteta/bytearrayrowview.hpp");
0042 }
0043 
0044 QString ByteArrayRowViewDesignerFactory::toolTip() const
0045 {
0046     return QStringLiteral("Row oriented Viewer/Editor for Byte Arrays");
0047 }
0048 
0049 QString ByteArrayRowViewDesignerFactory::whatsThis() const
0050 {
0051     return QStringLiteral("A widget to show and edit byte arrays provided by subclasses of Okteta::AbstractByteArrayModel");
0052 }
0053 
0054 bool ByteArrayRowViewDesignerFactory::isContainer() const
0055 {
0056     return false;
0057 }
0058 
0059 QString ByteArrayRowViewDesignerFactory::name() const
0060 {
0061     return QStringLiteral("Okteta::ByteArrayRowView");
0062 }