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)  

ColumnPrivate.h
Go to the documentation of this file.
1 
11 
30 #ifndef COLUMNPRIVATE_H
31 #define COLUMNPRIVATE_H
32 
33 #include <QObject>
34 #include "lib/IntervalAttribute.h"
35 #include "core/column/Column.h"
37 class QString;
38 
40 
44 {
45  public:
47  Private(Column * owner, SciDAVis::ColumnMode mode);
49  ~Private();
52  void * data, IntervalAttribute<bool> validity);
53 
57  bool isReadOnly() const { return false; };
59 
66 
72  void setColumnMode(SciDAVis::ColumnMode mode, AbstractFilter *conversion_filter);
73 
75 
81  bool copy(const AbstractColumn * other);
83 
92  bool copy(const AbstractColumn * source, int source_start, int dest_start, int num_rows);
94 
100  bool copy(const Private * other);
102 
111  bool copy(const Private * source, int source_start, int dest_start, int num_rows);
113 
118  int rowCount() const;
120 
128  void resizeTo(int new_size);
130  void insertRows(int before, int count);
132  void removeRows(int first, int count);
134  QString name() const;
136  QString comment() const;
142  void clear();
144  void * dataPointer() const { return d_data; }
150 
154  AbstractSimpleFilter *in_filter, AbstractSimpleFilter *out_filter, IntervalAttribute<bool> validity);
156  void replaceData(void * data, IntervalAttribute<bool> validity);
167 
169 
170  bool isInvalid(int row) const { return d_validity.isSet(row); }
173  bool isInvalid(Interval<int> i) const { return d_validity.isSet(i); }
175  QList< Interval<int> > invalidIntervals() const { return d_validity.intervals(); }
177  bool isMasked(int row) const { return d_masking.isSet(row); }
179  bool isMasked(Interval<int> i) const { return d_masking.isSet(i); }
181  QList< Interval<int> > maskedIntervals() const { return d_masking.intervals(); }
183  void clearValidity();
185  void clearMasks();
187 
191  void setInvalid(Interval<int> i, bool invalid = true);
193  void setInvalid(int row, bool invalid = true);
195 
199  void setMasked(Interval<int> i, bool mask = true);
201  void setMasked(int row, bool mask = true);
203 
205 
206  QString formula(int row) const { return d_formulas.value(row); }
209 
220  QList< Interval<int> > formulaIntervals() const { return d_formulas.intervals(); }
222  void setFormula(Interval<int> i, QString formula);
224  void setFormula(int row, QString formula);
226  void clearFormulas();
228 
230 
231 
235  QString textAt(int row) const;
237 
240  void setTextAt(int row, const QString& new_value);
242 
245  void replaceTexts(int first, const QStringList& new_values);
247 
250  QDate dateAt(int row) const;
252 
255  void setDateAt(int row, const QDate& new_value);
257 
260  QTime timeAt(int row) const;
262 
265  void setTimeAt(int row, const QTime& new_value);
267 
270  QDateTime dateTimeAt(int row) const;
272 
275  void setDateTimeAt(int row, const QDateTime& new_value);
277 
280  void replaceDateTimes(int first, const QList<QDateTime>& new_values);
282  double valueAt(int row) const;
284 
287  void setValueAt(int row, double new_value);
289 
292  void replaceValues(int first, const QVector<qreal>& new_values);
294 
295  private:
297 
298 
304 
310 
314  void * d_data;
327 
328 };
329 
330 #endif
Column::Private::insertRows
void insertRows(int before, int count)
Insert some empty (or initialized with zero) rows.
Definition: ColumnPrivate.cpp:686
Column::Private::outputFilter
AbstractSimpleFilter * outputFilter() const
Return the output filter (for data type -> string conversion)
Definition: ColumnPrivate.h:148
Column::Private::name
QString name() const
Return the column name/label.
Definition: ColumnPrivate.cpp:972
Column::Private::comment
QString comment() const
Return the column comment.
Definition: ColumnPrivate.cpp:977
Column::Private::setTimeAt
void setTimeAt(int row, const QTime &new_value)
Set the content of row 'row'.
Definition: ColumnPrivate.cpp:883
Column::Private::d_masking
IntervalAttribute< bool > d_masking
Definition: ColumnPrivate.h:320
Column::Private::clearMasks
void clearMasks()
Clear all masking information.
Definition: ColumnPrivate.cpp:768
Column::Private::isMasked
bool isMasked(int row) const
Return whether a certain row is masked
Definition: ColumnPrivate.h:177
Column::Private::replaceModeData
void replaceModeData(SciDAVis::ColumnMode mode, SciDAVis::ColumnDataType type, void *data, AbstractSimpleFilter *in_filter, AbstractSimpleFilter *out_filter, IntervalAttribute< bool > validity)
Replace all mode related members.
Definition: ColumnPrivate.cpp:411
Column::Private::setDateTimeAt
void setDateTimeAt(int row, const QDateTime &new_value)
Set the content of row 'row'.
Definition: ColumnPrivate.cpp:890
Column.h
data
Definition: exp_saturation.c:37
Column::Private::dataPointer
void * dataPointer() const
Return the data pointer.
Definition: ColumnPrivate.h:144
AbstractFilter
Base class for all analysis operations.
Definition: AbstractFilter.h:77
Column::Private::validityAttribute
IntervalAttribute< bool > validityAttribute()
Return the validity interval attribute.
Definition: ColumnPrivate.h:158
Column::Private::setTextAt
void setTextAt(int row, const QString &new_value)
Set the content of row 'row'.
Definition: ColumnPrivate.cpp:842
SciDAVis::ColumnDataType
ColumnDataType
Column data type.
Definition: globals.h:77
Column::Private::isMasked
bool isMasked(Interval< int > i) const
Return whether a certain interval of rows rows is fully masked
Definition: ColumnPrivate.h:179
Column
Aspect that manages a column.
Definition: Column.h:59
IntervalAttribute< bool >
A class representing an interval-based attribute (bool version)
Definition: IntervalAttribute.h:198
Column::Private::replaceTexts
void replaceTexts(int first, const QStringList &new_values)
Replace a range of values.
Definition: ColumnPrivate.cpp:859
Column::Private::dateTimeAt
QDateTime dateTimeAt(int row) const
Return the QDateTime in row 'row'.
Definition: ColumnPrivate.cpp:830
Column::Private::isReadOnly
bool isReadOnly() const
Return whether the object is read-only.
Definition: ColumnPrivate.h:57
Column::Private::plotDesignation
SciDAVis::PlotDesignation plotDesignation() const
Return the column plot designation.
Definition: ColumnPrivate.h:138
IntervalAttribute::value
T value(int row) const
Definition: IntervalAttribute.h:84
Column::Private::setMasked
void setMasked(Interval< int > i, bool mask=true)
Set an interval masked.
Definition: ColumnPrivate.cpp:787
Column::Private::dateAt
QDate dateAt(int row) const
Return the date part of row 'row'.
Definition: ColumnPrivate.cpp:820
Column::Private::clear
void clear()
Clear the whole column.
Definition: ColumnPrivate.cpp:756
Column::Private::setDateAt
void setDateAt(int row, const QDate &new_value)
Set the content of row 'row'.
Definition: ColumnPrivate.cpp:876
Column::Private::inputFilter
AbstractSimpleFilter * inputFilter() const
Return the input filter (for string -> data type conversion)
Definition: ColumnPrivate.h:146
Column::Private::valueAt
double valueAt(int row) const
Return the double value in row 'row'.
Definition: ColumnPrivate.cpp:836
Column::Private::~Private
~Private()
Dtor.
Definition: ColumnPrivate.cpp:181
Column::Private::isInvalid
bool isInvalid(int row) const
Return whether a certain row contains an invalid value
Definition: ColumnPrivate.h:171
SciDAVis::ColumnMode
ColumnMode
The column mode (defines output and input filter for table columns)
Definition: globals.h:66
Column::Private::isInvalid
bool isInvalid(Interval< int > i) const
Return whether a certain interval of rows contains only invalid values
Definition: ColumnPrivate.h:173
Column::Private::maskingAttribute
IntervalAttribute< bool > maskingAttribute()
Return the masking interval attribute.
Definition: ColumnPrivate.h:160
Column::Private::setColumnMode
void setColumnMode(SciDAVis::ColumnMode mode, AbstractFilter *conversion_filter)
Set the column mode.
Definition: ColumnPrivate.cpp:201
Column::Private::resizeTo
void resizeTo(int new_size)
Resize the vector to the specified number of rows.
Definition: ColumnPrivate.cpp:643
Column::Private::d_plot_designation
SciDAVis::PlotDesignation d_plot_designation
The plot designation.
Definition: ColumnPrivate.h:323
Column::Private::setValueAt
void setValueAt(int row, double new_value)
Set the content of row 'row'.
Definition: ColumnPrivate.cpp:925
IntervalAttribute.h
Column::Private::d_input_filter
AbstractSimpleFilter * d_input_filter
The input filter (for string -> data type conversion)
Definition: ColumnPrivate.h:316
Column::Private::d_validity
IntervalAttribute< bool > d_validity
Definition: ColumnPrivate.h:319
Column::Private::clearValidity
void clearValidity()
Clear all validity information.
Definition: ColumnPrivate.cpp:761
Column::Private::setInvalid
void setInvalid(Interval< int > i, bool invalid=true)
Set an interval invalid or valid.
Definition: ColumnPrivate.cpp:775
IntervalAttribute< QString >
Column::Private::d_column_mode
SciDAVis::ColumnMode d_column_mode
The column mode.
Definition: ColumnPrivate.h:308
Column::Private::dataType
SciDAVis::ColumnDataType dataType() const
Return the data type of the column.
Definition: ColumnPrivate.h:55
Column::Private::invalidIntervals
QList< Interval< int > > invalidIntervals() const
Return all intervals of invalid rows.
Definition: ColumnPrivate.h:175
Column::Private::replaceDateTimes
void replaceDateTimes(int first, const QList< QDateTime > &new_values)
Replace a range of values.
Definition: ColumnPrivate.cpp:907
Column::Private::Private
Private(Column *owner, SciDAVis::ColumnMode mode)
Ctor.
Definition: ColumnPrivate.cpp:54
Column::Private::d_data_type
SciDAVis::ColumnDataType d_data_type
Data type string.
Definition: ColumnPrivate.h:302
Column::Private::textAt
QString textAt(int row) const
Return the content of row 'row'.
Definition: ColumnPrivate.cpp:814
Column::Private::formulaAttribute
IntervalAttribute< QString > formulaAttribute()
Return the interval attribute representing the formula strings.
Definition: ColumnPrivate.h:164
Column::Private::timeAt
QTime timeAt(int row) const
Return the time part of row 'row'.
Definition: ColumnPrivate.cpp:825
Column::Private::d_formulas
IntervalAttribute< QString > d_formulas
Definition: ColumnPrivate.h:321
Column::Private
Private data class of Column.
Definition: ColumnPrivate.h:44
Column::Private::maskedIntervals
QList< Interval< int > > maskedIntervals() const
Return all intervals of masked rows.
Definition: ColumnPrivate.h:181
Column::Private::replaceMasking
void replaceMasking(IntervalAttribute< bool > masking)
Replace the list of intervals of masked rows.
Definition: ColumnPrivate.cpp:960
Column::Private::replaceFormulas
void replaceFormulas(IntervalAttribute< QString > formulas)
Replace the interval attribute for the formula strings.
Definition: ColumnPrivate.cpp:967
Column::Private::replaceValues
void replaceValues(int first, const QVector< qreal > &new_values)
Replace a range of values.
Definition: ColumnPrivate.cpp:942
SciDAVis::PlotDesignation
PlotDesignation
Types of plot designations.
Definition: globals.h:55
IntervalAttribute< bool >::intervals
QList< Interval< int > > intervals() const
Definition: IntervalAttribute.h:292
IntervalAttribute::intervals
QList< Interval< int > > intervals() const
Definition: IntervalAttribute.h:178
Column::Private::clearFormulas
void clearFormulas()
Clear all formulas.
Definition: ColumnPrivate.cpp:809
AbstractSimpleFilter
Simplified filter interface for filters with only one output port.
Definition: AbstractSimpleFilter.h:129
Column::Private::d_data
void * d_data
Pointer to the data vector.
Definition: ColumnPrivate.h:314
Column::Private::d_output_filter
AbstractSimpleFilter * d_output_filter
The output filter (for data type -> string conversion)
Definition: ColumnPrivate.h:318
Column::Private::setFormula
void setFormula(Interval< int > i, QString formula)
Set a formula string for an interval of rows.
Definition: ColumnPrivate.cpp:799
Column::Private::d_owner
Column * d_owner
The owner column.
Definition: ColumnPrivate.h:325
IntervalAttribute< bool >::isSet
bool isSet(int row) const
Definition: IntervalAttribute.h:229
Interval< int >
Column::Private::formulaIntervals
QList< Interval< int > > formulaIntervals() const
Return the intervals that have associated formulas.
Definition: ColumnPrivate.h:220
Column::Private::removeRows
void removeRows(int first, int count)
Remove 'count' rows starting from row 'first'.
Definition: ColumnPrivate.cpp:716
Column::Private::formula
QString formula(int row) const
Return the formula associated with row 'row'
Definition: ColumnPrivate.h:207
Column::Private::copy
bool copy(const AbstractColumn *other)
Copy another column of the same type.
Definition: ColumnPrivate.cpp:472
Column::Private::setPlotDesignation
void setPlotDesignation(SciDAVis::PlotDesignation pd)
Set the column plot designation.
Definition: ColumnPrivate.cpp:749
Column::Private::rowCount
int rowCount() const
Return the data vector size.
Definition: ColumnPrivate.cpp:628
Column::Private::columnMode
SciDAVis::ColumnMode columnMode() const
Return the column mode.
Definition: ColumnPrivate.h:64
AbstractColumn
Interface definition for data with column logic.
Definition: AbstractColumn.h:82
Column::Private::replaceData
void replaceData(void *data, IntervalAttribute< bool > validity)
Replace data pointer and validity.
Definition: ColumnPrivate.cpp:464