2011-03-28 21:15:44 +00:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
*
|
|
|
|
* @file configgadgetwidget.h
|
|
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
|
|
* @addtogroup GCSPlugins GCS Plugins
|
|
|
|
* @{
|
|
|
|
* @addtogroup ConfigPlugin Config Plugin
|
|
|
|
* @{
|
|
|
|
* @brief The Configuration Gadget used to update settings in the firmware
|
|
|
|
*****************************************************************************/
|
|
|
|
/*
|
|
|
|
* 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 CONFIGGADGETWIDGET_H
|
|
|
|
#define CONFIGGADGETWIDGET_H
|
|
|
|
|
|
|
|
#include "uavtalk/telemetrymanager.h"
|
|
|
|
#include "extensionsystem/pluginmanager.h"
|
|
|
|
#include "uavobjectmanager.h"
|
|
|
|
#include "uavobject.h"
|
|
|
|
#include "objectpersistence.h"
|
|
|
|
#include <QtGui/QWidget>
|
|
|
|
#include <QList>
|
2011-05-16 21:54:23 -07:00
|
|
|
//#include <QtWebKit/QWebView>
|
|
|
|
#include <QTextBrowser>
|
|
|
|
#include "utils/pathutils.h"
|
2011-08-02 17:06:17 +01:00
|
|
|
#include <QMessageBox>
|
2011-08-03 10:03:49 +02:00
|
|
|
//#include "fancytabwidget.h"
|
|
|
|
#include "utils/mytabbedstackwidget.h"
|
2012-02-05 18:16:38 +00:00
|
|
|
#include "../uavobjectwidgetutils/configtaskwidget.h"
|
2011-03-28 21:15:44 +00:00
|
|
|
|
|
|
|
class ConfigGadgetWidget: public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2011-05-16 21:54:23 -07:00
|
|
|
QTextBrowser* help;
|
2011-03-28 21:15:44 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
ConfigGadgetWidget(QWidget *parent = 0);
|
|
|
|
~ConfigGadgetWidget();
|
2012-05-05 09:40:44 -07:00
|
|
|
enum widgetTabs {hardware=0, aircraft, input, output, sensors, stabilization, camerastabilization, txpid, pipxtreme};
|
2011-03-28 21:15:44 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void onAutopilotConnect();
|
2011-06-07 16:56:16 +02:00
|
|
|
void onAutopilotDisconnect();
|
2011-08-15 14:12:54 +01:00
|
|
|
void tabAboutToChange(int i,bool *);
|
2012-06-05 19:34:42 -07:00
|
|
|
void updatePipXStatus(UAVObject *object);
|
|
|
|
void onPipxtremeDisconnect();
|
2011-03-28 21:15:44 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void autopilotConnected();
|
2011-06-07 16:56:16 +02:00
|
|
|
void autopilotDisconnected();
|
2012-06-05 19:34:42 -07:00
|
|
|
void pipxtremeConnect();
|
|
|
|
void pipxtremeDisconnect();
|
2011-03-28 21:15:44 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void resizeEvent(QResizeEvent * event);
|
2011-08-03 10:03:49 +02:00
|
|
|
MyTabbedStackWidget *ftw;
|
2012-06-05 19:34:42 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
UAVDataObject* pipxStatusObj;
|
|
|
|
|
|
|
|
// A timer that timesout the connction to the PipX.
|
|
|
|
QTimer *pipxTimeout;
|
|
|
|
bool pipxConnected;
|
2011-03-28 21:15:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CONFIGGADGETWIDGET_H
|