代码拉取完成,页面将自动刷新
#ifndef CONTROLWIDGET_H
#define CONTROLWIDGET_H
#include <QWidget>
#include <qstandarditemmodel.h>
#include <qabstractitemmodel.h>
#include <string.h>
#include <qtableview.h>
#include <qheaderview.h>
#include <qgridlayout.h>
#include <qpainter.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <QCheckBox>
#include <QComboBox>
#include <QRadioButton>
#include <QPushButton>
#include <QSlider>
#include <QSpinBox>
#include <qboxlayout.h>
#include"conditiondialog.h"
#include<QEvent>
#include "CtpInterface/ThostFtdcUserApiStruct.h"
class clsContract{
public:
QString strContract;
///涨停板价格
double dHighestPrice;
///跌停板价格
double dLowestPrice;
QString strfutuExchType;
};
class ControlWidget : public QWidget
{
Q_OBJECT
public:
explicit ControlWidget(QWidget *parent = 0);
void setupViews();
QString GetContractCode();
int GetTotalHands();
QString GetFutuExchType();
void SetOrderInfo(char bs,char c_direction,char c_hedge,double en_entrust_price,int FocusType);
void SetEnableAmount(int iAmount);
signals:
bool SigOrderInsert(const char* exch_type, const char* contract_code, char c_bs, char c_direction, char c_hedge, int l_entrust_amount, double en_entrust_price);
void SigGetOpenRatio(char bs,QString ordertype,QString futucode,double price);
public slots:
void SlotValueChanged(double price);
void SlotUpdateShowInfo(double buy1, double buy1cnt,double sell1,double sell1cnt);
void SlotSetHandsTimes(int times);
void SlotBuyRadioBtnClicked();
void SlotSellRadioBtnClicked();
//委托按钮触发事件响应
void OnEntrust();
//点击预埋按钮事件响应
void OnPreEntrust();
void SelectContract(const QModelIndex & index);
void OrderTypeChanged(QString OrderType);
protected:
bool eventFilter(QObject *obj, QEvent *ev);
public:
QTableView* tableOrder;
QAbstractItemModel *modelOrder;
QPushButton * ProdButton;
QLineEdit* CurrentTime;
QLineEdit * EditContract;
QPushButton * FreezeButton;
QComboBox* m_AccountCombox;
conditionDialog* m_conditionDialog;
private:
QLabel* LabelCnt;
QLabel* LabelBuy1;
QLabel* LabelSell1;
QLabel* LabelBuy1Cnt;
QLabel* LabelSell1Cnt;
QLabel* LabelTop;
QLabel* LabelBottom;
QVector<clsContract> m_vContracts;
bool m_bAutoFlg;
//批量下单的单号
int m_BatchNO;
double m_dHighestPrice;
double m_dLowestPrice;
QString m_futu_exch_type;
QCheckBox *m_AccountCheckbox;
QComboBox *m_OrderTypeCombox;
QCheckBox *m_OrderTypeCheckbox;
QLineEdit* m_ContractLineEdit;
QRadioButton* m_BSRadioButton1;
QRadioButton* m_BSRadioButton2;
QRadioButton* m_OCRadioButton1;
QRadioButton* m_OCRadioButton2;
QRadioButton* m_OCRadioButton3;
QCheckBox* m_CancelCheckBox;
QSpinBox* m_RiskSpinBox;
QDoubleSpinBox *m_SpecifiedPriceSpinBox;
QPushButton *m_SpecifiedPriceButton;
QSpinBox *m_OrderCntSpinBox;
QSpinBox *m_HandsTimesSpinBox;
QPushButton *m_OrderButton;
QPushButton *m_ConditionButton;
QPushButton *m_PreentrustButton;
QItemSelectionModel *selectionModel;
QGridLayout *MainLayout;
QBoxLayout *DropLayout,*QuickLayout;
};
#endif // CONTROLWIDGET_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。