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)  

Column Class Reference

Aspect that manages a column. More...

#include <Column.h>

Inheritance diagram for Column:
[legend]
Collaboration diagram for Column:
[legend]

Classes

class  Private
 Private data class of Column. More...
 

Public Member Functions

 Column (const QString &name, SciDAVis::ColumnMode mode)
 Ctor. More...
 
 ~Column ()
 
template<>
void initPrivate (std::unique_ptr< QVector< qreal > > d, IntervalAttribute< bool > v)
 
template<>
void initPrivate (std::unique_ptr< QStringList > d, IntervalAttribute< bool > v)
 
template<>
void initPrivate (std::unique_ptr< QList< QDateTime > > d, IntervalAttribute< bool > v)
 
AbstractAspectparentAspect () const
 Return my parent Aspect or 0 if I currently don't have one. More...
 
future::Folderfolder ()
 Return the folder the Aspect is contained in or 0 if not. More...
 
bool isDescendantOf (AbstractAspect *other)
 Return whether the there is a path upwards to the given aspect. More...
 
void addChild (AbstractAspect *child)
 Add the given Aspect to my list of children. More...
 
void insertChild (AbstractAspect *child, int index)
 Insert the given Aspect at a specific position in my list of children. More...
 
void removeChild (AbstractAspect *child, bool detach=false)
 Remove the given Aspect from my list of children. More...
 
void removeChild (int index)
 Remove the Aspect at the given index from my list of children. More...
 
AbstractAspectchild (int index) const
 Get a child by its position in my list of children. More...
 
int childCount () const
 Return the number of child Aspects. More...
 
int indexOfChild (const AbstractAspect *child) const
 Return the position of child in my list of children. More...
 
int index () const
 Return my position in my parent's list of children. More...
 
void moveChild (int from, int to)
 Change the positon of a child in my list of children. More...
 
void reparentChild (AbstractAspect *new_parent, AbstractAspect *child, int d_new_index)
 Move a child to another aspect and transfer ownership. More...
 
void reparentChild (AbstractAspect *new_parent, AbstractAspect *child)
 Move a child to another aspect and transfer ownership. More...
 
QList< AbstractAspect * > descendantsThatInherit (const char *class_name)
 Get all descendents that inherit the given class. More...
 
virtual void removeAllChildAspects ()
 Remove all child aspects. More...
 
virtual const Projectproject () const
 Return the Project this Aspect belongs to, or 0 if it is currently not part of one. More...
 
virtual Projectproject ()
 Return the Project this Aspect belongs to, or 0 if it is currently not part of one. More...
 
virtual QString path () const
 Return the path that leads from the top-most Aspect (usually a Project) to me. More...
 
virtual QMenu * createContextMenu () const
 Return a new context menu. More...
 
QString name () const
 
QString comment () const
 
QString captionSpec () const
 Return the specification string used for constructing the caption(). More...
 
QDateTime creationTime () const
 
QString caption () const
 
template<class D >
 Column (const QString &name, const D &data, IntervalAttribute< bool > validity=IntervalAttribute< bool >())
 Ctor. More...
 
template<class D >
 Column (const QString &name, std::unique_ptr< D > data, IntervalAttribute< bool > validity=IntervalAttribute< bool >())
 
aspect related functions
virtual QIcon icon () const override
 Return an icon to be used for decorating the views and table column headers. More...
 
SciDAVis::ColumnDataType dataType () const override
 Return the data type of the column. More...
 
bool isReadOnly () const override
 Return whether the object is read-only. More...
 
SciDAVis::ColumnMode columnMode () const override
 Return the column mode. More...
 
void setColumnMode (SciDAVis::ColumnMode mode, AbstractFilter *conversion_filter=0) override
 Set the column mode. More...
 
bool copy (const AbstractColumn *other) override
 Copy another column of the same type. More...
 
bool copy (const AbstractColumn *source, int source_start, int dest_start, int num_rows) override
 Copies a part of another column of the same type. More...
 
int rowCount () const override
 Return the data vector size. More...
 
void insertRows (int before, int count) override
 Insert some empty (or initialized with zero) rows. More...
 
void removeRows (int first, int count) override
 Remove 'count' rows starting from row 'first'. More...
 
SciDAVis::PlotDesignation plotDesignation () const override
 Return the column plot designation. More...
 
void setPlotDesignation (SciDAVis::PlotDesignation pd)
 Set the column plot designation. More...
 
void clear () override
 Clear the whole column. More...
 
void notifyReplacement (const AbstractColumn *replacement) override
 This must be called before the column is replaced by another. More...
 
AbstractSimpleFilteroutputFilter () const
 Return the output filter (for data type -> string conversion) More...
 
ColumnStringIOasStringColumn () const
 Return a wrapper column object used for String I/O. More...
 
IntervalAttribute related functions
bool isInvalid (int row) const override
 Return whether a certain row contains an invalid value
More...
 
bool isInvalid (Interval< int > i) const override
 Return whether a certain interval of rows contains only invalid values
More...
 
QList< Interval< int > > invalidIntervals () const override
 Return all intervals of invalid rows. More...
 
bool isMasked (int row) const override
 Return whether a certain row is masked
More...
 
bool isMasked (Interval< int > i) const override
 Return whether a certain interval of rows rows is fully masked
More...
 
QList< Interval< int > > maskedIntervals () const override
 Return all intervals of masked rows. More...
 
void clearValidity () override
 Clear all validity information. More...
 
void clearMasks () override
 Clear all masking information. More...
 
void setInvalid (Interval< int > i, bool invalid=true)
 Set an interval invalid or valid. More...
 
void setInvalid (int row, bool invalid=true)
 Overloaded function for convenience. More...
 
void setMasked (Interval< int > i, bool mask=true)
 Set an interval masked. More...
 
void setMasked (int row, bool mask=true)
 Overloaded function for convenience. More...
 
Formula related functions
QString formula (int row) const override
 Return the formula associated with row 'row'
More...
 
QList< Interval< int > > formulaIntervals () const override
 Return the intervals that have associated formulas. More...
 
void setFormula (Interval< int > i, QString formula)
 Set a formula string for an interval of rows. More...
 
void setFormula (int row, QString formula)
 Overloaded function for convenience. More...
 
void clearFormulas () override
 Clear all formulas. More...
 
type specific functions
QString textAt (int row) const override
 Return the content of row 'row'. More...
 
void setTextAt (int row, const QString &new_value)
 Set the content of row 'row'. More...
 
void replaceTexts (int first, const QStringList &new_values) override
 Replace a range of values. More...
 
QDate dateAt (int row) const override
 Return the date part of row 'row'. More...
 
void setDateAt (int row, const QDate &new_value)
 Set the content of row 'row'. More...
 
QTime timeAt (int row) const override
 Return the time part of row 'row'. More...
 
void setTimeAt (int row, const QTime &new_value)
 Set the content of row 'row'. More...
 
QDateTime dateTimeAt (int row) const override
 Return the QDateTime in row 'row'. More...
 
void setDateTimeAt (int row, const QDateTime &new_value)
 Set the content of row 'row'. More...
 
void replaceDateTimes (int first, const QList< QDateTime > &new_values) override
 Replace a range of values. More...
 
double valueAt (int row) const override
 Return the double value in row 'row'. More...
 
void setValueAt (int row, double new_value)
 Set the content of row 'row'. More...
 
virtual void replaceValues (int first, const QVector< qreal > &new_values) override
 Replace a range of values. More...
 

Friends

class Private
 

undo related

virtual QUndoStack * undoStack () const
 Return the undo stack of the Project, or 0 if this Aspect is not part of a Project. More...
 
void exec (QUndoCommand *command)
 Execute the given command, pushing it on the undoStack() if available. More...
 
void beginMacro (const QString &text)
 Begin an undo stack macro (series of commands) More...
 
void endMacro ()
 End the undo stack macro. More...
 
static QVariant global (const QString &key)
 Retrieve a global setting. More...
 
static void setGlobal (const QString &key, const QVariant &value)
 Update a global setting. More...
 
static void setGlobalDefault (const QString &key, const QVariant &value)
 Set default value for a global setting. More...
 

serialize/deserialize

Privated_aspect_private
 
void importV0x0001XXCreationTime (const QString &str)
 
void aspectDescriptionAboutToChange (const AbstractAspect *aspect)
 Emit this before the name, comment or caption spec is changed. More...
 
void aspectDescriptionChanged (const AbstractAspect *aspect)
 Emit this when the name, comment or caption spec changed. More...
 
void aspectAboutToBeAdded (const AbstractAspect *parent, int index)
 Emit this when a parent aspect is about to get a new child inserted. More...
 
void aspectAdded (const AbstractAspect *aspect)
 Emit this from a newly added aspect. More...
 
void aspectAdded (const AbstractAspect *parent, int index)
 Emit this from a parent after adding a new child to it. More...
 
void aspectAboutToBeRemoved (const AbstractAspect *aspect)
 Emit this from an aspect about to be removed from its parent's children. More...
 
void aspectAboutToBeRemoved (const AbstractAspect *parent, int index)
 Emit this from a parent before removing its child. More...
 
void aspectRemoved (const AbstractAspect *parent, int index)
 Emit this from the parent after removing a child. More...
 
void statusInfo (const QString &text)
 Emit this to give status information to the user. More...
 
bool readBasicAttributes (XmlStreamReader *reader)
 Load name, creation time and caption spec from XML. More...
 
void writeBasicAttributes (QXmlStreamWriter *writer) const
 Save name, creation time and caption spec to XML. More...
 
void writeCommentElement (QXmlStreamWriter *writer) const
 Save the comment to XML. More...
 
bool readCommentElement (XmlStreamReader *reader)
 Load comment from an XML element. More...
 
void setCreationTime (const QDateTime &time)
 Set the creation time. More...
 
virtual void completeAspectInsertion (AbstractAspect *aspect, int index)
 Called after a new child has been inserted or added. More...
 
virtual void prepareAspectRemoval (AbstractAspect *aspect)
 Called before a child is removed. More...
 
void info (const QString &text)
 Implementations should call this whenever status information should be given to the user. More...
 
void setName (const QString &value)
 
void setComment (const QString &value)
 
void setCaptionSpec (const QString &value)
 Set the specification string used for constructing the caption(). More...
 
virtual void remove ()
 Remove me from my parent's list of children. More...
 
QString uniqueNameFor (const QString &current_name) const
 Make the specified name unique among my children by incrementing a trailing number. More...
 

XML related functions

class ColumnStringIO
 
Privated_column_private
 Pointer to the private data object. More...
 
ColumnStringIOd_string_io
 
void save (QXmlStreamWriter *writer) const override
 Save the column as XML. More...
 
bool load (XmlStreamReader *reader) override
 Load the column from XML. More...
 
bool XmlReadInputFilter (XmlStreamReader *reader)
 Read XML input filter element. More...
 
bool XmlReadOutputFilter (XmlStreamReader *reader)
 Read XML output filter element. More...
 
bool XmlReadMask (XmlStreamReader *reader)
 Read XML mask element. More...
 
bool XmlReadFormula (XmlStreamReader *reader)
 Read XML formula element. More...
 
bool XmlReadRow (XmlStreamReader *reader)
 Read XML row element. More...
 
void init ()
 
template<class D >
void initPrivate (std::unique_ptr< D >, IntervalAttribute< bool >)
 
void notifyDisplayChange ()
 

Detailed Description

Aspect that manages a column.

This class represents a column, i.e., (mathematically) a 1D vector of values with a header. It provides a public reading and (undo aware) writing interface as defined in AbstractColumn. It manages special attributes of column rows such as masking and a validity flag. A column can have one of currently three data types: double, QString, or QDateTime. The string representation of the values can differ depending on the mode of the column.

Column inherits from AbstractAspect and is intended to be a child of the corresponding Table in the aspect hierarchy. Columns don't have a view as they are intended to be displayed inside a table.

Definition at line 58 of file Column.h.

Constructor & Destructor Documentation

◆ Column() [1/3]

Column::Column ( const QString &  name,
SciDAVis::ColumnMode  mode 
)

Ctor.

Parameters
namethe column name (= aspect name)
modeinitial column mode

File : Column.cpp Project : SciDAVis

Description : Aspect that manages a column

Copyright : (C) 2007-2009 Tilman Benkert (thzs*gmx.net) (replace * with @ in the email addresses)

  • This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. *
    • This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. *
    • You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA *

Definition at line 38 of file Column.cpp.

40 {
41  d_column_private = new Private(this, mode);
42  d_string_io = new ColumnStringIO(this);
44  outputFilter()->input(0,this);
47 }

References AbstractAspect::addChild(), ColumnStringIO, d_column_private, d_string_io, AbstractFilter::input(), Column::Private::inputFilter(), outputFilter(), and Private.

Referenced by Column::Private::setColumnMode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Column() [2/3]

template<class D >
Column::Column ( const QString &  name,
const D &  data,
IntervalAttribute< bool >  validity = IntervalAttribute<bool>() 
)
inline

Ctor.

Parameters
namethe column name (= aspect name)
datainitial data vector
validitya list of invalid intervals (optional)

Definition at line 78 of file Column.h.

79  :
81  {
82  initPrivate(std::unique_ptr<D>(new D(data)), validity);
83  init();
84  }

References init(), and initPrivate().

Here is the call graph for this function:

◆ Column() [3/3]

template<class D >
Column::Column ( const QString &  name,
std::unique_ptr< D >  data,
IntervalAttribute< bool >  validity = IntervalAttribute<bool>() 
)
inline

Definition at line 87 of file Column.h.

88  :
90  {
91  initPrivate(std::move(data), validity);
92  init();
93  }

References init(), and initPrivate().

Here is the call graph for this function:

◆ ~Column()

Column::~Column ( )

Definition at line 79 of file Column.cpp.

80 {
81  delete d_string_io;
82  delete d_column_private;
83 }

References d_column_private, and d_string_io.

Member Function Documentation

◆ aboutToBeDestroyed

void AbstractColumn::aboutToBeDestroyed ( const AbstractColumn source)
signalinherited

Emitted shortly before this data source is deleted.

Parameters
sourcethe object emitting this signal

This is needed by AbstractFilter.

Referenced by AbstractColumn::~AbstractColumn().

Here is the caller graph for this function:

◆ aboutToBeReplaced

void AbstractColumn::aboutToBeReplaced ( const AbstractColumn source,
const AbstractColumn new_col 
)
signalinherited

The column will be replaced.

This is used then a column is replaced by another column, possibly of another type.

Parameters
new_colPointer to the column this one is to be replaced with.
sourceis always a pointer to the column that emitted this signal. This way it's easier to use one handler for lots of columns.

Referenced by AbstractColumn::notifyReplacement(), and notifyReplacement().

Here is the caller graph for this function:

◆ addChild()

void AbstractAspect::addChild ( AbstractAspect child)
inherited

Add the given Aspect to my list of children.

Definition at line 114 of file AbstractAspect.cpp.

115 {
116  Q_CHECK_PTR(child);
117  QString new_name = d_aspect_private->uniqueNameFor(child->name());
118  beginMacro(tr("%1: add %2.").arg(name()).arg(new_name));
119  if (new_name != child->name()) {
120  info(tr("Renaming \"%1\" to \"%2\" in order to avoid name collision.").arg(child->name()).arg(new_name));
121  child->setName(new_name);
122  }
125  endMacro();
126 }

