Exemple #1
0
class DataSetShowWidget(AbstractDataSetWidget):
    """Read-only base widget"""
    READ_ONLY = True
    def __init__(self, item, parent_layout):
        AbstractDataSetWidget.__init__(self, item, parent_layout)
        self.group = QLabel()
        wordwrap = item.get_prop_value("display", "wordwrap", False)
        self.group.setWordWrap(wordwrap)
        self.group.setToolTip(item.get_help())
        self.group.setStyleSheet( LABEL_CSS )
        self.group.setTextInteractionFlags(Qt.TextSelectableByMouse)
        #self.group.setEnabled(False)

    def get(self):
        """Override AbstractDataSetWidget method"""
        self.set_state()
        text = self.item.get_string_value()
        self.group.setText(text)

    def set(self):
        """Read only..."""
        pass
Exemple #2
0
class DataSetShowWidget(AbstractDataSetWidget):
    """Read-only base widget"""
    READ_ONLY = True
    def __init__(self, item, parent_layout):
        AbstractDataSetWidget.__init__(self, item, parent_layout)
        self.group = QLabel()
        wordwrap = item.get_prop_value("display", "wordwrap", False)
        self.group.setWordWrap(wordwrap)
        self.group.setToolTip(item.get_help())
        self.group.setStyleSheet( LABEL_CSS )
        self.group.setTextInteractionFlags(Qt.TextSelectableByMouse)
        #self.group.setEnabled(False)

    def get(self):
        """Override AbstractDataSetWidget method"""
        self.set_state()
        text = self.item.get_string_value()
        self.group.setText(text)

    def set(self):
        """Read only..."""
        pass