Commit cb33ceec by Lu

HY

parent 4c0f5dfe
YHCalender @ 4c0f5dfe
Subproject commit b5dbcdb58fa5d3fd3a185946daa92362ee853415 Subproject commit 4c0f5dfe1418c89de9c8f6af8d465b1aa145f0d3
File added
QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 7
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
QMAKE_CXX.COMPILER_MACROS = \
QT_COMPILER_STDCXX \
QMAKE_GCC_MAJOR_VERSION \
QMAKE_GCC_MINOR_VERSION \
QMAKE_GCC_PATCH_VERSION
QMAKE_CXX.INCDIRS = \
D:/Software/Qt5.14.2/Tools/mingw730_32/lib/gcc/i686-w64-mingw32/7.3.0/include/c++ \
D:/Software/Qt5.14.2/Tools/mingw730_32/lib/gcc/i686-w64-mingw32/7.3.0/include/c++/i686-w64-mingw32 \
D:/Software/Qt5.14.2/Tools/mingw730_32/lib/gcc/i686-w64-mingw32/7.3.0/include/c++/backward \
D:/Software/Qt5.14.2/Tools/mingw730_32/lib/gcc/i686-w64-mingw32/7.3.0/include \
D:/Software/Qt5.14.2/Tools/mingw730_32/lib/gcc/i686-w64-mingw32/7.3.0/include-fixed \
D:/Software/Qt5.14.2/Tools/mingw730_32/i686-w64-mingw32/include
QMAKE_CXX.LIBDIRS = \
D:/Software/Qt5.14.2/Tools/mingw730_32/lib/gcc/i686-w64-mingw32/7.3.0 \
D:/Software/Qt5.14.2/Tools/mingw730_32/lib/gcc \
D:/Software/Qt5.14.2/Tools/mingw730_32/i686-w64-mingw32/lib \
D:/Software/Qt5.14.2/Tools/mingw730_32/lib
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++11
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked 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 it uses 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
SOURCES += \
fourth.cpp \
main.cpp \
frish.cpp \
second.cpp \
third.cpp
HEADERS += \
fourth.h \
frish.h \
second.h \
third.h
FORMS += \
fourth.ui \
frish.ui \
second.ui \
third.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 += \
images.qrc
/****************************************************************************
** Meta object code from reading C++ file 'fourth.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "../fourth.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'fourth.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.14.2. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_Fourth_t {
QByteArrayData data[4];
char stringdata0[30];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_Fourth_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_Fourth_t qt_meta_stringdata_Fourth = {
{
QT_MOC_LITERAL(0, 0, 6), // "Fourth"
QT_MOC_LITERAL(1, 7, 8), // "mySignal"
QT_MOC_LITERAL(2, 16, 0), // ""
QT_MOC_LITERAL(3, 17, 12) // "mySignalParm"
},
"Fourth\0mySignal\0\0mySignalParm"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_Fourth[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
2, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
2, // signalCount
// signals: name, argc, parameters, tag, flags
1, 0, 24, 2, 0x06 /* Public */,
3, 2, 25, 2, 0x06 /* Public */,
// signals: parameters
QMetaType::Void,
QMetaType::Void, QMetaType::Int, QMetaType::QString, 2, 2,
0 // eod
};
void Fourth::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<Fourth *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->mySignal(); break;
case 1: _t->mySignalParm((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (Fourth::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Fourth::mySignal)) {
*result = 0;
return;
}
}
{
using _t = void (Fourth::*)(int , QString );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Fourth::mySignalParm)) {
*result = 1;
return;
}
}
}
}
QT_INIT_METAOBJECT const QMetaObject Fourth::staticMetaObject = { {
QMetaObject::SuperData::link<QMainWindow::staticMetaObject>(),
qt_meta_stringdata_Fourth.data,
qt_meta_data_Fourth,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *Fourth::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *Fourth::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_Fourth.stringdata0))
return static_cast<void*>(this);
return QMainWindow::qt_metacast(_clname);
}
int Fourth::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QMainWindow::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 2)
qt_static_metacall(this, _c, _id, _a);
_id -= 2;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 2)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 2;
}
return _id;
}
// SIGNAL 0
void Fourth::mySignal()
{
QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
// SIGNAL 1
void Fourth::mySignalParm(int _t1, QString _t2)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))), const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t2))) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE
/****************************************************************************
** Meta object code from reading C++ file 'frish.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "../frish.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'frish.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.14.2. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_Frish_t {
QByteArrayData data[6];
char stringdata0[69];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_Frish_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_Frish_t qt_meta_stringdata_Frish = {
{
QT_MOC_LITERAL(0, 0, 5), // "Frish"
QT_MOC_LITERAL(1, 6, 8), // "mySignal"
QT_MOC_LITERAL(2, 15, 0), // ""
QT_MOC_LITERAL(3, 16, 12), // "mySignalParm"
QT_MOC_LITERAL(4, 29, 19), // "on_button_2_clicked"
QT_MOC_LITERAL(5, 49, 19) // "on_button_3_clicked"
},
"Frish\0mySignal\0\0mySignalParm\0"
"on_button_2_clicked\0on_button_3_clicked"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_Frish[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
4, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
2, // signalCount
// signals: name, argc, parameters, tag, flags
1, 0, 34, 2, 0x06 /* Public */,
3, 2, 35, 2, 0x06 /* Public */,
// slots: name, argc, parameters, tag, flags
4, 0, 40, 2, 0x08 /* Private */,
5, 0, 41, 2, 0x08 /* Private */,
// signals: parameters
QMetaType::Void,
QMetaType::Void, QMetaType::Int, QMetaType::QString, 2, 2,
// slots: parameters
QMetaType::Void,
QMetaType::Void,
0 // eod
};
void Frish::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<Frish *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->mySignal(); break;
case 1: _t->mySignalParm((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
case 2: _t->on_button_2_clicked(); break;
case 3: _t->on_button_3_clicked(); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (Frish::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Frish::mySignal)) {
*result = 0;
return;
}
}
{
using _t = void (Frish::*)(int , QString );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Frish::mySignalParm)) {
*result = 1;
return;
}
}
}
}
QT_INIT_METAOBJECT const QMetaObject Frish::staticMetaObject = { {
QMetaObject::SuperData::link<QMainWindow::staticMetaObject>(),
qt_meta_stringdata_Frish.data,
qt_meta_data_Frish,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *Frish::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *Frish::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_Frish.stringdata0))
return static_cast<void*>(this);
return QMainWindow::qt_metacast(_clname);
}
int Frish::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QMainWindow::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 4)
qt_static_metacall(this, _c, _id, _a);
_id -= 4;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 4)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 4;
}
return _id;
}
// SIGNAL 0
void Frish::mySignal()
{
QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
// SIGNAL 1
void Frish::mySignalParm(int _t1, QString _t2)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))), const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t2))) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE
/****************************************************************************
** Meta object code from reading C++ file 'second.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "../second.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'second.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.14.2. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_Second_t {
QByteArrayData data[3];
char stringdata0[32];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_Second_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_Second_t qt_meta_stringdata_Second = {
{
QT_MOC_LITERAL(0, 0, 6), // "Second"
QT_MOC_LITERAL(1, 7, 23), // "on_pushButton_4_clicked"
QT_MOC_LITERAL(2, 31, 0) // ""
},
"Second\0on_pushButton_4_clicked\0"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_Second[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
1, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: name, argc, parameters, tag, flags
1, 0, 19, 2, 0x08 /* Private */,
// slots: parameters
QMetaType::Void,
0 // eod
};
void Second::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<Second *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->on_pushButton_4_clicked(); break;
default: ;
}
}
Q_UNUSED(_a);
}
QT_INIT_METAOBJECT const QMetaObject Second::staticMetaObject = { {
QMetaObject::SuperData::link<QWidget::staticMetaObject>(),
qt_meta_stringdata_Second.data,
qt_meta_data_Second,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *Second::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *Second::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_Second.stringdata0))
return static_cast<void*>(this);
return QWidget::qt_metacast(_clname);
}
int Second::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 1)
qt_static_metacall(this, _c, _id, _a);
_id -= 1;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 1)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 1;
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE
/****************************************************************************
** Meta object code from reading C++ file 'third.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "../third.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'third.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.14.2. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_Third_t {
QByteArrayData data[1];
char stringdata0[6];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_Third_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_Third_t qt_meta_stringdata_Third = {
{
QT_MOC_LITERAL(0, 0, 5) // "Third"
},
"Third"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_Third[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
0 // eod
};
void Third::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
Q_UNUSED(_o);
Q_UNUSED(_id);
Q_UNUSED(_c);
Q_UNUSED(_a);
}
QT_INIT_METAOBJECT const QMetaObject Third::staticMetaObject = { {
QMetaObject::SuperData::link<QWidget::staticMetaObject>(),
qt_meta_stringdata_Third.data,
qt_meta_data_Third,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *Third::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *Third::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_Third.stringdata0))
return static_cast<void*>(this);
return QWidget::qt_metacast(_clname);
}
int Third::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE
This source diff could not be displayed because it is too large. You can view the blob instead.
#include "fourth.h"
#include "ui_fourth.h"
#include <QGraphicsDropShadowEffect>
#include <QPushButton>
Fourth::Fourth(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::Fourth)
{
ui->setupUi(this);
//去窗口边框
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint);
//关闭按钮
connect(ui->quit_1, &QPushButton::clicked,this, &Fourth::close);
//控件优化
BeaBtn();
}
Fourth::~Fourth()
{
delete ui;
}
void Fourth::BeaBtn(){
//主页按钮
ui->pushButton_2->setStyleSheet(
"QPushButton{"
"color:#ffffff;"
"border-radius:1px;"
"}"
"QPushButton:hover{"
"background-color:#013350;"
"}");
ui->quit_1->setStyleSheet(
"QPushButton{"
"color:#ffffff;"
"border-radius:1px;"
"}"
"QPushButton:hover{"
"background-color:#013350;"
"}");
}
#ifndef FOURTH_H
#define FOURTH_H
#include <QMainWindow>
#include <QPushButton>
#include <QSystemTrayIcon>
#include <QWidget>
namespace Ui {
class Fourth;
}
class Fourth : public QMainWindow
{
Q_OBJECT
public:
explicit Fourth(QWidget *parent = nullptr);
~Fourth();
signals:
void mySignal();
void mySignalParm(int, QString);
public slots:
private:
Ui::Fourth *ui;
Fourth *win_3;
void BeaBtn();
};
#endif // FOURTH_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Fourth</class>
<widget class="QMainWindow" name="Fourth">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>400</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QWidget" name="widget_2" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>581</width>
<height>51</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(50, 50, 50);</string>
</property>
<widget class="QCheckBox" name="checkBox">
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>491</width>
<height>31</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">font: 9pt &quot;微软雅黑&quot;;
color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_2">
<property name="geometry">
<rect>
<x>530</x>
<y>10</y>
<width>31</width>
<height>31</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>images/wen.png</normaloff>images/wen.png</iconset>
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_3" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>601</width>
<height>41</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<widget class="QWidget" name="widget_4" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>120</width>
<height>80</height>
</rect>
</property>
<widget class="QWidget" name="widget" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>601</width>
<height>401</height>
</rect>
</property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>61</width>
<height>21</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
font: 87 9pt &quot;Arial Black&quot;;</string>
</property>
<property name="text">
<string>Prompt</string>
</property>
</widget>
</widget>
</widget>
<widget class="QPushButton" name="quit_1">
<property name="geometry">
<rect>
<x>570</x>
<y>10</y>
<width>21</width>
<height>21</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(170, 0, 0);</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>images/quit_2.png</normaloff>images/quit_2.png</iconset>
</property>
<property name="iconSize">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
</widget>
</widget>
<zorder>widget_3</zorder>
<zorder>widget_2</zorder>
</widget>
</widget>
<resources/>
<connections/>
</ui>
#include "frish.h"
#include "ui_frish.h"
#include <QMenu>
#include <QWidget>
#include <QPushButton>
#include <QCloseEvent>
#include <QMouseEvent>
#include <QSystemTrayIcon>
Frish::Frish(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::Frish)
{
ui->setupUi(this);
//去窗口边框
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint);
//关闭按钮
connect(ui->quit_1, &QPushButton::clicked,this, &Frish::close);
//控件优化
PuttonBtn();
//系统托盘
menu = new QMenu(this);
menu->setStyleSheet("background-color:rgba(240,240,240);");
QIcon icon(":/images/box.png");
SysIcon = new QSystemTrayIcon(this);
SysIcon->setIcon(icon);
SysIcon->setToolTip("Yunheng toolbox");
min = new QAction("窗口最小化",this);
connect(min,&QAction::triggered,this,&Frish::hide);
max = new QAction("窗口最大化",this);
connect(max,&QAction::triggered,this,&Frish::showMaximized);
//restor = new QAction("显示主界面",this);
//connect(restor,&QAction::triggered,this,&MainWindow::showNormal);
quit = new QAction("退出程序",this);
connect(quit,&QAction::triggered,qApp,&QApplication::quit);
menu->addAction(min);
menu->addAction(max);
//menu->addAction(restor);
menu->addSeparator(); //分割
menu->addAction(quit);
SysIcon->setContextMenu(menu);
SysIcon->show();
close();
setWindowFlags(Qt::CustomizeWindowHint|Qt::FramelessWindowHint);
}
Frish::~Frish()
{
delete ui;
}
void Frish::mousePressEvent(QMouseEvent *event)//窗口移动事件
{
//当鼠标左键点击时.
if (event->button() == Qt::LeftButton){
m_move = true;
//记录鼠标的世界坐标.
m_startPoint = event->globalPos();
//记录窗体的世界坐标.
m_windowPoint = this->frameGeometry().topLeft();
mousekey = true;
}
}
void Frish::mouseMoveEvent(QMouseEvent *event)//窗口移动事件
{
if (event->buttons() & Qt::LeftButton){
if(mousekey){
//移动中的鼠标位置相对于初始位置的相对位置.
QPoint relativePos = event->globalPos() - m_startPoint;
//然后移动窗体即可.
this->move(m_windowPoint + relativePos );
}
}
}
void Frish::mouseReleaseEvent(QMouseEvent *event)
{
event = NULL;
mousekey = false;
}
void Frish::PuttonBtn(){
//主页按钮
ui->button_2->setStyleSheet(
"QPushButton{"
"color:#ffffff;"
"border-radius:1px;"
"}"
"QPushButton:hover{"
"background-color:#013350;"
"}");
ui->button_3->setStyleSheet(
"QPushButton{"
"color:#ffffff;"
"border-radius:1px;"
"}"
"QPushButton:hover{"
"background-color:#013350;"
"}");
ui->quit_1->setStyleSheet(
"QPushButton{"
"border-radius:1px;"
"}"
"QPushButton:hover{"
"background-color:#013350;"
"}");
}
void Frish::on_button_2_clicked()
{
win_1 = new Second(this);
win_1->move(0,141);
win_1->show();
}
void Frish::on_button_3_clicked()
{
win_2 = new Third(this);
win_2->move(0,150);
win_2->show();
}
#ifndef FRISH_H
#define FRISH_H
#include <QMainWindow>
#include <QPushButton>
#include <QSystemTrayIcon>
#include <QWidget>
#include "second.h"
#include "third.h"
#include "fourth.h"
#include "ui_second.h"
QT_BEGIN_NAMESPACE
namespace Ui { class Frish; }
QT_END_NAMESPACE
class Frish : public QMainWindow
{
Q_OBJECT
public:
Frish(QWidget *parent = nullptr);
~Frish();
void PuttonBtn();
char mousekey = false;
Second *win_1;
Third *win_2;
Fourth *win_3;
signals:
void mySignal();
void mySignalParm(int, QString);
public slots:
private:
QPushButton * bt;
private:
QSystemTrayIcon *SysIcon;
QAction *min; //最小化
QAction *max; //最大化
//QAction *restor;
QAction *quit; //退出
QMenu *menu;
private slots:
void on_button_2_clicked();
void on_button_3_clicked();
private:
Ui::Frish *ui;
void mouseMoveEvent(QMouseEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
bool m_move;
QPoint m_startPoint;
QPoint m_windowPoint;
};
#endif // FRISH_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Frish</class>
<widget class="QMainWindow" name="Frish">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>959</width>
<height>659</height>
</rect>
</property>
<property name="windowTitle">
<string>Frish</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QWidget" name="widget" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>960</width>
<height>141</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(100, 100, 100);</string>
</property>
<widget class="QLabel" name="label_1">
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>211</width>
<height>31</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">font: 87 14pt &quot;Arial Black&quot;;
color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>Yunheng toolbox</string>
</property>
</widget>
<widget class="QPushButton" name="quit_1">
<property name="geometry">
<rect>
<x>920</x>
<y>10</y>
<width>31</width>
<height>31</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>40</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>../YunHengToolbox/images/quit_2.png</normaloff>../YunHengToolbox/images/quit_2.png</iconset>
</property>
<property name="iconSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
</widget>
<widget class="QPushButton" name="button_2">
<property name="geometry">
<rect>
<x>0</x>
<y>90</y>
<width>71</width>
<height>51</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>../YunHengToolbox/images/Split.png</normaloff>../YunHengToolbox/images/Split.png</iconset>
</property>
<property name="iconSize">
<size>
<width>35</width>
<height>35</height>
</size>
</property>
</widget>
<widget class="QPushButton" name="button_3">
<property name="geometry">
<rect>
<x>70</x>
<y>90</y>
<width>71</width>
<height>51</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>../YunHengToolbox/images/merge.png</normaloff>../YunHengToolbox/images/merge.png</iconset>
</property>
<property name="iconSize">
<size>
<width>35</width>
<height>35</height>
</size>
</property>
</widget>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>0</x>
<y>150</y>
<width>961</width>
<height>511</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/images/back.jpg);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</widget>
</widget>
<resources/>
<connections/>
</ui>
<RCC>
<qresource prefix="/">
<file>images/back.jpg</file>
<file>images/box.png</file>
<file>images/home.png</file>
<file>images/merge.png</file>
<file>images/pdf.png</file>
<file>images/quit_1.png</file>
<file>images/quit_2.png</file>
<file>images/Split.png</file>
<file>images/wen.png</file>
<file>images/beck.jpg</file>
<file>images/text.png</file>
</qresource>
</RCC>
#include "frish.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Frish w;
w.show();
return a.exec();
}
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
#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:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget"/>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>26</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>
/****************************************************************************
** Meta object code from reading C++ file 'fourth.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "fourth.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'fourth.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.14.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_Fourth_t {
QByteArrayData data[4];
char stringdata0[30];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_Fourth_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_Fourth_t qt_meta_stringdata_Fourth = {
{
QT_MOC_LITERAL(0, 0, 6), // "Fourth"
QT_MOC_LITERAL(1, 7, 8), // "mySignal"
QT_MOC_LITERAL(2, 16, 0), // ""
QT_MOC_LITERAL(3, 17, 12) // "mySignalParm"
},
"Fourth\0mySignal\0\0mySignalParm"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_Fourth[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
2, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
2, // signalCount
// signals: name, argc, parameters, tag, flags
1, 0, 24, 2, 0x06 /* Public */,
3, 2, 25, 2, 0x06 /* Public */,
// signals: parameters
QMetaType::Void,
QMetaType::Void, QMetaType::Int, QMetaType::QString, 2, 2,
0 // eod
};
void Fourth::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<Fourth *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->mySignal(); break;
case 1: _t->mySignalParm((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (Fourth::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Fourth::mySignal)) {
*result = 0;
return;
}
}
{
using _t = void (Fourth::*)(int , QString );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Fourth::mySignalParm)) {
*result = 1;
return;
}
}
}
}
QT_INIT_METAOBJECT const QMetaObject Fourth::staticMetaObject = { {
QMetaObject::SuperData::link<QMainWindow::staticMetaObject>(),
qt_meta_stringdata_Fourth.data,
qt_meta_data_Fourth,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *Fourth::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *Fourth::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_Fourth.stringdata0))
return static_cast<void*>(this);
return QMainWindow::qt_metacast(_clname);
}
int Fourth::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QMainWindow::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 2)
qt_static_metacall(this, _c, _id, _a);
_id -= 2;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 2)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 2;
}
return _id;
}
// SIGNAL 0
void Fourth::mySignal()
{
QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
// SIGNAL 1
void Fourth::mySignalParm(int _t1, QString _t2)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))), const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t2))) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE
/****************************************************************************
** Meta object code from reading C++ file 'frish.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "frish.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'frish.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.14.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_Frish_t {
QByteArrayData data[6];
char stringdata0[69];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_Frish_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_Frish_t qt_meta_stringdata_Frish = {
{
QT_MOC_LITERAL(0, 0, 5), // "Frish"
QT_MOC_LITERAL(1, 6, 8), // "mySignal"
QT_MOC_LITERAL(2, 15, 0), // ""
QT_MOC_LITERAL(3, 16, 12), // "mySignalParm"
QT_MOC_LITERAL(4, 29, 19), // "on_button_2_clicked"
QT_MOC_LITERAL(5, 49, 19) // "on_button_3_clicked"
},
"Frish\0mySignal\0\0mySignalParm\0"
"on_button_2_clicked\0on_button_3_clicked"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_Frish[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
4, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
2, // signalCount
// signals: name, argc, parameters, tag, flags
1, 0, 34, 2, 0x06 /* Public */,
3, 2, 35, 2, 0x06 /* Public */,
// slots: name, argc, parameters, tag, flags
4, 0, 40, 2, 0x08 /* Private */,
5, 0, 41, 2, 0x08 /* Private */,
// signals: parameters
QMetaType::Void,
QMetaType::Void, QMetaType::Int, QMetaType::QString, 2, 2,
// slots: parameters
QMetaType::Void,
QMetaType::Void,
0 // eod
};
void Frish::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<Frish *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->mySignal(); break;
case 1: _t->mySignalParm((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
case 2: _t->on_button_2_clicked(); break;
case 3: _t->on_button_3_clicked(); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (Frish::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Frish::mySignal)) {
*result = 0;
return;
}
}
{
using _t = void (Frish::*)(int , QString );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Frish::mySignalParm)) {
*result = 1;
return;
}
}
}
}
QT_INIT_METAOBJECT const QMetaObject Frish::staticMetaObject = { {
QMetaObject::SuperData::link<QMainWindow::staticMetaObject>(),
qt_meta_stringdata_Frish.data,
qt_meta_data_Frish,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *Frish::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *Frish::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_Frish.stringdata0))
return static_cast<void*>(this);
return QMainWindow::qt_metacast(_clname);
}
int Frish::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QMainWindow::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 4)
qt_static_metacall(this, _c, _id, _a);
_id -= 4;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 4)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 4;
}
return _id;
}
// SIGNAL 0
void Frish::mySignal()
{
QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
// SIGNAL 1
void Frish::mySignalParm(int _t1, QString _t2)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))), const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t2))) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE
/****************************************************************************
** Meta object code from reading C++ file 'mythread.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "mythread.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'mythread.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.14.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_myThread_t {
QByteArrayData data[1];
char stringdata0[9];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_myThread_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_myThread_t qt_meta_stringdata_myThread = {
{
QT_MOC_LITERAL(0, 0, 8) // "myThread"
},
"myThread"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_myThread[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
0 // eod
};
void myThread::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
Q_UNUSED(_o);
Q_UNUSED(_id);
Q_UNUSED(_c);
Q_UNUSED(_a);
}
QT_INIT_METAOBJECT const QMetaObject myThread::staticMetaObject = { {
QMetaObject::SuperData::link<QThread::staticMetaObject>(),
qt_meta_stringdata_myThread.data,
qt_meta_data_myThread,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *myThread::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *myThread::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_myThread.stringdata0))
return static_cast<void*>(this);
return QThread::qt_metacast(_clname);
}
int myThread::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QThread::qt_metacall(_c, _id, _a);
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE
/****************************************************************************
** Meta object code from reading C++ file 'second.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "second.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'second.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.14.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_Second_t {
QByteArrayData data[6];
char stringdata0[84];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_Second_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_Second_t qt_meta_stringdata_Second = {
{
QT_MOC_LITERAL(0, 0, 6), // "Second"
QT_MOC_LITERAL(1, 7, 23), // "on_pushButton_4_clicked"
QT_MOC_LITERAL(2, 31, 0), // ""
QT_MOC_LITERAL(3, 32, 12), // "finishedSlot"
QT_MOC_LITERAL(4, 45, 14), // "QNetworkReply*"
QT_MOC_LITERAL(5, 60, 23) // "on_pushButton_6_clicked"
},
"Second\0on_pushButton_4_clicked\0\0"
"finishedSlot\0QNetworkReply*\0"
"on_pushButton_6_clicked"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_Second[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
3, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: name, argc, parameters, tag, flags
1, 0, 29, 2, 0x08 /* Private */,
3, 1, 30, 2, 0x08 /* Private */,
5, 0, 33, 2, 0x08 /* Private */,
// slots: parameters
QMetaType::Void,
QMetaType::Void, 0x80000000 | 4, 2,
QMetaType::Void,
0 // eod
};
void Second::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<Second *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->on_pushButton_4_clicked(); break;
case 1: _t->finishedSlot((*reinterpret_cast< QNetworkReply*(*)>(_a[1]))); break;
case 2: _t->on_pushButton_6_clicked(); break;
default: ;
}
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
switch (_id) {
default: *reinterpret_cast<int*>(_a[0]) = -1; break;
case 1:
switch (*reinterpret_cast<int*>(_a[1])) {
default: *reinterpret_cast<int*>(_a[0]) = -1; break;
case 0:
*reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< QNetworkReply* >(); break;
}
break;
}
}
}
QT_INIT_METAOBJECT const QMetaObject Second::staticMetaObject = { {
QMetaObject::SuperData::link<QWidget::staticMetaObject>(),
qt_meta_stringdata_Second.data,
qt_meta_data_Second,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *Second::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *Second::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_Second.stringdata0))
return static_cast<void*>(this);
return QWidget::qt_metacast(_clname);
}
int Second::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 3)
qt_static_metacall(this, _c, _id, _a);
_id -= 3;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 3)
qt_static_metacall(this, _c, _id, _a);
_id -= 3;
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE
/****************************************************************************
** Meta object code from reading C++ file 'third.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "third.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'third.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.14.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_Third_t {
QByteArrayData data[7];
char stringdata0[98];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_Third_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_Third_t qt_meta_stringdata_Third = {
{
QT_MOC_LITERAL(0, 0, 5), // "Third"
QT_MOC_LITERAL(1, 6, 13), // "finishedSlot1"
QT_MOC_LITERAL(2, 20, 0), // ""
QT_MOC_LITERAL(3, 21, 14), // "QNetworkReply*"
QT_MOC_LITERAL(4, 36, 13), // "finishedSlot2"
QT_MOC_LITERAL(5, 50, 23), // "on_pushButton_4_clicked"
QT_MOC_LITERAL(6, 74, 23) // "on_pushButton_6_clicked"
},
"Third\0finishedSlot1\0\0QNetworkReply*\0"
"finishedSlot2\0on_pushButton_4_clicked\0"
"on_pushButton_6_clicked"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_Third[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
4, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: name, argc, parameters, tag, flags
1, 1, 34, 2, 0x08 /* Private */,
4, 1, 37, 2, 0x08 /* Private */,
5, 0, 40, 2, 0x08 /* Private */,
6, 0, 41, 2, 0x08 /* Private */,
// slots: parameters
QMetaType::Void, 0x80000000 | 3, 2,
QMetaType::Void, 0x80000000 | 3, 2,
QMetaType::Void,
QMetaType::Void,
0 // eod
};
void Third::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<Third *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->finishedSlot1((*reinterpret_cast< QNetworkReply*(*)>(_a[1]))); break;
case 1: _t->finishedSlot2((*reinterpret_cast< QNetworkReply*(*)>(_a[1]))); break;
case 2: _t->on_pushButton_4_clicked(); break;
case 3: _t->on_pushButton_6_clicked(); break;
default: ;
}
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
switch (_id) {
default: *reinterpret_cast<int*>(_a[0]) = -1; break;
case 0:
switch (*reinterpret_cast<int*>(_a[1])) {
default: *reinterpret_cast<int*>(_a[0]) = -1; break;
case 0:
*reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< QNetworkReply* >(); break;
}
break;
case 1:
switch (*reinterpret_cast<int*>(_a[1])) {
default: *reinterpret_cast<int*>(_a[0]) = -1; break;
case 0:
*reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< QNetworkReply* >(); break;
}
break;
}
}
}
QT_INIT_METAOBJECT const QMetaObject Third::staticMetaObject = { {
QMetaObject::SuperData::link<QWidget::staticMetaObject>(),
qt_meta_stringdata_Third.data,
qt_meta_data_Third,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *Third::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *Third::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_Third.stringdata0))
return static_cast<void*>(this);
return QWidget::qt_metacast(_clname);
}
int Third::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 4)
qt_static_metacall(this, _c, _id, _a);
_id -= 4;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 4)
qt_static_metacall(this, _c, _id, _a);
_id -= 4;
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE
#include "mythread.h"
myThread::myThread(QObject *parent) : QThread(parent)
{
}
void myThread::run()
{
m_manage=new QNetworkAccessManager(this);
connect(m_manage,SIGNAL(finished(QNetworkReply *)),this,SLOT(finishedSlot2(QNetworkReply *)));
Third *third = new Third;
// QString a=third->ui->textEdit_3->toPlainText();
// QString b=ui->textEdit_11->toPlainText();
QByteArray by1 = a.toUtf8();
// QByteArray by2 = b.toUtf8();
parPart1.setHeader(QNetworkRequest::ContentDispositionHeader , QVariant(" form-data; name=step"));
parPart1.setBody(by1);
// parPart2.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=end_page"));
// parPart2.setBody(by2);
QHttpPart dbFilePart;
dbFilePart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=PdfFile; filename=new.pdf")); // file为后端定义的key,filename即为excel文件名
QUrl url=urlFile;
QString path=url.toLocalFile();
QFile::setPermissions(path,QFile::WriteOwner|QFile::ReadOwner);//设置读写权限
multiPart = new QHttpMultiPart(QHttpMultiPart::FormDataType);
file = new QFile(path);
file->open(QIODevice::ReadOnly);
dbFilePart.setBodyDevice(file);
file->setParent(multiPart);
multiPart->append(parPart1);
// multiPart->append(parPart2);
multiPart->append(dbFilePart);
QNetworkRequest request;
request.setUrl(QUrl("http://heart.jixiaob.cn/PDF/a_split/"));
this->reply = this->m_manage->post(request, multiPart);
multiPart->setParent(reply);
}
#ifndef MYTHREAD_H
#define MYTHREAD_H
#include <QObject>
#include <QThread>
#include <third.h>
class myThread : public QThread
{
Q_OBJECT
public:
explicit myThread(QObject *parent = nullptr);
void run() override;
signals:
private:
QNetworkAccessManager *m_manage;
QNetworkReply* reply;
QNetworkRequest* m_request;
QHttpPart parPart1; //start_page
QHttpPart parPart2; //end_page
QHttpMultiPart *multiPart;
QFile *file;
QString urlFile; //拖入文件的URL
};
#endif // MYTHREAD_H
fourth.o
main.o
frish.o
second.o
third.o
qrc_images.o
moc_fourth.o
moc_frish.o
moc_second.o
moc_third.o
debug/fourth.o
debug/main.o
debug/frish.o
debug/second.o
debug/third.o
debug/qrc_images.o
debug/moc_fourth.o
debug/moc_frish.o
debug/moc_second.o
debug/moc_third.o
release/fourth.o
release/main.o
release/frish.o
release/second.o
release/third.o
release/qrc_images.o
release/moc_fourth.o
release/moc_frish.o
release/moc_second.o
release/moc_third.o
This source diff could not be displayed because it is too large. You can view the blob instead.
#include "second.h"
#include "ui_second.h"
#include <QWidget>
#include <QPushButton>
#include <QMouseEvent>
Second::Second(QWidget *parent) :
QWidget(parent),
ui(new Ui::Second)
{
ui->setupUi(this);
this->setAcceptDrops(true);
//去窗口边框
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint);
//控件的透明化
ui->widget_2->setStyleSheet("background-color:rgba(0,0,0,0);");
}
Second::~Second()
{
delete ui;
}
void Second::on_pushButton_4_clicked()
{
win_3 = new Fourth;
win_3->show();
m_manage=new QNetworkAccessManager(this);
multiPart = new QHttpMultiPart(QHttpMultiPart::FormDataType);
connect(m_manage,SIGNAL(finished(QNetworkReply *)),this,SLOT(finishedSlot(QNetworkReply *)));
parPart1.setHeader(QNetworkRequest::ContentDispositionHeader , QVariant(" form-data; name=filename"));
QString nameQString=ui->textEdit->toPlainText();
QByteArray nameByteArray=nameQString.toUtf8();
parPart1.setBody(nameByteArray);
parPart2.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=count"));
QString countQString = QString::number(count);
qDebug()<<countQString;
QByteArray countByteArray=countQString.toUtf8();
parPart2.setBody(countByteArray);
multiPart->append(parPart1);
multiPart->append(parPart2);
// pathlist = pathlist.toSet().toList();
for(int i=0;i<count;i++)
{
// QUrl url= urlList.at(i);
// QFile::setPermissions("D:/Asj/new.pdf",QFile::WriteOwner|QFile::ReadOwner);
QUrl url=urlList.at(i);
QString path=url.toLocalFile();
QFile *file = new QFile(path);
QHttpPart filePart;
filePart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant(QString("form-data; name=PdfFile%1; filename=new.pdf").arg(i+1)));
file->open(QIODevice::ReadOnly);
filePart.setBodyDevice(file);
file->setParent(multiPart);
multiPart->append(filePart);
}
QNetworkRequest request;
request.setUrl(QUrl("http://heart.jixiaob.cn/PDF/l_concat/"));
this->reply = this->m_manage->post(request, multiPart);
multiPart->setParent(reply);
}
void Second::finishedSlot(QNetworkReply *reply)
{
if(this->reply->error()==QNetworkReply::NoError)
{
// QJsonDocument document2=QJsonDocument::fromJson(array);
// QJsonObject object2 = document2.object();
QByteArray bytes = reply->readAll();
QJsonDocument doc=QJsonDocument::fromJson(bytes);
QJsonObject json=doc.object();
doc.setObject(json);
QByteArray byte=doc.toJson();
QString str=QString(byte);
qDebug() <<str;
// ui->textBrowser->setText(str);
QJsonParseError err;
QJsonDocument doc2=QJsonDocument::fromJson(byte,&err);
QJsonObject json2=doc2.object();
if(err.error != QJsonParseError::NoError)
{
qDebug()<<"json数据格式错误";
}
else
{
QJsonValue urlValue= json2.value("url");
urlAlreadySplit=urlValue.toString();
QString path=urlAlreadySplit.section('/',2);
qDebug()<<path;
pathAlreadySplit=path;
}
}
else
{
qDebug()<<"handle errors here";
QVariant statusCodeV = this->reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
//statusCoV是HTTdeP服务器的相应码,reply->error()是Qt定义的错误码,可以参考QT的文档
qDebug( "found error ....code: %d %d\n", statusCodeV.toInt(), (int)this->reply->error());
// qDebug(qPrintable(this->reply->errorString()));
}
this->reply->deleteLater();
}
void Second::dragEnterEvent(QDragEnterEvent *e)
{
//对拖放事件进行筛选
if (e->mimeData()->hasUrls())
{
e->acceptProposedAction(); //放行,否则不会执行dropEvent()函数
}
else
{
e->ignore();
}
}
void Second::dropEvent(QDropEvent *e)
{
qDebug()<<e->mimeData()->urls();
count = e->mimeData()->urls().count();
qDebug()<<count;
for (int i=0;i<count;i++)
{
urlList<<e->mimeData()->urls().at(i);
// QListWidgetItem temp(e->mimeData()->urls().at(i).toString());
// ui->listWidget->addItem(&temp);
QString Filename = urlList.at(i).toLocalFile();
if(!Filename.isEmpty())
{
QFileInfo fileInfo(Filename);
Filename =fileInfo.canonicalFilePath();
}
else
{
break;
}
QFileInfo file_info(Filename);
QFile file(Filename);
QFileIconProvider icon_provider;
QIcon icon = icon_provider.icon(file_info);
QListWidgetItem *temp = new QListWidgetItem(icon,Filename) ;
temp->setSizeHint(QSize(64,64));
this->ui->listWidget->addItem(temp);
}
for(int i=0;i<count;i++)
{
qDebug()<<urlList.at(i);
}
}
void Second::on_pushButton_6_clicked()
{
QFile file(pathAlreadySplit);
file.open(QIODevice::ReadOnly);
qDebug()<<"nihaoya";
QDesktopServices::openUrl(QUrl::fromLocalFile(urlAlreadySplit));
}
#ifndef SECOND_H
#define SECOND_H
#include <QWidget>
#include <QMainWindow>
#include <QPushButton>
#include <QSystemTrayIcon>
#include <QNetworkAccessManager>
#include <QHttpPart>
#include <QHttpMultiPart>
#include <QFile>
#include <QJsonDocument>
#include <QJsonObject>
#include <QNetworkReply>
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QMimeData>
#include <QDebug>
#include <QList>
#include <QDesktopServices>
#include <QFileInfo>
#include <QFileIconProvider>
#include <QListWidgetItem>
#include "fourth.h"
#include "third.h"
namespace Ui {
class Second;
}
class Second : public QWidget
{
Q_OBJECT
public:
explicit Second(QWidget *parent = nullptr);
~Second();
private slots:
void on_pushButton_4_clicked();
void finishedSlot(QNetworkReply *);
void on_pushButton_6_clicked();
public:
Ui::Second *ui;
void Init();
int click_count;
Second *win_1;
Fourth *win_3;
QNetworkAccessManager *m_manage;
QNetworkReply *reply;
QNetworkRequest *m_request;
QHttpPart parPart1;
QHttpPart parPart2;
QHttpMultiPart *multiPart;
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
QList<QString> pathlist;
int count;
QList <QUrl> urlList;
QString urlAlreadySplit;
QString pathAlreadySplit;
};
#endif // SECOND_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Second</class>
<widget class="QWidget" name="Second">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>960</width>
<height>539</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<widget class="QPushButton" name="pushButton_6">
<property name="geometry">
<rect>
<x>750</x>
<y>210</y>
<width>91</width>
<height>41</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(100, 100, 100);
font: 87 9pt &quot;Arial Black&quot;;
color: rgb(255, 255, 255);
font: 9pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>打开文件</string>
</property>
</widget>
<widget class="QWidget" name="widget_2" native="true">
<property name="geometry">
<rect>
<x>610</x>
<y>20</y>
<width>331</width>
<height>61</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(100, 100, 100);
font: 87 9pt &quot;Arial Black&quot;;
color: rgb(255, 255, 255);
font: 9pt &quot;微软雅黑&quot;;</string>
</property>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>61</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>重命名</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QTextEdit" name="textEdit">
<property name="geometry">
<rect>
<x>90</x>
<y>10</y>
<width>231</width>
<height>41</height>
</rect>
</property>
</widget>
</widget>
<widget class="QPushButton" name="pushButton_4">
<property name="geometry">
<rect>
<x>850</x>
<y>210</y>
<width>91</width>
<height>41</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(100, 100, 100);
font: 87 9pt &quot;Arial Black&quot;;
color: rgb(255, 255, 255);
font: 9pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>合并</string>
</property>
</widget>
<widget class="QListWidget" name="listWidget">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>571</width>
<height>491</height>
</rect>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>
#include "third.h"
#include "ui_third.h"
#include "fourth.h"
#include <QWidget>
#include <QPushButton>
#include <QMouseEvent>
Third::Third(QWidget *parent) :
QWidget(parent),
ui(new Ui::Third)
{
ui->setupUi(this);
ui->radioButton_3->hide();
this->setAcceptDrops(true);
//去窗口边框
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint);
}
Third::~Third()
{
delete ui;
}
//Json数据解析
void Third::finishedSlot1(QNetworkReply *reply)
{
if(this->reply->error()==QNetworkReply::NoError)
{
// QJsonDocument document2=QJsonDocument::fromJson(array);
// QJsonObject object2 = document2.object();
QByteArray bytes = reply->readAll();
QJsonDocument doc1=QJsonDocument::fromJson(bytes);
QJsonObject json=doc1.object();
doc1.setObject(json);
QByteArray byte=doc1.toJson();
QString str=QString(byte);
qDebug() <<str;
QJsonParseError err;
QJsonDocument doc2=QJsonDocument::fromJson(byte,&err);
QJsonObject json2=doc2.object();
if(err.error != QJsonParseError::NoError)
{
qDebug()<<"json数据格式错误";
}
else
{
QJsonValue urlValue= json2.value("url");
urlAlreadySplit=urlValue.toString();
QString path=urlAlreadySplit.section('/',2);
qDebug()<<path;
pathAlreadySplit=path;
}
}
else
{
qDebug()<<"handle errors here";
QVariant statusCodeV = this->reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
//statusCoV是HTTdeP服务器的相应码,reply->error()是Qt定义的错误码,可以参考QT的文档
qDebug( "found error ....code: %d %d\n", statusCodeV.toInt(), (int)this->reply->error());
qDebug(qPrintable(this->reply->errorString()));
}
this->reply->deleteLater();
}
//鼠标拖拽事件
void Third::dragEnterEvent(QDragEnterEvent *event)
{
QString fileName = event->mimeData()->urls().first().toLocalFile();
QFileInfo file = QFileInfo(fileName);
QString file_suffix = file.suffix();
if(file_suffix == "pdf")
event->acceptProposedAction();
}
//鼠标拖拽放下事件,返回文件的URL
void Third::dropEvent(QDropEvent *event)
{
urlFile = event->mimeData()->urls().first().toString();
ui->radioButton_3->show();
ui->radioButton_3->setText(urlFile);
// ui->quit_2->show();
// ui->button_6->show();
// ui->lineEdit->setText(name);
}
void Third::on_pushButton_4_clicked()
{
if(ui->radioButton->isChecked())
{
// ui->radioButton_2->setCheckable(0);
if(ui->radioButton_3->isChecked())
{
m_manage=new QNetworkAccessManager(this);
connect(m_manage,SIGNAL(finished(QNetworkReply *)),this,SLOT(finishedSlot1(QNetworkReply *)));
QString a=ui->textEdit_4->toPlainText();
QString b=ui->textEdit_5->toPlainText();
QByteArray by1 = a.toUtf8();
QByteArray by2 = b.toUtf8();
parPart1.setHeader(QNetworkRequest::ContentDispositionHeader , QVariant(" form-data; name=start_page"));
parPart1.setBody(by1);
parPart2.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=end_page"));
parPart2.setBody(by2);
QHttpPart dbFilePart;
dbFilePart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=PdfFile; filename=new.pdf")); // file为后端定义的key,filename即为excel文件名
QUrl url=urlFile;
QString path=url.toLocalFile();
QFile::setPermissions(path,QFile::WriteOwner|QFile::ReadOwner);//设置读写权限
multiPart = new QHttpMultiPart(QHttpMultiPart::FormDataType);
file = new QFile(path);
file->open(QIODevice::ReadOnly);
dbFilePart.setBodyDevice(file);
file->setParent(multiPart);
multiPart->append(parPart1);
multiPart->append(parPart2);
multiPart->append(dbFilePart);
QNetworkRequest request;
request.setUrl(QUrl("http://heart.jixiaob.cn/PDF/e_split/"));
this->reply = this->m_manage->post(request, multiPart);
multiPart->setParent(reply);
}
else
{
qDebug()<<"请选择文件";
}
}
else if(ui->radioButton_2->isChecked())
{
// m_manage=new QNetworkAccessManager(this);
// connect(m_manage,SIGNAL(finished(QNetworkReply *)),this,SLOT(finishedSlot2(QNetworkReply *)));
// QString a=ui->textEdit_3->toPlainText();
// // QString b=ui->textEdit_11->toPlainText();
// QByteArray by1 = a.toUtf8();
// // QByteArray by2 = b.toUtf8();
// parPart1.setHeader(QNetworkRequest::ContentDispositionHeader , QVariant(" form-data; name=step"));
// parPart1.setBody(by1);
// // parPart2.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=end_page"));
// // parPart2.setBody(by2);
// QHttpPart dbFilePart;
// dbFilePart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=PdfFile; filename=new.pdf")); // file为后端定义的key,filename即为excel文件名
// QUrl url=urlFile;
// QString path=url.toLocalFile();
// QFile::setPermissions(path,QFile::WriteOwner|QFile::ReadOwner);//设置读写权限
// multiPart = new QHttpMultiPart(QHttpMultiPart::FormDataType);
// file = new QFile(path);
// file->open(QIODevice::ReadOnly);
// dbFilePart.setBodyDevice(file);
// file->setParent(multiPart);
// multiPart->append(parPart1);
// // multiPart->append(parPart2);
// multiPart->append(dbFilePart);
// QNetworkRequest request;
// request.setUrl(QUrl("http://heart.jixiaob.cn/PDF/a_split/"));
// this->reply = this->m_manage->post(request, multiPart);
// multiPart->setParent(reply);
}
else
{
}
}
void Third::finishedSlot2(QNetworkReply *reply)
{
if(this->reply->error()==QNetworkReply::NoError)
{
// QJsonDocument document2=QJsonDocument::fromJson(array);
// QJsonObject object2 = document2.object();
QByteArray bytes = reply->readAll();
QJsonDocument doc1=QJsonDocument::fromJson(bytes);
QJsonObject json=doc1.object();
doc1.setObject(json);
QByteArray byte=doc1.toJson();
QString str=QString(byte);
qDebug() <<str;
QJsonParseError err;
QJsonDocument doc2=QJsonDocument::fromJson(byte,&err);
QJsonObject json2=doc2.object();
if(err.error != QJsonParseError::NoError)
{
qDebug()<<"json数据格式错误";
}
else
{
QJsonValue countValue= json2.value("count");
qDebug()<<countValue;
QJsonValue dataValue=json2.value("data");
QJsonArray dataArray=dataValue.toArray();
qDebug()<<dataArray.count();
for(int i=0;i<dataArray.count();i++)
{
qDebug()<<"nihaoya";
QJsonObject urlObject=dataArray.at(i).toObject();
// QJsonObject urlObject=urlValue.toObject();
QJsonValue urlValue=urlObject.value("url");
QString url=urlValue.toString();
qDebug()<<url;
QDesktopServices::openUrl(QUrl::fromLocalFile(url));
}
// urlAlreadySplit=urlValue.toString();
// QString path=urlAlreadySplit.section('/',2);
// qDebug()<<path;
// pathAlreadySplit=path;
}
}
else
{
qDebug()<<"handle errors here";
QVariant statusCodeV = this->reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
//statusCoV是HTTdeP服务器的相应码,reply->error()是Qt定义的错误码,可以参考QT的文档
qDebug( "found error ....code: %d %d\n", statusCodeV.toInt(), (int)this->reply->error());
qDebug(qPrintable(this->reply->errorString()));
}
this->reply->deleteLater();
}
void Third::on_pushButton_6_clicked()
{
QFile file(pathAlreadySplit);
file.open(QIODevice::ReadOnly);
qDebug()<<"nihaoya";
QDesktopServices::openUrl(QUrl::fromLocalFile(urlAlreadySplit));
}
#ifndef THIRD_H
#define THIRD_H
#include <QWidget>
#include <QMainWindow>
#include <QPushButton>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QVariant>
#include <QByteArray>
#include <QUrl>
#include <QLineEdit>
#include <QJsonDocument>
#include <QJsonObject>
#include <QHttpPart>
#include <QHttpMultiPart>
#include <QFile>
#include <QDragEnterEvent>
#include <QDropEvent>
#include <QFileInfo>
#include <QMimeData>
#include <QJsonParseError>
#include <QDesktopServices>
#include <QJsonArray>
#include <QThread>
namespace Ui {
class Third;
}
class Third : public QWidget
{
Q_OBJECT
public:
explicit Third(QWidget *parent = nullptr);
~Third();
public:
Ui::Third *ui;
private:
Third *win_2;
QNetworkAccessManager *m_manage;
QNetworkReply* reply;
QNetworkRequest* m_request;
QHttpPart parPart1; //start_page
QHttpPart parPart2; //end_page
QHttpMultiPart *multiPart;
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
QFile *file; //post上传文件
QString urlFile; //拖入文件的URL
QString urlAlreadySplit; //拆分后文件的URL
QString pathAlreadySplit; //拆分后文件的path
private slots:
void finishedSlot1(QNetworkReply *);
void finishedSlot2(QNetworkReply *);
void on_pushButton_4_clicked();
void on_pushButton_6_clicked();
};
#endif // THIRD_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Third</class>
<widget class="QWidget" name="Third">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>960</width>
<height>520</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);</string>
</property>
<widget class="QPushButton" name="pushButton_6">
<property name="geometry">
<rect>
<x>750</x>
<y>210</y>
<width>91</width>
<height>41</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(100, 100, 100);
font: 87 9pt &quot;Arial Black&quot;;
color: rgb(255, 255, 255);
font: 9pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>打开文件</string>
</property>
</widget>
<widget class="QWidget" name="widget_4" native="true">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>571</width>
<height>61</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(100, 100, 100);
font: 87 9pt &quot;Arial Black&quot;;
color: rgb(255, 255, 255);
font: 9pt &quot;微软雅黑&quot;;</string>
</property>
<widget class="QRadioButton" name="radioButton_3">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>501</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string> 文件名</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_3" native="true">
<property name="geometry">
<rect>
<x>600</x>
<y>90</y>
<width>341</width>
<height>61</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(100, 100, 100);
font: 87 9pt &quot;Arial Black&quot;;
color: rgb(255, 255, 255);
font: 9pt &quot;微软雅黑&quot;;</string>
</property>
<widget class="QRadioButton" name="radioButton_2">
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>91</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string> 份数</string>
</property>
</widget>
<widget class="QTextEdit" name="textEdit_3">
<property name="geometry">
<rect>
<x>120</x>
<y>10</y>
<width>71</width>
<height>41</height>
</rect>
</property>
</widget>
</widget>
<widget class="QWidget" name="widget_2" native="true">
<property name="geometry">
<rect>
<x>600</x>
<y>10</y>
<width>341</width>
<height>71</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(100, 100, 100);
font: 87 9pt &quot;Arial Black&quot;;
color: rgb(255, 255, 255);
font: 9pt &quot;微软雅黑&quot;;</string>
</property>
<widget class="QRadioButton" name="radioButton">
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>91</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string> 页数</string>
</property>
</widget>
<widget class="QTextEdit" name="textEdit_4">
<property name="geometry">
<rect>
<x>120</x>
<y>10</y>
<width>71</width>
<height>41</height>
</rect>
</property>
</widget>
<widget class="QTextEdit" name="textEdit_5">
<property name="geometry">
<rect>
<x>210</x>
<y>10</y>
<width>71</width>
<height>41</height>
</rect>
</property>
</widget>
</widget>
<widget class="QPushButton" name="pushButton_4">
<property name="geometry">
<rect>
<x>850</x>
<y>210</y>
<width>91</width>
<height>41</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">font: 87 9pt &quot;Arial Black&quot;;
background-color: rgb(100, 100, 100);
color: rgb(255, 255, 255);
font: 9pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>拆分</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>
/********************************************************************************
** Form generated from reading UI file 'fourth.ui'
**
** Created by: Qt User Interface Compiler version 5.14.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_FOURTH_H
#define UI_FOURTH_H
#include <QtCore/QVariant>
#include <QtGui/QIcon>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QLabel>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_Fourth
{
public:
QWidget *centralwidget;
QWidget *widget_2;
QCheckBox *checkBox;
QPushButton *pushButton_2;
QWidget *widget_3;
QWidget *widget_4;
QWidget *widget;
QLabel *label;
QPushButton *quit_1;
void setupUi(QMainWindow *Fourth)
{
if (Fourth->objectName().isEmpty())
Fourth->setObjectName(QString::fromUtf8("Fourth"));
Fourth->resize(600, 400);
Fourth->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 255, 255);"));
centralwidget = new QWidget(Fourth);
centralwidget->setObjectName(QString::fromUtf8("centralwidget"));
widget_2 = new QWidget(centralwidget);
widget_2->setObjectName(QString::fromUtf8("widget_2"));
widget_2->setGeometry(QRect(10, 50, 581, 51));
widget_2->setStyleSheet(QString::fromUtf8("background-color: rgb(50, 50, 50);"));
checkBox = new QCheckBox(widget_2);
checkBox->setObjectName(QString::fromUtf8("checkBox"));
checkBox->setGeometry(QRect(20, 10, 491, 31));
checkBox->setStyleSheet(QString::fromUtf8("font: 9pt \"\345\276\256\350\275\257\351\233\205\351\273\221\";\n"
"color: rgb(255, 255, 255);"));
pushButton_2 = new QPushButton(widget_2);
pushButton_2->setObjectName(QString::fromUtf8("pushButton_2"));
pushButton_2->setGeometry(QRect(530, 10, 31, 31));
pushButton_2->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 255, 255);"));
QIcon icon;
icon.addFile(QString::fromUtf8("images/wen.png"), QSize(), QIcon::Normal, QIcon::Off);
pushButton_2->setIcon(icon);
widget_3 = new QWidget(centralwidget);
widget_3->setObjectName(QString::fromUtf8("widget_3"));
widget_3->setGeometry(QRect(0, 0, 601, 41));
widget_3->setStyleSheet(QString::fromUtf8(""));
widget_4 = new QWidget(widget_3);
widget_4->setObjectName(QString::fromUtf8("widget_4"));
widget_4->setGeometry(QRect(0, 0, 120, 80));
widget = new QWidget(widget_4);
widget->setObjectName(QString::fromUtf8("widget"));
widget->setGeometry(QRect(0, 0, 601, 401));
label = new QLabel(widget);
label->setObjectName(QString::fromUtf8("label"));
label->setGeometry(QRect(20, 10, 61, 21));
label->setStyleSheet(QString::fromUtf8("color: rgb(255, 255, 255);\n"
"font: 87 9pt \"Arial Black\";"));
quit_1 = new QPushButton(widget_3);
quit_1->setObjectName(QString::fromUtf8("quit_1"));
quit_1->setGeometry(QRect(570, 10, 21, 21));
quit_1->setStyleSheet(QString::fromUtf8("background-color: rgb(170, 0, 0);"));
QIcon icon1;
icon1.addFile(QString::fromUtf8("images/quit_2.png"), QSize(), QIcon::Normal, QIcon::Off);
quit_1->setIcon(icon1);
quit_1->setIconSize(QSize(10, 10));
Fourth->setCentralWidget(centralwidget);
widget_3->raise();
widget_2->raise();
retranslateUi(Fourth);
QMetaObject::connectSlotsByName(Fourth);
} // setupUi
void retranslateUi(QMainWindow *Fourth)
{
Fourth->setWindowTitle(QCoreApplication::translate("Fourth", "MainWindow", nullptr));
checkBox->setText(QCoreApplication::translate("Fourth", "CheckBox", nullptr));
pushButton_2->setText(QString());
label->setText(QCoreApplication::translate("Fourth", "Prompt", nullptr));
quit_1->setText(QString());
} // retranslateUi
};
namespace Ui {
class Fourth: public Ui_Fourth {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_FOURTH_H
/********************************************************************************
** Form generated from reading UI file 'frish.ui'
**
** Created by: Qt User Interface Compiler version 5.14.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_FRISH_H
#define UI_FRISH_H
#include <QtCore/QVariant>
#include <QtGui/QIcon>
#include <QtWidgets/QApplication>
#include <QtWidgets/QLabel>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_Frish
{
public:
QWidget *centralwidget;
QWidget *widget;
QLabel *label_1;
QPushButton *quit_1;
QPushButton *button_2;
QPushButton *button_3;
QLabel *label;
void setupUi(QMainWindow *Frish)
{
if (Frish->objectName().isEmpty())
Frish->setObjectName(QString::fromUtf8("Frish"));
Frish->resize(959, 659);
centralwidget = new QWidget(Frish);
centralwidget->setObjectName(QString::fromUtf8("centralwidget"));
widget = new QWidget(centralwidget);
widget->setObjectName(QString::fromUtf8("widget"));
widget->setGeometry(QRect(0, 0, 960, 141));
widget->setStyleSheet(QString::fromUtf8("background-color: rgb(100, 100, 100);"));
label_1 = new QLabel(widget);
label_1->setObjectName(QString::fromUtf8("label_1"));
label_1->setGeometry(QRect(20, 10, 211, 31));
label_1->setStyleSheet(QString::fromUtf8("font: 87 14pt \"Arial Black\";\n"
"color: rgb(255, 255, 255);"));
quit_1 = new QPushButton(widget);
quit_1->setObjectName(QString::fromUtf8("quit_1"));
quit_1->setGeometry(QRect(920, 10, 31, 31));
quit_1->setMinimumSize(QSize(0, 0));
quit_1->setMaximumSize(QSize(60, 40));
quit_1->setStyleSheet(QString::fromUtf8(""));
QIcon icon;
icon.addFile(QString::fromUtf8("../YunHengToolbox/images/quit_2.png"), QSize(), QIcon::Normal, QIcon::Off);
quit_1->setIcon(icon);
quit_1->setIconSize(QSize(18, 18));
button_2 = new QPushButton(widget);
button_2->setObjectName(QString::fromUtf8("button_2"));
button_2->setGeometry(QRect(0, 90, 71, 51));
QIcon icon1;
icon1.addFile(QString::fromUtf8("../YunHengToolbox/images/Split.png"), QSize(), QIcon::Normal, QIcon::Off);
button_2->setIcon(icon1);
button_2->setIconSize(QSize(35, 35));
button_3 = new QPushButton(widget);
button_3->setObjectName(QString::fromUtf8("button_3"));
button_3->setGeometry(QRect(70, 90, 71, 51));
QIcon icon2;
icon2.addFile(QString::fromUtf8("../YunHengToolbox/images/merge.png"), QSize(), QIcon::Normal, QIcon::Off);
button_3->setIcon(icon2);
button_3->setIconSize(QSize(35, 35));
label = new QLabel(centralwidget);
label->setObjectName(QString::fromUtf8("label"));
label->setGeometry(QRect(0, 150, 961, 511));
label->setStyleSheet(QString::fromUtf8("border-image: url(:/images/back.jpg);"));
Frish->setCentralWidget(centralwidget);
retranslateUi(Frish);
QMetaObject::connectSlotsByName(Frish);
} // setupUi
void retranslateUi(QMainWindow *Frish)
{
Frish->setWindowTitle(QCoreApplication::translate("Frish", "Frish", nullptr));
label_1->setText(QCoreApplication::translate("Frish", "Yunheng toolbox", nullptr));
quit_1->setText(QString());
button_2->setText(QString());
button_3->setText(QString());
label->setText(QString());
} // retranslateUi
};
namespace Ui {
class Frish: public Ui_Frish {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_FRISH_H
/********************************************************************************
** Form generated from reading UI file 'second.ui'
**
** Created by: Qt User Interface Compiler version 5.14.1
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_SECOND_H
#define UI_SECOND_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QLabel>
#include <QtWidgets/QListWidget>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_Second
{
public:
QPushButton *pushButton_6;
QWidget *widget_2;
QLabel *label_3;
QTextEdit *textEdit;
QPushButton *pushButton_4;
QListWidget *listWidget;
void setupUi(QWidget *Second)
{
if (Second->objectName().isEmpty())
Second->setObjectName(QString::fromUtf8("Second"));
Second->resize(960, 539);
Second->setStyleSheet(QString::fromUtf8(""));
pushButton_6 = new QPushButton(Second);
pushButton_6->setObjectName(QString::fromUtf8("pushButton_6"));
pushButton_6->setGeometry(QRect(750, 210, 91, 41));
pushButton_6->setStyleSheet(QString::fromUtf8("background-color: rgb(100, 100, 100);\n"
"font: 87 9pt \"Arial Black\";\n"
"color: rgb(255, 255, 255);\n"
"font: 9pt \"\345\276\256\350\275\257\351\233\205\351\273\221\";"));
widget_2 = new QWidget(Second);
widget_2->setObjectName(QString::fromUtf8("widget_2"));
widget_2->setGeometry(QRect(610, 20, 331, 61));
widget_2->setStyleSheet(QString::fromUtf8("background-color: rgb(100, 100, 100);\n"
"font: 87 9pt \"Arial Black\";\n"
"color: rgb(255, 255, 255);\n"
"font: 9pt \"\345\276\256\350\275\257\351\233\205\351\273\221\";"));
label_3 = new QLabel(widget_2);
label_3->setObjectName(QString::fromUtf8("label_3"));
label_3->setGeometry(QRect(20, 10, 61, 41));
label_3->setAlignment(Qt::AlignCenter);
textEdit = new QTextEdit(widget_2);
textEdit->setObjectName(QString::fromUtf8("textEdit"));
textEdit->setGeometry(QRect(90, 10, 231, 41));
pushButton_4 = new QPushButton(Second);
pushButton_4->setObjectName(QString::fromUtf8("pushButton_4"));
pushButton_4->setGeometry(QRect(850, 210, 91, 41));
pushButton_4->setStyleSheet(QString::fromUtf8("background-color: rgb(100, 100, 100);\n"
"font: 87 9pt \"Arial Black\";\n"
"color: rgb(255, 255, 255);\n"
"font: 9pt \"\345\276\256\350\275\257\351\233\205\351\273\221\";"));
listWidget = new QListWidget(Second);
listWidget->setObjectName(QString::fromUtf8("listWidget"));
listWidget->setGeometry(QRect(20, 20, 571, 491));
retranslateUi(Second);
QMetaObject::connectSlotsByName(Second);
} // setupUi
void retranslateUi(QWidget *Second)
{
Second->setWindowTitle(QCoreApplication::translate("Second", "Form", nullptr));
pushButton_6->setText(QCoreApplication::translate("Second", "\346\211\223\345\274\200\346\226\207\344\273\266", nullptr));
label_3->setText(QCoreApplication::translate("Second", "\351\207\215\345\221\275\345\220\215", nullptr));
pushButton_4->setText(QCoreApplication::translate("Second", "\345\220\210\345\271\266", nullptr));
} // retranslateUi
};
namespace Ui {
class Second: public Ui_Second {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_SECOND_H
/********************************************************************************
** Form generated from reading UI file 'third.ui'
**
** Created by: Qt User Interface Compiler version 5.14.1
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_THIRD_H
#define UI_THIRD_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QRadioButton>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_Third
{
public:
QPushButton *pushButton_6;
QWidget *widget_4;
QRadioButton *radioButton_3;
QWidget *widget_3;
QRadioButton *radioButton_2;
QTextEdit *textEdit_3;
QWidget *widget_2;
QRadioButton *radioButton;
QTextEdit *textEdit_4;
QTextEdit *textEdit_5;
QPushButton *pushButton_4;
void setupUi(QWidget *Third)
{
if (Third->objectName().isEmpty())
Third->setObjectName(QString::fromUtf8("Third"));
Third->resize(960, 520);
Third->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 255, 255);"));
pushButton_6 = new QPushButton(Third);
pushButton_6->setObjectName(QString::fromUtf8("pushButton_6"));
pushButton_6->setGeometry(QRect(750, 210, 91, 41));
pushButton_6->setStyleSheet(QString::fromUtf8("background-color: rgb(100, 100, 100);\n"
"font: 87 9pt \"Arial Black\";\n"
"color: rgb(255, 255, 255);\n"
"font: 9pt \"\345\276\256\350\275\257\351\233\205\351\273\221\";"));
widget_4 = new QWidget(Third);
widget_4->setObjectName(QString::fromUtf8("widget_4"));
widget_4->setGeometry(QRect(10, 10, 571, 61));
widget_4->setStyleSheet(QString::fromUtf8("background-color: rgb(100, 100, 100);\n"
"font: 87 9pt \"Arial Black\";\n"
"color: rgb(255, 255, 255);\n"
"font: 9pt \"\345\276\256\350\275\257\351\233\205\351\273\221\";"));
radioButton_3 = new QRadioButton(widget_4);
radioButton_3->setObjectName(QString::fromUtf8("radioButton_3"));
radioButton_3->setGeometry(QRect(20, 20, 501, 21));
widget_3 = new QWidget(Third);
widget_3->setObjectName(QString::fromUtf8("widget_3"));
widget_3->setGeometry(QRect(600, 90, 341, 61));
widget_3->setStyleSheet(QString::fromUtf8("background-color: rgb(100, 100, 100);\n"
"font: 87 9pt \"Arial Black\";\n"
"color: rgb(255, 255, 255);\n"
"font: 9pt \"\345\276\256\350\275\257\351\233\205\351\273\221\";"));
radioButton_2 = new QRadioButton(widget_3);
radioButton_2->setObjectName(QString::fromUtf8("radioButton_2"));
radioButton_2->setGeometry(QRect(20, 10, 91, 21));
textEdit_3 = new QTextEdit(widget_3);
textEdit_3->setObjectName(QString::fromUtf8("textEdit_3"));
textEdit_3->setGeometry(QRect(120, 10, 71, 41));
widget_2 = new QWidget(Third);
widget_2->setObjectName(QString::fromUtf8("widget_2"));
widget_2->setGeometry(QRect(600, 10, 341, 71));
widget_2->setStyleSheet(QString::fromUtf8("background-color: rgb(100, 100, 100);\n"
"font: 87 9pt \"Arial Black\";\n"
"color: rgb(255, 255, 255);\n"
"font: 9pt \"\345\276\256\350\275\257\351\233\205\351\273\221\";"));
radioButton = new QRadioButton(widget_2);
radioButton->setObjectName(QString::fromUtf8("radioButton"));
radioButton->setGeometry(QRect(20, 10, 91, 21));
textEdit_4 = new QTextEdit(widget_2);
textEdit_4->setObjectName(QString::fromUtf8("textEdit_4"));
textEdit_4->setGeometry(QRect(120, 10, 71, 41));
textEdit_5 = new QTextEdit(widget_2);
textEdit_5->setObjectName(QString::fromUtf8("textEdit_5"));
textEdit_5->setGeometry(QRect(210, 10, 71, 41));
pushButton_4 = new QPushButton(Third);
pushButton_4->setObjectName(QString::fromUtf8("pushButton_4"));
pushButton_4->setGeometry(QRect(850, 210, 91, 41));
pushButton_4->setStyleSheet(QString::fromUtf8("font: 87 9pt \"Arial Black\";\n"
"background-color: rgb(100, 100, 100);\n"
"color: rgb(255, 255, 255);\n"
"font: 9pt \"\345\276\256\350\275\257\351\233\205\351\273\221\";"));
retranslateUi(Third);
QMetaObject::connectSlotsByName(Third);
} // setupUi
void retranslateUi(QWidget *Third)
{
Third->setWindowTitle(QCoreApplication::translate("Third", "Form", nullptr));
pushButton_6->setText(QCoreApplication::translate("Third", "\346\211\223\345\274\200\346\226\207\344\273\266", nullptr));
radioButton_3->setText(QCoreApplication::translate("Third", " \346\226\207\344\273\266\345\220\215", nullptr));
radioButton_2->setText(QCoreApplication::translate("Third", " \344\273\275\346\225\260", nullptr));
radioButton->setText(QCoreApplication::translate("Third", " \351\241\265\346\225\260", nullptr));
pushButton_4->setText(QCoreApplication::translate("Third", "\346\213\206\345\210\206", nullptr));
} // retranslateUi
};
namespace Ui {
class Third: public Ui_Third {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_THIRD_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment