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)  

Worksheet Class Reference

Top-level container for worksheet elements like plot, labels, etc. More...

#include <Worksheet.h>

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

Public Types

enum class  Unit { Millimeter , Centimeter , Inch , Point }
 
enum class  Layout { NoLayout , VerticalLayout , HorizontalLayout , GridLayout }
 
enum class  CartesianPlotActionMode { ApplyActionToSelection , ApplyActionToAll }
 
typedef WorksheetPrivate Private
 
- Public Types inherited from AbstractAspect
enum class  ChildIndexFlag { IncludeHidden = 0x01 , Recursive = 0x02 , Compress = 0x04 }
 Flags which control numbering scheme of children. More...
 

Public Slots

void setTheme (const QString &)
 
void cartesianPlotMousePressZoomSelectionMode (QPointF logicPos)
 
void cartesianPlotMousePressCursorMode (int cursorNumber, QPointF logicPos)
 
void cartesianPlotMouseMoveZoomSelectionMode (QPointF logicPos)
 
void cartesianPlotMouseMoveCursorMode (int cursorNumber, QPointF logicPos)
 
void cartesianPlotMouseReleaseZoomSelectionMode ()
 
void cartesianPlotMouseHoverZoomSelectionMode (QPointF logicPos)
 
void cartesianPlotMouseHoverOutsideDataRect ()
 
void cartesianPlotMouseModeChangedSlot (CartesianPlot::MouseMode)
 
void updateCurveBackground (const QPen &, const QString &curveName)
 
void updateCompleteCursorTreeModel ()
 Worksheet::updateCompleteCursorTreeModel If the plot or the curve are not available, the plot/curve is not in the treemodel! More...
 
void cursorPosChanged (int cursorNumber, double xPos)
 Worksheet::cursorPosChanged Updates the cursor treemodel with the new data. More...
 
void curveAdded (const XYCurve *curve)
 
void curveRemoved (const XYCurve *curve)
 
void curveDataChanged (const XYCurve *curve)
 
- 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...
 

Signals

void requestProjectContextMenu (QMenu *)
 
void itemSelected (QGraphicsItem *)
 
void itemDeselected (QGraphicsItem *)
 
void requestUpdate ()
 
void useViewSizeRequested ()
 
void cartesianPlotMouseModeChanged (CartesianPlot::MouseMode)
 
void showCursorDock (TreeModel *, QVector< CartesianPlot * >)
 
void propertiesExplorerRequested ()
 
void backgroundTypeChanged (PlotArea::BackgroundType)
 
void backgroundColorStyleChanged (PlotArea::BackgroundColorStyle)
 
void backgroundImageStyleChanged (PlotArea::BackgroundImageStyle)
 
void backgroundBrushStyleChanged (Qt::BrushStyle)
 
void backgroundFirstColorChanged (const QColor &)
 
void backgroundSecondColorChanged (const QColor &)
 
void backgroundFileNameChanged (const QString &)
 
void backgroundOpacityChanged (float)
 
void scaleContentChanged (bool)
 
void pageRectChanged (const QRectF &)
 
void layoutChanged (Worksheet::Layout)
 
void layoutTopMarginChanged (float)
 
void layoutBottomMarginChanged (float)
 
void layoutLeftMarginChanged (float)
 
void layoutRightMarginChanged (float)
 
void layoutVerticalSpacingChanged (float)
 
void layoutHorizontalSpacingChanged (float)
 
void layoutRowCountChanged (int)
 
void layoutColumnCountChanged (int)
 
void themeChanged (const QString &)
 
- Signals inherited from AbstractPart
void showRequested ()
 
void importFromFileRequested ()
 
void importFromSQLDatabaseRequested ()
 
void exportRequested ()
 
void printRequested ()
 
void printPreviewRequested ()
 
- 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

 Worksheet (const QString &name, bool loading=false)
 
 ~Worksheet () override
 
QIcon icon () const override
 Return an icon to be used for decorating my views. More...
 
QMenu * createContextMenu () override
 
QWidget * view () const override
 Construct a primary view on me. More...
 
QVector< AbstractAspect * > dependsOn () const override
 
bool exportView () const override
 
bool printView () override
 
bool printPreview () const override
 
void save (QXmlStreamWriter *) const override
 Save as XML. More...
 
bool load (XmlStreamReader *, bool preview) override
 Load from XML. More...
 
QRectF pageRect () const
 
void setPageRect (const QRectF &)
 
QGraphicsScene * scene () const
 
void update ()
 
void setPrinting (bool) const
 
void setThemeName (const QString &)
 