References AbstractAspect::beginMacro(), AbstractAspect::child(), AbstractAspect::Private::childCount(), AbstractAspect::completeAspectInsertion(), AbstractAspect::d_aspect_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::info(), AbstractAspect::name(), AbstractAspect::setName(), and AbstractAspect::Private::uniqueNameFor().

Referenced by AbstractSimpleFilter::AbstractSimpleFilter(), Column(), ApplicationWindow::convertMatrixToTable(), ApplicationWindow::convertTableToMatrix(), future::Matrix::duplicate(), ApplicationWindow::importImage(), init(), ApplicationWindow::newMatrix(), ApplicationWindow::newTable(), ApplicationWindow::newTableStatistics(), future::Folder::readChildAspectElement(), and setColumnMode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aspectAboutToBeAdded

void AbstractAspect::aspectAboutToBeAdded ( const AbstractAspect parent,
int  index 
)
signalinherited

Emit this when a parent aspect is about to get a new child inserted.

Referenced by AbstractAspect::Private::insertChild().

Here is the caller graph for this function:

◆ aspectAboutToBeRemoved [1/2]

void AbstractAspect::aspectAboutToBeRemoved ( const AbstractAspect aspect)
signalinherited

Emit this from an aspect about to be removed from its parent's children.

Referenced by AbstractAspect::Private::insertChild(), and AbstractAspect::Private::removeChild().

Here is the caller graph for this function:

◆ aspectAboutToBeRemoved [2/2]

void AbstractAspect::aspectAboutToBeRemoved ( const AbstractAspect parent,
int  index 
)
signalinherited

Emit this from a parent before removing its child.

◆ aspectAdded [1/2]

void AbstractAspect::aspectAdded ( const AbstractAspect aspect)
signalinherited

Emit this from a newly added aspect.

Referenced by AbstractAspect::Private::insertChild().

Here is the caller graph for this function:

◆ aspectAdded [2/2]

void AbstractAspect::aspectAdded ( const AbstractAspect parent,
int  index 
)
signalinherited

Emit this from a parent after adding a new child to it.

◆ aspectDescriptionAboutToChange

void AbstractAspect::aspectDescriptionAboutToChange ( const AbstractAspect aspect)
signalinherited

Emit this before the name, comment or caption spec is changed.

Referenced by AbstractFilter::input(), and AbstractAspect::Private::insertChild().

Here is the caller graph for this function:

◆ aspectDescriptionChanged

void AbstractAspect::aspectDescriptionChanged ( const AbstractAspect aspect)
signalinherited

Emit this when the name, comment or caption spec changed.

Referenced by future::Table::connectColumn(), AbstractFilter::input(), AbstractAspect::Private::insertChild(), and notifyDisplayChange().

Here is the caller graph for this function:

◆ aspectRemoved

void AbstractAspect::aspectRemoved ( const AbstractAspect parent,
int  index 
)
signalinherited

Emit this from the parent after removing a child.

Referenced by AbstractAspect::Private::insertChild(), and AbstractAspect::Private::removeChild().

Here is the caller graph for this function:

◆ asStringColumn()

ColumnStringIO* Column::asStringColumn ( ) const
inline

Return a wrapper column object used for String I/O.

Definition at line 166 of file Column.h.

166 { return d_string_io; }

References d_string_io.

Referenced by future::Table::clearSelectedCells(), TableModel::data(), future::Table::export_to_TeX(), Table::exportASCII(), Table::importASCII(), future::Table::pasteIntoSelection(), Table::recalculate(), TableModel::setData(), Table::setText(), and Table::text().

Here is the caller graph for this function:

◆ beginMacro()

void AbstractAspect::beginMacro ( const QString &  text)
inherited

Begin an undo stack macro (series of commands)

Definition at line 215 of file AbstractAspect.cpp.

216 {
217  QUndoStack *stack = undoStack();
218  if (stack)
219  stack->beginMacro(text);
220 }

References AbstractAspect::undoStack().

Referenced by AbstractAspect::addChild(), future::Table::addColumn(), future::Matrix::addColumns(), future::Table::addColumns(), future::Matrix::addRows(), future::Table::addRows(), Matrix::applyFormula(), TableView::applyType(), future::Matrix::clear(), future::Table::clear(), future::Table::clearMasks(), future::Matrix::clearSelectedCells(), future::Table::clearSelectedCells(), future::Matrix::clearSelectedColumns(), future::Table::clearSelectedColumns(), future::Matrix::clearSelectedRows(), future::Matrix::copy(), future::Table::copy(), future::Matrix::cutSelection(), future::Table::cutSelection(), future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), AbstractAspect::insertChild(), future::Matrix::insertColumns(), future::Table::insertColumns(), future::Matrix::insertEmptyColumns(), future::Table::insertEmptyColumns(), future::Matrix::insertEmptyRows(), future::Table::insertEmptyRows(), future::Matrix::insertRows(), future::Table::insertRows(), future::Table::maskSelection(), future::Table::moveColumn(), future::Table::normalizeColumns(), future::Table::normalizeSelection(), future::Matrix::pasteIntoSelection(), future::Table::pasteIntoSelection(), future::Table::recalculateSelectedCells(), AbstractAspect::removeAllChildAspects(), AbstractAspect::removeChild(), future::Matrix::removeColumns(), future::Table::removeColumns(), future::Matrix::removeRows(), future::Table::removeRows(), future::Matrix::removeSelectedColumns(), future::Table::removeSelectedColumns(), future::Matrix::removeSelectedRows(), future::Table::removeSelectedRows(), AbstractAspect::reparentChild(), setColumnMode(), future::Matrix::setDimensions(), future::Table::setRowCount(), future::Table::setSelectionAs(), future::Table::sortColumns(), and future::Table::unmaskSelection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ caption()

QString AbstractAspect::caption ( ) const
inherited

Definition at line 293 of file AbstractAspect.cpp.

294 {
295  return d_aspect_private->caption();
296 }

References AbstractAspect::Private::caption(), and AbstractAspect::d_aspect_private.

Referenced by PartMdiView::handleAspectDescriptionChanged().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ captionSpec()

QString AbstractAspect::captionSpec ( ) const
inherited

Return the specification string used for constructing the caption().

See setCaptionSpec() for format.

Definition at line 271 of file AbstractAspect.cpp.

272 {
273  return d_aspect_private->captionSpec();
274 }

References AbstractAspect::Private::captionSpec(), and AbstractAspect::d_aspect_private.

Referenced by future::Table::copy(), and AbstractAspect::writeBasicAttributes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ child()

AbstractAspect * AbstractAspect::child ( int  index) const
inherited

Get a child by its position in my list of children.

Definition at line 180 of file AbstractAspect.cpp.

181 {
182  Q_ASSERT(index >= 0 && index <= childCount());
183  return d_aspect_private->child(index);
184 }

References AbstractAspect::Private::child(), AbstractAspect::childCount(), AbstractAspect::d_aspect_private, and AbstractAspect::index().

Referenced by AbstractAspect::addChild(), AbstractAspect::Private::addChild(), AbstractAspect::descendantsThatInherit(), ApplicationWindow::handleAspectAboutToBeRemoved(), ApplicationWindow::handleAspectAdded(), AbstractAspect::indexOfChild(), AbstractAspect::Private::indexOfChild(), AbstractAspect::insertChild(), AbstractAspect::Private::insertChild(), AbstractAspect::Private::removeChild(), AbstractAspect::removeChild(), AbstractAspect::reparentChild(), future::Folder::save(), AbstractAspect::Private::uniqueNameFor(), and AbstractAspect::Private::~Private().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ childCount()

int AbstractAspect::childCount ( ) const
inherited

Return the number of child Aspects.

Definition at line 186 of file AbstractAspect.cpp.

187 {
188  return d_aspect_private->childCount();
189 }

References AbstractAspect::Private::childCount(), and AbstractAspect::d_aspect_private.

Referenced by AbstractAspect::Private::child(), AbstractAspect::child(), AbstractAspect::descendantsThatInherit(), AbstractAspect::moveChild(), AbstractAspect::removeAllChildAspects(), AbstractAspect::removeChild(), AbstractAspect::reparentChild(), and future::Folder::save().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

void Column::clear ( )
overridevirtual

Clear the whole column.

Reimplemented from AbstractColumn.

Definition at line 142 of file Column.cpp.

143 {
145 }

References d_column_private, and AbstractAspect::exec().

Referenced by future::Table::clear(), future::Table::clearSelectedColumns(), and MuParserScript::resolveColumnPath().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearFormulas()

void Column::clearFormulas ( )
overridevirtual

Clear all formulas.

Reimplemented from AbstractColumn.

Definition at line 192 of file Column.cpp.

193 {
195 }

References d_column_private, and AbstractAspect::exec().

Referenced by future::Table::clearSelectedColumns(), and load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearMasks()

void Column::clearMasks ( )
overridevirtual

Clear all masking information.

Reimplemented from AbstractColumn.

Definition at line 157 of file Column.cpp.

158 {
160 }

References d_column_private, and AbstractAspect::exec().

Referenced by future::Table::clearMasks(), and load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearValidity()

void Column::clearValidity ( )
overridevirtual

Clear all validity information.

Reimplemented from AbstractColumn.

Definition at line 152 of file Column.cpp.

153 {
155 }

References d_column_private, and AbstractAspect::exec().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ columnMode()

SciDAVis::ColumnMode Column::columnMode ( ) const
overridevirtual

Return the column mode.

This function is most used by tables but can also be used by plots. The column mode specifies how to interpret the values in the column additional to the data type.

Implements AbstractColumn.

Definition at line 579 of file Column.cpp.

580 {
581  return d_column_private->columnMode();
582 }

References Column::Private::columnMode(), and d_column_private.

Referenced by TableView::applyType(), Table::cell(), Table::columnFormat(), Table::columnType(), Table::columnTypes(), DataCurve::convertData(), future::Table::copy(), future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), ApplicationWindow::importASCII(), future::Table::pasteIntoSelection(), Graph::plotHistogram(), Table::recalculate(), save(), Table::saveColumnTypes(), TableView::setColumnForControlTabs(), setColumnMode(), future::Table::sortColumns(), TableStatistics::update(), and Graph::updateCurvesData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ comment()

QString AbstractAspect::comment ( ) const
inherited

Definition at line 260 of file AbstractAspect.cpp.

261 {
262  return d_aspect_private->comment();
263 }

References AbstractAspect::Private::comment(), and AbstractAspect::d_aspect_private.

Referenced by Table::colComment(), Table::colComments(), future::Table::copy(), Table::saveComments(), TableView::setColumnForControlTabs(), Matrix::windowLabel(), and AbstractAspect::writeCommentElement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ completeAspectInsertion()

virtual void AbstractAspect::completeAspectInsertion ( AbstractAspect aspect,
int  index 
)
inlineprotectedvirtualinherited

Called after a new child has been inserted or added.

Unlike the aspectAdded() signals, this method does not get called inside undo/redo actions; allowing subclasses to execute undo commands of their own.

Reimplemented in future::Table.

Definition at line 294 of file AbstractAspect.h.

294 { Q_UNUSED(aspect); Q_UNUSED(index); }

References AbstractAspect::index().

Referenced by AbstractAspect::addChild(), AbstractAspect::insertChild(), and AbstractAspect::reparentChild().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy() [1/2]

bool Column::copy ( const AbstractColumn other)
overridevirtual

Copy another column of the same type.

This function will return false if the data type of 'other' is not the same as the type of 'this'. The validity information for the rows is also copied. Use a filter to convert a column to another type.

Reimplemented from AbstractColumn.

Definition at line 108 of file Column.cpp.

109 {
110  Q_CHECK_PTR(other);
111  if(other->dataType() != dataType()) return false;
113  return true;
114 }

References d_column_private, AbstractColumn::dataType(), dataType(), and AbstractAspect::exec().

Referenced by ColumnStringIO::copy(), future::Table::copy(), Table::importASCII(), ApplicationWindow::importASCII(), Column::Private::setColumnMode(), ColumnStringIO::setTextAt(), and future::Table::sortColumns().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy() [2/2]

bool Column::copy ( const AbstractColumn source,
int  source_start,
int  dest_start,
int  num_rows 
)
overridevirtual

Copies a part of another column of the same type.

This function will return false if the data type of 'other' is not the same as the type of 'this'. The validity information for the rows is also copied.

Parameters
otherpointer to the column to copy
src_startfirst row to copy in the column to copy
dest_startfirst row to copy in
num_rowsthe number of rows to copy

Reimplemented from AbstractColumn.

Definition at line 116 of file Column.cpp.

117 {
118  Q_CHECK_PTR(source);
119  if(source->dataType() != dataType()) return false;
120  exec(new ColumnPartialCopyCmd(d_column_private, source, source_start, dest_start, num_rows));
121  return true;
122 }

References d_column_private, AbstractColumn::dataType(), dataType(), and AbstractAspect::exec().

Here is the call graph for this function:

◆ createContextMenu()

QMenu * AbstractAspect::createContextMenu ( ) const
virtualinherited

Return a new context menu.

The caller takes ownership of the menu.

Reimplemented in future::Table, future::Matrix, Project, future::Folder, and AbstractPart.

Definition at line 303 of file AbstractAspect.cpp.

304 {
305  QMenu * menu = new QMenu();
306 
307  const QStyle *widget_style = qApp->style();
308  QAction *action_temp;
309 
310  action_temp = menu->addAction(QObject::tr("&Remove"), this, SLOT(remove()));
311  action_temp->setIcon(widget_style->standardIcon(QStyle::SP_TrashIcon));
312 
313  return menu;
314 }

References AbstractAspect::remove().

Referenced by AbstractPart::createContextMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ creationTime()

QDateTime AbstractAspect::creationTime ( ) const
inherited

Definition at line 288 of file AbstractAspect.cpp.

289 {
290  return d_aspect_private->creationTime();
291 }

References AbstractAspect::Private::creationTime(), and AbstractAspect::d_aspect_private.

Referenced by Matrix::birthDate(), Matrix::init(), and AbstractAspect::writeBasicAttributes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dataAboutToChange

void AbstractColumn::dataAboutToChange ( const AbstractColumn source)
signalinherited

Data (including validity) of the column will be changed.

'source' is always the this pointer of the column that emitted this signal. This way it's easier to use one handler for lots of columns.

Referenced by AbstractSimpleFilter::inputDataAboutToChange(), and AbstractSimpleFilter::inputModeAboutToChange().

Here is the caller graph for this function:

◆ dataChanged

void AbstractColumn::dataChanged ( const AbstractColumn source)
signalinherited

Data (including validity) of the column has changed.

Important: When data has changed also the number of rows in the column may have changed without any other signal emission. 'source' is always the this pointer of the column that emitted this signal. This way it's easier to use one handler for lots of columns.

Referenced by AbstractSimpleFilter::inputDataChanged(), AbstractSimpleFilter::inputModeChanged(), and notifyDisplayChange().

Here is the caller graph for this function:

◆ dataType()

SciDAVis::ColumnDataType Column::dataType ( ) const
overridevirtual

Return the data type of the column.

Implements AbstractColumn.

Definition at line 574 of file Column.cpp.

575 {
576  return d_column_private->dataType();
577 }

