From 8bf76922676b4b032042493191c5e0bb4ddcacbd Mon Sep 17 00:00:00 2001 From: "sunlit@home" Date: Sun, 12 Feb 2017 19:38:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vn.trader/dataRecorder/uiDrEdit.py | 8 +++++--- vn.trader/dataRecorder/uiDrWidget.py | 8 +++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vn.trader/dataRecorder/uiDrEdit.py b/vn.trader/dataRecorder/uiDrEdit.py index 0a0c20c7..1242a225 100644 --- a/vn.trader/dataRecorder/uiDrEdit.py +++ b/vn.trader/dataRecorder/uiDrEdit.py @@ -149,9 +149,11 @@ class TreeModel(QtCore.QAbstractItemModel): return QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsUserCheckable | QtCore.Qt.ItemIsEditable def headerData(self, section, orientation, role): - if orientation == QtCore.Qt.Horizontal and role == QtCore.Qt.DisplayRole: - return self.rootItem.data(section) - + if orientation == QtCore.Qt.Horizontal: + if role == QtCore.Qt.DisplayRole: + return self.rootItem.data(section) + elif role == QtCore.Qt.TextAlignmentRole: + return QtCore.Qt.AlignCenter return None def index(self, row, column, parent): diff --git a/vn.trader/dataRecorder/uiDrWidget.py b/vn.trader/dataRecorder/uiDrWidget.py index f1506686..869f7e1a 100644 --- a/vn.trader/dataRecorder/uiDrWidget.py +++ b/vn.trader/dataRecorder/uiDrWidget.py @@ -100,21 +100,18 @@ class DrEngineManager(QtGui.QWidget): grid.addWidget(self.activeTable, 1, 2) btnEdit = QtGui.QPushButton(u'编辑', self) - btnRestart = QtGui.QPushButton(u'更新数据', self) vbox = QtGui.QVBoxLayout() vbox.addLayout(grid) vline = QtGui.QHBoxLayout() vline.addWidget(btnEdit) - vline.addWidget(btnRestart) vbox.addLayout(vline) vbox.addWidget(self.logMonitor) self.setLayout(vbox) btnEdit.clicked.connect(self.openDr) - btnRestart.clicked.connect(self.restart) #---------------------------------------------------------------------- def updateLog(self, event): @@ -171,11 +168,12 @@ class DrEngineManager(QtGui.QWidget): def openDr(self): """打开行情数据记录组件""" self.mDrEditWidget = DrEditWidget(self,self.mainEngine, self.eventEngine) + self.mDrEditWidget.setWindowTitle(u"编辑订阅") self.mDrEditWidget.setFixedSize(800,800) self.mDrEditWidget.show() def restart(self): - pass - # self.drEngine.stop() + pass + # self.drEngine.stop() # self.updateSetting() # self.mainEngine.drEngine = DrEngine(self.mainEngine, self.mainEngine.eventEngine)