152 lines
5.5 KiB
C++
152 lines
5.5 KiB
C++
#include <qmutex.h>
|
|
#include <qlabel.h>
|
|
#include <uiModule/components/fancyButton.h>
|
|
#include <uiModule/components/fancyWidget.h>
|
|
#include <uiModule/components/dashBoard.h>
|
|
#include <uiModule/components/fancyProcessBar.h>
|
|
#include <uiModule/components/fancyLogWindow.h>
|
|
class summaryDataController
|
|
{
|
|
public:
|
|
fancyWidget* widget;
|
|
QLabel* productNameLabel;
|
|
QLabel* OKLabel;
|
|
QLabel* NGLabel;
|
|
QLabel* totalLabel;
|
|
|
|
QLabel* OKLabel2;
|
|
QLabel* NGLabel2;
|
|
QLabel* totalLabel2;
|
|
summaryDataController()
|
|
{
|
|
QPalette palette;
|
|
palette.setColor(QPalette::WindowText, Qt::white);
|
|
QFont font("微软雅黑", 14, QFont::Bold);
|
|
|
|
widget = new fancyWidget(u8"运行数据");
|
|
|
|
fancyButtonText* resetBtn = new fancyButtonText(80,40,u8"重置", u8"重置跑料数据");
|
|
widget->titlelayout->addWidget(resetBtn);
|
|
widget->titlelayout->setAlignment(Qt::AlignLeft| Qt::AlignTop);
|
|
|
|
QVBoxLayout* layout = new QVBoxLayout();
|
|
widget->dataWidget.setLayout(layout);
|
|
QHBoxLayout* hLayout1 = new QHBoxLayout();
|
|
layout->addLayout(hLayout1);
|
|
{
|
|
|
|
QVBoxLayout* vlayout1 = new QVBoxLayout();
|
|
QVBoxLayout* vlayout2 = new QVBoxLayout();
|
|
hLayout1->addLayout(vlayout1);
|
|
hLayout1->addLayout(vlayout2);
|
|
|
|
DashboardWidget* dashBoard = new DashboardWidget();
|
|
vlayout1->addWidget(dashBoard);
|
|
vlayout2->setContentsMargins(0, 0, 0, 0);
|
|
{
|
|
QHBoxLayout* tempLayout = new QHBoxLayout();
|
|
QLabel* tempLabel = new QLabel(u8"测量OK数量:");
|
|
tempLabel->setFont(font);
|
|
tempLabel->setPalette(palette);
|
|
|
|
OKLabel = new QLabel("0");
|
|
OKLabel->setFont(font);
|
|
OKLabel->setPalette(palette);
|
|
tempLayout->addWidget(tempLabel);
|
|
tempLayout->addWidget(OKLabel);
|
|
vlayout2->addLayout(tempLayout);
|
|
}
|
|
{
|
|
QHBoxLayout* tempLayout = new QHBoxLayout();
|
|
QLabel* tempLabel = new QLabel(u8"测量NG数量:");
|
|
tempLabel->setFont(font);
|
|
tempLabel->setPalette(palette);
|
|
|
|
NGLabel = new QLabel("0");
|
|
NGLabel->setFont(font);
|
|
NGLabel->setPalette(palette);
|
|
tempLayout->addWidget(tempLabel);
|
|
tempLayout->addWidget(NGLabel);
|
|
vlayout2->addLayout(tempLayout);
|
|
}
|
|
{
|
|
QHBoxLayout* tempLayout = new QHBoxLayout();
|
|
QLabel* tempLabel = new QLabel(u8"测量总 数 量:");
|
|
tempLabel->setFont(font);
|
|
tempLabel->setPalette(palette);
|
|
|
|
totalLabel = new QLabel("0");
|
|
totalLabel->setFont(font);
|
|
totalLabel->setPalette(palette);
|
|
tempLayout->addWidget(tempLabel);
|
|
tempLayout->addWidget(totalLabel);
|
|
vlayout2->addLayout(tempLayout);
|
|
}
|
|
}
|
|
|
|
QHBoxLayout* hLayout2 = new QHBoxLayout();
|
|
layout->addLayout(hLayout2);
|
|
{
|
|
|
|
QVBoxLayout* vlayout1 = new QVBoxLayout();
|
|
QVBoxLayout* vlayout2 = new QVBoxLayout();
|
|
hLayout2->addLayout(vlayout1);
|
|
hLayout2->addLayout(vlayout2);
|
|
|
|
DashboardWidget* dashBoard = new DashboardWidget();
|
|
vlayout1->addWidget(dashBoard);
|
|
vlayout2->setContentsMargins(0, 0, 0, 0);
|
|
{
|
|
QHBoxLayout* tempLayout = new QHBoxLayout();
|
|
QLabel* tempLabel = new QLabel(u8"外观OK数量:");
|
|
tempLabel->setFont(font);
|
|
tempLabel->setPalette(palette);
|
|
|
|
OKLabel2 = new QLabel("0");
|
|
OKLabel2->setFont(font);
|
|
OKLabel2->setPalette(palette);
|
|
tempLayout->addWidget(tempLabel);
|
|
tempLayout->addWidget(OKLabel2);
|
|
vlayout2->addLayout(tempLayout);
|
|
}
|
|
{
|
|
QHBoxLayout* tempLayout = new QHBoxLayout();
|
|
QLabel* tempLabel = new QLabel(u8"外观NG数量:");
|
|
tempLabel->setFont(font);
|
|
tempLabel->setPalette(palette);
|
|
|
|
NGLabel2 = new QLabel("0");
|
|
NGLabel2->setFont(font);
|
|
NGLabel2->setPalette(palette);
|
|
tempLayout->addWidget(tempLabel);
|
|
tempLayout->addWidget(NGLabel2);
|
|
vlayout2->addLayout(tempLayout);
|
|
}
|
|
{
|
|
QHBoxLayout* tempLayout = new QHBoxLayout();
|
|
QLabel* tempLabel = new QLabel(u8"外观总 数 量:");
|
|
tempLabel->setFont(font);
|
|
tempLabel->setPalette(palette);
|
|
|
|
totalLabel2 = new QLabel("0");
|
|
totalLabel2->setFont(font);
|
|
totalLabel2->setPalette(palette);
|
|
tempLayout->addWidget(tempLabel);
|
|
tempLayout->addWidget(totalLabel2);
|
|
vlayout2->addLayout(tempLayout);
|
|
}
|
|
}
|
|
FrequencyBar* progressBar=new FrequencyBar("totalCT");
|
|
progressBar->setProgress(0.5);
|
|
layout->addWidget(progressBar);
|
|
FrequencyBar* progressBar2 = new FrequencyBar("cc_ImageCT");
|
|
progressBar2->setProgress(0.3);
|
|
layout->addWidget(progressBar2);
|
|
FrequencyBar* progressBar3 = new FrequencyBar("ai_ImageCT");
|
|
progressBar3->setProgress(0.8);
|
|
layout->addWidget(progressBar3);
|
|
|
|
LogWindow* log = new LogWindow();
|
|
layout->addWidget(log);
|
|
}
|
|
}; |