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.
174 lines
5.6 KiB
C++
174 lines
5.6 KiB
C++
|
|
#ifndef MONITOROVOZEZ_H
|
|
#define MONITOROVOZEZ_H
|
|
|
|
#include <QtCore/QVariant>
|
|
#include <QtWidgets/QApplication>
|
|
#include <QtWidgets/QGridLayout>
|
|
#include <QtWidgets/QHBoxLayout>
|
|
#include <QtWidgets/QPushButton>
|
|
#include <QtWidgets/QSpacerItem>
|
|
#include <QtWidgets/QVBoxLayout>
|
|
#include <QtWidgets/QWidget>
|
|
|
|
#include "MonitorTagUI.h"
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
class Ui_MonitorWidget:public QWidget
|
|
{
|
|
public:
|
|
QVBoxLayout *verticalLayout;
|
|
QHBoxLayout *operationLayout;
|
|
QPushButton *exchangeButton;
|
|
QSpacerItem *horizontalSpacer;
|
|
QGridLayout *monitorLayout;
|
|
QHBoxLayout *filterlLayout;
|
|
QPushButton *interruptedButton;
|
|
QPushButton *normalButton;
|
|
QPushButton *standbyButton;
|
|
QPushButton *hutdownButton;
|
|
QPushButton *failureButton;
|
|
QPushButton *runButton;
|
|
QWidget *fillWidget;
|
|
|
|
QList<QList<Ui::MonitorTag*>> tagList;
|
|
|
|
void setupUi(QWidget *MonitorWidget)
|
|
{
|
|
if (MonitorWidget->objectName().isEmpty())
|
|
MonitorWidget->setObjectName(QString::fromUtf8("MonitorWidget"));
|
|
verticalLayout = new QVBoxLayout(MonitorWidget);
|
|
verticalLayout->setSpacing(0);
|
|
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
|
|
verticalLayout->setContentsMargins(0, 0, 0, 0);
|
|
operationLayout = new QHBoxLayout();
|
|
operationLayout->setObjectName(QString::fromUtf8("operationLayout"));
|
|
exchangeButton = new QPushButton(MonitorWidget);
|
|
exchangeButton->setObjectName(QString::fromUtf8("exchangeButton"));
|
|
|
|
operationLayout->addWidget(exchangeButton);
|
|
|
|
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
|
|
|
operationLayout->addItem(horizontalSpacer);
|
|
|
|
|
|
verticalLayout->addLayout(operationLayout);
|
|
|
|
monitorLayout = new QGridLayout();
|
|
monitorLayout->setObjectName(QString::fromUtf8("monitorLayout"));
|
|
fillWidget = new QWidget();
|
|
monitorLayout->addWidget(fillWidget);
|
|
|
|
verticalLayout->addLayout(monitorLayout);
|
|
|
|
filterlLayout = new QHBoxLayout();
|
|
filterlLayout->setObjectName(QString::fromUtf8("filterlLayout"));
|
|
interruptedButton = new QPushButton(MonitorWidget);
|
|
interruptedButton->setObjectName(QString::fromUtf8("interruptedButton"));
|
|
|
|
filterlLayout->addWidget(interruptedButton);
|
|
|
|
normalButton = new QPushButton(MonitorWidget);
|
|
normalButton->setObjectName(QString::fromUtf8("normalButton"));
|
|
|
|
filterlLayout->addWidget(normalButton);
|
|
|
|
standbyButton = new QPushButton(MonitorWidget);
|
|
standbyButton->setObjectName(QString::fromUtf8("standbyButton"));
|
|
|
|
filterlLayout->addWidget(standbyButton);
|
|
|
|
hutdownButton = new QPushButton(MonitorWidget);
|
|
hutdownButton->setObjectName(QString::fromUtf8("hutdownButton"));
|
|
|
|
filterlLayout->addWidget(hutdownButton);
|
|
|
|
failureButton = new QPushButton(MonitorWidget);
|
|
failureButton->setObjectName(QString::fromUtf8("failureButton"));
|
|
|
|
filterlLayout->addWidget(failureButton);
|
|
|
|
runButton = new QPushButton(MonitorWidget);
|
|
runButton->setObjectName(QString::fromUtf8("runButton"));
|
|
|
|
filterlLayout->addWidget(runButton);
|
|
|
|
|
|
verticalLayout->addLayout(filterlLayout);
|
|
|
|
verticalLayout->setStretch(0, 2);
|
|
verticalLayout->setStretch(1, 30);
|
|
verticalLayout->setStretch(2, 3);
|
|
|
|
MonitorWidget->setLayout(verticalLayout);
|
|
|
|
|
|
tagList.clear();
|
|
for(int i=0;i<4;i++)
|
|
{
|
|
QList<Ui::MonitorTag*> tags;
|
|
for(int j=0;j<4;j++)
|
|
{
|
|
Ui::MonitorTag *newTag = new Ui::MonitorTag();
|
|
connect(exchangeButton, &QPushButton::clicked, this, [=](){newTag->stackedWidget->setCurrentIndex(1); });
|
|
tags.append(newTag);
|
|
}
|
|
tagList.append(tags);
|
|
}
|
|
|
|
for(int i=0;i<4;i++)
|
|
{
|
|
for(int j=0;j<4;j++)
|
|
{
|
|
//将Tag放入布局
|
|
monitorLayout->addWidget(tagList.at(i).at(j), i, j);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
retranslateUi(MonitorWidget);
|
|
|
|
// this->setStyleSheet("background-color: blue;");
|
|
|
|
QMetaObject::connectSlotsByName(MonitorWidget);
|
|
} // setupUi
|
|
|
|
void retranslateUi(QWidget *MonitorWidget)
|
|
{
|
|
MonitorWidget->setWindowTitle(QCoreApplication::translate("MonitorWidget", "Form", nullptr));
|
|
exchangeButton->setText(QCoreApplication::translate("MonitorWidget", "\345\244\247\345\260\217\345\233\276\346\240\207\345\210\207\346\215\242", nullptr));
|
|
interruptedButton->setText(QCoreApplication::translate("MonitorWidget", "\351\200\232\350\256\257\344\270\255\346\226\255 x\345\217\260", nullptr));
|
|
normalButton->setText(QCoreApplication::translate("MonitorWidget", "\346\255\243\345\270\270\350\277\220\350\241\214 x\345\217\260", nullptr));
|
|
standbyButton->setText(QCoreApplication::translate("MonitorWidget", "\345\276\205\346\234\272\347\255\211\351\243\216 x\345\217\260", nullptr));
|
|
hutdownButton->setText(QCoreApplication::translate("MonitorWidget", "\345\201\234\346\234\272\347\273\264\346\212\244 x\345\217\260", nullptr));
|
|
failureButton->setText(QCoreApplication::translate("MonitorWidget", "\346\225\205\351\232\234\345\276\205\346\234\272 x\345\217\260", nullptr));
|
|
runButton->setText(QCoreApplication::translate("MonitorWidget", "\345\220\257\345\212\250 x\345\217\260", nullptr));
|
|
} // retranslateUi
|
|
|
|
Ui_MonitorWidget()
|
|
{
|
|
setupUi(this);
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
|
class MonitorWidget: public Ui_MonitorWidget {};
|
|
} // namespace Ui
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
#endif // MONITOROVOZEZ_H
|
|
|
|
|
|
|
|
|