void setItemSelectedInView (const QGraphicsItem *, const bool)
 
void setSelectedInView (const bool)
 
void deleteAspectFromGraphicsItem (const QGraphicsItem *)
 
void setIsClosing ()
 
void suppressSelectionChangedEvent (bool)
 
CartesianPlotActionMode cartesianPlotActionMode ()
 
void setCartesianPlotActionMode (CartesianPlotActionMode mode)
 
CartesianPlotActionMode cartesianPlotCursorMode ()
 
void setCartesianPlotCursorMode (CartesianPlotActionMode mode)
 
void setPlotsLocked (bool)
 
bool plotsLocked ()
 
int getPlotCount ()
 Worksheet::getPlotCount. More...
 
CartesianPlotgetPlot (int index)
 Worksheet::getPlot. More...
 
TreeModelcursorModel ()
 
void cursorModelPlotAdded (const QString &name)
 
void cursorModelPlotRemoved (const QString &name)
 
QString theme () const
 
void setSuppressLayoutUpdate (bool)
 
void updateLayout ()
 
void registerShortcuts () override
 
void unregisterShortcuts () override
 
- Public Member Functions inherited from AbstractPart
 AbstractPart (const QString &name, AspectType type)
 
 ~AbstractPart () override
 
void deleteView () const
 
PartMdiViewmdiSubWindow () const
 Wrap the view() into a PartMdiView. More...
 
bool hasMdiSubWindow () const
 
bool isDraggable () const override
 
QVector< AspectTypedropableOn () const override
 
- 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
 
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 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...
 

Static Public Member Functions

static double convertToSceneUnits (const double value, const Worksheet::Unit unit)
 
static double convertFromSceneUnits (const double value, const Worksheet::Unit unit)
 

Private Slots

void handleAspectAdded (const AbstractAspect *)
 
void handleAspectAboutToBeRemoved (const AbstractAspect *)
 
void handleAspectRemoved (const AbstractAspect *parent, const AbstractAspect *before, const AbstractAspect *child)
 
void childSelected (const AbstractAspect *) override
 
void childDeselected (const AbstractAspect *) override
 

Private Member Functions

void init ()
 
WorksheetElementaspectFromGraphicsItem (const WorksheetElement *, const QGraphicsItem *) const
 
void loadTheme (const QString &)
 

Private Attributes

WorksheetPrivate *const d
 
WorksheetViewm_view {nullptr}
 

Friends

class WorksheetPrivate
 

Additional Inherited Members

- Protected Slots inherited from AbstractAspect
virtual void childSelected (const AbstractAspect *)
 
virtual void childDeselected (const AbstractAspect *)
 
- 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...
 
- Protected Attributes inherited from AbstractPart
QWidget * m_partView {nullptr}
 
- Protected Attributes inherited from AbstractAspect
const AspectType m_type
 

Detailed Description

Top-level container for worksheet elements like plot, labels, etc.

File : Worksheet.cpp Project : LabPlot

Description : Worksheet

Copyright : (C) 2009 Tilman Benkert (thzs@.nosp@m.gmx..nosp@m.net) Copyright : (C) 2011-2020 by Alexander Semke (alexa.nosp@m.nder.nosp@m..semk.nosp@m.e@we.nosp@m.b.de)

  • 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 worksheet is, besides the data containers Spreadsheet and Matrix, another central part of the application and provides an area for showing and grouping together different kinds of worksheet objects - plots, labels

Definition at line 46 of file Worksheet.h.

Member Typedef Documentation

◆ Private

Definition at line 127 of file Worksheet.h.

Member Enumeration Documentation

◆ CartesianPlotActionMode

Enumerator
ApplyActionToSelection 
ApplyActionToAll 

Definition at line 55 of file Worksheet.h.

◆ Layout

enum Worksheet::Layout
strong
Enumerator
NoLayout 
VerticalLayout 
HorizontalLayout 
GridLayout 

Definition at line 54 of file Worksheet.h.

◆ Unit

enum Worksheet::Unit
strong
Enumerator
Millimeter 
Centimeter 
Inch 
Point 

Definition at line 53 of file Worksheet.h.

Constructor & Destructor Documentation

◆ Worksheet()

Worksheet::Worksheet ( const QString &  name,
bool  loading = false 
)
explicit

◆ ~Worksheet()

Worksheet::~Worksheet ( )
override

Definition at line 73 of file Worksheet.cpp.

References d.

Member Function Documentation

◆ aspectFromGraphicsItem()

WorksheetElement * Worksheet::aspectFromGraphicsItem ( const WorksheetElement aspect,
const QGraphicsItem *  item 
) const
private

