labplot  2.8.2
About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.
  Fossies Dox: labplot-2.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

AbstractColumn Class Referenceabstract

Interface definition for data with column logic. More...

#include <AbstractColumn.h>

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

Classes

struct  ColumnStatistics
 

Public Types

enum class  PlotDesignation {
  NoDesignation , X , Y , Z ,
  XError , XErrorPlus , XErrorMinus , YError ,
  YErrorMinus , YErrorPlus
}
 
enum class  ColumnMode {
  Numeric = 0 , Text = 1 , Month = 4 , Day = 5 ,
  DateTime = 6 , Integer = 24 , BigInt = 26
}
 
enum class  Properties { No = 0x00 , Constant = 0x01 , MonotonicIncreasing = 0x02 , MonotonicDecreasing = 0x04 }
 
- Public Types inherited from AbstractAspect
enum class  ChildIndexFlag { IncludeHidden = 0x01 , Recursive = 0x02 , Compress = 0x04 }
 Flags which control numbering scheme of children. More...
 

Signals

void formatChanged (const AbstractColumn *source)
 
void reset (const AbstractColumn *source)
 
- Signals inherited from AbstractAspect
void aspectDescriptionAboutToChange (const AbstractAspect *)
 Emitted before the name, comment or caption spec is changed. More...
 
void aspectDescriptionChanged (const AbstractAspect *)
 Emitted after the name, comment or caption spec have changed. More...
 
void aspectAboutToBeAdded (const AbstractAspect *parent, const AbstractAspect *before, const AbstractAspect *child)
 Emitted before a new child is inserted. More...
 
void aspectAdded (const AbstractAspect *)
 Emitted after a new Aspect has been added to the tree. More...
 
void aspectAboutToBeRemoved (const AbstractAspect *)
 Emitted before an aspect is removed from its parent. More...
 
void aspectRemoved (const AbstractAspect *parent, const AbstractAspect *before, const AbstractAspect *child)
 Emitted from the parent after removing a child. More...
 
void aspectHiddenAboutToChange (const AbstractAspect *)
 Emitted before the hidden attribute is changed. More...
 
void aspectHiddenChanged (const AbstractAspect *)
 Emitted after the hidden attribute has changed. More...
 
void statusInfo (const QString &)
 Emitted whenever some aspect in the tree wants to give status information to the user. More...
 
void renameRequested ()
 
void selected (const AbstractAspect *)
 
void deselected (const AbstractAspect *)
 
void childAspectSelectedInView (const AbstractAspect *)
 
void childAspectDeselectedInView (const AbstractAspect *)
 

Public Member Functions

 AbstractColumn (const QString &name, AspectType type)
 Ctor. More...
 
 ~AbstractColumn () override
 
virtual bool isReadOnly () const
 Return whether the object is read-only. More...
 
virtual ColumnMode columnMode () const =0
 Return the column mode. More...
 
virtual void setColumnMode (AbstractColumn::ColumnMode)
 Set the column mode. More...
 
virtual PlotDesignation plotDesignation () const =0
 Return the column plot designation. More...
 
virtual QString plotDesignationString () const =0
 
virtual void setPlotDesignation (AbstractColumn::PlotDesignation)
 Set the column plot designation. More...
 
bool isNumeric () const
 
bool isPlottable () const
 
virtual bool copy (const AbstractColumn *source)
 Copy another column of the same type. More...
 
virtual bool copy (const AbstractColumn *source, int source_start, int dest_start, int num_rows)
 Copies part of another column of the same type. More...
 
virtual int rowCount () const =0
 Return the data vector size. More...
 
virtual int availableRowCount () const =0
 Return the number of available data rows. More...
 
void insertRows (int before, int count)
 Insert some empty (or initialized with invalid values) rows. More...
 
void removeRows (int first, int count)
 Remove 'count' rows starting from row 'first'. More...
 
virtual void clear ()
 Clear the whole column. More...
 
bool isValid (int row) const
 Convenience method for mode-independent testing of validity. More...
 
IntervalAttribute related functions
bool isMasked (int row) const
 Return whether a certain row is masked. More...
 
bool isMasked (const Interval< int > &i) const
 Return whether a certain interval of rows is fully masked. More...
 
QVector< Interval< int > > maskedIntervals () const
 Return all intervals of masked rows. More...
 
void clearMasks ()
 Clear all masking information. More...
 
void setMasked (const Interval< int > &i, bool mask=true)
 Set an interval masked. More...
 
void setMasked (int row, bool mask=true)
 Overloaded function for convenience. More...
 
Formula related functions
virtual QString formula (int row) const
 Return the formula associated with row 'row'. More...
 
virtual QVector< Interval< int > > formulaIntervals () const
 Return the intervals that have associated formulas. More...
 
virtual void setFormula (const Interval< int > &i, const QString &formula)
 Set a formula string for an interval of rows. More...
 