References d_column_private, and Column::Private::dataType().

Referenced by Column::Private::copy(), copy(), future::Table::copySelection(), icon(), ApplicationWindow::importASCII(), load(), future::Table::normalizeColumns(), future::Table::normalizeSelection(), save(), future::Table::sortColumns(), and XmlReadRow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dateAt()

QDate Column::dateAt ( int  row) const
overridevirtual

Return the date part of row 'row'.

Use this only when dataType() is QDateTime

Reimplemented from AbstractColumn.

Definition at line 245 of file Column.cpp.

246 {
247  return d_column_private->dateAt(row);
248 }

References d_column_private, and Column::Private::dateAt().

Referenced by DataCurve::convertData(), setTimeAt(), and Column::Private::setTimeAt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dateTimeAt()

QDateTime Column::dateTimeAt ( int  row) const
overridevirtual

Return the QDateTime in row 'row'.

Use this only when dataType() is QDateTime

Reimplemented from AbstractColumn.

Definition at line 255 of file Column.cpp.

256 {
257  return d_column_private->dateTimeAt(row);
258 }

References d_column_private, and Column::Private::dateTimeAt().

Referenced by DataCurve::convertData(), Column::Private::dateAt(), future::Table::fillSelectedCellsWithRandomNumbers(), save(), future::Table::sortColumns(), and Column::Private::timeAt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ descendantsThatInherit()

QList< AbstractAspect * > AbstractAspect::descendantsThatInherit ( const char *  class_name)
inherited

Get all descendents that inherit the given class.

Definition at line 342 of file AbstractAspect.cpp.

343 {
344  QList<AbstractAspect *> list;
345  if (inherits(class_name))
346  list << this;
347  for (int i=0; i<childCount(); i++)
348  list << child(i)->descendantsThatInherit(class_name);
349  return list;
350 }

References AbstractAspect::child(), AbstractAspect::childCount(), and AbstractAspect::descendantsThatInherit().

Referenced by AbstractAspect::descendantsThatInherit(), and ApplicationWindow::tableWindows().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ endMacro()

void AbstractAspect::endMacro ( )
inherited

End the undo stack macro.

Definition at line 222 of file AbstractAspect.cpp.

223 {
224  QUndoStack *stack = undoStack();
225  if (stack)
226  stack->endMacro();
227 }

References AbstractAspect::undoStack().

Referenced by AbstractAspect::addChild(), future::Table::addColumn(), future::Matrix::addColumns(), future::Table::addColumns(), future::Matrix::addRows(), future::Table::addRows(), Matrix::applyFormula(), TableView::applyType(), future::Matrix::clear(), future::Table::clear(), future::Table::clearMasks(), future::Matrix::clearSelectedCells(), future::Table::clearSelectedCells(), future::Matrix::clearSelectedColumns(), future::Table::clearSelectedColumns(), future::Matrix::clearSelectedRows(), future::Matrix::copy(), future::Table::copy(), future::Matrix::cutSelection(), future::Table::cutSelection(), future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), AbstractAspect::insertChild(), future::Matrix::insertColumns(), future::Table::insertColumns(), future::Matrix::insertEmptyColumns(), future::Table::insertEmptyColumns(), future::Matrix::insertEmptyRows(), future::Table::insertEmptyRows(), future::Matrix::insertRows(), future::Table::insertRows(), future::Table::maskSelection(), future::Table::moveColumn(), future::Table::normalizeColumns(), future::Table::normalizeSelection(), future::Matrix::pasteIntoSelection(), future::Table::pasteIntoSelection(), future::Table::recalculateSelectedCells(), AbstractAspect::removeAllChildAspects(), AbstractAspect::removeChild(), future::Matrix::removeColumns(), future::Table::removeColumns(), future::Matrix::removeRows(), future::Table::removeRows(), future::Matrix::removeSelectedColumns(), future::Table::removeSelectedColumns(), future::Matrix::removeSelectedRows(), future::Table::removeSelectedRows(), AbstractAspect::reparentChild(), setColumnMode(), future::Matrix::setDimensions(), future::Table::setRowCount(), future::Table::setSelectionAs(), future::Table::sortColumns(), and future::Table::unmaskSelection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exec()

void AbstractAspect::exec ( QUndoCommand *  command)
inherited

Execute the given command, pushing it on the undoStack() if available.

Definition at line 203 of file AbstractAspect.cpp.

204 {
205  Q_CHECK_PTR(cmd);
206  QUndoStack *stack = undoStack();
207  if (stack)
208  stack->push(cmd);
209  else {
210  cmd->redo();
211  delete cmd;
212  }
213 }

References AbstractAspect::undoStack().

Referenced by AbstractAspect::addChild(), future::Matrix::addColumns(), future::Matrix::addRows(), future::Table::addRows(), future::Matrix::clear(), clear(), clearFormulas(), clearMasks(), future::Matrix::clearSelectedCells(), future::Matrix::clearSelectedColumns(), future::Matrix::clearSelectedRows(), clearValidity(), future::Table::completeAspectInsertion(), copy(), AbstractAspect::insertChild(), future::Matrix::insertColumns(), future::Matrix::insertRows(), insertRows(), future::Matrix::mirrorHorizontally(), future::Matrix::mirrorVertically(), AbstractAspect::moveChild(), future::Table::moveColumn(), future::Table::prepareAspectRemoval(), AbstractAspect::removeChild(), future::Matrix::removeColumns(), future::Matrix::removeRows(), future::Table::removeRows(), removeRows(), AbstractAspect::reparentChild(), replaceDateTimes(), replaceTexts(), replaceValues(), AbstractAspect::setCaptionSpec(), future::Matrix::setCell(), future::Matrix::setColumnCells(), setColumnMode(), AbstractAspect::setComment(), future::Matrix::setCoordinates(), AbstractAspect::setCreationTime(), setDateTimeAt(), future::Matrix::setDimensions(), future::Matrix::setDisplayedDigits(), DateTime2StringFilter::setFormat(), String2DateTimeFilter::setFormat(), future::Matrix::setFormula(), setFormula(), setInvalid(), setMasked(), AbstractAspect::setName(), Double2StringFilter::setNumDigits(), Double2StringFilter::setNumericFormat(), future::Matrix::setNumericFormat(), setPlotDesignation(), future::Matrix::setRowCells(), future::Table::setRowCount(), setTextAt(), setValueAt(), future::Matrix::setXEnd(), future::Matrix::setXStart(), future::Matrix::setYEnd(), future::Matrix::setYStart(), and future::Matrix::transpose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ folder()

future::Folder * AbstractAspect::folder ( )
inherited

Return the folder the Aspect is contained in or 0 if not.

The returned folder may be the aspect itself if it inherits Folder.

Definition at line 316 of file AbstractAspect.cpp.

317 {
318  if(inherits("future::Folder")) return static_cast<future::Folder *>(this);
319  AbstractAspect * parent_aspect = parentAspect();
320  while(parent_aspect && !parent_aspect->inherits("future::Folder"))
321  parent_aspect = parent_aspect->parentAspect();
322  return static_cast<future::Folder *>(parent_aspect);
323 }

References AbstractAspect::parentAspect().

Referenced by Project::createFolderContextMenu(), future::Matrix::duplicate(), and future::Folder::readChildAspectElement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ formula()

QString Column::formula ( int  row) const
overridevirtual

Return the formula associated with row 'row'

Reimplemented from AbstractColumn.

Definition at line 628 of file Column.cpp.

629 {
630  return d_column_private->formula(row);
631 }

References d_column_private, and Column::Private::formula().

Referenced by future::Table::copy(), future::Table::copySelection(), TableModel::data(), Table::handleAspectDescriptionChange(), Table::recalculate(), save(), Table::saveCommands(), TableView::setColumnForControlTabs(), setFormula(), and Column::Private::setFormula().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ formulaIntervals()

QList< Interval< int > > Column::formulaIntervals ( ) const
overridevirtual

Return the intervals that have associated formulas.

This can be used to make a list of formulas with their intervals. Here is some example code:

QStringList list;
QList< Interval<int> > intervals = my_column.formulaIntervals();
foreach(Interval<int> interval, intervals)
list << QString(interval.toString() + ": " + my_column.formula(interval.start()));

Reimplemented from AbstractColumn.

Definition at line 633 of file Column.cpp.

634 {
636 }

References d_column_private, and Column::Private::formulaIntervals().

Referenced by future::Table::copy(), Table::handleAspectDescriptionChange(), Table::recalculate(), and save().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ global()

QVariant AbstractAspect::global ( const QString &  key)
staticinherited

Retrieve a global setting.

Definition at line 360 of file AbstractAspect.cpp.

361 {
362  QString qualified_key = QString(staticMetaObject.className()) + "/" + key;
363  QVariant result = Private::g_settings->value(qualified_key);
364  if (result.isValid())
365  return result;
366  else
367  return Private::g_defaults[qualified_key];
368 }

References AbstractAspect::Private::g_defaults, and AbstractAspect::Private::g_settings.

Referenced by future::Matrix::importImageDialog(), and ProjectConfigPage::ProjectConfigPage().

Here is the caller graph for this function:

◆ icon()

QIcon Column::icon ( ) const
overridevirtual

Return an icon to be used for decorating the views and table column headers.

Reimplemented from AbstractAspect.

Definition at line 265 of file Column.cpp.

266 {
267  switch(dataType())
268  {
270  return QIcon(QPixmap(":/numerictype.png"));
272  return QIcon(QPixmap(":/texttype.png"));
274  return QIcon(QPixmap(":/datetype.png"));
275  }
276  return QIcon();
277 }

References dataType(), SciDAVis::TypeDouble, SciDAVis::TypeQDateTime, and SciDAVis::TypeQString.

Here is the call graph for this function:

◆ importV0x0001XXCreationTime()

void AbstractAspect::importV0x0001XXCreationTime ( const QString &  str)
inlineinherited

Definition at line 255 of file AbstractAspect.h.

256  {
257  setCreationTime(QDateTime::fromString(str, Qt::LocalDate));
258  }

References AbstractAspect::setCreationTime(), and str.

Referenced by Matrix::setBirthDate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ index()

int AbstractAspect::index ( ) const
inlineinherited

Return my position in my parent's list of children.

Definition at line 137 of file AbstractAspect.h.

137 { return parentAspect() ? parentAspect()->indexOfChild(this) : 0; }

References AbstractAspect::indexOfChild(), and AbstractAspect::parentAspect().

Referenced by AbstractAspect::Private::child(), AbstractAspect::child(), future::Table::column(), future::Table::Private::column(), AbstractAspect::completeAspectInsertion(), future::Table::completeAspectInsertion(), future::Table::handleDataChange(), future::Table::handleDescriptionChange(), future::Table::handleModeChange(), future::Table::handlePlotDesignationChange(), future::Table::handleRowsInserted(), future::Table::handleRowsRemoved(), AbstractAspect::insertChild(), AbstractAspect::Private::insertChild(), AbstractAspect::Private::removeChild(), AbstractAspect::removeChild(), and XmlReadRow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ indexOfChild()

int AbstractAspect::indexOfChild ( const AbstractAspect child) const
inherited

Return the position of child in my list of children.

Definition at line 191 of file AbstractAspect.cpp.

192 {
194 }

References AbstractAspect::child(), AbstractAspect::d_aspect_private, and AbstractAspect::Private::indexOfChild().

Referenced by AbstractAspect::index(), AbstractAspect::remove(), AbstractAspect::Private::removeChild(), AbstractAspect::removeChild(), and AbstractAspect::reparentChild().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ info()

void AbstractAspect::info ( const QString &  text)
inlineprotectedinherited

Implementations should call this whenever status information should be given to the user.

This will cause statusInfo() to be emitted. Typically, this will cause the specified string to be displayed in a status bar, a log window or some similar non-blocking way so as not to disturb the workflow.

Definition at line 307 of file AbstractAspect.h.

307 { emit statusInfo(text); }

References AbstractAspect::statusInfo().

Referenced by AbstractAspect::addChild(), AbstractAspect::insertChild(), AbstractAspect::reparentChild(), and AbstractAspect::setName().

Here is the caller graph for this function:

◆ init()

void Column::init ( )
private

Definition at line 70 of file Column.cpp.

References AbstractAspect::addChild(), ColumnStringIO, d_column_private, d_string_io, AbstractFilter::input(), Column::Private::inputFilter(), and outputFilter().

Referenced by Column().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initPrivate() [1/4]

template<class D >
void Column::initPrivate ( std::unique_ptr< D >  ,
IntervalAttribute< bool >   
)
private

Referenced by Column().

Here is the caller graph for this function:

◆ initPrivate() [2/4]

template<>
void Column::initPrivate ( std::unique_ptr< QList< QDateTime > >  d,
IntervalAttribute< bool >  v 
)

Definition at line 64 of file Column.cpp.

65 {
67  (this, SciDAVis::TypeQDateTime, SciDAVis::DateTime, d.release(), v);
68 }

References d_column_private, SciDAVis::DateTime, Private, and SciDAVis::TypeQDateTime.

◆ initPrivate() [3/4]

template<>
void Column::initPrivate ( std::unique_ptr< QStringList >  d,
IntervalAttribute< bool >  v 
)

Definition at line 57 of file Column.cpp.

58 {
60  (this, SciDAVis::TypeQString, SciDAVis::Text, d.release(), v);
61 }

References d_column_private, Private, SciDAVis::Text, and SciDAVis::TypeQString.

◆ initPrivate() [4/4]

template<>
void Column::initPrivate ( std::unique_ptr< QVector< qreal > >  d,
IntervalAttribute< bool >  v 
)

Definition at line 50 of file Column.cpp.

51 {
53  (this, SciDAVis::TypeDouble, SciDAVis::Numeric, d.release(), v);
54 }

References d_column_private, SciDAVis::Numeric, Private, and SciDAVis::TypeDouble.

◆ insertChild()

void AbstractAspect::insertChild ( AbstractAspect child,
int  index 
)
inherited

Insert the given Aspect at a specific position in my list of children.

Definition at line 128 of file AbstractAspect.cpp.

129 {
130  Q_CHECK_PTR(child);
131  QString new_name = d_aspect_private->uniqueNameFor(child->name());
132  beginMacro(tr("%1: insert %2 at position %3.").arg(name()).arg(new_name).arg(index+1));
133  if (new_name != child->name()) {
134  info(tr("Renaming \"%1\" to \"%2\" in order to avoid name collision.").arg(child->name()).arg(new_name));
135  child->setName(new_name);
136  }
139  endMacro();
140 }

References AbstractAspect::beginMacro(), AbstractAspect::child(), AbstractAspect::completeAspectInsertion(), AbstractAspect::d_aspect_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::index(), AbstractAspect::info(), AbstractAspect::name(), AbstractAspect::setName(), and AbstractAspect::Private::uniqueNameFor().

Referenced by AbstractAspect::Private::addChild(), and future::Table::insertColumns().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertRows()

void Column::insertRows ( int  before,
int  count 
)
overridevirtual

Insert some empty (or initialized with zero) rows.

Reimplemented from AbstractColumn.

Definition at line 124 of file Column.cpp.

125 {
126  if(count > 0)
127  exec(new ColumnInsertEmptyRowsCmd(d_column_private, before, count));
128 }

References d_column_private, and AbstractAspect::exec().