helper function: checks whether aspect or one of its children has the GraphicsItem item Returns a pointer to WorksheetElement having this item.

Definition at line 358 of file Worksheet.cpp.

References AbstractAspect::child(), AbstractAspect::children(), WorksheetElement::graphicsItem(), and AbstractAspect::IncludeHidden.

Referenced by deleteAspectFromGraphicsItem(), and setItemSelectedInView().

◆ backgroundBrushStyleChanged

void Worksheet::backgroundBrushStyleChanged ( Qt::BrushStyle  )
signal

◆ backgroundColorStyleChanged

void Worksheet::backgroundColorStyleChanged ( PlotArea::BackgroundColorStyle  )
signal

◆ backgroundFileNameChanged

void Worksheet::backgroundFileNameChanged ( const QString &  )
signal

◆ backgroundFirstColorChanged

void Worksheet::backgroundFirstColorChanged ( const QColor &  )
signal

◆ backgroundImageStyleChanged

void Worksheet::backgroundImageStyleChanged ( PlotArea::BackgroundImageStyle  )
signal

◆ backgroundOpacityChanged

void Worksheet::backgroundOpacityChanged ( float  )
signal

◆ backgroundSecondColorChanged

void Worksheet::backgroundSecondColorChanged ( const QColor &  )
signal

◆ backgroundTypeChanged

void Worksheet::backgroundTypeChanged ( PlotArea::BackgroundType  )
signal

◆ cartesianPlotActionMode()

◆ cartesianPlotCursorMode()

◆ cartesianPlotMouseHoverOutsideDataRect

void Worksheet::cartesianPlotMouseHoverOutsideDataRect ( )
slot

◆ cartesianPlotMouseHoverZoomSelectionMode

void Worksheet::cartesianPlotMouseHoverZoomSelectionMode ( QPointF  logicPos)
slot

◆ cartesianPlotMouseModeChanged

void Worksheet::cartesianPlotMouseModeChanged ( CartesianPlot::MouseMode  )
signal

◆ cartesianPlotMouseModeChangedSlot

void Worksheet::cartesianPlotMouseModeChangedSlot ( CartesianPlot::MouseMode  mode)
slot

◆ cartesianPlotMouseMoveCursorMode

void Worksheet::cartesianPlotMouseMoveCursorMode ( int  cursorNumber,
QPointF  logicPos 
)
slot

◆ cartesianPlotMouseMoveZoomSelectionMode

void Worksheet::cartesianPlotMouseMoveZoomSelectionMode ( QPointF  logicPos)
slot

◆ cartesianPlotMousePressCursorMode

void Worksheet::cartesianPlotMousePressCursorMode ( int  cursorNumber,
QPointF  logicPos 
)
slot

◆ cartesianPlotMousePressZoomSelectionMode

void Worksheet::cartesianPlotMousePressZoomSelectionMode ( QPointF  logicPos)
slot

◆ cartesianPlotMouseReleaseZoomSelectionMode

void Worksheet::cartesianPlotMouseReleaseZoomSelectionMode ( )
slot

◆ childDeselected

void Worksheet::childDeselected ( const AbstractAspect aspect)
overrideprivateslot

this slot is called when a worksheet element is deselected in the project explorer. emits itemDeselected() which forwards this event to WorksheetView in order to deselect the corresponding QGraphicsItem.

Definition at line 323 of file Worksheet.cpp.

References itemDeselected().

◆ childSelected

void Worksheet::childSelected ( const AbstractAspect aspect)
overrideprivateslot

this slot is called when a worksheet element is selected in the project explorer. emits itemSelected() which forwards this event to the WorksheetView in order to select the corresponding QGraphicsItem.

Definition at line 312 of file Worksheet.cpp.

References itemSelected().

◆ convertFromSceneUnits()

double Worksheet::convertFromSceneUnits ( const double  value,
const Worksheet::Unit  unit 
)
static

converts from the scene units to unit . At the moment, 1 scene unit corresponds to 1/10 mm.

Definition at line 131 of file Worksheet.cpp.

References Centimeter, Inch, Millimeter, and Point.

