You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
valvedetect/tpvs17/lpMain/QTestModeWid.cpp

34 lines
923 B
C++

#include "QTestModeWid.h"
#pragma execution_character_set("utf-8")
QTestModeWid::QTestModeWid(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
connect(ui.wf_test_btn_start, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
connect(ui.wf_test_btn_stop, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
connect(ui.wf_test_btn_snap_cam1, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
connect(ui.wf_test_btn_snap_cam2, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
}
QTestModeWid::~QTestModeWid()
{
}
Q_SLOT void QTestModeWid::onButtonClicked()
{
QString strObj = sender()->objectName();
if ("wf_test_btn_start" == strObj) {
emit sgTestMode(EM_START);
}
else if("wf_test_btn_stop" == strObj) {
emit sgTestMode(EM_STOP);
}
else if ("wf_test_btn_snap_cam1" == strObj) {
emit sgTestMode(EM_CAM1_Trig);
}
else if ("wf_test_btn_snap_cam2" == strObj) {
emit sgTestMode(EM_CAM2_Trig);
}
}