scidavis  2.3.0
About: SciDAVis is a free application for Scientific Data Analysis and Visualization (a fork off of QtiPlot).
  Fossies Dox: scidavis-2.3.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Month2DoubleFilter.h
Go to the documentation of this file.
1 
12 
30 #ifndef MONTH2DOUBLE_FILTER_H
31 #define MONTH2DOUBLE_FILTER_H
32 
33 #include "../AbstractSimpleFilter.h"
34 #include <QDateTime>
35 #include "lib/XmlStreamReader.h"
36 #include <QXmlStreamWriter>
37 
44 {
45  Q_OBJECT
46 
47  public:
48  virtual double valueAt(int row) const {
49  if (!d_inputs.value(0)) return 0;
50  return double(d_inputs.value(0)->dateAt(row).month());
51  }
52 
55 
56  protected:
58  virtual bool inputAcceptable(int, const AbstractColumn *source) {
59  return source->dataType() == SciDAVis::TypeQDateTime;
60  }
61 };
62 
63 #endif // ifndef MONTH2DOUBLE_FILTER_H
64 
Month2DoubleFilter::dataType
virtual SciDAVis::ColumnDataType dataType() const
Return the data type of the column.
Definition: Month2DoubleFilter.h:54
SciDAVis::ColumnDataType
ColumnDataType
Column data type.
Definition: globals.h:77
Month2DoubleFilter
Conversion filter QDateTime -> double, translating dates into months (January -> 1).
Definition: Month2DoubleFilter.h:44
AbstractColumn::dataType
virtual SciDAVis::ColumnDataType dataType() const =0
Return the data type of the column.
Month2DoubleFilter::inputAcceptable
virtual bool inputAcceptable(int, const AbstractColumn *source)
Using typed ports: only date-time inputs are accepted.
Definition: Month2DoubleFilter.h:58
XmlStreamReader.h
SciDAVis::TypeDouble
@ TypeDouble
Definition: globals.h:78
AbstractSimpleFilter
Simplified filter interface for filters with only one output port.
Definition: AbstractSimpleFilter.h:129
SciDAVis::TypeQDateTime
@ TypeQDateTime
Definition: globals.h:80
Month2DoubleFilter::valueAt
virtual double valueAt(int row) const
Return the double value in row 'row'.
Definition: Month2DoubleFilter.h:48
AbstractFilter::d_inputs
QVector< const AbstractColumn * > d_inputs
The data sources connected to my input ports.
Definition: AbstractFilter.h:275
AbstractColumn
Interface definition for data with column logic.
Definition: AbstractColumn.h:82