Referenced by AxisDock::axisArrowSizeChanged(), AxisDock::axisLabelsFontChanged(), AxisDock::axisLabelsOffsetChanged(), AxisDock::axisLinePenChanged(), AxisDock::axisMajorGridPenChanged(), AxisDock::axisMajorTicksLengthChanged(), AxisDock::axisMajorTicksPenChanged(), AxisDock::axisMinorGridPenChanged(), AxisDock::axisMinorTicksLengthChanged(), AxisDock::axisMinorTicksPenChanged(), XYCurveDock::curveDropLinePenChanged(), HistogramDock::curveErrorBarsCapSizeChanged(), XYCurveDock::curveErrorBarsCapSizeChanged(), HistogramDock::curveErrorBarsPenChanged(), XYCurveDock::curveErrorBarsPenChanged(), HistogramDock::curveLinePenChanged(), XYCurveDock::curveLinePenChanged(), HistogramDock::curveSymbolsPenChanged(), XYCurveDock::curveSymbolsPenChanged(), HistogramDock::curveSymbolsSizeChanged(), XYCurveDock::curveSymbolsSizeChanged(), HistogramDock::curveValuesDistanceChanged(), XYCurveDock::curveValuesDistanceChanged(), HistogramDock::curveValuesFontChanged(), XYCurveDock::curveValuesFontChanged(), DatapickerImageView::DatapickerImageView(), WorksheetView::exportToClipboard(), WorksheetView::exportToFile(), DatapickerImageView::exportToFile(), ImageDock::imageBorderPenChanged(), ImageDock::imageHeightChanged(), ImageDock::imagePositionChanged(), ImageDock::imageWidthChanged(), LabelWidget::labelBorderPenChanged(), LabelWidget::labelOffsetxChanged(), LabelWidget::labelOffsetyChanged(), LabelWidget::labelPositionChanged(), CartesianPlotLegendDock::legendBorderCornerRadiusChanged(), CartesianPlotLegendDock::legendBorderPenChanged(), CartesianPlotLegendDock::legendLabelFontChanged(), CartesianPlotLegendDock::legendLayoutBottomMarginChanged(), CartesianPlotLegendDock::legendLayoutHorizontalSpacingChanged(), CartesianPlotLegendDock::legendLayoutLeftMarginChanged(), CartesianPlotLegendDock::legendLayoutRightMarginChanged(), CartesianPlotLegendDock::legendLayoutTopMarginChanged(), CartesianPlotLegendDock::legendLayoutVerticalSpacingChanged(), CartesianPlotLegendDock::legendLineSymbolWidthChanged(), CartesianPlotLegendDock::legendPositionChanged(), ReferenceLineDock::linePenChanged(), AxisDock::load(), CartesianPlotDock::load(), CartesianPlotLegendDock::load(), CustomPointDock::load(), ImageDock::load(), ReferenceLineDock::load(), WorksheetDock::load(), XYCurveDock::load(), DatapickerCurveWidget::load(), DatapickerImageWidget::load(), LabelWidget::load(), AxisDock::loadConfig(), CartesianPlotDock::loadConfig(), CartesianPlotLegendDock::loadConfig(), CustomPointDock::loadConfig(), HistogramDock::loadConfig(), WorksheetDock::loadConfig(), XYCurveDock::loadConfig(), LabelWidget::loadConfig(), PlotDataDialog::plot(), CartesianPlotDock::plotBorderCornerRadiusChanged(), CartesianPlotDock::plotBorderPenChanged(), CartesianPlotDock::plotBottomPaddingChanged(), CartesianPlotDock::plotCursorPenChanged(), CartesianPlotDock::plotHorizontalPaddingChanged(), CartesianPlotDock::plotRectChanged(), CartesianPlotDock::plotRightPaddingChanged(), CartesianPlotDock::plotVerticalPaddingChanged(), CustomPointDock::pointSymbolPenChanged(), CustomPointDock::pointSymbolSizeChanged(), WorksheetView::presenterMode(), DatapickerImageView::print(), AxisDock::saveConfigAsTemplate(), CartesianPlotLegendDock::saveConfigAsTemplate(), DatapickerCurveWidget::symbolErrorBarSizeChanged(), DatapickerCurveWidget::symbolPenChanged(), DatapickerImageWidget::symbolPenChanged(), DatapickerCurveWidget::symbolSizeChanged(), DatapickerImageWidget::symbolSizeChanged(), WorksheetDock::worksheetLayoutBottomMarginChanged(), WorksheetDock::worksheetLayoutHorizontalSpacingChanged(), WorksheetDock::worksheetLayoutLeftMarginChanged(), WorksheetDock::worksheetLayoutRightMarginChanged(), WorksheetDock::worksheetLayoutTopMarginChanged(), WorksheetDock::worksheetLayoutVerticalSpacingChanged(), WorksheetDock::worksheetPageRectChanged(), and WorksheetView::WorksheetView().

◆ convertToSceneUnits()

double Worksheet::convertToSceneUnits ( const double  value,
const Worksheet::Unit  unit 
)
static

