ContourWidget Class Reference

#include <ContourWidget.hpp>

Collaboration diagram for ContourWidget:

Collaboration graph
[legend]

List of all members.

Public Slots

void setPercentage (int i)
void setValue (real_t v)

Public Member Functions

void set (QVTKWidget *window, vtkContourFilter *contour, vtkDoubleArray *value)
 ContourWidget (QWidget *parent=0)
 ~ContourWidget ()

Private Attributes

QVTKWidget * __window
vtkContourFilter * __contour
vtkDoubleArray * __values
QRealSpinBox__spinBox
QSlider * __slider


Detailed Description

Definition at line 35 of file ContourWidget.hpp.


Constructor & Destructor Documentation

ContourWidget::ContourWidget ( QWidget *  parent = 0  )  [inline]

Definition at line 78 of file ContourWidget.hpp.

References __slider, __spinBox, setPercentage(), and setValue().

00079     : QVBoxLayout(parent),
00080       __spinBox(new QRealSpinBox(0., 1., 3, 0.01, parent)),
00081       __slider(new QSlider(Qt::Horizontal, parent))
00082   {
00083 //     setMaximumWidth(__spinBox->width());
00084     
00085     connect(__slider,SIGNAL(valueChanged(int)), this, SLOT(setPercentage(int)) );
00086     connect(__spinBox,SIGNAL(valueChanged(real_t)), this, SLOT(setValue(real_t)));
00087   }

ContourWidget::~ContourWidget (  )  [inline]

Definition at line 89 of file ContourWidget.hpp.

00090   {
00091     ;
00092   }


Member Function Documentation

void ContourWidget::setPercentage ( int  i  )  [inline, slot]

Definition at line 49 of file ContourWidget.hpp.

References __contour, __slider, __spinBox, QRealSpinBox::percentage(), QRealSpinBox::setPercentage(), and QRealSpinBox::value().

Referenced by ContourWidget().

00050   {
00051     if (__spinBox->percentage() != __slider->value()) {
00052       __spinBox->setPercentage(__slider->value());
00053     }
00054     __contour->SetValue(0,__spinBox->value());
00055 //     __window->updateGL();
00056   }

void ContourWidget::setValue ( real_t  v  )  [inline, slot]

Definition at line 58 of file ContourWidget.hpp.

References __contour, __slider, __spinBox, and QRealSpinBox::percentage().

Referenced by ContourWidget().

00059   {
00060     if (__spinBox->percentage() != __slider->value()) {
00061       __slider->setValue(__spinBox->percentage());
00062     }
00063     __contour->SetValue(0,v);
00064 //     __window->updateGL();
00065   }

void ContourWidget::set ( QVTKWidget *  window,
vtkContourFilter *  contour,
vtkDoubleArray *  value 
) [inline]

Definition at line 68 of file ContourWidget.hpp.

References __contour, __spinBox, __values, __window, and QRealSpinBox::setRange().

00071   {
00072     __window  = window;
00073     __contour = contour;
00074     __values  = value;
00075     __spinBox->setRange(__values->GetRange()[0], __values->GetRange()[1]);
00076   }

Here is the call graph for this function:


Member Data Documentation

QVTKWidget* ContourWidget::__window [private]

Definition at line 41 of file ContourWidget.hpp.

Referenced by set().

vtkContourFilter* ContourWidget::__contour [private]

Definition at line 42 of file ContourWidget.hpp.

Referenced by set(), setPercentage(), and setValue().

vtkDoubleArray* ContourWidget::__values [private]

Definition at line 43 of file ContourWidget.hpp.

Referenced by set().

Definition at line 45 of file ContourWidget.hpp.

Referenced by ContourWidget(), set(), setPercentage(), and setValue().

QSlider* ContourWidget::__slider [private]

Definition at line 46 of file ContourWidget.hpp.

Referenced by ContourWidget(), setPercentage(), and setValue().


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

Generated on Wed Nov 19 00:05:14 2008 for FreeFEM3D (aka ff3d) by  doxygen 1.5.6