artiq_gui: check due date upon date selection

This commit is contained in:
Yann Sionneau 2015-06-18 18:34:38 +02:00
parent 1ad5165cc7
commit b05972059e
1 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,7 @@ class ExplorerDock(dockarea.Dock):
self.datetime.setDisplayFormat("MMM d yyyy hh:mm:ss") self.datetime.setDisplayFormat("MMM d yyyy hh:mm:ss")
self.datetime.setCalendarPopup(True) self.datetime.setCalendarPopup(True)
self.datetime.setDate(QtCore.QDate.currentDate()) self.datetime.setDate(QtCore.QDate.currentDate())
self.datetime.dateTimeChanged.connect(self.enable_duedate)
self.datetime_en = QtGui.QCheckBox("Due date:") self.datetime_en = QtGui.QCheckBox("Due date:")
grid.addWidget(self.datetime_en, 1, 0) grid.addWidget(self.datetime_en, 1, 0)
grid.addWidget(self.datetime, 1, 1) grid.addWidget(self.datetime, 1, 1)
@ -65,6 +66,9 @@ class ExplorerDock(dockarea.Dock):
placeholder = QtGui.QWidget() placeholder = QtGui.QWidget()
splitter.addWidget(placeholder) splitter.addWidget(placeholder)
def enable_duedate(self):
self.datetime_en.setChecked(True)
@asyncio.coroutine @asyncio.coroutine
def sub_connect(self, host, port): def sub_connect(self, host, port):
self.explist_subscriber = Subscriber("explist", self.explist_subscriber = Subscriber("explist",