walberla::gui::DisplayAdaptor Class Referenceabstract

Detailed Description

Abstract base class for display adaptors.

A display adaptor describes how to display some structured grid like data structure in a BlockSliceView.

The DisplayAdaptor can use a QTreeWidget branch for configuration of display properties. Here the convenience class DisplayPropertiesItem can be used.

Using this options the DisplayAdaptor draws the data structure, in a BlockSliceView.

#include <DisplayAdaptor.h>

+ Inheritance diagram for walberla::gui::DisplayAdaptor:

Signals

void requestRedraw ()
 This signal requests a redraw, for example after a configuration change. More...
 

Public Member Functions

virtual void configure (const IBlock *block, int sliceDim, cell_idx_t sliceValue, Vector3< uint_t > &innerSize, cell_idx_t &ghostLayers)=0
 Configures the DisplayAdaptor by passing in a block and slice information. More...
 
virtual void draw (QVector< QVector< CellView * > > &grid, int nrOfGhostLayers)=0
 Draws data structure represented by this Adaptor to a grid of cells Block has to be set first! More...
 
virtual void addConfigurationItem (QTreeWidgetItem *)
 Optionally adds a QTreeWidgetItem to a tree, containing configuration options. More...
 

Member Function Documentation

◆ addConfigurationItem()

virtual void walberla::gui::DisplayAdaptor::addConfigurationItem ( QTreeWidgetItem *  )
inlinevirtual

◆ configure()

virtual void walberla::gui::DisplayAdaptor::configure ( const IBlock block,
int  sliceDim,
cell_idx_t  sliceValue,
Vector3< uint_t > &  innerSize,
cell_idx_t ghostLayers 
)
pure virtual

Configures the DisplayAdaptor by passing in a block and slice information.

Parameters
[in]blockthe block that should be displayed
[in]sliceDimThe coordinate value of this dimension is kept constant. Defines the slice direction 0 means x, 1 means y, 2 means z
[in]sliceValueThe fixed value of the sliceDim coordinate. If the value is not in the allowed range nothing is displayed
[out]innerSizesize of the field, without ghost layer. innerSize[0] is the horizontal extent and will be the first coordinate in the grid array of draw() innerSize[1] is the vertical extend and will be the second coordinate in the grid array innerSize[2] is used for limiting the allowed sliceValues
[out]ghostLayersnumber of ghost layers for all three dimensions of innerSize

Implemented in walberla::gui::ScalarField3DisplayAdaptor< field_t >, walberla::gui::VectorFieldDisplayAdaptor< field_t >, walberla::lbm::PdfFieldDisplayAdaptor< field_t, stencil_t >, walberla::gui::FlagFieldDisplayAdaptor< field_t >, walberla::gui::FieldDisplayAdaptor< field_t >, and walberla::gui::ScalarFieldDisplayAdaptor< field_t >.

◆ draw()

virtual void walberla::gui::DisplayAdaptor::draw ( QVector< QVector< CellView * > > &  grid,
int  nrOfGhostLayers 
)
pure virtual

Draws data structure represented by this Adaptor to a grid of cells Block has to be set first!

Parameters
[in,out]gridGrid of cells. Use functions of CellView to draw The Grid has dimension of innerSize + ghostLayers
[in]nrOfGhostLayersthe number of ghost layers in each direction. This value may be bigger than the returned value of configure() since other fields might have more ghost layers. The cell at grid[0][0] lies at the outermost ghost layer

Implemented in walberla::gui::ScalarField3DisplayAdaptor< field_t >, walberla::gui::VectorFieldDisplayAdaptor< field_t >, walberla::gui::FlagFieldDisplayAdaptor< field_t >, and walberla::gui::ScalarFieldDisplayAdaptor< field_t >.

◆ requestRedraw

void walberla::gui::DisplayAdaptor::requestRedraw ( )
signal

This signal requests a redraw, for example after a configuration change.


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