Loading...
Searching...
No Matches
Inheritance diagram for Gfx::OutletPreviewLayer:
Process::EffectLayerView Process::LayerView Gfx::GeometryViewer::Layer Ui::TextureView::Layer Ui::VideoScope::Layer

Detailed Description

The view of a process that shows what its own texture outlet produces.

While the view is shown in a graphics view, a preview output follows the outlet. Being an output of the graph, the preview pulls the process, which then renders whether or not its outlet is cabled further.

Public Member Functions

 OutletPreviewLayer (const Process::ProcessModel &process, const Process::Context &doc, QGraphicsItem *parent, std::size_t texture_outlet=0)
 
QRectF imageRect () const
 Where the image is drawn: as large as fits, centred.
 
const TexturePreview & preview () const noexcept
 
- Public Member Functions inherited from Process::EffectLayerView
 EffectLayerView (QGraphicsItem *parent)
 
void setWidth (qreal width, qreal defaultWidth)
 
- Public Member Functions inherited from Process::LayerView
 LayerView (QGraphicsItem *parent)
 
QRectF boundingRect () const final override
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) final override
 
void setHeight (qreal height) noexcept
 
qreal height () const noexcept
 
void setWidth (qreal width) noexcept
 
qreal width () const noexcept
 
virtual QPixmap pixmap () noexcept
 
void dragEnterEvent (QGraphicsSceneDragDropEvent *event) override
 
void dragLeaveEvent (QGraphicsSceneDragDropEvent *event) override
 
void dropEvent (QGraphicsSceneDragDropEvent *event) override
 
void clearPressed ()
 
void escPressed ()
 
void pressed (QPointF arg_1)
 
void released (QPointF arg_1)
 
void moved (QPointF arg_1)
 
void doubleClicked (QPointF arg_1)
 
void askContextMenu (const QPoint &arg_1, const QPointF &arg_2)
 
void dropReceived (const QPointF &pos, const QMimeData &arg_2)
 
void presetDropReceived (const QPointF &pos, const QMimeData &arg_2)
 
void keyPressed (int arg_1)
 
void keyReleased (int arg_1)
 
void dragEnter (const QPointF &pos, const QMimeData &arg_2)
 
void dragMove (const QPointF &pos, const QMimeData &arg_2)
 
void dragLeave (const QPointF &pos, const QMimeData &arg_2)
 

Public Attributes

std::function< std::optional< double >()> aspect
 Width over height of the image; nothing: fill the view.
 
QString placeholder
 Shown when there is no image yet.
 

Protected Member Functions

void paint_impl (QPainter *p) const override
 
void timerEvent (QTimerEvent *ev) override
 
virtual void paintOverlay (QPainter *p, const QRectF &image) const
 Drawn over the image.
 
- Protected Member Functions inherited from Process::LayerView
virtual void heightChanged (qreal)
 
virtual void widthChanged (qreal)
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 
void contextMenuEvent (QGraphicsSceneContextMenuEvent *event) override
 

Additional Inherited Members

- Protected Attributes inherited from Process::EffectLayerView
qreal m_defaultWidth {}
 

Member Function Documentation

◆ paint_impl()

void Gfx::OutletPreviewLayer::paint_impl ( QPainter *  p) const
overrideprotectedvirtual

Reimplemented from Process::EffectLayerView.

◆ paintOverlay()

virtual void Gfx::OutletPreviewLayer::paintOverlay ( QPainter *  p,
const QRectF &  image 
) const
inlineprotectedvirtual

Drawn over the image.

Reimplemented in Gfx::GeometryViewer::Layer, Ui::TextureView::Layer, and Ui::VideoScope::Layer.


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