virtual void setFormula (int row, const QString &formula)
 Overloaded function for convenience. More...
 
virtual void clearFormulas ()
 Clear all formulas. More...
 
- Public Member Functions inherited from AbstractAspect
 AbstractAspect (const QString &name, AspectType type)
 
 ~AbstractAspect () override
 
QString name () const
 
QString comment () const
 
void setCreationTime (const QDateTime &)
 
QDateTime creationTime () const
 
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...
 
void setHidden (bool)
 Set "hidden" property, i.e. whether to exclude this aspect from being shown in the explorer. More...
 
bool hidden () const
 
void setIsLoading (bool)
 
bool isLoading () const
 
virtual QIcon icon () const
 Return an icon to be used for decorating my views. More...
 
virtual QMenu * createContextMenu ()
 Return a new context menu. More...
 
AspectType type () const
 
bool inherits (AspectType type) const
 
AbstractAspectparentAspect () const
 Return my parent Aspect or 0 if I currently don't have one. More...
 
AbstractAspectparent (AspectType type) const
 In the parent-child hierarchy, return the first parent of type. More...
 
void setParentAspect (AbstractAspect *)
 
Folderfolder ()
 Return the folder the Aspect is contained in or 0 if there is none. More...
 
bool isDescendantOf (AbstractAspect *other)
 Return whether the there is a path upwards to the given aspect. More...
 
void addChild (AbstractAspect *)
 Add the given Aspect to my list of children. More...
 
void addChildFast (AbstractAspect *)
 Add the given Aspect to my list of children without any checks and without putting this step onto the undo-stack. More...
 
virtual void finalizeAdd ()
 
QVector< AbstractAspect * > children (AspectType type, ChildIndexFlags flags={}) const
 
void insertChildBefore (AbstractAspect *child, AbstractAspect *before)
 Insert the given Aspect at a specific position in my list of children. More...
 
void insertChildBeforeFast (AbstractAspect *child, AbstractAspect *before)
 Insert the given Aspect at a specific position in my list of children.without any checks and without putting this step onto the undo-stack. More...
 
void reparent (AbstractAspect *newParent, int newIndex=-1)
 Move a child to another parent aspect and transfer ownership. More...
 
void removeChild (AbstractAspect *)
 Remove the given Aspect from my list of children. More...
 
void removeAllChildren ()
 Remove all child Aspects. More...
 
virtual QVector< AbstractAspect * > dependsOn () const
 
virtual bool isDraggable () const
 
virtual QVector< AspectTypedropableOn () const
 
virtual void processDropEvent (const QVector< quintptr > &)
 
template<class T >
T * ancestor () const
 Return the closest ancestor of class T (or NULL if none found). More...
 
template<class T >
QVector< T * > children (ChildIndexFlags flags={}) const
 
template<class T >
T * child (int index, ChildIndexFlags flags={}) const
 
template<class T >
T * child (const QString &name) const
 Get child by name and class. More...
 
template<class T >
int childCount (ChildIndexFlags flags={}) const
 Return the number of child Aspects inheriting from given class. More...
 
template<class T >
int indexOfChild (const AbstractAspect *child, ChildIndexFlags flags={}) const
 Return (0 based) index of child in the list of children inheriting from class T. More...
 
void setSelected (bool)
 
void setUndoAware (bool)
 
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 *)
 Execute the given command, pushing it on the undoStack() if available. More...
 
void exec (QUndoCommand *command, const char *preChangeSignal, const char *postChangeSignal, QGenericArgument val0=QGenericArgument(), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument())
 Execute command and arrange for signals to be sent before/after it is redone or undone. More...
 
void beginMacro (const QString &text)
 Begin an undo stack macro (series of commands) More...
 
void endMacro ()
 End the current undo stack macro. More...
 
virtual void save (QXmlStreamWriter *) const =0
 Save as XML. More...
 
virtual bool load (XmlStreamReader *, bool preview)=0
 Load from XML. More...
 

Static Public Member Functions

static QStringList dateFormats ()
 
static QStringList timeFormats ()
 
static QStringList dateTimeFormats ()
 
static QIcon iconForMode (ColumnMode mode)
 Convenience method for mode-dependent icon. More...
 

Protected Member Functions

virtual void handleRowInsertion (int before, int count)
 
virtual void handleRowRemoval (int first, int count)
 
- Protected Member Functions inherited from AbstractAspect
void info (const QString &text)
 Implementations should call this whenever status information should be given to the user. More...
 
bool readBasicAttributes (XmlStreamReader *)
 Load name and creation time from XML. More...
 
void writeBasicAttributes (QXmlStreamWriter *) const
 Save name and creation time to XML. More...
 
void writeCommentElement (QXmlStreamWriter *) const
 Save the comment to XML. More...
 
