You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
#ifndef XEXCELTOMYSQ_H
|
|
|
|
|
|
#define XEXCELTOMYSQ_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
#include <QMap>
|
|
|
|
|
|
#include "db/xwholestocks.h"
|
|
|
|
|
|
#include "db/xwholestockindexs.h"
|
|
|
|
|
|
#include "db/structs.h"
|
|
|
|
|
|
|
|
|
|
|
|
class XStocksDataParser : public QObject
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
|
|
|
|
explicit XStocksDataParser(QObject *parent = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
QList<_WholeStocksParam> parseWholeStocks(QList<QList<QVariant> > datas);
|
|
|
|
|
|
|
|
|
|
|
|
QList<XWholeStockIndexs::_WholeStockIndexsParam> parseWholeStockIndexs(QList<QList<QVariant> > datas);
|
|
|
|
|
|
|
|
|
|
|
|
QList<_HighStocksParam> parseHightStocks(QList<QList<QVariant> > datas);
|
|
|
|
|
|
|
|
|
|
|
|
QList<_HighStockIndexsParam> parseHightStockIndexs(QList<QList<QVariant> > datas);
|
|
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
//返回交易日期,从头中能解析出交易日期
|
|
|
|
|
|
QString parseWholeStockHead(QList<QVariant> head);
|
|
|
|
|
|
QString parseWholeStockIndexHead(QList<QVariant> head);
|
|
|
|
|
|
QString parseHighStockHead(QList<QVariant> head);
|
|
|
|
|
|
QString parseHighStockIndexHead(QList<QVariant> head);
|
|
|
|
|
|
void addValueToWholeStockParam(_WholeStocksParam ¶m ,int index,QString value);
|
|
|
|
|
|
void addValueToWholeStockIndexParam(XWholeStockIndexs::_WholeStockIndexsParam ¶m ,int index,QString value);
|
|
|
|
|
|
void addValueToHighStockParam(_HighStocksParam ¶m ,int index,QString value);
|
|
|
|
|
|
void addValueToHighStockIndexParam(_HighStockIndexsParam ¶m ,int index,QString value);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
QMap<int,QString> m_wholeStocksKeyIndexs;
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // XEXCELTOMYSQ_H
|