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>
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 | |
ISliceChangeListener * | sliceChangeListener_ |
ISliceChangeListener::SliceID | sliceId_ |
bool | sliceIdValid_ |
QStackedWidget * | propertyStack_ |
QWidget * | propertyWidget_ |
Ui::BlockSliceViewProperties | propertyUi_ |
QGraphicsScene * | scene |
QVector< QVector< CellView * > > | cells |
int | nrOfGhostLayers_ |
StructuredBlockForest & | blockForest_ |
IBlock * | block_ |
QGraphicsRectItem * | ghostLayerIndicator_ |
std::vector< DisplayAdaptor * > | displayItems_ |
walberla::gui::BlockSliceView::BlockSliceView | ( | StructuredBlockForest & | blockForest, |
const GUI & | gui, | ||
QStackedWidget * | propertyStack, | ||
ISliceChangeListener * | blockView3D, | ||
QWidget * | parent = 0 |
||
) |
Constructor.
blockForest | Currently 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. |
gui | the GUI object is used as a factory for DisplayAdaptors which encapsulate the details of how to draw specific block data |
propertyStack | the 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 |
blockView3D | pointer to a 3D block view. The BlockSliceView uses the 3D view to display planes to indicate the current slice |
walberla::gui::BlockSliceView::~BlockSliceView | ( | ) |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
privatevirtual |
|
privatevirtual |
|
privatevirtual |
|
privateslot |
|
privateslot |
|
slot |
|
private |
|
protectedvirtual |
void walberla::gui::BlockSliceView::setBlock | ( | IBlock * | block | ) |
|
private |
|
protectedvirtual |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |