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

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

     1  #!/usr/bin/python
     2  # -*- coding: utf-8 -*-
     3
     4  __author__      = "Ricardo Ribeiro"
     5  __credits__     = ["Ricardo Ribeiro"]
     6  __license__     = "MIT"
     7  __version__     = "0.0"
     8  __maintainer__  = "Ricardo Ribeiro"
     9  __email__       = "ricardojvr@gmail.com"
    10  __status__      = "Development"
    11
    12
    13  import os
    14  import pickle
    15  import pyforms.Utils.tools as tools
    16  from PyQt4 import uic, QtGui
    17  from pyforms.gui.Controls.ControlBase import ControlBase
    18
    19 -class ControlTextArea(ControlBase):
    20
    21 -    def initForm(self):
    22          control_path = tools.getFileInSameDirectory(__file__,"textArea.ui")
    23          self._form = uic.loadUi( control_path )
    24          self._form.label.setText(self._label)
    25          self._form.plainTextEdit.setPlainText(self._value)
    26
    27      ############################################################################
    28      ############ Properties ####################################################
    29      ############################################################################
    30
    31      @property
    32 -    def value(self):
    33          self._value = str(self._form.plainTextEdit.toPlainText())
    34          return self._value
    35
    36      @value.setter
    37 -    def value(self, value):
    38          ControlBase.value.fset(self,value)
    39          self._form.plainTextEdit.setPlainText(self._value)
    40