walberla::gui::BlockSliceView Class Reference

Detailed Description

View to display a slice of a field ( which is stored inside a block)

QGraphicsView based widget that can display various block data as slices.

#include <BlockSliceView.h>

+ Inheritance diagram for walberla::gui::BlockSliceView:

Public Slots

void redraw ()
 

Public Member Functions

 BlockSliceView (StructuredBlockForest &blockForest, const GUI &gui, QStackedWidget *propertyStack, ISliceChangeListener *blockView3D, QWidget *parent=0)
 Constructor. More...
 
 ~BlockSliceView ()
 
void setBlock (IBlock *block)
 

Protected Member Functions

virtual void dropEvent (QDropEvent *ev)
 
virtual void dragEnterEvent (QDragEnterEvent *ev)
 
virtual void dragMoveEvent (QDragMoveEvent *ev)
 
virtual void wheelEvent (QWheelEvent *event)
 
virtual void scaleView (qreal scaleFactor)
 

Private Slots

void paintGrid ()
 
void onSliceValueChange ()
 

Private Member Functions

void reset ()
 
virtual bool eventFilter (QObject *obj, QEvent *ev)
 
virtual void focusInEvent (QFocusEvent *event)
 
virtual void focusOutEvent (QFocusEvent *event)
 
void updateSliceIndicatorIn3DView ()
 

Private Attributes

ISliceChangeListenersliceChangeListener_
 
ISliceChangeListener::SliceID sliceId_
 
bool sliceIdValid_
 
QStackedWidget * propertyStack_
 
QWidget * propertyWidget_
 
Ui::BlockSliceViewProperties propertyUi_
 
QGraphicsScene * scene
 
QVector< QVector< CellView * > > cells
 
int nrOfGhostLayers_
 
StructuredBlockForestblockForest_
 
IBlockblock_
 
QGraphicsRectItem * ghostLayerIndicator_
 
std::vector< DisplayAdaptor * > displayItems_
 

Constructor & Destructor Documentation

◆ BlockSliceView()

walberla::gui::BlockSliceView::BlockSliceView ( StructuredBlockForest blockForest,
const GUI gui,
QStackedWidget *  propertyStack,
ISliceChangeListener blockView3D,
QWidget *  parent = 0 
)

Constructor.

Parameters
blockForestCurrently only StructuredBlockForest is supported here. "Structured" since the slice views show cell based data structures. BlockForest and not BlockStorage is used because we query for global domain information.
guithe GUI object is used as a factory for DisplayAdaptors which encapsulate the details of how to draw specific block data
propertyStackthe stacked widget is used as a container for a widget where display properties can be edited. The BlockSliceView makes sure that its own widget is on top, whenever the view has the focus
blockView3Dpointer to a 3D block view. The BlockSliceView uses the 3D view to display planes to indicate the current slice

◆ ~BlockSliceView()

walberla::gui::BlockSliceView::~BlockSliceView ( )

Member Function Documentation

◆ dragEnterEvent()

void walberla::gui::BlockSliceView::dragEnterEvent ( QDragEnterEvent *  ev)
protectedvirtual

◆ dragMoveEvent()

void walberla::gui::BlockSliceView::dragMoveEvent ( QDragMoveEvent *  ev)
protectedvirtual

◆ dropEvent()

void walberla::gui::BlockSliceView::dropEvent ( QDropEvent *  ev)
protectedvirtual

◆ eventFilter()

bool walberla::gui::BlockSliceView::eventFilter ( QObject *  obj,
QEvent *  ev 
)
privatevirtual

◆ focusInEvent()

void walberla::gui::BlockSliceView::focusInEvent ( QFocusEvent *  event)
privatevirtual

◆ focusOutEvent()

void walberla::gui::BlockSliceView::focusOutEvent ( QFocusEvent *  event)
privatevirtual

◆ onSliceValueChange

void walberla::gui::BlockSliceView::onSliceValueChange ( )
privateslot

◆ paintGrid

void walberla::gui::BlockSliceView::paintGrid ( )
privateslot

◆ redraw

void walberla::gui::BlockSliceView::redraw ( )
slot

◆ reset()

void walberla::gui::BlockSliceView::reset ( )
private

◆ scaleView()

void walberla::gui::BlockSliceView::scaleView ( qreal  scaleFactor)
protectedvirtual

◆ setBlock()

void walberla::gui::BlockSliceView::setBlock ( IBlock block)

◆ updateSliceIndicatorIn3DView()

void walberla::gui::BlockSliceView::updateSliceIndicatorIn3DView ( )
private

◆ wheelEvent()

void walberla::gui::BlockSliceView::wheelEvent ( QWheelEvent *  event)
protectedvirtual

Member Data Documentation

◆ block_

IBlock* walberla::gui::BlockSliceView::block_
private

◆ blockForest_

StructuredBlockForest& walberla::gui::BlockSliceView::blockForest_
private

◆ cells

QVector<QVector<CellView*> > walberla::gui::BlockSliceView::cells
private

◆ displayItems_

std::vector<DisplayAdaptor*> walberla::gui::BlockSliceView::displayItems_
private

◆ ghostLayerIndicator_

QGraphicsRectItem* walberla::gui::BlockSliceView::ghostLayerIndicator_
private

◆ nrOfGhostLayers_

int walberla::gui::BlockSliceView::nrOfGhostLayers_
private

◆ propertyStack_

QStackedWidget* walberla::gui::BlockSliceView::propertyStack_
private

◆ propertyUi_

Ui::BlockSliceViewProperties walberla::gui::BlockSliceView::propertyUi_
private

◆ propertyWidget_

QWidget* walberla::gui::BlockSliceView::propertyWidget_
private

◆ scene

QGraphicsScene* walberla::gui::BlockSliceView::scene
private

◆ sliceChangeListener_

ISliceChangeListener* walberla::gui::BlockSliceView::sliceChangeListener_
private

◆ sliceId_

ISliceChangeListener::SliceID walberla::gui::BlockSliceView::sliceId_
private

◆ sliceIdValid_

bool walberla::gui::BlockSliceView::sliceIdValid_
private

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