Version: 8.3.0
FormSchemaView Class Reference

#include <FormSchemaView.hxx>

Inheritance diagram for FormSchemaView:
Collaboration diagram for FormSchemaView:

Public Slots

void on_dial_valueChanged (int val)
 
void on_hs_position_valueChanged (int val)
 
void on_vs_position_valueChanged (int val)
 
void on_vs_zoom_valueChanged (int val)
 

Public Member Functions

 FormSchemaView (QWidget *parent=0)
 
virtual ~FormSchemaView ()
 

Protected Attributes

int _prevRotate
 
int _prevHsPos
 
int _prevVsPos
 
int _prevZoom
 

Detailed Description

Definition at line 25 of file FormSchemaView.hxx.

Constructor & Destructor Documentation

FormSchemaView::FormSchemaView ( QWidget parent = 0)

Definition at line 29 of file FormSchemaView.cxx.

30 {
31  setupUi(this);
32 
33  vboxLayout->removeWidget(gv_schema);
34  delete gv_schema;
35  gv_schema = new GraphicsView(this);
36  gv_schema->setObjectName(QString::fromUtf8("gv_schema"));
37  vboxLayout->insertWidget(0, gv_schema);
38 
39  _prevRotate=0;
40  dial->setWrapping(true);
41  dial->setRange(0, 359);
42  dial->setValue(0);
43 
44  _prevHsPos=500;
45  hs_position->setRange(0, 999);
46  hs_position->setValue(500);
47 
48  _prevVsPos=500;
49  vs_position->setRange(0, 999);
50  vs_position->setValue(500);
51 
52  _prevZoom=0;
53  vs_zoom->setRange(-100, 100);
54  vs_zoom->setValue(0);
55 
56 }
FormSchemaView::~FormSchemaView ( )
virtual

Definition at line 58 of file FormSchemaView.cxx.

59 {
60 }

Member Function Documentation

void FormSchemaView::on_dial_valueChanged ( int  val)
slot

Definition at line 62 of file FormSchemaView.cxx.

References DEBTRACE.

63 {
64  DEBTRACE("FormSchemaView::on_dial_valueChanged " << val);
65  int delta = val - _prevRotate;
66  _prevRotate = val;
67  gv_schema->rotate(delta);
68 }
void FormSchemaView::on_hs_position_valueChanged ( int  val)
slot

Definition at line 70 of file FormSchemaView.cxx.

References DEBTRACE.

71 {
72  DEBTRACE("FormSchemaView::on_hs_poistion_valueChanged " << val);
73  int delta = val - _prevHsPos;
74  _prevHsPos = val;
75  gv_schema->translate(val,0);
76 }
void FormSchemaView::on_vs_position_valueChanged ( int  val)
slot

Definition at line 78 of file FormSchemaView.cxx.

References DEBTRACE.

79 {
80  DEBTRACE("FormSchemaView::on_vs_poistion_valueChanged " << val);
81  int delta = val - _prevVsPos;
82  _prevVsPos = val;
83  gv_schema->translate(0, val);
84 }
void FormSchemaView::on_vs_zoom_valueChanged ( int  val)
slot

Definition at line 86 of file FormSchemaView.cxx.

References DEBTRACE.

87 {
88  DEBTRACE("FormSchemaView::on_vs_zoom_valueChanged " << val);
89  int delta = val - _prevZoom;
90  double s=1;
91  if (delta>=0) s=delta/25.0;
92  else s=25/delta;
93  _prevZoom = val;
94  gv_schema->scale(s, s);
95 }

Member Data Documentation

int FormSchemaView::_prevHsPos
protected

Definition at line 41 of file FormSchemaView.hxx.

int FormSchemaView::_prevRotate
protected

Definition at line 40 of file FormSchemaView.hxx.

int FormSchemaView::_prevVsPos
protected

Definition at line 42 of file FormSchemaView.hxx.

int FormSchemaView::_prevZoom
protected

Definition at line 43 of file FormSchemaView.hxx.


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