Update 更新文档
This commit is contained in:
48
cleaned_source_code/Sqbase/qhistoryorderdialog.h
Normal file
48
cleaned_source_code/Sqbase/qhistoryorderdialog.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#ifndef HISTORYORDERDIALOG_H
|
||||
#define HISTORYORDERDIALOG_H
|
||||
#include <QDialog>
|
||||
#include <QStandardItemModel>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QDateEdit>
|
||||
#include <QTableView>
|
||||
#include <QComboBox>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QMutex>
|
||||
#include <QString>
|
||||
#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<QSharedPointer<class BigOrderInfo>>& orders);
|
||||
QString m_historyPath;
|
||||
QList<QSharedPointer<BigOrderInfo>> getHistoryOrders(const QDate& date) const;
|
||||
QList<QDate> 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<QDate, QList<QSharedPointer<BigOrderInfo>>> m_historyCache;
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user