Skip to content
Snippets Groups Projects
FactSystem.cc 1.07 KiB
Newer Older
  • Learn to ignore specific revisions
  • /****************************************************************************
     *
     *   (c) 2009-2016 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)
        : QGCTool(app)
    
    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
    }