glWidget Class Reference

#include <glWidget.h>

Collaboration diagram for glWidget:

[legend]
List of all members.

Public Slots

void update ()
void changeArrowDistance (int i)
void chooseSizeNone ()
void chooseSizeVelocity ()
void chooseSizePressure ()
void chooseSizeVorticity ()
void chooseColorNone ()
void chooseColorVelocity ()
void chooseColorPressure ()
void chooseColorVorticity ()
void changeArrowScale (int i)
void changeArrowAlpha (int a)
void toggleShowArrows ()
void toggleShowBackground ()
void toggleShowStreamlines ()
void setDt (int d)
void setDtest (int d)
void setDsep (int d)
void setEvenlySpacedMode ()
void setManualSeedingMode ()
void setRungeMode ()
void setEulerMode ()
void setBgVelocity ()
void setBgPressure ()
void setBgVorticity ()
void updateBgColor ()
void toggleTapering (int state)
void toggleGlyphs (int state)
void toggleTexturing (int state)

Public Member Functions

 glWidget (flowData *f, ColorMapping *arrowColorMap, ColorMapping *backgroundColorMap, QWidget *parent=0)
 ~glWidget (void)
QSize minimumSizeHint () const
QSize sizeHint () const
void updateData ()

Protected Member Functions

void initializeGL ()
void paintGL ()
void resizeGL (int width, int height)

Private Member Functions

void mousePressEvent (QMouseEvent *event)
void mouseReleaseEvent (QMouseEvent *event)
void mouseMoveEvent (QMouseEvent *event)
void wheelEvent (QWheelEvent *event)
void setProjection ()

Private Attributes

bool m_showArrows
bool m_showBackground
bool m_showStreamlines
GLfloat m_zoomFactor
GLfloat m_translationX
GLfloat m_translationY
GLfloat m_left
GLfloat m_right
GLfloat m_top
GLfloat m_bottom
GLint m_width
GLint m_height
GLint m_lastPosX
GLint m_lastPosY
bool m_mousePressed
int m_streamlineMode
Arrowsarrow
Backgroundbackground
Streamlinesstreamlines
flowDataFlowData
ColorMappingm_arrowColorMap
ColorMappingm_backgroundColorMap

Detailed Description

GLWidget is an interface between the GUI and the Arrows, Streamlines and Background class.
The basic opengl instructions are made here.


Constructor & Destructor Documentation

glWidget::glWidget ( flowData f,
ColorMapping arrowColorMap,
ColorMapping backgroundColorMap,
QWidget *  parent = 0 
)

constructor

Parameters:
*f pointer to the data of the loaded files
*arrowColorMap pointer to the color map from the arrow tab
*backgroundColormap pointer to the color map fromt the background tab
*parent pointer to the parent widget

glWidget::~glWidget ( void   ) 

destructor


Member Function Documentation

QSize glWidget::minimumSizeHint (  )  const

Returns

Returns:
the size of the minimum openGL area

QSize glWidget::sizeHint (  )  const

Returns the size of the openGL area

Returns:
the size of the openGL area

void glWidget::updateData (  ) 

This function is called if the data files are changed, so that the streamlines and the background are updated .

void glWidget::mousePressEvent ( QMouseEvent *  event  )  [private]

predefined function of Qt
Is called every time a mouse button is pressed.

Parameters:
*event contains data like the position of the mouse cursor and which button is pressed

void glWidget::mouseReleaseEvent ( QMouseEvent *  event  )  [private]

predefined function of Qt
Is called every time a pushed button is released.

Parameters:
*event contains data like the position of the mouse cursor

void glWidget::mouseMoveEvent ( QMouseEvent *  event  )  [private]

predefined function of Qt
Is called when the mouse is moved while a button is pressed.

Parameters:
*event contains data like the position of the mouse cursor

void glWidget::wheelEvent ( QWheelEvent *  event  )  [private]

predefined function of Qt
Is called every time the mouse wheel is turned.

Parameters:
*event contains data like to which degree the wheel is turned.

void glWidget::setProjection (  )  [private]

This function sets the data for the opengl projection matrix, depending on the grid size.

void glWidget::initializeGL (  )  [protected]

Called when the program is opened, for the basic settings.

void glWidget::paintGL (  )  [protected]

Is called for every new frame, decides whats painted in the openGL area.
It calls the draw function of the arrows object, streamlines object and background object if these should be shown.

void glWidget::resizeGL ( int  width,
int  height 
) [protected]

Is called every time the size of the openGL area is changed.

Parameters:
width the new width of the window
height the new height of the window

void glWidget::update (  )  [slot]

This function updates the openGL window after changes.

void glWidget::changeArrowDistance ( int  i  )  [slot]

Is called when the distance between the arrows is changed.
Submits the new distance to the arrows object.

void glWidget::chooseSizeNone (  )  [slot]

Is called if all arrows should have the same size.

void glWidget::chooseSizeVelocity (  )  [slot]

Is called if the size of the arrows should depend on the velocity.

void glWidget::chooseSizePressure (  )  [slot]

