mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-13 20:48:42 +01:00
1a019b5836
Telemetry and HiTL now run in the same global high priority thread. Threads are managed by a new class ThreadManager in icore as suggested by PeterG git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1193 ebee16cc-31ac-478f-84a7-5cbb03baadba
95 lines
3.2 KiB
C++
95 lines
3.2 KiB
C++
/**
|
|
******************************************************************************
|
|
*
|
|
* @file coreimpl.h
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
* Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
|
|
* @addtogroup GCSPlugins GCS Plugins
|
|
* @{
|
|
* @addtogroup CorePlugin Core Plugin
|
|
* @{
|
|
* @brief The Core GCS plugin
|
|
*****************************************************************************/
|
|
/*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
* for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
#ifndef COREIMPL_H
|
|
#define COREIMPL_H
|
|
|
|
#include "icore.h"
|
|
#include "mainwindow.h"
|
|
|
|
namespace Core {
|
|
namespace Internal {
|
|
|
|
class CoreImpl : public ICore
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
CoreImpl(MainWindow *mainwindow);
|
|
~CoreImpl() {}
|
|
|
|
bool showOptionsDialog(const QString &group = QString(),
|
|
const QString &page = QString(),
|
|
QWidget *parent = 0);
|
|
bool showWarningWithOptions(const QString &title, const QString &text,
|
|
const QString &details = QString(),
|
|
const QString &settingsCategory = QString(),
|
|
const QString &settingsId = QString(),
|
|
QWidget *parent = 0);
|
|
|
|
ActionManager *actionManager() const;
|
|
UniqueIDManager *uniqueIDManager() const;
|
|
MessageManager *messageManager() const;
|
|
ConnectionManager *connectionManager() const;
|
|
UAVGadgetInstanceManager *uavGadgetInstanceManager() const;
|
|
VariableManager *variableManager() const;
|
|
ThreadManager *threadManager() const;
|
|
ModeManager *modeManager() const;
|
|
MimeDatabase *mimeDatabase() const;
|
|
|
|
QSettings *settings() const;
|
|
SettingsDatabase *settingsDatabase() const;
|
|
|
|
QString resourcePath() const;
|
|
|
|
IContext *currentContextObject() const;
|
|
|
|
QMainWindow *mainWindow() const;
|
|
|
|
// adds and removes additional active contexts, this context is appended to the
|
|
// currently active contexts. call updateContext after changing
|
|
void addAdditionalContext(int context);
|
|
void removeAdditionalContext(int context);
|
|
bool hasContext(int context) const;
|
|
void addContextObject(IContext *contex);
|
|
void removeContextObject(IContext *contex);
|
|
|
|
void updateContext();
|
|
|
|
void openFiles(const QStringList &fileNames);
|
|
|
|
private:
|
|
MainWindow *m_mainwindow;
|
|
friend class MainWindow;
|
|
};
|
|
|
|
} // namespace Internal
|
|
} // namespace Core
|
|
|
|
#endif // COREIMPL_H
|