Пример #1
0
 def _openTaskEditor(self, title, task=None):
     dialog = AutoCompleteInputDialog(self._values, self._parent_window)
     dialog.setWindowTitle(title)
     dialog.setLabelText('Task:')
     dialog.resize(500, 100)
     if task:
         dialog.setTextValue(task.text)
     dialog.setModal(True)
     if dialog.exec_():
         return (dialog.textValue(), True)
     return (None, False)
Пример #2
0
 def _openTaskEditor(self, title, task=None):
     uniqlist = sorted(list(OrderedDict.fromkeys(self._completedValues+self._values)))+self._dates
     dialog = AutoCompleteInputDialog(uniqlist, self._parent_window)
     dialog.setWindowTitle(title)
     dialog.setLabelText('Task:')
     dialog.resize(500, 100)
     if task:
         dialog.setTextValue(task.text)
     dialog.setModal(True)
     if dialog.exec_():
         return dialog.textValue(), True
     return None, False
Пример #3
0
 def _openTaskEditor(self, title, task=None):
     uniqlist = list(set(self._completedValues + self._values))
     dialog = AutoCompleteInputDialog(uniqlist, self._parent_window)
     dialog.setWindowTitle(title)
     dialog.setLabelText('Task:')
     dialog.resize(500, 100)
     if task:
         dialog.setTextValue(task.text)
     dialog.setModal(True)
     if dialog.exec_():
         return dialog.textValue(), True
     return None, False