2010-04-19 23:02:15 +02:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
*
|
2010-08-20 23:18:20 +02:00
|
|
|
* @file configgadgetwidget.cpp
|
2010-08-18 11:38:25 +02:00
|
|
|
* @author E. Lafargue & The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
2010-07-16 12:33:27 +02:00
|
|
|
* @addtogroup GCSPlugins GCS Plugins
|
2010-04-19 23:02:15 +02:00
|
|
|
* @{
|
2010-07-16 12:33:27 +02:00
|
|
|
* @addtogroup ConfigPlugin Config Plugin
|
|
|
|
* @{
|
|
|
|
* @brief The Configuration Gadget used to update settings in the firmware
|
2010-04-19 23:02:15 +02:00
|
|
|
*****************************************************************************/
|
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
#include "configgadgetwidget.h"
|
|
|
|
|
2010-08-10 15:04:14 +02:00
|
|
|
#include "fancytabwidget.h"
|
2010-08-20 23:18:20 +02:00
|
|
|
#include "configservowidget.h"
|
|
|
|
#include "configairframewidget.h"
|
|
|
|
#include "configtelemetrywidget.h"
|
2010-08-24 01:18:26 +02:00
|
|
|
#include "configahrswidget.h"
|
2010-08-10 00:19:24 +02:00
|
|
|
|
2010-08-08 00:32:57 +02:00
|
|
|
#include <QDebug>
|
2010-04-19 23:02:15 +02:00
|
|
|
#include <QStringList>
|
|
|
|
#include <QtGui/QWidget>
|
|
|
|
#include <QtGui/QTextEdit>
|
|
|
|
#include <QtGui/QVBoxLayout>
|
|
|
|
#include <QtGui/QPushButton>
|
|
|
|
|
2010-08-10 00:19:24 +02:00
|
|
|
|
|
|
|
|
2010-04-19 23:02:15 +02:00
|
|
|
ConfigGadgetWidget::ConfigGadgetWidget(QWidget *parent) : QWidget(parent)
|
|
|
|
{
|
|
|
|
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
2010-08-10 00:19:24 +02:00
|
|
|
FancyTabWidget *ftw = new FancyTabWidget(this, true);
|
2010-08-18 11:38:25 +02:00
|
|
|
ftw->setIconSize(64);
|
2010-08-10 00:19:24 +02:00
|
|
|
QVBoxLayout *layout = new QVBoxLayout;
|
|
|
|
layout->addWidget(ftw);
|
|
|
|
setLayout(layout);
|
2010-08-20 23:18:20 +02:00
|
|
|
QWidget *qwd = new ConfigServoWidget();
|
2010-08-18 14:49:41 +02:00
|
|
|
ftw->insertTab(0, qwd,QIcon(":/configgadget/images/Servo.png"),QString("RC Input/Output"));
|
2010-08-20 23:18:20 +02:00
|
|
|
qwd = new ConfigAirframeWidget();
|
2010-08-18 11:38:25 +02:00
|
|
|
ftw->insertTab(1, qwd, QIcon(":/configgadget/images/Airframe.png"), QString("Aircraft"));
|
2010-08-20 23:18:20 +02:00
|
|
|
qwd = new ConfigTelemetryWidget();
|
2010-08-18 11:38:25 +02:00
|
|
|
ftw->insertTab(2,qwd,QIcon(":/configgadget/images/XBee.svg"), QString("Telemetry"));
|
2010-08-24 01:18:26 +02:00
|
|
|
qwd = new ConfigAHRSWidget();
|
|
|
|
ftw->insertTab(3,qwd,QIcon(":/core/images/plugin.png"),QString("AHRS"));
|
2010-07-29 18:42:29 +02:00
|
|
|
|
2010-06-14 22:14:09 +02:00
|
|
|
|
2010-04-19 23:02:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ConfigGadgetWidget::~ConfigGadgetWidget()
|
|
|
|
{
|
|
|
|
// Do nothing
|
|
|
|
}
|
|
|
|
|
|
|
|
void ConfigGadgetWidget::resizeEvent(QResizeEvent *event)
|
|
|
|
{
|
|
|
|
|
|
|
|
QWidget::resizeEvent(event);
|
|
|
|
}
|
2010-07-29 18:42:29 +02:00
|
|
|
|
|
|
|
|