converts from unit to the scene units. At the moment, 1 scene unit corresponds to 1/10 mm.

Definition at line 113 of file Worksheet.cpp.

References Centimeter, Inch, Millimeter, and Point.

Referenced by AxisDock::arrowSizeChanged(), CartesianPlotDock::borderCornerRadiusChanged(), CartesianPlotLegendDock::borderCornerRadiusChanged(), CartesianPlotDock::borderWidthChanged(), CartesianPlotLegendDock::borderWidthChanged(), ImageDock::borderWidthChanged(), DatapickerCurveWidget::borderWidthChanged(), LabelWidget::borderWidthChanged(), CartesianPlotDock::bottomPaddingChanged(), DatapickerImageView::changeZoom(), WorksheetView::changeZoom(), CartesianPlotDock::cursorLineWidthChanged(), CartesianPlotLegendDock::customPositionXChanged(), ImageDock::customPositionXChanged(), LabelWidget::customPositionXChanged(), CartesianPlotLegendDock::customPositionYChanged(), ImageDock::customPositionYChanged(), LabelWidget::customPositionYChanged(), DatapickerImageView::DatapickerImageView(), XYCurveDock::dropLineWidthChanged(), HistogramDock::errorBarsCapSizeChanged(), XYCurveDock::errorBarsCapSizeChanged(), DatapickerCurveWidget::errorBarSizeChanged(), HistogramDock::errorBarsWidthChanged(), XYCurveDock::errorBarsWidthChanged(), CartesianPlotDock::geometryChanged(), ImageDock::heightChanged(), CartesianPlotDock::horizontalPaddingChanged(), DatapickerCurve::init(), DatapickerImage::init(), DatapickerPoint::init(), Axis::init(), CartesianPlot::init(), CartesianPlotLegend::init(), CustomPoint::init(), Histogram::init(), ReferenceLine::init(), XYCurve::init(), PlotArea::init(), init(), CartesianPlotLegendDock::labelFontChanged(), AxisDock::labelsFontChanged(), AxisDock::labelsOffsetChanged(), CartesianPlotLegendDock::layoutBottomMarginChanged(), WorksheetDock::layoutBottomMarginChanged(), CartesianPlotLegendDock::layoutHorizontalSpacingChanged(), WorksheetDock::layoutHorizontalSpacingChanged(), CartesianPlotLegendDock::layoutLeftMarginChanged(), WorksheetDock::layoutLeftMarginChanged(), CartesianPlotLegendDock::layoutRightMarginChanged(), WorksheetDock::layoutRightMarginChanged(), CartesianPlotLegendDock::layoutTopMarginChanged(), WorksheetDock::layoutTopMarginChanged(), CartesianPlotLegendDock::layoutVerticalSpacingChanged(), WorksheetDock::layoutVerticalSpacingChanged(), CartesianPlotLegendDock::lineSymbolWidthChanged(), AxisDock::lineWidthChanged(), HistogramDock::lineWidthChanged(), XYCurveDock::lineWidthChanged(), OriginProjectParser::loadAxis(), OriginProjectParser::loadCurve(), Axis::loadThemeConfig(), Histogram::loadThemeConfig(), XYCurve::loadThemeConfig(), CartesianPlotLegend::loadThemeConfig(), PlotArea::loadThemeConfig(), AxisDock::majorGridWidthChanged(), AxisDock::majorTicksLengthChanged(), AxisDock::majorTicksWidthChanged(), AxisDock::minorGridWidthChanged(), AxisDock::minorTicksLengthChanged(), AxisDock::minorTicksWidthChanged(), WorksheetView::mouseMoveEvent(), LabelWidget::offsetXChanged(), LabelWidget::offsetYChanged(), CartesianPlotLegendPrivate::paint(), PlotDataDialog::plot(), DatapickerImageWidget::pointsBorderWidthChanged(), DatapickerImageWidget::pointsSizeChanged(), WorksheetView::processResize(), CartesianPlotDock::rightPaddingChanged(), LabelWidget::saveConfig(), AxisDock::saveConfigAsTemplate(), CartesianPlotDock::saveConfigAsTemplate(), CartesianPlotLegendDock::saveConfigAsTemplate(), CustomPointDock::saveConfigAsTemplate(), HistogramDock::saveConfigAsTemplate(), WorksheetDock::saveConfigAsTemplate(), XYCurveDock::saveConfigAsTemplate(), CartesianPlot::setType(), DatapickerCurveWidget::sizeChanged(), WorksheetDock::sizeChanged(), CustomPointDock::symbolBorderWidthChanged(), HistogramDock::symbolsBorderWidthChanged(), XYCurveDock::symbolsBorderWidthChanged(), CustomPointDock::symbolSizeChanged(), HistogramDock::symbolsSizeChanged(), XYCurveDock::symbolsSizeChanged(), ImagePrivate::updateImage(), DatapickerImageView::updateMagnificationWindow(), CartesianPlotLegendPrivate::updatePosition(), DatapickerImagePrivate::uploadImage(), HistogramDock::valuesDistanceChanged(), XYCurveDock::valuesDistanceChanged(), HistogramDock::valuesFontChanged(), XYCurveDock::valuesFontChanged(), CartesianPlotDock::verticalPaddingChanged(), ImageDock::widthChanged(), ReferenceLineDock::widthChanged(), and WorksheetView::WorksheetView().

