示例#1
0
    def __init__(self,
                 name=None,
                 description=None,
                 thumbnail=None,
                 icon=None,
                 path=None):
        QStandardItem.__init__(self)

        self.__name = ""

        if name is None:
            name = "Untitled"

        self.setName(name)

        if description is None:
            description = "No description."
        self.setDescription(description)

        if thumbnail is None:
            thumbnail = UNKNOWN_SVG
        self.setThumbnail(thumbnail)

        if icon is not None:
            self.setIcon(icon)

        if path is not None:
            self.setPath(path)
示例#2
0
    def __init__(self, parent=None, data=('', '')):
        QStandardItem.__init__(self, parent)
        (name, text) = data
        self.ui = Ui_ListItem()

        self.ui.setupUi(QWidget())
        self.ui.name_box.setText(name)
        self.ui.edit_box.setText(text)
        self.ui.edit_box.textChanged.connect(lambda x: print(x))
示例#3
0
	def __init__(self,xpos=0.0,ypos=0.0,zpos=0.0):
		QStandardItem.__init__(self,"X: "+str(xpos)+" Y: "+str(ypos)+" Z: "+str(zpos))
		try:
			self.x=float(xpos)
			self.y=float(ypos)
			self.z=float(zpos)
		except ValueError:
			#raise
			raise ValueError("could not set point values")
示例#4
0
    def __init__(self, internal_color):

        QStandardItem.__init__(self)

        self.internal_color = internal_color
        self._colors = jef_colors.color_mappings[internal_color]

        for thread_type in jef_colors.color_groups:
            if thread_type in self._colors:
                self.thread_type = thread_type
                break
        else:
            # We should never have an undefined thread type.
            self.thread_type = None

        self.setColor(internal_color, self.thread_type)
示例#5
0
 def __init__(self, text="", node_id: Id = None):
     QStandardItem.__init__(self, text)
     if node_id is None:
         node_id = Id()
     self.node_id = node_id
示例#6
0
 def __init__(self, key, value, dictTableRow = None):
     QStandardItem.__init__(self, value)
     self.__key = key
     # the DictTableRow this TableItem belongs to:
     self.__dictTableRow = dictTableRow
 def __init__(self, data):
     QStandardItem.__init__(self)
     self._logger = logging.getLogger(self.__class__.__name__)
     self._data = data
     self._text = self._get_text(data)
示例#8
0
 def __init__(self, data):
     QStandardItem.__init__(self)
     self._logger = logging.getLogger(self.__class__.__name__)
     self._data = data
     self._text = self._get_text(data)
示例#9
0
 def __init__(self, key, value, dictTableRow=None):
     #dictTableRow: reference to the DictTableRow instance containing
     #this TableItem
     QStandardItem.__init__(self, value)
     self.__key = key
     self.__dictTableRow = dictTableRow
示例#10
0
 def __init__(self, name: str):
     self.roi = None
     QStandardItem.__init__(self, name)
     self.setIcon(Icon('roi_item'))
示例#11
0
 def __init__(self, txt):
     QStandardItem.__init__(self, txt)
     if txt and txt.replace(".", "", 1).isdigit():
         self.setData(Qt.AlignRight | Qt.AlignVCenter, Qt.TextAlignmentRole)
示例#12
0
 def __init__(self, whg):
     QStandardItem.__init__(self, whg['whg_bez'])
     self.__whg = whg
示例#13
0
 def __init__(self, key, value):
     QStandardItem.__init__(self, value)
     self.__key = key
     self.__value = value
     self.__rechnung = None
示例#14
0
 def __init__(self, strasse):
     QStandardItem.__init__(self, strasse)
     self.__str = strasse
示例#15
0
 def __init__(self, plz, ort):
     QStandardItem.__init__(self, plz + ' ' + ort)
     self.__plz = plz
     self.__ort = ort
示例#16
0
 def __init__(self, text=None, link=None):
     if text is None:
         QStandardItem.__init__(self)
     else:
         QStandardItem.__init__(self, text)
     self.link = link
示例#17
0
 def __init__(self, text, *args, **kwargs):
     QStandardItem.__init__(self, *args, **kwargs)
     self.text = text
     self.children = {}
示例#18
0
 def __init__(self, name):
     QStandardItem.__init__(self, name)
     self.setEditable(False)
     self.setColumnCount(4)
     #self.setData(self)
     self.gpi = self.getRow