-
Notifications
You must be signed in to change notification settings - Fork 1
/
fm_mainwindowproxy.h
40 lines (36 loc) · 1.02 KB
/
fm_mainwindowproxy.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef MAINWINDOWPROXY_H
#define MAINWINDOWPROXY_H
#include <QObject>
#include <QThread>
#include <QProcess>
#include "fm_mainwindow.h"
class FM_MainWindowProxy : public QObject
{
Q_OBJECT
public:
FM_MainWindowProxy(FM_MainWindow *mainwindow,QObject *parent = nullptr);
void getNews(QString web);
void getFavorNews();
public slots:
void threadStarted();
void threadFinished();
void writeFavor(QString title, QString data, QString abstract, QString address, bool type);
void startNewsCrawler();
void startNoticeCrawler();
signals:
void addNewsItemToUI(QString title, QString data, QString abstract, QString address, bool needFavor);
void clearNewsinUI();
void wait();
void stopwait();
void startPython(QStringList websitelist);
void pythonEnd();
void inform_notice();
protected:
virtual void run();
private:
FM_MainWindow *mainwindow;
QProcess *process;
QVector<QString> crawler_Weblist;
void crawler(QStringList web);
};
#endif // MAINWINDOWPROXY_H