def newEvent(parent):
    text, ok = QtGui.QInputDialog.getText(parent, 'New Task',
            'Enter the new Task:')

    if ok:
        # Create new TaskModel and add it to the window.
        newTask = ServerCommunicator.createNewTask(text)
        parent.addTask(newTask)