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.

37 lines
834 B
C++

#include "lpDebugUI.h"
lpDebugUI::lpDebugUI(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
connect(ui.m_pbTrigerA, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
connect(ui.m_pbTrigerB, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
connect(ui.m_pbTimerA, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
connect(ui.m_pbTimerB, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
setWindowIcon(QIcon(":/Resources/icon.png"));
}
lpDebugUI::~lpDebugUI()
{
}
Q_SLOT void lpDebugUI::onButtonClicked()
{
QString strObj = sender()->objectName();
if (strObj == "m_pbTrigerA") {
emit sgButtonClicked(1);
}
else if (strObj == "m_pbTrigerB")
{
emit sgButtonClicked(2);
}
else if (strObj == "m_pbTimerA")
{
emit sgButtonClicked(3);
}
else if (strObj == "m_pbTimerB")
{
emit sgButtonClicked(4);
}
}