优化显示
This commit is contained in:
parent
819d54e5d7
commit
8bf7692267
@ -149,9 +149,11 @@ class TreeModel(QtCore.QAbstractItemModel):
|
|||||||
return QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsUserCheckable | QtCore.Qt.ItemIsEditable
|
return QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsUserCheckable | QtCore.Qt.ItemIsEditable
|
||||||
|
|
||||||
def headerData(self, section, orientation, role):
|
def headerData(self, section, orientation, role):
|
||||||
if orientation == QtCore.Qt.Horizontal and role == QtCore.Qt.DisplayRole:
|
if orientation == QtCore.Qt.Horizontal:
|
||||||
return self.rootItem.data(section)
|
if role == QtCore.Qt.DisplayRole:
|
||||||
|
return self.rootItem.data(section)
|
||||||
|
elif role == QtCore.Qt.TextAlignmentRole:
|
||||||
|
return QtCore.Qt.AlignCenter
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def index(self, row, column, parent):
|
def index(self, row, column, parent):
|
||||||
|
@ -100,21 +100,18 @@ class DrEngineManager(QtGui.QWidget):
|
|||||||
grid.addWidget(self.activeTable, 1, 2)
|
grid.addWidget(self.activeTable, 1, 2)
|
||||||
|
|
||||||
btnEdit = QtGui.QPushButton(u'编辑', self)
|
btnEdit = QtGui.QPushButton(u'编辑', self)
|
||||||
btnRestart = QtGui.QPushButton(u'更新数据', self)
|
|
||||||
|
|
||||||
vbox = QtGui.QVBoxLayout()
|
vbox = QtGui.QVBoxLayout()
|
||||||
vbox.addLayout(grid)
|
vbox.addLayout(grid)
|
||||||
|
|
||||||
vline = QtGui.QHBoxLayout()
|
vline = QtGui.QHBoxLayout()
|
||||||
vline.addWidget(btnEdit)
|
vline.addWidget(btnEdit)
|
||||||
vline.addWidget(btnRestart)
|
|
||||||
|
|
||||||
vbox.addLayout(vline)
|
vbox.addLayout(vline)
|
||||||
vbox.addWidget(self.logMonitor)
|
vbox.addWidget(self.logMonitor)
|
||||||
self.setLayout(vbox)
|
self.setLayout(vbox)
|
||||||
|
|
||||||
btnEdit.clicked.connect(self.openDr)
|
btnEdit.clicked.connect(self.openDr)
|
||||||
btnRestart.clicked.connect(self.restart)
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
def updateLog(self, event):
|
def updateLog(self, event):
|
||||||
@ -171,11 +168,12 @@ class DrEngineManager(QtGui.QWidget):
|
|||||||
def openDr(self):
|
def openDr(self):
|
||||||
"""打开行情数据记录组件"""
|
"""打开行情数据记录组件"""
|
||||||
self.mDrEditWidget = DrEditWidget(self,self.mainEngine, self.eventEngine)
|
self.mDrEditWidget = DrEditWidget(self,self.mainEngine, self.eventEngine)
|
||||||
|
self.mDrEditWidget.setWindowTitle(u"编辑订阅")
|
||||||
self.mDrEditWidget.setFixedSize(800,800)
|
self.mDrEditWidget.setFixedSize(800,800)
|
||||||
self.mDrEditWidget.show()
|
self.mDrEditWidget.show()
|
||||||
|
|
||||||
def restart(self):
|
def restart(self):
|
||||||
pass
|
pass
|
||||||
# self.drEngine.stop()
|
# self.drEngine.stop()
|
||||||
# self.updateSetting()
|
# self.updateSetting()
|
||||||
# self.mainEngine.drEngine = DrEngine(self.mainEngine, self.mainEngine.eventEngine)
|
# self.mainEngine.drEngine = DrEngine(self.mainEngine, self.mainEngine.eventEngine)
|
||||||
|
Loading…
Reference in New Issue
Block a user