MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / Calibration

Method Calibration

DSView/pv/dialogs/calibration.cpp:54–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54Calibration::Calibration(QWidget *parent) :
55 DSDialog(parent)
56{
57 _save_btn = NULL;
58 _abort_btn = NULL;
59 _reset_btn = NULL;
60 _exit_btn = NULL;
61 _flayout = NULL;
62
63
64#ifdef Q_OS_DARWIN
65 Qt::WindowFlags flags = windowFlags();
66 this->setWindowFlags(flags | Qt::Tool);
67#endif
68 this->setFixedSize(450, 300);
69 this->setWindowOpacity(0.7);
70 this->setModal(false);
71
72 _device_agent = AppControl::Instance()->GetSession()->get_device();
73
74 _save_btn = new QPushButton(this);
75 _abort_btn = new QPushButton(this);
76 _reset_btn = new QPushButton(this);
77 _exit_btn = new QPushButton(this);
78
79 _flayout = new QFormLayout();
80 _flayout->setVerticalSpacing(10);
81 _flayout->setFormAlignment(Qt::AlignLeft);
82 _flayout->setLabelAlignment(Qt::AlignLeft);
83 _flayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
84 QGridLayout *glayout = new QGridLayout();
85 glayout->setVerticalSpacing(5);
86
87 glayout->addLayout(_flayout, 1, 0, 1, 7);
88 glayout->addWidget(_save_btn, 2, 0);
89 glayout->addWidget(new QWidget(this), 2, 1);
90 glayout->setColumnStretch(1, 1);
91 glayout->addWidget(_abort_btn, 2, 2);
92 glayout->addWidget(new QWidget(this), 2, 3);
93 glayout->setColumnStretch(3, 1);
94 glayout->addWidget(_reset_btn, 2, 4);
95 glayout->addWidget(new QWidget(this), 2, 5);
96 glayout->setColumnStretch(5, 1);
97 glayout->addWidget(_exit_btn, 2, 6);
98
99 layout()->addLayout(glayout);
100
101 connect(_save_btn, SIGNAL(clicked()), this, SLOT(on_save()));
102 connect(_abort_btn, SIGNAL(clicked()), this, SLOT(on_abort()));
103 connect(_reset_btn, SIGNAL(clicked()), this, SLOT(on_reset()));
104 connect(_exit_btn, SIGNAL(clicked()), this, SLOT(reject()));
105
106 ADD_UI(this);
107}
108
109Calibration::~Calibration()
110{

Callers

nothing calls this directly

Calls 2

get_deviceMethod · 0.80
GetSessionMethod · 0.80

Tested by

no test coverage detected