File indexing completed on 2022-09-27 12:21:22

0001 /*************************************************************************************
0002  *  Copyright (C) 2012 by Aleix Pol <aleixpol@kde.org>                               *
0003  *                                                                                   *
0004  *  This program is free software; you can redistribute it and/or                    *
0005  *  modify it under the terms of the GNU General Public License                      *
0006  *  as published by the Free Software Foundation; either version 2                   *
0007  *  of the License, or (at your option) any later version.                           *
0008  *                                                                                   *
0009  *  This program is distributed in the hope that it will be useful,                  *
0010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of                   *
0011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                    *
0012  *  GNU General Public License for more details.                                     *
0013  *                                                                                   *
0014  *  You should have received a copy of the GNU General Public License                *
0015  *  along with this program; if not, write to the Free Software                      *
0016  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA   *
0017  *************************************************************************************/
0018 
0019 #include "analitzadeclarativeplugin.h"
0020 #include "analitzawrapper.h"
0021 #include <analitzaplot/plotsmodel.h>
0022 #include <analitzagui/variablesmodel.h>
0023 #include <analitzagui/operatorsmodel.h>
0024 #include <analitza/variables.h>
0025 #include <graph2dmobile.h>
0026 #include <graph3ditem.h>
0027 #include <QQuickItem>
0028 
0029 void AnalitzaDeclarativePlugin::registerTypes(const char* uri)
0030 {
0031     qmlRegisterType<AnalitzaWrapper>(uri, 1, 0, "Analitza");
0032     qmlRegisterType<ExpressionWrapper>(uri, 1, 0, "Expression");
0033     qmlRegisterType<Graph2DMobile>(uri, 1, 0, "Graph2DView");
0034     qmlRegisterType<Graph3DItem>(uri, 1, 1, "Graph3DView");
0035     qmlRegisterType<Analitza::PlotsModel>(uri, 1, 0, "PlotsModel");
0036     qmlRegisterType<Analitza::VariablesModel>(uri, 1, 0, "VariablesModel");
0037     qmlRegisterType<OperatorsModel>(uri, 1, 0, "OperatorsModel");
0038 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
0039     qmlRegisterInterface<Analitza::Variables>(uri, 1);
0040 #else
0041     qRegisterMetaType<Analitza::Variables>();
0042 #endif
0043 }