├── .gitignore ├── Debug ├── .qmake.stash ├── Makefile ├── Makefile.Debug ├── Makefile.Release ├── debug │ ├── html_news.txt │ ├── html_rumor.txt │ ├── html_rumor_info.txt │ ├── libeay32.dll │ ├── moc_about.cpp │ ├── moc_dialog.cpp │ ├── moc_news_info.cpp │ ├── moc_predefs.h │ ├── moc_qcustomplot.cpp │ ├── moc_rumor.cpp │ ├── moc_rumor_info.cpp │ ├── qrc_img.cpp │ ├── qt_2019_ncov.exe │ └── ssleay32.dll ├── html_news.txt ├── html_rumor.txt ├── html_rumor_info.txt ├── moc_about.cpp ├── moc_dialog.cpp ├── moc_predefs.h ├── moc_qcustomplot.cpp ├── moc_rumor.cpp ├── moc_rumor_info.cpp ├── object_script.qt_2019_ncov.Debug ├── object_script.qt_2019_ncov.Release ├── qrc_img.cpp ├── qt_2019_ncov ├── qt_2019_ncov_resource.rc ├── ui_about.h ├── ui_dialog.h ├── ui_news_info.h ├── ui_rumor.h └── ui_rumor_info.h ├── Export └── 备用OSS下载链接.txt ├── README.md ├── Release ├── .qmake.stash ├── Makefile ├── Makefile.Debug ├── Makefile.Release ├── html_news.txt ├── html_rumor.txt ├── html_rumor_info.txt ├── object_script.qt_2019_ncov.Debug ├── object_script.qt_2019_ncov.Release ├── qt_2019_ncov ├── qt_2019_ncov_resource.rc └── release │ ├── html_news.txt │ ├── html_rumor.txt │ ├── html_rumor_info.txt │ ├── libeay32.dll │ ├── qt_2019_ncov.exe │ └── ssleay32.dll ├── about.cpp ├── about.h ├── about.ui ├── api.txt ├── bitbug_favicon.ico ├── del_obj.bat ├── dialog.cpp ├── dialog.h ├── dialog.ui ├── img.qrc ├── lib ├── README.txt ├── libcrypto-1_1-x64.dll ├── libeay32.dll ├── libssl-1_1-x64.dll └── ssleay32.dll ├── main.cpp ├── my_sub.jpg ├── network.cpp ├── new_top.jpg ├── news_info.cpp ├── news_info.h ├── news_info.ui ├── parse.cpp ├── plot.cpp ├── qcustomplot.cpp ├── qcustomplot.h ├── qt_2019_ncov.pro ├── rumor.cpp ├── rumor.h ├── rumor.ui ├── rumor_info.cpp ├── rumor_info.h ├── rumor_info.ui └── slots.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | .o 2 | /Export 3 | .exe 4 | 5 | -------------------------------------------------------------------------------- /Debug/.qmake.stash: -------------------------------------------------------------------------------- 1 | QMAKE_DEFAULT_INCDIRS = \ 2 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include \ 3 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include-fixed \ 4 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include \ 5 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include/c++ \ 6 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/i686-w64-mingw32 \ 7 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/backward 8 | QMAKE_DEFAULT_LIBDIRS = \ 9 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0 \ 10 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc \ 11 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/lib \ 12 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib 13 | QMAKE_CXX.INCDIRS = \ 14 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include \ 15 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include-fixed \ 16 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include \ 17 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include/c++ \ 18 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/i686-w64-mingw32 \ 19 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/backward \ 20 | F:/Qt/Qt5.9.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include \ 21 | F:/Qt/Qt5.9.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include-fixed \ 22 | F:/Qt/Qt5.9.0/Tools/mingw530_32/i686-w64-mingw32/include \ 23 | F:/Qt/Qt5.9.0/Tools/mingw530_32/i686-w64-mingw32/include/c++ \ 24 | F:/Qt/Qt5.9.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/i686-w64-mingw32 \ 25 | F:/Qt/Qt5.9.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/backward 26 | QMAKE_CXX.LIBDIRS = \ 27 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0 \ 28 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc \ 29 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/lib \ 30 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib \ 31 | F:/Qt/Qt5.9.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0 \ 32 | F:/Qt/Qt5.9.0/Tools/mingw530_32/lib/gcc \ 33 | F:/Qt/Qt5.9.0/Tools/mingw530_32/i686-w64-mingw32/lib \ 34 | F:/Qt/Qt5.9.0/Tools/mingw530_32/lib 35 | QMAKE_CXX.QT_COMPILER_STDCXX = 199711L 36 | QMAKE_CXX.QT_GCC_MAJOR_VERSION = 5 37 | QMAKE_CXX.QT_GCC_MINOR_VERSION = 3 38 | QMAKE_CXX.QT_GCC_PATCH_VERSION = 0 39 | QMAKE_CXX.COMPILER_MACROS = \ 40 | QT_COMPILER_STDCXX \ 41 | QT_GCC_MAJOR_VERSION \ 42 | QT_GCC_MINOR_VERSION \ 43 | QT_GCC_PATCH_VERSION 44 | -------------------------------------------------------------------------------- /Debug/debug/html_news.txt: -------------------------------------------------------------------------------- 1 | 2 | 5 |

· *

6 |

*

7 |

来源:* 发布于:*

8 |
* 9 | 10 | 13 |

查看更多报道 央视新闻直播

-------------------------------------------------------------------------------- /Debug/debug/html_rumor.txt: -------------------------------------------------------------------------------- 1 | 4 |

*: *

5 |

*

6 |
* 7 | 10 |

查看更多辟谣信息

-------------------------------------------------------------------------------- /Debug/debug/html_rumor_info.txt: -------------------------------------------------------------------------------- 1 | 2 | 5 |

*

6 |

7 |

"流传说法:*"

8 |
9 |

较真鉴定: [*]*

10 |

11 |

查证要点:

12 | 13 | * 14 |

* *

* 15 | 16 | 17 |

18 |

查证者:* *

19 |
20 |

时间:* 来源:*

21 |


