Beispiel #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")

parentTask = Task()
parentTask.recurrence = Recurrent()
parentTask.recurrence.setWeekly(1)

task = Task()
task.setParent(parentTask)
task.title = "Task 1"
# pylint: disable=C0301
task.description = (
    '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">'
    '<html><head><meta name="qrichtext" content="1" /><style type="text/css">'
    'p, li { white-space: pre-wrap; }'
    '</style></head><body style=" font-family:\'Noto Sans\'; font-size:9pt; font-weight:400; font-style:normal;">'
    '<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A description</p>'
    '<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>'
    '<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="www.google.pl"><span style=" text-decoration: underline; color:#0000ff;">www.google.pl</span></a> </p>'
    '<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>'
    '<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="file:///var/log/kern.log"><span style=" text-decoration: underline; color:#0000ff;">file:///var/log/kern.log</span></a> </p>'
    '<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html>'
)
Beispiel #2
0
 def addTask(self, task: Task = None):
     if task is None:
         task = Task()
     self.tasks.append(task)
     task.setParent(None)
     return task