1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-14 21:23:52 +01:00
LibrePilot/ground/openpilotgcs/src/plugins/scope/scopegadgetoptionspage.h
Laura Sebesta 6003d2d574 Changed order of scope math functions to be more logical.
Added "Average" as  scope math function.
Changed averaging window size text edit box to be active only when math functions are selected.
Fixed bug introduced immediately prior by removing child redefinition of saveConfig.

Tried installing scroll wheel event filter for scope config plugin, but is not currently working.
2012-05-22 12:34:01 +03:00

89 lines
2.8 KiB
C++

/**
******************************************************************************
*
* @file scopegadgetoptionspage.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @addtogroup GCSPlugins GCS Plugins
* @{
* @addtogroup ScopePlugin Scope Gadget Plugin
* @{
* @brief The scope Gadget, graphically plots the states of UAVObjects
*****************************************************************************/
/*
* 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 SCOPEGADGETOPTIONSPAGE_H
#define SCOPEGADGETOPTIONSPAGE_H
#include "coreplugin/dialogs/ioptionspage.h"
#include "scopegadgetconfiguration.h"
#include "ui_scopegadgetoptionspage.h"
#include <QString>
#include <QStringList>
#include <QDebug>
#include <QtGui/QColorDialog>
namespace Core
{
class IUAVGadgetConfiguration;
}
class ScopeGadgetConfiguration;
namespace Ui
{
class ScopeGadgetOptionsPage;
}
using namespace Core;
class ScopeGadgetOptionsPage : public IOptionsPage
{
Q_OBJECT
public:
explicit ScopeGadgetOptionsPage(ScopeGadgetConfiguration *config, QObject *parent = 0);
QWidget *createPage(QWidget *parent);
void apply();
void finish();
private:
Ui::ScopeGadgetOptionsPage *options_page;
ScopeGadgetConfiguration *m_config;
void addPlotCurveConfig(QString uavObject, QString uavField, int scale, int mean, QString mathFunction, QVariant varColor);
void setCurvePlotProperties(QListWidgetItem *listWidgetItem, QString uavObject, QString uavField, int scale, int mean, QString mathFunction, QVariant varColor);
void setYAxisWidgetFromPlotCurve();
void setButtonColor(const QColor &color);
void validateRefreshInterval();
bool eventFilter( QObject * obj, QEvent * evt );
private slots:
void on_spnRefreshInterval_valueChanged(int );
void on_lstCurves_currentRowChanged(int currentRow);
void on_btnRemoveCurve_clicked();
void on_btnAddCurve_clicked();
void on_cmbUAVObjects_currentIndexChanged(QString val);
void on_btnColor_clicked();
void on_mathFunctionComboBox_currentIndexChanged(int currentIndex);
void on_loggingEnable_clicked();
};
#endif // SCOPEGADGETOPTIONSPAGE_H