Version: 9.16.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::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
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}

References _prevHsPos, _prevRotate, _prevVsPos, and _prevZoom.

◆ ~FormSchemaView()

FormSchemaView::~FormSchemaView ( )
virtual

Definition at line 58 of file FormSchemaView.cxx.

59{
60}

Member Function Documentation

◆ on_dial_valueChanged

void FormSchemaView::on_dial_valueChanged ( int  val)
slot

Definition at line 62 of file FormSchemaView.cxx.

63{
64 DEBTRACE("FormSchemaView::on_dial_valueChanged " << val);
65 int delta = val - _prevRotate;
66 _prevRotate = val;
67 gv_schema->rotate(delta);
68}
#define DEBTRACE(msg)
Definition: YacsTrace.hxx:31

References _prevRotate, and DEBTRACE.

◆ on_hs_position_valueChanged

void FormSchemaView::on_hs_position_valueChanged ( int  val)
slot

Definition at line 70 of file FormSchemaView.cxx.

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

References _prevHsPos, and DEBTRACE.

◆ on_vs_position_valueChanged

void FormSchemaView::on_vs_position_valueChanged ( int  val)
slot

Definition at line 78 of file FormSchemaView.cxx.

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

References _prevVsPos, and DEBTRACE.

◆ on_vs_zoom_valueChanged

void FormSchemaView::on_vs_zoom_valueChanged ( int  val)
slot

Definition at line 86 of file FormSchemaView.cxx.

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}

References _prevZoom, and DEBTRACE.

Member Data Documentation

◆ _prevHsPos

int FormSchemaView::_prevHsPos
protected

Definition at line 41 of file FormSchemaView.hxx.

Referenced by FormSchemaView(), and on_hs_position_valueChanged().

◆ _prevRotate

int FormSchemaView::_prevRotate
protected

Definition at line 40 of file FormSchemaView.hxx.

Referenced by FormSchemaView(), and on_dial_valueChanged().

◆ _prevVsPos

int FormSchemaView::_prevVsPos
protected

Definition at line 42 of file FormSchemaView.hxx.

Referenced by FormSchemaView(), and on_vs_position_valueChanged().

◆ _prevZoom

int FormSchemaView::_prevZoom
protected

Definition at line 43 of file FormSchemaView.hxx.

Referenced by FormSchemaView(), and on_vs_zoom_valueChanged().


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