| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #include "volviewform.h"
- #include "ui_volviewform.h"
- VolViewForm::VolViewForm(QWidget *parent) :
- QWidget(parent),
- ui(new Ui::VolViewForm)
- {
- ui->setupUi(this);
- type = 0 ;
- chn = 0;
- voltage = 0.0;
- current = 0.0;
- power = 0.0;
- factor = 0.0;
- consum = 0.0;
- sts = false ;
- ui->label_6->setAlignment(Qt::AlignCenter);
- if(type==0)
- ui->label_6->setText("Input Vol");
- else
- {
- QString msg ;
- msg += "Ch"+QString::number(chn)+":";
- if(sts==true)
- msg += "on";
- else
- msg += "off";
- }
- ui->label_8->setText(QString::number(voltage,'f',2));
- ui->label_13->setText(QString::number(current,'f',2));
- ui->label_16->setText(QString::number(power,'f',2));
- ui->label_15->setText(QString::number(factor,'f',2)+"%");
- ui->label_14->setText(QString::number(consum,'f',2));
- }
- VolViewForm::~VolViewForm()
- {
- delete ui;
- }
|