Exemple #1
0
## ============================= main section ===================================

if __name__ != '__main__':
    sys.exit(0)

app = QApplication(sys.argv)
app.setApplicationName("Hanlendar")
app.setOrganizationName("arnet")
### app.setOrganizationDomain("www.my-org.com")

todosList = []
todo1 = ToDo()
todo1.title = "ToDo 1"
todo1.description = "Description"
todo1.completed = 50
todo1.priority = 5
todosList.append(todo1)

todo2 = ToDo()
todo2.title = "ToDo 2"
todo2.description = "Description"
todo2.completed = 0
todo2.priority = 3
todosList.append(todo2)

todo = ToDo()
todo.title = "ToDo 3"
todo.description = "Description"
todo.completed = 30
todo.priority = 11
Exemple #2
0
from hanlendar.gui.qt import QApplication
from hanlendar.gui.sigint import setup_interrupt_handling
from hanlendar.gui.widget.tododialog import ToDoDialog

from hanlendar.domainmodel.todo import ToDo

## ============================= main section ===================================

if __name__ != '__main__':
    sys.exit(0)

app = QApplication(sys.argv)
app.setApplicationName("Hanlendar")
app.setOrganizationName("arnet")
### app.setOrganizationDomain("www.my-org.com")

todo = ToDo()
todo.title = "ToDo title"
todo.description = "Description"
todo.completed = 50
todo.priority = 5

setup_interrupt_handling()

dialog = ToDoDialog(todo)
dialogCode = dialog.exec_()

print("Dialog return:", dialogCode)
print("Created todo:", dialog.todo)