Referenced by Table::applyFormula(), and future::Table::insertRows().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ invalidIntervals()

QList< Interval< int > > Column::invalidIntervals ( ) const
overridevirtual

Return all intervals of invalid rows.

Reimplemented from AbstractColumn.

Definition at line 608 of file Column.cpp.

609 {
611 }

References d_column_private, and Column::Private::invalidIntervals().

Here is the call graph for this function:

◆ isDescendantOf()

bool AbstractAspect::isDescendantOf ( AbstractAspect other)
inherited

Return whether the there is a path upwards to the given aspect.

This also returns true if other==this.

Definition at line 325 of file AbstractAspect.cpp.

326 {
327  if(other == this) return true;
328  AbstractAspect * parent_aspect = parentAspect();
329  while(parent_aspect)
330  {
331  if(parent_aspect == other) return true;
332  parent_aspect = parent_aspect->parentAspect();
333  }
334  return false;
335 }

References AbstractAspect::parentAspect().

Here is the call graph for this function:

◆ isInvalid() [1/2]

bool Column::isInvalid ( int  row) const
overridevirtual

Return whether a certain row contains an invalid value

Reimplemented from AbstractColumn.

Definition at line 598 of file Column.cpp.

599 {
600  return d_column_private->isInvalid(row);
601 }

References d_column_private, and Column::Private::isInvalid().

Referenced by Graph3D::addData(), Table::cell(), DataCurve::convertData(), TableModel::data(), ColumnStringIO::isInvalid(), BoxCurve::loadData(), QwtHistogram::loadData(), QwtPieCurve::loadData(), Graph::plotPie(), save(), TranslateCurveTool::selectDestination(), Graph::setLabelsTextFormat(), MuParserScript::tableCell_Function(), MuParserScript::tableCellFunction(), MuParserScript::tableColumn__Function(), MuParserScript::tableColumn_Function(), MuParserScript::tableColumnFunction(), future::Table::text(), TableStatistics::update(), Graph3D::updateDataXY(), Graph3D::updateDataXYZ(), and Graph3D::updateScales().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isInvalid() [2/2]

bool Column::isInvalid ( Interval< int >  i) const
overridevirtual

Return whether a certain interval of rows contains only invalid values

Reimplemented from AbstractColumn.

Definition at line 603 of file Column.cpp.

604 {
605  return d_column_private->isInvalid(i);
606 }

References d_column_private, and Column::Private::isInvalid().

Here is the call graph for this function:

◆ isMasked() [1/2]

bool Column::isMasked ( int  row) const
overridevirtual

Return whether a certain row is masked

Reimplemented from AbstractColumn.

Definition at line 613 of file Column.cpp.

614 {
615  return d_column_private->isMasked(row);
616 }

References d_column_private, and Column::Private::isMasked().

Referenced by TableModel::data(), and future::Table::sortColumns().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isMasked() [2/2]

bool Column::isMasked ( Interval< int >  i) const
overridevirtual

Return whether a certain interval of rows rows is fully masked

Reimplemented from AbstractColumn.

Definition at line 618 of file Column.cpp.

619 {
620  return d_column_private->isMasked(i);
621 }

References d_column_private, and Column::Private::isMasked().

Here is the call graph for this function:

◆ isReadOnly()

bool Column::isReadOnly ( ) const
inlineoverridevirtual

Return whether the object is read-only.

Reimplemented from AbstractColumn.

Definition at line 107 of file Column.h.

107 { return false; };

◆ load()

bool Column::load ( XmlStreamReader reader)
overridevirtual

Load the column from XML.

Reimplemented from AbstractAspect.

Definition at line 364 of file Column.cpp.

365 {
366  if(reader->isStartElement() && reader->name() == "column")
367  {
368  if (!readBasicAttributes(reader)) return false;
369 
370  QXmlStreamAttributes attribs = reader->attributes();
371  QString str;
372 
373  // read type
374  str = attribs.value(reader->namespaceUri().toString(), "type").toString();
375  if(str.isEmpty())
376  {
377  reader->raiseError(tr("column type missing"));
378  return false;
379  }
380  int type_code = SciDAVis::enumStringToValue(str, "ColumnDataType");
381  if(type_code == -1)
382  {
383  reader->raiseError(tr("column type invalid"));
384  return false;
385  }
386  // read mode
387  str = attribs.value(reader->namespaceUri().toString(), "mode").toString();
388  if(str.isEmpty())
389  {
390  reader->raiseError(tr("column mode missing"));
391  return false;
392  }
393  int mode_code = SciDAVis::enumStringToValue(str, "ColumnMode");
394  if(mode_code == -1)
395  {
396  reader->raiseError(tr("column mode invalid"));
397  return false;
398  }
400  if(type_code != int(dataType()))
401  {
402  reader->raiseError(tr("column type or mode invalid"));
403  return false;
404  }
405  // read plot designation
406  str = attribs.value(reader->namespaceUri().toString(), "plot_designation").toString();
407  int pd_code = SciDAVis::enumStringToValue(str, "PlotDesignation");
408  if(str.isEmpty())
410  else if(pd_code == -1)
411  {
412  reader->raiseError(tr("column plot designation invalid"));
413  return false;
414  }
415  else
417 
418  setComment("");
419  if (rowCount() > 0)
420  removeRows(0, rowCount());
421  clearValidity();
422  clearMasks();
423  clearFormulas();
424  // read child elements
425  while (!reader->atEnd())
426  {
427  reader->readNext();
428 
429  if (reader->isEndElement()) break;
430 
431  if (reader->isStartElement())
432  {
433  bool ret_val = true;
434  if (reader->name() == "comment")
435  ret_val = readCommentElement(reader);
436  else if(reader->name() == "input_filter")
437  ret_val = XmlReadInputFilter(reader);
438  else if(reader->name() == "output_filter")
439  ret_val = XmlReadOutputFilter(reader);
440  else if(reader->name() == "mask")
441  ret_val = XmlReadMask(reader);
442  else if(reader->name() == "formula")
443  ret_val = XmlReadFormula(reader);
444  else if(reader->name() == "row")
445  ret_val = XmlReadRow(reader);
446  else // unknown element
447  {
448  reader->raiseWarning(tr("unknown element '%1'").arg(reader->name().toString()));
449  if (!reader->skipToEndElement()) return false;
450  }
451  if(!ret_val)
452  return false;
453  }
454  }
455  }
456  else // no column element
457  reader->raiseError(tr("no column element found"));
458 
459  return !reader->error();
460 }

References clearFormulas(), clearMasks(), clearValidity(), dataType(), SciDAVis::enumStringToValue(), SciDAVis::noDesignation, XmlStreamReader::raiseError(), XmlStreamReader::raiseWarning(), AbstractAspect::readBasicAttributes(), AbstractAspect::readCommentElement(), removeRows(), rowCount(), setColumnMode(), AbstractAspect::setComment(), setPlotDesignation(), XmlStreamReader::skipToEndElement(), str, XmlReadFormula(), XmlReadInputFilter(), XmlReadMask(), XmlReadOutputFilter(), and XmlReadRow().

Referenced by future::Table::load(), future::Folder::readChildAspectElement(), and XmlReadOutputFilter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ maskedIntervals()

QList< Interval< int > > Column::maskedIntervals ( ) const
overridevirtual

Return all intervals of masked rows.

Reimplemented from AbstractColumn.

Definition at line 623 of file Column.cpp.

624 {
626 }

References d_column_private, and Column::Private::maskedIntervals().

Referenced by future::Table::copy(), and save().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ maskingAboutToChange

void AbstractColumn::maskingAboutToChange ( const AbstractColumn source)
signalinherited

IntervalAttribute related signal.

Referenced by AbstractSimpleFilter::clearMasks(), SimpleCopyThroughFilter::inputMaskingAboutToChange(), and AbstractSimpleFilter::setMasked().

Here is the caller graph for this function:

◆ maskingChanged

void AbstractColumn::maskingChanged ( const AbstractColumn source)
signalinherited

IntervalAttribute related signal.

Referenced by AbstractSimpleFilter::clearMasks(), SimpleCopyThroughFilter::inputMaskingChanged(), and AbstractSimpleFilter::setMasked().

Here is the caller graph for this function:

◆ modeAboutToChange

void AbstractColumn::modeAboutToChange ( const AbstractColumn source)
signalinherited

Column mode (possibly also the data type) will be changed.

'source' is always the this pointer of the column that emitted this signal. This way it's easier to use one handler for lots of columns.

Referenced by Column::Private::setColumnMode().

Here is the caller graph for this function:

◆ modeChanged

void AbstractColumn::modeChanged ( const AbstractColumn source)
signalinherited

Column mode (possibly also the data type) changed.

'source' is always the this pointer of the column that emitted this signal. This way it's easier to use one handler for lots of columns.

◆ moveChild()

void AbstractAspect::moveChild ( int  from,
int  to 
)
inherited

Change the positon of a child in my list of children.

Definition at line 196 of file AbstractAspect.cpp.

197 {
198  Q_ASSERT(0 <= from && from < d_aspect_private->childCount());
199  Q_ASSERT(0 <= to && to < d_aspect_private->childCount());
200  exec(new AspectChildMoveCmd(d_aspect_private, from, to));
201 }

References AbstractAspect::childCount(), AbstractAspect::d_aspect_private, and AbstractAspect::exec().

Referenced by future::Table::moveColumn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name()

QString AbstractAspect::name ( ) const
inherited

Definition at line 229 of file AbstractAspect.cpp.

230 {
231  return d_aspect_private->name();
232 }

References AbstractAspect::d_aspect_private, and AbstractAspect::Private::name().

Referenced by AbstractAspect::addChild(), future::Table::addColumn(), future::Matrix::addColumns(), future::Table::addColumns(), Filter::addResultCurve(), future::Matrix::addRows(), future::Table::addRows(), TableView::applyType(), AspectChildAddCmd::AspectChildAddCmd(), AspectChildRemoveCmd::AspectChildRemoveCmd(), AspectChildReparentCmd::AspectChildReparentCmd(), future::Matrix::clear(), future::Table::clear(), future::Table::clearMasks(), future::Matrix::clearSelectedCells(), future::Table::clearSelectedCells(), future::Matrix::clearSelectedColumns(), future::Table::clearSelectedColumns(), future::Matrix::clearSelectedRows(), Table::colLabel(), Table::colNames(), future::Table::column(), Table::columnsList(), future::Matrix::copy(), future::Table::copy(), future::Matrix::cutSelection(), future::Table::cutSelection(), DateTime2StringFilterSetFormatCmd::DateTime2StringFilterSetFormatCmd(), ApplicationWindow::defineErrorBars(), Double2StringFilterSetDigitsCmd::Double2StringFilterSetDigitsCmd(), Double2StringFilterSetFormatCmd::Double2StringFilterSetFormatCmd(), Table::drawableColumnSelection(), future::Matrix::duplicate(), future::Table::export_to_TeX(), future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), TableView::handleAspectAdded(), Matrix::handleAspectDescriptionChange(), Table::handleAspectDescriptionChange(), TableView::handleAspectDescriptionChanged(), Table::importASCII(), ApplicationWindow::importASCII(), Table::init(), AbstractAspect::insertChild(), future::Matrix::insertColumns(), future::Table::insertColumns(), future::Matrix::insertEmptyColumns(), future::Table::insertEmptyColumns(), future::Matrix::insertEmptyRows(), future::Table::insertEmptyRows(), future::Matrix::insertRows(), future::Table::insertRows(), future::Table::maskSelection(), future::Table::moveColumn(), Matrix::name(), future::Matrix::Private::name(), future::Table::Private::name(), future::Table::normalizeColumns(), future::Table::normalizeSelection(), Differentiation::output(), future::Matrix::pasteIntoSelection(), future::Table::pasteIntoSelection(), AbstractAspect::path(), AbstractAspect::readBasicAttributes(), future::Table::recalculateSelectedCells(), AbstractAspect::removeAllChildAspects(), AbstractAspect::removeChild(), future::Matrix::removeColumns(), future::Table::removeColumns(), future::Matrix::removeRows(), future::Table::removeRows(), future::Matrix::removeSelectedColumns(), future::Table::removeSelectedColumns(), future::Matrix::removeSelectedRows(), future::Table::removeSelectedRows(), AbstractAspect::reparentChild(), Table::selectedColumns(), Table::selectedErrColumns(), Table::selectedYColumns(), Table::selectedYLabels(), TableView::setColumnForControlTabs(), setColumnMode(), future::Matrix::setDimensions(), Graph::setLabelsTextFormat(), future::Table::setRowCount(), future::Table::setSelectionAs(), future::Table::showTeXTableExportDialog(), future::Table::sortColumns(), String2DateTimeFilterSetFormatCmd::String2DateTimeFilterSetFormatCmd(), TableMoveColumnCmd::TableMoveColumnCmd(), ApplicationWindow::tableWindows(), AbstractAspect::Private::uniqueNameFor(), future::Table::unmaskSelection(), AbstractAspect::writeBasicAttributes(), and Table::YColumns().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ notifyDisplayChange

void Column::notifyDisplayChange ( )
privateslot

Definition at line 638 of file Column.cpp.

639 {
640  emit dataChanged(this); // all cells must be repainted
641  emit aspectDescriptionChanged(this); // the icon for the type changed
642 }

References AbstractAspect::aspectDescriptionChanged(), and AbstractColumn::dataChanged().

Referenced by Column::Private::Private(), Column::Private::replaceModeData(), and Column::Private::setColumnMode().

Here is the caller graph for this function:

◆ notifyReplacement()

void Column::notifyReplacement ( const AbstractColumn replacement)
overridevirtual

This must be called before the column is replaced by another.

Reimplemented from AbstractColumn.

Definition at line 147 of file Column.cpp.

148 {
149  emit aboutToBeReplaced(this, replacement);
150 }

References AbstractColumn::aboutToBeReplaced().

◆ outputFilter()

AbstractSimpleFilter * Column::outputFilter ( ) const

Return the output filter (for data type -> string conversion)

This method is mainly used to get a filter that can convert the column's data type to strings (usualy to display in a view).

Definition at line 593 of file Column.cpp.

594 {
595  return d_column_private->outputFilter();
596 }

References d_column_private, and Column::Private::outputFilter().

Referenced by TableView::applyType(), Column(), Table::columnFormat(), DataCurve::convertData(), future::Table::copySelection(), ImportOPJ::importSpreadsheet(), init(), save(), TableView::setColumnForControlTabs(), Column::Private::setColumnMode(), setColumnMode(), future::Table::text(), and XmlReadOutputFilter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parentAspect()

AbstractAspect * AbstractAspect::parentAspect ( ) const
inherited

Return my parent Aspect or 0 if I currently don't have one.

Definition at line 109 of file AbstractAspect.cpp.

110 {
111  return d_aspect_private->parent();
112 }

References AbstractAspect::d_aspect_private, and AbstractAspect::Private::parent().

Referenced by DateTime2StringFilterSetFormatCmd::DateTime2StringFilterSetFormatCmd(), Double2StringFilterSetDigitsCmd::Double2StringFilterSetDigitsCmd(), Double2StringFilterSetFormatCmd::Double2StringFilterSetFormatCmd(), AbstractAspect::folder(), TableView::handleAspectAdded(), TableView::handleAspectDescriptionChanged(), AbstractAspect::index(), AbstractAspect::isDescendantOf(), AbstractAspect::path(), AbstractAspect::project(), AbstractAspect::remove(), Graph::setLabelsTextFormat(), String2DateTimeFilterSetFormatCmd::String2DateTimeFilterSetFormatCmd(), and AbstractAspect::undoStack().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ path()

