def setupUI(self):
mainLayout = QtGui.QVBoxLayout()
self.setLayout(mainLayout)
self.buttonLayout = QtGui.QHBoxLayout()
self.msg = QtGui.QLabel()
self.addTaskButton = QtGui.QPushButton('Add Task')
self.addTaskButton.setToolTip('Add a new task to the list')
self.sortButton = QtGui.QPushButton('Reverse Sorting')
self.sortButton.setCheckable(True)
self.sortButton.setToolTip('Push to sort so highest priorities are at the top,\notherwise lowest will be at the top.')
self.helpButton = QtGui.QPushButton('?')
self.helpButton.setMaximumWidth(30)
self.helpButton.setFlat(True)
self.helpButton.setToolTip(self.__helpText())
self.hideButton = QtGui.QPushButton('Hide Finished Tasks')
self.hideButton.setCheckable(True)
self.hideButton.setToolTip('Hide finished tasks to keep the list tidy')
self.clipboardButton = QtGui.QPushButton('Copy To Clipboard')
self.clipboardButton.setToolTip('Push to copy current task info to cliboard for pasting into emails or other text documents.\nHandy to keep those coordinators happy.')
self.buttonLayout.addWidget(self.addTaskButton)
self.buttonLayout.addWidget(self.sortButton)
self.buttonLayout.addWidget(self.hideButton)
self.buttonLayout.addWidget(self.clipboardButton)
self.buttonLayout.addSpacing(20)
self.buttonLayout.addWidget(self.helpButton)
self.layout().addWidget(self.msg)
self.layout().addLayout(self.buttonLayout)
self.taskContainer = QtGui.QWidget()
self.scrollArea = QtGui.QScrollArea()
self.scrollArea.setWidget(self.taskContainer)
self.layout().addWidget(self.scrollArea)
self.createTaskWidgets()
self.update()
评论列表
文章目录