2 ******************************************************************************
4 * @file scopegadgetoptionspage.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
6 * @addtogroup GCSPlugins GCS Plugins
8 * @addtogroup ScopePlugin Scope Gadget Plugin
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
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"
37 #include <QStringList>
39 #include <QColorDialog>
42 class IUAVGadgetConfiguration
;
45 class ScopeGadgetConfiguration
;
48 class ScopeGadgetOptionsPage
;
53 class ScopeGadgetOptionsPage
: public IOptionsPage
{
56 explicit ScopeGadgetOptionsPage(ScopeGadgetConfiguration
*config
, QObject
*parent
= 0);
58 QWidget
*createPage(QWidget
*parent
);
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
);
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