-------------------------------------------------------------------------------- /Debug/debug/libeay32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whik/qt_2019_ncov/9474e808ee5095955daf12b981141b676b35805b/Debug/debug/libeay32.dll -------------------------------------------------------------------------------- /Debug/debug/moc_about.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'about.h' 3 | ** 4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0) 5 | ** 6 | ** WARNING! All changes made in this file will be lost! 7 | *****************************************************************************/ 8 | 9 | #include "../../about.h" 10 | #include 11 | #include 12 | #if !defined(Q_MOC_OUTPUT_REVISION) 13 | #error "The header file 'about.h' doesn't include ." 14 | #elif Q_MOC_OUTPUT_REVISION != 67 15 | #error "This file was generated using the moc from 5.8.0. It" 16 | #error "cannot be used with the include files from this version of Qt." 17 | #error "(The moc has changed too much.)" 18 | #endif 19 | 20 | QT_BEGIN_MOC_NAMESPACE 21 | QT_WARNING_PUSH 22 | QT_WARNING_DISABLE_DEPRECATED 23 | struct qt_meta_stringdata_about_t { 24 | QByteArrayData data[4]; 25 | char stringdata0[29]; 26 | }; 27 | #define QT_MOC_LITERAL(idx, ofs, len) \ 28 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ 29 | qptrdiff(offsetof(qt_meta_stringdata_about_t, stringdata0) + ofs \ 30 | - idx * sizeof(QByteArrayData)) \ 31 | ) 32 | static const qt_meta_stringdata_about_t qt_meta_stringdata_about = { 33 | { 34 | QT_MOC_LITERAL(0, 0, 5), // "about" 35 | QT_MOC_LITERAL(1, 6, 17), // "anchorClickedSlot" 36 | QT_MOC_LITERAL(2, 24, 0), // "" 37 | QT_MOC_LITERAL(3, 25, 3) // "url" 38 | 39 | }, 40 | "about\0anchorClickedSlot\0\0url" 41 | }; 42 | #undef QT_MOC_LITERAL 43 | 44 | static const uint qt_meta_data_about[] = { 45 | 46 | // content: 47 | 7, // revision 48 | 0, // classname 49 | 0, 0, // classinfo 50 | 1, 14, // methods 51 | 0, 0, // properties 52 | 0, 0, // enums/sets 53 | 0, 0, // constructors 54 | 0, // flags 55 | 0, // signalCount 56 | 57 | // slots: name, argc, parameters, tag, flags 58 | 1, 1, 19, 2, 0x08 /* Private */, 59 | 60 | // slots: parameters 61 | QMetaType::Void, QMetaType::QUrl, 3, 62 | 63 | 0 // eod 64 | }; 65 | 66 | void about::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) 67 | { 68 | if (_c == QMetaObject::InvokeMetaMethod) { 69 | about *_t = static_cast(_o); 70 | Q_UNUSED(_t) 71 | switch (_id) { 72 | case 0: _t->anchorClickedSlot((*reinterpret_cast< const QUrl(*)>(_a[1]))); break; 73 | default: ; 74 | } 75 | } 76 | } 77 | 78 | const QMetaObject about::staticMetaObject = { 79 | { &QDialog::staticMetaObject, qt_meta_stringdata_about.data, 80 | qt_meta_data_about, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} 81 | }; 82 | 83 | 84 | const QMetaObject *about::metaObject() const 85 | { 86 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; 87 | } 88 | 89 | void *about::qt_metacast(const char *_clname) 90 | { 91 | if (!_clname) return Q_NULLPTR; 92 | if (!strcmp(_clname, qt_meta_stringdata_about.stringdata0)) 93 | return static_cast(const_cast< about*>(this)); 94 | return QDialog::qt_metacast(_clname); 95 | } 96 | 97 | int about::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 98 | { 99 | _id = QDialog::qt_metacall(_c, _id, _a); 100 | if (_id < 0) 101 | return _id; 102 | if (_c == QMetaObject::InvokeMetaMethod) { 103 | if (_id < 1) 104 | qt_static_metacall(this, _c, _id, _a); 105 | _id -= 1; 106 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { 107 | if (_id < 1) 108 | *reinterpret_cast(_a[0]) = -1; 109 | _id -= 1; 110 | } 111 | return _id; 112 | } 113 | QT_WARNING_POP 114 | QT_END_MOC_NAMESPACE 115 | -------------------------------------------------------------------------------- /Debug/debug/moc_dialog.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'dialog.h' 3 | ** 4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0) 5 | ** 6 | ** WARNING! All changes made in this file will be lost! 7 | *****************************************************************************/ 8 | 9 | #include "../../dialog.h" 10 | #include 11 | #include 12 | #if !defined(Q_MOC_OUTPUT_REVISION) 13 | #error "The header file 'dialog.h' doesn't include ." 14 | #elif Q_MOC_OUTPUT_REVISION != 67 15 | #error "This file was generated using the moc from 5.8.0. It" 16 | #error "cannot be used with the include files from this version of Qt." 17 | #error "(The moc has changed too much.)" 18 | #endif 19 | 20 | QT_BEGIN_MOC_NAMESPACE 21 | QT_WARNING_PUSH 22 | QT_WARNING_DISABLE_DEPRECATED 23 | struct qt_meta_stringdata_Dialog_t { 24 | QByteArrayData data[18]; 25 | char stringdata0[227]; 26 | }; 27 | #define QT_MOC_LITERAL(idx, ofs, len) \ 28 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ 29 | qptrdiff(offsetof(qt_meta_stringdata_Dialog_t, stringdata0) + ofs \ 30 | - idx * sizeof(QByteArrayData)) \ 31 | ) 32 | static const qt_meta_stringdata_Dialog_t qt_meta_stringdata_Dialog = { 33 | { 34 | QT_MOC_LITERAL(0, 0, 6), // "Dialog" 35 | QT_MOC_LITERAL(1, 7, 21), // "on_btn_update_clicked" 36 | QT_MOC_LITERAL(2, 29, 0), // "" 37 | QT_MOC_LITERAL(3, 30, 13), // "httpReadyRead" 38 | QT_MOC_LITERAL(4, 44, 12), // "httpFinished" 39 | QT_MOC_LITERAL(5, 57, 18), // "widget_chart_event" 40 | QT_MOC_LITERAL(6, 76, 12), // "QMouseEvent*" 41 | QT_MOC_LITERAL(7, 89, 6), // "update" 42 | QT_MOC_LITERAL(8, 96, 17), // "anchorClickedSlot" 43 | QT_MOC_LITERAL(9, 114, 3), // "url" 44 | QT_MOC_LITERAL(10, 118, 10), // "drawCharts" 45 | QT_MOC_LITERAL(11, 129, 2), // "id" 46 | QT_MOC_LITERAL(12, 132, 20), // "on_btn_about_clicked" 47 | QT_MOC_LITERAL(13, 153, 10), // "closeEvent" 48 | QT_MOC_LITERAL(14, 164, 12), // "QCloseEvent*" 49 | QT_MOC_LITERAL(15, 177, 3), // "win" 50 | QT_MOC_LITERAL(16, 181, 20), // "on_btn_rumor_clicked" 51 | QT_MOC_LITERAL(17, 202, 24) // "on_btn_chkUpdate_clicked" 52 | 53 | }, 54 | "Dialog\0on_btn_update_clicked\0\0" 55 | "httpReadyRead\0httpFinished\0" 56 | "widget_chart_event\0QMouseEvent*\0update\0" 57 | "anchorClickedSlot\0url\0drawCharts\0id\0" 58 | "on_btn_about_clicked\0closeEvent\0" 59 | "QCloseEvent*\0win\0on_btn_rumor_clicked\0" 60 | "on_btn_chkUpdate_clicked" 61 | }; 62 | #undef QT_MOC_LITERAL 63 | 64 | static const uint qt_meta_data_Dialog[] = { 65 | 66 | // content: 67 | 7, // revision 68 | 0, // classname 69 | 0, 0, // classinfo 70 | 11, 14, // methods 71 | 0, 0, // properties 72 | 0, 0, // enums/sets 73 | 0, 0, // constructors 74 | 0, // flags 75 | 0, // signalCount 76 | 77 | // slots: name, argc, parameters, tag, flags 78 | 1, 0, 69, 2, 0x08 /* Private */, 79 | 3, 0, 70, 2, 0x08 /* Private */, 80 | 4, 0, 71, 2, 0x08 /* Private */, 81 | 5, 1, 72, 2, 0x08 /* Private */, 82 | 7, 0, 75, 2, 0x08 /* Private */, 83 | 8, 1, 76, 2, 0x08 /* Private */, 84 | 10, 1, 79, 2, 0x08 /* Private */, 85 | 12, 0, 82, 2, 0x08 /* Private */, 86 | 13, 1, 83, 2, 0x08 /* Private */, 87 | 16, 0, 86, 2, 0x08 /* Private */, 88 | 17, 0, 87, 2, 0x08 /* Private */, 89 | 90 | // slots: parameters 91 | QMetaType::Void, 92 | QMetaType::Void, 93 | QMetaType::Void, 94 | QMetaType::Void, 0x80000000 | 6, 2, 95 | QMetaType::Void, 96 | QMetaType::Void, QMetaType::QUrl, 9, 97 | QMetaType::Void, QMetaType::Int, 11, 98 | QMetaType::Void, 99 | QMetaType::Void, 0x80000000 | 14, 15, 100 | QMetaType::Void, 101 | QMetaType::Void, 102 | 103 | 0 // eod 104 | }; 105 | 106 | void Dialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) 107 | { 108 | if (_c == QMetaObject::InvokeMetaMethod) { 109 | Dialog *_t = static_cast(_o); 110 | Q_UNUSED(_t) 111 | switch (_id) { 112 | case 0: _t->on_btn_update_clicked(); break; 113 | case 1: _t->httpReadyRead(); break; 114 | case 2: _t->httpFinished(); break; 115 | case 3: _t->widget_chart_event((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break; 116 | case 4: _t->update(); break; 117 | case 5: _t->anchorClickedSlot((*reinterpret_cast< const QUrl(*)>(_a[1]))); break; 118 | case 6: _t->drawCharts((*reinterpret_cast< int(*)>(_a[1]))); break; 119 | case 7: _t->on_btn_about_clicked(); break; 120 | case 8: _t->closeEvent((*reinterpret_cast< QCloseEvent*(*)>(_a[1]))); break; 121 | case 9: _t->on_btn_rumor_clicked(); break; 122 | case 10: _t->on_btn_chkUpdate_clicked(); break; 123 | default: ; 124 | } 125 | } 126 | } 127 | 128 | const QMetaObject Dialog::staticMetaObject = { 129 | { &QDialog::staticMetaObject, qt_meta_stringdata_Dialog.data, 130 | qt_meta_data_Dialog, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} 131 | }; 132 | 133 | 134 | const QMetaObject *Dialog::metaObject() const 135 | { 136 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; 137 | } 138 | 139 | void *Dialog::qt_metacast(const char *_clname) 140 | { 141 | if (!_clname) return Q_NULLPTR; 142 | if (!strcmp(_clname, qt_meta_stringdata_Dialog.stringdata0)) 143 | return static_cast(const_cast< Dialog*>(this)); 144 | return QDialog::qt_metacast(_clname); 145 | } 146 | 147 | int Dialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 148 | { 149 | _id = QDialog::qt_metacall(_c, _id, _a); 150 | if (_id < 0) 151 | return _id; 152 | if (_c == QMetaObject::InvokeMetaMethod) { 153 | if (_id < 11) 154 | qt_static_metacall(this, _c, _id, _a); 155 | _id -= 11; 156 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { 157 | if (_id < 11) 158 | *reinterpret_cast(_a[0]) = -1; 159 | _id -= 11; 160 | } 161 | return _id; 162 | } 163 | QT_WARNING_POP 164 | QT_END_MOC_NAMESPACE 165 | -------------------------------------------------------------------------------- /Debug/debug/moc_news_info.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'news_info.h' 3 | ** 4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0) 5 | ** 6 | ** WARNING! All changes made in this file will be lost! 7 | *****************************************************************************/ 8 | 9 | #include "../../news_info.h" 10 | #include 11 | #include 12 | #if !defined(Q_MOC_OUTPUT_REVISION) 13 | #error "The header file 'news_info.h' doesn't include ." 14 | #elif Q_MOC_OUTPUT_REVISION != 67 15 | #error "This file was generated using the moc from 5.8.0. It" 16 | #error "cannot be used with the include files from this version of Qt." 17 | #error "(The moc has changed too much.)" 18 | #endif 19 | 20 | QT_BEGIN_MOC_NAMESPACE 21 | QT_WARNING_PUSH 22 | QT_WARNING_DISABLE_DEPRECATED 23 | struct qt_meta_stringdata_news_info_t { 24 | QByteArrayData data[4]; 25 | char stringdata0[55]; 26 | }; 27 | #define QT_MOC_LITERAL(idx, ofs, len) \ 28 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ 29 | qptrdiff(offsetof(qt_meta_stringdata_news_info_t, stringdata0) + ofs \ 30 | - idx * sizeof(QByteArrayData)) \ 31 | ) 32 | static const qt_meta_stringdata_news_info_t qt_meta_stringdata_news_info = { 33 | { 34 | QT_MOC_LITERAL(0, 0, 9), // "news_info" 35 | QT_MOC_LITERAL(1, 10, 22), // "on_btn_refresh_clicked" 36 | QT_MOC_LITERAL(2, 33, 0), // "" 37 | QT_MOC_LITERAL(3, 34, 20) // "on_btn_close_clicked" 38 | 39 | }, 40 | "news_info\0on_btn_refresh_clicked\0\0" 41 | "on_btn_close_clicked" 42 | }; 43 | #undef QT_MOC_LITERAL 44 | 45 | static const uint qt_meta_data_news_info[] = { 46 | 47 | // content: 48 | 7, // revision 49 | 0, // classname 50 | 0, 0, // classinfo 51 | 2, 14, // methods 52 | 0, 0, // properties 53 | 0, 0, // enums/sets 54 | 0, 0, // constructors 55 | 0, // flags 56 | 0, // signalCount 57 | 58 | // slots: name, argc, parameters, tag, flags 59 | 1, 0, 24, 2, 0x08 /* Private */, 60 | 3, 0, 25, 2, 0x08 /* Private */, 61 | 62 | // slots: parameters 63 | QMetaType::Void, 64 | QMetaType::Void, 65 | 66 | 0 // eod 67 | }; 68 | 69 | void news_info::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) 70 | { 71 | if (_c == QMetaObject::InvokeMetaMethod) { 72 | news_info *_t = static_cast(_o); 73 | Q_UNUSED(_t) 74 | switch (_id) { 75 | case 0: _t->on_btn_refresh_clicked(); break; 76 | case 1: _t->on_btn_close_clicked(); break; 77 | default: ; 78 | } 79 | } 80 | Q_UNUSED(_a); 81 | } 82 | 83 | const QMetaObject news_info::staticMetaObject = { 84 | { &QDialog::staticMetaObject, qt_meta_stringdata_news_info.data, 85 | qt_meta_data_news_info, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} 86 | }; 87 | 88 | 89 | const QMetaObject *news_info::metaObject() const 90 | { 91 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; 92 | } 93 | 94 | void *news_info::qt_metacast(const char *_clname) 95 | { 96 | if (!_clname) return Q_NULLPTR; 97 | if (!strcmp(_clname, qt_meta_stringdata_news_info.stringdata0)) 98 | return static_cast(const_cast< news_info*>(this)); 99 | return QDialog::qt_metacast(_clname); 100 | } 101 | 102 | int news_info::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 103 | { 104 | _id = QDialog::qt_metacall(_c, _id, _a); 105 | if (_id < 0) 106 | return _id; 107 | if (_c == QMetaObject::InvokeMetaMethod) { 108 | if (_id < 2) 109 | qt_static_metacall(this, _c, _id, _a); 110 | _id -= 2; 111 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { 112 | if (_id < 2) 113 | *reinterpret_cast(_a[0]) = -1; 114 | _id -= 2; 115 | } 116 | return _id; 117 | } 118 | QT_WARNING_POP 119 | QT_END_MOC_NAMESPACE 120 | -------------------------------------------------------------------------------- /Debug/debug/moc_predefs.h: -------------------------------------------------------------------------------- 1 | #define __DBL_MIN_EXP__ (-1021) 2 | #define __cpp_attributes 200809 3 | #define __pentiumpro__ 1 4 | #define __UINT_LEAST16_MAX__ 0xffff 5 | #define __ATOMIC_ACQUIRE 2 6 | #define __FLT_MIN__ 1.17549435082228750797e-38F 7 | #define __GCC_IEC_559_COMPLEX 2 8 | #define __UINT_LEAST8_TYPE__ unsigned char 9 | #define __SIZEOF_FLOAT80__ 12 10 | #define _WIN32 1 11 | #define __INTMAX_C(c) c ## LL 12 | #define __CHAR_BIT__ 8 13 | #define __UINT8_MAX__ 0xff 14 | #define __WINT_MAX__ 0xffff 15 | #define __cpp_static_assert 200410 16 | #define __ORDER_LITTLE_ENDIAN__ 1234 17 | #define __SIZE_MAX__ 0xffffffffU 18 | #define __WCHAR_MAX__ 0xffff 19 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 20 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 21 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 22 | #define __DBL_DENORM_MIN__ double(4.94065645841246544177e-324L) 23 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 24 | #define __GCC_ATOMIC_CHAR_LOCK_FREE 2 25 | #define __GCC_IEC_559 2 26 | #define __FLT_EVAL_METHOD__ 2 27 | #define __cpp_binary_literals 201304 28 | #define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 29 | #define __cpp_variadic_templates 200704 30 | #define __UINT_FAST64_MAX__ 0xffffffffffffffffULL 31 | #define __SIG_ATOMIC_TYPE__ int 32 | #define __DBL_MIN_10_EXP__ (-307) 33 | #define __FINITE_MATH_ONLY__ 0 34 | #define __GNUC_PATCHLEVEL__ 0 35 | #define __UINT_FAST8_MAX__ 0xff 36 | #define __has_include(STR) __has_include__(STR) 37 | #define _stdcall __attribute__((__stdcall__)) 38 | #define __DEC64_MAX_EXP__ 385 39 | #define __INT8_C(c) c 40 | #define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL 41 | #define __SHRT_MAX__ 0x7fff 42 | #define __LDBL_MAX__ 1.18973149535723176502e+4932L 43 | #define __UINT_LEAST8_MAX__ 0xff 44 | #define __GCC_ATOMIC_BOOL_LOCK_FREE 2 45 | #define __UINTMAX_TYPE__ long long unsigned int 46 | #define __DEC32_EPSILON__ 1E-6DF 47 | #define __UINT32_MAX__ 0xffffffffU 48 | #define __GXX_EXPERIMENTAL_CXX0X__ 1 49 | #define __LDBL_MAX_EXP__ 16384 50 | #define __WINT_MIN__ 0 51 | #define __SCHAR_MAX__ 0x7f 52 | #define __WCHAR_MIN__ 0 53 | #define __INT64_C(c) c ## LL 54 | #define __DBL_DIG__ 15 55 | #define __GCC_ATOMIC_POINTER_LOCK_FREE 2 56 | #define __SIZEOF_INT__ 4 57 | #define __SIZEOF_POINTER__ 4 58 | #define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 59 | #define __USER_LABEL_PREFIX__ _ 60 | #define __STDC_HOSTED__ 1 61 | #define __WIN32 1 62 | #define __LDBL_HAS_INFINITY__ 1 63 | #define __FLT_EPSILON__ 1.19209289550781250000e-7F 64 | #define __GXX_WEAK__ 1 65 | #define __LDBL_MIN__ 3.36210314311209350626e-4932L 66 | #define __DEC32_MAX__ 9.999999E96DF 67 | #define __MINGW32__ 1 68 | #define __INT32_MAX__ 0x7fffffff 69 | #define __SIZEOF_LONG__ 4 70 | #define __UINT16_C(c) c 71 | #define __DECIMAL_DIG__ 21 72 | #define __has_include_next(STR) __has_include_next__(STR) 73 | #define __LDBL_HAS_QUIET_NAN__ 1 74 | #define _REENTRANT 1 75 | #define __GNUC__ 5 76 | #define _cdecl __attribute__((__cdecl__)) 77 | #define __GXX_RTTI 1 78 | #define __cpp_delegating_constructors 200604 79 | #define __FLT_HAS_DENORM__ 1 80 | #define __SIZEOF_LONG_DOUBLE__ 12 81 | #define __BIGGEST_ALIGNMENT__ 16 82 | #define __STDC_UTF_16__ 1 83 | #define __i686 1 84 | #define __DBL_MAX__ double(1.79769313486231570815e+308L) 85 | #define _thiscall __attribute__((__thiscall__)) 86 | #define __cpp_raw_strings 200710 87 | #define __INT_FAST32_MAX__ 0x7fffffff 88 | #define __WINNT 1 89 | #define __DBL_HAS_INFINITY__ 1 90 | #define __INT64_MAX__ 0x7fffffffffffffffLL 91 | #define __WINNT__ 1 92 | #define __DEC32_MIN_EXP__ (-94) 93 | #define __INT_FAST16_TYPE__ short int 94 | #define _fastcall __attribute__((__fastcall__)) 95 | #define __LDBL_HAS_DENORM__ 1 96 | #define __cplusplus 201103L 97 | #define __cpp_ref_qualifiers 200710 98 | #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL 99 | #define __INT_LEAST32_MAX__ 0x7fffffff 100 | #define __DEC32_MIN__ 1E-95DF 101 | #define __DEPRECATED 1 102 | #define __DBL_MAX_EXP__ 1024 103 | #define __DEC128_EPSILON__ 1E-33DL 104 | #define __ATOMIC_HLE_RELEASE 131072 105 | #define __WIN32__ 1 106 | #define __PTRDIFF_MAX__ 0x7fffffff 107 | #define __ATOMIC_HLE_ACQUIRE 65536 108 | #define __GNUG__ 5 109 | #define __LONG_LONG_MAX__ 0x7fffffffffffffffLL 110 | #define __SIZEOF_SIZE_T__ 4 111 | #define __cpp_rvalue_reference 200610 112 | #define __cpp_nsdmi 200809 113 | #define __SIZEOF_WINT_T__ 2 114 | #define __cpp_initializer_lists 200806 115 | #define __GCC_HAVE_DWARF2_CFI_ASM 1 116 | #define __GXX_ABI_VERSION 1009 117 | #define __FLT_MIN_EXP__ (-125) 118 | #define __i686__ 1 119 | #define __cpp_lambdas 200907 120 | #define __INT_FAST64_TYPE__ long long int 121 | #define __DBL_MIN__ double(2.22507385850720138309e-308L) 122 | #define __FLT_MIN_10_EXP__ (-37) 123 | #define __DECIMAL_BID_FORMAT__ 1 124 | #define __GXX_TYPEINFO_EQUALITY_INLINE 0 125 | #define __DEC128_MIN__ 1E-6143DL 126 | #define __REGISTER_PREFIX__ 127 | #define __UINT16_MAX__ 0xffff 128 | #define __DBL_HAS_DENORM__ 1 129 | #define __cdecl __attribute__((__cdecl__)) 130 | #define __UINT8_TYPE__ unsigned char 131 | #define __NO_INLINE__ 1 132 | #define __i386 1 133 | #define __FLT_MANT_DIG__ 24 134 | #define __VERSION__ "5.3.0" 135 | #define __UINT64_C(c) c ## ULL 136 | #define __cpp_unicode_characters 200704 137 | #define __GCC_ATOMIC_INT_LOCK_FREE 2 138 | #define _X86_ 1 139 | #define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ 140 | #define __INT32_C(c) c 141 | #define __DEC64_EPSILON__ 1E-15DD 142 | #define __ORDER_PDP_ENDIAN__ 3412 143 | #define __DEC128_MIN_EXP__ (-6142) 144 | #define __code_model_32__ 1 145 | #define __INT_FAST32_TYPE__ int 146 | #define __UINT_LEAST16_TYPE__ short unsigned int 147 | #define __INT16_MAX__ 0x7fff 148 | #define __i386__ 1 149 | #define __cpp_rtti 199711 150 | #define __SIZE_TYPE__ unsigned int 151 | #define __UINT64_MAX__ 0xffffffffffffffffULL 152 | #define __INT8_TYPE__ signed char 153 | #define __FLT_RADIX__ 2 154 | #define __INT_LEAST16_TYPE__ short int 155 | #define __LDBL_EPSILON__ 1.08420217248550443401e-19L 156 | #define __UINTMAX_C(c) c ## ULL 157 | #define __SIG_ATOMIC_MAX__ 0x7fffffff 158 | #define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 159 | #define __SIZEOF_PTRDIFF_T__ 4 160 | #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF 161 | #define __pentiumpro 1 162 | #define __MSVCRT__ 1 163 | #define __INT_FAST16_MAX__ 0x7fff 164 | #define __UINT_FAST32_MAX__ 0xffffffffU 165 | #define __UINT_LEAST64_TYPE__ long long unsigned int 166 | #define __FLT_HAS_QUIET_NAN__ 1 167 | #define __FLT_MAX_10_EXP__ 38 168 | #define __LONG_MAX__ 0x7fffffffL 169 | #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL 170 | #define __FLT_HAS_INFINITY__ 1 171 | #define __cpp_unicode_literals 200710 172 | #define __UINT_FAST16_TYPE__ short unsigned int 173 | #define __DEC64_MAX__ 9.999999999999999E384DD 174 | #define __CHAR16_TYPE__ short unsigned int 175 | #define __PRAGMA_REDEFINE_EXTNAME 1 176 | #define __INT_LEAST16_MAX__ 0x7fff 177 | #define __DEC64_MANT_DIG__ 16 178 | #define __UINT_LEAST32_MAX__ 0xffffffffU 179 | #define __GCC_ATOMIC_LONG_LOCK_FREE 2 180 | #define __INT_LEAST64_TYPE__ long long int 181 | #define __INT16_TYPE__ short int 182 | #define __INT_LEAST8_TYPE__ signed char 183 | #define __DEC32_MAX_EXP__ 97 184 | #define __INT_FAST8_MAX__ 0x7f 185 | #define __INTPTR_MAX__ 0x7fffffff 186 | #define __GXX_MERGED_TYPEINFO_NAMES 0 187 | #define __cpp_range_based_for 200907 188 | #define __stdcall __attribute__((__stdcall__)) 189 | #define __EXCEPTIONS 1 190 | #define __LDBL_MANT_DIG__ 64 191 | #define __DBL_HAS_QUIET_NAN__ 1 192 | #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) 193 | #define __INTPTR_TYPE__ int 194 | #define __UINT16_TYPE__ short unsigned int 195 | #define __WCHAR_TYPE__ short unsigned int 196 | #define __SIZEOF_FLOAT__ 4 197 | #define __UINTPTR_MAX__ 0xffffffffU 198 | #define __DEC64_MIN_EXP__ (-382) 199 | #define __cpp_decltype 200707 200 | #define __INT_FAST64_MAX__ 0x7fffffffffffffffLL 201 | #define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 202 | #define __FLT_DIG__ 6 203 | #define __UINT_FAST64_TYPE__ long long unsigned int 204 | #define __INT_MAX__ 0x7fffffff 205 | #define WIN32 1 206 | #define __INT64_TYPE__ long long int 207 | #define __FLT_MAX_EXP__ 128 208 | #define __DBL_MANT_DIG__ 53 209 | #define __cpp_inheriting_constructors 200802 210 | #define __SIZEOF_FLOAT128__ 16 211 | #define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL 212 | #define __DEC64_MIN__ 1E-383DD 213 | #define __WINT_TYPE__ short unsigned int 214 | #define __UINT_LEAST32_TYPE__ unsigned int 215 | #define __SIZEOF_SHORT__ 2 216 | #define __LDBL_MIN_EXP__ (-16381) 217 | #define __INT_LEAST8_MAX__ 0x7f 218 | #define __WCHAR_UNSIGNED__ 1 219 | #define __LDBL_MAX_10_EXP__ 4932 220 | #define __ATOMIC_RELAXED 0 221 | #define __DBL_EPSILON__ double(2.22044604925031308085e-16L) 222 | #define __thiscall __attribute__((__thiscall__)) 223 | #define __UINT8_C(c) c 224 | #define __INT_LEAST32_TYPE__ int 225 | #define __SIZEOF_WCHAR_T__ 2 226 | #define __UINT64_TYPE__ long long unsigned int 227 | #define __INT_FAST8_TYPE__ signed char 228 | #define __fastcall __attribute__((__fastcall__)) 229 | #define __GNUC_STDC_INLINE__ 1 230 | #define __DBL_DECIMAL_DIG__ 17 231 | #define __STDC_UTF_32__ 1 232 | #define __DEC_EVAL_METHOD__ 2 233 | #define __ORDER_BIG_ENDIAN__ 4321 234 | #define __cpp_runtime_arrays 198712 235 | #define __UINT32_C(c) c ## U 236 | #define __INTMAX_MAX__ 0x7fffffffffffffffLL 237 | #define __cpp_alias_templates 200704 238 | #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ 239 | #define WINNT 1 240 | #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F 241 | #define __INT8_MAX__ 0x7f 242 | #define __UINT_FAST32_TYPE__ unsigned int 243 | #define __CHAR32_TYPE__ unsigned int 244 | #define __FLT_MAX__ 3.40282346638528859812e+38F 245 | #define __cpp_constexpr 200704 246 | #define __INT32_TYPE__ int 247 | #define __SIZEOF_DOUBLE__ 8 248 | #define __cpp_exceptions 199711 249 | #define __INTMAX_TYPE__ long long int 250 | #define i386 1 251 | #define _INTEGRAL_MAX_BITS 64 252 | #define __DEC128_MAX_EXP__ 6145 253 | #define __ATOMIC_CONSUME 1 254 | #define __GNUC_MINOR__ 3 255 | #define __UINTMAX_MAX__ 0xffffffffffffffffULL 256 | #define __DEC32_MANT_DIG__ 7 257 | #define __DBL_MAX_10_EXP__ 308 258 | #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L 259 | #define __INT16_C(c) c 260 | #define __STDC__ 1 261 | #define __PTRDIFF_TYPE__ int 262 | #define __ATOMIC_SEQ_CST 5 263 | #define __UINT32_TYPE__ unsigned int 264 | #define __UINTPTR_TYPE__ unsigned int 265 | #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD 266 | #define __DEC128_MANT_DIG__ 34 267 | #define __LDBL_MIN_10_EXP__ (-4931) 268 | #define __SIZEOF_LONG_LONG__ 8 269 | #define __cpp_user_defined_literals 200809 270 | #define __GCC_ATOMIC_LLONG_LOCK_FREE 2 271 | #define __LDBL_DIG__ 18 272 | #define __FLT_DECIMAL_DIG__ 9 273 | #define __UINT_FAST16_MAX__ 0xffff 274 | #define __GCC_ATOMIC_SHORT_LOCK_FREE 2 275 | #define __UINT_FAST8_TYPE__ unsigned char 276 | #define __ATOMIC_ACQ_REL 4 277 | #define __ATOMIC_RELEASE 3 278 | #define __declspec(x) __attribute__((x)) 279 | -------------------------------------------------------------------------------- /Debug/debug/moc_rumor.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'rumor.h' 3 | ** 4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0) 5 | ** 6 | ** WARNING! All changes made in this file will be lost! 7 | *****************************************************************************/ 8 | 9 | #include "../../rumor.h" 10 | #include 11 | #include 12 | #if !defined(Q_MOC_OUTPUT_REVISION) 13 | #error "The header file 'rumor.h' doesn't include ." 14 | #elif Q_MOC_OUTPUT_REVISION != 67 15 | #error "This file was generated using the moc from 5.8.0. It" 16 | #error "cannot be used with the include files from this version of Qt." 17 | #error "(The moc has changed too much.)" 18 | #endif 19 | 20 | QT_BEGIN_MOC_NAMESPACE 21 | QT_WARNING_PUSH 22 | QT_WARNING_DISABLE_DEPRECATED 23 | struct qt_meta_stringdata_rumor_t { 24 | QByteArrayData data[6]; 25 | char stringdata0[56]; 26 | }; 27 | #define QT_MOC_LITERAL(idx, ofs, len) \ 28 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ 29 | qptrdiff(offsetof(qt_meta_stringdata_rumor_t, stringdata0) + ofs \ 30 | - idx * sizeof(QByteArrayData)) \ 31 | ) 32 | static const qt_meta_stringdata_rumor_t qt_meta_stringdata_rumor = { 33 | { 34 | QT_MOC_LITERAL(0, 0, 5), // "rumor" 35 | QT_MOC_LITERAL(1, 6, 17), // "anchorClickedSlot" 36 | QT_MOC_LITERAL(2, 24, 0), // "" 37 | QT_MOC_LITERAL(3, 25, 3), // "url" 38 | QT_MOC_LITERAL(4, 29, 13), // "httpReadyRead" 39 | QT_MOC_LITERAL(5, 43, 12) // "httpFinished" 40 | 41 | }, 42 | "rumor\0anchorClickedSlot\0\0url\0httpReadyRead\0" 43 | "httpFinished" 44 | }; 45 | #undef QT_MOC_LITERAL 46 | 47 | static const uint qt_meta_data_rumor[] = { 48 | 49 | // content: 50 | 7, // revision 51 | 0, // classname 52 | 0, 0, // classinfo 53 | 3, 14, // methods 54 | 0, 0, // properties 55 | 0, 0, // enums/sets 56 | 0, 0, // constructors 57 | 0, // flags 58 | 0, // signalCount 59 | 60 | // slots: name, argc, parameters, tag, flags 61 | 1, 1, 29, 2, 0x08 /* Private */, 62 | 4, 0, 32, 2, 0x08 /* Private */, 63 | 5, 0, 33, 2, 0x08 /* Private */, 64 | 65 | // slots: parameters 66 | QMetaType::Void, QMetaType::QUrl, 3, 67 | QMetaType::Void, 68 | QMetaType::Void, 69 | 70 | 0 // eod 71 | }; 72 | 73 | void rumor::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) 74 | { 75 | if (_c == QMetaObject::InvokeMetaMethod) { 76 | rumor *_t = static_cast(_o); 77 | Q_UNUSED(_t) 78 | switch (_id) { 79 | case 0: _t->anchorClickedSlot((*reinterpret_cast< const QUrl(*)>(_a[1]))); break; 80 | case 1: _t->httpReadyRead(); break; 81 | case 2: _t->httpFinished(); break; 82 | default: ; 83 | } 84 | } 85 | } 86 | 87 | const QMetaObject rumor::staticMetaObject = { 88 | { &QDialog::staticMetaObject, qt_meta_stringdata_rumor.data, 89 | qt_meta_data_rumor, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} 90 | }; 91 | 92 | 93 | const QMetaObject *rumor::metaObject() const 94 | { 95 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; 96 | } 97 | 98 | void *rumor::qt_metacast(const char *_clname) 99 | { 100 | if (!_clname) return Q_NULLPTR; 101 | if (!strcmp(_clname, qt_meta_stringdata_rumor.stringdata0)) 102 | return static_cast(const_cast< rumor*>(this)); 103 | return QDialog::qt_metacast(_clname); 104 | } 105 | 106 | int rumor::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 107 | { 108 | _id = QDialog::qt_metacall(_c, _id, _a); 109 | if (_id < 0) 110 | return _id; 111 | if (_c == QMetaObject::InvokeMetaMethod) { 112 | if (_id < 3) 113 | qt_static_metacall(this, _c, _id, _a); 114 | _id -= 3; 115 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { 116 | if (_id < 3) 117 | *reinterpret_cast(_a[0]) = -1; 118 | _id -= 3; 119 | } 120 | return _id; 121 | } 122 | QT_WARNING_POP 123 | QT_END_MOC_NAMESPACE 124 | -------------------------------------------------------------------------------- /Debug/debug/moc_rumor_info.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'rumor_info.h' 3 | ** 4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0) 5 | ** 6 | ** WARNING! All changes made in this file will be lost! 7 | *****************************************************************************/ 8 | 9 | #include "../../rumor_info.h" 10 | #include 11 | #include 12 | #if !defined(Q_MOC_OUTPUT_REVISION) 13 | #error "The header file 'rumor_info.h' doesn't include ." 14 | #elif Q_MOC_OUTPUT_REVISION != 67 15 | #error "This file was generated using the moc from 5.8.0. It" 16 | #error "cannot be used with the include files from this version of Qt." 17 | #error "(The moc has changed too much.)" 18 | #endif 19 | 20 | QT_BEGIN_MOC_NAMESPACE 21 | QT_WARNING_PUSH 22 | QT_WARNING_DISABLE_DEPRECATED 23 | struct qt_meta_stringdata_rumor_info_t { 24 | QByteArrayData data[5]; 25 | char stringdata0[59]; 26 | }; 27 | #define QT_MOC_LITERAL(idx, ofs, len) \ 28 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ 29 | qptrdiff(offsetof(qt_meta_stringdata_rumor_info_t, stringdata0) + ofs \ 30 | - idx * sizeof(QByteArrayData)) \ 31 | ) 32 | static const qt_meta_stringdata_rumor_info_t qt_meta_stringdata_rumor_info = { 33 | { 34 | QT_MOC_LITERAL(0, 0, 10), // "rumor_info" 35 | QT_MOC_LITERAL(1, 11, 13), // "httpReadyRead" 36 | QT_MOC_LITERAL(2, 25, 0), // "" 37 | QT_MOC_LITERAL(3, 26, 12), // "httpFinished" 38 | QT_MOC_LITERAL(4, 39, 19) // "on_btn_back_clicked" 39 | 40 | }, 41 | "rumor_info\0httpReadyRead\0\0httpFinished\0" 42 | "on_btn_back_clicked" 43 | }; 44 | #undef QT_MOC_LITERAL 45 | 46 | static const uint qt_meta_data_rumor_info[] = { 47 | 48 | // content: 49 | 7, // revision 50 | 0, // classname 51 | 0, 0, // classinfo 52 | 3, 14, // methods 53 | 0, 0, // properties 54 | 0, 0, // enums/sets 55 | 0, 0, // constructors 56 | 0, // flags 57 | 0, // signalCount 58 | 59 | // slots: name, argc, parameters, tag, flags 60 | 1, 0, 29, 2, 0x08 /* Private */, 61 | 3, 0, 30, 2, 0x08 /* Private */, 62 | 4, 0, 31, 2, 0x08 /* Private */, 63 | 64 | // slots: parameters 65 | QMetaType::Void, 66 | QMetaType::Void, 67 | QMetaType::Void, 68 | 69 | 0 // eod 70 | }; 71 | 72 | void rumor_info::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) 73 | { 74 | if (_c == QMetaObject::InvokeMetaMethod) { 75 | rumor_info *_t = static_cast(_o); 76 | Q_UNUSED(_t) 77 | switch (_id) { 78 | case 0: _t->httpReadyRead(); break; 79 | case 1: _t->httpFinished(); break; 80 | case 2: _t->on_btn_back_clicked(); break; 81 | default: ; 82 | } 83 | } 84 | Q_UNUSED(_a); 85 | } 86 | 87 | const QMetaObject rumor_info::staticMetaObject = { 88 | { &QDialog::staticMetaObject, qt_meta_stringdata_rumor_info.data, 89 | qt_meta_data_rumor_info, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} 90 | }; 91 | 92 | 93 | const QMetaObject *rumor_info::metaObject() const 94 | { 95 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; 96 | } 97 | 98 | void *rumor_info::qt_metacast(const char *_clname) 99 | { 100 | if (!_clname) return Q_NULLPTR; 101 | if (!strcmp(_clname, qt_meta_stringdata_rumor_info.stringdata0)) 102 | return static_cast(const_cast< rumor_info*>(this)); 103 | return QDialog::qt_metacast(_clname); 104 | } 105 | 106 | int rumor_info::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 107 | { 108 | _id = QDialog::qt_metacall(_c, _id, _a); 109 | if (_id < 0) 110 | return _id; 111 | if (_c == QMetaObject::InvokeMetaMethod) { 112 | if (_id < 3) 113 | qt_static_metacall(this, _c, _id, _a); 114 | _id -= 3; 115 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { 116 | if (_id < 3) 117 | *reinterpret_cast(_a[0]) = -1; 118 | _id -= 3; 119 | } 120 | return _id; 121 | } 122 | QT_WARNING_POP 123 | QT_END_MOC_NAMESPACE 124 | -------------------------------------------------------------------------------- /Debug/debug/qt_2019_ncov.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whik/qt_2019_ncov/9474e808ee5095955daf12b981141b676b35805b/Debug/debug/qt_2019_ncov.exe -------------------------------------------------------------------------------- /Debug/debug/ssleay32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whik/qt_2019_ncov/9474e808ee5095955daf12b981141b676b35805b/Debug/debug/ssleay32.dll -------------------------------------------------------------------------------- /Debug/html_news.txt: -------------------------------------------------------------------------------- 1 | 2 | 5 |

· *

6 |

*

7 |

来源:* 发布于:*

8 |
* 9 | 10 | 13 |

查看更多报道 央视新闻直播

-------------------------------------------------------------------------------- /Debug/html_rumor.txt: -------------------------------------------------------------------------------- 1 | 4 |

*: *

5 |

*

6 |
* 7 | 10 |

查看更多辟谣信息

-------------------------------------------------------------------------------- /Debug/html_rumor_info.txt: -------------------------------------------------------------------------------- 1 | 2 | 5 |

*

6 |

7 |

"流传说法:*"

8 |
9 |

较真鉴定: [*]*

10 |

11 |

查证要点:

12 | 13 | * 14 |

* *

* 15 | 16 | 17 |

18 |

查证者:* *

19 |
20 |

时间:* 来源:*

21 |


