dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
histogramscopeconfig.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 HISTOGRAMSCOPECONFIG_H
28 #define HISTOGRAMSCOPECONFIG_H
29 
31 
36 {
37  Q_OBJECT
38 public:
40  HistogramScopeConfig(QSettings *qSettings);
41  HistogramScopeConfig(Ui::ScopeGadgetOptionsPage *options_page);
43 
44  virtual void saveConfiguration(QSettings *qSettings);
45  void create(QSettings qSettings);
46 
47  QList<Plot2dCurveConfiguration *> getHistogramDataSource() { return m_HistogramSourceConfigs; }
49  {
50  m_HistogramSourceConfigs.append(value);
51  }
53 
54  // Getter functions
55  virtual int getScopeType() { return (int)HISTOGRAM; }
56  double getBinWidth() { return binWidth; }
57  unsigned int getMaxNumberOfBins() { return maxNumberOfBins; }
59  {
60  return m_HistogramSourceConfigs;
61  }
62 
63  // Setter functions
64  void setBinWidth(double val) { binWidth = val; }
65  void setMaxNumberOfBins(unsigned int val) { maxNumberOfBins = val; }
66 
67  virtual ScopeConfig *cloneScope(ScopeConfig *histogramSourceConfigs);
68 
69  virtual void setGuiConfiguration(Ui::ScopeGadgetOptionsPage *options_page);
70 
71  virtual void loadConfiguration(ScopeGadgetWidget *scopeGadgetWidget);
72  virtual void preparePlot(ScopeGadgetWidget *);
74 
75 private:
76  double binWidth;
77  unsigned int maxNumberOfBins;
78  QString units;
79 
80  QList<Plot2dCurveConfiguration *> m_HistogramSourceConfigs;
81 
82 private slots:
83 };
84 
85 #endif // HISTOGRAMSCOPECONFIG_H
void addHistogramDataSource(Plot2dCurveConfiguration *value)
void setBinWidth(double val)
virtual void loadConfiguration(ScopeGadgetWidget *scopeGadgetWidget)
HistogramScopeConfig::loadConfiguration loads the plot configuration into the scope gadget widget...
HistogramScopeConfig()
HistogramScopeConfig::HistogramScopeConfig Default constructor.
QList< Plot2dCurveConfiguration * > getHistogramDataSource()
void create(QSettings qSettings)
virtual void saveConfiguration(QSettings *qSettings)
HistogramScopeConfig::saveConfiguration Saves configuration to XML file.
virtual QList< Plot2dCurveConfiguration * > getDataSourceConfigs()
virtual ScopeConfig * cloneScope(ScopeConfig *histogramSourceConfigs)
HistogramScopeConfig::cloneScope Clones scope from existing GUI configuration.
unsigned int getMaxNumberOfBins()
virtual void preparePlot(ScopeGadgetWidget *)
HistogramScopeConfig::preparePlot Prepares the Qwt plot colors and axes.
The ScopeConfig class The parent class for scope configuration classes data sources.
Definition: scopesconfig.h:56
The HistogramScopeConfig class The histogram scope configuration.
void setMaxNumberOfBins(unsigned int val)
virtual void setGuiConfiguration(Ui::ScopeGadgetOptionsPage *options_page)
HistogramScopeConfig::setGuiConfiguration Set the GUI elements based on values from the XML settings ...
The Scopes2dConfig class The parent class for 3D scope configurations.
void replaceHistogramDataSource(QList< Plot2dCurveConfiguration * > histogramSourceConfigs)
HistogramScopeConfig::replaceHistogramSource Replaces the list of histogram data sources.
void configureAxes(ScopeGadgetWidget *)
HistogramScopeConfig::configureAxes Configure the axes.