walberla::gui::FlagFieldDisplayAdaptor< field_t > Class Template Reference

Detailed Description

template<typename field_t>
class walberla::gui::FlagFieldDisplayAdaptor< field_t >

Displays a slice of a flag field.

#include <FlagFieldDisplayAdaptor.h>

+ Inheritance diagram for walberla::gui::FlagFieldDisplayAdaptor< field_t >:

Public Member Functions

 FlagFieldDisplayAdaptor (ConstBlockDataID flagFieldID)
 
 ~FlagFieldDisplayAdaptor ()
 
virtual void addConfigurationItem (QTreeWidgetItem *parentItem)
 Optionally adds a QTreeWidgetItem to a tree, containing configuration options. More...
 
virtual void draw (QVector< QVector< CellView * > > &grid, int nrOfGhostLayers)
 Draws data structure represented by this Adaptor to a grid of cells Block has to be set first! More...
 
void configure (const IBlock *block, int sliceDim, cell_idx_t sliceValue, Vector3< uint_t > &innerSize, cell_idx_t &ghostLayers)
 Configures the DisplayAdaptor by passing in a block and slice information. More...
 
- Public Member Functions inherited from walberla::gui::FieldDisplayAdaptor< field_t >
 FieldDisplayAdaptor (ConstBlockDataID fieldId)
 

Protected Types

typedef field_t::value_type T
 

Static Protected Member Functions

static QMap< QString, QColor > createFlagNameToColorMap ()
 
static QVector< QColor > createDefaultFlagColors ()
 

Protected Attributes

DisplayPropertiesItemdisplayProperties_
 
QVector< DisplayPropertiesItem * > flagProperties_
 
const FlagField< T > * flagField_
 
const IBlocklastBlock_
 
- Protected Attributes inherited from walberla::gui::FieldDisplayAdaptor< field_t >
const field_t * field_
 
CellInterval sliceInterval_
 
cell_idx_t sliceDim_
 
ConstBlockDataID blockDataId_
 

Static Protected Attributes

static QMap< QString, QColor > flagNameToColor = createFlagNameToColorMap()
 
static QVector< QColor > defaultFlagColors = createDefaultFlagColors()
 
static int defaultFlagColorCounter = 0
 

Additional Inherited Members

- Signals inherited from walberla::gui::DisplayAdaptor
void requestRedraw ()
 This signal requests a redraw, for example after a configuration change. More...
 
- Protected Member Functions inherited from walberla::gui::FieldDisplayAdaptor< field_t >
Cell permuteCoordAccordingToSlice (Cell input, int sliceCoord)
 
void getFieldSizeInfo (CellInterval &ciOut, cell_idx_t &ghostLayerOut)
 

Member Typedef Documentation

◆ T

template<typename field_t >
typedef field_t::value_type walberla::gui::FlagFieldDisplayAdaptor< field_t >::T
protected

Constructor & Destructor Documentation

◆ FlagFieldDisplayAdaptor()

template<typename field_t >
walberla::gui::FlagFieldDisplayAdaptor< field_t >::FlagFieldDisplayAdaptor ( ConstBlockDataID  flagFieldID)

◆ ~FlagFieldDisplayAdaptor()

template<typename field_t >
walberla::gui::FlagFieldDisplayAdaptor< field_t >::~FlagFieldDisplayAdaptor

Member Function Documentation

◆ addConfigurationItem()

template<typename field_t >
void walberla::gui::FlagFieldDisplayAdaptor< field_t >::addConfigurationItem ( QTreeWidgetItem *  )
virtual

Optionally adds a QTreeWidgetItem to a tree, containing configuration options.

Reimplemented from walberla::gui::DisplayAdaptor.

◆ configure()

template<typename field_t >
void walberla::gui::FlagFieldDisplayAdaptor< field_t >::configure ( const IBlock block,
int  sliceDim,
cell_idx_t  sliceValue,
Vector3< uint_t > &  innerSize,
cell_idx_t ghostLayers 
)
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

Reimplemented from walberla::gui::FieldDisplayAdaptor< field_t >.

◆ createDefaultFlagColors()

template<typename field_t >
QVector< QColor > walberla::gui::FlagFieldDisplayAdaptor< field_t >::createDefaultFlagColors
staticprotected

◆ createFlagNameToColorMap()

template<typename field_t >
QMap< QString, QColor > walberla::gui::FlagFieldDisplayAdaptor< field_t >::createFlagNameToColorMap
staticprotected

◆ draw()

template<typename field_t >
void walberla::gui::FlagFieldDisplayAdaptor< field_t >::draw ( QVector< QVector< CellView * > > &  grid,
int  nrOfGhostLayers 
)
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

Implements walberla::gui::DisplayAdaptor.

Member Data Documentation

◆ defaultFlagColorCounter

template<typename field_t >
int walberla::gui::FlagFieldDisplayAdaptor< field_t >::defaultFlagColorCounter = 0
staticprotected

◆ defaultFlagColors

template<typename field_t >
QVector< QColor > walberla::gui::FlagFieldDisplayAdaptor< field_t >::defaultFlagColors = createDefaultFlagColors()
staticprotected

◆ displayProperties_

template<typename field_t >
DisplayPropertiesItem* walberla::gui::FlagFieldDisplayAdaptor< field_t >::displayProperties_
protected

◆ flagField_

template<typename field_t >
const FlagField<T>* walberla::gui::FlagFieldDisplayAdaptor< field_t >::flagField_
protected

◆ flagNameToColor

template<typename field_t >
QMap< QString, QColor > walberla::gui::FlagFieldDisplayAdaptor< field_t >::flagNameToColor = createFlagNameToColorMap()
staticprotected

◆ flagProperties_

template<typename field_t >
QVector<DisplayPropertiesItem*> walberla::gui::FlagFieldDisplayAdaptor< field_t >::flagProperties_
protected

◆ lastBlock_

template<typename field_t >
const IBlock* walberla::gui::FlagFieldDisplayAdaptor< field_t >::lastBlock_
protected

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