bool readCommentElement (XmlStreamReader *)
 Load comment from an XML element. More...
 

Private Attributes

AbstractColumnPrivated
 

Friends

class AbstractColumnRemoveRowsCmd
 
class AbstractColumnInsertRowsCmd
 
class AbstractColumnClearMasksCmd
 
class AbstractColumnSetMaskedCmd
 

type specific functions

virtual double maximum (int count=0) const
 
virtual double maximum (int startIndex, int endIndex) const
 
virtual double minimum (int count=0) const
 
virtual double minimum (int startIndex, int endIndex) const
 
virtual bool indicesMinMax (double v1, double v2, int &start, int &end) const
 
virtual int indexForValue (double x) const
 
virtual QString textAt (int row) const
 Return the content of row 'row'. More...
 
virtual void setTextAt (int row, const QString &new_value)
 Set the content of row 'row'. More...
 
virtual void replaceTexts (int first, const QVector< QString > &new_values)
 Replace a range of values. More...
 
virtual QDate dateAt (int row) const
 Return the date part of row 'row'. More...
 
virtual void setDateAt (int row, QDate new_value)
 Set the content of row 'row'. More...
 
virtual QTime timeAt (int row) const
 Return the time part of row 'row'. More...
 
virtual void setTimeAt (int row, QTime new_value)
 Set the content of row 'row'. More...
 
virtual QDateTime dateTimeAt (int row) const
 Return the QDateTime in row 'row'. More...
 
virtual void setDateTimeAt (int row, const QDateTime &new_value)
 Set the content of row 'row'. More...
 
virtual void replaceDateTimes (int first, const QVector< QDateTime > &new_values)
 Replace a range of values. More...
 
virtual double valueAt (int row) const
 Return the double value in row 'row'. More...
 
virtual void setValueAt (int row, double new_value)
 Set the content of row 'row'. More...
 
virtual void replaceValues (int first, const QVector< double > &new_values)
 Replace a range of values. More...
 
virtual int integerAt (int row) const
 Return the integer value in row 'row'. More...
 
virtual void setIntegerAt (int row, int new_value)
 Set the content of row 'row'. More...
 
virtual void replaceInteger (int first, const QVector< int > &new_values)
 Replace a range of values. More...
 
virtual qint64 bigIntAt (int row) const
 Return the bigint value in row 'row'. More...
 
virtual void setBigIntAt (int row, qint64 new_value)
 Set the content of row 'row'. More...
 
virtual void replaceBigInt (int first, const QVector< qint64 > &new_values)
 Replace a range of values. More...
 
virtual Properties properties () const
 
void plotDesignationAboutToChange (const AbstractColumn *source)
 Column plot designation will be changed. More...
 
void plotDesignationChanged (const AbstractColumn *source)
 Column plot designation changed. More...
 
void modeAboutToChange (const AbstractColumn *source)
 Column mode (possibly also the data type) will be changed. More...
 
void modeChanged (const AbstractColumn *source)
 Column mode (possibly also the data type) changed. More...
 
void dataAboutToChange (const AbstractColumn *source)
 Data of the column will be changed. More...
 
void dataChanged (const AbstractColumn *source)
 Data of the column has changed. More...
 
void rowsAboutToBeInserted (const AbstractColumn *source, int before, int count)
 Rows will be inserted. More...
 
void rowsInserted (const AbstractColumn *source, int before, int count)
 Rows have been inserted. More...
 
void rowsAboutToBeRemoved (const AbstractColumn *source, int first, int count)
 Rows will be deleted. More...
 
void rowsRemoved (const AbstractColumn *source, int first, int count)
 Rows have been deleted. More...
 
void maskingAboutToChange (const AbstractColumn *source)
 Rows are about to be masked or unmasked. More...
 
void maskingChanged (const AbstractColumn *source)
 Rows have been masked or unmasked. More...
 
void aboutToBeDestroyed (const AbstractColumn *source)
 Emitted shortl before this column is deleted. More...
 
bool XmlReadMask (XmlStreamReader *)
 Read XML mask element. More...
 
void XmlWriteMask (QXmlStreamWriter *) const
 Write XML mask element. More...
 

Additional Inherited Members

- Public Slots inherited from AbstractAspect
bool setName (const QString &, bool autoUnique=true)
 AbstractAspect::setName sets the name of the abstract aspect. More...
 
void setComment (const QString &)
 
void remove ()
 Remove me from my parent's list of children. More...
 
- Protected Slots inherited from AbstractAspect
virtual void childSelected (const AbstractAspect *)
 
virtual void childDeselected (const AbstractAspect *)
 
- Protected Attributes inherited from AbstractAspect
const AspectType m_type
 

Detailed Description

Interface definition for data with column logic.

File : AbstractColumn.cpp Project : LabPlot

Description : Interface definition for data with column logic

