Example #1
0
    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
Example #2
0
    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
Example #3
0
    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
Example #4
0
    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