File indexing completed on 2024-06-16 05:24:52

0001 /*
0002     This file is part of the Okteta Kasten module, 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 "bytearrayfilterparameterseteditfactory.hpp"
0010 
0011 // lib
0012 #include "filter/nobytearrayfilterparametersetedit.hpp"
0013 #include "filter/operandbytearrayfilterparametersetedit.hpp"
0014 #include "filter/reversebytearrayfilterparametersetedit.hpp"
0015 #include "filter/rotatebytearrayfilterparametersetedit.hpp"
0016 //// NEWFILTERPARAMETERSET(start)
0017 //// Here add the name of your header file of your edit widget for the parameterset,
0018 //// e.g.
0019 //// #include "filter/my_bytearrayfilterparametersetedit.hpp"
0020 //// NEWFILTERPARAMETERSET(end)
0021 
0022 AbstractByteArrayFilterParameterSetEdit* ByteArrayFilterParameterSetEditFactory::createEdit(const char* id)
0023 {
0024     AbstractByteArrayFilterParameterSetEdit* result;
0025 
0026     if (qstrcmp(id, OperandByteArrayFilterParameterSetEdit::Id) == 0) {
0027         result = new OperandByteArrayFilterParameterSetEdit();
0028     } else if (qstrcmp(id, ReverseByteArrayFilterParameterSetEdit::Id) == 0) {
0029         result = new ReverseByteArrayFilterParameterSetEdit();
0030     } else if (qstrcmp(id, RotateByteArrayFilterParameterSetEdit::Id) == 0) {
0031         result = new RotateByteArrayFilterParameterSetEdit();
0032     }
0033 //// NEWFILTERPARAMETERSET(start)
0034 //// Here add the check for the id of your parameter set
0035 //// and if it matches the creation of the widget
0036 //// e.g.
0037 ////     else if (qstrcmp(id, My_ByteArrayFilterParameterSetEdit::Id) == 0)
0038 ////         result = new My_ByteArrayFilterParameterSetEdit();
0039 //// NEWFILTERPARAMETERSET(end)
0040     else { // if (qstrcmp(id, NoByteArrayFilterParameterSetEdit::Id) == 0) TODO: default should be a message "Not found"
0041         result = new NoByteArrayFilterParameterSetEdit();
0042     }
0043 
0044     return result;
0045 }