The main application and management class. More...
#include <QGCApplication.h>
Public Slots | |
| void | qmlAttemptWindowClose () |
| QLocale | getCurrentLanguage () const |
| Get current language. | |
| void | showCriticalVehicleMessage (const QString &message) |
| Show non-modal vehicle message to the user. | |
| void | showAppMessage (const QString &message, const QString &title=QString()) |
| Show modal application message to the user. | |
| void | showRebootAppMessage (const QString &message, const QString &title=QString()) |
| QGCImageProvider * | qgcImageProvider () |
Signals | |
| void | languageChanged (const QLocale &locale) |
Public Member Functions | |
| QGCApplication (int &argc, char *argv[], const QGCCommandLineParser::CommandLineParseResult &args) | |
| ~QGCApplication () | |
| bool | runningUnitTests () const |
| bool | simpleBootTest () const |
| bool | bootTestPassed () const |
| bool | logOutput () const |
| Returns true if Qt debug output should be logged to a file. | |
| void | reportMissingParameter (int componentId, const QString &name) |
| bool | fakeMobile () const |
| void | setLanguage () |
| QQuickWindow * | mainRootWindow () |
| uint64_t | msecsSinceBoot () const |
| void | addCompressedSignal (const QMetaMethod &method) |
| Registers the signal such that only the last duplicate signal added is left in the queue. | |
| void | removeCompressedSignal (const QMetaMethod &method) |
| bool | event (QEvent *e) final |
| void | init () |
| Perform initialize which is common to both normal application running and unit tests. | |
| void | shutdown () |
| QQmlApplicationEngine * | qmlAppEngine () const |
| Although public, these methods are internal and should only be called by UnitTest code. | |
| void | setQmlAppEngine (QQmlApplicationEngine *engine) |
| void | resetRebootMessageDebounce () |
Static Public Member Functions | |
| static QString | cachedParameterMetaDataFile () |
| static QString | cachedAirframeMetaDataFile () |
Friends | |
| class | UnitTest |
| Unit Test have access to creating and destroying singletons. | |
The main application and management class.
Definition at line 39 of file QGCApplication.h.
| QGCApplication::QGCApplication | ( | int & | argc, |
| char * | argv[], | ||
| const QGCCommandLineParser::CommandLineParseResult & | args ) |
Definition at line 67 of file QGCApplication.cc.
References cachedAirframeMetaDataFile(), cachedParameterMetaDataFile(), QGCCommandLineParser::CommandLineParseResult::clearCache, AppSettings::clearSettingsNextBootKey, QGCCommandLineParser::CommandLineParseResult::clearSettingsOptions, fakeMobile(), QGCLoggingCategoryManager::init(), QGCNetworkHelper::initializeProxySupport(), QGCLoggingCategoryManager::installFilter(), QGCLoggingCategoryManager::instance(), QGCCommandLineParser::CommandLineParseResult::loggingOptions, logOutput(), ParameterManager::parameterCacheDir(), runningUnitTests(), QGCLoggingCategoryManager::setCategoryEnabled(), setLanguage(), simpleBootTest(), QGCCommandLineParser::CommandLineParseResult::unitTests, and QGCCommandLineParser::CommandLineParseResult::unitTestShardIndex.
| QGCApplication::~QGCApplication | ( | ) |
Definition at line 244 of file QGCApplication.cc.
| void QGCApplication::addCompressedSignal | ( | const QMetaMethod & | method | ) |
Registers the signal such that only the last duplicate signal added is left in the queue.
Definition at line 589 of file QGCApplication.cc.
|
inline |
Definition at line 51 of file QGCApplication.h.
Referenced by main().
|
static |
Definition at line 535 of file QGCApplication.cc.
Referenced by QGCApplication().
|
static |
Definition at line 528 of file QGCApplication.cc.
Referenced by QGCApplication().
|
final |
Definition at line 648 of file QGCApplication.cc.
|
inline |
Definition at line 61 of file QGCApplication.h.
Referenced by QGCApplication().
|
inlineslot |
Get current language.
Definition at line 103 of file QGCApplication.h.
| void QGCApplication::init | ( | ) |
Perform initialize which is common to both normal application running and unit tests.
Definition at line 246 of file QGCApplication.cc.
References LogManager::init(), SettingsManager::init(), LogManager::instance(), SettingsManager::instance(), VideoBackend::instance(), SettingsManager::mavlinkSettings(), AndroidSerial::selfTest(), and VideoBackend::selfTest().
Referenced by main().
|
signal |
Referenced by QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(), and setLanguage().
|
inline |
Returns true if Qt debug output should be logged to a file.
Definition at line 54 of file QGCApplication.h.
Referenced by QGCApplication().
| QQuickWindow * QGCApplication::mainRootWindow | ( | ) |
Definition at line 512 of file QGCApplication.cc.
|
inline |
Definition at line 65 of file QGCApplication.h.
|
slot |
Definition at line 675 of file QGCApplication.cc.
|
inline |
Although public, these methods are internal and should only be called by UnitTest code.
Definition at line 83 of file QGCApplication.h.
|
slot |
Definition at line 521 of file QGCApplication.cc.
| void QGCApplication::removeCompressedSignal | ( | const QMetaMethod & | method | ) |
Definition at line 594 of file QGCApplication.cc.
| void QGCApplication::reportMissingParameter | ( | int | componentId, |
| const QString & | name ) |
Used to report a missing Parameter. Warning will be displayed to user. Method may be called multiple times.
Definition at line 389 of file QGCApplication.cc.
|
inline |
showRebootAppMessage() debounces repeat messages (2 min). Tests reset the debounce per-test so each one deterministically sees its own message.
Definition at line 94 of file QGCApplication.h.
|
inline |
Definition at line 49 of file QGCApplication.h.
Referenced by QGCApplication(), showAppMessage(), and showCriticalVehicleMessage().
| void QGCApplication::setLanguage | ( | ) |
Definition at line 192 of file QGCApplication.cc.
References languageChanged(), and JsonParsing::translator().
Referenced by QGCApplication().
|
inline |
UI test harnesses create their own QML engine; registering it here lets app-level messaging (showAppMessage) reach the test's MainWindow. Pass nullptr on teardown.
Definition at line 86 of file QGCApplication.h.
|
slot |
Show modal application message to the user.
Definition at line 452 of file QGCApplication.cc.
References runningUnitTests().
Referenced by showRebootAppMessage().
|
slot |
Show non-modal vehicle message to the user.
Definition at line 430 of file QGCApplication.cc.
References runningUnitTests().
|
slot |
Show modal application message to the user about the need for a reboot. Multiple messages will be supressed if they occur one after the other.
Definition at line 491 of file QGCApplication.cc.
References showAppMessage().
| void QGCApplication::shutdown | ( | ) |
Definition at line 680 of file QGCApplication.cc.
References QGCCorePlugin::cleanup(), VideoManager::cleanup(), QGCMapEngine::closeInstance(), QGCCorePlugin::destroyQmlApplicationEngine(), GPSManager::instance(), QGCCorePlugin::instance(), SettingsManager::instance(), VideoManager::instance(), and GPSManager::shutdown().
Referenced by main().
|
inline |
Definition at line 50 of file QGCApplication.h.
Referenced by QGCApplication().
|
friend |
Unit Test have access to creating and destroying singletons.
Definition at line 44 of file QGCApplication.h.
References UnitTest.
Referenced by UnitTest.