wumu
2025-02-10 6a1c01b3b618d56011560d19f4da9c47793fff4a
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef REGULARINVESTMENT_H
#define REGULARINVESTMENT_H
 
#include <QMainWindow>
#include <QMap>
#include <qnetworkaccessmanager.h>
#include <qnetworkrequest.h>
#include <QStandardItemModel>
 
namespace Ui {
class RegularInvestment;
}
 
class RegularInvestment : public QMainWindow
{
    Q_OBJECT
 
public:
    explicit RegularInvestment(QWidget *parent = 0);
    ~RegularInvestment();
 
signals:
    void getClosePriceSignal(QString); // 发名字拿价格
public slots:
    void showClosePrice(QString name,QString closePrice);
 
private slots:
    void on_comboBox_currentIndexChanged(const QString &arg1);
 
    void on_lineEdit_2_returnPressed();
 
    void on_pushButton_clicked();
 
    void showAplyData(QNetworkReply* reply);
    void getOneStock(QByteArray &buffer);
 
    void on_pushButton_sum_clicked();
 
    void on_comboBox_3_currentIndexChanged(const QString &arg1);
 
    void on_lineEdit_buyNum_returnPressed();
 
    void on_pushButton_buy_clicked();
 
private:
    Ui::RegularInvestment *ui;
 
    QStandardItemModel *m_model;
    QStandardItemModel *m_modelBuy;
 
    QMap<QString,QString> m_nameCodes; // 股票名字及代号
 
    QNetworkRequest m_request; // 用于管理请求头的
    QString m_cookie; // 缓存
    QNetworkAccessManager m_manager; // 用于管理http请求及响应的
};
 
#endif // REGULARINVESTMENT_H