◆ createContextMenu()

QMenu * Worksheet::createContextMenu ( )
overridevirtual

Return a new context menu. The caller takes ownership of the menu.

Reimplemented from AbstractPart.

Definition at line 153 of file Worksheet.cpp.

References AbstractPart::createContextMenu(), and requestProjectContextMenu().

◆ cursorModel()

◆ cursorModelPlotAdded()

void Worksheet::cursorModelPlotAdded ( const QString &  name)

Definition at line 927 of file Worksheet.cpp.

References AbstractAspect::name(), and updateCompleteCursorTreeModel().

Referenced by handleAspectAdded().

◆ cursorModelPlotRemoved()

void Worksheet::cursorModelPlotRemoved ( const QString &  name)

◆ cursorPosChanged

void Worksheet::cursorPosChanged ( int  cursorNumber,
double  xPos 
)
slot

◆ curveAdded

◆ curveDataChanged

◆ curveRemoved

void Worksheet::curveRemoved ( const XYCurve curve)
slot

◆ deleteAspectFromGraphicsItem()

void Worksheet::deleteAspectFromGraphicsItem ( const QGraphicsItem *  item)

◆ dependsOn()

QVector< AbstractAspect * > Worksheet::dependsOn ( ) const
overridevirtual

returns the list of all parent aspects (folders and sub-folders) together with all the data containers required to plot the data in the worksheet

Reimplemented from AbstractAspect.

Definition at line 180 of file Worksheet.cpp.

References AbstractAspect::dependsOn().

◆ exportView()

bool Worksheet::exportView ( ) const
overridevirtual

◆ getPlot()

CartesianPlot * Worksheet::getPlot ( int  index)

Worksheet::getPlot.

Parameters
indexNumber of plot which should be returned
Returns
Pointer to the CartesianPlot which was searched with index

Definition at line 426 of file Worksheet.cpp.

Referenced by cursorPosChanged(), and updateCompleteCursorTreeModel().

◆ getPlotCount()

int Worksheet::getPlotCount ( )

Worksheet::getPlotCount.

Returns
number of CartesianPlot's in the Worksheet

Definition at line 417 of file Worksheet.cpp.

Referenced by cursorPosChanged(), and updateCompleteCursorTreeModel().

◆ handleAspectAboutToBeRemoved

void Worksheet::handleAspectAboutToBeRemoved ( const AbstractAspect aspect)
privateslot

Definition at line 280 of file Worksheet.cpp.

References d, and WorksheetPrivate::m_scene.

Referenced by Worksheet().

◆ handleAspectAdded

void Worksheet::handleAspectAdded ( const AbstractAspect aspect)
privateslot

Definition at line 228 of file Worksheet.cpp.

References AbstractAspect::aspectDescriptionChanged(), cartesianPlotMouseHoverOutsideDataRect(), cartesianPlotMouseHoverZoomSelectionMode(), cartesianPlotMouseModeChangedSlot(), cartesianPlotMouseMoveCursorMode(), cartesianPlotMouseMoveZoomSelectionMode(), cartesianPlotMousePressCursorMode(), cartesianPlotMousePressZoomSelectionMode(), cartesianPlotMouseReleaseZoomSelectionMode(), AbstractAspect::child(), cursorModelPlotAdded(), CartesianPlot::curveAdded(), curveAdded(), CartesianPlot::curveDataChanged(), curveDataChanged(), CartesianPlot::curveLinePenChanged(), CartesianPlot::curveNameChanged(), CartesianPlot::curveRemoved(), curveRemoved(), CartesianPlot::curveVisibilityChangedSignal(), d, AbstractAspect::IncludeHidden, AbstractAspect::isLoading(), WorksheetPrivate::layout, WorksheetPrivate::m_scene, CartesianPlot::mouseHoverOutsideDataRectSignal(), CartesianPlot::mouseHoverZoomSelectionModeSignal(), CartesianPlot::mouseModeChanged(), CartesianPlot::mouseMoveCursorModeSignal(), CartesianPlot::mouseMoveZoomSelectionModeSignal(), CartesianPlot::mousePressCursorModeSignal(), CartesianPlot::mousePressZoomSelectionModeSignal(), CartesianPlot::mouseReleaseZoomSelectionModeSignal(), NoLayout, AbstractAspect::parentAspect(), WorksheetPrivate::plotsLocked, CartesianPlot::setLocked(), WorksheetPrivate::theme, ThemeHandler::themeFilePath(), updateCompleteCursorTreeModel(), updateCurveBackground(), WorksheetPrivate::updateLayout(), and WorksheetElementContainer::visibleChanged().

