File: proxyproperties.py

package info (click to toggle)
python-qt4 4.0.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,632 kB
  • ctags: 2,639
  • sloc: python: 29,409; sh: 5,646; cpp: 3,168; xml: 149; makefile: 109
file content (14 lines) | stat: -rw-r--r-- 563 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from PyQt4.uic import properties
from PyQt4.uic.Compiler import qtproxies

class ProxyProperties(properties.Properties):
    def __init__(self, qobject_creator):
        properties.Properties.__init__(self, qobject_creator,
                                       qtproxies.QtCore, qtproxies.QtGui)

    def _string(self, prop):
        return qtproxies.i18n_string(prop.text or "")

    def _set(self, prop):
        return qtproxies.Literal("|".join([str(self._pyEnumMember(value))
                                           for value in prop.text.split('|')]))