#ifndef REGULARINVESTMENT_H #define REGULARINVESTMENT_H #include #include #include #include #include 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 m_nameCodes; // 股票名字及代号 QNetworkRequest m_request; // 用于管理请求头的 QString m_cookie; // 缓存 QNetworkAccessManager m_manager; // 用于管理http请求及响应的 }; #endif // REGULARINVESTMENT_H