1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#! /usr/bin/env python
# -*- coding: utf-8 -*-
{% include licence|append:".py" %}
{% if baseClass %}
from PyQt4.{{ baseClass.module }} import {{ baseClass.type }}
{% endif %}
class {{ className }}({% if baseClass %}{{ baseClass.type }}{% else %}object{% endif %}):
def __init__(self):
{% if baseClass %}
{{ baseClass.type }}.__init__(self)
{% endif %}
pass
{% for property in properties %}
def {{ property.name }}(self):
return self._{{ property.name }}
{% if not property.readonly %}
def {{ property.name|to_write }}(self, {{ property.name }}):
self._{{ property.name }} = {{ property.name }}
{% endif %}
{% endfor %}
{% with "true" as default %}
{% for method in methods %}
def {{ method.name }}(self{% include "args.py" %}):
pass
{% endfor %}
{% endwith %}
|