Package pyforms :: Package gui :: Package Controls :: Module ControlLabel |
[hide private]
[frames] | no frames]

# Source Code for Module pyforms.gui.Controls.ControlLabel

     1  #!/usr/bin/python
     2  # -*- coding: utf-8 -*-
     3
     4  """ pyforms.gui.Controls.ControlLabel"""
     5
     6  import pyforms.Utils.tools as tools
     7  from PyQt4 import uic
     8  from pyforms.gui.Controls.ControlBase import ControlBase
     9
    10  __author__ = "Carlos Mão de Ferro"
    11  __copyright__ = ""
    12  __credits__ = "Carlos Mão de Ferro"
    13  __license__ = "MIT"
    14  __version__ = "0.0"
    15  __maintainer__ = ["Ricardo Ribeiro", "Carlos Mão de Ferro"]
    16  __email__ = ["ricardojvr at gmail.com", "cajomferro at gmail.com"]
    17  __status__ = "Development"
    18
    19
    20 -class ControlLabel(ControlBase):
    21
    22 -    def __init__(self, label=''):
    23          super(ControlLabel, self).__init__(label=label, defaultValue=label)
    24
    25 -    def initForm(self):
    26          control_path = tools.getFileInSameDirectory(__file__, "label.ui")
    27          self._form = uic.loadUi(control_path)
    28          self._form.label.setText(self._label)
    29
    30 -    def load(self, data): pass
    31
    32 -    def save(self, data): pass
    33
    34 -    def changed(self):
    35          self._form.label.setText(self._value)
    36
    37      @property
    38 -    def form(self): return self._form
    39