def newTasksDialog(self): text, ok = QtGui.QInputDialog.getText(self, "New Task", "Task name:", 0) if ok != True : print "[debug] if: " , text, ok return else: print "[debug] else: " , text, ok taskTyp = TaskTyp() taskTyp.ID = text self.tasksSettings.addTaskTyp(taskTyp) self.refreshTaskList() self.taskBox.setTasksSettings(self.tasksSettings)
def getTaskTyp(self, todo): taskTyp = TaskTyp() taskTyp.ID = todo taskTyp.Depiction = self.getDescription(todo) taskTyp.TodoTyp = self.getTodoTyp(todo) taskTyp.BashCommand = self.getTodoCommand(todo) taskTyp.OldFile = self.getOldFile(todo) taskTyp.NewFile = self.getNewFile(todo) taskTyp.StopBefore = self.isStopBeforeDo(todo) taskTyp.StopAfter = self.isStopAfterDo(todo) taskTyp.SkipStap = self.isSkipStap(todo) return taskTyp
def newTasksDialog(self): text, ok = QtGui.QInputDialog.getText(self, "New Task", "Task name:", 0) if ok != True: print "[debug] if: ", text, ok return else: print "[debug] else: ", text, ok taskTyp = TaskTyp() taskTyp.ID = text self.tasksSettings.addTaskTyp(taskTyp) self.refreshTaskList() self.taskBox.setTasksSettings(self.tasksSettings)
def safeTaskChanges(self): print "safeTaskChanges" taskTyp = TaskTyp() taskTyp.ID = str(self.nameLineEdit.text()) taskTyp.Depiction = str(self.descriptionLineEdit.text()) taskTyp.TodoTyp = str(self.todoTypComboBox.currentText()) taskTyp.BashCommand = str(self.bashCommandLineEdit.text()) taskTyp.OldFile = str(self.originalFileLineEdit.text()) taskTyp.NewFile = str(self.replacementFileLineEdit.text()) taskTyp.StopBefore = str(self.beforeCheckBox.isChecked()) taskTyp.StopAfter = str(self.afterCheckBox.isChecked()) taskTyp.SkipStap = str(self.skipCheckBox.isChecked()) self.tasksSettings.setTaskTyp(taskTyp) self.taskIsChange.emit()