Worksheet
C++ SDK API Documentation - Worksheet
-
class Worksheet : public AbstractPart
Top-level container for worksheet elements like plot, labels, etc.
The worksheet is, besides the data containers
Spreadsheet
andMatrix
, another central part of the application and provides an area for showing and grouping together different kinds of worksheet objects - plots, labels &etc;Public Functions
-
virtual QIcon icon() const override
Return an icon to be used for decorating my views.
-
virtual QMenu *createContextMenu() override
Return a new context menu. The caller takes ownership of the menu.
-
virtual QWidget *view() const override
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.
-
virtual QVector<AbstractAspect*> dependsOn() const override
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
-
virtual QVector<AspectType> pasteTypes() const override
return the list of all aspect types that can be copy&pasted into the current aspect. returns an empty list on default, needs to be re-implemented in all derived classes that want to allow other aspects to be pasted into.
-
virtual void save(QXmlStreamWriter*) const override
Save as XML.
-
virtual bool load(XmlStreamReader*, bool preview) override
Load from XML.
-
void setItemSelectedInView(const QGraphicsItem*, const bool)
Emits the signal to select or to deselect the aspect corresponding to
QGraphicsItem
item
in the project explorer, ifselected=true
orselected=false
, respectively. The signal is handled inAspectTreeModel
and forwarded to the tree view inProjectExplorer
. This function is called inWorksheetView
upon selection changes.
-
void setSelectedInView(const bool)
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.
-
CartesianPlot *plot(int index)
-
- Parameters:
index – Number of plot which should be returned
- Returns:
Pointer to the CartesianPlot which was searched with index
Public Slots
-
void updateCurveBackground(QColor, const QString &curveName)
Updates the background of the cuves entry in the treeview
- Parameters:
pen – Pen of the curve
curveName – Curve name to find in treemodel
-
void updateCompleteCursorTreeModel()
Worksheet::updateCompleteCursorTreeModel If the plot or the curve are not available, the plot/curve is not in the treemodel!
-
void cursorPosChanged(int cursorNumber, double xPos)
Worksheet::cursorPosChanged Updates the cursor treemodel with the new data.
- Parameters:
xPos – new position of the cursor It is assumed, that the plots/curves are in the same order than receiving from the children() function. It’s not checked if the names are the same
-
virtual QIcon icon() const override