virtual QString AbstractAspect::path ( ) const
inlinevirtualinherited

Return the path that leads from the top-most Aspect (usually a Project) to me.

Reimplemented in Project.

Definition at line 154 of file AbstractAspect.h.

154 { return parentAspect() ? parentAspect()->path() + "/" + name() : ""; }

References AbstractAspect::name(), AbstractAspect::parentAspect(), and AbstractAspect::path().

Referenced by AbstractAspect::path().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ plotDesignation()

SciDAVis::PlotDesignation Column::plotDesignation ( ) const
overridevirtual

Return the column plot designation.

Implements AbstractColumn.

Definition at line 588 of file Column.cpp.

589 {
591 }

References d_column_private, and Column::Private::plotDesignation().

Referenced by Table::colPlotDesignation(), future::Table::copy(), Table::drawableColumnSelection(), Table::firstXCol(), ColumnStringIO::plotDesignation(), Table::plotDesignations(), save(), Table::saveHeader(), Table::selectedErrColumns(), Table::selectedYColumns(), Table::selectedYLabels(), setPlotDesignation(), and Table::YColumns().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ plotDesignationAboutToChange

void AbstractColumn::plotDesignationAboutToChange ( const AbstractColumn source)
signalinherited

Column plot designation will be changed.

'source' is always the this pointer of the column that emitted this signal. This way it's easier to use one handler for lots of columns.

Referenced by AbstractSimpleFilter::inputPlotDesignationAboutToChange().

Here is the caller graph for this function:

◆ plotDesignationChanged

void AbstractColumn::plotDesignationChanged ( const AbstractColumn source)
signalinherited

Column plot designation changed.

'source' is always the this pointer of the column that emitted this signal. This way it's easier to use one handler for lots of columns.

Referenced by AbstractSimpleFilter::inputPlotDesignationChanged().

Here is the caller graph for this function:

◆ prepareAspectRemoval()

virtual void AbstractAspect::prepareAspectRemoval ( AbstractAspect aspect)
inlineprotectedvirtualinherited

Called before a child is removed.

Unlike the aspectAboutToBeRemoved() signals, this method does not get called inside undo/redo actions; allowing subclasses to execute undo commands of their own.

Reimplemented in future::Table.

Definition at line 300 of file AbstractAspect.h.

300 { Q_UNUSED(aspect); }

Referenced by AbstractAspect::removeChild(), and AbstractAspect::reparentChild().

Here is the caller graph for this function:

◆ project() [1/2]

virtual Project* AbstractAspect::project ( )
inlinevirtualinherited

Return the Project this Aspect belongs to, or 0 if it is currently not part of one.

Reimplemented in Project.

Definition at line 152 of file AbstractAspect.h.

152 { return parentAspect() ? parentAspect()->project() : 0; }

References AbstractAspect::parentAspect(), and AbstractAspect::project().

Here is the call graph for this function:

◆ project() [2/2]

virtual const Project* AbstractAspect::project ( ) const
inlinevirtualinherited

Return the Project this Aspect belongs to, or 0 if it is currently not part of one.

Reimplemented in Project.

Definition at line 150 of file AbstractAspect.h.

150 { return parentAspect() ? parentAspect()->project() : 0; }

References AbstractAspect::parentAspect(), and AbstractAspect::project().

Referenced by future::Folder::createContextMenu(), and AbstractAspect::project().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readBasicAttributes()

bool AbstractAspect::readBasicAttributes ( XmlStreamReader reader)
protectedinherited

Load name, creation time and caption spec from XML.

Returns
false on error

Definition at line 77 of file AbstractAspect.cpp.

78 {
79  QString prefix(tr("XML read error: ","prefix for XML error messages"));
80  QString postfix(tr(" (non-critical)", "postfix for XML error messages"));
81 
82  QXmlStreamAttributes attribs = reader->attributes();
83  QString str;
84 
85  // read name
86  str = attribs.value(reader->namespaceUri().toString(), "name").toString();
87  if(str.isEmpty())
88  {
89  reader->raiseWarning(prefix+tr("aspect name missing or empty")+postfix);
90  }
91  setName(str);
92  // read creation time
93  str = attribs.value(reader->namespaceUri().toString(), "creation_time").toString();
94  QDateTime creation_time = QDateTime::fromString(str, "yyyy-dd-MM hh:mm:ss:zzz");
95  if(str.isEmpty() || !creation_time.isValid())
96  {
97  reader->raiseWarning(tr("Invalid creation time for '%1'. Using current time.").arg(name()));
98  setCreationTime(QDateTime::currentDateTime());
99  }
100  else
101  setCreationTime(creation_time);
102  // read caption spec
103  str = attribs.value(reader->namespaceUri().toString(), "caption_spec").toString();
105 
106  return true;
107 }

References AbstractAspect::name(), XmlStreamReader::raiseWarning(), AbstractAspect::setCaptionSpec(), AbstractAspect::setCreationTime(), AbstractAspect::setName(), and str.

Referenced by future::Folder::load(), future::Matrix::load(), future::Table::load(), AbstractSimpleFilter::load(), and load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readCommentElement()

bool AbstractAspect::readCommentElement ( XmlStreamReader reader)
protectedinherited

Load comment from an XML element.

Definition at line 61 of file AbstractAspect.cpp.

62 {
63  Q_ASSERT(reader->isStartElement() && reader->name() == "comment");
64  QString temp = reader->readElementText();
65  temp.replace("\\n", "\n");
66  setComment(temp);
67  return true;
68 }

References AbstractAspect::setComment().

Referenced by future::Folder::load(), future::Matrix::load(), future::Table::load(), AbstractSimpleFilter::load(), and load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove

virtual void AbstractAspect::remove ( )
inlinevirtualslotinherited

Remove me from my parent's list of children.

Definition at line 250 of file AbstractAspect.h.

References AbstractAspect::indexOfChild(), AbstractAspect::parentAspect(), and AbstractAspect::removeChild().

Referenced by Matrix::closeEvent(), PartMdiView::closeEvent(), AbstractAspect::createContextMenu(), Table::importASCII(), Column::Private::removeRows(), and future::Matrix::Private::removeRows().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeAllChildAspects()

void AbstractAspect::removeAllChildAspects ( )
virtualinherited

Remove all child aspects.

Definition at line 352 of file AbstractAspect.cpp.

353 {
354  beginMacro(tr("%1: remove all children.").arg(name()));
355  for (int i=childCount()-1; i >= 0; i--)
356  removeChild(i);
357  endMacro();
358 }

References AbstractAspect::beginMacro(), AbstractAspect::childCount(), AbstractAspect::endMacro(), AbstractAspect::name(), and AbstractAspect::removeChild().

Referenced by future::Folder::load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeChild() [1/2]

void AbstractAspect::removeChild ( AbstractAspect child,
bool  detach = false 
)
inherited

Remove the given Aspect from my list of children.

Usually, the ownership of the child is transfered to the undo command, i.e., the aspect is deleted by the undo command. But by setting detach to true, you can remove a child from the Aspect tree without deleting it. Of course, that means whovere detaches an Aspect in responsible for deleting it (or re-attaching it somewhere in the tree).

See also
reparentChild()

Definition at line 142 of file AbstractAspect.cpp.

143 {
144  Q_ASSERT(indexOfChild(child) != -1);
145  beginMacro(tr("%1: remove %2.").arg(name()).arg(child->name()));
148  endMacro();
149 }

References AbstractAspect::beginMacro(), AbstractAspect::child(), AbstractAspect::d_aspect_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::indexOfChild(), AbstractAspect::name(), and AbstractAspect::prepareAspectRemoval().

Referenced by AbstractAspect::remove(), AbstractAspect::removeAllChildAspects(), AbstractAspect::removeChild(), future::Table::removeColumns(), ApplicationWindow::removeDependentTableStatistics(), and setColumnMode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeChild() [2/2]

void AbstractAspect::removeChild ( int  index)
inherited

Remove the Aspect at the given index from my list of children.

The ownership of the child is transfered to the undo command, i.e., the aspect is deleted by the undo command.

See also
reparentChild()

Definition at line 174 of file AbstractAspect.cpp.

175 {
176  Q_ASSERT(index >= 0 && index <= childCount());
178 }

References AbstractAspect::Private::child(), AbstractAspect::childCount(), AbstractAspect::d_aspect_private, AbstractAspect::index(), and AbstractAspect::removeChild().

Here is the call graph for this function:

◆ removeRows()

void Column::removeRows ( int  first,
int  count 
)
overridevirtual

Remove 'count' rows starting from row 'first'.

Reimplemented from AbstractColumn.

Definition at line 130 of file Column.cpp.

131 {
132  if(count > 0)
133  exec(new ColumnRemoveRowsCmd(d_column_private, first, count));
134 }

References d_column_private, and AbstractAspect::exec().

Referenced by Column::Private::clear(), future::Table::clearSelectedCells(), load(), future::Table::removeRows(), and future::Table::setRowCount().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reparentChild() [1/2]

void AbstractAspect::reparentChild ( AbstractAspect new_parent,
AbstractAspect child 
)
inherited

Move a child to another aspect and transfer ownership.

Definition at line 151 of file AbstractAspect.cpp.

152 {
153  Q_ASSERT(new_parent != NULL);
154  reparentChild(new_parent, child, new_parent->childCount());
155 }

References AbstractAspect::child(), AbstractAspect::childCount(), and AbstractAspect::reparentChild().

Here is the call graph for this function:

◆ reparentChild() [2/2]

void AbstractAspect::reparentChild ( AbstractAspect new_parent,
AbstractAspect child,
int  d_new_index 
)
inherited

Move a child to another aspect and transfer ownership.

Definition at line 157 of file AbstractAspect.cpp.

158 {
159  Q_ASSERT(indexOfChild(child) != -1);
160  Q_ASSERT(new_index > 0 && new_index <= new_parent->childCount());
161  Q_ASSERT(new_parent != NULL);
162  QString new_name = new_parent->d_aspect_private->uniqueNameFor(child->name());
163  beginMacro(tr("%1: move %2 to %3.").arg(name()).arg(child->name()).arg(new_parent->name()));
164  if (new_name != child->name()) {
165  info(tr("Renaming \"%1\" to \"%2\" in order to avoid name collision.").arg(child->name()).arg(new_name));
166  child->setName(new_name);
167  }
169  exec(new AspectChildReparentCmd(d_aspect_private, new_parent->d_aspect_private, child, new_index));
170  new_parent->completeAspectInsertion(child, new_index);
171  endMacro();
172 }

References AbstractAspect::beginMacro(), AbstractAspect::child(), AbstractAspect::childCount(), AbstractAspect::completeAspectInsertion(), AbstractAspect::d_aspect_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::indexOfChild(), AbstractAspect::info(), AbstractAspect::name(), AbstractAspect::prepareAspectRemoval(), AbstractAspect::setName(), and AbstractAspect::Private::uniqueNameFor().

Referenced by AbstractAspect::reparentChild().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ replaceDateTimes()

void Column::replaceDateTimes ( int  first,
const QList< QDateTime > &  new_values 
)
overridevirtual

Replace a range of values.

Use this only when dataType() is QDateTime

Reimplemented from AbstractColumn.

Definition at line 223 of file Column.cpp.

224 {
225  if (!new_values.isEmpty())
226  exec(new ColumnReplaceDateTimesCmd(d_column_private, first, new_values));
227 }

References d_column_private, and AbstractAspect::exec().

Referenced by future::Table::fillSelectedCellsWithRandomNumbers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ replaceTexts()

void Column::replaceTexts ( int  first,
const QStringList &  new_values 
)
overridevirtual

Replace a range of values.

Use this only when dataType() is QString

Reimplemented from AbstractColumn.

Definition at line 202 of file Column.cpp.

203 {
204  if (!new_values.isEmpty())
205  exec(new ColumnReplaceTextsCmd(d_column_private, first, new_values));
206 }

References d_column_private, and AbstractAspect::exec().

Referenced by future::Table::fillSelectedCellsWithRandomNumbers(), and future::Table::fillSelectedCellsWithRowNumbers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ replaceValues()

void Column::replaceValues ( int  first,
const QVector< qreal > &  new_values 
)
overridevirtual

Replace a range of values.

Use this only when dataType() is double

Reimplemented from AbstractColumn.

Definition at line 234 of file Column.cpp.

235 {
236  if (!new_values.isEmpty())
237  exec(new ColumnReplaceValuesCmd(d_column_private, first, new_values));
238 }

References d_column_private, and AbstractAspect::exec().

Referenced by future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), future::Table::normalizeColumns(), future::Table::normalizeSelection(), and Table::recalculate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rowCount()

int Column::rowCount ( ) const
overridevirtual

Return the data vector size.

This returns the number of rows that actually contain data. Rows beyond this can be masked etc. but should be ignored by filters, plots etc.

Implements AbstractColumn.

Definition at line 583 of file Column.cpp.

584 {
585  return d_column_private->rowCount();
586 }

References d_column_private, and Column::Private::rowCount().

Referenced by Table::applyFormula(), Column::Private::clear(), future::Table::clearSelectedCells(), DataCurve::convertData(), Column::Private::copy(), ApplicationWindow::importASCII(), Column::Private::insertRows(), load(), BoxCurve::loadData(), QwtHistogram::loadData(), QwtPieCurve::loadData(), future::Table::normalizeColumns(), future::Table::normalizeSelection(), Graph::plotPie(), Table::recalculate(), Column::Private::removeRows(), Column::Private::replaceDateTimes(), Column::Private::replaceTexts(), Column::Private::replaceValues(), Column::Private::resizeTo(), ColumnStringIO::rowCount(), save(), Column::Private::setDateTimeAt(), Graph::setLabelsTextFormat(), future::Table::setRowCount(), Column::Private::setTextAt(), Column::Private::setValueAt(), future::Table::sortColumns(), and TableStatistics::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rowsAboutToBeInserted

void AbstractColumn::rowsAboutToBeInserted ( const AbstractColumn source,
int  before,
int  count 
)
signalinherited

Rows will be inserted.

Parameters
sourcethe column that emitted the signal
beforethe row to insert before
countthe number of rows to be inserted

Referenced by AbstractSimpleFilter::inputRowsAboutToBeInserted().

Here is the caller graph for this function:

◆ rowsAboutToBeRemoved

void AbstractColumn::rowsAboutToBeRemoved ( const AbstractColumn source,
int  first,
int  count 
)
signalinherited

Rows will be deleted.

Parameters
sourcethe column that emitted the signal
firstthe first row to be deleted
countthe number of rows to be deleted

Referenced by AbstractSimpleFilter::inputRowsAboutToBeRemoved().

Here is the caller graph for this function:

◆ rowsInserted

void AbstractColumn::rowsInserted ( const AbstractColumn source,
int  before,
int  count 
)
signalinherited

Rows have been inserted.

Parameters
sourcethe column that emitted the signal
beforethe row to insert before
countthe number of rows to be inserted

Referenced by AbstractSimpleFilter::inputRowsInserted().

