feat:煤流检测平台页面搭建
|
@ -0,0 +1,46 @@
|
||||||
|
#-------------------------------------------------
|
||||||
|
#
|
||||||
|
# Project created by QtCreator 2024-10-30T15:56:33
|
||||||
|
#
|
||||||
|
#-------------------------------------------------
|
||||||
|
|
||||||
|
QT += core gui
|
||||||
|
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
|
TARGET = HX_CoalFlowDetect
|
||||||
|
TEMPLATE = app
|
||||||
|
|
||||||
|
# The following define makes your compiler emit warnings if you use
|
||||||
|
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||||
|
# depend on your compiler). Please consult the documentation of the
|
||||||
|
# deprecated API in order to know how to port your code away from it.
|
||||||
|
DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
|
|
||||||
|
# You can also make your code fail to compile if you use deprecated APIs.
|
||||||
|
# In order to do so, uncomment the following line.
|
||||||
|
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||||
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
|
CONFIG += c++11
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
main.cpp \
|
||||||
|
mainwindow.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
mainwindow.h
|
||||||
|
|
||||||
|
FORMS += \
|
||||||
|
mainwindow.ui
|
||||||
|
|
||||||
|
# Default rules for deployment.
|
||||||
|
qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
|
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
|
!isEmpty(target.path): INSTALLS += target
|
||||||
|
|
||||||
|
RESOURCES += \
|
||||||
|
resource.qrc
|
||||||
|
|
||||||
|
RC_ICONS = logo.ico
|
||||||
|
|
After Width: | Height: | Size: 1.7 MiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 524 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1016 B |
After Width: | Height: | Size: 909 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 331 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 237 B |
After Width: | Height: | Size: 198 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 215 B |
After Width: | Height: | Size: 226 B |
After Width: | Height: | Size: 181 B |
After Width: | Height: | Size: 471 B |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 558 B |
After Width: | Height: | Size: 201 B |
After Width: | Height: | Size: 719 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 311 B |
After Width: | Height: | Size: 337 B |
After Width: | Height: | Size: 183 B |
After Width: | Height: | Size: 182 B |
After Width: | Height: | Size: 190 B |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 464 B |
After Width: | Height: | Size: 241 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 418 B |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 194 B |
After Width: | Height: | Size: 224 B |
|
@ -0,0 +1,11 @@
|
||||||
|
#include "mainwindow.h"
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
QApplication a(argc, argv);
|
||||||
|
MainWindow w;
|
||||||
|
w.showMaximized();
|
||||||
|
|
||||||
|
return a.exec();
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
#include "mainwindow.h"
|
||||||
|
#include "ui_mainwindow.h"
|
||||||
|
|
||||||
|
#include <QDateTime>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
|
MainWindow::MainWindow(QWidget* parent)
|
||||||
|
: QMainWindow(parent)
|
||||||
|
, ui(new Ui::MainWindow)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
this->setWindowFlag(Qt::FramelessWindowHint);
|
||||||
|
this->setWindowFlags(windowFlags() | Qt::WindowMaximizeButtonHint | Qt::WindowMinimizeButtonHint);
|
||||||
|
|
||||||
|
calendarLoopPlay();
|
||||||
|
}
|
||||||
|
|
||||||
|
MainWindow::~MainWindow()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_close_clicked()
|
||||||
|
{
|
||||||
|
this->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_max_clicked()
|
||||||
|
{
|
||||||
|
if (isFullScreen()) {
|
||||||
|
this->showMaximized();
|
||||||
|
} else {
|
||||||
|
this->showFullScreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_min_clicked()
|
||||||
|
{
|
||||||
|
this->showMinimized();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::calendarLoopPlay()
|
||||||
|
{
|
||||||
|
ui->label_calendar->clear();
|
||||||
|
QTimer* timer_calendar = new QTimer(this);
|
||||||
|
connect(timer_calendar, &QTimer::timeout, this, [this]() {
|
||||||
|
QDateTime time = QDateTime::currentDateTime();
|
||||||
|
QString str = time.toString("yyyy-MM-dd hh:mm:ss dddd");
|
||||||
|
ui->label_calendar->setText(str);
|
||||||
|
});
|
||||||
|
timer_calendar->start(1000); //每一秒溢出一次进入槽函数
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
#ifndef MAINWINDOW_H
|
||||||
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
|
#include <QMainWindow>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class MainWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
class MainWindow : public QMainWindow {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit MainWindow(QWidget* parent = nullptr);
|
||||||
|
~MainWindow();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_pushButton_close_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_max_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_min_clicked();
|
||||||
|
|
||||||
|
private:
|
||||||
|
/**
|
||||||
|
* @brief calendarLoopPlay 时间轮播
|
||||||
|
*/
|
||||||
|
void calendarLoopPlay();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::MainWindow* ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MAINWINDOW_H
|
|
@ -0,0 +1,62 @@
|
||||||
|
<RCC>
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file>Resource/image/background.png</file>
|
||||||
|
<file>Resource/image/title.png</file>
|
||||||
|
<file>Resource/image/logo.png</file>
|
||||||
|
<file>Resource/image/beltOperate.png</file>
|
||||||
|
<file>Resource/image/speedModel.png</file>
|
||||||
|
<file>Resource/image/beltCamera_select.png</file>
|
||||||
|
<file>Resource/image/beltCamera_unselect.png</file>
|
||||||
|
<file>Resource/image/beltCamerabg.png</file>
|
||||||
|
<file>Resource/image/beltCameraDemo.png</file>
|
||||||
|
<file>Resource/image/coalDistributbg.png</file>
|
||||||
|
<file>Resource/image/coalStatisbg.png</file>
|
||||||
|
<file>Resource/image/dianji.png</file>
|
||||||
|
<file>Resource/image/electric.png</file>
|
||||||
|
<file>Resource/image/icon1.png</file>
|
||||||
|
<file>Resource/image/icon2.png</file>
|
||||||
|
<file>Resource/image/icon3.png</file>
|
||||||
|
<file>Resource/image/icon4.png</file>
|
||||||
|
<file>Resource/image/icon5.png</file>
|
||||||
|
<file>Resource/image/icon6.png</file>
|
||||||
|
<file>Resource/image/jianxiu.png</file>
|
||||||
|
<file>Resource/image/jikong.png</file>
|
||||||
|
<file>Resource/image/jiudi.png</file>
|
||||||
|
<file>Resource/image/labelSelect.png</file>
|
||||||
|
<file>Resource/image/labelunSelect.png</file>
|
||||||
|
<file>Resource/image/oneClickStart.png</file>
|
||||||
|
<file>Resource/image/oneClickStop.png</file>
|
||||||
|
<file>Resource/image/speed.png</file>
|
||||||
|
<file>Resource/image/start.png</file>
|
||||||
|
<file>Resource/image/stop.png</file>
|
||||||
|
<file>Resource/image/temperature.png</file>
|
||||||
|
<file>Resource/image/beltCloseState.png</file>
|
||||||
|
<file>Resource/image/labelhover.png</file>
|
||||||
|
<file>Resource/image/warningInfobg.png</file>
|
||||||
|
<file>Resource/image/closePress.png</file>
|
||||||
|
<file>Resource/image/max.png</file>
|
||||||
|
<file>Resource/image/min.png</file>
|
||||||
|
<file>Resource/image/beltInfobg.png</file>
|
||||||
|
<file>Resource/image/wind.png</file>
|
||||||
|
<file>Resource/image/beltOffline.png</file>
|
||||||
|
<file>Resource/image/beltOnline.png</file>
|
||||||
|
<file>Resource/image/close.png</file>
|
||||||
|
<file>Resource/image/closeHover.png</file>
|
||||||
|
<file>Resource/image/maxHover.png</file>
|
||||||
|
<file>Resource/image/maxPress.png</file>
|
||||||
|
<file>Resource/image/minHover.png</file>
|
||||||
|
<file>Resource/image/minPress.png</file>
|
||||||
|
<file>Resource/image/bukekong.png</file>
|
||||||
|
<file>Resource/image/kekong.png</file>
|
||||||
|
<file>Resource/image/shoudong.png</file>
|
||||||
|
<file>Resource/image/zidong.png</file>
|
||||||
|
<file>Resource/image/oneClickStartHover.png</file>
|
||||||
|
<file>Resource/image/oneClickStartPress.png</file>
|
||||||
|
<file>Resource/image/oneClickStopHover.png</file>
|
||||||
|
<file>Resource/image/oneClickStopPress.png</file>
|
||||||
|
<file>Resource/image/startHover.png</file>
|
||||||
|
<file>Resource/image/startPress.png</file>
|
||||||
|
<file>Resource/image/stopHover.png</file>
|
||||||
|
<file>Resource/image/stopPress.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|