#ifndef HISTORYORDERDIALOG_H #define HISTORYORDERDIALOG_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "ordertypedelegate.h" class QHistoryOrderDialog : public QDialog { Q_OBJECT public: explicit QHistoryOrderDialog(QWidget *parent = nullptr); ~QHistoryOrderDialog() = default; private slots: void onDateChanged(const QDate &date); void onFilterChanged(); void onExportClicked(); private: void initUI(); void loadOrdersForDate(const QDate &date); void updateStatistics(const QList>& orders); // 添加历史查询方法 QString m_historyPath; QList> getHistoryOrders(const QDate& date) const; QList getAvailableDates() const; QDateEdit *m_dateSelector; QComboBox *m_orderTypeFilter; QLineEdit *m_stockCodeFilter; QTableView *m_tableView; QPushButton *m_exportButton; QLabel *m_statsLabel; QStandardItemModel *m_model; QSortFilterProxyModel *m_proxyModel; NumberFormatDelegate *m_numberDelegate; OrderTypeDelegate *m_typeDelegate; mutable QMutex m_cacheMutex; mutable QMap>> m_historyCache; }; #endif // HISTORYORDERDIALOG_H