Here is the caller graph for this function:

◆ rowsRemoved

void AbstractColumn::rowsRemoved ( const AbstractColumn source,
int  first,
int  count 
)
signalinherited

Rows have been deleted.

Parameters
sourcethe column that emitted the signal
firstthe first row that was deleted
countthe number of deleted rows

Referenced by AbstractSimpleFilter::inputRowsRemoved().

Here is the caller graph for this function:

◆ save()

void Column::save ( QXmlStreamWriter *  writer) const
overridevirtual

Save the column as XML.

Reimplemented from AbstractAspect.

Definition at line 279 of file Column.cpp.

280 {
281  writer->writeStartElement("column");
282  writeBasicAttributes(writer);
283  writer->writeAttribute("type", SciDAVis::enumValueToString(dataType(), "ColumnDataType"));
284  writer->writeAttribute("mode", SciDAVis::enumValueToString(columnMode(), "ColumnMode"));
285  writer->writeAttribute("plot_designation", SciDAVis::enumValueToString(plotDesignation(), "PlotDesignation"));
286  writeCommentElement(writer);
287  writer->writeStartElement("input_filter");
288  d_column_private->inputFilter()->save(writer);
289  writer->writeEndElement();
290  writer->writeStartElement("output_filter");
291  outputFilter()->save(writer);
292  writer->writeEndElement();
293  QList< Interval<int> > masks = maskedIntervals();
294  foreach(Interval<int> interval, masks)
295  {
296  writer->writeStartElement("mask");
297  writer->writeAttribute("start_row", QString::number(interval.start()));
298  writer->writeAttribute("end_row", QString::number(interval.end()));
299  writer->writeEndElement();
300  }
301  QList< Interval<int> > formulas = formulaIntervals();
302  foreach(Interval<int> interval, formulas)
303  {
304  writer->writeStartElement("formula");
305  writer->writeAttribute("start_row", QString::number(interval.start()));
306  writer->writeAttribute("end_row", QString::number(interval.end()));
307  writer->writeCharacters(formula(interval.start()));
308  writer->writeEndElement();
309  }
310  int i;
311  switch(dataType())
312  {
314  for(i=0; i<rowCount(); i++)
315  {
316  writer->writeStartElement("row");
317  writer->writeAttribute("type", SciDAVis::enumValueToString(dataType(), "ColumnDataType"));
318  writer->writeAttribute("index", QString::number(i));
319  writer->writeAttribute("invalid", isInvalid(i) ? "yes" : "no");
320  writer->writeCharacters(QString::number(valueAt(i), 'e', 16));
321  writer->writeEndElement();
322  }
323  break;
325  for(i=0; i<rowCount(); i++)
326  {
327  writer->writeStartElement("row");
328  writer->writeAttribute("type", SciDAVis::enumValueToString(dataType(), "ColumnDataType"));
329  writer->writeAttribute("index", QString::number(i));
330  writer->writeAttribute("invalid", isInvalid(i) ? "yes" : "no");
331  writer->writeCharacters(textAt(i));
332  writer->writeEndElement();
333  }
334  break;
335 
337  for(i=0; i<rowCount(); i++)
338  {
339  writer->writeStartElement("row");
340  writer->writeAttribute("type", SciDAVis::enumValueToString(dataType(), "ColumnDataType"));
341  writer->writeAttribute("index", QString::number(i));
342  writer->writeAttribute("invalid", isInvalid(i) ? "yes" : "no");
343 #if QT_VERSION < 0x040400 // avoid a bug in Qt < 4.4
344  QString str = dateTimeAt(i).toString("yyyy-dd-MM hh:mm:ss:zzz");
345  int should_be_length = 4;
346  int actual_length = dateTimeAt(i).toString("yyyy").length();
347  while (actual_length < should_be_length)
348  {
349  str.prepend("0");
350  actual_length++;
351  }
352  writer->writeCharacters(str);
353 #else
354  writer->writeCharacters(dateTimeAt(i).toString("yyyy-dd-MM hh:mm:ss:zzz"));
355 #endif
356  writer->writeEndElement();
357  }
358  break;
359  }
360  writer->writeEndElement(); // "column"
361 }

References columnMode(), d_column_private, dataType(), dateTimeAt(), SciDAVis::enumValueToString(), formula(), formulaIntervals(), Column::Private::inputFilter(), isInvalid(), maskedIntervals(), outputFilter(), plotDesignation(), rowCount(), AbstractSimpleFilter::save(), str, textAt(), toString(), SciDAVis::TypeDouble, SciDAVis::TypeQDateTime, SciDAVis::TypeQString, valueAt(), AbstractAspect::writeBasicAttributes(), and AbstractAspect::writeCommentElement().

Referenced by future::Table::save().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCaptionSpec

void AbstractAspect::setCaptionSpec ( const QString &  value)
slotinherited

Set the specification string used for constructing the caption().

The caption is constructed by substituting some magic tokens in the specification:

Additionally, you can use the construct C{<text>}. <text> is only shown in the caption if comment() is not empty (name and creation time should never be empty).

The default caption specification is "%n%C{ - }%c".

Definition at line 276 of file AbstractAspect.cpp.

277 {
278  if (value == d_aspect_private->captionSpec()) return;
280 }

References AbstractAspect::Private::captionSpec(), AbstractAspect::d_aspect_private, and AbstractAspect::exec().

Referenced by future::Table::copy(), AbstractAspect::readBasicAttributes(), and Matrix::setCaptionPolicy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setColumnMode()

void Column::setColumnMode ( SciDAVis::ColumnMode  mode,
AbstractFilter conversion_filter = 0 
)
overridevirtual

Set the column mode.

This sets the column mode and, if necessary, converts it to another datatype.

Reimplemented from AbstractColumn.

Definition at line 85 of file Column.cpp.

86 {
87  if(mode == columnMode()) return;
88  beginMacro(QObject::tr("%1: change column type").arg(name()));
89  AbstractSimpleFilter * old_input_filter = d_column_private->inputFilter();
90  AbstractSimpleFilter * old_output_filter = outputFilter();
91  exec(new ColumnSetModeCmd(d_column_private, mode, conversion_filter));
92  if (d_column_private->inputFilter() != old_input_filter)
93  {
94  removeChild(old_input_filter);
97  }
98  if (outputFilter() != old_output_filter)
99  {
100  removeChild(old_output_filter);
102  outputFilter()->input(0, this);
103  }
104  endMacro();
105 }

References AbstractAspect::addChild(), AbstractAspect::beginMacro(), columnMode(), d_column_private, d_string_io, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractFilter::input(), Column::Private::inputFilter(), AbstractAspect::name(), outputFilter(), and AbstractAspect::removeChild().

Referenced by Table::addCol(), TableView::applyType(), ImportOPJ::importSpreadsheet(), load(), Fit::parametersTable(), future::Table::pasteIntoSelection(), Table::setColumnType(), and Table::setColumnTypes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setComment

void AbstractAspect::setComment ( const QString &  value)
slotinherited

Definition at line 265 of file AbstractAspect.cpp.

266 {
267  if (value == d_aspect_private->comment()) return;
269 }

References AbstractAspect::Private::comment(), AbstractAspect::d_aspect_private, and AbstractAspect::exec().

Referenced by future::Table::copy(), ImportOPJ::importSpreadsheet(), future::Folder::load(), future::Matrix::load(), future::Table::load(), load(), AbstractAspect::readCommentElement(), Table::setColComment(), Table::setColComments(), and Matrix::setWindowLabel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCreationTime()

void AbstractAspect::setCreationTime ( const QDateTime &  time)
protectedinherited

Set the creation time.

The creation time will automatically be set when the aspect object is created. This function is usually only needed when the aspect is loaded from a file.

Definition at line 282 of file AbstractAspect.cpp.

283 {
284  if (time == d_aspect_private->creationTime()) return;
286 }

References AbstractAspect::Private::creationTime(), AbstractAspect::d_aspect_private, and AbstractAspect::exec().

Referenced by AbstractAspect::importV0x0001XXCreationTime(), and AbstractAspect::readBasicAttributes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDateAt()

void Column::setDateAt ( int  row,
const QDate &  new_value 
)

Set the content of row 'row'.

Use this only when dataType() is QDateTime

Definition at line 208 of file Column.cpp.

209 {
210  setDateTimeAt(row, QDateTime(new_value, timeAt(row)));
211 }

References setDateTimeAt(), and timeAt().

Here is the call graph for this function:

◆ setDateTimeAt()

void Column::setDateTimeAt ( int  row,
const QDateTime &  new_value 
)

Set the content of row 'row'.

Use this only when dataType() is QDateTime

Definition at line 218 of file Column.cpp.

219 {
220  exec(new ColumnSetDateTimeCmd(d_column_private, row, new_value));
221 }

References d_column_private, and AbstractAspect::exec().

Referenced by Table::clearCell(), setDateAt(), Column::Private::setDateAt(), setTimeAt(), Column::Private::setTimeAt(), and XmlReadRow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFormula() [1/2]

void Column::setFormula ( int  row,
QString  formula 
)

Overloaded function for convenience.

Definition at line 187 of file Column.cpp.

188 {
189  setFormula(Interval<int>(row, row), formula);
190 }

References formula(), and setFormula().

Here is the call graph for this function:

◆ setFormula() [2/2]

void Column::setFormula ( Interval< int >  i,
QString  formula 
)

Set a formula string for an interval of rows.

Definition at line 182 of file Column.cpp.

183 {
185 }

References d_column_private, AbstractAspect::exec(), and formula().

Referenced by Table::applyFormula(), future::Table::clearSelectedCells(), future::Table::copy(), Table::handleAspectDescriptionChange(), ImportOPJ::importSpreadsheet(), future::Table::pasteIntoSelection(), Table::setCommand(), Table::setCommands(), TableModel::setData(), setFormula(), Column::Private::setFormula(), and XmlReadFormula().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGlobal()

void AbstractAspect::setGlobal ( const QString &  key,
const QVariant &  value 
)
staticinherited

Update a global setting.

Definition at line 370 of file AbstractAspect.cpp.

371 {
372  Private::g_settings->setValue(QString(staticMetaObject.className()) + "/" + key, value);
373 }

References AbstractAspect::Private::g_settings.

Referenced by ProjectConfigPage::apply(), and future::Matrix::importImageDialog().

Here is the caller graph for this function:

◆ setGlobalDefault()

void AbstractAspect::setGlobalDefault ( const QString &  key,
const QVariant &  value 
)
staticinherited

Set default value for a global setting.

Definition at line 375 of file AbstractAspect.cpp.

376 {
377  Private::g_defaults[QString(staticMetaObject.className()) + "/" + key] = value;
378 }

References AbstractAspect::Private::g_defaults.

◆ setInvalid() [1/2]

void Column::setInvalid ( int  row,
bool  invalid = true 
)

Overloaded function for convenience.

Definition at line 167 of file Column.cpp.

168 {
169  setInvalid(Interval<int>(row,row), invalid);
170 }

References setInvalid().

Here is the call graph for this function:

◆ setInvalid() [2/2]

void Column::setInvalid ( Interval< int >  i,
bool  invalid = true 
)

Set an interval invalid or valid.

Parameters
ithe interval
invalidtrue: set invalid, false: set valid

Definition at line 162 of file Column.cpp.

163 {
164  exec(new ColumnSetInvalidCmd(d_column_private, i, invalid));
165 }

References d_column_private, and AbstractAspect::exec().

Referenced by Table::clearCell(), future::Table::pasteIntoSelection(), DataPickerTool::removePoint(), setInvalid(), Column::Private::setInvalid(), TableStatistics::update(), and XmlReadRow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMasked() [1/2]

void Column::setMasked ( int  row,
bool  mask = true 
)

Overloaded function for convenience.

Definition at line 177 of file Column.cpp.

178 {
179  setMasked(Interval<int>(row,row), mask);
180 }

References setMasked().

Here is the call graph for this function:

◆ setMasked() [2/2]

void Column::setMasked ( Interval< int >  i,
bool  mask = true 
)

Set an interval masked.

Parameters
ithe interval
masktrue: mask, false: unmask

Definition at line 172 of file Column.cpp.

173 {
175 }

References d_column_private, and AbstractAspect::exec().

Referenced by future::Table::copy(), future::Table::maskSelection(), setMasked(), Column::Private::setMasked(), future::Table::sortColumns(), future::Table::unmaskSelection(), and XmlReadMask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setName

void AbstractAspect::setName ( const QString &  value)
slotinherited

Definition at line 234 of file AbstractAspect.cpp.

235 {
236  if (value.isEmpty()) {
237  setObjectName("1");
238  return;
239  }
240  if (value == d_aspect_private->name()) return;
241  // Until we get around to completely sanitizing the project file format, we have to remove
242  // characters that can easily break file save/restore.
243  // FIXME: once the project file format is fully XML-based (i.e. able to escape special characters),
244  // this can be removed
245  QString sanitized_value = value;
246  sanitized_value.remove(QChar('\n'));
247  sanitized_value.remove(QChar('\r'));
248  sanitized_value.remove(QChar('\t'));
249  if (sanitized_value != value)
250  info(tr("Tabs and line breaks in object names are currently not supported. They have been removed."));
251  if (d_aspect_private->parent()) {
252  QString new_name = d_aspect_private->parent()->uniqueNameFor(sanitized_value);
253  if (new_name != sanitized_value)
254  info(tr("Intended name \"%1\" diverted to \"%2\" in order to avoid name collision.").arg(sanitized_value).arg(new_name));
255  exec(new AspectNameChangeCmd(d_aspect_private, new_name));
256  } else
257  exec(new AspectNameChangeCmd(d_aspect_private, sanitized_value));
258 }

References AbstractAspect::d_aspect_private, AbstractAspect::exec(), AbstractAspect::info(), AbstractAspect::Private::name(), AbstractAspect::Private::parent(), and AbstractAspect::uniqueNameFor().

Referenced by AbstractAspect::addChild(), Table::importASCII(), ApplicationWindow::importASCII(), ImportOPJ::importSpreadsheet(), Table::importV0x0001XXHeader(), AbstractAspect::insertChild(), Column::Private::Private(), AbstractAspect::readBasicAttributes(), AbstractAspect::reparentChild(), Column::Private::replaceModeData(), Table::setColName(), Column::Private::setColumnMode(), Table::setHeader(), and Matrix::setName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPlotDesignation()

void Column::setPlotDesignation ( SciDAVis::PlotDesignation  pd)

Set the column plot designation.

Definition at line 136 of file Column.cpp.

137 {
138  if(pd != plotDesignation())
140 }

References d_column_private, AbstractAspect::exec(), and plotDesignation().

Referenced by Table::addCol(), Filter::addResultCurve(), LineProfileTool::calculateLineProfile(), future::Table::copy(), Graph::createTable(), ApplicationWindow::defineErrorBars(), Table::importASCII(), ApplicationWindow::importASCII(), Table::importV0x0001XXHeader(), future::Table::insertEmptyColumns(), load(), Differentiation::output(), Fit::parametersTable(), future::Table::pasteIntoSelection(), Table::setColPlotDesignation(), future::Table::setColumnCount(), future::Table::setSelectionAs(), and future::Table::Table().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTextAt()

void Column::setTextAt ( int  row,
const QString &  new_value 
)

Set the content of row 'row'.