Is called if the size of the arrows should depend on the pressure.

void glWidget::chooseSizeVorticity (  )  [slot]

Is called if the size of the arrows should depend on the vorticity.

void glWidget::chooseColorNone (  )  [slot]

Is called if all arrows should have the same color.

void glWidget::chooseColorVelocity (  )  [slot]

Is called if the color of the arrows should depend on the velocity.

void glWidget::chooseColorPressure (  )  [slot]

Is called if the color of the arrows should depend on the pressure.

void glWidget::chooseColorVorticity (  )  [slot]

Is called if the color of the arrows should depend on the vorticity.

void glWidget::changeArrowScale ( int  i  )  [slot]

Is called if the arrows should have a new size. The new size is submitted to the Arrows object.

Parameters:
i the new size of the arrows

void glWidget::changeArrowAlpha ( int  a  )  [slot]

Is called if the arrows should have a new alpha value. The new alpha value is submitted to the Arrows object.

void glWidget::toggleShowArrows (  )  [slot]

Is called if the user presses the 'show/ remove arrows' button. It decides whether the arrows should be shown or not.

void glWidget::toggleShowBackground (  )  [slot]

Is called if the user presses the 'show/ remove background' button. It decides whether the background should be shown or not.

void glWidget::toggleShowStreamlines (  )  [slot]

Is called if the user presses the 'show/ remove streamlines' button. It decides whether the streamlines should be shown or not.

void glWidget::setDt ( int  d  )  [slot]

This function is called if the dt Slider of the streamlines is changed.
This function submits the new dt value to the streamlines object.

Parameters:
d new dt value

void glWidget::setDtest ( int  d  )  [slot]

This function is called if the dTest Slider of the streamlines is changed.
This function submits the new dTest value to the streamlines object.

Parameters:
d new dTest value

void glWidget::setDsep ( int  d  )  [slot]

This function is called if the dSep Slider of the streamlines is changed.
This function submits the new dSep value to the streamlines object.*

Parameters:
d new dSep value

void glWidget::setEvenlySpacedMode (  )  [slot]

This function is called if the user wants that the streamlines should be evenly spaced.
*

void glWidget::setManualSeedingMode (  )  [slot]

This function is called if the user wants to manually seed the streamlines.

void glWidget::setRungeMode (  )  [slot]

Is called if the integration of the streamlines should be after the runge-kutta method.

void glWidget::setEulerMode (  )  [slot]

Is called if the integration of the streamlines should be after the euler method.

void glWidget::setBgVelocity (  )  [slot]

This function is called to set the Velocity Texture as background.

void glWidget::setBgPressure (  )  [slot]

This function is called to set the Pressure Texture as background.

void glWidget::setBgVorticity (  )  [slot]

This function is called to set the Vorticity Texture as background.

void glWidget::updateBgColor (  )  [slot]

This function is called when the color bar on the background tab is changed, and the background texture gets updated.

void glWidget::toggleTapering ( int  state  )  [slot]

This function says if the tapering is on orf off.

void glWidget::toggleGlyphs ( int  state  )  [slot]

Says if glphys should be shown or not.

void glWidget::toggleTexturing ( int  state  )  [slot]

Says if texturing is enabled or not.


Member Data Documentation

bool glWidget::m_showArrows [private]

bool glWidget::m_showBackground [private]

true if the arrows should be displayed

bool glWidget::m_showStreamlines [private]

true if the background should be displayed

GLfloat glWidget::m_zoomFactor [private]

true if the streamlines should be displayed

GLfloat glWidget::m_translationX [private]

stores the zoomfactor of the openGL scene

GLfloat glWidget::m_translationY [private]

stores the translation of the scene on the x axis

GLfloat glWidget::m_left [private]

stores the translation of the scene on the y axis

GLfloat glWidget::m_right [private]

parameter for the projection matrix

GLfloat glWidget::m_top [private]

parameter for the projection matrix

GLfloat glWidget::m_bottom [private]

parameter for the projection matrix

GLint glWidget::m_width [private]

parameter for the projection matrix

GLint glWidget::m_height [private]

width of the glwindow

GLint glWidget::m_lastPosX [private]

height of the glwindow

GLint glWidget::m_lastPosY [private]

last x position of the mouse cursor

bool glWidget::m_mousePressed [private]

last y position of the mouse cursor

int glWidget::m_streamlineMode [private]

true if a mousebutton is pressed

Arrows* glWidget::arrow [private]

stores if the streamline seeding is evenly spaced or manual

Background* glWidget::background [private]

arrow object

Streamlines* glWidget::streamlines [private]

backgroudn object

flowData* glWidget::FlowData [private]

streamlines object

ColorMapping* glWidget::m_arrowColorMap [private]

object with the data about the stream

ColorMapping* glWidget::m_backgroundColorMap [private]

colormap from the arrows


The documentation for this class was generated from the following file:
Generated on Wed Jan 17 03:48:40 2007 for Flowvis-parma_wallaby by  doxygen 1.5.1-p1