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.
newValue/tpvs17/lpMain/QPLCIndexUI.cpp

41 lines
802 B
C++

#include "QPLCIndexUI.h"
#pragma execution_character_set("utf-8")
QPLCIndexUI::QPLCIndexUI(QWidget *parent)
: QDialog(parent)
{
ui.setupUi(this);
connect(ui.BtnPCLIndexOK, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
connect(ui.BtnPCLIndexCancel, SIGNAL(clicked()), this, SLOT(onButtonClicked()));
}
QPLCIndexUI::~QPLCIndexUI()
{
}
void QPLCIndexUI::setModelName(QString strName)
{
setWindowTitle(strName);
}
void QPLCIndexUI::setModelIndex(int val)
{
ui.spBxPLCEdit->setValue(val);
}
int QPLCIndexUI::getModelIndex()
{
int ret = ui.spBxPLCEdit->value();
return ret;
}
Q_SLOT void QPLCIndexUI::onButtonClicked()
{
QString strObj = sender()->objectName();
if ("BtnPCLIndexOK" == strObj) {
QDialog::accept();
}
else if ("BtnPCLIndexCancel" == strObj) {
QDialog::reject();
}
}