Skip to content
FactSystem.cc 1.1 KiB
Newer Older
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

Don Gagne's avatar
Don Gagne committed

/// @file
///     @author Don Gagne <don@thegagnes.com>

#include "FactSystem.h"
Don Gagne's avatar
Don Gagne committed
#include "FactGroup.h"
#include "FactPanelController.h"
Don Gagne's avatar
Don Gagne committed

#include <QtQml>

Don Gagne's avatar
Don Gagne committed
const char* FactSystem::_factSystemQmlUri = "QGroundControl.FactSystem";
Don Gagne's avatar
Don Gagne committed

FactSystem::FactSystem(QGCApplication* app, QGCToolbox* toolbox)
    : QGCTool(app, toolbox)
Don Gagne's avatar
Don Gagne committed
{
Don Gagne's avatar
Don Gagne committed
}

void FactSystem::setToolbox(QGCToolbox *toolbox)
Don Gagne's avatar
Don Gagne committed
{
    QGCTool::setToolbox(toolbox);
Don Gagne's avatar
Don Gagne committed

Don Gagne's avatar
Don Gagne committed
    qmlRegisterType<Fact>               (_factSystemQmlUri, 1, 0, "Fact");
Don Gagne's avatar
Don Gagne committed
    qmlRegisterType<FactMetaData>       (_factSystemQmlUri, 1, 0, "FactMetaData");
    qmlRegisterType<FactPanelController>(_factSystemQmlUri, 1, 0, "FactPanelController");

    qmlRegisterUncreatableType<FactGroup>(_factSystemQmlUri, 1, 0, "FactGroup", "ReferenceOnly");
Don Gagne's avatar
Don Gagne committed
}