-------------------------------------------------------------------------------- /Debug/moc_about.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'about.h' 3 | ** 4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0) 5 | ** 6 | ** WARNING! All changes made in this file will be lost! 7 | *****************************************************************************/ 8 | 9 | #include "../about.h" 10 | #include 11 | #include 12 | #if !defined(Q_MOC_OUTPUT_REVISION) 13 | #error "The header file 'about.h' doesn't include ." 14 | #elif Q_MOC_OUTPUT_REVISION != 67 15 | #error "This file was generated using the moc from 5.8.0. It" 16 | #error "cannot be used with the include files from this version of Qt." 17 | #error "(The moc has changed too much.)" 18 | #endif 19 | 20 | QT_BEGIN_MOC_NAMESPACE 21 | QT_WARNING_PUSH 22 | QT_WARNING_DISABLE_DEPRECATED 23 | struct qt_meta_stringdata_about_t { 24 | QByteArrayData data[4]; 25 | char stringdata0[29]; 26 | }; 27 | #define QT_MOC_LITERAL(idx, ofs, len) \ 28 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ 29 | qptrdiff(offsetof(qt_meta_stringdata_about_t, stringdata0) + ofs \ 30 | - idx * sizeof(QByteArrayData)) \ 31 | ) 32 | static const qt_meta_stringdata_about_t qt_meta_stringdata_about = { 33 | { 34 | QT_MOC_LITERAL(0, 0, 5), // "about" 35 | QT_MOC_LITERAL(1, 6, 17), // "anchorClickedSlot" 36 | QT_MOC_LITERAL(2, 24, 0), // "" 37 | QT_MOC_LITERAL(3, 25, 3) // "url" 38 | 39 | }, 40 | "about\0anchorClickedSlot\0\0url" 41 | }; 42 | #undef QT_MOC_LITERAL 43 | 44 | static const uint qt_meta_data_about[] = { 45 | 46 | // content: 47 | 7, // revision 48 | 0, // classname 49 | 0, 0, // classinfo 50 | 1, 14, // methods 51 | 0, 0, // properties 52 | 0, 0, // enums/sets 53 | 0, 0, // constructors 54 | 0, // flags 55 | 0, // signalCount 56 | 57 | // slots: name, argc, parameters, tag, flags 58 | 1, 1, 19, 2, 0x08 /* Private */, 59 | 60 | // slots: parameters 61 | QMetaType::Void, QMetaType::QUrl, 3, 62 | 63 | 0 // eod 64 | }; 65 | 66 | void about::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) 67 | { 68 | if (_c == QMetaObject::InvokeMetaMethod) { 69 | about *_t = static_cast(_o); 70 | Q_UNUSED(_t) 71 | switch (_id) { 72 | case 0: _t->anchorClickedSlot((*reinterpret_cast< const QUrl(*)>(_a[1]))); break; 73 | default: ; 74 | } 75 | } 76 | } 77 | 78 | const QMetaObject about::staticMetaObject = { 79 | { &QDialog::staticMetaObject, qt_meta_stringdata_about.data, 80 | qt_meta_data_about, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} 81 | }; 82 | 83 | 84 | const QMetaObject *about::metaObject() const 85 | { 86 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; 87 | } 88 | 89 | void *about::qt_metacast(const char *_clname) 90 | { 91 | if (!_clname) return Q_NULLPTR; 92 | if (!strcmp(_clname, qt_meta_stringdata_about.stringdata0)) 93 | return static_cast(const_cast< about*>(this)); 94 | return QDialog::qt_metacast(_clname); 95 | } 96 | 97 | int about::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 98 | { 99 | _id = QDialog::qt_metacall(_c, _id, _a); 100 | if (_id < 0) 101 | return _id; 102 | if (_c == QMetaObject::InvokeMetaMethod) { 103 | if (_id < 1) 104 | qt_static_metacall(this, _c, _id, _a); 105 | _id -= 1; 106 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { 107 | if (_id < 1) 108 | *reinterpret_cast(_a[0]) = -1; 109 | _id -= 1; 110 | } 111 | return _id; 112 | } 113 | QT_WARNING_POP 114 | QT_END_MOC_NAMESPACE 115 | -------------------------------------------------------------------------------- /Debug/moc_dialog.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'dialog.h' 3 | ** 4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0) 5 | ** 6 | ** WARNING! All changes made in this file will be lost! 7 | *****************************************************************************/ 8 | 9 | #include "../dialog.h" 10 | #include 11 | #include 12 | #if !defined(Q_MOC_OUTPUT_REVISION) 13 | #error "The header file 'dialog.h' doesn't include ." 14 | #elif Q_MOC_OUTPUT_REVISION != 67 15 | #error "This file was generated using the moc from 5.8.0. It" 16 | #error "cannot be used with the include files from this version of Qt." 17 | #error "(The moc has changed too much.)" 18 | #endif 19 | 20 | QT_BEGIN_MOC_NAMESPACE 21 | QT_WARNING_PUSH 22 | QT_WARNING_DISABLE_DEPRECATED 23 | struct qt_meta_stringdata_Dialog_t { 24 | QByteArrayData data[18]; 25 | char stringdata0[227]; 26 | }; 27 | #define QT_MOC_LITERAL(idx, ofs, len) \ 28 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ 29 | qptrdiff(offsetof(qt_meta_stringdata_Dialog_t, stringdata0) + ofs \ 30 | - idx * sizeof(QByteArrayData)) \ 31 | ) 32 | static const qt_meta_stringdata_Dialog_t qt_meta_stringdata_Dialog = { 33 | { 34 | QT_MOC_LITERAL(0, 0, 6), // "Dialog" 35 | QT_MOC_LITERAL(1, 7, 21), // "on_btn_update_clicked" 36 | QT_MOC_LITERAL(2, 29, 0), // "" 37 | QT_MOC_LITERAL(3, 30, 13), // "httpReadyRead" 38 | QT_MOC_LITERAL(4, 44, 12), // "httpFinished" 39 | QT_MOC_LITERAL(5, 57, 18), // "widget_chart_event" 40 | QT_MOC_LITERAL(6, 76, 12), // "QMouseEvent*" 41 | QT_MOC_LITERAL(7, 89, 6), // "update" 42 | QT_MOC_LITERAL(8, 96, 17), // "anchorClickedSlot" 43 | QT_MOC_LITERAL(9, 114, 3), // "url" 44 | QT_MOC_LITERAL(10, 118, 10), // "drawCharts" 45 | QT_MOC_LITERAL(11, 129, 2), // "id" 46 | QT_MOC_LITERAL(12, 132, 20), // "on_btn_about_clicked" 47 | QT_MOC_LITERAL(13, 153, 10), // "closeEvent" 48 | QT_MOC_LITERAL(14, 164, 12), // "QCloseEvent*" 49 | QT_MOC_LITERAL(15, 177, 3), // "win" 50 | QT_MOC_LITERAL(16, 181, 20), // "on_btn_rumor_clicked" 51 | QT_MOC_LITERAL(17, 202, 24) // "on_btn_chkUpdate_clicked" 52 | 53 | }, 54 | "Dialog\0on_btn_update_clicked\0\0" 55 | "httpReadyRead\0httpFinished\0" 56 | "widget_chart_event\0QMouseEvent*\0update\0" 57 | "anchorClickedSlot\0url\0drawCharts\0id\0" 58 | "on_btn_about_clicked\0closeEvent\0" 59 | "QCloseEvent*\0win\0on_btn_rumor_clicked\0" 60 | "on_btn_chkUpdate_clicked" 61 | }; 62 | #undef QT_MOC_LITERAL 63 | 64 | static const uint qt_meta_data_Dialog[] = { 65 | 66 | // content: 67 | 7, // revision 68 | 0, // classname 69 | 0, 0, // classinfo 70 | 11, 14, // methods 71 | 0, 0, // properties 72 | 0, 0, // enums/sets 73 | 0, 0, // constructors 74 | 0, // flags 75 | 0, // signalCount 76 | 77 | // slots: name, argc, parameters, tag, flags 78 | 1, 0, 69, 2, 0x08 /* Private */, 79 | 3, 0, 70, 2, 0x08 /* Private */, 80 | 4, 0, 71, 2, 0x08 /* Private */, 81 | 5, 1, 72, 2, 0x08 /* Private */, 82 | 7, 0, 75, 2, 0x08 /* Private */, 83 | 8, 1, 76, 2, 0x08 /* Private */, 84 | 10, 1, 79, 2, 0x08 /* Private */, 85 | 12, 0, 82, 2, 0x08 /* Private */, 86 | 13, 1, 83, 2, 0x08 /* Private */, 87 | 16, 0, 86, 2, 0x08 /* Private */, 88 | 17, 0, 87, 2, 0x08 /* Private */, 89 | 90 | // slots: parameters 91 | QMetaType::Void, 92 | QMetaType::Void, 93 | QMetaType::Void, 94 | QMetaType::Void, 0x80000000 | 6, 2, 95 | QMetaType::Void, 96 | QMetaType::Void, QMetaType::QUrl, 9, 97 | QMetaType::Void, QMetaType::Int, 11, 98 | QMetaType::Void, 99 | QMetaType::Void, 0x80000000 | 14, 15, 100 | QMetaType::Void, 101 | QMetaType::Void, 102 | 103 | 0 // eod 104 | }; 105 | 106 | void Dialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) 107 | { 108 | if (_c == QMetaObject::InvokeMetaMethod) { 109 | Dialog *_t = static_cast(_o); 110 | Q_UNUSED(_t) 111 | switch (_id) { 112 | case 0: _t->on_btn_update_clicked(); break; 113 | case 1: _t->httpReadyRead(); break; 114 | case 2: _t->httpFinished(); break; 115 | case 3: _t->widget_chart_event((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break; 116 | case 4: _t->update(); break; 117 | case 5: _t->anchorClickedSlot((*reinterpret_cast< const QUrl(*)>(_a[1]))); break; 118 | case 6: _t->drawCharts((*reinterpret_cast< int(*)>(_a[1]))); break; 119 | case 7: _t->on_btn_about_clicked(); break; 120 | case 8: _t->closeEvent((*reinterpret_cast< QCloseEvent*(*)>(_a[1]))); break; 121 | case 9: _t->on_btn_rumor_clicked(); break; 122 | case 10: _t->on_btn_chkUpdate_clicked(); break; 123 | default: ; 124 | } 125 | } 126 | } 127 | 128 | const QMetaObject Dialog::staticMetaObject = { 129 | { &QDialog::staticMetaObject, qt_meta_stringdata_Dialog.data, 130 | qt_meta_data_Dialog, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} 131 | }; 132 | 133 | 134 | const QMetaObject *Dialog::metaObject() const 135 | { 136 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; 137 | } 138 | 139 | void *Dialog::qt_metacast(const char *_clname) 140 | { 141 | if (!_clname) return Q_NULLPTR; 142 | if (!strcmp(_clname, qt_meta_stringdata_Dialog.stringdata0)) 143 | return static_cast(const_cast< Dialog*>(this)); 144 | return QDialog::qt_metacast(_clname); 145 | } 146 | 147 | int Dialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 148 | { 149 | _id = QDialog::qt_metacall(_c, _id, _a); 150 | if (_id < 0) 151 | return _id; 152 | if (_c == QMetaObject::InvokeMetaMethod) { 153 | if (_id < 11) 154 | qt_static_metacall(this, _c, _id, _a); 155 | _id -= 11; 156 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { 157 | if (_id < 11) 158 | *reinterpret_cast(_a[0]) = -1; 159 | _id -= 11; 160 | } 161 | return _id; 162 | } 163 | QT_WARNING_POP 164 | QT_END_MOC_NAMESPACE 165 | -------------------------------------------------------------------------------- /Debug/moc_predefs.h: -------------------------------------------------------------------------------- 1 | #define __SSP_STRONG__ 3 2 | #define __DBL_MIN_EXP__ (-1021) 3 | #define __cpp_attributes 200809 4 | #define __UINT_LEAST16_MAX__ 0xffff 5 | #define __ATOMIC_ACQUIRE 2 6 | #define __FLT_MIN__ 1.17549435082228750797e-38F 7 | #define __GCC_IEC_559_COMPLEX 2 8 | #define __UINT_LEAST8_TYPE__ unsigned char 9 | #define __SIZEOF_FLOAT80__ 16 10 | #define __INTMAX_C(c) c ## L 11 | #define __CHAR_BIT__ 8 12 | #define __UINT8_MAX__ 0xff 13 | #define __WINT_MAX__ 0xffffffffU 14 | #define __cpp_static_assert 200410 15 | #define __ORDER_LITTLE_ENDIAN__ 1234 16 | #define __SIZE_MAX__ 0xffffffffffffffffUL 17 | #define __WCHAR_MAX__ 0x7fffffff 18 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 19 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 20 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 21 | #define __DBL_DENORM_MIN__ double(4.94065645841246544177e-324L) 22 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 23 | #define __GCC_ATOMIC_CHAR_LOCK_FREE 2 24 | #define __GCC_IEC_559 2 25 | #define __FLT_EVAL_METHOD__ 0 26 | #define __unix__ 1 27 | #define __cpp_binary_literals 201304 28 | #define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 29 | #define __x86_64 1 30 | #define __cpp_variadic_templates 200704 31 | #define __UINT_FAST64_MAX__ 0xffffffffffffffffUL 32 | #define __SIG_ATOMIC_TYPE__ int 33 | #define __DBL_MIN_10_EXP__ (-307) 34 | #define __FINITE_MATH_ONLY__ 0 35 | #define __GNUC_PATCHLEVEL__ 0 36 | #define __UINT_FAST8_MAX__ 0xff 37 | #define __has_include(STR) __has_include__(STR) 38 | #define __DEC64_MAX_EXP__ 385 39 | #define __INT8_C(c) c 40 | #define __UINT_LEAST64_MAX__ 0xffffffffffffffffUL 41 | #define __SHRT_MAX__ 0x7fff 42 | #define __LDBL_MAX__ 1.18973149535723176502e+4932L 43 | #define __UINT_LEAST8_MAX__ 0xff 44 | #define __GCC_ATOMIC_BOOL_LOCK_FREE 2 45 | #define __UINTMAX_TYPE__ long unsigned int 46 | #define __linux 1 47 | #define __DEC32_EPSILON__ 1E-6DF 48 | #define __unix 1 49 | #define __UINT32_MAX__ 0xffffffffU 50 | #define __GXX_EXPERIMENTAL_CXX0X__ 1 51 | #define __LDBL_MAX_EXP__ 16384 52 | #define __WINT_MIN__ 0U 53 | #define __linux__ 1 54 | #define __SCHAR_MAX__ 0x7f 55 | #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) 56 | #define __INT64_C(c) c ## L 57 | #define __DBL_DIG__ 15 58 | #define __GCC_ATOMIC_POINTER_LOCK_FREE 2 59 | #define __SIZEOF_INT__ 4 60 | #define __SIZEOF_POINTER__ 8 61 | #define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 62 | #define __USER_LABEL_PREFIX__ 63 | #define __STDC_HOSTED__ 1 64 | #define __LDBL_HAS_INFINITY__ 1 65 | #define __FLT_EPSILON__ 1.19209289550781250000e-7F 66 | #define __GXX_WEAK__ 1 67 | #define __LDBL_MIN__ 3.36210314311209350626e-4932L 68 | #define __DEC32_MAX__ 9.999999E96DF 69 | #define __INT32_MAX__ 0x7fffffff 70 | #define __SIZEOF_LONG__ 8 71 | #define __STDC_IEC_559__ 1 72 | #define __STDC_ISO_10646__ 201505L 73 | #define __UINT16_C(c) c 74 | #define __DECIMAL_DIG__ 21 75 | #define __gnu_linux__ 1 76 | #define __has_include_next(STR) __has_include_next__(STR) 77 | #define __LDBL_HAS_QUIET_NAN__ 1 78 | #define __GNUC__ 5 79 | #define __GXX_RTTI 1 80 | #define __MMX__ 1 81 | #define __cpp_delegating_constructors 200604 82 | #define __FLT_HAS_DENORM__ 1 83 | #define __SIZEOF_LONG_DOUBLE__ 16 84 | #define __BIGGEST_ALIGNMENT__ 16 85 | #define __STDC_UTF_16__ 1 86 | #define __DBL_MAX__ double(1.79769313486231570815e+308L) 87 | #define __cpp_raw_strings 200710 88 | #define __INT_FAST32_MAX__ 0x7fffffffffffffffL 89 | #define __DBL_HAS_INFINITY__ 1 90 | #define __INT64_MAX__ 0x7fffffffffffffffL 91 | #define __DEC32_MIN_EXP__ (-94) 92 | #define __INT_FAST16_TYPE__ long int 93 | #define __LDBL_HAS_DENORM__ 1 94 | #define __cplusplus 201103L 95 | #define __cpp_ref_qualifiers 200710 96 | #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL 97 | #define __INT_LEAST32_MAX__ 0x7fffffff 98 | #define __DEC32_MIN__ 1E-95DF 99 | #define __DEPRECATED 1 100 | #define __DBL_MAX_EXP__ 1024 101 | #define __DEC128_EPSILON__ 1E-33DL 102 | #define __SSE2_MATH__ 1 103 | #define __ATOMIC_HLE_RELEASE 131072 104 | #define __PTRDIFF_MAX__ 0x7fffffffffffffffL 105 | #define __amd64 1 106 | #define __STDC_NO_THREADS__ 1 107 | #define __ATOMIC_HLE_ACQUIRE 65536 108 | #define __GNUG__ 5 109 | #define __LONG_LONG_MAX__ 0x7fffffffffffffffLL 110 | #define __SIZEOF_SIZE_T__ 8 111 | #define __cpp_rvalue_reference 200610 112 | #define __cpp_nsdmi 200809 113 | #define __SIZEOF_WINT_T__ 4 114 | #define __cpp_initializer_lists 200806 115 | #define __GCC_HAVE_DWARF2_CFI_ASM 1 116 | #define __GXX_ABI_VERSION 1009 117 | #define __FLT_MIN_EXP__ (-125) 118 | #define __cpp_lambdas 200907 119 | #define __INT_FAST64_TYPE__ long int 120 | #define __DBL_MIN__ double(2.22507385850720138309e-308L) 121 | #define __LP64__ 1 122 | #define __DECIMAL_BID_FORMAT__ 1 123 | #define __DEC128_MIN__ 1E-6143DL 124 | #define __REGISTER_PREFIX__ 125 | #define __UINT16_MAX__ 0xffff 126 | #define __DBL_HAS_DENORM__ 1 127 | #define __UINT8_TYPE__ unsigned char 128 | #define __NO_INLINE__ 1 129 | #define __FLT_MANT_DIG__ 24 130 | #define __VERSION__ "5.4.0 20160609" 131 | #define __UINT64_C(c) c ## UL 132 | #define __cpp_unicode_characters 200704 133 | #define _STDC_PREDEF_H 1 134 | #define __GCC_ATOMIC_INT_LOCK_FREE 2 135 | #define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ 136 | #define __STDC_IEC_559_COMPLEX__ 1 137 | #define __INT32_C(c) c 138 | #define __DEC64_EPSILON__ 1E-15DD 139 | #define __ORDER_PDP_ENDIAN__ 3412 140 | #define __DEC128_MIN_EXP__ (-6142) 141 | #define __INT_FAST32_TYPE__ long int 142 | #define __UINT_LEAST16_TYPE__ short unsigned int 143 | #define unix 1 144 | #define __INT16_MAX__ 0x7fff 145 | #define __cpp_rtti 199711 146 | #define __SIZE_TYPE__ long unsigned int 147 | #define __UINT64_MAX__ 0xffffffffffffffffUL 148 | #define __INT8_TYPE__ signed char 149 | #define __ELF__ 1 150 | #define __FLT_RADIX__ 2 151 | #define __INT_LEAST16_TYPE__ short int 152 | #define __LDBL_EPSILON__ 1.08420217248550443401e-19L 153 | #define __UINTMAX_C(c) c ## UL 154 | #define __GLIBCXX_BITSIZE_INT_N_0 128 155 | #define __k8 1 156 | #define __SIG_ATOMIC_MAX__ 0x7fffffff 157 | #define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 158 | #define __SIZEOF_PTRDIFF_T__ 8 159 | #define __x86_64__ 1 160 | #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF 161 | #define __INT_FAST16_MAX__ 0x7fffffffffffffffL 162 | #define __UINT_FAST32_MAX__ 0xffffffffffffffffUL 163 | #define __UINT_LEAST64_TYPE__ long unsigned int 164 | #define __FLT_HAS_QUIET_NAN__ 1 165 | #define __FLT_MAX_10_EXP__ 38 166 | #define __LONG_MAX__ 0x7fffffffffffffffL 167 | #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL 168 | #define __FLT_HAS_INFINITY__ 1 169 | #define __cpp_unicode_literals 200710 170 | #define __UINT_FAST16_TYPE__ long unsigned int 171 | #define __DEC64_MAX__ 9.999999999999999E384DD 172 | #define __CHAR16_TYPE__ short unsigned int 173 | #define __PRAGMA_REDEFINE_EXTNAME 1 174 | #define __INT_LEAST16_MAX__ 0x7fff 175 | #define __DEC64_MANT_DIG__ 16 176 | #define __UINT_LEAST32_MAX__ 0xffffffffU 177 | #define __GCC_ATOMIC_LONG_LOCK_FREE 2 178 | #define __INT_LEAST64_TYPE__ long int 179 | #define __INT16_TYPE__ short int 180 | #define __INT_LEAST8_TYPE__ signed char 181 | #define __DEC32_MAX_EXP__ 97 182 | #define __INT_FAST8_MAX__ 0x7f 183 | #define __INTPTR_MAX__ 0x7fffffffffffffffL 184 | #define linux 1 185 | #define __cpp_range_based_for 200907 186 | #define __SSE2__ 1 187 | #define __EXCEPTIONS 1 188 | #define __LDBL_MANT_DIG__ 64 189 | #define __DBL_HAS_QUIET_NAN__ 1 190 | #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) 191 | #define __code_model_small__ 1 192 | #define __k8__ 1 193 | #define __INTPTR_TYPE__ long int 194 | #define __UINT16_TYPE__ short unsigned int 195 | #define __WCHAR_TYPE__ int 196 | #define __SIZEOF_FLOAT__ 4 197 | #define __UINTPTR_MAX__ 0xffffffffffffffffUL 198 | #define __DEC64_MIN_EXP__ (-382) 199 | #define __cpp_decltype 200707 200 | #define __INT_FAST64_MAX__ 0x7fffffffffffffffL 201 | #define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 202 | #define __FLT_DIG__ 6 203 | #define __UINT_FAST64_TYPE__ long unsigned int 204 | #define __INT_MAX__ 0x7fffffff 205 | #define __amd64__ 1 206 | #define __INT64_TYPE__ long int 207 | #define __FLT_MAX_EXP__ 128 208 | #define __ORDER_BIG_ENDIAN__ 4321 209 | #define __DBL_MANT_DIG__ 53 210 | #define __cpp_inheriting_constructors 200802 211 | #define __SIZEOF_FLOAT128__ 16 212 | #define __INT_LEAST64_MAX__ 0x7fffffffffffffffL 213 | #define __DEC64_MIN__ 1E-383DD 214 | #define __WINT_TYPE__ unsigned int 215 | #define __UINT_LEAST32_TYPE__ unsigned int 216 | #define __SIZEOF_SHORT__ 2 217 | #define __SSE__ 1 218 | #define __LDBL_MIN_EXP__ (-16381) 219 | #define __INT_LEAST8_MAX__ 0x7f 220 | #define __SIZEOF_INT128__ 16 221 | #define __LDBL_MAX_10_EXP__ 4932 222 | #define __ATOMIC_RELAXED 0 223 | #define __DBL_EPSILON__ double(2.22044604925031308085e-16L) 224 | #define _LP64 1 225 | #define __UINT8_C(c) c 226 | #define __INT_LEAST32_TYPE__ int 227 | #define __SIZEOF_WCHAR_T__ 4 228 | #define __UINT64_TYPE__ long unsigned int 229 | #define __INT_FAST8_TYPE__ signed char 230 | #define __GNUC_STDC_INLINE__ 1 231 | #define __DBL_DECIMAL_DIG__ 17 232 | #define __STDC_UTF_32__ 1 233 | #define __FXSR__ 1 234 | #define __DEC_EVAL_METHOD__ 2 235 | #define __cpp_runtime_arrays 198712 236 | #define __UINT32_C(c) c ## U 237 | #define __INTMAX_MAX__ 0x7fffffffffffffffL 238 | #define __cpp_alias_templates 200704 239 | #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ 240 | #define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F 241 | #define __INT8_MAX__ 0x7f 242 | #define __UINT_FAST32_TYPE__ long unsigned int 243 | #define __CHAR32_TYPE__ unsigned int 244 | #define __FLT_MAX__ 3.40282346638528859812e+38F 245 | #define __cpp_constexpr 200704 246 | #define __INT32_TYPE__ int 247 | #define __SIZEOF_DOUBLE__ 8 248 | #define __cpp_exceptions 199711 249 | #define __INTMAX_TYPE__ long int 250 | #define __DEC128_MAX_EXP__ 6145 251 | #define __ATOMIC_CONSUME 1 252 | #define __GNUC_MINOR__ 4 253 | #define __GLIBCXX_TYPE_INT_N_0 __int128 254 | #define __UINTMAX_MAX__ 0xffffffffffffffffUL 255 | #define __DEC32_MANT_DIG__ 7 256 | #define __DBL_MAX_10_EXP__ 308 257 | #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L 258 | #define __INT16_C(c) c 259 | #define __STDC__ 1 260 | #define __PTRDIFF_TYPE__ long int 261 | #define __ATOMIC_SEQ_CST 5 262 | #define __UINT32_TYPE__ unsigned int 263 | #define __UINTPTR_TYPE__ long unsigned int 264 | #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD 265 | #define __DEC128_MANT_DIG__ 34 266 | #define __LDBL_MIN_10_EXP__ (-4931) 267 | #define __SSE_MATH__ 1 268 | #define __SIZEOF_LONG_LONG__ 8 269 | #define __cpp_user_defined_literals 200809 270 | #define __GCC_ATOMIC_LLONG_LOCK_FREE 2 271 | #define __LDBL_DIG__ 18 272 | #define __FLT_DECIMAL_DIG__ 9 273 | #define __UINT_FAST16_MAX__ 0xffffffffffffffffUL 274 | #define __FLT_MIN_10_EXP__ (-37) 275 | #define __GCC_ATOMIC_SHORT_LOCK_FREE 2 276 | #define __UINT_FAST8_TYPE__ unsigned char 277 | #define _GNU_SOURCE 1 278 | #define __ATOMIC_ACQ_REL 4 279 | #define __ATOMIC_RELEASE 3 280 | -------------------------------------------------------------------------------- /Debug/moc_rumor.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'rumor.h' 3 | ** 4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0) 5 | ** 6 | ** WARNING! All changes made in this file will be lost! 7 | *****************************************************************************/ 8 | 9 | #include "../rumor.h" 10 | #include 11 | #include 12 | #if !defined(Q_MOC_OUTPUT_REVISION) 13 | #error "The header file 'rumor.h' doesn't include ." 14 | #elif Q_MOC_OUTPUT_REVISION != 67 15 | #error "This file was generated using the moc from 5.8.0. It" 16 | #error "cannot be used with the include files from this version of Qt." 17 | #error "(The moc has changed too much.)" 18 | #endif 19 | 20 | QT_BEGIN_MOC_NAMESPACE 21 | QT_WARNING_PUSH 22 | QT_WARNING_DISABLE_DEPRECATED 23 | struct qt_meta_stringdata_rumor_t { 24 | QByteArrayData data[6]; 25 | char stringdata0[56]; 26 | }; 27 | #define QT_MOC_LITERAL(idx, ofs, len) \ 28 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ 29 | qptrdiff(offsetof(qt_meta_stringdata_rumor_t, stringdata0) + ofs \ 30 | - idx * sizeof(QByteArrayData)) \ 31 | ) 32 | static const qt_meta_stringdata_rumor_t qt_meta_stringdata_rumor = { 33 | { 34 | QT_MOC_LITERAL(0, 0, 5), // "rumor" 35 | QT_MOC_LITERAL(1, 6, 17), // "anchorClickedSlot" 36 | QT_MOC_LITERAL(2, 24, 0), // "" 37 | QT_MOC_LITERAL(3, 25, 3), // "url" 38 | QT_MOC_LITERAL(4, 29, 13), // "httpReadyRead" 39 | QT_MOC_LITERAL(5, 43, 12) // "httpFinished" 40 | 41 | }, 42 | "rumor\0anchorClickedSlot\0\0url\0httpReadyRead\0" 43 | "httpFinished" 44 | }; 45 | #undef QT_MOC_LITERAL 46 | 47 | static const uint qt_meta_data_rumor[] = { 48 | 49 | // content: 50 | 7, // revision 51 | 0, // classname 52 | 0, 0, // classinfo 53 | 3, 14, // methods 54 | 0, 0, // properties 55 | 0, 0, // enums/sets 56 | 0, 0, // constructors 57 | 0, // flags 58 | 0, // signalCount 59 | 60 | // slots: name, argc, parameters, tag, flags 61 | 1, 1, 29, 2, 0x08 /* Private */, 62 | 4, 0, 32, 2, 0x08 /* Private */, 63 | 5, 0, 33, 2, 0x08 /* Private */, 64 | 65 | // slots: parameters 66 | QMetaType::Void, QMetaType::QUrl, 3, 67 | QMetaType::Void, 68 | QMetaType::Void, 69 | 70 | 0 // eod 71 | }; 72 | 73 | void rumor::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) 74 | { 75 | if (_c == QMetaObject::InvokeMetaMethod) { 76 | rumor *_t = static_cast(_o); 77 | Q_UNUSED(_t) 78 | switch (_id) { 79 | case 0: _t->anchorClickedSlot((*reinterpret_cast< const QUrl(*)>(_a[1]))); break; 80 | case 1: _t->httpReadyRead(); break; 81 | case 2: _t->httpFinished(); break; 82 | default: ; 83 | } 84 | } 85 | } 86 | 87 | const QMetaObject rumor::staticMetaObject = { 88 | { &QDialog::staticMetaObject, qt_meta_stringdata_rumor.data, 89 | qt_meta_data_rumor, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} 90 | }; 91 | 92 | 93 | const QMetaObject *rumor::metaObject() const 94 | { 95 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; 96 | } 97 | 98 | void *rumor::qt_metacast(const char *_clname) 99 | { 100 | if (!_clname) return Q_NULLPTR; 101 | if (!strcmp(_clname, qt_meta_stringdata_rumor.stringdata0)) 102 | return static_cast(const_cast< rumor*>(this)); 103 | return QDialog::qt_metacast(_clname); 104 | } 105 | 106 | int rumor::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 107 | { 108 | _id = QDialog::qt_metacall(_c, _id, _a); 109 | if (_id < 0) 110 | return _id; 111 | if (_c == QMetaObject::InvokeMetaMethod) { 112 | if (_id < 3) 113 | qt_static_metacall(this, _c, _id, _a); 114 | _id -= 3; 115 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { 116 | if (_id < 3) 117 | *reinterpret_cast(_a[0]) = -1; 118 | _id -= 3; 119 | } 120 | return _id; 121 | } 122 | QT_WARNING_POP 123 | QT_END_MOC_NAMESPACE 124 | -------------------------------------------------------------------------------- /Debug/moc_rumor_info.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'rumor_info.h' 3 | ** 4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0) 5 | ** 6 | ** WARNING! All changes made in this file will be lost! 7 | *****************************************************************************/ 8 | 9 | #include "../rumor_info.h" 10 | #include 11 | #include 12 | #if !defined(Q_MOC_OUTPUT_REVISION) 13 | #error "The header file 'rumor_info.h' doesn't include ." 14 | #elif Q_MOC_OUTPUT_REVISION != 67 15 | #error "This file was generated using the moc from 5.8.0. It" 16 | #error "cannot be used with the include files from this version of Qt." 17 | #error "(The moc has changed too much.)" 18 | #endif 19 | 20 | QT_BEGIN_MOC_NAMESPACE 21 | QT_WARNING_PUSH 22 | QT_WARNING_DISABLE_DEPRECATED 23 | struct qt_meta_stringdata_rumor_info_t { 24 | QByteArrayData data[5]; 25 | char stringdata0[59]; 26 | }; 27 | #define QT_MOC_LITERAL(idx, ofs, len) \ 28 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ 29 | qptrdiff(offsetof(qt_meta_stringdata_rumor_info_t, stringdata0) + ofs \ 30 | - idx * sizeof(QByteArrayData)) \ 31 | ) 32 | static const qt_meta_stringdata_rumor_info_t qt_meta_stringdata_rumor_info = { 33 | { 34 | QT_MOC_LITERAL(0, 0, 10), // "rumor_info" 35 | QT_MOC_LITERAL(1, 11, 13), // "httpReadyRead" 36 | QT_MOC_LITERAL(2, 25, 0), // "" 37 | QT_MOC_LITERAL(3, 26, 12), // "httpFinished" 38 | QT_MOC_LITERAL(4, 39, 19) // "on_btn_back_clicked" 39 | 40 | }, 41 | "rumor_info\0httpReadyRead\0\0httpFinished\0" 42 | "on_btn_back_clicked" 43 | }; 44 | #undef QT_MOC_LITERAL 45 | 46 | static const uint qt_meta_data_rumor_info[] = { 47 | 48 | // content: 49 | 7, // revision 50 | 0, // classname 51 | 0, 0, // classinfo 52 | 3, 14, // methods 53 | 0, 0, // properties 54 | 0, 0, // enums/sets 55 | 0, 0, // constructors 56 | 0, // flags 57 | 0, // signalCount 58 | 59 | // slots: name, argc, parameters, tag, flags 60 | 1, 0, 29, 2, 0x08 /* Private */, 61 | 3, 0, 30, 2, 0x08 /* Private */, 62 | 4, 0, 31, 2, 0x08 /* Private */, 63 | 64 | // slots: parameters 65 | QMetaType::Void, 66 | QMetaType::Void, 67 | QMetaType::Void, 68 | 69 | 0 // eod 70 | }; 71 | 72 | void rumor_info::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) 73 | { 74 | if (_c == QMetaObject::InvokeMetaMethod) { 75 | rumor_info *_t = static_cast(_o); 76 | Q_UNUSED(_t) 77 | switch (_id) { 78 | case 0: _t->httpReadyRead(); break; 79 | case 1: _t->httpFinished(); break; 80 | case 2: _t->on_btn_back_clicked(); break; 81 | default: ; 82 | } 83 | } 84 | Q_UNUSED(_a); 85 | } 86 | 87 | const QMetaObject rumor_info::staticMetaObject = { 88 | { &QDialog::staticMetaObject, qt_meta_stringdata_rumor_info.data, 89 | qt_meta_data_rumor_info, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} 90 | }; 91 | 92 | 93 | const QMetaObject *rumor_info::metaObject() const 94 | { 95 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; 96 | } 97 | 98 | void *rumor_info::qt_metacast(const char *_clname) 99 | { 100 | if (!_clname) return Q_NULLPTR; 101 | if (!strcmp(_clname, qt_meta_stringdata_rumor_info.stringdata0)) 102 | return static_cast(const_cast< rumor_info*>(this)); 103 | return QDialog::qt_metacast(_clname); 104 | } 105 | 106 | int rumor_info::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 107 | { 108 | _id = QDialog::qt_metacall(_c, _id, _a); 109 | if (_id < 0) 110 | return _id; 111 | if (_c == QMetaObject::InvokeMetaMethod) { 112 | if (_id < 3) 113 | qt_static_metacall(this, _c, _id, _a); 114 | _id -= 3; 115 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { 116 | if (_id < 3) 117 | *reinterpret_cast(_a[0]) = -1; 118 | _id -= 3; 119 | } 120 | return _id; 121 | } 122 | QT_WARNING_POP 123 | QT_END_MOC_NAMESPACE 124 | -------------------------------------------------------------------------------- /Debug/object_script.qt_2019_ncov.Debug: -------------------------------------------------------------------------------- 1 | INPUT( 2 | ./debug\main.o 3 | ./debug\dialog.o 4 | ./debug\qcustomplot.o 5 | ./debug\parse.o 6 | ./debug\network.o 7 | ./debug\plot.o 8 | ./debug\slots.o 9 | ./debug\about.o 10 | ./debug\rumor.o 11 | ./debug\rumor_info.o 12 | ./debug\news_info.o 13 | ./debug\qrc_img.o 14 | ./debug\moc_dialog.o 15 | ./debug\moc_qcustomplot.o 16 | ./debug\moc_about.o 17 | ./debug\moc_rumor.o 18 | ./debug\moc_rumor_info.o 19 | ./debug\moc_news_info.o 20 | ); 21 | -------------------------------------------------------------------------------- /Debug/object_script.qt_2019_ncov.Release: -------------------------------------------------------------------------------- 1 | INPUT( 2 | ./release\main.o 3 | ./release\dialog.o 4 | ./release\qcustomplot.o 5 | ./release\parse.o 6 | ./release\network.o 7 | ./release\plot.o 8 | ./release\slots.o 9 | ./release\about.o 10 | ./release\rumor.o 11 | ./release\rumor_info.o 12 | ./release\news_info.o 13 | ./release\qrc_img.o 14 | ./release\moc_dialog.o 15 | ./release\moc_qcustomplot.o 16 | ./release\moc_about.o 17 | ./release\moc_rumor.o 18 | ./release\moc_rumor_info.o 19 | ./release\moc_news_info.o 20 | ); 21 | -------------------------------------------------------------------------------- /Debug/qt_2019_ncov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whik/qt_2019_ncov/9474e808ee5095955daf12b981141b676b35805b/Debug/qt_2019_ncov -------------------------------------------------------------------------------- /Debug/qt_2019_ncov_resource.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | IDI_ICON1 ICON DISCARDABLE "E:\\qt_2019_ncov\\bitbug_favicon.ico" 4 | 5 | VS_VERSION_INFO VERSIONINFO 6 | FILEVERSION 0,0,0,0 7 | PRODUCTVERSION 0,0,0,0 8 | FILEFLAGSMASK 0x3fL 9 | #ifdef _DEBUG 10 | FILEFLAGS VS_FF_DEBUG 11 | #else 12 | FILEFLAGS 0x0L 13 | #endif 14 | FILEOS VOS__WINDOWS32 15 | FILETYPE VFT_DLL 16 | FILESUBTYPE 0x0L 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | BLOCK "040904b0" 21 | BEGIN 22 | VALUE "CompanyName", "\0" 23 | VALUE "FileDescription", "\0" 24 | VALUE "FileVersion", "0.0.0.0\0" 25 | VALUE "LegalCopyright", "\0" 26 | VALUE "OriginalFilename", "qt_2019_ncov.exe\0" 27 | VALUE "ProductName", "qt_2019_ncov\0" 28 | VALUE "ProductVersion", "0.0.0.0\0" 29 | END 30 | END 31 | BLOCK "VarFileInfo" 32 | BEGIN 33 | VALUE "Translation", 0x0409, 1200 34 | END 35 | END 36 | /* End of Version info */ 37 | 38 | -------------------------------------------------------------------------------- /Debug/ui_about.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'about.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 5.8.0 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_ABOUT_H 10 | #define UI_ABOUT_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | QT_BEGIN_NAMESPACE 22 | 23 | class Ui_about 24 | { 25 | public: 26 | QVBoxLayout *verticalLayout; 27 | QTextBrowser *tb_about; 28 | 29 | void setupUi(QDialog *about) 30 | { 31 | if (about->objectName().isEmpty()) 32 | about->setObjectName(QStringLiteral("about")); 33 | about->resize(570, 696); 34 | QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); 35 | sizePolicy.setHorizontalStretch(0); 36 | sizePolicy.setVerticalStretch(0); 37 | sizePolicy.setHeightForWidth(about->sizePolicy().hasHeightForWidth()); 38 | about->setSizePolicy(sizePolicy); 39 | about->setMinimumSize(QSize(570, 470)); 40 | about->setStyleSheet(QStringLiteral("background-color: rgb(255, 255, 255);")); 41 | verticalLayout = new QVBoxLayout(about); 42 | verticalLayout->setObjectName(QStringLiteral("verticalLayout")); 43 | tb_about = new QTextBrowser(about); 44 | tb_about->setObjectName(QStringLiteral("tb_about")); 45 | QFont font; 46 | font.setFamily(QString::fromUtf8("\351\273\221\344\275\223")); 47 | font.setPointSize(7); 48 | tb_about->setFont(font); 49 | 50 | verticalLayout->addWidget(tb_about); 51 | 52 | 53 | retranslateUi(about); 54 | 55 | QMetaObject::connectSlotsByName(about); 56 | } // setupUi 57 | 58 | void retranslateUi(QDialog *about) 59 | { 60 | about->setWindowTitle(QApplication::translate("about", "Dialog", Q_NULLPTR)); 61 | tb_about->setHtml(QApplication::translate("about", "\n" 62 | "\n" 65 | "