Copyright : (C) 2007,2008 Tilman Benkert (thzs@.nosp@m.gmx..nosp@m.net) Copyright : (C) 2017-2020 Stefan Gerlach (stefa.nosp@m.n.ge.nosp@m.rlach.nosp@m.@uni.nosp@m..kn)

  • 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 *

This is an abstract base class for column-based data, i.e. mathematically a vector or technically a 1D array or list. It only defines the interface but has no data members itself.

Classes derived from this are typically table columns or outputs of filters which can be chained between table columns and plots. From the point of view of the plot functions there will be no difference between a table column and a filter output since both use this interface.

Classes derived from this will either store a vector with entries of one certain data type, e.g. double, QString, QDateTime, or generate such values on demand. To determine the data type of a class derived from this, use the columnMode() function. AbstractColumn defines all access functions for all supported data types but only those corresponding to the return value of columnMode() will return a meaningful value. Calling functions not belonging to the data type of the column is safe, but will do nothing (writing function) or return some default value (reading functions).

This class also defines all signals which indicate a data change. Any class whose output values are subject to change over time must emit the according signals. These signals notify any object working with the column before and after a change of the column. In some cases it will be necessary for a class using the column to connect aboutToBeDestroyed(), to react to a column's deletion, e.g. a filter's reaction to a table deletion.

All writing functions have a "do nothing" standard implementation to make deriving a read-only class very easy without bothering about the writing interface.

Definition at line 47 of file AbstractColumn.h.

Member Enumeration Documentation

◆ ColumnMode

Enumerator
Numeric 
Text 
Month 
Day 
DateTime 
Integer 
BigInt 

Definition at line 54 of file AbstractColumn.h.

◆ PlotDesignation

Enumerator
NoDesignation 
XError 
XErrorPlus 
XErrorMinus 
YError 
YErrorMinus 
YErrorPlus 

Definition at line 53 of file AbstractColumn.h.

◆ Properties

Enumerator
No 
Constant 
MonotonicIncreasing 
MonotonicDecreasing 

Definition at line 94 of file AbstractColumn.h.

Constructor & Destructor Documentation

◆ AbstractColumn()

AbstractColumn::AbstractColumn ( const QString &  name,
AspectType  type 
)

Ctor.

Parameters
namethe column name (= aspect name)

Definition at line 82 of file AbstractColumn.cpp.

◆ ~AbstractColumn()

AbstractColumn::~AbstractColumn ( )
override

Definition at line 86 of file AbstractColumn.cpp.

References aboutToBeDestroyed(), and d.

Member Function Documentation

◆ aboutToBeDestroyed

void AbstractColumn::aboutToBeDestroyed ( const AbstractColumn source)
signal

Emitted shortl before this column is deleted.

Parameters
sourcethe object emitting this signal

This is needed by AbstractFilter.

Referenced by AbstractFilter::input(), and ~AbstractColumn().

◆ availableRowCount()

int AbstractColumn::availableRowCount ( ) const
pure virtual

Return the number of available data rows.

Implemented in SimpleFilterColumn, Column, and ColumnStringIO.

Referenced by XYFitCurveDock::modelTypeChanged().

◆ bigIntAt()

qint64 AbstractColumn::bigIntAt ( int  row) const
virtual

Return the bigint value in row 'row'.

Use this only when columnMode() is BigInt

Reimplemented in SimpleFilterColumn, and Column.

Definition at line 554 of file AbstractColumn.cpp.

Referenced by ColumnPrivate::copy(), XYAnalysisCurve::copyData(), XYFitCurvePrivate::recalculate(), and Column::setFromColumn().

◆ clear()

void AbstractColumn::clear ( )
virtual

Clear the whole column.

Reimplemented in Column.

Definition at line 262 of file AbstractColumn.cpp.

◆ clearFormulas()

void AbstractColumn::clearFormulas ( )
virtual

Clear all formulas.

Reimplemented in Column.

Definition at line 388 of file AbstractColumn.cpp.

◆ clearMasks()

void AbstractColumn::clearMasks ( )

Clear all masking information.

Definition at line 314 of file AbstractColumn.cpp.

References AbstractColumnClearMasksCmd, d, and AbstractAspect::exec().

◆ columnMode()

AbstractColumn::ColumnMode AbstractColumn::columnMode ( ) const
pure virtual

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.

Implemented in SimpleFilterColumn, Column, and ColumnStringIO.