Referenced by Worksheet().

◆ handleAspectRemoved

void Worksheet::handleAspectRemoved ( const AbstractAspect parent,
const AbstractAspect before,
const AbstractAspect child 
)
privateslot

◆ icon()

QIcon Worksheet::icon ( ) const
overridevirtual

Return an icon to be used for decorating my views.

Reimplemented from AbstractAspect.

Definition at line 146 of file Worksheet.cpp.

◆ init()

◆ itemDeselected

void Worksheet::itemDeselected ( QGraphicsItem *  )
signal

◆ itemSelected

void Worksheet::itemSelected ( QGraphicsItem *  )
signal

◆ layoutBottomMarginChanged

void Worksheet::layoutBottomMarginChanged ( float  )
signal

◆ layoutChanged

◆ layoutColumnCountChanged

void Worksheet::layoutColumnCountChanged ( int  )
signal

◆ layoutHorizontalSpacingChanged

void Worksheet::layoutHorizontalSpacingChanged ( float  )
signal

◆ layoutLeftMarginChanged

void Worksheet::layoutLeftMarginChanged ( float  )
signal

◆ layoutRightMarginChanged

void Worksheet::layoutRightMarginChanged ( float  )
signal

◆ layoutRowCountChanged

void Worksheet::layoutRowCountChanged ( int  )
signal

◆ layoutTopMarginChanged

void Worksheet::layoutTopMarginChanged ( float  )
signal

◆ layoutVerticalSpacingChanged

void Worksheet::layoutVerticalSpacingChanged ( float  )
signal

◆ load()

◆ loadTheme()

void Worksheet::loadTheme ( const QString &  theme)
private

◆ pageRect()

QRectF Worksheet::pageRect ( ) const

◆ pageRectChanged

void Worksheet::pageRectChanged ( const QRectF &  )
signal

◆ plotsLocked()

bool Worksheet::plotsLocked ( )

Definition at line 457 of file Worksheet.cpp.

References d, and WorksheetPrivate::plotsLocked.

Referenced by WorksheetView::initActions(), and load().

◆ printPreview()

bool Worksheet::printPreview ( ) const
overridevirtual

Implements AbstractPart.

Definition at line 222 of file Worksheet.cpp.

References m_view, and WorksheetView::print().

◆ printView()

bool Worksheet::printView ( )
overridevirtual

Implements AbstractPart.

Definition at line 210 of file Worksheet.cpp.

References m_view, and WorksheetView::print().

◆ propertiesExplorerRequested

void Worksheet::propertiesExplorerRequested ( )
signal

Referenced by MainWin::handleAspectAdded(), and view().

◆ registerShortcuts()

void Worksheet::registerShortcuts ( )
overridevirtual

Reimplemented from AbstractPart.

Definition at line 503 of file Worksheet.cpp.

References m_view, and WorksheetView::registerShortcuts().

◆ requestProjectContextMenu

void Worksheet::requestProjectContextMenu ( QMenu *  )
signal

◆ requestUpdate

void Worksheet::requestUpdate ( )
signal

◆ save()

◆ scaleContentChanged

void Worksheet::scaleContentChanged ( bool  )
signal

◆ scene()

QGraphicsScene * Worksheet::scene ( ) const

Definition at line 299 of file Worksheet.cpp.

References d, and WorksheetPrivate::m_scene.

Referenced by WorksheetView::WorksheetView().

◆ setCartesianPlotActionMode()

◆ setCartesianPlotCursorMode()

◆ setIsClosing()

void Worksheet::setIsClosing ( )

Definition at line 403 of file Worksheet.cpp.

References m_view, and WorksheetView::setIsClosing().

◆ setItemSelectedInView()

