Example #1
0
class BlobForm(QtGui.QWidget):
    def __init__(self, device, theproperty, index, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_BlobForm()
        self.ui.setupUi(self)
        self.device = device
        self.property = theproperty
        self.blobindex = index
        self.indibvp = self.property.indiproperty.getBLOB()
        self.blob = self.indibvp.bp[self.blobindex]
        self.setWindowTitle("BLOB - " + self.property.label +
                            self.property.name + " from " + self.device.name +
                            "@" + self.device.server.name)
        self.viewer = DefaultViewer(self.blob, self.ui.widgetViewer)

    def updateBLOB(self):
        self.isCompressed = False
        blobformat = self.blob.format.lower()
        print("updateBLOB: format " + blobformat)
        if blobformat.endswith(".z"):
            self.isCompressed = True
        self.ui.labelTypeValue.setText(self.blob.format)
        if self.isCompressed:
            self.ui.checkBoxCompressed.setCheckState(QtCore.Qt.Checked)
        else:
            self.ui.checkBoxCompressed.setCheckState(QtCore.Qt.Unchecked)
        self.ui.labelSizeValue.setText(str(self.blob.size) + " bytes")
        self.ui.labelLenValue.setText(str(self.blob.bloblen) + " bytes")
        timestamp = self.indibvp.timestamp
        if timestamp and timestamp != "":
            self.ui.labelTimeStampValue.setText(timestamp)
        else:
            self.ui.labelTimeStampValue.setText("None")
        self.viewer.update()
Example #2
0
class BlobForm(QtGui.QWidget):
  def __init__(self, device, theproperty, index, parent=None):
    QtGui.QWidget.__init__(self, parent)
    self.ui = Ui_BlobForm()
    self.ui.setupUi(self)
    self.device=device
    self.property=theproperty
    self.blobindex=index
    self.indibvp=self.property.indiproperty.getBLOB()
    self.blob=self.indibvp.bp[self.blobindex]
    self.setWindowTitle("BLOB - " + self.property.label+self.property.name+" from "+ self.device.name+"@"+self.device.server.name)
    self.viewer=DefaultViewer(self.blob, self.ui.widgetViewer)

  def updateBLOB(self):
    self.isCompressed=False
    blobformat=self.blob.format.lower()
    print("updateBLOB: format "+blobformat)
    if blobformat.endswith(".z"):
         self.isCompressed=True
    self.ui.labelTypeValue.setText(self.blob.format)  
    if self.isCompressed:
         self.ui.checkBoxCompressed.setCheckState(QtCore.Qt.Checked)
    else:
         self.ui.checkBoxCompressed.setCheckState(QtCore.Qt.Unchecked)
    self.ui.labelSizeValue.setText(str(self.blob.size)+" bytes")
    self.ui.labelLenValue.setText(str(self.blob.bloblen)+" bytes")
    timestamp=self.indibvp.timestamp
    if timestamp and timestamp!="":
         self.ui.labelTimeStampValue.setText(timestamp)
    else:
         self.ui.labelTimeStampValue.setText("None")
    self.viewer.update()
Example #3
0
 def __init__(self, device, theproperty, index, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_BlobForm()
     self.ui.setupUi(self)
     self.device = device
     self.property = theproperty
     self.blobindex = index
     self.indibvp = self.property.indiproperty.getBLOB()
     self.blob = self.indibvp.bp[self.blobindex]
     self.setWindowTitle("BLOB - " + self.property.label +
                         self.property.name + " from " + self.device.name +
                         "@" + self.device.server.name)
     self.viewer = DefaultViewer(self.blob, self.ui.widgetViewer)
Example #4
0
 def __init__(self, device, theproperty, index, parent=None):
   QtGui.QWidget.__init__(self, parent)
   self.ui = Ui_BlobForm()
   self.ui.setupUi(self)
   self.device=device
   self.property=theproperty
   self.blobindex=index
   self.indibvp=self.property.indiproperty.getBLOB()
   self.blob=self.indibvp.bp[self.blobindex]
   self.setWindowTitle("BLOB - " + self.property.label+self.property.name+" from "+ self.device.name+"@"+self.device.server.name)
   self.viewer=DefaultViewer(self.blob, self.ui.widgetViewer)