Loading...
Searching...
No Matches
Scenario::NodalIntervalView Class Referencefinal
Inheritance diagram for Scenario::NodalIntervalView:
score::EmptyRectItem score::ResizeableItem

Public Types

enum  ItemsToShow { AllItems , OnlyEffects }
 
- Public Types inherited from score::EmptyRectItem
enum  { Type = UserType + 80002 }
 
- Public Types inherited from score::ResizeableItem
enum  { Type = UserType + 80000 }
 

Public Member Functions

 NodalIntervalView (ItemsToShow sh, const IntervalModel &model, const Process::Context &ctx, QGraphicsItem *parent)
 
void on_drop (QPointF pos, const QMimeData *data)
 
void on_playPercentageChanged (double t, TimeVal parent_dur)
 
void recenter ()
 Fits all the nodes in the view.
 
void recenterRelativeToView ()
 Places the canvas so that the model's nodal center is at viewportCenter(), at the model's scale.
 
void panBy (QPointF delta)
 Moves the canvas by delta (scene units), as dragging its background does.
 
void rescale ()
 
void zoomPlus ()
 
void zoomMinus ()
 
void zoomTo (double newZoomLevel)
 
void reveal (const Process::NodeItem &item)
 
QRectF enclosingRect () const noexcept
 
QGraphicsItem & nodeContainer () const noexcept
 
double zoom () const noexcept
 
const IntervalModel & model () const noexcept
 
QPointF pastePosition (QPointF scenePos) const
 
int type () const override
 
void openProcessPicker (QPointF nodePos)
 
- Public Member Functions inherited from score::EmptyRectItem
 EmptyRectItem (QGraphicsItem *parent)
 
void setRect (const QRectF &r)
 
const QRectF & rect () const noexcept
 
QRectF boundingRect () const final override
 
void fitChildrenRect ()
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
 
int type () const override
 
- Public Member Functions inherited from score::ResizeableItem
 ResizeableItem (QGraphicsItem *parent)
 
void sizeChanged (QSizeF sz)
 
void childrenSizeChanged ()
 
double minimumHeight () const noexcept
 
void setMinimumHeight (double w)
 
void minimumHeightChanged (double w)
 
double minimumWidth () const noexcept
 
void setMinimumWidth (double w)
 
void minimumWidthChanged (double w)
 
int type () const override
 

Additional Inherited Members

- Protected Attributes inherited from score::EmptyRectItem
QRectF m_rect {}
 
- Protected Attributes inherited from score::ResizeableItem
double m_minimumHeight {}
 
double m_minimumWidth {}
 

Member Function Documentation

◆ openProcessPicker()

void Scenario::NodalIntervalView::openProcessPicker ( QPointF  nodePos)

Asks which process to add, and adds it with its node at nodePos (nodeContainer() coordinates).

◆ pastePosition()

QPointF Scenario::NodalIntervalView::pastePosition ( QPointF  scenePos) const

Where to put what is pasted, in nodeContainer() coordinates: at scenePos when it is over the visible part of this item, else in the middle of it.

◆ recenterRelativeToView()

void Scenario::NodalIntervalView::recenterRelativeToView ( )

Places the canvas so that the model's nodal center is at viewportCenter(), at the model's scale.

Called whenever the view's geometry changes; what is at the center stays there. The first time, when the model has no center yet (new or older document), the center of the nodes is taken and stored.

◆ reveal()

void Scenario::NodalIntervalView::reveal ( const Process::NodeItem &  item)

Pans, and zooms out if needed, so that the node is in the visible part, and keeps it there while it is laid out; the canvas stops following all of its nodes, as after a pan by the user.

◆ zoom()

double Scenario::NodalIntervalView::zoom ( ) const
inlinenoexcept

The scale of nodeContainer(). It is set as its transform, not its scale: Qt tells the items inside about a new transform (ports keep their panels and cables on them), never about a new scale.


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