\302\267\346\225\260\346\215\256\346\235\245\346\272\220

\n" 66 | "


\n" 67 | "

\350\205\276\350\256\257\346\226\260\351\227\273\357\274\232\346\226\260\345\206\240\350\202\272\347\202\216\347\226\253\346\203\205\346\234\200\346\226\260\345\212\250\346\200\201

\n" 69 | "


\n" 70 | "
\n" 71 | "

\302\267\345\246\202\344\275\225\345\256\236\347\216\260

\n" 72 | "


\n" 73 | "

\345\237\272\344\272\216Qt\347\232\204\346\226\260\345\206\240\350\202\272\347\202\216\347\226\253\346\203\205\346\225\260\346\215\256\345\256\236\346\227\266\347\233\221\346\216\247\345\271\263\345\217\260

\n" 75 | "


\n" 76 | "
\n" 77 | "

\302\267\345\205\263\344\272\216\344\275\234\350\200\205

\n" 78 | "


\n" 79 | "

Home \302\267 Github \302\267 Support

\n" 81 | "


\n" 82 | "
\n" 83 | "

\302\267\345\205\254\344\274\227\345\217\267

\n" 85 | "


\n" 86 | "

", Q_NULLPTR)); 87 | } // retranslateUi 88 | 89 | }; 90 | 91 | namespace Ui { 92 | class about: public Ui_about {}; 93 | } // namespace Ui 94 | 95 | QT_END_NAMESPACE 96 | 97 | #endif // UI_ABOUT_H 98 | -------------------------------------------------------------------------------- /Debug/ui_news_info.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'news_info.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 5.8.0 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_NEWS_INFO_H 10 | #define UI_NEWS_INFO_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | QT_BEGIN_NAMESPACE 27 | 28 | class Ui_news_info 29 | { 30 | public: 31 | QVBoxLayout *verticalLayout; 32 | QHBoxLayout *horizontalLayout_2; 33 | QLabel *label; 34 | QLineEdit *le_url; 35 | QPushButton *btn_refresh; 36 | QAxWidget *flash_newsInfo; 37 | QHBoxLayout *horizontalLayout; 38 | QSpacerItem *horizontalSpacer; 39 | QPushButton *btn_close; 40 | QSpacerItem *horizontalSpacer_2; 41 | 42 | void setupUi(QDialog *news_info) 43 | { 44 | if (news_info->objectName().isEmpty()) 45 | news_info->setObjectName(QStringLiteral("news_info")); 46 | news_info->resize(545, 657); 47 | news_info->setSizeGripEnabled(false); 48 | news_info->setModal(false); 49 | verticalLayout = new QVBoxLayout(news_info); 50 | verticalLayout->setObjectName(QStringLiteral("verticalLayout")); 51 | horizontalLayout_2 = new QHBoxLayout(); 52 | horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); 53 | label = new QLabel(news_info); 54 | label->setObjectName(QStringLiteral("label")); 55 | QFont font; 56 | font.setFamily(QString::fromUtf8("\351\273\221\344\275\223")); 57 | font.setPointSize(12); 58 | label->setFont(font); 59 | 60 | horizontalLayout_2->addWidget(label); 61 | 62 | le_url = new QLineEdit(news_info); 63 | le_url->setObjectName(QStringLiteral("le_url")); 64 | le_url->setFont(font); 65 | le_url->setReadOnly(true); 66 | 67 | horizontalLayout_2->addWidget(le_url); 68 | 69 | btn_refresh = new QPushButton(news_info); 70 | btn_refresh->setObjectName(QStringLiteral("btn_refresh")); 71 | btn_refresh->setFont(font); 72 | 73 | horizontalLayout_2->addWidget(btn_refresh); 74 | 75 | 76 | verticalLayout->addLayout(horizontalLayout_2); 77 | 78 | flash_newsInfo = new QAxWidget(news_info); 79 | flash_newsInfo->setObjectName(QStringLiteral("flash_newsInfo")); 80 | 81 | verticalLayout->addWidget(flash_newsInfo); 82 | 83 | horizontalLayout = new QHBoxLayout(); 84 | horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); 85 | horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); 86 | 87 | horizontalLayout->addItem(horizontalSpacer); 88 | 89 | btn_close = new QPushButton(news_info); 90 | btn_close->setObjectName(QStringLiteral("btn_close")); 91 | btn_close->setFont(font); 92 | 93 | horizontalLayout->addWidget(btn_close); 94 | 95 | horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); 96 | 97 | horizontalLayout->addItem(horizontalSpacer_2); 98 | 99 | 100 | verticalLayout->addLayout(horizontalLayout); 101 | 102 | verticalLayout->setStretch(0, 1); 103 | verticalLayout->setStretch(1, 10); 104 | verticalLayout->setStretch(2, 1); 105 | 106 | retranslateUi(news_info); 107 | 108 | QMetaObject::connectSlotsByName(news_info); 109 | } // setupUi 110 | 111 | void retranslateUi(QDialog *news_info) 112 | { 113 | news_info->setWindowTitle(QApplication::translate("news_info", "Dialog", Q_NULLPTR)); 114 | label->setText(QApplication::translate("news_info", "\345\234\260\345\235\200\357\274\232", Q_NULLPTR)); 115 | btn_refresh->setText(QApplication::translate("news_info", "\345\210\267\346\226\260", Q_NULLPTR)); 116 | btn_close->setText(QApplication::translate("news_info", "\350\277\224\345\233\236", Q_NULLPTR)); 117 | } // retranslateUi 118 | 119 | }; 120 | 121 | namespace Ui { 122 | class news_info: public Ui_news_info {}; 123 | } // namespace Ui 124 | 125 | QT_END_NAMESPACE 126 | 127 | #endif // UI_NEWS_INFO_H 128 | -------------------------------------------------------------------------------- /Debug/ui_rumor.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'rumor.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 5.8.0 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_RUMOR_H 10 | #define UI_RUMOR_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | QT_BEGIN_NAMESPACE 22 | 23 | class Ui_rumor 24 | { 25 | public: 26 | QVBoxLayout *verticalLayout; 27 | QTextBrowser *tb_rumor; 28 | 29 | void setupUi(QDialog *rumor) 30 | { 31 | if (rumor->objectName().isEmpty()) 32 | rumor->setObjectName(QStringLiteral("rumor")); 33 | rumor->resize(664, 433); 34 | QFont font; 35 | font.setFamily(QStringLiteral("Ubuntu")); 36 | rumor->setFont(font); 37 | verticalLayout = new QVBoxLayout(rumor); 38 | verticalLayout->setObjectName(QStringLiteral("verticalLayout")); 39 | tb_rumor = new QTextBrowser(rumor); 40 | tb_rumor->setObjectName(QStringLiteral("tb_rumor")); 41 | QFont font1; 42 | font1.setFamily(QString::fromUtf8("\345\276\256\350\275\257\351\233\205\351\273\221")); 43 | tb_rumor->setFont(font1); 44 | 45 | verticalLayout->addWidget(tb_rumor); 46 | 47 | 48 | retranslateUi(rumor); 49 | 50 | QMetaObject::connectSlotsByName(rumor); 51 | } // setupUi 52 | 53 | void retranslateUi(QDialog *rumor) 54 | { 55 | rumor->setWindowTitle(QApplication::translate("rumor", "Dialog", Q_NULLPTR)); 56 | tb_rumor->setHtml(QApplication::translate("rumor", "\n" 57 | "CanvasLayer\n" 60 | "


", Q_NULLPTR)); 61 | } // retranslateUi 62 | 63 | }; 64 | 65 | namespace Ui { 66 | class rumor: public Ui_rumor {}; 67 | } // namespace Ui 68 | 69 | QT_END_NAMESPACE 70 | 71 | #endif // UI_RUMOR_H 72 | -------------------------------------------------------------------------------- /Debug/ui_rumor_info.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'rumor_info.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 5.8.0 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_RUMOR_INFO_H 10 | #define UI_RUMOR_INFO_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | QT_BEGIN_NAMESPACE 25 | 26 | class Ui_rumor_info 27 | { 28 | public: 29 | QVBoxLayout *verticalLayout; 30 | QTextBrowser *tb_rumor_info; 31 | QHBoxLayout *horizontalLayout; 32 | QSpacerItem *horizontalSpacer; 33 | QPushButton *btn_back; 34 | QSpacerItem *horizontalSpacer_2; 35 | 36 | void setupUi(QDialog *rumor_info) 37 | { 38 | if (rumor_info->objectName().isEmpty()) 39 | rumor_info->setObjectName(QStringLiteral("rumor_info")); 40 | rumor_info->resize(634, 345); 41 | verticalLayout = new QVBoxLayout(rumor_info); 42 | verticalLayout->setObjectName(QStringLiteral("verticalLayout")); 43 | tb_rumor_info = new QTextBrowser(rumor_info); 44 | tb_rumor_info->setObjectName(QStringLiteral("tb_rumor_info")); 45 | 46 | verticalLayout->addWidget(tb_rumor_info); 47 | 48 | horizontalLayout = new QHBoxLayout(); 49 | horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); 50 | horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); 51 | 52 | horizontalLayout->addItem(horizontalSpacer); 53 | 54 | btn_back = new QPushButton(rumor_info); 55 | btn_back->setObjectName(QStringLiteral("btn_back")); 56 | QFont font; 57 | font.setFamily(QString::fromUtf8("\351\273\221\344\275\223")); 58 | font.setPointSize(12); 59 | btn_back->setFont(font); 60 | 61 | horizontalLayout->addWidget(btn_back); 62 | 63 | horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); 64 | 65 | horizontalLayout->addItem(horizontalSpacer_2); 66 | 67 | 68 | verticalLayout->addLayout(horizontalLayout); 69 | 70 | 71 | retranslateUi(rumor_info); 72 | 73 | QMetaObject::connectSlotsByName(rumor_info); 74 | } // setupUi 75 | 76 | void retranslateUi(QDialog *rumor_info) 77 | { 78 | rumor_info->setWindowTitle(QApplication::translate("rumor_info", "Dialog", Q_NULLPTR)); 79 | tb_rumor_info->setHtml(QApplication::translate("rumor_info", "\n" 80 | "\n" 83 | "

\345\244\251\346\260\224\346\232\226\345\222\214\344\273\216\345\215\227\346\226\271\345\233\236\345\275\222\345\214\227\346\226\271\347\232\204\351\270\237\344\274\232\345\270\246\345\233\236\347\227\205\346\257\222\357\274\214\346\204\237\346\237\223\344\272\272\347\261\273

\n" 84 | "

\n" 86 | "

"\346\265\201\344\274\240\350\257\264\346\263\225\357\274\232\345\244\251\346\260\224\345\233\236\346\232\226\357\274\214\344\273\216\345\215\227\346\226\271\351\243\236\345\233\236\345\214\227\346\226\271\347\232\204\351\270\237\347\273\217\350\277\207\347\226\253\345\214\272\344\274\232\345\270\246\345\233\236\347\227\205\346\257\222\357\274\214\346\204\237\346\237\223\344\272\272\347\261\273\343\200\202"

\n" 87 | "
\n" 88 | "

\350\276\203\347\234\237" 89 | "\351\211\264\345\256\232\357\274\232 [\347\226\221]\346\234\211\345\244\261\345\256\236

\n" 90 | "

\n" 91 | "

\346\237\245\350\257\201\350\246\201\347\202\271\357\274\232

\n" 92 | "

