QGCOptions.cc 1.21 KB
Newer Older
Gus Grubba's avatar
Gus Grubba committed
1 2
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
3
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
Gus Grubba's avatar
Gus Grubba committed
4 5 6 7 8 9
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

10
#include "QGCOptions.h"
11

12
#include <QtQml>
Gus Grubba's avatar
Gus Grubba committed
13

14 15
/// @file
///     @brief Core Plugin Interface for QGroundControl - Application Options
Gus Grubba's avatar
Gus Grubba committed
16
///     @author Gus Grubba <gus@auterion.com>
Gus Grubba's avatar
Gus Grubba committed
17

18 19
QGCOptions::QGCOptions(QObject* parent)
    : QObject(parent)
Gus Grubba's avatar
Gus Grubba committed
20
{
21
    QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
22 23
}

24
QColor QGCOptions::toolbarBackgroundLight() const
25 26 27 28
{
    return QColor(255,255,255,204);
}

29
QColor QGCOptions::toolbarBackgroundDark() const
30 31
{
    return QColor(0,0,0,192);
32 33
}

34
QGCFlyViewOptions* QGCOptions::flyViewOptions(void)
35
{
36 37 38 39
    if (!_defaultFlyViewOptions) {
        _defaultFlyViewOptions = new QGCFlyViewOptions(this);
    }
    return _defaultFlyViewOptions;
40 41
}

42 43 44 45 46 47
QGCFlyViewOptions::QGCFlyViewOptions(QGCOptions* options, QObject* parent)
    : QObject   (parent)
    , _options  (options)
{
    QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
}