Referenced by ColumnPrivate::copy(), Column::copy(), ColumnStringIO::copy(), XYAnalysisCurve::copyData(), AbstractFilter::input(), BigInt2DateTimeFilter::inputAcceptable(), BigInt2DayOfWeekFilter::inputAcceptable(), BigInt2DoubleFilter::inputAcceptable(), BigInt2IntegerFilter::inputAcceptable(), BigInt2MonthFilter::inputAcceptable(), BigInt2StringFilter::inputAcceptable(), DateTime2BigIntFilter::inputAcceptable(), DateTime2DoubleFilter::inputAcceptable(), DateTime2IntegerFilter::inputAcceptable(), DateTime2StringFilter::inputAcceptable(), DayOfWeek2BigIntFilter::inputAcceptable(), DayOfWeek2DoubleFilter::inputAcceptable(), DayOfWeek2IntegerFilter::inputAcceptable(), Double2BigIntFilter::inputAcceptable(), Double2DateTimeFilter::inputAcceptable(), Double2DayOfWeekFilter::inputAcceptable(), Double2IntegerFilter::inputAcceptable(), Double2MonthFilter::inputAcceptable(), Double2StringFilter::inputAcceptable(), Integer2BigIntFilter::inputAcceptable(), Integer2DateTimeFilter::inputAcceptable(), Integer2DayOfWeekFilter::inputAcceptable(), Integer2DoubleFilter::inputAcceptable(), Integer2MonthFilter::inputAcceptable(), Integer2StringFilter::inputAcceptable(), Month2BigIntFilter::inputAcceptable(), Month2DoubleFilter::inputAcceptable(), Month2IntegerFilter::inputAcceptable(), String2BigIntFilter::inputAcceptable(), String2DateTimeFilter::inputAcceptable(), String2DayOfWeekFilter::inputAcceptable(), String2DoubleFilter::inputAcceptable(), String2IntegerFilter::inputAcceptable(), String2MonthFilter::inputAcceptable(), isNumeric(), isPlottable(), isValid(), XYCurve::minMax(), HistogramPrivate::recalcHistogram(), XYCurvePrivate::recalcLogicalPoints(), XYFitCurvePrivate::recalculate(), ColumnFullCopyCmd::redo(), Column::setFromColumn(), HistogramPrivate::updateValues(), XYCurvePrivate::updateValues(), XYCurveDock::updateValuesWidgets(), CartesianPlot::xDataChanged(), and CartesianPlot::yDataChanged().

◆ copy() [1/2]

bool AbstractColumn::copy ( const AbstractColumn other)
virtual

Copy another column of the same type.

This function will return false if the data type of 'other' is not the same as the type of 'this'. Use a filter to convert a column to another type.

Reimplemented in Column, and ColumnStringIO.

Definition at line 166 of file AbstractColumn.cpp.

◆ copy() [2/2]

bool AbstractColumn::copy ( const AbstractColumn source,
int  source_start,
int  destination_start,
int  num_rows 
)
virtual

Copies part of another column of the same type.

This function will return false if the data type of 'other' is not the same as the type of 'this'.

Parameters
sourcepointer to the column to copy
source_startfirst row to copy in the column to copy
destination_startfirst row to copy in
num_rowsthe number of rows to copy

Reimplemented in Column, and ColumnStringIO.

Definition at line 181 of file AbstractColumn.cpp.

◆ dataAboutToChange

◆ dataChanged

◆ dateAt()

QDate AbstractColumn::dateAt ( int  row) const
virtual

Return the date part of row 'row'.

Use this only when columnMode() is DateTime, Month or Day

Reimplemented in SimpleFilterColumn, and Column.

Definition at line 432 of file AbstractColumn.cpp.

◆ dateFormats()

QStringList AbstractColumn::dateFormats ( )
static

◆ dateTimeAt()

QDateTime AbstractColumn::dateTimeAt ( int  row) const
virtual

◆ dateTimeFormats()

◆ formatChanged

void AbstractColumn::formatChanged ( const AbstractColumn source)
signal

◆ formula()

QString AbstractColumn::formula ( int  row) const
virtual

Return the formula associated with row 'row'.

Reimplemented in Column.

Definition at line 349 of file AbstractColumn.cpp.

Referenced by setFormula().

◆ formulaIntervals()

QVector< Interval< int > > AbstractColumn::formulaIntervals ( ) const
virtual

Return the intervals that have associated formulas.

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

QStringList list;
QVector< Interval<int> > intervals = my_column.formulaIntervals();
foreach(Interval<int> interval, intervals)
list << QString(interval.toString() + ": " + my_column.formula(interval.start()));
T start() const
Definition: Interval.h:50
QString toString() const
Return a string in the format '[start,end]'.
Definition: Interval.h:192
Auxiliary class for interval based data.
Definition: Interval.h:212

Reimplemented in Column.

Definition at line 367 of file AbstractColumn.cpp.

◆ handleRowInsertion()

void AbstractColumn::handleRowInsertion ( int  before,
int  count 
)
protectedvirtual

Reimplemented in Column.

Definition at line 214 of file AbstractColumn.cpp.

References AbstractColumnInsertRowsCmd, and AbstractAspect::exec().

Referenced by Column::handleRowInsertion(), and insertRows().