Use this only when dataType() is QString

Definition at line 197 of file Column.cpp.

198 {
199  exec(new ColumnSetTextCmd(d_column_private, row, new_value));
200 }

References d_column_private, and AbstractAspect::exec().

Referenced by Table::clearCell(), ImportOPJ::importSpreadsheet(), Fit::parametersTable(), TableStatistics::renameCol(), TableStatistics::update(), and XmlReadRow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTimeAt()

void Column::setTimeAt ( int  row,
const QTime &  new_value 
)

Set the content of row 'row'.

Use this only when dataType() is QDateTime

Definition at line 213 of file Column.cpp.

214 {
215  setDateTimeAt(row, QDateTime(dateAt(row), new_value));
216 }

References dateAt(), and setDateTimeAt().

Here is the call graph for this function:

◆ setValueAt()

void Column::setValueAt ( int  row,
double  new_value 
)

Set the content of row 'row'.

Use this only when dataType() is double

Definition at line 229 of file Column.cpp.

230 {
231  exec(new ColumnSetValueCmd(d_column_private, row, new_value));
232 }

References d_column_private, and AbstractAspect::exec().

Referenced by Convolution::addResultCurve(), Correlation::addResultCurve(), Filter::addResultCurve(), LineProfileTool::calculateLineProfile(), Table::clearCell(), Graph::createTable(), ApplicationWindow::defineErrorBars(), DataPickerTool::end(), ImportOPJ::importSpreadsheet(), Differentiation::output(), Fit::parametersTable(), DataPickerTool::removePoint(), TranslateCurveTool::selectDestination(), Table::setCell(), PlotDialog::showStatistics(), TableStatistics::update(), and XmlReadRow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ statusInfo

void AbstractAspect::statusInfo ( const QString &  text)
signalinherited

Emit this to give status information to the user.

Referenced by AbstractAspect::info(), and AbstractAspect::Private::insertChild().

Here is the caller graph for this function:

◆ textAt()

QString Column::textAt ( int  row) const
overridevirtual

Return the content of row 'row'.

Use this only when dataType() is QString

Reimplemented from AbstractColumn.

Definition at line 240 of file Column.cpp.

241 {
242  return d_column_private->textAt(row);
243 }

References d_column_private, and Column::Private::textAt().

Referenced by Table::cell(), future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), BoxCurve::loadData(), QwtHistogram::loadData(), QwtPieCurve::loadData(), Graph::plotPie(), save(), Graph::setLabelsTextFormat(), and future::Table::sortColumns().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ timeAt()

QTime Column::timeAt ( int  row) const
overridevirtual

Return the time part of row 'row'.

Use this only when dataType() is QDateTime

Reimplemented from AbstractColumn.

Definition at line 250 of file Column.cpp.

251 {
252  return d_column_private->timeAt(row);
253 }

References d_column_private, and Column::Private::timeAt().

Referenced by DataCurve::convertData(), setDateAt(), and Column::Private::setDateAt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ undoStack()

virtual QUndoStack* AbstractAspect::undoStack ( ) const
inlinevirtualinherited

Return the undo stack of the Project, or 0 if this Aspect is not part of a Project.

It's also possible to construct undo-enabled Aspect trees without Project. The only requirement is that the root Aspect reimplements undoStack() to get the undo stack from somewhere (the default implementation just delegates to parentAspect()).

Reimplemented in Project.

Definition at line 182 of file AbstractAspect.h.

182 { return parentAspect() ? parentAspect()->undoStack() : 0; }

References AbstractAspect::parentAspect(), and AbstractAspect::undoStack().

Referenced by AbstractAspect::beginMacro(), AbstractAspect::endMacro(), AbstractAspect::exec(), and AbstractAspect::undoStack().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uniqueNameFor

QString AbstractAspect::uniqueNameFor ( const QString &  current_name) const
slotinherited

Make the specified name unique among my children by incrementing a trailing number.

Definition at line 337 of file AbstractAspect.cpp.

338 {
339  return d_aspect_private->uniqueNameFor(current_name);
340 }

References AbstractAspect::d_aspect_private, and AbstractAspect::Private::uniqueNameFor().

Referenced by AbstractAspect::setName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valueAt()

double Column::valueAt ( int  row) const
overridevirtual

Return the double value in row 'row'.

Reimplemented from AbstractColumn.

Definition at line 260 of file Column.cpp.

261 {
262  return d_column_private->valueAt(row);
263 }

References d_column_private, and Column::Private::valueAt().

Referenced by Table::cell(), future::Table::copySelection(), future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), BoxCurve::loadData(), QwtHistogram::loadData(), QwtPieCurve::loadData(), future::Table::normalizeColumns(), future::Table::normalizeSelection(), Graph::plotPie(), save(), future::Table::sortColumns(), MuParserScript::tableCell_Function(), MuParserScript::tableCellFunction(), MuParserScript::tableColumn__Function(), MuParserScript::tableColumn_Function(), MuParserScript::tableColumnFunction(), and TableStatistics::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeBasicAttributes()

void AbstractAspect::writeBasicAttributes ( QXmlStreamWriter *  writer) const
protectedinherited

Save name, creation time and caption spec to XML.

Definition at line 70 of file AbstractAspect.cpp.

71 {
72  writer->writeAttribute("creation_time" , creationTime().toString("yyyy-dd-MM hh:mm:ss:zzz"));
73  writer->writeAttribute("caption_spec", captionSpec());
74  writer->writeAttribute("name", name());
75 }

References AbstractAspect::captionSpec(), AbstractAspect::creationTime(), AbstractAspect::name(), and toString().

Referenced by future::Folder::save(), future::Matrix::save(), future::Table::save(), AbstractSimpleFilter::save(), and save().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeCommentElement()

void AbstractAspect::writeCommentElement ( QXmlStreamWriter *  writer) const
protectedinherited

Save the comment to XML.

Definition at line 52 of file AbstractAspect.cpp.

53 {
54  writer->writeStartElement("comment");
55  QString temp = comment();
56  temp.replace("\n", "\\n");
57  writer->writeCDATA(temp);
58  writer->writeEndElement();
59 }

References AbstractAspect::comment().

Referenced by future::Folder::save(), future::Matrix::save(), future::Table::save(), AbstractSimpleFilter::save(), and save().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ XmlReadFormula()

bool Column::XmlReadFormula ( XmlStreamReader reader)
private

Read XML formula element.

Definition at line 501 of file Column.cpp.

502 {
503  Q_ASSERT(reader->isStartElement() && reader->name() == "formula");
504 
505  bool ok1, ok2;
506  int start, end;
507  start = reader->readAttributeInt("start_row", &ok1);
508  end = reader->readAttributeInt("end_row", &ok2);
509  if(!ok1 || !ok2)
510  {
511  reader->raiseError(tr("invalid or missing start or end row"));
512  return false;
513  }
514  setFormula(Interval<int>(start,end), reader->readElementText());
515 
516  return true;
517 }

References XmlStreamReader::raiseError(), XmlStreamReader::readAttributeInt(), and setFormula().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ XmlReadInputFilter()

bool Column::XmlReadInputFilter ( XmlStreamReader reader)
private

Read XML input filter element.

Definition at line 462 of file Column.cpp.

463 {
464  Q_ASSERT(reader->isStartElement() && reader->name() == "input_filter");
465  if (!reader->skipToNextTag()) return false;
466  if (!d_column_private->inputFilter()->load(reader)) return false;
467  if (!reader->skipToNextTag()) return false;
468  Q_ASSERT(reader->isEndElement() && reader->name() == "input_filter");
469  return true;
470 }

References d_column_private, Column::Private::inputFilter(), AbstractSimpleFilter::load(), and XmlStreamReader::skipToNextTag().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ XmlReadMask()

bool Column::XmlReadMask ( XmlStreamReader reader)
private

Read XML mask element.

Definition at line 482 of file Column.cpp.

483 {
484  Q_ASSERT(reader->isStartElement() && reader->name() == "mask");
485 
486  bool ok1, ok2;
487  int start, end;
488  start = reader->readAttributeInt("start_row", &ok1);
489  end = reader->readAttributeInt("end_row", &ok2);
490  if(!ok1 || !ok2)
491  {
492  reader->raiseError(tr("invalid or missing start or end row"));
493  return false;
494  }
495  setMasked(Interval<int>(start,end));
496  if (!reader->skipToEndElement()) return false;
497 
498  return true;
499 }

References XmlStreamReader::raiseError(), XmlStreamReader::readAttributeInt(), setMasked(), and XmlStreamReader::skipToEndElement().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ XmlReadOutputFilter()

bool Column::XmlReadOutputFilter ( XmlStreamReader reader)
private

Read XML output filter element.

Definition at line 472 of file Column.cpp.

473 {
474  Q_ASSERT(reader->isStartElement() && reader->name() == "output_filter");
475  if (!reader->skipToNextTag()) return false;
476  if (!outputFilter()->load(reader)) return false;
477  if (!reader->skipToNextTag()) return false;
478  Q_ASSERT(reader->isEndElement() && reader->name() == "output_filter");
479  return true;
480 }

References load(), outputFilter(), and XmlStreamReader::skipToNextTag().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ XmlReadRow()

bool Column::XmlReadRow ( XmlStreamReader reader)
private

Read XML row element.

Definition at line 519 of file Column.cpp.

520 {
521  Q_ASSERT(reader->isStartElement() && reader->name() == "row");
522 
523  QString str;
524  int type_code;
525 
526  QXmlStreamAttributes attribs = reader->attributes();
527  // verfiy type
528  str = attribs.value(reader->namespaceUri().toString(), "type").toString();
529  type_code = SciDAVis::enumStringToValue(str, "ColumnDataType");
530  if(str.isEmpty() || type_code == -1 || type_code != int(dataType()))
531  {
532  reader->raiseError(tr("invalid or missing row type"));
533  return false;
534  }
535 
536  bool ok;
537  int index = reader->readAttributeInt("index", &ok);
538  if(!ok)
539  {
540  reader->raiseError(tr("invalid or missing row index"));
541  return false;
542  }
543 
544  str = reader->readElementText();
545  switch(dataType())
546  {
548  {
549  double value = str.toDouble(&ok);
550  if(!ok)
551  {
552  reader->raiseError(tr("invalid row value"));
553  return false;
554  }
555  setValueAt(index, value);
556  break;
557  }
559  setTextAt(index, str);
560  break;
561 
563  QDateTime date_time = QDateTime::fromString(str,"yyyy-dd-MM hh:mm:ss:zzz");
564  setDateTimeAt(index, date_time);
565  break;
566  }
567 
568  str = attribs.value(reader->namespaceUri().toString(), "invalid").toString();
569  if(str == "yes") setInvalid(index);
570 
571 
572  return true;
573 }

References dataType(), SciDAVis::enumStringToValue(), AbstractAspect::index(), XmlStreamReader::raiseError(), XmlStreamReader::readAttributeInt(), setDateTimeAt(), setInvalid(), setTextAt(), setValueAt(), str, SciDAVis::TypeDouble, SciDAVis::TypeQDateTime, and SciDAVis::TypeQString.

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ ColumnStringIO

friend class ColumnStringIO
friend

Definition at line 326 of file Column.h.

Referenced by Column(), and init().

◆ Private

friend class Private
friend

Member Data Documentation

◆ d_aspect_private

◆ d_column_private

◆ d_string_io

ColumnStringIO* Column::d_string_io
private

Definition at line 320 of file Column.h.

Referenced by asStringColumn(), Column(), init(), setColumnMode(), and ~Column().