1 \345\206\240\347\212\266\347\227\205\346\257\222\346\230\257\344\270\200\347\261\273\344\270\273\350\246\201\345\274\225\350\265\267\345\221\274\345\220\270\351\201\223\343\200\201\350\202\240\351\201\223\347\226\276\347\227\205\347\232\204\347\227\205\345\216\237\344\275\223\343\200\202\351\231\244\344\272\206\345\217\257\346\204\237\346\237\223\344\272\272\347\261\273\357\274\214\350\277\230\345\217\257\346\204\237\346\237\223\347\214\252\343\200\201\347\211\233\343\200\201\347\214\253\343\200\201\347\212\254\343\200\201\351\252\206\351\251\274\343\200\201\350\235\231\350\235\240\343\200\201\350\200\201\351\274\240\343\200\201\345\210\272\347\214\254\347\255\211\345\244\232\347\247\215\345\223\272\344\271\263\345\212\250\347\211\251\344\273\245\345\217\212\345\244\232\347\247\215\351\270\237\347\261\273\343\200\202\351\270\237\347\261\273\344\275\234\344\270\272\345\256\277\344\270\273\344\271\213\344\270\200" 94 | "\357\274\214\345\205\266\344\274\232\346\204\237\346\237\223SARS\347\227\205\346\257\222\346\210\226MERS\347\227\205\346\257\222\345\267\262\350\242\253\350\257\201\345\256\236\343\200\202\346\234\254\346\254\241\346\226\260\345\236\213\345\206\240\347\212\266\347\227\205\346\257\222\350\267\237SARS\345\261\236\344\272\216\344\270\200\344\270\252\346\227\217\357\274\214\351\270\237\347\261\273\346\204\237\346\237\223\345\217\257\350\203\275\344\270\215\350\241\250\347\216\260\347\227\207\347\212\266\357\274\214\344\275\206\345\246\202\346\236\234\344\272\272\346\216\245\350\247\246\346\210\226\351\243\237\347\224\250\346\220\272\345\270\246\347\227\205\346\257\222\351\270\237\347\261\273\357\274\214\344\274\232\350\242\253\346\204\237\346\237\223\345\271\266\345\274\225\350\265\267\347\227\207\347\212\266\343\200\202

\n" 95 | "

2 \346\211\200\344\273\245\345\244\251\346\260\224\345\233\236\346\232\226\357\274\214\345\214\227\351\243\236\347\232\204\351\270\237\345\217\257\350\203\275\346\220\272\345\270\246\347\227\205\346\257\222\357\274\214\344\275\206\350\277\231\345\271\266\344\270\215\346\204\217\345\221\263\347\235\200\344\273\200\344\271\210\343\200\202\345\233\240\344\270\272\350\213\245\346\262\241\346\234\211\346\234\254\346\254\241\347\226\253\346\203\205\357\274\214\351\270\237\347\261\273\344\271\237\344\274\232\346\220\272\345\270\246\347\227\205\346\257\222\357\274\214\344\272\272\347\261\273\344\270\216\350\277\231\344\272\233\351\207\216\347\224\237\345\212\250\347\211\251\347\233\270\345\256\211\346\227\240\344\272\213\357\274\214\350\242\253\346\204\237\346\237\223\347\232\204\346\246\202\347\216\207\345\276\210\344\275" 97 | "\216\357\274\233\345\217\246\345\244\226\357\274\214\345\214\227\346\226\271\345\237\216\345\270\202\346\257\224\345\246\202\351\273\221\351\276\231\346\261\237\343\200\201\345\214\227\344\272\254\347\255\211\345\235\207\346\234\211\346\225\260\347\231\276\347\241\256\350\257\212\347\227\205\344\276\213\357\274\214\347\227\205\346\257\222\345\234\250\345\205\250\345\233\275\346\211\251\346\225\243\346\230\257\346\227\242\345\256\232\344\272\213\345\256\236\357\274\214\345\217\252\350\246\201\346\210\221\344\273\254\345\201\232\345\245\275\345\237\272\347\241\200\351\230\262\346\212\244\357\274\214\344\270\215\345\220\203\351\207\216\347\224\237\345\212\250\347\211\251\357\274\214\347\226\253\346\203\205\344\270\215\344\274\232\345\233\240\344\270\272\351\270\237\347\261\273\345\210\260\346\235\245\350\200\214\345\212\240\351\207\215\343\200\202

\n" 98 | "

\n" 100 | "

\346\237\245\350\257\201\350\200\205\357\274\232\350\260\242\346\234\233\346\227\266 \350\215\257\347\220\206\345\255\246\347\241\225\345\243\253\357\274\214\347\237\245\350\264\235\345\204\277\347\247\221\350\215\257\345\270\210

\n" 101 | "
\n" 102 | "

\346\227\266\351\227\264\357\274\2322020-02-13\343\200\200\346\235\245\346\272\220\357\274\232\350\205\276\350\256\257\350\276\203\347\234\237

\n" 104 | "


", Q_NULLPTR)); 105 | btn_back->setText(QApplication::translate("rumor_info", "\350\277\224\345\233\236", Q_NULLPTR)); 106 | } // retranslateUi 107 | 108 | }; 109 | 110 | namespace Ui { 111 | class rumor_info: public Ui_rumor_info {}; 112 | } // namespace Ui 113 | 114 | QT_END_NAMESPACE 115 | 116 | #endif // UI_RUMOR_INFO_H 117 | -------------------------------------------------------------------------------- /Export/备用OSS下载链接.txt: -------------------------------------------------------------------------------- 1 | v1.2 2 | 安装版: 3 | https://wcc-blog.oss-cn-beijing.aliyuncs.com/QtUpdate/qt_2019_ncov/v1.2_20200222_qt_2019_ncov_install.exe 4 | 免安装版: 5 | https://wcc-blog.oss-cn-beijing.aliyuncs.com/QtUpdate/qt_2019_ncov/v1.2_20200222_qt_2019_ncov_portable.exe 6 | 7 | v1.1 8 | 安装版: 9 | https://wcc-blog.oss-cn-beijing.aliyuncs.com/QtUpdate/qt_2019_ncov/v1.1_20200214_qt_2019_ncov_install.exe 10 | 免安装版: 11 | https://wcc-blog.oss-cn-beijing.aliyuncs.com/QtUpdate/qt_2019_ncov/v1.1_20200214_qt_2019_ncov_portable.exe 12 | 13 | v1.0 14 | 安装版: 15 | https://wcc-blog.oss-cn-beijing.aliyuncs.com/QtUpdate/qt_2019_ncov/20200212_qt_2019_ncov_install.exe 16 | 免安装版: 17 | https://wcc-blog.oss-cn-beijing.aliyuncs.com/QtUpdate/qt_2019_ncov/20200212_qt_2019_ncov_portable.exe 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # qt_2019_ncov 2 | 3 | 基于Qt/C++框架实现的新冠肺炎疫情数据可视化显示。主要包括新型冠状病毒肺炎疫情数据实时查看,确诊/疑似/治愈/死亡数据趋势折线图,各省市和海外数据树形显示,实时新闻动态显示等,数据源来自腾讯新闻接口,数据格式为JSON。 4 | 5 | ### 如何实现 6 | 7 | 我的博客文章: 8 | - [基于Qt的新冠肺炎疫情数据实时监控平台(开源小项目)](https://www.qtexe.com/post/2020-02-14-qt-ncov/) 9 | - [基于Qt的新冠肺炎疫情数据实时监控平台1.1版本](https://www.qtexe.com/post/2020-02-15-qt-ncov-2/) 10 | ### 版本历史 11 | 12 | [v1.0](https://github.com/qtexe/qt_2019_ncov/releases/tag/v1.0) 13 | 14 | - 全国疫情数据实时显示 15 | - 历史疫情数据趋势折线图显示 16 | - 各省市和海外疫情数据树形显示 17 | - 最新疫情新闻动态显示 18 | - 最新辟谣信息展示 19 | - 手动和自动更新(每5分钟) 20 | 21 | [v1.1](https://github.com/qtexe/qt_2019_ncov/releases/tag/v1.1) 22 | 23 | - 添加一个API和窗口,用于显示辟谣信息详情 24 | - 辟谣信息详情界面设计 25 | - 打开超链接改为QtDesktop,不使用widows.h(linux不支持) 26 | 27 | -------------------------------------------------------------------------------- /Release/.qmake.stash: -------------------------------------------------------------------------------- 1 | QMAKE_DEFAULT_INCDIRS = \ 2 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include \ 3 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include-fixed \ 4 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include \ 5 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include/c++ \ 6 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/i686-w64-mingw32 \ 7 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/backward 8 | QMAKE_DEFAULT_LIBDIRS = \ 9 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0 \ 10 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc \ 11 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/lib \ 12 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib 13 | QMAKE_CXX.INCDIRS = \ 14 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include \ 15 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include-fixed \ 16 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include \ 17 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include/c++ \ 18 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/i686-w64-mingw32 \ 19 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/backward \ 20 | F:/Qt/Qt5.9.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include \ 21 | F:/Qt/Qt5.9.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include-fixed \ 22 | F:/Qt/Qt5.9.0/Tools/mingw530_32/i686-w64-mingw32/include \ 23 | F:/Qt/Qt5.9.0/Tools/mingw530_32/i686-w64-mingw32/include/c++ \ 24 | F:/Qt/Qt5.9.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/i686-w64-mingw32 \ 25 | F:/Qt/Qt5.9.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/backward 26 | QMAKE_CXX.LIBDIRS = \ 27 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0 \ 28 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib/gcc \ 29 | D:/Qt/Qt5.8.0/Tools/mingw530_32/i686-w64-mingw32/lib \ 30 | D:/Qt/Qt5.8.0/Tools/mingw530_32/lib \ 31 | F:/Qt/Qt5.9.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0 \ 32 | F:/Qt/Qt5.9.0/Tools/mingw530_32/lib/gcc \ 33 | F:/Qt/Qt5.9.0/Tools/mingw530_32/i686-w64-mingw32/lib \ 34 | F:/Qt/Qt5.9.0/Tools/mingw530_32/lib 35 | QMAKE_CXX.QT_COMPILER_STDCXX = 199711L 36 | QMAKE_CXX.QT_GCC_MAJOR_VERSION = 5 37 | QMAKE_CXX.QT_GCC_MINOR_VERSION = 3 38 | QMAKE_CXX.QT_GCC_PATCH_VERSION = 0 39 | QMAKE_CXX.COMPILER_MACROS = \ 40 | QT_COMPILER_STDCXX \ 41 | QT_GCC_MAJOR_VERSION \ 42 | QT_GCC_MINOR_VERSION \ 43 | QT_GCC_PATCH_VERSION 44 | -------------------------------------------------------------------------------- /Release/html_news.txt: -------------------------------------------------------------------------------- 1 | 2 | 5 |

· *

6 |

*

7 |

来源:* 发布于:*

8 |
* 9 | 10 | 13 |

查看更多报道 央视新闻直播

-------------------------------------------------------------------------------- /Release/html_rumor.txt: -------------------------------------------------------------------------------- 1 | 4 |

*: *

5 |

*

6 |
* 7 | 10 |

查看更多辟谣信息

-------------------------------------------------------------------------------- /Release/html_rumor_info.txt: -------------------------------------------------------------------------------- 1 | 2 | 5 |

*

6 |

7 |

"流传说法:*"

8 |
9 |

较真鉴定: [*]*

10 |

11 |

查证要点:

12 | 13 | * 14 |

* *

* 15 | 16 | 17 |

18 |

查证者:* *

19 |
20 |

时间:* 来源:*

21 |


-------------------------------------------------------------------------------- /Release/object_script.qt_2019_ncov.Debug: -------------------------------------------------------------------------------- 1 | INPUT( 2 | ./debug\main.o 3 | ./debug\dialog.o 4 | ./debug\qcustomplot.o 5 | ./debug\parse.o 6 | ./debug\network.o 7 | ./debug\plot.o 8 | ./debug\slots.o 9 | ./debug\about.o 10 | ./debug\rumor.o 11 | ./debug\rumor_info.o 12 | ./debug\news_info.o 13 | ./debug\qrc_img.o 14 | ./debug\moc_dialog.o 15 | ./debug\moc_qcustomplot.o 16 | ./debug\moc_about.o 17 | ./debug\moc_rumor.o 18 | ./debug\moc_rumor_info.o 19 | ./debug\moc_news_info.o 20 | ); 21 | -------------------------------------------------------------------------------- /Release/object_script.qt_2019_ncov.Release: -------------------------------------------------------------------------------- 1 | INPUT( 2 | ./release\main.o 3 | ./release\dialog.o 4 | ./release\qcustomplot.o 5 | ./release\parse.o 6 | ./release\network.o 7 | ./release\plot.o 8 | ./release\slots.o 9 | ./release\about.o 10 | ./release\rumor.o 11 | ./release\rumor_info.o 12 | ./release\news_info.o 13 | ./release\qrc_img.o 14 | ./release\moc_dialog.o 15 | ./release\moc_qcustomplot.o 16 | ./release\moc_about.o 17 | ./release\moc_rumor.o 18 | ./release\moc_rumor_info.o 19 | ./release\moc_news_info.o 20 | ); 21 | -------------------------------------------------------------------------------- /Release/qt_2019_ncov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whik/qt_2019_ncov/9474e808ee5095955daf12b981141b676b35805b/Release/qt_2019_ncov -------------------------------------------------------------------------------- /Release/qt_2019_ncov_resource.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | IDI_ICON1 ICON DISCARDABLE "E:\\qt_2019_ncov\\bitbug_favicon.ico" 4 | 5 | VS_VERSION_INFO VERSIONINFO 6 | FILEVERSION 0,0,0,0 7 | PRODUCTVERSION 0,0,0,0 8 | FILEFLAGSMASK 0x3fL 9 | #ifdef _DEBUG 10 | FILEFLAGS VS_FF_DEBUG 11 | #else 12 | FILEFLAGS 0x0L 13 | #endif 14 | FILEOS VOS__WINDOWS32 15 | FILETYPE VFT_DLL 16 | FILESUBTYPE 0x0L 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | BLOCK "040904b0" 21 | BEGIN 22 | VALUE "CompanyName", "\0" 23 | VALUE "FileDescription", "\0" 24 | VALUE "FileVersion", "0.0.0.0\0" 25 | VALUE "LegalCopyright", "\0" 26 | VALUE "OriginalFilename", "qt_2019_ncov.exe\0" 27 | VALUE "ProductName", "qt_2019_ncov\0" 28 | VALUE "ProductVersion", "0.0.0.0\0" 29 | END 30 | END 31 | BLOCK "VarFileInfo" 32 | BEGIN 33 | VALUE "Translation", 0x0409, 1200 34 | END 35 | END 36 | /* End of Version info */ 37 | 38 | -------------------------------------------------------------------------------- /Release/release/html_news.txt: -------------------------------------------------------------------------------- 1 | 2 | 5 |

· *

6 |

*

7 |

来源:* 发布于:*

8 |
* 9 | 10 | 13 |

查看更多报道 央视新闻直播

-------------------------------------------------------------------------------- /Release/release/html_rumor.txt: -------------------------------------------------------------------------------- 1 | 4 |

*: *

5 |

*

6 |
* 7 | 10 |

查看更多辟谣信息

-------------------------------------------------------------------------------- /Release/release/html_rumor_info.txt: -------------------------------------------------------------------------------- 1 | 2 | 5 |

*

6 |

7 |

"流传说法:*"

8 |
9 |

较真鉴定: [*]*

10 |

11 |

查证要点:

12 | 13 | * 14 |

* *

* 15 | 16 | 17 |

18 |

查证者:* *

19 |
20 |

时间:* 来源:*

21 |