◆ handleRowRemoval()

void AbstractColumn::handleRowRemoval ( int  first,
int  count 
)
protectedvirtual

Reimplemented in Column.

Definition at line 233 of file AbstractColumn.cpp.

References AbstractColumnRemoveRowsCmd, and AbstractAspect::exec().

Referenced by Column::handleRowRemoval(), and removeRows().

◆ iconForMode()

QIcon AbstractColumn::iconForMode ( ColumnMode  mode)
static

Convenience method for mode-dependent icon.

Definition at line 120 of file AbstractColumn.cpp.

References BigInt, DateTime, Day, Integer, nsl_smooth_check::mode, Month, Numeric, and Text.

Referenced by Column::icon(), ImportFileWidget::refreshPreview(), and ImportSQLDatabaseWidget::refreshPreview().

◆ indexForValue()

int AbstractColumn::indexForValue ( double  x) const
virtual

Reimplemented in Column.

Definition at line 616 of file AbstractColumn.cpp.

References nsl_smooth_check::x.

◆ indicesMinMax()

bool AbstractColumn::indicesMinMax ( double  v1,
double  v2,
int &  start,
int &  end 
) const
virtual

Reimplemented in Column.

Definition at line 608 of file AbstractColumn.cpp.

◆ insertRows()

void AbstractColumn::insertRows ( int  before,
int  count 
)

◆ integerAt()

int AbstractColumn::integerAt ( int  row) const
virtual

Return the integer value in row 'row'.

Use this only when columnMode() is Integer

Reimplemented in SimpleFilterColumn, and Column.

Definition at line 526 of file AbstractColumn.cpp.

Referenced by ColumnPrivate::copy(), XYAnalysisCurve::copyData(), XYFitCurvePrivate::recalculate(), and Column::setFromColumn().

◆ isMasked() [1/2]

bool AbstractColumn::isMasked ( const Interval< int > &  i) const

Return whether a certain interval of rows is fully masked.

Definition at line 300 of file AbstractColumn.cpp.

References d, IntervalAttribute< bool >::isSet(), and AbstractColumnPrivate::m_masking.

◆ isMasked() [2/2]

◆ isNumeric()

bool AbstractColumn::isNumeric ( ) const

◆ isPlottable()

bool AbstractColumn::isPlottable ( ) const

◆ isReadOnly()

bool AbstractColumn::isReadOnly ( ) const
inlinevirtual

Return whether the object is read-only.

Reimplemented in Column.

Definition at line 157 of file AbstractColumn.h.

◆ isValid()

◆ maskedIntervals()

QVector< Interval< int > > AbstractColumn::maskedIntervals ( ) const

Return all intervals of masked rows.

Definition at line 307 of file AbstractColumn.cpp.

References d, IntervalAttribute< bool >::intervals(), and AbstractColumnPrivate::m_masking.

Referenced by XmlWriteMask().

◆ maskingAboutToChange

void AbstractColumn::maskingAboutToChange ( const AbstractColumn source)
signal

Rows are about to be masked or unmasked.

Referenced by AbstractFilter::input().

◆ maskingChanged

void AbstractColumn::maskingChanged ( const AbstractColumn source)
signal

Rows have been masked or unmasked.

Referenced by SpreadsheetModel::handleAspectAdded(), Column::init(), and AbstractFilter::input().

◆ maximum() [1/2]

◆ maximum() [2/2]

double AbstractColumn::maximum ( int  startIndex,
int  endIndex 
) const
virtual

Reimplemented in Column.

Definition at line 602 of file AbstractColumn.cpp.

◆ minimum() [1/2]

◆ minimum() [2/2]

double AbstractColumn::minimum ( int  startIndex,
int  endIndex 
) const
virtual

Reimplemented in Column.

Definition at line 591 of file AbstractColumn.cpp.

◆ modeAboutToChange

void AbstractColumn::modeAboutToChange ( const AbstractColumn source)
signal

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

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

Referenced by AbstractFilter::input(), ColumnPrivate::replaceModeData(), and ColumnPrivate::setColumnMode().

◆ modeChanged

void AbstractColumn::modeChanged ( const AbstractColumn source)
signal

Column mode (possibly also the data type) changed.

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

Referenced by SpreadsheetModel::handleAspectAdded(), AbstractFilter::input(), ColumnPrivate::replaceModeData(), ColumnPrivate::setColumnMode(), and ColumnDock::setColumns().

◆ plotDesignation()

AbstractColumn::PlotDesignation AbstractColumn::plotDesignation ( ) const
pure virtual

Return the column plot designation.

Implemented in SimpleFilterColumn, Column, and ColumnStringIO.

Referenced by ColumnDock::columnPlotDesignationChanged().

◆ plotDesignationAboutToChange

void AbstractColumn::plotDesignationAboutToChange ( const AbstractColumn source)
signal

