walberla::gui::CellView Class Reference

Detailed Description

Class for drawing a single cell of a grid slice.

#include <CellView.h>

+ Inheritance diagram for walberla::gui::CellView:

Public Member Functions

 CellView (QGraphicsItem *par=0)
 
void setText (const QString &text)
 
void setArrow (double xVal, double yVal)
 Enables arrow display and sets x and y value xVal and yVal should not form a vector with length > 1. More...
 
void reset ()
 
void addText (const QString &s)
 
void setPDF (stencil::Direction dir, const double &val)
 

Static Public Attributes

static const double BLOCK_PIXEL_SIZE = 100
 

Protected Member Functions

void paintVector (QPainter *p)
 
void paintTexts (QPainter *p)
 
void paintPDFs (QPainter *p)
 
void paintArrow (QPainter *p, const QPointF &src, const QPointF &dst, double arrowSize)
 
virtual void paint (QPainter *p, const QStyleOptionGraphicsItem *option, QWidget *widget)
 

Protected Attributes

QVector< QString > texts
 
bool pdfsEnabled_
 
double pdfs_ [9]
 
bool arrowEnabled_
 
double arrowX_
 
double arrowY_
 
double vectorArrowSize
 
double pdfArrowSize
 
QString text_
 

Constructor & Destructor Documentation

◆ CellView()

walberla::gui::CellView::CellView ( QGraphicsItem *  par = 0)

Member Function Documentation

◆ addText()

void walberla::gui::CellView::addText ( const QString &  s)
inline

◆ paint()

void walberla::gui::CellView::paint ( QPainter *  p,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
protectedvirtual

◆ paintArrow()

void walberla::gui::CellView::paintArrow ( QPainter *  p,
const QPointF &  src,
const QPointF &  dst,
double  arrowSize 
)
protected

◆ paintPDFs()

void walberla::gui::CellView::paintPDFs ( QPainter *  p)
protected

◆ paintTexts()

void walberla::gui::CellView::paintTexts ( QPainter *  p)
protected

◆ paintVector()

void walberla::gui::CellView::paintVector ( QPainter *  p)
protected

◆ reset()

void walberla::gui::CellView::reset ( )

◆ setArrow()

void walberla::gui::CellView::setArrow ( double  xVal,
double  yVal 
)

Enables arrow display and sets x and y value xVal and yVal should not form a vector with length > 1.

◆ setPDF()

void walberla::gui::CellView::setPDF ( stencil::Direction  dir,
const double &  val 
)

◆ setText()

void walberla::gui::CellView::setText ( const QString &  text)
inline

Member Data Documentation

◆ arrowEnabled_

bool walberla::gui::CellView::arrowEnabled_
protected

◆ arrowX_

double walberla::gui::CellView::arrowX_
protected

◆ arrowY_

double walberla::gui::CellView::arrowY_
protected

◆ BLOCK_PIXEL_SIZE

const double walberla::gui::CellView::BLOCK_PIXEL_SIZE = 100
static

◆ pdfArrowSize

double walberla::gui::CellView::pdfArrowSize
protected

◆ pdfs_

double walberla::gui::CellView::pdfs_[9]
protected

◆ pdfsEnabled_

bool walberla::gui::CellView::pdfsEnabled_
protected

◆ text_

QString walberla::gui::CellView::text_
protected

◆ texts

QVector<QString> walberla::gui::CellView::texts
protected

◆ vectorArrowSize

double walberla::gui::CellView::vectorArrowSize
protected

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