The documentation for this class was generated from the following files:
ColumnClearCmd
Clear the column.
Definition: columncommands.h:302
AspectNameChangeCmd
Definition: aspectcommands.h:36
Column::Private::outputFilter
AbstractSimpleFilter * outputFilter() const
Return the output filter (for data type -> string conversion)
Definition: ColumnPrivate.h:148
AbstractFilter::input
bool input(int port, const AbstractColumn *source)
Connect the provided data source to the specified input port.
Definition: AbstractFilter.cpp:31
AbstractAspect::Private::comment
QString comment() const
Definition: AspectPrivate.cpp:134
AbstractAspect::writeCommentElement
void writeCommentElement(QXmlStreamWriter *writer) const
Save the comment to XML.
Definition: AbstractAspect.cpp:52
Column::dateTimeAt
QDateTime dateTimeAt(int row) const override
Return the QDateTime in row 'row'.
Definition: Column.cpp:255
AbstractAspect::reparentChild
void reparentChild(AbstractAspect *new_parent, AbstractAspect *child, int d_new_index)
Move a child to another aspect and transfer ownership.
Definition: AbstractAspect.cpp:157
XmlStreamReader::skipToNextTag
bool skipToNextTag()
Go to the next start or end element tag.
Definition: XmlStreamReader.cpp:92
Column::Private::isMasked
bool isMasked(int row) const
Return whether a certain row is masked
Definition: ColumnPrivate.h:177
Column::outputFilter
AbstractSimpleFilter * outputFilter() const
Return the output filter (for data type -> string conversion)
Definition: Column.cpp:593
AbstractAspect::Private::captionSpec
QString captionSpec() const
Definition: AspectPrivate.cpp:146
AbstractAspect::Private::caption
QString caption() const
Definition: AspectPrivate.cpp:171
Column::XmlReadInputFilter
bool XmlReadInputFilter(XmlStreamReader *reader)
Read XML input filter element.
Definition: Column.cpp:462
AbstractAspect::exec
void exec(QUndoCommand *command)
Execute the given command, pushing it on the undoStack() if available.
Definition: AbstractAspect.cpp:203
XmlStreamReader::raiseError
void raiseError(const QString &message=QString())
Definition: XmlStreamReader.cpp:80
SciDAVis::TypeQString
@ TypeQString
Definition: globals.h:79
data
Definition: exp_saturation.c:37
ColumnReplaceTextsCmd
Replace a range of strings in a string column.
Definition: columncommands.h:639
XmlStreamReader::readAttributeInt
int readAttributeInt(const QString &name, bool *ok)
Read an XML attribute and convert it to int.
Definition: XmlStreamReader.cpp:110
str
#define str(x)
Definition: PythonScripting.cpp:41
Column::maskedIntervals
QList< Interval< int > > maskedIntervals() const override
Return all intervals of masked rows.
Definition: Column.cpp:623
AbstractAspect::setComment
void setComment(const QString &value)
Definition: AbstractAspect.cpp:265
SciDAVis::noDesignation
@ noDesignation
no plot designation
Definition: globals.h:56
AbstractAspect::Private::uniqueNameFor
QString uniqueNameFor(const QString &current_name) const
Definition: AspectPrivate.cpp:201
AbstractAspect::Private::childCount
int childCount() const
Definition: AspectPrivate.cpp:111
AbstractAspect::index
int index() const
Return my position in my parent's list of children.
Definition: AbstractAspect.h:137
AbstractAspect::creationTime
QDateTime creationTime() const
Definition: AbstractAspect.cpp:288
AspectChildAddCmd
Definition: aspectcommands.h:154
ColumnSetInvalidCmd
Mark an interval of rows as invalid.
Definition: columncommands.h:399
ColumnClearMasksCmd
Clear validity information.
Definition: columncommands.h:369
AbstractColumn::AbstractColumn
AbstractColumn(const QString &name)
Ctor.
Definition: AbstractColumn.h:87
Column::Private::dateTimeAt
QDateTime dateTimeAt(int row) const
Return the QDateTime in row 'row'.
Definition: ColumnPrivate.cpp:830
Column::Private::plotDesignation
SciDAVis::PlotDesignation plotDesignation() const
Return the column plot designation.
Definition: ColumnPrivate.h:138
Column::Private
friend class Private
Definition: Column.h:63
AbstractColumn::dataType
virtual SciDAVis::ColumnDataType dataType() const =0
Return the data type of the column.
toString
S toString(const QString &x)
Deal with conversion between QString and std::string/std::wstring in a generic way.
AspectChildMoveCmd
Definition: aspectcommands.h:168
AbstractAspect::d_aspect_private
Private * d_aspect_private
Definition: AbstractAspect.h:310
Column::timeAt
QTime timeAt(int row) const override
Return the time part of row 'row'.
Definition: Column.cpp:250
ColumnReplaceDateTimesCmd
Replace a range of date-times in a date-time column.
Definition: columncommands.h:715
Column::formulaIntervals
QList< Interval< int > > formulaIntervals() const override
Return the intervals that have associated formulas.
Definition: Column.cpp:633
Column::Private::dateAt
QDate dateAt(int row) const
Return the date part of row 'row'.
Definition: ColumnPrivate.cpp:820
Column::Private::inputFilter
AbstractSimpleFilter * inputFilter() const
Return the input filter (for string -> data type conversion)
Definition: ColumnPrivate.h:146
AbstractAspect::descendantsThatInherit
QList< AbstractAspect * > descendantsThatInherit(const char *class_name)
Get all descendents that inherit the given class.
Definition: AbstractAspect.cpp:342
future::Folder
Folder in a project.
Definition: future_Folder.h:38
Column::Private::valueAt
double valueAt(int row) const
Return the double value in row 'row'.
Definition: ColumnPrivate.cpp:836
AbstractAspect::uniqueNameFor
QString uniqueNameFor(const QString &current_name) const
Make the specified name unique among my children by incrementing a trailing number.
Definition: AbstractAspect.cpp:337
Column::clearValidity
void clearValidity() override
Clear all validity information.
Definition: Column.cpp:152
Column::setColumnMode
void setColumnMode(SciDAVis::ColumnMode mode, AbstractFilter *conversion_filter=0) override
Set the column mode.
Definition: Column.cpp:85
AbstractAspect::Private::indexOfChild
int indexOfChild(const AbstractAspect *child) const
Definition: AspectPrivate.cpp:91
Column::removeRows
void removeRows(int first, int count) override
Remove 'count' rows starting from row 'first'.
Definition: Column.cpp:130
Column::setPlotDesignation
void setPlotDesignation(SciDAVis::PlotDesignation pd)
Set the column plot designation.
Definition: Column.cpp:136
Column::setFormula
void setFormula(Interval< int > i, QString formula)
Set a formula string for an interval of rows.
Definition: Column.cpp:182
ColumnInsertEmptyRowsCmd
Insert empty rows.
Definition: columncommands.h:196
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
ColumnReplaceValuesCmd
Replace a range of doubles in a double column.
Definition: columncommands.h:677
XmlStreamReader::skipToEndElement
bool skipToEndElement()
Go to the end element tag of the current element.
Definition: XmlStreamReader.cpp:121
AbstractAspect::indexOfChild
int indexOfChild(const AbstractAspect *child) const
Return the position of child in my list of children.
Definition: AbstractAspect.cpp:191
Column::isInvalid
bool isInvalid(int row) const override
Return whether a certain row contains an invalid value
Definition: Column.cpp:598
Column::d_string_io
ColumnStringIO * d_string_io
Definition: Column.h:320
SciDAVis::enumStringToValue
static int enumStringToValue(const QString &string, const QString &enum_name)
Definition: globals.cpp:192
Column::rowCount
int rowCount() const override
Return the data vector size.
Definition: Column.cpp:583
AbstractAspect::endMacro
void endMacro()
End the undo stack macro.
Definition: AbstractAspect.cpp:222
AbstractAspect::captionSpec
QString captionSpec() const
Return the specification string used for constructing the caption().
Definition: AbstractAspect.cpp:271
AbstractAspect::Private::g_defaults
static QHash< QString, QVariant > g_defaults
Definition: AspectPrivate.h:70
AbstractAspect::beginMacro
void beginMacro(const QString &text)
Begin an undo stack macro (series of commands)
Definition: AbstractAspect.cpp:215
AbstractAspect::statusInfo
void statusInfo(const QString &text)
Emit this to give status information to the user.
AbstractSimpleFilter::save
virtual void save(QXmlStreamWriter *writer) const
Save to XML.
Definition: AbstractSimpleFilter.cpp:125
AspectCaptionSpecChangeCmd
Definition: aspectcommands.h:78
AspectCommentChangeCmd
Definition: aspectcommands.h:57
ColumnSetDateTimeCmd
Set the value of a date-time cell.
Definition: columncommands.h:603
Column::d_column_private
Private * d_column_private
Pointer to the private data object.
Definition: Column.h:319
AbstractAspect::childCount
int childCount() const
Return the number of child Aspects.
Definition: AbstractAspect.cpp:186
Column::clearFormulas
void clearFormulas() override
Clear all formulas.
Definition: Column.cpp:192
AbstractAspect::completeAspectInsertion
virtual void completeAspectInsertion(AbstractAspect *aspect, int index)
Called after a new child has been inserted or added.
Definition: AbstractAspect.h:294
Column::load
bool load(XmlStreamReader *reader) override
Load the column from XML.
Definition: Column.cpp:364
AbstractAspect::name
QString name() const
Definition: AbstractAspect.cpp:229
Column::columnMode
SciDAVis::ColumnMode columnMode() const override
Return the column mode.
Definition: Column.cpp:579
AbstractAspect::path
virtual QString path() const
Return the path that leads from the top-most Aspect (usually a Project) to me.
Definition: AbstractAspect.h:154
AbstractAspect::readBasicAttributes
bool readBasicAttributes(XmlStreamReader *reader)
Load name, creation time and caption spec from XML.
Definition: AbstractAspect.cpp:77
AbstractAspect::child
AbstractAspect * child(int index) const
Get a child by its position in my list of children.
Definition: AbstractAspect.cpp:180
Column::Private::dataType
SciDAVis::ColumnDataType dataType() const
Return the data type of the column.
Definition: ColumnPrivate.h:55
Column::setMasked
void setMasked(Interval< int > i, bool mask=true)
Set an interval masked.
Definition: Column.cpp:172
Column::XmlReadFormula
bool XmlReadFormula(XmlStreamReader *reader)
Read XML formula element.
Definition: Column.cpp:501
Column::Private::invalidIntervals
QList< Interval< int > > invalidIntervals() const
Return all intervals of invalid rows.
Definition: ColumnPrivate.h:175
AbstractAspect::Private::name
QString name() const
Definition: AspectPrivate.cpp:122
AbstractAspect::undoStack
virtual QUndoStack * undoStack() const
Return the undo stack of the Project, or 0 if this Aspect is not part of a Project.
Definition: AbstractAspect.h:182
SciDAVis::Text
@ Text
column contains strings
Definition: globals.h:68
Column::init
void init()
Definition: Column.cpp:70
AspectChildReparentCmd
Definition: aspectcommands.h:195
Column::dataType
SciDAVis::ColumnDataType dataType() const override
Return the data type of the column.
Definition: Column.cpp:574
AbstractAspect::parentAspect
AbstractAspect * parentAspect() const
Return my parent Aspect or 0 if I currently don't have one.
Definition: AbstractAspect.cpp:109
Column::XmlReadRow
bool XmlReadRow(XmlStreamReader *reader)
Read XML row element.
Definition: Column.cpp:519
ColumnSetPlotDesignationCmd
Sets a column's plot designation.
Definition: columncommands.h:272
ColumnSetTextCmd
Set the text for a string cell.
Definition: columncommands.h:531
AbstractAspect::aspectDescriptionChanged
void aspectDescriptionChanged(const AbstractAspect *aspect)
Emit this when the name, comment or caption spec changed.
SciDAVis::DateTime
@ DateTime
column contains dates and/or times
Definition: globals.h:71
AbstractAspect::writeBasicAttributes
void writeBasicAttributes(QXmlStreamWriter *writer) const
Save name, creation time and caption spec to XML.
Definition: AbstractAspect.cpp:70
Column::formula
QString formula(int row) const override
Return the formula associated with row 'row'
Definition: Column.cpp:628
SciDAVis::TypeDouble
@ TypeDouble
Definition: globals.h:78
AbstractAspect::removeChild
void removeChild(AbstractAspect *child, bool detach=false)
Remove the given Aspect from my list of children.
Definition: AbstractAspect.cpp:142
Column::Private::textAt
QString textAt(int row) const
Return the content of row 'row'.
Definition: ColumnPrivate.cpp:814
AbstractSimpleFilter::load
virtual bool load(XmlStreamReader *reader)
Load from XML.
Definition: AbstractSimpleFilter.cpp:135
AbstractAspect::Private::creationTime
QDateTime creationTime() const
Definition: AspectPrivate.cpp:196
AbstractAspect::project
virtual const Project * project() const
Return the Project this Aspect belongs to, or 0 if it is currently not part of one.
Definition: AbstractAspect.h:150
AbstractAspect::setCaptionSpec
void setCaptionSpec(const QString &value)
Set the specification string used for constructing the caption().
Definition: AbstractAspect.cpp:276
Column::plotDesignation
SciDAVis::PlotDesignation plotDesignation() const override
Return the column plot designation.
Definition: Column.cpp:588
AbstractAspect::Private::parent
AbstractAspect * parent()
Definition: AspectPrivate.h:65
Column::Private::timeAt
QTime timeAt(int row) const
Return the time part of row 'row'.
Definition: ColumnPrivate.cpp:825
AbstractAspect::setName
void setName(const QString &value)
Definition: AbstractAspect.cpp:234
Column::Private::maskedIntervals
QList< Interval< int > > maskedIntervals() const
Return all intervals of masked rows.
Definition: ColumnPrivate.h:181
AbstractAspect::comment
QString comment() const
Definition: AbstractAspect.cpp:260
ColumnPartialCopyCmd
Copy parts of a column.
Definition: columncommands.h:138
Column::XmlReadMask
bool XmlReadMask(XmlStreamReader *reader)
Read XML mask element.
Definition: Column.cpp:482
AbstractColumn::aboutToBeReplaced
void aboutToBeReplaced(const AbstractColumn *source, const AbstractColumn *new_col)
The column will be replaced.
AspectChildRemoveCmd
Definition: aspectcommands.h:122
Column::ColumnStringIO
friend class ColumnStringIO
Definition: Column.h:326
SciDAVis::PlotDesignation
PlotDesignation
Types of plot designations.
Definition: globals.h:55
AbstractAspect::Private::child
AbstractAspect * child(int index)
Definition: AspectPrivate.cpp:116
AbstractAspect::addChild
void addChild(AbstractAspect *child)
Add the given Aspect to my list of children.
Definition: AbstractAspect.cpp:114
Column::clearMasks
void clearMasks() override
Clear all masking information.
Definition: Column.cpp:157
ColumnSetFormulaCmd
Set the formula for a given interval.
Definition: columncommands.h:467
AbstractAspect::remove
virtual void remove()
Remove me from my parent's list of children.
Definition: AbstractAspect.h:250
Column::dateAt
QDate dateAt(int row) const override
Return the date part of row 'row'.
Definition: Column.cpp:245
ColumnRemoveRowsCmd
Definition: columncommands.h:226
ColumnFullCopyCmd
Copy a complete column.
Definition: columncommands.h:101
AbstractSimpleFilter
Simplified filter interface for filters with only one output port.
Definition: AbstractSimpleFilter.h:129
Column::XmlReadOutputFilter
bool XmlReadOutputFilter(XmlStreamReader *reader)
Read XML output filter element.
Definition: Column.cpp:472
SciDAVis::TypeQDateTime
@ TypeQDateTime
Definition: globals.h:80
AbstractAspect::setCreationTime
void setCreationTime(const QDateTime &time)
Set the creation time.
Definition: AbstractAspect.cpp:282
SciDAVis::Numeric
@ Numeric
column contains doubles
Definition: globals.h:67
ColumnClearFormulasCmd
Clear all associated formulas.
Definition: columncommands.h:501
ColumnSetValueCmd
Set the value for a double cell.
Definition: columncommands.h:567
XmlStreamReader::raiseWarning
void raiseWarning(const QString &message=QString())
Definition: XmlStreamReader.cpp:86
Interval< int >
Column::Private::formulaIntervals
QList< Interval< int > > formulaIntervals() const
Return the intervals that have associated formulas.
Definition: ColumnPrivate.h:220
Column::textAt
QString textAt(int row) const override
Return the content of row 'row'.
Definition: Column.cpp:240
ColumnSetModeCmd
Set the column mode.
Definition: columncommands.h:44
Column::valueAt
double valueAt(int row) const override
Return the double value in row 'row'.
Definition: Column.cpp:260
Column::setTextAt
void setTextAt(int row, const QString &new_value)
Set the content of row 'row'.
Definition: Column.cpp:197
Column::initPrivate
void initPrivate(std::unique_ptr< D >, IntervalAttribute< bool >)
AbstractColumn::dataChanged
void dataChanged(const AbstractColumn *source)
Data (including validity) of the column has changed.
AbstractAspect::Private::g_settings
static QSettings * g_settings
Definition: AspectPrivate.h:69
Column::Private::formula
QString formula(int row) const
Return the formula associated with row 'row'
Definition: ColumnPrivate.h:207
SciDAVis::enumValueToString
static QString enumValueToString(int key, const QString &enum_name)
Definition: globals.cpp:184
AbstractAspect::readCommentElement
bool readCommentElement(XmlStreamReader *reader)
Load comment from an XML element.
Definition: AbstractAspect.cpp:61
Column::Private::rowCount
int rowCount() const
Return the data vector size.
Definition: ColumnPrivate.cpp:628
AbstractAspect
Base class of all persistent objects in a Project.
Definition: AbstractAspect.h:86
Column::setDateTimeAt
void setDateTimeAt(int row, const QDateTime &new_value)
Set the content of row 'row'.
Definition: Column.cpp:218
AbstractAspect::prepareAspectRemoval
virtual void prepareAspectRemoval(AbstractAspect *aspect)
Called before a child is removed.
Definition: AbstractAspect.h:300
AspectCreationTimeChangeCmd
Definition: aspectcommands.h:100
Column::Private::columnMode
SciDAVis::ColumnMode columnMode() const
Return the column mode.
Definition: ColumnPrivate.h:64
Column::setValueAt
void setValueAt(int row, double new_value)
Set the content of row 'row'.
Definition: Column.cpp:229
ColumnClearValidityCmd
Clear validity information.
Definition: columncommands.h:339
ColumnSetMaskedCmd
Mark an interval of rows as masked.
Definition: columncommands.h:433
Column::setInvalid
void setInvalid(Interval< int > i, bool invalid=true)
Set an interval invalid or valid.
Definition: Column.cpp:162
AbstractAspect::info
void info(const QString &text)
Implementations should call this whenever status information should be given to the user.
Definition: AbstractAspect.h:307