Column plot designation will be changed.

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

Referenced by AbstractFilter::input(), AbstractSimpleFilter::inputPlotDesignationAboutToChange(), and ColumnPrivate::setPlotDesignation().

◆ plotDesignationChanged

void AbstractColumn::plotDesignationChanged ( const AbstractColumn source)
signal

Column plot designation changed.

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

Referenced by SpreadsheetModel::handleAspectAdded(), AbstractFilter::input(), AbstractSimpleFilter::inputPlotDesignationChanged(), ColumnDock::setColumns(), and ColumnPrivate::setPlotDesignation().

◆ plotDesignationString()

virtual QString AbstractColumn::plotDesignationString ( ) const
pure virtual

Implemented in SimpleFilterColumn, Column, and ColumnStringIO.

◆ properties()

AbstractColumn::Properties AbstractColumn::properties ( ) const
virtual

Returns the properties hold by this column (no, constant, monotonic increasing, monotonic decreasing,...) Is used in XYCurve to improve the search velocity for the y value for a specific x value

Reimplemented in Column.

Definition at line 581 of file AbstractColumn.cpp.

References No.

Referenced by XYCurve::minMax(), and XYCurvePrivate::retransform().

◆ removeRows()

void AbstractColumn::removeRows ( int  first,
int  count 
)

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

Definition at line 221 of file AbstractColumn.cpp.

References AbstractAspect::beginMacro(), AbstractAspect::endMacro(), AbstractAspect::exec(), handleRowRemoval(), and AbstractAspect::name().

◆ replaceBigInt()

void AbstractColumn::replaceBigInt ( int  first,
const QVector< qint64 > &  new_values 
)
virtual

Replace a range of values.

Use this only when columnMode() is BigInt

Reimplemented in Column.

Definition at line 573 of file AbstractColumn.cpp.

◆ replaceDateTimes()

void AbstractColumn::replaceDateTimes ( int  first,
const QVector< QDateTime > &  new_values 
)
virtual

Replace a range of values.

Use this only when columnMode() is DateTime, Month or Day

Reimplemented in Column.

Definition at line 489 of file AbstractColumn.cpp.

◆ replaceInteger()

void AbstractColumn::replaceInteger ( int  first,
const QVector< int > &  new_values 
)
virtual

Replace a range of values.

Use this only when columnMode() is Integer

Reimplemented in Column.

Definition at line 545 of file AbstractColumn.cpp.

◆ replaceTexts()

void AbstractColumn::replaceTexts ( int  first,
const QVector< QString > &  new_values 
)
virtual

Replace a range of values.

Use this only when columnMode() is Text

Reimplemented in ColumnStringIO, and Column.

Definition at line 423 of file AbstractColumn.cpp.

◆ replaceValues()

void AbstractColumn::replaceValues ( int  first,
const QVector< double > &  new_values 
)
virtual

Replace a range of values.

Use this only when columnMode() is Numeric

Reimplemented in Column.

Definition at line 517 of file AbstractColumn.cpp.

◆ reset

void AbstractColumn::reset ( const AbstractColumn source)
signal

◆ rowCount()

◆ rowsAboutToBeInserted

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

Rows will be inserted.

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

Referenced by AbstractFilter::input(), and AbstractSimpleFilter::inputRowsAboutToBeInserted().

◆ rowsAboutToBeRemoved

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

Rows will be deleted.

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

Referenced by AbstractFilter::input(), and AbstractSimpleFilter::inputRowsAboutToBeRemoved().

◆ rowsInserted

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

Rows have been inserted.

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

Referenced by SpreadsheetModel::handleAspectAdded(), AbstractFilter::input(), and AbstractSimpleFilter::inputRowsInserted().

◆ rowsRemoved

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

Rows have been deleted.

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

Referenced by SpreadsheetModel::handleAspectAdded(), AbstractFilter::input(), and AbstractSimpleFilter::inputRowsRemoved().

◆ setBigIntAt()

void AbstractColumn::setBigIntAt ( int  row,
qint64  new_value 
)
virtual

Set the content of row 'row'.

Use this only when columnMode() is BigInt

Reimplemented in Column.

Definition at line 564 of file AbstractColumn.cpp.

◆ setColumnMode()

void AbstractColumn::setColumnMode ( AbstractColumn::ColumnMode  )
virtual

Set the column mode.

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

Reimplemented in Column.

Definition at line 157 of file AbstractColumn.cpp.

◆ setDateAt()

void AbstractColumn::setDateAt ( int  row,
QDate  new_value 
)
virtual

Set the content of row 'row'.

Use this only when columnMode() is DateTime, Month or Day

Reimplemented in Column.

Definition at line 442 of file AbstractColumn.cpp.

◆ setDateTimeAt()

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

Set the content of row 'row'.

Use this only when columnMode() is DateTime, Month or Day

