暂时注释两个私有视窗

This commit is contained in:
msincenselee 2017-06-08 17:20:36 +08:00
parent 11926f6f6f
commit df72b6fde4

View File

@ -6,8 +6,8 @@ from uiBasicWidget import *
from ctaStrategy.uiCtaWidget import CtaEngineManager
from dataRecorder.uiDrWidget import DrEngineManager
from riskManager.uiRmWidget import RmEngineManager
from uiFullMonitorWidget import MonitorWidget
from uiKChartWidget import CandleForm
#from uiFullMonitorWidget import MonitorWidget
#from uiKChartWidget import CandleForm
import os
@ -85,6 +85,9 @@ class MainWindow(QtGui.QMainWindow):
connectCtpJRAction = QtGui.QAction(u'金瑞CTP', self)
connectCtpJRAction.triggered.connect(self.connectCtpJR)
connectCtpJR2Action = QtGui.QAction(u'金瑞CTP2', self)
connectCtpJR2Action.triggered.connect(self.connectCtpJR2)
connectCtpAction = QtGui.QAction(u'连接CTP', self)
connectCtpAction.triggered.connect(self.connectCtp)
@ -139,11 +142,11 @@ class MainWindow(QtGui.QMainWindow):
ctaAction = QtGui.QAction(u'CTA策略', self)
ctaAction.triggered.connect(self.openCta)
monitorAction = QtGui.QAction(u'周期监控', self)
monitorAction.triggered.connect(self.openMonitor)
#monitorAction = QtGui.QAction(u'周期监控', self)
#monitorAction.triggered.connect(self.openMonitor)
kChart = QtGui.QAction(u'K线图', self)
kChart.triggered.connect(self.openKChart)
#kChart = QtGui.QAction(u'K线图', self)
#kChart.triggered.connect(self.openKChart)
rmAction = QtGui.QAction(u'风险管理', self)
rmAction.triggered.connect(self.openRm)
@ -157,6 +160,7 @@ class MainWindow(QtGui.QMainWindow):
sysMenu.addAction(connectCtpPostAction)
sysMenu.addAction(connectCtpTestAction)
sysMenu.addAction(connectCtpJRAction)
sysMenu.addAction(connectCtpJR2Action)
if 'CTP' in self.mainEngine.gatewayDict:
sysMenu.addAction(connectCtpAction)
@ -194,8 +198,8 @@ class MainWindow(QtGui.QMainWindow):
# 算法相关
algoMenu = menubar.addMenu(u'算法')
algoMenu.addAction(ctaAction)
algoMenu.addAction(monitorAction)
algoMenu.addAction(kChart)
#algoMenu.addAction(monitorAction)
#algoMenu.addAction(kChart)
# 帮助
helpMenu = menubar.addMenu(u'帮助')
@ -333,6 +337,11 @@ class MainWindow(QtGui.QMainWindow):
self.connectGatewayDict['CTP_JR'] = u'金瑞CTP'
self.connected = True
def connectCtpJR2(self):
"""连接金瑞期货CTP接口"""
self.mainEngine.connect('CTP_JR2')
self.connectGatewayDict['CTP_JR2'] = u'金瑞CTP2'
self.connected = True
def connectCtpTest(self):
"""连接SNOW测试环境CTP接口"""
@ -453,19 +462,19 @@ class MainWindow(QtGui.QMainWindow):
self.widgetDict['ctaM'] = CtaEngineManager(self.mainEngine.ctaEngine, self.eventEngine)
self.widgetDict['ctaM'].showMaximized()
def openMonitor(self):
try:
self.widgetDict['Monitor'].showMaximized()
except KeyError:
self.widgetDict['Monitor'] = MonitorWidget(self.mainEngine.ctaEngine, self.eventEngine)
self.widgetDict['Monitor'].showMaximized()
def openKChart(self):
try:
self.widgetDict['kChart'].showMaximized()
except KeyError:
self.widgetDict['kChart'] = CandleForm(self.mainEngine.ctaEngine, self.eventEngine, symbol='p1705', period='minute',interval=5)
self.widgetDict['kChart'].showMaximized()
#def openMonitor(self):
# try:
# self.widgetDict['Monitor'].showMaximized()
# except KeyError:
# self.widgetDict['Monitor'] = MonitorWidget(self.mainEngine.ctaEngine, self.eventEngine)
# self.widgetDict['Monitor'].showMaximized()
#
#def openKChart(self):
# try:
# self.widgetDict['kChart'].showMaximized()
# except KeyError:
# self.widgetDict['kChart'] = CandleForm(self.mainEngine.ctaEngine, self.eventEngine, symbol='p1705', period='minute',interval=5)
# self.widgetDict['kChart'].showMaximized()
#----------------------------------------------------------------------