OP-1900 have path_progress updated correctly for leg_remaining and error_below end...
[librepilot.git] / ground / openpilotgcs / src / plugins / scope / scopegadgetoptionspage.h
blob511c9a143aca5760bb24631e8859e71e2bf469bb
1 /**
2 ******************************************************************************
4 * @file scopegadgetoptionspage.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
6 * @addtogroup GCSPlugins GCS Plugins
7 * @{
8 * @addtogroup ScopePlugin Scope Gadget Plugin
9 * @{
10 * @brief The scope Gadget, graphically plots the states of UAVObjects
11 *****************************************************************************/
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * for more details.
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #ifndef SCOPEGADGETOPTIONSPAGE_H
29 #define SCOPEGADGETOPTIONSPAGE_H
31 #include "coreplugin/dialogs/ioptionspage.h"
33 #include "scopegadgetconfiguration.h"
34 #include "ui_scopegadgetoptionspage.h"
36 #include <QString>
37 #include <QStringList>
38 #include <QDebug>
39 #include <QColorDialog>
41 namespace Core {
42 class IUAVGadgetConfiguration;
45 class ScopeGadgetConfiguration;
47 namespace Ui {
48 class ScopeGadgetOptionsPage;
51 using namespace Core;
53 class ScopeGadgetOptionsPage : public IOptionsPage {
54 Q_OBJECT
55 public:
56 explicit ScopeGadgetOptionsPage(ScopeGadgetConfiguration *config, QObject *parent = 0);
58 QWidget *createPage(QWidget *parent);
59 void apply();
60 void finish();
62 private:
63 Ui::ScopeGadgetOptionsPage *options_page;
64 ScopeGadgetConfiguration *m_config;
66 void addPlotCurveConfig(QString uavObject, QString uavField, int scale, int mean, QString mathFunction, QVariant varColor, bool antialias);
67 void setCurvePlotProperties(QListWidgetItem *listWidgetItem, QString uavObject, QString uavField, int scale, int mean,
68 QString mathFunction, QVariant varColor, bool antialias);
69 void setYAxisWidgetFromPlotCurve();
70 void setButtonColor(const QColor &color);
71 void validateRefreshInterval();
72 bool eventFilter(QObject *obj, QEvent *evt);
74 private slots:
75 void on_spnRefreshInterval_valueChanged(int);
76 void on_lstCurves_currentRowChanged(int currentRow);
77 void on_btnRemoveCurve_clicked();
78 void on_btnAddCurve_clicked();
79 void on_cmbUAVObjects_currentIndexChanged(QString val);
80 void on_btnColor_clicked();
81 void on_mathFunctionComboBox_currentIndexChanged(int currentIndex);
82 void on_loggingEnable_clicked();
85 #endif // SCOPEGADGETOPTIONSPAGE_H