dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
spectrogramscopeconfig.h
Go to the documentation of this file.
1 
12 /*
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.
17  *
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.
22  *
23  * You should have received a copy of the GNU General Public License along
24  * with this program; if not, see <http://www.gnu.org/licenses/>
25  */
26 
27 #ifndef SPECTROGRAMSCOPECONFIG_H
28 #define SPECTROGRAMSCOPECONFIG_H
29 
31 
36 {
37  Q_OBJECT
38 public:
43 
45  SpectrogramScopeConfig(QSettings *qSettings);
46  SpectrogramScopeConfig(Ui::ScopeGadgetOptionsPage *options_page);
48 
49  virtual void saveConfiguration(QSettings *qSettings);
50  void create(QSettings qSettings);
51 
53  {
54  return m_spectrogramSourceConfigs;
55  }
57  {
58  m_spectrogramSourceConfigs.append(value);
59  }
61 
62  // Getter functions
63  double getSamplingFrequency() { return samplingFrequency; }
64  double getZMaximum() { return zMaximum; }
65  unsigned int getWindowWidth() { return windowWidth; }
66  double getTimeHorizon() { return timeHorizon; }
68  {
69  return m_spectrogramSourceConfigs;
70  }
71  virtual int getScopeType() { return SPECTROGRAM; }
72 
73  // Setter functions
74  void setSamplingFrequency(double val) { samplingFrequency = val; }
75  void setZMaximum(double val) { zMaximum = val; }
76  void setWindowWidth(unsigned int val) { windowWidth = val; }
77  void setTimeHorizon(double val) { timeHorizon = val; }
78  virtual void setGuiConfiguration(Ui::ScopeGadgetOptionsPage *options_page);
80 
81  virtual void loadConfiguration(ScopeGadgetWidget *scopeGadgetWidget);
82  virtual void preparePlot(ScopeGadgetWidget *);
84 
85  ColorMap::ColorMapType getColorMap() { return colorMapType; }
86 
87 private slots:
88 
89 private:
90  SpectrogramType spectrogramType;
91 
92  double timeHorizon;
93  QString units;
94 
95  QList<Plot3dCurveConfiguration *> m_spectrogramSourceConfigs;
96 
97  double samplingFrequency;
98  unsigned int windowWidth;
99  QString yAxisUnits;
100  double zMaximum;
101 
102  ColorMap::ColorMapType colorMapType;
103 };
104 
105 #endif // SPECTROGRAMSCOPECONFIG_H
virtual void preparePlot(ScopeGadgetWidget *)
SpectrogramScopeConfig::preparePlot Prepares the Qwt plot colors and axes.
virtual void setGuiConfiguration(Ui::ScopeGadgetOptionsPage *options_page)
SpectrogramScopeConfig::setGuiConfiguration Set the GUI elements based on values from the XML setting...
virtual void saveConfiguration(QSettings *qSettings)
SpectrogramScopeConfig::saveConfiguration Saves configuration to XML file.
virtual QList< Plot3dCurveConfiguration * > getDataSourceConfigs()
The SpectrogramScopeConfig class The spectrogram scope configuration.
void replaceSpectrogramDataSource(QList< Plot3dCurveConfiguration * > spectrogramSourceConfigs)
SpectrogramScopeConfig::replaceSpectrogramDataSource Replaces the list of spectrogram data sources...
SpectrogramScopeConfig()
SpectrogramScopeConfig::SpectrogramScopeConfig Default constructor.
virtual ScopeConfig * cloneScope(ScopeConfig *)
SpectrogramScopeConfig::cloneScope Clones scope from existing GUI configuration.
ColorMapType
The ColorMapType enum Defines the different type of color maps.
Definition: plotdata.h:124
SpectrogramType
The SpectrogramType enum Defines the different type of spectrogram plots.
QList< Plot3dCurveConfiguration * > getSpectrogramDataSource()
virtual void loadConfiguration(ScopeGadgetWidget *scopeGadgetWidget)
SpectrogramScopeConfig::loadConfiguration loads the plot configuration into the scope gadget widget...
void addSpectrogramDataSource(Plot3dCurveConfiguration *value)
void setWindowWidth(unsigned int val)
void setSamplingFrequency(double val)
The ScopeConfig class The parent class for scope configuration classes data sources.
Definition: scopesconfig.h:56
void configureAxes(ScopeGadgetWidget *)
SpectrogramScopeConfig::configureAxes Configure the axes.
ColorMap::ColorMapType getColorMap()
The Scopes3dConfig class The parent class for 3D scope configurations.
void create(QSettings qSettings)