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)