logplus/logPlus/tishidialog.cpp

55 lines
1.1 KiB
C++

#include "tishidialog.h"
TiShiDialog::TiShiDialog(QWidget *parent)
: QDialog(parent)
{
m_pUI.setupUi(this);
QObject::connect(m_pUI.pushButtonTH, SIGNAL(clicked()), this, SLOT(slotTH()));
QObject::connect(m_pUI.pushButtonHB, SIGNAL(clicked()), this, SLOT(slotHB()));
QObject::connect(m_pUI.pushButtonLC, SIGNAL(clicked()), this, SLOT(slotLC()));
QObject::connect(m_pUI.pushButtonTG, SIGNAL(clicked()), this, SLOT(slotTG()));
QObject::connect(m_pUI.checkBox, SIGNAL(clicked()), this, SLOT(slotCheck()));
check=0;
m_pUI.checkBox->setCheckState(Qt::Unchecked);
}
void TiShiDialog::slotCheck()
{
if(m_pUI.checkBox->checkState()==Qt::Unchecked)check=0;
else check=1;
}
TiShiDialog::~TiShiDialog()
{
}
void TiShiDialog::slotTH()
{
flag=1;
accept();
return ;
}
void TiShiDialog::slotHB()
{
flag=2;
accept();
return ;
}
void TiShiDialog::slotLC()
{
flag=3;
accept();
return ;
}
void TiShiDialog::slotTG()
{
flag=0;
accept();
return ;
}
void TiShiDialog::init(std::vector<char*> OutCurve,QString qss)
{
for(int i=0;i<OutCurve.size();i++)
{
m_pUI.textEdit_2->append(QString(OutCurve[i]));
}
m_pUI.label->setText(qss+"井次中下列数据已存在");
}