暂时注释两个私有视窗

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