SciDAVis
1.D4
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
scidavis
src
future
core
column
ColumnPrivate.h
Go to the documentation of this file.
1
/***************************************************************************
2
File : ColumnPrivate.h
3
Project : SciDAVis
4
Description : Private data class of Column
5
--------------------------------------------------------------------
6
Copyright : (C) 2007-2009 Tilman Benkert (thzs*gmx.net)
7
(replace * with @ in the email addresses)
8
9
***************************************************************************/
10
11
/***************************************************************************
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 2 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, *
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21
* GNU General Public License for more details. *
22
* *
23
* You should have received a copy of the GNU General Public License *
24
* along with this program; if not, write to the Free Software *
25
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26
* Boston, MA 02110-1301 USA *
27
* *
28
***************************************************************************/
29
30
#ifndef COLUMNPRIVATE_H
31
#define COLUMNPRIVATE_H
32
33
#include <QObject>
34
#include "
lib/IntervalAttribute.h
"
35
#include "
core/column/Column.h
"
36
class
AbstractSimpleFilter
;
37
class
QString;
38
40
43
class
Column::Private
44
{
45
public
:
47
Private
(
Column
* owner,
SciDAVis::ColumnMode
mode);
49
~Private
();
51
Private
(
Column
* owner,
SciDAVis::ColumnDataType
type,
SciDAVis::ColumnMode
mode,
52
void
* data,
IntervalAttribute<bool>
validity);
53
55
SciDAVis::ColumnDataType
dataType
()
const
{
return
d_data_type
; };
57
bool
isReadOnly
()
const
{
return
false
; };
59
64
SciDAVis::ColumnMode
columnMode
()
const
{
return
d_column_mode
; };
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
;
138
SciDAVis::PlotDesignation
plotDesignation
()
const
{
return
d_plot_designation
; };
140
void
setPlotDesignation
(
SciDAVis::PlotDesignation
pd);
142
void
clear
();
144
void
*
dataPointer
()
const
{
return
d_data
; }
146
AbstractSimpleFilter
*
inputFilter
()
const
{
return
d_input_filter
; }
148
AbstractSimpleFilter
*
outputFilter
()
const
{
return
d_output_filter
; }
150
153
void
replaceModeData
(
SciDAVis::ColumnMode
mode,
SciDAVis::ColumnDataType
type,
void
* data,
154
AbstractSimpleFilter
*in_filter,
AbstractSimpleFilter
*out_filter,
IntervalAttribute<bool>
validity);
156
void
replaceData
(
void
* data,
IntervalAttribute<bool>
validity);
158
IntervalAttribute<bool>
validityAttribute
() {
return
d_validity
; }
160
IntervalAttribute<bool>
maskingAttribute
() {
return
d_masking
; }
162
void
replaceMasking
(
IntervalAttribute<bool>
masking);
164
IntervalAttribute<QString>
formulaAttribute
() {
return
d_formulas
; }
166
void
replaceFormulas
(
IntervalAttribute<QString>
formulas);
167
169
170
171
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
207
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
232
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
299
302
SciDAVis::ColumnDataType
d_data_type
;
304
308
SciDAVis::ColumnMode
d_column_mode
;
310
314
void
*
d_data
;
316
AbstractSimpleFilter
*
d_input_filter
;
318
AbstractSimpleFilter
*
d_output_filter
;
319
IntervalAttribute<bool>
d_validity
;
320
IntervalAttribute<bool>
d_masking
;
321
IntervalAttribute<QString>
d_formulas
;
323
SciDAVis::PlotDesignation
d_plot_designation
;
325
Column
*
d_owner
;
327
328
};
329
330
#endif
Generated by
1.8.1