Reimplemented in Column.

Definition at line 480 of file AbstractColumn.cpp.

◆ setFormula() [1/2]

void AbstractColumn::setFormula ( const Interval< int > &  i,
const QString &  formula 
)
virtual

Set a formula string for an interval of rows.

Reimplemented in Column.

Definition at line 374 of file AbstractColumn.cpp.

References formula().

◆ setFormula() [2/2]

void AbstractColumn::setFormula ( int  row,
const QString &  formula 
)
virtual

Overloaded function for convenience.

Reimplemented in Column.

Definition at line 381 of file AbstractColumn.cpp.

References formula().

◆ setIntegerAt()

void AbstractColumn::setIntegerAt ( int  row,
int  new_value 
)
virtual

Set the content of row 'row'.

Use this only when columnMode() is Integer

Reimplemented in Column.

Definition at line 536 of file AbstractColumn.cpp.

◆ setMasked() [1/2]

void AbstractColumn::setMasked ( const Interval< int > &  i,
bool  mask = true 
)

Set an interval masked.

Parameters
ithe interval
masktrue: mask, false: unmask

Definition at line 325 of file AbstractColumn.cpp.

References AbstractColumnSetMaskedCmd, d, and AbstractAspect::exec().

Referenced by Spreadsheet::copy(), SpreadsheetView::maskSelection(), MaskValuesTask::run(), setMasked(), SpreadsheetView::unmaskSelection(), and XmlReadMask().

◆ setMasked() [2/2]

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

Overloaded function for convenience.

Definition at line 333 of file AbstractColumn.cpp.

References setMasked().

◆ setPlotDesignation()

void AbstractColumn::setPlotDesignation ( AbstractColumn::PlotDesignation  pd)
virtual

Set the column plot designation.

Reimplemented in Column.

Definition at line 245 of file AbstractColumn.cpp.

◆ setTextAt()

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

Set the content of row 'row'.

Use this only when columnMode() is Text

Reimplemented in Column, and ColumnStringIO.

Definition at line 414 of file AbstractColumn.cpp.

◆ setTimeAt()

void AbstractColumn::setTimeAt ( int  row,
QTime  new_value 
)
virtual

Set the content of row 'row'.

Use this only when columnMode() is DateTime, Month or Day

Reimplemented in Column.

Definition at line 461 of file AbstractColumn.cpp.

◆ setValueAt()

void AbstractColumn::setValueAt ( int  row,
double  new_value 
)
virtual

Set the content of row 'row'.

Use this only when columnMode() is Numeric

Reimplemented in Column.

Definition at line 508 of file AbstractColumn.cpp.

◆ textAt()

QString AbstractColumn::textAt ( int  row) const
virtual

Return the content of row 'row'.

Use this only when columnMode() is Text

Reimplemented in SimpleFilterColumn, Column, and ColumnStringIO.

Definition at line 404 of file AbstractColumn.cpp.

Referenced by ColumnPrivate::copy(), isValid(), Column::setFromColumn(), ColumnStringIO::textAt(), HistogramPrivate::updateValues(), and XYCurvePrivate::updateValues().

◆ timeAt()

QTime AbstractColumn::timeAt ( int  row) const
virtual

Return the time part of row 'row'.

Use this only when columnMode() is DateTime, Month or Day

Reimplemented in SimpleFilterColumn, and Column.

Definition at line 451 of file AbstractColumn.cpp.

◆ timeFormats()

QStringList AbstractColumn::timeFormats ( )
static

◆ valueAt()

◆ XmlReadMask()

bool AbstractColumn::XmlReadMask ( XmlStreamReader reader)
protected

◆ XmlWriteMask()

void AbstractColumn::XmlWriteMask ( QXmlStreamWriter *  writer) const
protected

Write XML mask element.

Definition at line 760 of file AbstractColumn.cpp.

References maskedIntervals().

Referenced by Column::save().

Friends And Related Function Documentation

◆ AbstractColumnClearMasksCmd

friend class AbstractColumnClearMasksCmd
friend

Definition at line 249 of file AbstractColumn.h.

Referenced by clearMasks().

◆ AbstractColumnInsertRowsCmd

friend class AbstractColumnInsertRowsCmd
friend

Definition at line 248 of file AbstractColumn.h.

Referenced by handleRowInsertion().

◆ AbstractColumnRemoveRowsCmd

friend class AbstractColumnRemoveRowsCmd
friend

Definition at line 247 of file AbstractColumn.h.

Referenced by handleRowRemoval().

◆ AbstractColumnSetMaskedCmd

friend class AbstractColumnSetMaskedCmd
friend

Definition at line 250 of file AbstractColumn.h.

Referenced by setMasked().

Member Data Documentation

◆ d

AbstractColumnPrivate* AbstractColumn::d
private

The documentation for this class was generated from the following files: