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)  

String2DateTimeFilter Class Reference

Conversion filter QString -> QDateTime. More...

#include <String2DateTimeFilter.h>

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

Public Member Functions

 String2DateTimeFilter (QString format="yyyy-MM-dd hh:mm:ss.zzz")
 Standard constructor. More...
 
void setFormat (const QString &format)
 Set the format string to be used for conversion. More...
 
QString format () const
 Return the format string. More...
 
virtual SciDAVis::ColumnDataType dataType () const
 Return the data type of the column. More...
 
virtual int inputCount () const
 Default to one input port. More...
 
virtual int outputCount () const
 We manage only one output port (don't override unless you really know what you are doing). More...
 
virtual AbstractColumnoutput (int port)
 Return a pointer to d_output_column on port 0 (don't override unless you really know what you are doing). More...
 
virtual const AbstractColumnoutput (int port) const
 Overloaded method for const access. More...
 
virtual SciDAVis::PlotDesignation plotDesignation () const
 Copy plot designation of input port 0. More...
 
virtual SciDAVis::ColumnMode columnMode () const
 Return the column mode. More...
 
virtual QString textAt (int row) const
 Return the content of row 'row'. More...
 
virtual double valueAt (int row) const
 Return the double value in row 'row'. More...
 
int highestConnectedInput () const
 Return the index of the highest input port that is connected. More...
 
bool input (int port, const AbstractColumn *source)
 Connect the provided data source to the specified input port. More...
 
bool input (const AbstractFilter *sources)
 Connect all outputs of the provided filter to the corresponding inputs of this filter. More...
 
const AbstractColumninput (int port) const
 Return the input currently connected to the specified port, or 0. More...
 
virtual QString inputLabel (int port) const
 Return the label associated to the given input port. More...
 
int portIndexOf (const AbstractColumn *column)
 Return the input port to which the column is connected or -1 if it's not connected. More...
 
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 QIcon icon () const
 Return an icon to be used for decorating my views. 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
 

Protected Member Functions

virtual void inputAboutToBeDisconnected (const AbstractColumn *source)
 Called whenever an input is disconnected or deleted. More...
 

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...
 

signal handlers

virtual void inputAboutToBeReplaced (const AbstractColumn *source, const AbstractColumn *replacement)
 An input is about to be replaced. More...
 
virtual void inputMaskingAboutToChange (const AbstractColumn *source)
 
virtual void inputMaskingChanged (const AbstractColumn *source)
 
void inputAboutToBeDestroyed (const AbstractColumn *source)
 
QVector< const AbstractColumn * > d_inputs
 The data sources connected to my input ports. More...
 
virtual void inputDescriptionAboutToChange (const AbstractColumn *source)
 Name and/or comment of an input will be changed. More...
 
void inputDescriptionAboutToChange (const AbstractAspect *aspect)
 
virtual void inputDescriptionChanged (const AbstractColumn *source)
 Name and/or comment of an input changed. More...
 
void inputDescriptionChanged (const AbstractAspect *aspect)
 

XML related functions

virtual void save (QXmlStreamWriter *writer) const
 Save to XML. More...
 
IntervalAttribute< bool > d_masking
 

signal handlers

virtual void inputPlotDesignationAboutToChange (const AbstractColumn *)
 The plot designation of an input is about to change. More...
 
virtual void inputPlotDesignationChanged (const AbstractColumn *)
 The plot designation of an input changed. More...
 
virtual void inputModeAboutToChange (const AbstractColumn *)
 The display mode and possibly the data type of an input is about to change. More...
 
virtual void inputModeChanged (const AbstractColumn *)
 The display mode and possibly the data type has changed. More...
 
virtual void inputDataAboutToChange (const AbstractColumn *)
 The data of an input is about to change. More...
 
virtual void inputDataChanged (const AbstractColumn *)
 The data of an input has changed. More...
 
virtual void inputRowsAboutToBeInserted (const AbstractColumn *source, int before, int count)
 
virtual void inputRowsInserted (const AbstractColumn *source, int before, int count)
 
virtual void inputRowsAboutToBeRemoved (const AbstractColumn *source, int first, int count)
 
virtual void inputRowsRemoved (const AbstractColumn *source, int first, int count)
 
SimpleFilterColumnd_output_column
 

XML related functions

class String2DateTimeFilterSetFormatCmd
 
QString d_format
 The format string. More...
 
static const char * date_formats []
 
static const char * time_formats []
 
virtual void writeExtraAttributes (QXmlStreamWriter *writer) const
 Override this in derived classes if they have other attributes than filter_name. More...
 
virtual bool load (XmlStreamReader *reader)
 Load from XML. More...
 
virtual QDateTime dateTimeAt (int row) const
 Set the content of row 'row'. More...
 
virtual QDate dateAt (int row) const
 Return the date part of row 'row'. More...
 
virtual QTime timeAt (int row) const
 Return the time part of row 'row'. More...
 
virtual bool isInvalid (int row) const
 Return whether a certain row contains an invalid value
More...
 
virtual bool isInvalid (Interval< int > i) const
 Return whether a certain interval of rows contains only invalid values
More...
 
virtual QList< Interval< int > > invalidIntervals () const
 Return all intervals of invalid rows. More...
 
void formatChanged ()
 
virtual bool inputAcceptable (int, const AbstractColumn *source)
 Using typed ports: only string inputs are accepted. More...
 

Detailed Description

Conversion filter QString -> QDateTime.

File : String2DateTimeFilter.h

Project : SciDAVis

Copyright : (C) 2007 by Tilman Benkert, Knut Franke Email (use @ for *) : thzs*gmx.net, knut.franke*gmx.de Description : Conversion filter QString -> QDateTime.

  • 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 *
    • The standard use of this filter is explicitly specifiying the date/time format of the strings on the input, either in the constructor or via setFormat(). However, if the input fails to comply to this format, String2DateTimeFilter tries to guess the format, using internal lists of common date and time formats (date_formats and time_formats).

Definition at line 47 of file String2DateTimeFilter.h.

Constructor & Destructor Documentation

◆ String2DateTimeFilter()

String2DateTimeFilter::String2DateTimeFilter ( QString  format = "yyyy-MM-dd hh:mm:ss.zzz")
inlineexplicit

Standard constructor.

Definition at line 53 of file String2DateTimeFilter.h.

53 :mm:ss.zzz") : d_format(format) {}

Member Function Documentation

◆ 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::Column(), ApplicationWindow::convertMatrixToTable(), ApplicationWindow::convertTableToMatrix(), future::Matrix::duplicate(), ApplicationWindow::importImage(), Column::init(), ApplicationWindow::newMatrix(), ApplicationWindow::newTable(), ApplicationWindow::newTableStatistics(), future::Folder::readChildAspectElement(), and Column::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 Column::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:

◆ 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(), Column::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:

◆ clearMasks()

void AbstractSimpleFilter::clearMasks ( )
virtualinherited

Clear all masking information.

Definition at line 41 of file AbstractSimpleFilter.cpp.

References IntervalAttribute< bool >::clear(), AbstractSimpleFilter::d_masking, AbstractSimpleFilter::d_output_column, AbstractColumn::maskingAboutToChange(), and AbstractColumn::maskingChanged().

Referenced by SimpleFilterColumn::clearMasks().

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

◆ columnMode()

virtual SciDAVis::ColumnMode AbstractSimpleFilter::columnMode ( ) const
inlinevirtualinherited

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.

Definition at line 162 of file AbstractSimpleFilter.h.

163  {
164  // calling this function while d_input is empty is a sign of very bad code
165  // nevertheless it will return some rather meaningless value to
166  // avoid crashes
167  return d_inputs.value(0) ? d_inputs.at(0)->columnMode() : SciDAVis::Text;
168  }

References AbstractFilter::d_inputs, and SciDAVis::Text.

Referenced by SimpleFilterColumn::columnMode().

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:

◆ 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:

◆ dataType()

virtual SciDAVis::ColumnDataType String2DateTimeFilter::dataType ( ) const
inlinevirtual

Return the data type of the column.

Reimplemented from AbstractSimpleFilter.

Definition at line 64 of file String2DateTimeFilter.h.

64 { return SciDAVis::TypeQDateTime; }

References SciDAVis::TypeQDateTime.

◆ dateAt()

virtual QDate String2DateTimeFilter::dateAt ( int  row) const
inlinevirtual

Return the date part of row 'row'.

Use this only when dataType() is QDateTime

Reimplemented from AbstractSimpleFilter.

Definition at line 85 of file String2DateTimeFilter.h.

85 { return dateTimeAt(row).date(); }

References dateTimeAt().

Here is the call graph for this function:

◆ dateTimeAt()

QDateTime String2DateTimeFilter::dateTimeAt ( int  row) const
virtual

Set the content of row 'row'.

Use this only when dataType() is QDateTime

Reimplemented from AbstractSimpleFilter.

Definition at line 63 of file String2DateTimeFilter.cpp.

64 {
65  if (!d_inputs.value(0)) return QDateTime();
66  QString input_value = d_inputs.value(0)->textAt(row);
67  if (input_value.isEmpty()) return QDateTime();
68 
69  // first try the selected format string d_format
70  QDateTime result = QDateTime::fromString(input_value, d_format);
71  if(result.isValid())
72  return result;
73 
74  // fallback:
75  // try other format strings built from date_formats and time_formats
76  // comma and space are valid separators between date and time
77  QStringList strings = input_value.simplified().split(",", QString::SkipEmptyParts);
78  if(strings.size() == 1) strings = strings.at(0).split(" ", QString::SkipEmptyParts);
79 
80  if(strings.size() < 1)
81  return result; // invalid date/time from first attempt
82 
83  QDate date_result;
84  QTime time_result;
85 
86  QString date_string = strings.at(0).trimmed();
87  QString time_string;
88  if(strings.size() > 1)
89  time_string = strings.at(1).trimmed();
90  else
91  time_string = date_string;
92 
93  // try to find a valid date
94  for (const char **format = date_formats; *format != 0; format++) {
95  date_result = QDate::fromString(date_string, *format);
96  if (date_result.isValid())
97  break;
98  }
99  // try to find a valid time
100  for (const char **format = time_formats; *format != 0; format++) {
101  time_result = QTime::fromString(time_string, *format);
102  if (time_result.isValid())
103  break;
104  }
105 
106  if(!date_result.isValid() && time_result.isValid())
107  date_result.setDate(1900,1,1); // this is what QDateTime does e.g. for
108  // QDateTime::fromString("00:00","hh:mm");
109  return QDateTime(date_result, time_result);
110 }

References d_format, AbstractFilter::d_inputs, date_formats, format(), and time_formats.

Referenced by dateAt(), isInvalid(), and timeAt().

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

◆ dependentRows()

virtual QList< Interval<int> > AbstractSimpleFilter::dependentRows ( Interval< int >  input_range) const
inlinevirtualinherited

Definition at line 215 of file AbstractSimpleFilter.h.

215 { return QList< Interval<int> >() << input_range; }

Referenced by AbstractSimpleFilter::inputRowsAboutToBeInserted(), AbstractSimpleFilter::inputRowsAboutToBeRemoved(), AbstractSimpleFilter::inputRowsInserted(), and AbstractSimpleFilter::inputRowsRemoved().

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(), Column::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(), Column::clear(), Column::clearFormulas(), Column::clearMasks(), future::Matrix::clearSelectedCells(), future::Matrix::clearSelectedColumns(), future::Matrix::clearSelectedRows(), Column::clearValidity(), future::Table::completeAspectInsertion(), Column::copy(), AbstractAspect::insertChild(), future::Matrix::insertColumns(), future::Matrix::insertRows(), Column::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(), Column::removeRows(), AbstractAspect::reparentChild(), Column::replaceDateTimes(), Column::replaceTexts(), Column::replaceValues(), AbstractAspect::setCaptionSpec(), future::Matrix::setCell(), future::Matrix::setColumnCells(), Column::setColumnMode(), AbstractAspect::setComment(), future::Matrix::setCoordinates(), AbstractAspect::setCreationTime(), Column::setDateTimeAt(), future::Matrix::setDimensions(), future::Matrix::setDisplayedDigits(), DateTime2StringFilter::setFormat(), setFormat(), future::Matrix::setFormula(), Column::setFormula(), Column::setInvalid(), Column::setMasked(), AbstractAspect::setName(), Double2StringFilter::setNumDigits(), Double2StringFilter::setNumericFormat(), future::Matrix::setNumericFormat(), Column::setPlotDesignation(), future::Matrix::setRowCells(), future::Table::setRowCount(), Column::setTextAt(), Column::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:

◆ format()

QString String2DateTimeFilter::format ( ) const
inline

Return the format string.

The default format string is "yyyy-MM-dd hh:mm:ss.zzz".

See also
QDate::toString()

Definition at line 61 of file String2DateTimeFilter.h.

61 { return d_format; }

References d_format.

Referenced by dateTimeAt(), setFormat(), and writeExtraAttributes().

Here is the caller graph for this function:

◆ formatChanged

void String2DateTimeFilter::formatChanged ( )
signal

Referenced by String2DateTimeFilterSetFormatCmd::redo().

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:

◆ highestConnectedInput()

int AbstractFilter::highestConnectedInput ( ) const
inlineinherited

Return the index of the highest input port that is connected.

Note that this is different from both the number of ports that could be connected, inputCount(), and the number of ports that actually have been connected, which are not necessarily sequential. In conjunction with input(int), this method can be used to traverse the connected inputs.

Definition at line 103 of file AbstractFilter.h.

103 { return d_inputs.count() - 1; }

References AbstractFilter::d_inputs.

◆ icon()

QIcon AbstractAspect::icon ( ) const
virtualinherited

Return an icon to be used for decorating my views.

Reimplemented in Column, future::Table, future::Matrix, and future::Folder.

Definition at line 298 of file AbstractAspect.cpp.

299 {
300  return QIcon();
301 }

Referenced by PartMdiView::PartMdiView().

Here is the caller 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 Column::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:

◆ input() [1/3]

bool AbstractFilter::input ( const AbstractFilter sources)
inherited

Connect all outputs of the provided filter to the corresponding inputs of this filter.

Returns
true if all connections were accepted, false otherwise

Overloaded method provided for convenience.

Definition at line 109 of file AbstractFilter.cpp.

110 {
111  if (!sources) return false;
112  bool result = true;
113  for (int i=0; i<sources->outputCount(); i++)
114  if (!input(i, sources->output(i)))
115  result = false;
116  return result;
117 }

References AbstractFilter::input(), AbstractFilter::output(), and AbstractFilter::outputCount().

Here is the call graph for this function:

◆ input() [2/3]

const AbstractColumn* AbstractFilter::input ( int  port) const
inlineinherited

Return the input currently connected to the specified port, or 0.

Definition at line 129 of file AbstractFilter.h.

129 { return d_inputs.value(port); }

References AbstractFilter::d_inputs.

◆ input() [3/3]

bool AbstractFilter::input ( int  port,
const AbstractColumn source 
)
inherited

Connect the provided data source to the specified input port.

Parameters
portthe port number to which to connect
sourcethe data source to connect to the input port
Returns
true if the connection was accepted, false otherwise.

The port number is checked for validity against inputCount() and both port number and data source are passed to inputAcceptable() for review. If both checks succeed,the source is recorded in d_inputs. If applicable, the previously connected data source is disconnected before replacing it.

You can also use this method to disconnect an input without replacing it with a new one by calling it with source=0.

See also
inputAcceptable(), d_inputs

File : AbstractFilter.cpp

Project : SciDAVis

Copyright : (C) 2007 by Knut Franke, Tilman Benkert Email (use @ for *) : knut.franke*gmx.de, thzs*gmx.net Description : Base class for all analysis operations.

  • 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 31 of file AbstractFilter.cpp.

32 {
33  if (port<0 || (inputCount()>=0 && port>=inputCount())) return false;
34  if (source && !inputAcceptable(port, source)) return false;
35  if (port >= d_inputs.size()) d_inputs.resize(port+1);
36  const AbstractColumn* old_input = d_inputs.value(port);
37  if (source == old_input) return true;
38  if (old_input)
39  {
40  disconnect(old_input, 0, this, 0);
41  // replace input, notifying the filter implementation of the changes
44  inputMaskingAboutToChange(old_input);
45  inputDataAboutToChange(old_input);
46  if(source && source->columnMode() != old_input->columnMode())
47  inputModeAboutToChange(old_input);
48  }
49  if (!source)
50  inputAboutToBeDisconnected(old_input);
51  d_inputs[port] = source;
52  if (source) { // we have a new source
53  if(old_input && source->columnMode() != old_input->columnMode())
54  inputModeAboutToChange(source);
55  inputDataChanged(source);
56  inputMaskingChanged(source);
59  // connect the source's signals
60  QObject::connect(source, SIGNAL(aspectDescriptionAboutToChange(const AbstractAspect *)),
61  this, SLOT(inputDescriptionAboutToChange(const AbstractAspect *)));
62  QObject::connect(source, SIGNAL(aspectDescriptionChanged(const AbstractAspect *)),
63  this, SLOT(inputDescriptionChanged(const AbstractAspect *)));
64  QObject::connect(source, SIGNAL(plotDesignationAboutToChange(const AbstractColumn *)),
66  QObject::connect(source, SIGNAL(plotDesignationChanged(const AbstractColumn *)),
67  this, SLOT(inputPlotDesignationChanged(const AbstractColumn *)));
68  QObject::connect(source, SIGNAL(modeAboutToChange(const AbstractColumn *)),
69  this, SLOT(inputModeAboutToChange(const AbstractColumn *)));
70  QObject::connect(source, SIGNAL(modeChanged(const AbstractColumn *)),
71  this, SLOT(inputModeChanged(const AbstractColumn *)));
72  QObject::connect(source, SIGNAL(dataAboutToChange(const AbstractColumn *)),
73  this, SLOT(inputDataAboutToChange(const AbstractColumn *)));
74  QObject::connect(source, SIGNAL(dataChanged(const AbstractColumn *)),
75  this, SLOT(inputDataChanged(const AbstractColumn *)));
76  QObject::connect(source, SIGNAL(aboutToBeReplaced(const AbstractColumn *,const AbstractColumn*)),
77  this, SLOT(inputAboutToBeReplaced(const AbstractColumn *,const AbstractColumn*)));
78  QObject::connect(source,
79  SIGNAL(rowsAboutToBeInserted(const AbstractColumn *,int,int)),
80  this, SLOT(inputRowsAboutToBeInserted(const AbstractColumn *,int,int)));
81  QObject::connect(source,
82  SIGNAL(rowsInserted(const AbstractColumn *,int,int)),
83  this, SLOT(inputRowsInserted(const AbstractColumn *,int,int)));
84  QObject::connect(source,
85  SIGNAL(rowsAboutToBeRemoved(const AbstractColumn *,int,int)),
86  this, SLOT(inputRowsAboutToBeRemoved(const AbstractColumn *,int,int)));
87  QObject::connect(source,
88  SIGNAL(rowsRemoved(const AbstractColumn *, int, int)),
89  this, SLOT(inputRowsRemoved(const AbstractColumn *,int,int)));
90  QObject::connect(source, SIGNAL(maskingAboutToChange(const AbstractColumn *)),
91  this, SLOT(inputMaskingAboutToChange(const AbstractColumn *)));
92  QObject::connect(source, SIGNAL(maskingChanged(const AbstractColumn *)),
93  this, SLOT(inputMaskingChanged(const AbstractColumn *)));
94  QObject::connect(source, SIGNAL(aboutToBeDestroyed(const AbstractColumn *)),
95  this, SLOT(inputAboutToBeDestroyed(const AbstractColumn *)));
96  } else { // source==0, that is, the input port has been disconnected
97  // try to shrink d_inputs
98  int num_connected_inputs = d_inputs.size();
99  while ( d_inputs.at(num_connected_inputs-1) == 0 )
100  {
101  num_connected_inputs--;
102  if(!num_connected_inputs) break;
103  }
104  d_inputs.resize(num_connected_inputs);
105  }
106  return true;
107 }

References AbstractAspect::aspectDescriptionAboutToChange(), AbstractAspect::aspectDescriptionChanged(), AbstractColumn::columnMode(), AbstractFilter::d_inputs, AbstractFilter::inputAboutToBeDestroyed(), AbstractFilter::inputAboutToBeDisconnected(), AbstractFilter::inputAboutToBeReplaced(), AbstractFilter::inputAcceptable(), AbstractFilter::inputCount(), AbstractFilter::inputDataAboutToChange(), AbstractFilter::inputDataChanged(), AbstractFilter::inputDescriptionAboutToChange(), AbstractFilter::inputDescriptionChanged(), AbstractFilter::inputMaskingAboutToChange(), AbstractFilter::inputMaskingChanged(), AbstractFilter::inputModeAboutToChange(), AbstractFilter::inputModeChanged(), AbstractFilter::inputPlotDesignationAboutToChange(), AbstractFilter::inputPlotDesignationChanged(), AbstractFilter::inputRowsAboutToBeInserted(), AbstractFilter::inputRowsAboutToBeRemoved(), AbstractFilter::inputRowsInserted(), and AbstractFilter::inputRowsRemoved().

Referenced by Column::Column(), Table::importASCII(), Column::init(), AbstractFilter::input(), AbstractFilter::inputAboutToBeDestroyed(), AbstractFilter::inputAboutToBeReplaced(), Column::Private::replaceModeData(), Column::Private::setColumnMode(), Column::setColumnMode(), and future::Table::text().

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

◆ inputAboutToBeDestroyed()

void AbstractFilter::inputAboutToBeDestroyed ( const AbstractColumn source)
inlineprotectedinherited

Definition at line 268 of file AbstractFilter.h.

268  {
269  input(portIndexOf(source), 0);
270  }

References AbstractFilter::input(), and AbstractFilter::portIndexOf().

Referenced by AbstractFilter::input().

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

◆ inputAboutToBeDisconnected()

virtual void AbstractFilter::inputAboutToBeDisconnected ( const AbstractColumn source)
inlineprotectedvirtualinherited

Called whenever an input is disconnected or deleted.

This is only to notify implementations of the event, the default implementation is a no-op.

Definition at line 172 of file AbstractFilter.h.

172 { Q_UNUSED(source); }

Referenced by AbstractFilter::input().

Here is the caller graph for this function:

◆ inputAboutToBeReplaced()

void AbstractFilter::inputAboutToBeReplaced ( const AbstractColumn source,
const AbstractColumn replacement 
)
protectedvirtualinherited

An input is about to be replaced.

This signal is handled by AbstractFilter and mapped to input(int,AbstractColumn*), which calls inputDescriptionAboutToChange(), inputPlotDesignationAboutToChange(), inputDataAboutToChange(), inputMaskingAboutToChange(), inputDescripionChanged(), inputMaskingChanged() inputPlotDesignationChanged() and inputDataChanged(). inputModeAboutToChange() and inputModeChanged() are called if the new column has a different mode (and thereby possibly data type). Thus, filter implementations won't have to bother with it most of the time.

Definition at line 124 of file AbstractFilter.cpp.

125 {
126  input(portIndexOf(source), replacement);
127 }

References AbstractFilter::input(), and AbstractFilter::portIndexOf().

Referenced by AbstractFilter::input().

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

◆ inputAcceptable()

virtual bool String2DateTimeFilter::inputAcceptable ( int  ,
const AbstractColumn source 
)
inlineprotectedvirtual

Using typed ports: only string inputs are accepted.

Reimplemented from AbstractFilter.

Definition at line 113 of file String2DateTimeFilter.h.

113  {
114  return source->dataType() == SciDAVis::TypeQString;
115  }

References AbstractColumn::dataType(), and SciDAVis::TypeQString.

Here is the call graph for this function:

◆ inputCount()

virtual int AbstractSimpleFilter::inputCount ( ) const
inlinevirtualinherited

Default to one input port.

Implements AbstractFilter.

Definition at line 136 of file AbstractSimpleFilter.h.

136 { return 1; }

◆ inputDataAboutToChange()

void AbstractSimpleFilter::inputDataAboutToChange ( const AbstractColumn source)
protectedvirtualinherited

The data of an input is about to change.

Parameters
sourceis always the this pointer of the column that emitted the signal.

Reimplemented from AbstractFilter.

Definition at line 75 of file AbstractSimpleFilter.cpp.

References AbstractSimpleFilter::d_output_column, and AbstractColumn::dataAboutToChange().

◆ inputDataChanged()

void AbstractSimpleFilter::inputDataChanged ( const AbstractColumn source)
protectedvirtualinherited

The data of an input has changed.

Parameters
sourceis always the this pointer of the column that emitted the signal.

Reimplemented from AbstractFilter.

Definition at line 80 of file AbstractSimpleFilter.cpp.

81 {
83 }

References AbstractSimpleFilter::d_output_column, and AbstractColumn::dataChanged().

◆ inputDescriptionAboutToChange [1/2]

void AbstractFilter::inputDescriptionAboutToChange ( const AbstractAspect aspect)
inlineprotectedslotinherited

Definition at line 184 of file AbstractFilter.h.

184  {
185  const AbstractColumn * col = qobject_cast<const AbstractColumn*>(aspect);
186  if (col) inputDescriptionAboutToChange(col);
187  }

References AbstractFilter::inputDescriptionAboutToChange().

Here is the call graph for this function:

◆ inputDescriptionAboutToChange [2/2]

virtual void AbstractFilter::inputDescriptionAboutToChange ( const AbstractColumn source)
inlineprotectedvirtualslotinherited

Name and/or comment of an input will be changed.

Parameters
sourceis always the this pointer of the column that emitted the signal.

Definition at line 183 of file AbstractFilter.h.

183 { Q_UNUSED(source); }

Referenced by AbstractFilter::input(), and AbstractFilter::inputDescriptionAboutToChange().

Here is the caller graph for this function:

◆ inputDescriptionChanged [1/2]

void AbstractFilter::inputDescriptionChanged ( const AbstractAspect aspect)
inlineprotectedslotinherited

Definition at line 195 of file AbstractFilter.h.

195  {
196  const AbstractColumn * col = qobject_cast<const AbstractColumn*>(aspect);
197  if (col && d_inputs.contains(col)) inputDescriptionChanged(col);
198  }

References AbstractFilter::d_inputs, and AbstractFilter::inputDescriptionChanged().

Here is the call graph for this function:

◆ inputDescriptionChanged [2/2]

virtual void AbstractFilter::inputDescriptionChanged ( const AbstractColumn source)
inlineprotectedvirtualslotinherited

Name and/or comment of an input changed.

Parameters
sourceis always the this pointer of the column that emitted the signal.

Definition at line 194 of file AbstractFilter.h.

194 { Q_UNUSED(source); }

Referenced by AbstractFilter::input(), and AbstractFilter::inputDescriptionChanged().

Here is the caller graph for this function:

◆ inputLabel()

QString AbstractFilter::inputLabel ( int  port) const
virtualinherited

Return the label associated to the given input port.

Default labels are In1, In2, ... (or translated equivalents), but implementations can reimplement this method to produce more meaningful labels.

Output ports are implicitly labeled through AbstractAspect::name().

Definition at line 119 of file AbstractFilter.cpp.

120 {
121  return QObject::tr("In%1").arg(port + 1);
122 }

◆ inputMaskingAboutToChange()

virtual void AbstractFilter::inputMaskingAboutToChange ( const AbstractColumn source)
inlineprotectedvirtualinherited

Reimplemented in SimpleCopyThroughFilter.

Definition at line 262 of file AbstractFilter.h.

262  {
263  Q_UNUSED(source);
264  }

Referenced by AbstractFilter::input().

Here is the caller graph for this function:

◆ inputMaskingChanged()

virtual void AbstractFilter::inputMaskingChanged ( const AbstractColumn source)
inlineprotectedvirtualinherited

Reimplemented in SimpleCopyThroughFilter.

Definition at line 265 of file AbstractFilter.h.

265  {
266  Q_UNUSED(source);
267  }

Referenced by AbstractFilter::input().

Here is the caller graph for this function:

◆ inputModeAboutToChange()

void AbstractSimpleFilter::inputModeAboutToChange ( const AbstractColumn source)
protectedvirtualinherited

The display mode and possibly the data type of an input is about to change.

Parameters
sourceis always the this pointer of the column that emitted the signal.

Reimplemented from AbstractFilter.

Definition at line 65 of file AbstractSimpleFilter.cpp.

References AbstractSimpleFilter::d_output_column, and AbstractColumn::dataAboutToChange().

◆ inputModeChanged()

void AbstractSimpleFilter::inputModeChanged ( const AbstractColumn source)
protectedvirtualinherited

The display mode and possibly the data type has changed.

Parameters
sourceis always the this pointer of the column that emitted the signal.

Reimplemented from AbstractFilter.

Definition at line 70 of file AbstractSimpleFilter.cpp.

71 {
73 }

References AbstractSimpleFilter::d_output_column, and AbstractColumn::dataChanged().

◆ inputPlotDesignationAboutToChange()

void AbstractSimpleFilter::inputPlotDesignationAboutToChange ( const AbstractColumn source)
protectedvirtualinherited

The plot designation of an input is about to change.

Parameters
sourceis always the this pointer of the column that emitted the signal.

Reimplemented from AbstractFilter.

Definition at line 55 of file AbstractSimpleFilter.cpp.

References AbstractSimpleFilter::d_output_column, and AbstractColumn::plotDesignationAboutToChange().

◆ inputPlotDesignationChanged()

void AbstractSimpleFilter::inputPlotDesignationChanged ( const AbstractColumn source)
protectedvirtualinherited

The plot designation of an input changed.

Parameters
sourceis always the this pointer of the column that emitted the signal.

Reimplemented from AbstractFilter.

Definition at line 60 of file AbstractSimpleFilter.cpp.

References AbstractSimpleFilter::d_output_column, and AbstractColumn::plotDesignationChanged().

◆ inputRowsAboutToBeInserted()

void AbstractSimpleFilter::inputRowsAboutToBeInserted ( const AbstractColumn source,
int  before,
int  count 
)
protectedvirtualinherited

Reimplemented from AbstractFilter.

Definition at line 85 of file AbstractSimpleFilter.cpp.

86 {
87  Q_UNUSED(source);
88  Q_UNUSED(count);
89  foreach(Interval<int> output_range, dependentRows(Interval<int>(before, before)))
90  emit d_output_column->rowsAboutToBeInserted(d_output_column, output_range.start(), output_range.size());
91 }

References AbstractSimpleFilter::d_output_column, AbstractSimpleFilter::dependentRows(), AbstractColumn::rowsAboutToBeInserted(), and Interval< T >::size().

Here is the call graph for this function:

◆ inputRowsAboutToBeRemoved()

void AbstractSimpleFilter::inputRowsAboutToBeRemoved ( const AbstractColumn source,
int  first,
int  count 
)
protectedvirtualinherited

Reimplemented from AbstractFilter.

Definition at line 101 of file AbstractSimpleFilter.cpp.

102 {
103  Q_UNUSED(source);
104  foreach(Interval<int> output_range, dependentRows(Interval<int>(first, first+count-1)))
105  emit d_output_column->rowsAboutToBeRemoved(d_output_column, output_range.start(), output_range.size());
106 }

References AbstractSimpleFilter::d_output_column, AbstractSimpleFilter::dependentRows(), AbstractColumn::rowsAboutToBeRemoved(), and Interval< T >::size().

Here is the call graph for this function:

◆ inputRowsInserted()

void AbstractSimpleFilter::inputRowsInserted ( const AbstractColumn source,
int  before,
int  count 
)
protectedvirtualinherited

Reimplemented from AbstractFilter.

Definition at line 93 of file AbstractSimpleFilter.cpp.

94 {
95  Q_UNUSED(source);
96  Q_UNUSED(count);
97  foreach(Interval<int> output_range, dependentRows(Interval<int>(before, before)))
98  emit d_output_column->rowsInserted(d_output_column, output_range.start(), output_range.size());
99 }

References AbstractSimpleFilter::d_output_column, AbstractSimpleFilter::dependentRows(), AbstractColumn::rowsInserted(), and Interval< T >::size().

Here is the call graph for this function:

◆ inputRowsRemoved()

void AbstractSimpleFilter::inputRowsRemoved ( const AbstractColumn source,
int  first,
int  count 
)
protectedvirtualinherited

Reimplemented from AbstractFilter.

Definition at line 108 of file AbstractSimpleFilter.cpp.

109 {
110  Q_UNUSED(source);
111  foreach(Interval<int> output_range, dependentRows(Interval<int>(first, first+count-1)))
112  emit d_output_column->rowsRemoved(d_output_column, output_range.start(), output_range.size());
113 }

References AbstractSimpleFilter::d_output_column, AbstractSimpleFilter::dependentRows(), AbstractColumn::rowsRemoved(), and Interval< T >::size().

Here is the call graph for this function:

◆ 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:

◆ invalidIntervals()

virtual QList< Interval<int> > String2DateTimeFilter::invalidIntervals ( ) const
inlinevirtual

Return all intervals of invalid rows.

Reimplemented from AbstractSimpleFilter.

Definition at line 100 of file String2DateTimeFilter.h.

101  {
102  IntervalAttribute<bool> validity;
103  if (d_inputs.value(0)) {
104  int rows = d_inputs.value(0)->rowCount();
105  for (int i=0; i<rows; i++)
106  validity.setValue(i, isInvalid(i));
107  }
108  return validity.intervals();
109  }

References AbstractFilter::d_inputs, IntervalAttribute< bool >::intervals(), isInvalid(), and IntervalAttribute< bool >::setValue().

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]

virtual bool String2DateTimeFilter::isInvalid ( int  row) const
inlinevirtual

Return whether a certain row contains an invalid value

Reimplemented from AbstractSimpleFilter.

Definition at line 87 of file String2DateTimeFilter.h.

87  {
88  const AbstractColumn *col = d_inputs.value(0);
89  if (!col) return false;
90  return !(dateTimeAt(row).isValid()) || col->isInvalid(row);
91  }

References AbstractFilter::d_inputs, dateTimeAt(), and AbstractColumn::isInvalid().

Referenced by invalidIntervals(), and isInvalid().

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

◆ isInvalid() [2/2]

virtual bool String2DateTimeFilter::isInvalid ( Interval< int >  i) const
inlinevirtual

Return whether a certain interval of rows contains only invalid values

Reimplemented from AbstractSimpleFilter.

Definition at line 92 of file String2DateTimeFilter.h.

92  {
93  if (!d_inputs.value(0)) return false;
94  for (int row = i.start(); row <= i.end(); row++) {
95  if (!isInvalid(row))
96  return false;
97  }
98  return true;
99  }

References AbstractFilter::d_inputs, and isInvalid().

Here is the call graph for this function:

◆ isMasked() [1/2]

virtual bool AbstractSimpleFilter::isMasked ( int  row) const
inlinevirtualinherited

Return whether a certain row is masked.

Reimplemented in SimpleCopyThroughFilter.

Definition at line 221 of file AbstractSimpleFilter.h.

221 { return d_masking.isSet(row); }

Referenced by SimpleFilterColumn::isMasked().

Here is the caller graph for this function:

◆ isMasked() [2/2]

virtual bool AbstractSimpleFilter::isMasked ( Interval< int >  i) const
inlinevirtualinherited

Return whether a certain interval of rows rows is fully masked.

Reimplemented in SimpleCopyThroughFilter.

Definition at line 223 of file AbstractSimpleFilter.h.

223 { return d_masking.isSet(i); }

References AbstractSimpleFilter::d_masking, and IntervalAttribute< bool >::isSet().

Here is the call graph for this function:

◆ load()

bool String2DateTimeFilter::load ( XmlStreamReader reader)
virtual

Load from XML.

Reimplemented from AbstractSimpleFilter.

Definition at line 117 of file String2DateTimeFilter.cpp.

118 {
119  QXmlStreamAttributes attribs = reader->attributes();
120  QString str = attribs.value(reader->namespaceUri().toString(), "format").toString();
121 
122  if (AbstractSimpleFilter::load(reader))
123  setFormat(str);
124  else
125  return false;
126 
127  return !reader->hasError();
128 }

References AbstractSimpleFilter::load(), setFormat(), and str.

Here is the call graph for this function:

◆ maskedIntervals()

virtual QList< Interval<int> > AbstractSimpleFilter::maskedIntervals ( ) const
inlinevirtualinherited

Return all intervals of masked rows.

Reimplemented in SimpleCopyThroughFilter.

Definition at line 225 of file AbstractSimpleFilter.h.

225 { return d_masking.intervals(); }

References AbstractSimpleFilter::d_masking, and IntervalAttribute< bool >::intervals().

Referenced by SimpleFilterColumn::maskedIntervals().

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

◆ 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(), Column::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:

◆ output() [1/2]

AbstractColumn * AbstractSimpleFilter::output ( int  port)
virtualinherited

Return a pointer to d_output_column on port 0 (don't override unless you really know what you are doing).

Implements AbstractFilter.

Definition at line 115 of file AbstractSimpleFilter.cpp.

116 {
117  return port == 0 ? static_cast<AbstractColumn*>(d_output_column) : 0;
118 }

References AbstractSimpleFilter::d_output_column.

Referenced by Table::importASCII(), and future::Table::text().

Here is the caller graph for this function:

◆ output() [2/2]

const AbstractColumn * AbstractSimpleFilter::output ( int  port) const
virtualinherited

Overloaded method for const access.

Implements AbstractFilter.

Definition at line 120 of file AbstractSimpleFilter.cpp.

121 {
122  return port == 0 ? static_cast<const AbstractColumn*>(d_output_column) : 0;
123 }

References AbstractSimpleFilter::d_output_column.

◆ outputCount()

virtual int AbstractSimpleFilter::outputCount ( ) const
inlinevirtualinherited

We manage only one output port (don't override unless you really know what you are doing).

Implements AbstractFilter.

Definition at line 138 of file AbstractSimpleFilter.h.

138 { return 1; }

◆ 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()

virtual SciDAVis::PlotDesignation AbstractSimpleFilter::plotDesignation ( ) const
inlinevirtualinherited

Copy plot designation of input port 0.

Definition at line 143 of file AbstractSimpleFilter.h.

143  {
144  return d_inputs.value(0) ?
145  d_inputs.at(0)->plotDesignation() :
147  }

References AbstractFilter::d_inputs, and SciDAVis::noDesignation.

Referenced by SimpleFilterColumn::plotDesignation().

Here is the caller graph for this function:

◆ portIndexOf()

int AbstractFilter::portIndexOf ( const AbstractColumn column)
inlineinherited

Return the input port to which the column is connected or -1 if it's not connected.

Definition at line 150 of file AbstractFilter.h.

151  {
152  for(int i=0; i<d_inputs.size(); i++)
153  if(d_inputs.at(i) == column) return i;
154  return -1;
155  }

References AbstractFilter::d_inputs.

Referenced by AbstractFilter::inputAboutToBeDestroyed(), and AbstractFilter::inputAboutToBeReplaced().

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 Column::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 Column::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 Column::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:

◆ 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:

◆ rowCount()

virtual int AbstractSimpleFilter::rowCount ( ) const
inlinevirtualinherited

Definition at line 212 of file AbstractSimpleFilter.h.

212  {
213  return d_inputs.value(0) ? d_inputs.at(0)->rowCount() : 0;
214  }

References AbstractFilter::d_inputs.

Referenced by SimpleFilterColumn::rowCount().

Here is the caller graph for this function:

◆ save()

void AbstractSimpleFilter::save ( QXmlStreamWriter *  writer) const
virtualinherited

Save to XML.

Reimplemented from AbstractAspect.

Definition at line 125 of file AbstractSimpleFilter.cpp.

126 {
127  writer->writeStartElement("simple_filter");
128  writeBasicAttributes(writer);
129  writeExtraAttributes(writer);
130  writer->writeAttribute("filter_name", metaObject()->className());
131  writeCommentElement(writer);
132  writer->writeEndElement();
133 }

References AbstractAspect::writeBasicAttributes(), AbstractAspect::writeCommentElement(), and AbstractSimpleFilter::writeExtraAttributes().

Referenced by Column::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:

◆ 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(), Column::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:

◆ setFormat()

void String2DateTimeFilter::setFormat ( const QString &  format)

Set the format string to be used for conversion.

Definition at line 130 of file String2DateTimeFilter.cpp.

131 {
133 }

References AbstractAspect::exec(), format(), and String2DateTimeFilterSetFormatCmd.

Referenced by load().

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.

◆ setMasked() [1/2]

virtual void AbstractSimpleFilter::setMasked ( int  row,
bool  mask = true 
)
inlinevirtualinherited

Overloaded function for convenience.

Definition at line 235 of file AbstractSimpleFilter.h.

235 { setMasked(Interval<int>(row,row), mask); }

References AbstractSimpleFilter::setMasked().

Referenced by AbstractSimpleFilter::setMasked().

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

◆ setMasked() [2/2]

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

Set an interval masked.

Parameters
ithe interval
masktrue: mask, false: unmask

Definition at line 48 of file AbstractSimpleFilter.cpp.

References AbstractSimpleFilter::d_masking, AbstractSimpleFilter::d_output_column, AbstractColumn::maskingAboutToChange(), AbstractColumn::maskingChanged(), and IntervalAttribute< bool >::setValue().

Here is the call 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:

◆ 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()

virtual QString AbstractSimpleFilter::textAt ( int  row) const
inlinevirtualinherited

Return the content of row 'row'.

Use this only when dataType() is QString

Reimplemented in Double2StringFilter, and DateTime2StringFilter.

Definition at line 173 of file AbstractSimpleFilter.h.

174  {
175  return d_inputs.value(0) ? d_inputs.at(0)->textAt(row) : QString();
176  }

References AbstractFilter::d_inputs.

Referenced by SimpleFilterColumn::textAt().

Here is the caller graph for this function:

◆ timeAt()

virtual QTime String2DateTimeFilter::timeAt ( int  row) const
inlinevirtual

Return the time part of row 'row'.

Use this only when dataType() is QDateTime

Reimplemented from AbstractSimpleFilter.

Definition at line 86 of file String2DateTimeFilter.h.

86 { return dateTimeAt(row).time(); }

References dateTimeAt().

Here is the call 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()

virtual double AbstractSimpleFilter::valueAt ( int  row) const
inlinevirtualinherited

Return the double value in row 'row'.

Use this only when dataType() is double

Reimplemented in String2DoubleFilter, Month2DoubleFilter, DayOfWeek2DoubleFilter, and DateTime2DoubleFilter.

Definition at line 205 of file AbstractSimpleFilter.h.

206  {
207  return d_inputs.value(0) ? d_inputs.at(0)->valueAt(row) : 0.0;
208  }

References AbstractFilter::d_inputs.

Referenced by SimpleFilterColumn::valueAt().

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 Column::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 Column::save().

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

◆ writeExtraAttributes()

void String2DateTimeFilter::writeExtraAttributes ( QXmlStreamWriter *  writer) const
virtual

Override this in derived classes if they have other attributes than filter_name.

Reimplemented from AbstractSimpleFilter.

Definition at line 112 of file String2DateTimeFilter.cpp.

113 {
114  writer->writeAttribute("format", format());
115 }

References format().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ String2DateTimeFilterSetFormatCmd

friend class String2DateTimeFilterSetFormatCmd
friend

Definition at line 76 of file String2DateTimeFilter.h.

Referenced by setFormat().

Member Data Documentation

◆ d_aspect_private

◆ d_format

QString String2DateTimeFilter::d_format
private

The format string.

Definition at line 78 of file String2DateTimeFilter.h.

Referenced by dateTimeAt(), format(), and String2DateTimeFilterSetFormatCmd::redo().

◆ d_inputs

◆ d_masking

◆ d_output_column

◆ date_formats

const char * String2DateTimeFilter::date_formats
staticprivate
Initial value:
= {
"yyyy-M-d",
"yyyy/M/d",
"d/M/yyyy",
"d/M/yy",
"d-M-yyyy",
"d-M-yy",
"d.M.yyyy",
"d.M.yy",
"M/yyyy",
"d.M.",
"yyyyMMdd",
0
}

File : String2DateTimeFilter.cpp

Project : SciDAVis

Copyright : (C) 2007 by Tilman Benkert, Knut Franke Email (use @ for *) : thzs*gmx.net, knut.franke*gmx.de Description : Conversion filter QString -> QDateTime.

  • 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 80 of file String2DateTimeFilter.h.

Referenced by dateTimeAt().

◆ time_formats

const char * String2DateTimeFilter::time_formats
staticprivate
Initial value:
= {
"h",
"h ap",
"h:mm",
"h:mm ap",
"h:mm:ss",
"h:mm:ss.zzz",
"h:mm:ss:zzz",
"mm:ss.zzz",
"hmmss",
0
}

Definition at line 81 of file String2DateTimeFilter.h.

Referenced by dateTimeAt().


The documentation for this class was generated from the following files:
AspectNameChangeCmd
Definition: aspectcommands.h:36
String2DateTimeFilter::date_formats
static const char * date_formats[]
Definition: String2DateTimeFilter.h:80
AbstractFilter::input
bool input(int port, const AbstractColumn *source)
Connect the provided data source to the specified input port.
Definition: AbstractFilter.cpp:31
AbstractSimpleFilter::dependentRows
virtual QList< Interval< int > > dependentRows(Interval< int > input_range) const
Definition: AbstractSimpleFilter.h:215
AbstractAspect::Private::comment
QString comment() const
Definition: AspectPrivate.cpp:134
AbstractColumn::dataAboutToChange
void dataAboutToChange(const AbstractColumn *source)
Data (including validity) of the column will be changed.
AbstractAspect::writeCommentElement
void writeCommentElement(QXmlStreamWriter *writer) const
Save the comment to XML.
Definition: AbstractAspect.cpp:52
AbstractColumn::plotDesignationChanged
void plotDesignationChanged(const AbstractColumn *source)
Column plot designation changed.
String2DateTimeFilter::isInvalid
virtual bool isInvalid(int row) const
Return whether a certain row contains an invalid value
Definition: String2DateTimeFilter.h:87
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
AbstractAspect::Private::captionSpec
QString captionSpec() const
Definition: AspectPrivate.cpp:146
AbstractAspect::Private::caption
QString caption() const
Definition: AspectPrivate.cpp:171
AbstractFilter::inputPlotDesignationAboutToChange
virtual void inputPlotDesignationAboutToChange(const AbstractColumn *source)
The plot designation of an input is about to change.
Definition: AbstractFilter.h:204
AbstractAspect::exec
void exec(QUndoCommand *command)
Execute the given command, pushing it on the undoStack() if available.
Definition: AbstractAspect.cpp:203
String2DateTimeFilter::dateTimeAt
virtual QDateTime dateTimeAt(int row) const
Set the content of row 'row'.
Definition: String2DateTimeFilter.cpp:63
SciDAVis::TypeQString
@ TypeQString
Definition: globals.h:79
AbstractFilter::inputRowsRemoved
virtual void inputRowsRemoved(const AbstractColumn *source, int first, int count)
Definition: AbstractFilter.h:259
str
#define str(x)
Definition: PythonScripting.cpp:41
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
AbstractFilter::inputMaskingAboutToChange
virtual void inputMaskingAboutToChange(const AbstractColumn *source)
Definition: AbstractFilter.h:262
AbstractColumn::maskingChanged
void maskingChanged(const AbstractColumn *source)
IntervalAttribute related signal.
AbstractFilter::inputDataChanged
virtual void inputDataChanged(const AbstractColumn *source)
The data of an input has changed.
Definition: AbstractFilter.h:235
String2DateTimeFilter::setFormat
void setFormat(const QString &format)
Set the format string to be used for conversion.
Definition: String2DateTimeFilter.cpp:130
AbstractFilter::inputDescriptionAboutToChange
virtual void inputDescriptionAboutToChange(const AbstractColumn *source)
Name and/or comment of an input will be changed.
Definition: AbstractFilter.h:183
String2DateTimeFilter::format
QString format() const
Return the format string.
Definition: String2DateTimeFilter.h:61
AbstractSimpleFilter::d_masking
IntervalAttribute< bool > d_masking
Definition: AbstractSimpleFilter.h:259
AbstractAspect::Private::childCount
int childCount() const
Definition: AspectPrivate.cpp:111
IntervalAttribute< bool >
A class representing an interval-based attribute (bool version)
Definition: IntervalAttribute.h:198
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
AbstractFilter::inputRowsAboutToBeRemoved
virtual void inputRowsAboutToBeRemoved(const AbstractColumn *source, int first, int count)
Definition: AbstractFilter.h:256
AbstractFilter::inputMaskingChanged
virtual void inputMaskingChanged(const AbstractColumn *source)
Definition: AbstractFilter.h:265
Interval::size
T size() const
Definition: Interval.h:216
AbstractColumn::dataType
virtual SciDAVis::ColumnDataType dataType() const =0
Return the data type of the column.
AbstractFilter::inputAcceptable
virtual bool inputAcceptable(int port, const AbstractColumn *source)
Give implementations a chance to reject connections to their input ports.
Definition: AbstractFilter.h:163
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
AbstractColumn::rowsInserted
void rowsInserted(const AbstractColumn *source, int before, int count)
Rows have been inserted.
AbstractFilter::inputDataAboutToChange
virtual void inputDataAboutToChange(const AbstractColumn *source)
The data of an input is about to change.
Definition: AbstractFilter.h:229
AbstractColumn::columnMode
virtual SciDAVis::ColumnMode columnMode() const =0
Return the column mode.
AbstractFilter::inputModeAboutToChange
virtual void inputModeAboutToChange(const AbstractColumn *source)
The display mode and possibly the data type of an input is about to change.
Definition: AbstractFilter.h:217
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
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
AbstractAspect::Private::indexOfChild
int indexOfChild(const AbstractAspect *child) const
Definition: AspectPrivate.cpp:91
AbstractFilter::inputRowsAboutToBeInserted
virtual void inputRowsAboutToBeInserted(const AbstractColumn *source, int before, int count)
Definition: AbstractFilter.h:250
AbstractColumn::maskingAboutToChange
void maskingAboutToChange(const AbstractColumn *source)
IntervalAttribute related signal.
AbstractSimpleFilter::d_output_column
SimpleFilterColumn * d_output_column
Definition: AbstractSimpleFilter.h:276
AbstractAspect::indexOfChild
int indexOfChild(const AbstractAspect *child) const
Return the position of child in my list of children.
Definition: AbstractAspect.cpp:191
AbstractAspect::endMacro
void endMacro()
End the undo stack macro.
Definition: AbstractAspect.cpp:222
AbstractFilter::inputRowsInserted
virtual void inputRowsInserted(const AbstractColumn *source, int before, int count)
Definition: AbstractFilter.h:253
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.
AspectCaptionSpecChangeCmd
Definition: aspectcommands.h:78
IntervalAttribute< bool >::setValue
void setValue(Interval< int > i, bool value=true)
Definition: IntervalAttribute.h:210
AspectCommentChangeCmd
Definition: aspectcommands.h:57
AbstractAspect::childCount
int childCount() const
Return the number of child Aspects.
Definition: AbstractAspect.cpp:186
AbstractColumn::rowsRemoved
void rowsRemoved(const AbstractColumn *source, int first, int count)
Rows have been deleted.
AbstractAspect::completeAspectInsertion
virtual void completeAspectInsertion(AbstractAspect *aspect, int index)
Called after a new child has been inserted or added.
Definition: AbstractAspect.h:294
AbstractFilter::inputAboutToBeDestroyed
void inputAboutToBeDestroyed(const AbstractColumn *source)
Definition: AbstractFilter.h:268
AbstractAspect::name
QString name() const
Definition: AbstractAspect.cpp:229
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::child
AbstractAspect * child(int index) const
Get a child by its position in my list of children.
Definition: AbstractAspect.cpp:180
AbstractFilter::inputDescriptionChanged
virtual void inputDescriptionChanged(const AbstractColumn *source)
Name and/or comment of an input changed.
Definition: AbstractFilter.h:194
AbstractColumn::rowsAboutToBeInserted
void rowsAboutToBeInserted(const AbstractColumn *source, int before, int count)
Rows will be inserted.
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
AspectChildReparentCmd
Definition: aspectcommands.h:195
AbstractAspect::aspectDescriptionAboutToChange
void aspectDescriptionAboutToChange(const AbstractAspect *aspect)
Emit this before the name, comment or caption spec is changed.
AbstractAspect::parentAspect
AbstractAspect * parentAspect() const
Return my parent Aspect or 0 if I currently don't have one.
Definition: AbstractAspect.cpp:109
String2DateTimeFilter::time_formats
static const char * time_formats[]
Definition: String2DateTimeFilter.h:81
AbstractSimpleFilter::writeExtraAttributes
virtual void writeExtraAttributes(QXmlStreamWriter *writer) const
Override this in derived classes if they have other attributes than filter_name.
Definition: AbstractSimpleFilter.h:255
AbstractAspect::aspectDescriptionChanged
void aspectDescriptionChanged(const AbstractAspect *aspect)
Emit this when the name, comment or caption spec changed.
AbstractAspect::writeBasicAttributes
void writeBasicAttributes(QXmlStreamWriter *writer) const
Save name, creation time and caption spec to XML.
Definition: AbstractAspect.cpp:70
AbstractFilter::inputCount
virtual int inputCount() const =0
Return the number of input ports supported by the filter or -1 if any number of inputs is acceptable.
AbstractAspect::removeChild
void removeChild(AbstractAspect *child, bool detach=false)
Remove the given Aspect from my list of children.
Definition: AbstractAspect.cpp:142
AbstractSimpleFilter::load
virtual bool load(XmlStreamReader *reader)
Load from XML.
Definition: AbstractSimpleFilter.cpp:135
AbstractAspect::Private::creationTime
QDateTime creationTime() const
Definition: AspectPrivate.cpp:196
IntervalAttribute< bool >::clear
void clear()
Definition: IntervalAttribute.h:294
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
AbstractAspect::Private::parent
AbstractAspect * parent()
Definition: AspectPrivate.h:65
AbstractAspect::setName
void setName(const QString &value)
Definition: AbstractAspect.cpp:234
AbstractAspect::comment
QString comment() const
Definition: AbstractAspect.cpp:260
AspectChildRemoveCmd
Definition: aspectcommands.h:122
AbstractSimpleFilter::setMasked
virtual void setMasked(Interval< int > i, bool mask=true)
Set an interval masked.
Definition: AbstractSimpleFilter.cpp:48
AbstractFilter::portIndexOf
int portIndexOf(const AbstractColumn *column)
Return the input port to which the column is connected or -1 if it's not connected.
Definition: AbstractFilter.h:150
IntervalAttribute< bool >::intervals
QList< Interval< int > > intervals() const
Definition: IntervalAttribute.h:292
AbstractAspect::Private::child
AbstractAspect * child(int index)
Definition: AspectPrivate.cpp:116
AbstractAspect::remove
virtual void remove()
Remove me from my parent's list of children.
Definition: AbstractAspect.h:250
AbstractFilter::inputPlotDesignationChanged
virtual void inputPlotDesignationChanged(const AbstractColumn *source)
The plot designation of an input changed.
Definition: AbstractFilter.h:211
AbstractFilter::outputCount
virtual int outputCount() const =0
Return the number of output ports provided by the filter.
AbstractFilter::output
virtual AbstractColumn * output(int port=0)=0
Get the data source associated with the specified output port.
String2DateTimeFilter::String2DateTimeFilterSetFormatCmd
friend class String2DateTimeFilterSetFormatCmd
Definition: String2DateTimeFilter.h:76
AbstractFilter::inputModeChanged
virtual void inputModeChanged(const AbstractColumn *source)
The display mode and possibly the data type has changed.
Definition: AbstractFilter.h:223
SciDAVis::TypeQDateTime
@ TypeQDateTime
Definition: globals.h:80
AbstractAspect::setCreationTime
void setCreationTime(const QDateTime &time)
Set the creation time.
Definition: AbstractAspect.cpp:282
AbstractColumn::rowsAboutToBeRemoved
void rowsAboutToBeRemoved(const AbstractColumn *source, int first, int count)
Rows will be deleted.
XmlStreamReader::raiseWarning
void raiseWarning(const QString &message=QString())
Definition: XmlStreamReader.cpp:86
AbstractColumn::isInvalid
virtual bool isInvalid(int row) const
Return whether a certain row contains an invalid value
Definition: AbstractColumn.h:154
AbstractFilter::inputAboutToBeReplaced
virtual void inputAboutToBeReplaced(const AbstractColumn *source, const AbstractColumn *replacement)
An input is about to be replaced.
Definition: AbstractFilter.cpp:124
IntervalAttribute< bool >::isSet
bool isSet(int row) const
Definition: IntervalAttribute.h:229
Interval< int >
AbstractFilter::d_inputs
QVector< const AbstractColumn * > d_inputs
The data sources connected to my input ports.
Definition: AbstractFilter.h:275
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
AbstractFilter::inputAboutToBeDisconnected
virtual void inputAboutToBeDisconnected(const AbstractColumn *source)
Called whenever an input is disconnected or deleted.
Definition: AbstractFilter.h:172
String2DateTimeFilter::d_format
QString d_format
The format string.
Definition: String2DateTimeFilter.h:78
AbstractAspect
Base class of all persistent objects in a Project.
Definition: AbstractAspect.h:86
AbstractColumn::plotDesignationAboutToChange
void plotDesignationAboutToChange(const AbstractColumn *source)
Column plot designation will be changed.
AbstractAspect::prepareAspectRemoval
virtual void prepareAspectRemoval(AbstractAspect *aspect)
Called before a child is removed.
Definition: AbstractAspect.h:300
AspectCreationTimeChangeCmd
Definition: aspectcommands.h:100
AbstractColumn
Interface definition for data with column logic.
Definition: AbstractColumn.h:82
AbstractAspect::info
void info(const QString &text)
Implementations should call this whenever status information should be given to the user.
Definition: AbstractAspect.h:307