def __newTodo(self): """ The "New item" context menu handler """ dialog = TodoPropertiesDialog( None, self ) if dialog.exec_() == QDialog.Accepted: data = dialog.getData() self.addTodoItem( data[0], "", 0, data[1], "FIXME" in data[0] ) return
def __newTodo(self): """ The "New item" context menu handler """ dialog = TodoPropertiesDialog(None, self) if dialog.exec_() == QDialog.Accepted: data = dialog.getData() self.addTodoItem(data[0], "", 0, data[1], "FIXME" in data[0]) return
def __editTodoProperties( self ): """ Item "Properties" context menu entry """ todo = self.currentItem() dialog = TodoPropertiesDialog( todo, self ) readOnly = todo.getFilename() != "" if readOnly: dialog.setReadOnly() if dialog.exec_() == QDialog.Accepted and not readOnly: data = dialog.getData() todo.setDescription( data[0] ) todo.setCompleted( data[1] ) return
def __editTodoProperties(self): """ Item "Properties" context menu entry """ todo = self.currentItem() dialog = TodoPropertiesDialog(todo, self) readOnly = todo.getFilename() != "" if readOnly: dialog.setReadOnly() if dialog.exec_() == QDialog.Accepted and not readOnly: data = dialog.getData() todo.setDescription(data[0]) todo.setCompleted(data[1]) return