-------------------------------------------------------------------------------- /Release/release/libeay32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whik/qt_2019_ncov/9474e808ee5095955daf12b981141b676b35805b/Release/release/libeay32.dll -------------------------------------------------------------------------------- /Release/release/qt_2019_ncov.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whik/qt_2019_ncov/9474e808ee5095955daf12b981141b676b35805b/Release/release/qt_2019_ncov.exe -------------------------------------------------------------------------------- /Release/release/ssleay32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whik/qt_2019_ncov/9474e808ee5095955daf12b981141b676b35805b/Release/release/ssleay32.dll -------------------------------------------------------------------------------- /about.cpp: -------------------------------------------------------------------------------- 1 | #include "about.h" 2 | #include "ui_about.h" 3 | //#include "windows.h" 4 | #include 5 | //#include 6 | 7 | about::about(QWidget *parent) : 8 | QDialog(parent), 9 | ui(new Ui::about) 10 | { 11 | ui->setupUi(this); 12 | 13 | this->setWindowTitle("关于"); 14 | setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); 15 | 16 | ui->tb_about->setOpenLinks(false); 17 | connect(ui->tb_about, SIGNAL(anchorClicked(const QUrl&)), this, SLOT(anchorClickedSlot(const QUrl&))); 18 | } 19 | 20 | about::~about() 21 | { 22 | delete ui; 23 | } 24 | void about::anchorClickedSlot(const QUrl& url) 25 | { 26 | QDesktopServices::openUrl(url); 27 | // ShellExecuteA(NULL, "open", url.toString().toStdString().c_str(), "", "", SW_SHOW); 28 | } 29 | -------------------------------------------------------------------------------- /about.h: -------------------------------------------------------------------------------- 1 | #ifndef ABOUT_H 2 | #define ABOUT_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class about; 9 | } 10 | 11 | class about : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit about(QWidget *parent = 0); 17 | ~about(); 18 | 19 | private slots: 20 | void anchorClickedSlot(const QUrl& url); 21 | 22 | 23 | private: 24 | Ui::about *ui; 25 | }; 26 | 27 | #endif // ABOUT_H 28 | -------------------------------------------------------------------------------- /about.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | about 4 | 5 | 6 | 7 | 0 8 | 0 9 | 570 10 | 696 11 | 12 | 13 | 14 | 15 | 0 16 | 0 17 | 18 | 19 | 20 | 21 | 570 22 | 470 23 | 24 | 25 | 26 | Dialog 27 | 28 | 29 | background-color: rgb(255, 255, 255); 30 | 31 | 32 | 33 | 34 | 35 | 36 | 黑体 37 | 7 38 | 39 | 40 | 41 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 42 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 43 | p, li { white-space: pre-wrap; } 44 | </style></head><body style=" font-family:'黑体'; font-size:7pt; font-weight:400; font-style:normal;"> 45 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">·数据来源</span></p> 46 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:14pt; font-weight:600;"><br /></p> 47 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt;"> </span><a href="https://news.qq.com/zt2020/page/feiyan.htm"><span style=" font-size:14pt; text-decoration: underline; color:#000000;">腾讯新闻:新冠肺炎疫情最新动态</span></a></p> 48 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:14pt;"><br /></p> 49 | <hr /> 50 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">·如何实现</span></p> 51 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:14pt;"><br /></p> 52 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt;"> </span><a href="http://www.wangchaochao.top/2020/02/14/qt-ncov/"><span style=" font-size:14pt; text-decoration: underline; color:#000000;">基于Qt的新冠肺炎疫情数据实时监控平台</span></a></p> 53 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:14pt; text-decoration: underline; color:#0000ff;"><br /></p> 54 | <hr /> 55 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">·关于作者</span></p> 56 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:14pt;"><br /></p> 57 | <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.wangchaochao.top/2020/02/14/qt-ncov/"><span style=" font-size:14pt; text-decoration: underline; color:#000000;">Home</span></a><span style=" font-size:14pt; color:#000000;"> · </span><a href="https://github.com/qtexe/qt_2019_ncov"><span style=" font-size:14pt; text-decoration: underline; color:#000000;">Github</span></a><span style=" font-size:14pt; color:#000000;"> · </span><a href="https://wcc-blog.oss-cn-beijing.aliyuncs.com/payQR.jpg"><span style=" font-size:14pt; text-decoration: underline; color:#000000;">Support</span></a></p> 58 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:14pt;"><br /></p> 59 | <hr /> 60 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">·公众号</span></p> 61 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:14pt;"><br /></p> 62 | <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/my_sub.jpg" /></p></body></html> 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /api.txt: -------------------------------------------------------------------------------- 1 | 新浪新闻: 2 | 城市名为unicode 3 | https://interface.sina.cn/news/wap/fymap2020_data.d.json?1580868609265&&callback=sinajp_15808686092969432005074395626 4 | 5 | 腾讯api地址 6 | https://view.inews.qq.com/g2/getOnsInfo?name=disease_h5&_=1580872265054 7 | 8 | 丁香园疫情新闻: 9 | http://api.tianapi.com/txapi/ncov/index?key=964dc226dd5b57e892e6199735b6c55f 10 | 11 | 各平台肺炎疫情实时动态 12 | 13 | 梅斯:http://m.medsci.cn/wh.asp 14 | 15 | 新浪:https://news.sina.cn/zt_d/yiqing0121 16 | 17 | 网易:https://news.163.com/special/epidemic/ 18 | 19 | 知乎:https://www.zhihu.com/special/19681091 20 | 21 | 一财:https://m.yicai.com/news/100476965.html 22 | 23 | 丁香:https://3g.dxy.cn/newh5/view/pneumonia 24 | 25 | 腾讯:https://news.qq.com/zt2020/page/feiyan.htm 26 | 27 | 夸克:https://broccoli.uc.cn/apps/pneumonia/routes/index 28 | 29 | 百度:https://voice.baidu.com/act/newpneumonia/newpneumonia 30 | 31 | >>> import time, json, requests 32 | >>> url = 'https://view.inews.qq.com/g2/getOnsInfo?name=wuwei_ww_area_counts&callback=&_=%d'%int(time.time()*1000) 33 | >>> data = json.loads(requests.get(url=url).json()['data']) 34 | >>> print(len(data)) 35 | 301 36 | 37 | 38 | 全国累计 39 | https://ncov-api.werty.cn:2021/latest/tx/ 40 | 41 | 按钮边框 42 | 43 | 未选中 44 | border:3px groove rgb(255, 0, 0); //边框线条粗线,线型,颜色 45 | border-radius:8px; //圆角弧度 46 | padding:2px 4px; //文字离边框的距离,H/L 47 | background-color: rgb(243, 246, 248); //背景颜色 48 | color: rgb(255, 255, 255); 49 | 50 | 51 | 选中: 52 | border:3px groove rgb(255, 0, 0); //边框线条粗线,线型,颜色 53 | border-radius:8px; //圆角弧度 54 | padding:2px 4px; //文字离边框的距离,H/L 55 | background-color: rgb(243, 246, 248); //背景颜色 56 | color: rgb(243, 246, 248); 57 | 58 | 字体颜色:color: rgb(243, 246, 248); 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /bitbug_favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whik/qt_2019_ncov/9474e808ee5095955daf12b981141b676b35805b/bitbug_favicon.ico -------------------------------------------------------------------------------- /del_obj.bat: -------------------------------------------------------------------------------- 1 | del *.o /s 2 | del *.json /s 3 | del *.user /s -------------------------------------------------------------------------------- /dialog.cpp: -------------------------------------------------------------------------------- 1 | #include "dialog.h" 2 | #include "ui_dialog.h" 3 | //#include 4 | //#include 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #include 21 | #include 22 | #include 23 | #include "qjsonvalue.h" 24 | 25 | #include 26 | 27 | #include 28 | #include 29 | 30 | Dialog::Dialog(QWidget *parent) : 31 | QDialog(parent), 32 | ui(new Ui::Dialog) 33 | { 34 | ui->setupUi(this); 35 | 36 | //右上角不显示帮助按钮 37 | setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); 38 | 39 | //属性的用法 40 | /* 41 | ui->lbe_add_confirm->setProperty("number", 1933); //不可见,仅为一个属性 42 | QVariant number = ui->lbe_add_confirm->property("number"); 43 | qDebug() << number; //QVariant(int, 1933) 44 | */ 45 | this->setWindowTitle("2019_nCoV冠状病毒感染疫情实时监控_" + verison); 46 | manager = new QNetworkAccessManager(this); //新建网络请求对象 47 | 48 | wigetAddGraph(ui->widget_chart); 49 | 50 | QTimer *timer = new QTimer(this); 51 | 52 | connect(timer, SIGNAL(timeout()), this, SLOT(update())); 53 | timer->start(1000); //ms = 1s 54 | // treeAddData(); 55 | 56 | ui->tb_news->setOpenLinks(false); 57 | connect(ui->tb_news, SIGNAL(anchorClicked(const QUrl&)), this, SLOT(anchorClickedSlot(const QUrl&))); 58 | 59 | ui->btn_group->setId(ui->btn_line_0, 0); 60 | ui->btn_group->setId(ui->btn_line_1, 1); 61 | ui->btn_group->setId(ui->btn_line_2, 2); 62 | ui->btn_group->setId(ui->btn_line_3, 3); 63 | 64 | emit on_btn_update_clicked(); 65 | } 66 | 67 | 68 | Dialog::~Dialog() 69 | { 70 | delete ui; 71 | } 72 | 73 | 74 | void Dialog::on_btn_update_clicked() 75 | { 76 | // qDebug() << isNetWorkOnline(); 77 | if(isNetWorkOnline() == true) 78 | { 79 | // ui->btn_update->setEnabled(false); 80 | /* 81 | QList list; 82 | list.clear(); 83 | list << "2020-01-15_09_00_00_000"; 84 | list << "2020-01-20_09_00_00_000"; 85 | list << "2020-01-25_09_00_00_000"; 86 | list << "2020-02-05_09_00_00_000"; 87 | list << "2020-02-10_09_00_00_000"; 88 | list << "2020-02-15_09_00_00_000"; 89 | list << "2020-02-20_09_00_00_000"; 90 | list << "2020-02-23_09_00_00_000"; 91 | static int i = 0; 92 | QDateTime dateTime = QDateTime::fromString(list[i], "yyyy-MM-dd_hh_mm_ss_zzz"); 93 | qint64 timestamp = dateTime.toMSecsSinceEpoch(); //毫秒级时间戳 94 | QString current_time = list[i]; 95 | qDebug() << list[i] << timestamp; 96 | i++; 97 | */ 98 | qint64 timestamp = QDateTime::currentDateTime().toMSecsSinceEpoch(); //毫秒级 99 | QString current_time = QDateTime::currentDateTime().toString("yyyyMMdd_hh_mm_ss_zzz"); 100 | 101 | QString timestamp_str; 102 | timestamp_str.setNum(timestamp, 10); 103 | 104 | if(selAPI == 1) 105 | selAPI = 2; 106 | else if(selAPI == 2) 107 | selAPI = 1; 108 | 109 | if(selAPI == 1) 110 | url = QUrl(data1_Api + timestamp_str); 111 | else if(selAPI == 2) 112 | url = QUrl(data2_Api + timestamp_str); 113 | 114 | // url = QUrl("https://view.inews.qq.com/g2/getOnsInfo?name=disease_h5"); 115 | //只包含全国累计数据 116 | // url = QUrl("https://ncov-api.werty.cn:2021/latest/tx/"); 117 | // qDebug() << url.toString(); 118 | qDebug() << "网络正常,开始更新疫情数据" + url.toString(); 119 | filename = "data_" +current_time + ".json"; 120 | file = new QFile(filename); 121 | 122 | if(!file->open(QIODevice::WriteOnly)) 123 | { 124 | // qDebug() << "文件打开失败"; 125 | delete file; 126 | file = 0; 127 | return; 128 | } 129 | 130 | // qDebug() << "网络正常"; 131 | reply = manager->get(QNetworkRequest(url)); //发送get请求数据 132 | //下载完成执行槽函数 133 | connect(reply,SIGNAL(finished()),this,SLOT(httpFinished())); 134 | //有可用的数据 135 | connect(reply,SIGNAL(readyRead()),this,SLOT(httpReadyRead())); 136 | } 137 | else 138 | { 139 | qDebug() << "网络错误,请检查网络"; 140 | QMessageBox::warning(NULL, "错误", "无网络连接,请检查网络", QMessageBox::Yes); 141 | } 142 | } 143 | 144 | //获取两个日期的间隔天数 145 | int Dialog::getDay(QString date) 146 | { 147 | QDate date1 = QDate::fromString(date, "yyyyMMdd"); 148 | QString current_time = QDateTime::currentDateTime().toString("yyyyMMdd"); //当前日期QString类型 149 | QDate date2 = QDate::fromString(current_time, "yyyyMMdd"); 150 | qint16 day = date1.daysTo(date2); 151 | // qDebug() << date1 << date2 << day; 152 | return day; 153 | } 154 | 155 | void Dialog::disInfo(QString info) 156 | { 157 | // ui->tb_info->append(info); 158 | } 159 | 160 | //获取两个double容器类的最大值 161 | double Dialog::getMaxVaule(QVector dub1, QVector dub2) 162 | { 163 | double max = 0; 164 | for(int i = 0; i < dub1.size(); i++) 165 | { 166 | if(max < dub1[i]) 167 | max = dub1[i]; 168 | } 169 | for(int i = 0; i < dub2.size(); i++) 170 | { 171 | if(max < dub2[i]) 172 | max = dub2[i]; 173 | } 174 | 175 | return max; 176 | } 177 | 178 | void Dialog::on_btn_about_clicked() 179 | { 180 | this->ab_win.exec(); 181 | } 182 | 183 | void Dialog::on_btn_rumor_clicked() 184 | { 185 | // this->rm_win.show(); 186 | // qDebug() << isNetWorkOnline(); 187 | if(isNetWorkOnline() == true) 188 | { 189 | this->rm_win.getRumorNews(0); //当天 190 | // this->rm_win.getRumorNews(1); //昨天 191 | // this->rm_win.getRumorNews(2); //前天 192 | this->rm_win.exec(); 193 | } 194 | else 195 | { 196 | QMessageBox::warning(NULL, "错误", "无网络连接,请检查网络", QMessageBox::Yes); 197 | } 198 | } 199 | 200 | void Dialog::on_btn_chkUpdate_clicked() 201 | { 202 | QString refUrl = "http://www.wangchaochao.top/2019/03/31/Qt-Update/"; 203 | QString refTitle = "Qt实现软件自动更新的一种简单方法"; 204 | int ret = QMessageBox::information(this, "检查更新", "更新功能暂未添加,可参考以下文章:\n" + refTitle, "去看看", "不去了"); 205 | 206 | if(ret == 0) 207 | { 208 | QDesktopServices::openUrl(QUrl(refUrl)); 209 | } 210 | } 211 | -------------------------------------------------------------------------------- /dialog.h: -------------------------------------------------------------------------------- 1 | #ifndef DIALOG_H 2 | #define DIALOG_H 3 | 4 | #include 5 | 6 | #include 7 | 8 | //网络相关头文件 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | //JSON相关头文件 19 | #include 20 | #include 21 | #include 22 | 23 | #include 24 | #include "qjsonvalue.h" 25 | 26 | #include "qcustomplot.h" 27 | #include "about.h" 28 | #include "rumor.h" 29 | #include "news_info.h" 30 | 31 | namespace Ui { 32 | class Dialog; 33 | } 34 | 35 | class Dialog : public QDialog 36 | { 37 | Q_OBJECT 38 | 39 | public: 40 | explicit Dialog(QWidget *parent = 0); 41 | ~Dialog(); 42 | bool isNetWorkOnline(); 43 | int dataParse(QByteArray str); 44 | int readFromFile(QString filename); 45 | 46 | int getNum(QJsonObject obj, int *num_confirm, int *num_suspect, int *num_dead, int *num_heal); 47 | int getDay(QString date); 48 | int getTotalAddData(QJsonObject chinaTotal, QJsonObject chinaAdd); 49 | 50 | void chinaDayListParse(QJsonArray chinaDayListObj); 51 | void chinaDayAddListParse(QJsonArray chinaDayAddListObj); 52 | void disInfo(QString info); 53 | 54 | QVector QStringToDouble(QVector str, uint16_t len); 55 | double getMaxVaule(QVector dub1, QVector dub2); 56 | //参数是double 57 | void widgetDrawLine(QCustomPlot *widget, QVector date, 58 | QVector data1Dub, QVector data2Dub); 59 | void widgetDrawLine(QCustomPlot *widget, QString chartName, QString name1, QString name2, 60 | QColor clr1, QColor clr2, QVector date, 61 | QVector data1, QVector data2); 62 | 63 | void dataAddTree(QJsonObject province_obj); 64 | void countryTreeParse(QJsonArray areaTree_obj); 65 | 66 | void disTip(QMouseEvent *event, QCustomPlot *widget, QVector date); 67 | void chinaTreeParse(QJsonObject chinaTree); 68 | void articleParse(QJsonArray arr); 69 | 70 | void wigetAddGraph(QCustomPlot *widget); 71 | void wigetSetColor(QCustomPlot *widget, QColor clr1, QColor clr2); 72 | QString rgbToStyle(QColor rbg); 73 | void setSelectStyle(int id); 74 | void parseAddSwitch(QJsonObject sw_obj); 75 | void showAddData(QString key, int num, QLabel *lbe); 76 | 77 | private slots: 78 | void on_btn_update_clicked(); 79 | void httpReadyRead(); //有可用数据 80 | void httpFinished(); //完成下载 81 | // void updateDataReadProgress(qint64 bytesRead, qint64 totalBytes); 82 | void widget_chart_event(QMouseEvent*); 83 | void update(); 84 | void anchorClickedSlot(const QUrl& url); 85 | void drawCharts(int id); 86 | 87 | void on_btn_about_clicked(); 88 | void closeEvent(QCloseEvent *win); 89 | void on_btn_rumor_clicked(); 90 | 91 | void on_btn_chkUpdate_clicked(); 92 | 93 | private: 94 | Ui::Dialog *ui; 95 | 96 | QNetworkAccessManager *manager; 97 | QNetworkReply *reply; 98 | QUrl url; 99 | QFile *file; 100 | QString filename; 101 | QString verison = "v1.2"; 102 | //腾讯,最新接口有新闻,添加了病死率和治愈率 103 | QString data1_Api = "http://view.inews.qq.com/g2/getOnsInfo?name=disease_h5&_="; //时间戳可以不添加 104 | QString data2_Api = "https://view.inews.qq.com/g2/getOnsInfo?name=disease_other&_="; //时间戳可以不添加 105 | //2020_02_10:添加最新动态新闻键值,大小116KB 106 | 107 | //网易api,目前还没新闻,和腾讯非常相似 108 | // QString dataApi = "https://c.m.163.com/ug/api/wuhan/app/data/list-total?t="; 109 | // QString newsApi = "http://api.tianapi.com/txapi/ncov/index?key=964dc226dd5b57e892e6199735b6c55f"; 110 | uint8_t selAPI = 1; 111 | bool dat1_parse_ok = true; 112 | 113 | int clickId = 0; 114 | uint8_t updateTime = 5; //默认5分钟更新一次 115 | QString newsHtmlFileName = "html_news.txt"; 116 | 117 | QColor clr1_1 = QColor(0, 93, 255); 118 | QColor clr1_2 = QColor(237, 160, 70); 119 | 120 | QColor clr2_1 = QColor(245, 60, 60); 121 | QColor clr2_2 = QColor(36, 200, 200); 122 | 123 | QColor clr3_1 = QColor(33, 144, 5); 124 | QColor clr3_2 = QColor(135, 135, 139); 125 | 126 | QColor clr4_1 = QColor(33, 144, 5); 127 | QColor clr4_2 = QColor(245, 60, 60); 128 | 129 | QVector AddDate; //新增从1.20 130 | QVector AddConfirmDub; //新增确诊 131 | QVector AddSuspectDub; //新增疑似 132 | QVector AddDeadDub; //新增死亡 133 | QVector AddHealDub; //新增治愈 134 | 135 | QVector TotalDate; //累计从1.13 136 | QVector TotalConfirmDub; //累计确诊 137 | QVector TotalSuspectDub; //累计疑似 138 | QVector TotalDeadDub; //累计死亡 139 | QVector TotalHealDub; //累计治愈 140 | 141 | QVector chinaDayListHealRate; //累计治愈率,从1.20开始 142 | QVector chinaDayListDeadRate; //累计死亡率,从1.20开始 143 | QVector RateDate; //从1.20日开始 144 | 145 | QMap AddSwitchMap; //保存键值对 146 | 147 | /* 148 | 149 | 150 | 151 | */ 152 | 153 | about ab_win; 154 | rumor rm_win; 155 | news_info newsInfo_win; 156 | }; 157 | 158 | class ncovPerson 159 | { 160 | public: 161 | int confirm; //确诊 162 | int suspect; //疑似 163 | int heal; //治愈 164 | int dead; //死亡 165 | QString deadRate; //死亡率 166 | QString healRate; //治愈率 167 | bool isUpdated; //国家数据中, 是否更新 168 | QString date; //历史数据中包含日期 169 | }; 170 | 171 | 172 | #endif // DIALOG_H 173 | -------------------------------------------------------------------------------- /img.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | my_sub.jpg 4 | new_top.jpg 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Qt 应用程序中如果使用了https网络访问,使用windeployqt打包工具是不会添加网络支持相关的库,则需要手动添加两个库文件。 3 | 4 | 1.使用Qt 5.12.4之前的版本开发的网络应用,需要添加以下两个文件: 5 | 6 | libeay32.dll 7 | ssleay32.dll 8 | 9 | 2.使用Qt 5.12.4及之后的版本开发的网络应用,需要添加以下两个文件: 10 | 11 | libssl-1_1-x64.dll 12 | libcrypto-1_1-x64.dll 13 | 14 | 查看当前openSSL版本: 15 | 16 | qDebug()< 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | Dialog w; 8 | w.show(); 9 | 10 | return a.exec(); 11 | } 12 | -------------------------------------------------------------------------------- /my_sub.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whik/qt_2019_ncov/9474e808ee5095955daf12b981141b676b35805b/my_sub.jpg -------------------------------------------------------------------------------- /network.cpp: -------------------------------------------------------------------------------- 1 | #include "dialog.h" 2 | 3 | void Dialog::update() 4 | { 5 | static uint16_t cnt = 0; 6 | cnt++; 7 | if(cnt == 60 * updateTime) //60s = 1min 8 | { 9 | qDebug() << "开始更新"; 10 | emit on_btn_update_clicked();//触发更新 11 | cnt = 0; 12 | } 13 | } 14 | bool Dialog::isNetWorkOnline() 15 | { 16 | QNetworkConfigurationManager mgr; 17 | return mgr.isOnline(); 18 | } 19 | int Dialog::readFromFile(QString filename) 20 | { 21 | // qDebug() << "开始解析数据"; 22 | // qDebug() << filename; 23 | QFile file(filename); 24 | // QFile file("20200205_12_29_53_290.json"); //string 25 | // QFile file("20200207_13_01_38_931.json"); //double 26 | if(!file.open(QIODevice::ReadOnly)) 27 | { 28 | qDebug() << "文件打开失败"; 29 | return -1; 30 | } 31 | QByteArray allData = file.readAll(); 32 | file.close(); 33 | dataParse(allData); 34 | file.remove(); //删除文件 35 | return 0; 36 | } 37 | void Dialog::httpReadyRead() //有可用数据 38 | { 39 | /* 40 | QTextStream streamFileOut(file); 41 | streamFileOut.setCodec("GBK"); 42 | streamFileOut << reply->readAll(); 43 | streamFileOut.flush(); 44 | streamFileOut.setGenerateByteOrderMark(false); 45 | */ 46 | if(file) 47 | file->write(reply->readAll()); //如果文件存在,则写入文件 48 | } 49 | void Dialog::httpFinished() //完成下载 50 | { 51 | file->flush(); 52 | file->close(); 53 | disInfo("数据下载成功"); 54 | reply->deleteLater(); 55 | reply = 0; 56 | delete file; 57 | file = 0; 58 | // QMessageBox::information(this, "提示", "下载完成"); 59 | readFromFile(filename); 60 | } 61 | -------------------------------------------------------------------------------- /new_top.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whik/qt_2019_ncov/9474e808ee5095955daf12b981141b676b35805b/new_top.jpg -------------------------------------------------------------------------------- /news_info.cpp: -------------------------------------------------------------------------------- 1 | #include "news_info.h" 2 | #include "ui_news_info.h" 3 | #include 4 | #include 5 | #include 6 | news_info::news_info(QWidget *parent) : 7 | QDialog(parent), 8 | ui(new Ui::news_info) 9 | { 10 | ui->setupUi(this); 11 | // QAxWidget *flash = new QAxWidget(0, 0); //QAxWidget使用的是ActiveX插件 12 | setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); 13 | 14 | this->setWindowTitle("新闻详情_IE"); 15 | 16 | ui->flash_newsInfo->resize(690, 570); //设置该控件的初始大小 17 | ui->flash_newsInfo->setControl(QString::fromUtf8("{8856F961-340A-11D0-A96B-00C04FD705A2}"));//注册组件ID 18 | ui->flash_newsInfo->setProperty("DisplayAlerts", false);//不显示警告信息 19 | ui->flash_newsInfo->setProperty("DisplayScrollBars", false);//显示滚动条 20 | // ui->flash_newsInfo->set 21 | 22 | // qDebug() << "ActiveX Initial"; 23 | } 24 | 25 | news_info::~news_info() 26 | { 27 | delete ui; 28 | } 29 | 30 | void news_info::openURL(QUrl url) 31 | { 32 | ui->le_url->setText(url.toString()); 33 | link = url; 34 | ui->flash_newsInfo->resize(690, 520); 35 | this->resize(690,520+80); 36 | ui->flash_newsInfo->dynamicCall("Navigate(const QString&)", link.toString());//显示网页 37 | ui->flash_newsInfo->show(); 38 | } 39 | 40 | 41 | void news_info::on_btn_refresh_clicked() 42 | { 43 | openURL(link); 44 | } 45 | 46 | void news_info::on_btn_close_clicked() 47 | { 48 | this->close(); 49 | } 50 | -------------------------------------------------------------------------------- /news_info.h: -------------------------------------------------------------------------------- 1 | #ifndef NEWS_INFO_H 2 | #define NEWS_INFO_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class news_info; 9 | } 10 | 11 | class news_info : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit news_info(QWidget *parent = 0); 17 | ~news_info(); 18 | void openURL(QUrl url); 19 | 20 | private slots: 21 | void on_btn_refresh_clicked(); 22 | 23 | void on_btn_close_clicked(); 24 | 25 | private: 26 | Ui::news_info *ui; 27 | QUrl link; 28 | }; 29 | 30 | #endif // NEWS_INFO_H 31 | -------------------------------------------------------------------------------- /news_info.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | news_info 4 | 5 | 6 | 7 | 0 8 | 0 9 | 545 10 | 657 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | false 18 | 19 | 20 | false 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 黑体 30 | 12 31 | 32 | 33 | 34 | 地址: 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 黑体 43 | 12 44 | 45 | 46 | 47 | true 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 黑体 56 | 12 57 | 58 | 59 | 60 | 刷新 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | Qt::Horizontal 75 | 76 | 77 | 78 | 40 79 | 20 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 黑体 89 | 12 90 | 91 | 92 | 93 | 返回 94 | 95 | 96 | 97 | 98 | 99 | 100 | Qt::Horizontal 101 | 102 | 103 | 104 | 40 105 | 20 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | QAxWidget 117 | QWidget 118 |
qaxwidget.h
119 |
120 |
121 | 122 | 123 |
124 | -------------------------------------------------------------------------------- /parse.cpp: -------------------------------------------------------------------------------- 1 | #include "dialog.h" 2 | #include "ui_dialog.h" 3 | 4 | //JSON数据解析 5 | int Dialog::dataParse(QByteArray str) 6 | { 7 | QJsonParseError err_rpt; 8 | QJsonDocument root_Doc = QJsonDocument::fromJson(str, &err_rpt); 9 | // qDebug() << "ok "; 10 | if(err_rpt.error != QJsonParseError::NoError) 11 | { 12 | file->remove(); 13 | emit on_btn_update_clicked(); 14 | qDebug() << "JSON格式错误"; 15 | // return -1; 16 | } 17 | // qDebug() << "JSON格式正确"; 18 | if(root_Doc.isObject()) 19 | { 20 | QJsonObject root_obj = root_Doc.object(); //创建JSON对象,不是字符串 21 | if(root_obj.contains("data")) 22 | { 23 | // qDebug() << root_obj.value("ret").toString(); 24 | 25 | QString data_str = root_obj.value("data").toString(); 26 | QJsonObject data_obj = QJsonDocument::fromJson(data_str.toUtf8(),&err_rpt).object(); 27 | if(selAPI == 1) 28 | { 29 | //获取显示开关 30 | QJsonObject AddSwitch = data_obj.value("showAddSwitch").toObject(); 31 | parseAddSwitch(AddSwitch); 32 | 33 | QJsonObject chinaTotal = data_obj.value("chinaTotal").toObject(); 34 | QJsonObject chinaAdd = data_obj.value("chinaAdd").toObject(); 35 | //获取累计数据和新增数据,并显示 36 | getTotalAddData(chinaTotal, chinaAdd); //全国累计和新增数据显示 37 | QString lastUpdateTime = data_obj.value("lastUpdateTime").toString(); 38 | ui->lbe_update_time->setText(lastUpdateTime); 39 | 40 | QJsonArray areaTree_obj = data_obj.value("areaTree").toArray(); 41 | QJsonObject chinaTree_obj = areaTree_obj.at(0).toObject(); //第0个是中国 42 | chinaTreeParse(chinaTree_obj); 43 | countryTreeParse(areaTree_obj); 44 | } 45 | /*以下数据在api2*/ 46 | else if(selAPI == 2) 47 | { 48 | QJsonArray chinaDayListObj = data_obj.value("chinaDayList").toArray(); 49 | chinaDayListParse(chinaDayListObj); 50 | 51 | QJsonArray chinaDayAddListObj = data_obj.value("chinaDayAddList").toArray(); 52 | chinaDayAddListParse(chinaDayAddListObj); 53 | 54 | QJsonArray articleArr = data_obj.value("articleList").toArray(); 55 | articleParse(articleArr); 56 | connect(ui->widget_chart, SIGNAL(mouseMove(QMouseEvent*)), this, SLOT(widget_chart_event(QMouseEvent*))); 57 | connect(ui->btn_group, SIGNAL(buttonClicked(int)), this, SLOT(drawCharts(int))); 58 | //默认绘制 59 | setSelectStyle(0); 60 | clickId = 0; //修复当点击死亡率按钮之后,再更新按钮,此时tip单位还是%的BUG 61 | widgetDrawLine(ui->widget_chart, "新增疑似/确诊趋势", "新增确诊", "新增疑似", 62 | clr1_1, clr1_2, AddDate, AddConfirmDub, AddSuspectDub); 63 | } 64 | } 65 | qDebug() << "疫情数据更新成功"; 66 | // ui->btn_update->setEnabled(true); 67 | if(selAPI == 2) 68 | emit on_btn_update_clicked(); 69 | } 70 | else 71 | qDebug() << "更新失败"; 72 | return 0; 73 | } 74 | 75 | //累计确诊/疑似/死亡/治愈 76 | void Dialog::chinaDayListParse(QJsonArray chinaDayListObj) 77 | { 78 | //累计数量从1.13开始统计 79 | // size = getDay("20200113"); 80 | 81 | uint16_t arraySize = chinaDayListObj.size(); 82 | // qDebug() << arraySize; 83 | //size设置必须放在clear之前,可省略 84 | TotalDate.clear(); 85 | TotalConfirmDub.clear(); 86 | TotalSuspectDub.clear(); 87 | TotalDeadDub.clear(); 88 | TotalHealDub.clear(); 89 | 90 | RateDate.clear(); 91 | chinaDayListHealRate.clear(); //累计治愈率,从1.20开始 92 | chinaDayListDeadRate.clear(); //累计死亡率,从1.20开始 93 | for(int i = 0; i < arraySize; i++) 94 | { 95 | QJsonObject chinaDay = chinaDayListObj.at(i).toObject(); 96 | 97 | QString date = chinaDay.value("date").toString(); 98 | double deadRate = chinaDay.value("deadRate").toString().toDouble(); 99 | double healRate = chinaDay.value("healRate").toString().toDouble(); 100 | 101 | TotalDate << date; 102 | 103 | if(i >= 7) //从1.20开始输出 104 | { 105 | chinaDayListHealRate << healRate; 106 | chinaDayListDeadRate << deadRate; 107 | RateDate << date; 108 | // qDebug() << deadRate << healRate; 109 | } 110 | 111 | double confirm = chinaDay.value("confirm").toDouble(); 112 | double suspect = chinaDay.value("suspect").toDouble(); 113 | double dead = chinaDay.value("dead").toDouble(); 114 | double heal = chinaDay.value("heal").toDouble(); 115 | 116 | TotalConfirmDub << confirm; 117 | TotalSuspectDub << suspect; 118 | TotalDeadDub << dead; 119 | TotalHealDub << heal; 120 | } 121 | } 122 | 123 | //新增确诊/疑似/死亡/治愈 124 | void Dialog::chinaDayAddListParse(QJsonArray chinaDayAddListObj) 125 | { 126 | uint16_t arraySize = chinaDayAddListObj.size(); 127 | // qDebug() << arraySize; 128 | //size设置必须放在clear之前,可省略 129 | AddDate.clear(); 130 | AddConfirmDub.clear(); 131 | AddSuspectDub.clear(); 132 | AddDeadDub.clear(); 133 | AddHealDub.clear(); 134 | 135 | for(int i = 0; i < arraySize; i++) 136 | { 137 | QJsonObject chinaDay = chinaDayAddListObj.at(i).toObject(); 138 | QString date = chinaDay.value("date").toString(); 139 | AddDate << date; 140 | 141 | double confirm = chinaDay.value("confirm").toDouble(); 142 | double suspect = chinaDay.value("suspect").toDouble(); 143 | double dead = chinaDay.value("dead").toDouble(); 144 | double heal = chinaDay.value("heal").toDouble(); 145 | 146 | AddConfirmDub << confirm; 147 | AddSuspectDub << suspect; 148 | AddDeadDub << dead; 149 | AddHealDub << heal; 150 | 151 | if(i == arraySize - 1) //新增疑似取最新的历史数据 152 | ui->lbe_add_suspect->setText("+" + QString::number(AddSuspectDub[arraySize-1])); 153 | } 154 | } 155 | //中国疫情数据解析 156 | void Dialog::chinaTreeParse(QJsonObject chinaTree) 157 | { 158 | QJsonObject chinaTotal_obj = chinaTree.value("total").toObject(); 159 | // QString chinaName = chinaTree.value("name").toString(); 160 | // QString chinaTotalConfirm = QString::number(chinaTotal_obj.value("confirm").toInt()); //28130; 161 | // QString chinaTotalSuspect = QString::number(chinaTotal_obj.value("suspect").toInt()); //0; 162 | // QString chinaTotalDead = QString::number(chinaTotal_obj.value("dead").toInt()); //564 163 | // QString chinaTotalHeal = QString::number(chinaTotal_obj.value("heal").toInt()); //1301 164 | 165 | QJsonArray provinces_obj = chinaTree.value("children").toArray(); //包含所有的省份 166 | 167 | uint16_t provinceSize = provinces_obj.size(); 168 | // qDebug() << provinceSize; //省份个数34 169 | ui->tree->clear(); 170 | ui->tree->sortByColumn(2, Qt::DescendingOrder); //累计确诊排序 171 | 172 | for(int i = 0; i < provinceSize; i++) //0-33 173 | { 174 | QJsonObject province_obj = provinces_obj.at(i).toObject(); //0:湖北省 175 | dataAddTree(province_obj); 176 | // 0 1 2 3 4 177 | //省市 新增确诊 累计确诊 累计治愈 累计死亡 178 | } 179 | } 180 | //中国疫情数据树状显示 181 | void Dialog::dataAddTree(QJsonObject province_obj) 182 | { 183 | QString provinceName = province_obj.value("name").toString(); //"湖北" 184 | //省份新增 185 | uint16_t provinceAddConfirm = province_obj.value("today").toObject().value("confirm").toDouble(); 186 | QJsonObject provinceTotal_obj = province_obj.value("total").toObject(); 187 | //省份累计 188 | uint16_t provinceTotalConfirm = provinceTotal_obj.value("confirm").toDouble(); 189 | uint16_t provinceTotalHeal = provinceTotal_obj.value("heal").toDouble(); 190 | uint16_t provinceTotalDead = provinceTotal_obj.value("dead").toDouble(); 191 | 192 | // qDebug() << provinceName << provinceAddConfirm << provinceTotalConfirm << provinceTotalHeal << provinceTotalDead << citySize; //省份下面多少个市 193 | // 0 1 2 3 4 194 | //省市 新增确诊 累计确诊 累计治愈 累计死亡 195 | QTreeWidgetItem *province = new QTreeWidgetItem(ui->tree); 196 | 197 | province->setData(0, Qt::DisplayRole, provinceName); 198 | province->setData(1, Qt::DisplayRole, provinceAddConfirm); 199 | province->setData(2, Qt::DisplayRole, provinceTotalConfirm); 200 | province->setData(3, Qt::DisplayRole, provinceTotalHeal); 201 | province->setData(4, Qt::DisplayRole, provinceTotalDead); 202 | 203 | QJsonArray citys_obj = province_obj.value("children").toArray(); //包含当前省的所有市 204 | uint16_t citySize = citys_obj.size(); //城市的个数 205 | 206 | for(int j = 0; j < citySize; j++) 207 | { 208 | QJsonObject city_obj = citys_obj.at(j).toObject(); 209 | 210 | QString cityName = city_obj.value("name").toString(); 211 | uint16_t cityAddConfirm = city_obj.value("today").toObject().value("confirm").toInt(); 212 | 213 | QJsonObject cityTotal_obj = city_obj.value("total").toObject(); 214 | uint16_t cityTotalConfirm = cityTotal_obj.value("confirm").toInt(); 215 | uint16_t cityTotalHeal = cityTotal_obj.value("heal").toInt(); 216 | uint16_t cityTotalDead = cityTotal_obj.value("dead").toInt(); 217 | 218 | QTreeWidgetItem *citys = new QTreeWidgetItem(province); 219 | 220 | citys->setData(0, Qt::DisplayRole, cityName); 221 | citys->setData(1, Qt::DisplayRole, cityAddConfirm); 222 | citys->setData(2, Qt::DisplayRole, cityTotalConfirm); 223 | citys->setData(3, Qt::DisplayRole, cityTotalHeal); 224 | citys->setData(4, Qt::DisplayRole, cityTotalDead); 225 | } 226 | } 227 | //海外疫情数据解析并显示 228 | void Dialog::countryTreeParse(QJsonArray areaTree_obj) 229 | { 230 | ui->tree_2->clear(); 231 | ui->tree_2->sortByColumn(1, Qt::DescendingOrder); //累计确诊排序 232 | uint16_t TotalConfirm = 0; 233 | uint16_t TotalDead = 0; 234 | for(int i = 1; i < areaTree_obj.size(); i++) 235 | { 236 | QJsonObject obj = areaTree_obj.at(i).toObject(); 237 | QString countryName = obj.value("name").toString(); //日本 238 | QJsonObject countryTotal_obj = obj.value("total").toObject(); 239 | uint16_t countryTotalConfirm = countryTotal_obj.value("confirm").toDouble(); 240 | uint16_t countryTotalHeal = countryTotal_obj.value("heal").toDouble(); 241 | uint16_t countryTotalDead = countryTotal_obj.value("dead").toDouble(); 242 | //0 3 2 0 243 | //国家 确诊 治愈 死亡 244 | QTreeWidgetItem *country = new QTreeWidgetItem(ui->tree_2); 245 | country->setData(0, Qt::DisplayRole, countryName); 246 | country->setData(1, Qt::DisplayRole, countryTotalConfirm); 247 | country->setData(2, Qt::DisplayRole, countryTotalHeal); 248 | country->setData(3, Qt::DisplayRole, countryTotalDead); 249 | 250 | TotalConfirm += countryTotalConfirm; 251 | TotalDead += countryTotalDead; 252 | // qDebug() << countryName << countryTotalConfirm << countryTotalHeal <lbe_countryTotal->setText(text); 256 | } 257 | 258 | int Dialog::getTotalAddData(QJsonObject chinaTotal, QJsonObject chinaAdd) 259 | { 260 | if(!chinaTotal.isEmpty() && !chinaAdd.isEmpty()) 261 | { 262 | int chinaTotal_confirm, chinaTotal_suspect, chinaTotal_dead, chinaTotal_heal; 263 | int chinaAdd_confirm, chinaAdd_suspect, chinaAdd_dead, chinaAdd_heal; 264 | 265 | getNum(chinaAdd, &chinaAdd_confirm, &chinaAdd_suspect, &chinaAdd_dead, &chinaAdd_heal); 266 | getNum(chinaTotal, &chinaTotal_confirm, &chinaTotal_suspect, &chinaTotal_dead, &chinaTotal_heal); 267 | //显示累计数据 268 | ui->lbe_total_confirm->setText(QString::number(chinaTotal_confirm)); 269 | ui->lbe_total_suspect->setText(QString::number(chinaTotal_suspect)); 270 | ui->lbe_total_dead->setText(QString::number(chinaTotal_dead)); 271 | ui->lbe_total_heal->setText(QString::number(chinaTotal_heal)); 272 | 273 | int total_nowConfirm = chinaTotal.value("nowConfirm").toDouble(); //现有确诊 274 | int total_nowSevere = chinaTotal.value("nowSevere").toDouble(); //现有重症 275 | 276 | ui->lbe_total_nowConfirm->setText(QString::number(total_nowConfirm)); 277 | ui->lbe_total_nowSevere->setText(QString::number(total_nowSevere)); 278 | 279 | //显示新增 280 | int chinaAdd_nowConfirm = chinaAdd.value("nowConfirm").toDouble(); 281 | int chinaAdd_nowServere = chinaAdd.value("nowSevere").toDouble(); 282 | 283 | showAddData("confirm", chinaAdd_confirm, ui->lbe_add_confirm); 284 | // showAddData("suspect", chinaAdd_suspect, ui->lbe_add_suspect); 285 | showAddData("dead", chinaAdd_dead, ui->lbe_add_dead); 286 | showAddData("heal", chinaAdd_heal, ui->lbe_add_heal); 287 | showAddData("nowConfirm", chinaAdd_nowConfirm, ui->lbe_add_nowConfirm); 288 | showAddData("nowServere", chinaAdd_nowServere, ui->lbe_add_nowSevere); 289 | 290 | QString tip = "较上日国家卫健委公布的现有疑似病例数" + QString::number(chinaAdd_suspect); 291 | 292 | ui->lbe_suspect->setToolTip(tip); 293 | 294 | return 0; 295 | } 296 | else 297 | return -1; 298 | } 299 | 300 | void Dialog::articleParse(QJsonArray arr) 301 | { 302 | uint16_t arrSize = arr.size(); 303 | // qDebug() << "共 " << arrSize << " 条新闻"; 304 | // qDebug() << QCoreApplication::applicationDirPath(); 305 | // qDebug() << QCoreApplication::applicationFilePath(); 306 | // qDebug() << QCoreApplication::applicationName(); 307 | 308 | // QString tmp = newsHtmlFileName; 309 | QString tmp = QCoreApplication::applicationDirPath() + "/" + newsHtmlFileName; 310 | QFile file(tmp); 311 | 312 | if(!file.open(QIODevice::ReadOnly)) 313 | { 314 | qDebug() << "文件打开失败"; 315 | } 316 | // qDebug() << "file open ok"; 317 | QByteArray allData = file.readAll(); 318 | file.close(); 319 | QList ba; 320 | 321 | // ba = allData.split(""); 322 | ba = allData.split('*'); 323 | // qDebug() << ba.size(); 324 | QString html; 325 | for(int i = 0; i < arrSize; i++) 326 | { 327 | QJsonObject article_obj = arr.at(i).toObject();//每一篇文件信息 328 | // QString cmsId = article_obj.value("cmsId").toString(); 329 | QString media = article_obj.value("media").toString(); 330 | QString publish_time = article_obj.value("publish_time").toString(); 331 | QString desc = article_obj.value("desc").toString(); 332 | QString url = article_obj.value("url").toString(); 333 | QString title = article_obj.value("title").toString(); 334 | QString str = ba[0] + title + ba[1] + desc + ba[2] + url + ba[3] + media + ba[4] + publish_time + ba[5]; 335 | html.append(str); 336 | // if(i == 0) 337 | // qDebug() << html; 338 | 339 | // qDebug() << publish_time << media << title << url; 340 | } 341 | html.append(ba[6]); 342 | // qDebug() << html; 343 | ui->tb_news->clear(); 344 | ui->tb_news->setHtml(html); 345 | // qDebug() << "set Html ok"; 346 | } 347 | //获取人数 348 | int Dialog::getNum(QJsonObject obj, int *num_confirm, int *num_suspect, int *num_dead, int *num_heal) 349 | { 350 | if(!obj.isEmpty()) 351 | { 352 | *num_confirm = obj.value("confirm").toDouble(); 353 | *num_suspect = obj.value("suspect").toDouble(); 354 | *num_dead = obj.value("dead").toDouble(); 355 | *num_heal = obj.value("heal").toDouble(); 356 | 357 | return 0; 358 | } 359 | else 360 | return -1; 361 | } 362 | //容器类转换:QString转换为double 363 | QVector Dialog::QStringToDouble(QVector str, uint16_t len) 364 | { 365 | QVector dub(len); 366 | 367 | for(int i = 0; i < str.size(); i++) 368 | { 369 | dub[i] = str[i].toDouble(); 370 | } 371 | return dub; 372 | } 373 | 374 | //显示新增数据 375 | void Dialog::showAddData(QString key, int num, QLabel *lbe) 376 | { 377 | QString str_num; 378 | if(num > 0) 379 | str_num = "+" + QString::number(num); 380 | else 381 | str_num = QString::number(num); 382 | 383 | bool sw = AddSwitchMap.value(key); 384 | 385 | QString str = (sw) ? str_num : "待公布"; 386 | 387 | lbe->setText(str); 388 | } 389 | 390 | void Dialog::parseAddSwitch(QJsonObject sw_obj) 391 | { 392 | bool sw_all = sw_obj.value("all").toBool(); 393 | bool sw_confirm = sw_obj.value("confirm").toBool(); 394 | bool sw_suspect = sw_obj.value("suspect").toBool(); 395 | bool sw_dead = sw_obj.value("dead").toBool(); 396 | bool sw_heal = sw_obj.value("heal").toBool(); 397 | bool sw_nowConfirm = sw_obj.value("nowConfirm").toBool(); 398 | bool sw_nowSevere = sw_obj.value("nowSevere").toBool(); 399 | 400 | AddSwitchMap.clear(); 401 | AddSwitchMap.insert("all", sw_all); 402 | AddSwitchMap.insert("confirm", sw_confirm); 403 | AddSwitchMap.insert("suspect", sw_suspect); 404 | AddSwitchMap.insert("dead", sw_dead); 405 | AddSwitchMap.insert("heal", sw_heal); 406 | AddSwitchMap.insert("nowConfirm", sw_nowConfirm); 407 | AddSwitchMap.insert("nowServere", sw_nowSevere); 408 | 409 | // AddSwitchMap["all"] = false; //用于赋值 410 | // if(AddSwitchMap.contains("all")); //用于查询,是否包含 411 | // bool val = AddSwitchMap.value("all"); //用于获取值 412 | 413 | } 414 | -------------------------------------------------------------------------------- /plot.cpp: -------------------------------------------------------------------------------- 1 | #include "dialog.h" 2 | #include "ui_dialog.h" 3 | 4 | //添加2条曲线 5 | void Dialog::wigetAddGraph(QCustomPlot *widget) 6 | { 7 | widget->addGraph(); 8 | widget->graph(0)->setLineStyle(QCPGraph::lsLine); 9 | widget->graph(0)->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssDisc, 5)); 10 | 11 | widget->addGraph(); 12 | widget->graph(1)->setLineStyle(QCPGraph::lsLine); 13 | widget->graph(1)->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssDisc, 5)); 14 | 15 | widget->xAxis->setSubTicks(false); //小格刻度不显示 16 | widget->xAxis->setTickPen(QPen(Qt::white)); 17 | widget->xAxis->setTickLabelFont(QFont(QFont().family(), 8)); //字体和大小 18 | widget->xAxis->setTickLabelRotation(150); //标签旋转角度 19 | 20 | // widget->xAxis->rescale(true); //刻度自适应,默认省略 21 | } 22 | 23 | //设置曲线颜色 24 | void Dialog::wigetSetColor(QCustomPlot *widget, QColor clr1, QColor clr2) 25 | { 26 | widget->yAxis->setTickPen(QPen(Qt::white)); 27 | widget->yAxis->setSubTickPen(QPen(Qt::white)); 28 | widget->yAxis->setTickLabelFont(QFont(QFont().family(), 8)); 29 | // widget->yAxis->rescale(true); //刻度自适应,默认省略 30 | 31 | widget->graph(0)->setPen(QPen(clr1)); //QColor(255, 100, 0) 32 | widget->graph(1)->setPen(QPen(clr2)); //QColor(50, 200, 0) 33 | } 34 | 35 | //用于在一个画布上绘制 36 | void Dialog::widgetDrawLine(QCustomPlot *widget, QString chartName, QString name1, QString name2, 37 | QColor clr1, QColor clr2, QVector date, 38 | QVector data1, QVector data2) 39 | { 40 | ui->lbe_chart_name->setText(chartName); 41 | //图例名字 42 | ui->lbe_chart_line1_name->setText(name1); 43 | ui->lbe_chart_line2_name->setText(name2); 44 | //图例颜色设置 45 | QString style1 = ui->lbe_chart_line1_clr->styleSheet(); 46 | QString style2 = ui->lbe_chart_line2_clr->styleSheet(); 47 | 48 | style1.append(rgbToStyle(clr1)); 49 | style2.append(rgbToStyle(clr2)); 50 | 51 | ui->lbe_chart_line1_clr->setStyleSheet(style1); 52 | ui->lbe_chart_line2_clr->setStyleSheet(style2); 53 | 54 | widget->graph(0)->setName(name1); //设置曲线名字 55 | widget->graph(1)->setName(name2); //设置曲线名字 56 | 57 | widget->graph(0)->setPen(QPen(clr1)); //QColor(255, 100, 0) 58 | widget->graph(1)->setPen(QPen(clr2)); //QColor(50, 200, 0) 59 | 60 | double maxValue = getMaxVaule(data1, data2); 61 | uint16_t dataSize = data1.size(); 62 | 63 | QVector ticks; 64 | for(int i = 0; i < dataSize; i++) 65 | ticks << i; //tick:0 1 2 3 4 5 6 66 | 67 | QSharedPointer textTicker(new QCPAxisTickerText); 68 | 69 | for(int i = 0; i < dataSize; i++) 70 | { 71 | if(i % 2 == 0) //偶数 72 | textTicker->addTick(i, date.at(i)); //tick和标签对应 73 | else 74 | textTicker->addTick(i, " "); 75 | } 76 | 77 | // textTicker->addTicks(ticks, date); //每一个都显示 78 | 79 | widget->xAxis->setTicker(textTicker); //x轴为文本标签 80 | widget->xAxis->setTickLabelRotation(60); //标签旋转角度 81 | 82 | widget->xAxis->setRange(0, dataSize); 83 | if(clickId == 3) 84 | { 85 | widget->yAxis->setRange(0, maxValue + 2); 86 | } 87 | else 88 | widget->yAxis->setRange(0, maxValue + maxValue/20); 89 | 90 | widget->graph(0)->setData(ticks, data1);//曲线0添加数据新增确诊人数 91 | widget->graph(1)->setData(ticks, data2);//曲线1添加数据新增疑似人数 92 | 93 | widget->replot(); 94 | } 95 | 96 | QString Dialog::rgbToStyle(QColor rbg) 97 | { 98 | QString r_str = QString::number(rbg.red()) + ", "; 99 | QString g_str = QString::number(rbg.green()) + ", "; 100 | QString b_str = QString::number(rbg.blue()) + "); "; 101 | 102 | QString style = "background-color: rgb(" + r_str + g_str + b_str; 103 | // qDebug() << style; 104 | return style; 105 | } 106 | 107 | //画折线图,数据类型是double 108 | void Dialog::widgetDrawLine(QCustomPlot *widget, QVector date, 109 | QVector data1Dub, QVector data2Dub) 110 | { 111 | uint16_t dataSize = date.size(); 112 | // qDebug() << dataSize; 113 | double maxValue = getMaxVaule(data1Dub, data2Dub);; 114 | 115 | QVector ticks; 116 | for(int i = 0; i < dataSize; i++) 117 | ticks << i; //tick:0 1 2 3 4 5 6 118 | 119 | QSharedPointer textTicker(new QCPAxisTickerText); 120 | 121 | for(int i = 0; i < dataSize; i++) 122 | { 123 | if(i % 2 == 0) //偶数 124 | textTicker->addTick(i, date.at(i)); //tick和标签对应 125 | else 126 | textTicker->addTick(i, " "); 127 | } 128 | 129 | // textTicker->addTicks(ticks, date); //每一个都显示 130 | 131 | widget->xAxis->setTicker(textTicker); //x轴为文本标签 132 | widget->xAxis->setTickLabelRotation(60); //标签旋转角度 133 | 134 | widget->xAxis->setRange(0, dataSize); 135 | widget->yAxis->setRange(0, maxValue + maxValue/20); 136 | 137 | widget->graph(0)->setData(ticks, data1Dub);//曲线0添加数据新增确诊人数 138 | widget->graph(1)->setData(ticks, data2Dub);//曲线1添加数据新增疑似人数 139 | widget->replot(); 140 | } 141 | -------------------------------------------------------------------------------- /qt_2019_ncov.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2020-02-05T11:16:34 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | 9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 10 | 11 | TARGET = qt_2019_ncov 12 | TEMPLATE = app 13 | 14 | # The following define makes your compiler emit warnings if you use 15 | # any feature of Qt which as been marked as deprecated (the exact warnings 16 | # depend on your compiler). Please consult the documentation of the 17 | # deprecated API in order to know how to port your code away from it. 18 | DEFINES += QT_DEPRECATED_WARNINGS 19 | 20 | # You can also make your code fail to compile if you use deprecated APIs. 21 | # In order to do so, uncomment the following line. 22 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 23 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 24 | 25 | 26 | SOURCES += main.cpp\ 27 | dialog.cpp \ 28 | qcustomplot.cpp \ 29 | parse.cpp \ 30 | network.cpp \ 31 | plot.cpp \ 32 | slots.cpp \ 33 | about.cpp \ 34 | rumor.cpp \ 35 | rumor_info.cpp \ 36 | news_info.cpp 37 | 38 | HEADERS += dialog.h \ 39 | qcustomplot.h \ 40 | about.h \ 41 | rumor.h \ 42 | rumor_info.h \ 43 | news_info.h 44 | 45 | FORMS += dialog.ui \ 46 | about.ui \ 47 | rumor.ui \ 48 | rumor_info.ui \ 49 | news_info.ui 50 | 51 | 52 | QT += network 53 | QT += printsupport 54 | QT += axcontainer 55 | 56 | RESOURCES += \ 57 | img.qrc 58 | 59 | #运行文件附带调试输出窗口 60 | #CONFIG += console pro 61 | 62 | # 程序版本 63 | #VERSION = 2018.7.25 64 | 65 | # 添加图标 66 | RC_ICONS = bitbug_favicon.ico 67 | #VERSION = 1.0.0.0 //设置程序版本号,可省略 68 | 69 | #CONFIG -= debug_and_release 70 | -------------------------------------------------------------------------------- /rumor.cpp: -------------------------------------------------------------------------------- 1 | #include "rumor.h" 2 | #include "ui_rumor.h" 3 | //#include "windows.h" 4 | #include 5 | 6 | rumor::rumor(QWidget *parent) : 7 | QDialog(parent), 8 | ui(new Ui::rumor) 9 | { 10 | ui->setupUi(this); 11 | 12 | setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); 13 | this->setWindowTitle("辟谣信息"); 14 | ui->tb_rumor->setOpenLinks(false); 15 | // ui->tb_rumor->setOpenLinks(true); 16 | connect(ui->tb_rumor, SIGNAL(anchorClicked(const QUrl&)), this, SLOT(anchorClickedSlot(const QUrl&))); 17 | manager = new QNetworkAccessManager(this); //新建网络请求对象 18 | } 19 | 20 | rumor::~rumor() 21 | { 22 | delete ui; 23 | } 24 | 25 | void rumor::anchorClickedSlot(const QUrl& url) 26 | { 27 | // qDebug() << url; 28 | QString url_str = url.toString(); 29 | 30 | if(url_str == "https://vp.fact.qq.com/home") 31 | { 32 | QDesktopServices::openUrl(url); 33 | } 34 | else 35 | { 36 | QNetworkConfigurationManager mgr; 37 | if(mgr.isOnline() == true) 38 | { 39 | QList list = url_str.split('='); 40 | info.getRumorInfo(list[1]); 41 | info.exec(); 42 | } 43 | else 44 | QMessageBox::warning(NULL, "错误", "无网络连接,请检查网络", QMessageBox::Yes); 45 | } 46 | } 47 | void rumor::httpReadyRead() //有可用数据 48 | { 49 | if(file) 50 | file->write(reply->readAll()); //如果文件存在,则写入文件 51 | } 52 | void rumor::httpFinished() //完成下载 53 | { 54 | file->flush(); 55 | file->close(); 56 | // qDebug() << "rumor数据下载成功"; 57 | reply->deleteLater(); 58 | reply = 0; 59 | delete file; 60 | file = 0; 61 | // QMessageBox::information(this, "提示", "下载完成"); 62 | parseRumor(filename); 63 | } 64 | 65 | void rumor::parseRumor(QString filename) 66 | { 67 | // qDebug() << "开始解析rumor数据:" << filename; 68 | QFile file(filename); 69 | if(!file.open(QIODevice::ReadOnly)) 70 | { 71 | qDebug() << "rumor文件打开失败"; 72 | } 73 | QByteArray allData = file.readAll(); 74 | file.close(); 75 | file.remove(); //删除文件 76 | 77 | QJsonParseError err_rpt; 78 | QJsonDocument root_Doc = QJsonDocument::fromJson(allData, &err_rpt); 79 | 80 | if(err_rpt.error != QJsonParseError::NoError) 81 | { 82 | file.remove(); 83 | qDebug() << "JSON格式错误"; 84 | // return -1; 85 | } 86 | // qDebug() << "JSON格式正确"; 87 | if(root_Doc.isObject()) 88 | { 89 | QJsonObject root_obj = root_Doc.object(); 90 | // QString code = root_obj.value("code").toString(); //0 91 | QJsonArray content_arr = root_obj.value("content").toArray(); 92 | disRumorNews(content_arr); 93 | } 94 | } 95 | 96 | void rumor::getRumorNews(uint8_t page) //获取几页 97 | { 98 | // uint8_t page = 0; 99 | 100 | // ui->tb_rumor->clear(); 101 | // html.clear(); 102 | 103 | // for(int i = 0; i < num; i++) 104 | // { 105 | QNetworkConfigurationManager mgr; 106 | if(mgr.isOnline() == true) 107 | { 108 | qint64 timestamp = QDateTime::currentDateTime().toMSecsSinceEpoch(); //毫秒级 109 | QString timestamp_str; 110 | timestamp_str.setNum(timestamp, 10); //十进制时间戳15555550001 111 | QString current_time = QDateTime::currentDateTime().toString("yyyyMMdd_hh_mm_ss_zzz"); 112 | QString pageStr = QString::number(page); 113 | url = QUrl(rumorApi + pageStr); 114 | // qDebug() << url.toString(); 115 | qDebug() << "网络正常,开始更新辟谣信息" + url.toString(); 116 | 117 | filename = "rumorNews_" + pageStr + "_" + current_time + ".json"; 118 | file = new QFile(filename); 119 | 120 | if(!file->open(QIODevice::WriteOnly)) 121 | { 122 | qDebug() << "rumor文件打开失败"; 123 | delete file; 124 | file = 0; 125 | return; 126 | } 127 | 128 | // qDebug() << "rumorApi网络正常"; 129 | reply = manager->get(QNetworkRequest(url)); //发送get请求数据 130 | //下载完成执行槽函数 131 | connect(reply,SIGNAL(finished()),this,SLOT(httpFinished())); 132 | //有可用的数据 133 | connect(reply,SIGNAL(readyRead()),this,SLOT(httpReadyRead())); 134 | } 135 | else 136 | { 137 | qDebug() << "rumorApi网络错误,请检查网络"; 138 | QMessageBox::warning(NULL, "错误", "无网络连接,请检查网络", QMessageBox::Yes); 139 | } 140 | } 141 | 142 | //假,谣言,url,"谣言标题", 腾讯医典, id 143 | 144 | void rumor::disRumorNews(QJsonArray content_arr) 145 | { 146 | QString tmp = QCoreApplication::applicationDirPath() + "/" + rumorHtmlFileName; 147 | 148 | QFile file(tmp); 149 | 150 | if(!file.open(QIODevice::ReadOnly)) 151 | { 152 | qDebug() << "rumor文件打开失败"; 153 | } 154 | QByteArray allData = file.readAll(); 155 | QList ba; 156 | 157 | file.close(); 158 | ba = allData.split('*'); 159 | 160 | // qDebug() << ba.size(); 161 | 162 | QString html; 163 | uint8_t arrSize = content_arr.size(); 164 | for(int i = 0; i < arrSize; i++) 165 | { 166 | QJsonObject rumor_obj = content_arr.at(i).toObject(); 167 | QString date = rumor_obj.value("date").toString(); //"2020-02-12" 168 | QString result = rumor_obj.value("result").toString(); //"假" 169 | // QString markstyle = rumor_obj.value("markstyle").toString(); //"fake" 170 | QString explain = rumor_obj.value("explain").toString(); //"谣言" 171 | QString title = rumor_obj.value("title").toString(); //"拔头两侧的白发可以防治新型冠状病毒肺炎" 172 | QString author = rumor_obj.value("author").toString(); //"腾讯旗下专业医学科普平台" 173 | QString id = rumor_obj.value("id").toString(); //"fdfb9439ecf2a5113791a46252764ece" 174 | QString bgmClr; 175 | if(result == "假") //假 176 | bgmClr = bgmClr_fake; 177 | else if(result == "真") //真 178 | bgmClr = bgmClr_true; 179 | else //疑 180 | bgmClr = bgmClr_doubt; 181 | // QString url = rumorUrl + id; 182 | QString head = "[" + result + "]" + explain; 183 | QString from = date + " " + author; 184 | QString str = ba[0] + bgmClr + ba[1] + head+ ba[2] + id + ba[3] + title + ba[4] + from + ba[5]; 185 | html.append(str); 186 | 187 | // qDebug() << date << result << markstyle << explain << title; 188 | } 189 | html.append(ba[6]); 190 | // qDebug() << html; 191 | ui->tb_rumor->clear(); 192 | ui->tb_rumor->setHtml(html); 193 | qDebug() << "辟谣信息更新成功"; 194 | } 195 | -------------------------------------------------------------------------------- /rumor.h: -------------------------------------------------------------------------------- 1 | #ifndef RUMOR_H 2 | #define RUMOR_H 3 | 4 | #include 5 | 6 | #include 7 | //网络相关头文件 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | 15 | //JSON相关头文件 16 | #include 17 | #include 18 | #include 19 | 20 | #include "rumor_info.h" 21 | #include "news_info.h" 22 | 23 | namespace Ui { 24 | class rumor; 25 | } 26 | 27 | class rumor : public QDialog 28 | { 29 | Q_OBJECT 30 | 31 | public: 32 | explicit rumor(QWidget *parent = 0); 33 | ~rumor(); 34 | void getRumorNews(uint8_t page); 35 | void parseRumor(QString filename); 36 | void disRumorNews(QJsonArray content_arr); 37 | 38 | private slots: 39 | void anchorClickedSlot(const QUrl& url); 40 | void httpReadyRead(); //有可用数据 41 | void httpFinished(); //完成下载 42 | 43 | private: 44 | Ui::rumor *ui; 45 | // QString rumorApi = "https://vp.fact.qq.com/loadmore?page=0&_=1581341095686"; 46 | QString rumorApi = "https://vp.fact.qq.com/loadmore?page="; 47 | QString rumorUrl = "https://vp.fact.qq.com/article?id="; 48 | uint8_t rumorPage = 0; 49 | 50 | QString bgmClr_true = "42a163"; 51 | QString bgmClr_fake = "c41f20"; 52 | QString bgmClr_doubt = "484848"; 53 | 54 | QString rumorHtmlFileName = "html_rumor.txt"; 55 | 56 | QNetworkAccessManager *manager; 57 | QNetworkReply *reply; 58 | QUrl url; 59 | QFile *file; 60 | QString filename; 61 | // QString html; 62 | rumor_info info; 63 | news_info moreRumor; 64 | }; 65 | 66 | #endif // RUMOR_H 67 | -------------------------------------------------------------------------------- /rumor.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | rumor 4 | 5 | 6 | 7 | 0 8 | 0 9 | 664 10 | 433 11 | 12 | 13 | 14 | 15 | Ubuntu 16 | 17 | 18 | 19 | Dialog 20 | 21 | 22 | 23 | 24 | 25 | 26 | 微软雅黑 27 | 28 | 29 | 30 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 31 | <html><head><meta name="qrichtext" content="1" /><title>CanvasLayer</title><style type="text/css"> 32 | p, li { white-space: pre-wrap; } 33 | </style></head><body style=" font-family:'微软雅黑'; font-size:9pt; font-weight:400; font-style:normal;"> 34 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /rumor_info.cpp: -------------------------------------------------------------------------------- 1 | #include "rumor_info.h" 2 | #include "ui_rumor_info.h" 3 | #include 4 | 5 | rumor_info::rumor_info(QWidget *parent) : 6 | QDialog(parent), 7 | ui(new Ui::rumor_info) 8 | { 9 | ui->setupUi(this); 10 | manager = new QNetworkAccessManager(this); //新建网络请求对象 11 | 12 | setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); 13 | this->setWindowTitle("较真查证"); 14 | } 15 | 16 | rumor_info::~rumor_info() 17 | { 18 | delete ui; 19 | } 20 | 21 | void rumor_info::httpReadyRead() //有可用数据 22 | { 23 | if(file) 24 | file->write(reply->readAll()); //如果文件存在,则写入文件 25 | } 26 | void rumor_info::httpFinished() //完成下载 27 | { 28 | file->flush(); 29 | file->close(); 30 | // qDebug() << "rumor数据下载成功"; 31 | reply->deleteLater(); 32 | reply = 0; 33 | delete file; 34 | file = 0; 35 | // QMessageBox::information(this, "提示", "下载完成"); 36 | paraseRumorInfo(filename); 37 | 38 | } 39 | 40 | void rumor_info::paraseRumorInfo(QString filename) 41 | { 42 | // qDebug() << "开始解析rumorInfo数据:" << filename; 43 | QFile file(filename); 44 | if(!file.open(QIODevice::ReadOnly)) 45 | { 46 | qDebug() << "rumorInfo文件打开失败"; 47 | } 48 | QByteArray allData = file.readAll(); 49 | file.close(); 50 | file.remove(); //删除文件 51 | 52 | QJsonParseError err_rpt; 53 | QJsonDocument root_Doc = QJsonDocument::fromJson(allData, &err_rpt); 54 | 55 | if(err_rpt.error != QJsonParseError::NoError) 56 | { 57 | // file.remove(); 58 | qDebug() << "JSON格式错误"; 59 | // return -1; 60 | } 61 | // qDebug() << "JSON格式正确"; 62 | if(root_Doc.isObject()) 63 | { 64 | QJsonObject root_obj = root_Doc.object(); 65 | // QString code = root_obj.value("code").toString(); //0 66 | QJsonObject content_obj = root_obj.value("content").toObject(); 67 | disRumorInfo(content_obj); 68 | } 69 | } 70 | 71 | void rumor_info::disRumorInfo(QJsonObject content_obj) 72 | { 73 | ui->tb_rumor_info->clear(); 74 | QString tmp = QCoreApplication::applicationDirPath() + "/" + rumorInfoHtmlFileName; 75 | 76 | QFile file(tmp); 77 | if(!file.open(QIODevice::ReadOnly)) 78 | { 79 | qDebug() << "rumor文件打开失败"; 80 | } 81 | QByteArray allData = file.readAll(); 82 | QList ba; 83 | file.close(); 84 | 85 | ba = allData.split('*'); 86 | // qDebug() << ba.size(); 87 | 88 | QString bgmClr; 89 | QString html; 90 | 91 | QString title = content_obj.value("title").toString(); 92 | html.append(ba[0]); 93 | html.append(title); 94 | 95 | QString rumor = content_obj.value("rumor").toString(); //说法 96 | html.append(ba[1]); 97 | html.append(rumor); 98 | 99 | QString result = content_obj.value("result").toString(); //疑 100 | if(result == "假") //假 101 | bgmClr = bgmClr_fake; 102 | else if(result == "真") //真 103 | bgmClr = bgmClr_true; 104 | else //疑 105 | bgmClr = bgmClr_doubt; 106 | 107 | html.append(ba[2]); 108 | html.append(bgmClr); 109 | 110 | html.append(ba[3]); 111 | html.append(result); 112 | 113 | QString explain = content_obj.value("explain").toString(); //有失实 114 | html.append(ba[4]); 115 | html.append(explain); 116 | 117 | QJsonArray abstract_arr = content_obj.value("abstract").toArray(); 118 | uint8_t arrSize = abstract_arr.size(); 119 | for(int i = 0; i < arrSize; i++) 120 | { 121 | QString index = QString::number(abstract_arr.at(i).toObject().value("index").toInt()); 122 | QString content = abstract_arr.at(i).toObject().value("content").toString(); 123 | html.append(ba[6]); 124 | html.append(index); 125 | html.append(ba[7]); 126 | html.append(content); 127 | html.append(ba[8]); 128 | } 129 | 130 | QJsonObject Author = content_obj.value("Author").toObject(); 131 | QString name = Author.value("name").toString(); //谢望时 132 | QString desc = Author.value("desc").toString(); 133 | html.append(ba[9]); 134 | html.append(name); 135 | html.append(ba[10]); 136 | html.append(desc); 137 | 138 | // QString markstyle = content_obj.value("doubt").toString(); 139 | 140 | QString date = content_obj.value("date").toString(); //2020-02-13 141 | html.append(ba[11]); 142 | html.append(date); 143 | QString source = content_obj.value("source").toString(); 144 | html.append(ba[12]); 145 | html.append(source); 146 | html.append(ba[13]); 147 | 148 | // QString head = "[" + result + "]" + explain; 149 | 150 | ui->tb_rumor_info->setHtml(html); 151 | qDebug() << "辟谣详细信息解析成功"; 152 | } 153 | 154 | void rumor_info::getRumorInfo(QString rumor_id) 155 | { 156 | QNetworkConfigurationManager mgr; 157 | if(mgr.isOnline() == true) 158 | { 159 | qint64 timestamp = QDateTime::currentDateTime().toMSecsSinceEpoch(); //毫秒级 160 | QString timestamp_str; 161 | timestamp_str.setNum(timestamp, 10); //十进制时间戳15555550001 162 | QString current_time = QDateTime::currentDateTime().toString("yyyyMMdd_hh_mm_ss_zzz"); 163 | 164 | url = QUrl(rumor_infoApi + rumor_id); 165 | qDebug() << "网络正常,开始获取辟谣详细信息" + url.toString(); 166 | // qDebug() << url.toString(); 167 | 168 | filename = "rumorInfo_" + current_time + ".json"; 169 | file = new QFile(filename); 170 | 171 | if(!file->open(QIODevice::WriteOnly)) 172 | { 173 | qDebug() << "rumorInfo文件打开失败"; 174 | delete file; 175 | file = 0; 176 | return; 177 | } 178 | 179 | // qDebug() << "rumorInfoApi网络正常"; 180 | reply = manager->get(QNetworkRequest(url)); //发送get请求数据 181 | //下载完成执行槽函数 182 | connect(reply,SIGNAL(readyRead()),this,SLOT(httpReadyRead())); 183 | //有可用的数据 184 | connect(reply,SIGNAL(finished()),this,SLOT(httpFinished())); 185 | } 186 | else 187 | { 188 | qDebug() << "rumorInfoApi网络错误,请检查网络"; 189 | QMessageBox::warning(NULL, "错误", "无网络连接,请检查网络", QMessageBox::Yes); 190 | } 191 | } 192 | 193 | 194 | void rumor_info::on_btn_back_clicked() 195 | { 196 | this->close(); 197 | } 198 | -------------------------------------------------------------------------------- /rumor_info.h: -------------------------------------------------------------------------------- 1 | #ifndef RUMOR_INFO_H 2 | #define RUMOR_INFO_H 3 | 4 | #include 5 | //网络相关头文件 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | //JSON相关头文件 12 | #include 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | namespace Ui { 19 | class rumor_info; 20 | } 21 | 22 | class rumor_info : public QDialog 23 | { 24 | Q_OBJECT 25 | 26 | public: 27 | explicit rumor_info(QWidget *parent = 0); 28 | ~rumor_info(); 29 | void paraseRumorInfo(QString filename); 30 | void getRumorInfo(QString rumor_id); 31 | QString bgmClr_true = "42a163"; 32 | QString bgmClr_fake = "c41f20"; 33 | QString bgmClr_doubt = "484848"; 34 | void disRumorInfo(QJsonObject content_obj); 35 | 36 | private slots: 37 | void httpReadyRead(); //有可用数据 38 | void httpFinished(); //完成下载 39 | 40 | void on_btn_back_clicked(); 41 | 42 | private: 43 | Ui::rumor_info *ui; 44 | 45 | QNetworkAccessManager *manager; 46 | QNetworkReply *reply; 47 | QUrl url; 48 | QFile *file; 49 | QString filename; 50 | QString rumor_infoApi = "https://vp.fact.qq.com/miniArtData?id="; 51 | QString rumorInfoHtmlFileName = "html_rumor_info.txt"; 52 | 53 | }; 54 | 55 | #endif // RUMOR_INFO_H 56 | -------------------------------------------------------------------------------- /rumor_info.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | rumor_info 4 | 5 | 6 | 7 | 0 8 | 0 9 | 634 10 | 345 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 21 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 22 | p, li { white-space: pre-wrap; } 23 | </style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> 24 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'微软雅黑'; font-size:16pt; font-weight:600;">天气暖和从南方回归北方的鸟会带回病毒,感染人类</span></p> 25 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'微软雅黑'; font-size:6pt; font-weight:600;"> </span></p> 26 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'微软雅黑'; font-size:14pt; color:#555753;">&quot;流传说法:天气回暖,从南方飞回北方的鸟经过疫区会带回病毒,感染人类。&quot;</span></p> 27 | <hr /> 28 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'微软雅黑'; font-size:14pt; font-weight:600;">较真鉴定:</span><span style=" font-family:'微软雅黑'; font-size:14pt; color:#ffffff; background-color:#484848;"> [疑]有失实 </span></p> 29 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:7pt;"> </span></p> 30 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'微软雅黑'; font-size:14pt; font-weight:600; color:#000000;">查证要点:</span></p> 31 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'微软雅黑'; font-size:15pt; color:#ffffff; background-color:#333333;"> 1 </span><span style=" font-family:'微软雅黑'; font-size:14pt; color:#000000;"> 冠状病毒是一类主要引起呼吸道、肠道疾病的病原体。除了可感染人类,还可感染猪、牛、猫、犬、骆驼、蝙蝠、老鼠、刺猬等多种哺乳动物以及多种鸟类。鸟类作为宿主之一,其会感染SARS病毒或MERS病毒已被证实。本次新型冠状病毒跟SARS属于一个族,鸟类感染可能不表现症状,但如果人接触或食用携带病毒鸟类,会被感染并引起症状。</span></p> 32 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'微软雅黑'; font-size:15pt; color:#ffffff; background-color:#333333;"> 2 </span><span style=" font-family:'微软雅黑'; font-size:14pt; color:#000000;"> 所以天气回暖,北飞的鸟可能携带病毒,但这并不意味着什么。因为若没有本次疫情,鸟类也会携带病毒,人类与这些野生动物相安无事,被感染的概率很低;另外,北方城市比如黑龙江、北京等均有数百确诊病例,病毒在全国扩散是既定事实,只要我们做好基础防护,不吃野生动物,疫情不会因为鸟类到来而加重。</span></p> 33 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'微软雅黑'; font-size:7pt; color:#000000;"> </span></p> 34 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'微软雅黑'; font-size:14pt; font-weight:600; color:#000000;">查证者:</span><span style=" font-family:'微软雅黑'; font-size:14pt; color:#000000;">谢望时 </span><span style=" font-family:'微软雅黑'; font-size:14pt; color:#8d8d8d;">药理学硕士,知贝儿科药师</span></p> 35 | <hr /> 36 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'微软雅黑'; font-size:12pt; font-weight:600; color:#000000;">时间</span><span style=" font-family:'微软雅黑'; font-size:12pt; color:#000000;">:2020-02-13 </span><span style=" font-family:'微软雅黑'; font-size:12pt; font-weight:600; color:#000000;">来源</span><span style=" font-family:'微软雅黑'; font-size:12pt; color:#000000;">:腾讯较真</span></p> 37 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | Qt::Horizontal 47 | 48 | 49 | 50 | 40 51 | 20 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 黑体 61 | 12 62 | 63 | 64 | 65 | 返回 66 | 67 | 68 | 69 | 70 | 71 | 72 | Qt::Horizontal 73 | 74 | 75 | 76 | 40 77 | 20 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /slots.cpp: -------------------------------------------------------------------------------- 1 | #include "dialog.h" 2 | #include "ui_dialog.h" 3 | 4 | void Dialog::anchorClickedSlot(const QUrl& url) 5 | { 6 | //更多报道:840*520 7 | QString moreUrl = "https://new.qq.com/ch/antip/"; 8 | //视频直播:1230*520 9 | QString cctvUrl = "http://tv.cctv.com/live/cctv13/"; 10 | QString urlStr = url.toString(); 11 | 12 | QNetworkConfigurationManager mgr; 13 | if(mgr.isOnline() == true) 14 | { 15 | if(urlStr != moreUrl && urlStr != cctvUrl) 16 | { 17 | qDebug() << urlStr; 18 | // this->setWindowModality(Qt::WindowModal); //不阻塞当前窗口的进程 19 | newsInfo_win.openURL(url); 20 | newsInfo_win.exec(); 21 | } 22 | else 23 | QDesktopServices::openUrl(url); 24 | } 25 | else 26 | QMessageBox::warning(NULL, "错误", "无网络连接,请检查网络", QMessageBox::Yes); 27 | } 28 | void Dialog::closeEvent(QCloseEvent *win) 29 | { 30 | int ret = QMessageBox::information(this, "提示", "是否关闭?", "是/Yes", "否/No"); 31 | if(ret == 0) 32 | { 33 | win->accept();//不会将事件传递给组件的父组件 34 | qDebug()<<"已关闭"; 35 | } 36 | else 37 | win->ignore(); 38 | } 39 | //鼠标悬停,显示曲线值 40 | void Dialog::disTip(QMouseEvent *event, QCustomPlot *widget, QVector date) 41 | { 42 | //获取鼠标坐标,相对父窗体坐标 43 | float x_pos = event->pos().x(); 44 | // int y_pos = event->pos().y(); 45 | //鼠标坐标转化为CustomPlot内部坐标 46 | uint16_t x_val = widget->xAxis->pixelToCoord(x_pos) + 0.5; 47 | // int y_val = ui->widget_1->yAxis->pixelToCoord(y_pos); 48 | QString str, strToolTip; 49 | // int a = x_val + 0.5; 50 | // qDebug() << x_val << a; 51 | if(x_val < date.size()) 52 | { 53 | // qDebug() << x_val; 54 | str = date[x_val]; 55 | // str = QString::number(x_val, 10, 3); 56 | strToolTip += "日期: "; 57 | strToolTip += str; 58 | strToolTip += "\n"; 59 | 60 | uint8_t lineNum = widget->xAxis->graphs().count(); //当前窗口的曲线个数 61 | 62 | for (int i = 0; i < lineNum; i++) 63 | { 64 | QString lineName = widget->graph(i)->name(); 65 | //获得x轴坐标位置对应的曲线上y的值 66 | if(clickId < 3) 67 | { 68 | int y = widget->graph(i)->data()->at(x_val)->value; 69 | str = QString::number(y); 70 | } 71 | else 72 | { 73 | double y= widget->graph(i)->data()->at(x_val)->value; 74 | str = QString::number(y, 10, 1); 75 | } 76 | strToolTip += lineName + ":"; 77 | strToolTip += str; 78 | if(clickId == 3) 79 | strToolTip += "%"; 80 | if(i != lineNum - 1) 81 | strToolTip += "\n"; 82 | } 83 | QToolTip::showText(cursor().pos(), strToolTip, widget); 84 | } 85 | } 86 | 87 | void Dialog::widget_chart_event(QMouseEvent *event) 88 | { 89 | if(clickId == 1 | clickId == 2) 90 | { 91 | disTip(event, ui->widget_chart, TotalDate); 92 | } 93 | else if(clickId == 0) 94 | disTip(event, ui->widget_chart, AddDate); 95 | // else if(ui->rb3_rate->isChecked()) 96 | else 97 | disTip(event, ui->widget_chart, RateDate); 98 | } 99 | 100 | //点击不同的按钮绘制不同的曲线 101 | void Dialog::drawCharts(int id) 102 | { 103 | // qDebug() << id; 104 | setSelectStyle(id); 105 | clickId = id; 106 | switch(id) 107 | { 108 | case 0: 109 | widgetDrawLine(ui->widget_chart, "新增疑似/确诊趋势", "新增确诊", "新增疑似", 110 | clr1_1, clr1_2, AddDate, AddConfirmDub, AddSuspectDub); 111 | break; 112 | case 1: 113 | widgetDrawLine(ui->widget_chart, "累计疑似/确诊趋势", "累计确诊", "累计疑似", 114 | clr2_1, clr2_2, TotalDate, TotalConfirmDub, TotalSuspectDub); 115 | break; 116 | case 2: 117 | widgetDrawLine(ui->widget_chart, "累计治愈/死亡趋势", "累计治愈", "累计死亡", 118 | clr3_1, clr3_2, TotalDate, TotalHealDub, TotalDeadDub); 119 | break; 120 | case 3: 121 | widgetDrawLine(ui->widget_chart, "治愈率/病死率", "治愈率", "病死率", 122 | clr4_1, clr4_2, RateDate, chinaDayListHealRate, chinaDayListDeadRate); 123 | break; 124 | default:break; 125 | } 126 | } 127 | 128 | void Dialog::setSelectStyle(int id) 129 | { 130 | QString style1 = 131 | "border:3px groove rgb(126, 126, 126);" //边框线条粗线,线型,颜色 132 | "border-radius:8px;" //圆角弧度 133 | "padding:2px 4px;" //文字离边框的距离,H/L 134 | "background-color: rgb(243, 246, 248);" //背景颜色 135 | "color: rgb(0, 0, 0);"; //字体黑色; //未选中 136 | 137 | QString style2 = 138 | "border:3px groove rgb(126, 126, 226);" //边框线条粗线,线型,颜色 139 | "border-radius:8px;" //圆角弧度 140 | "padding:2px 4px;" //文字离边框的距离,H/L 141 | "background-color: rgb(238,244,255);" //背景颜色 142 | "color: rgb(22,107,241);" ; //字体蓝色; 143 | 144 | ui->btn_group->button(id)->setStyleSheet(style2); 145 | 146 | QList btnList = ui->btn_group->buttons(); 147 | btnList.removeAt(id); //移除当前,其余设置未选中状态 148 | for(int i = 0; i < btnList.size(); i++) 149 | { 150 | btnList.at(i)->setStyleSheet(style1); 151 | } 152 | 153 | } 154 | 155 | --------------------------------------------------------------------------------