void Worksheet::setItemSelectedInView ( const QGraphicsItem *  item,
const bool  b 
)

Emits the signal to select or to deselect the aspect corresponding to QGraphicsItem item in the project explorer, if selected=true or selected=false, respectively. The signal is handled in AspectTreeModel and forwarded to the tree view in ProjectExplorer. This function is called in WorksheetView upon selection changes.

Definition at line 335 of file Worksheet.cpp.

References aspectFromGraphicsItem(), AbstractAspect::child(), AbstractAspect::childAspectDeselectedInView(), AbstractAspect::childAspectSelectedInView(), and AbstractAspect::IncludeHidden.

Referenced by WorksheetView::selectAllElements(), and WorksheetView::selectionChanged().

◆ setPageRect()

◆ setPlotsLocked()

void Worksheet::setPlotsLocked ( bool  lock)

◆ setPrinting()

void Worksheet::setPrinting ( bool  on) const

◆ setSelectedInView()

void Worksheet::setSelectedInView ( const bool  b)

Selects or deselects the worksheet in the project explorer. This function is called in WorksheetView. The worksheet gets deselected if there are selected items in the view, and selected if there are no selected items in the view.

Definition at line 377 of file Worksheet.cpp.

References AbstractAspect::childAspectDeselectedInView(), and AbstractAspect::childAspectSelectedInView().

Referenced by WorksheetView::dragEnterEvent(), WorksheetView::mousePressEvent(), and WorksheetView::selectionChanged().

◆ setSuppressLayoutUpdate()

void Worksheet::setSuppressLayoutUpdate ( bool  value)

Definition at line 441 of file Worksheet.cpp.

References d, and WorksheetPrivate::suppressLayoutUpdate.

Referenced by PlotDataDialog::addCurvesToPlots().

◆ setTheme

void Worksheet::setTheme ( const QString &  theme)
slot

Definition at line 724 of file Worksheet.cpp.

References i18n.

Referenced by WorksheetView::initMenus(), and OriginProjectParser::loadFolder().

◆ setThemeName()

void Worksheet::setThemeName ( const QString &  )

◆ showCursorDock

void Worksheet::showCursorDock ( TreeModel ,
QVector< CartesianPlot * >   
)
signal

◆ suppressSelectionChangedEvent()

◆ theme()

QString Worksheet::theme ( ) const

◆ themeChanged

void Worksheet::themeChanged ( const QString &  )
signal

◆ unregisterShortcuts()

void Worksheet::unregisterShortcuts ( )
overridevirtual

Reimplemented from AbstractPart.

Definition at line 507 of file Worksheet.cpp.

References m_view, and WorksheetView::unregisterShortcuts().

◆ update()

void Worksheet::update ( )

Definition at line 437 of file Worksheet.cpp.

References requestUpdate().

Referenced by WorksheetPrivate::update().

◆ updateCompleteCursorTreeModel

◆ updateCurveBackground

void Worksheet::updateCurveBackground ( const QPen &  pen,
const QString &  curveName 
)
slot

Updates the background of the cuves entry in the treeview

Parameters
penPen of the curve
curveNameCurve name to find in treemodel

Definition at line 1072 of file Worksheet.cpp.

References cursorModel(), TreeModel::index(), AbstractAspect::name(), WorksheetPrivate::PLOTNAME, TreeModel::rowCount(), TreeModel::setTreeData(), and WorksheetPrivate::SIGNALNAME.

Referenced by handleAspectAdded().

◆ updateLayout()

void Worksheet::updateLayout ( )

◆ useViewSizeRequested

void Worksheet::useViewSizeRequested ( )
signal

◆ view()

QWidget * Worksheet::view ( ) const
overridevirtual

Construct a primary view on me.

This method may be called multiple times during the life time of an Aspect, or it might not get called at all. Aspects must not depend on the existence of a view for their operation.

Implements AbstractPart.

Definition at line 165 of file Worksheet.cpp.

References cartesianPlotMouseModeChanged(), WorksheetView::cartesianPlotMouseModeChangedSlot(), AbstractPart::m_partView, m_view, propertiesExplorerRequested(), WorksheetView::propertiesExplorerRequested(), AbstractAspect::statusInfo(), and WorksheetView::statusInfo().

Referenced by MainWin::showPresenter(), and MainWin::updateGUI().

Friends And Related Function Documentation

◆ WorksheetPrivate

friend class WorksheetPrivate
friend

Definition at line 155 of file Worksheet.h.

Member Data Documentation

◆ d

◆ m_view

WorksheetView* Worksheet::m_view {nullptr}
mutableprivate

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