예제 #1
0
    def __init__(self, parent=None, iv_pair=None):
        super(IVInfoItem, self).__init__(parent)
        self.setIcon(0, QtGui.QIcon(":/index.svg"))
        self.setText(0, '(h, k)')

        self.expt = ExperimentalIVCurveItem()
        self.theory = TheoreticalIVCurveItem()

        self.id = QtGui.QTreeWidgetItem()
        self.id.setText(0, 'ID')
        self.id.setIcon(0, QtGui.QIcon(":/id.svg"))

        self.weight = QtGui.QTreeWidgetItem()
        self.weight.setText(0, 'Weight')
        self.weight.setIcon(0, QtGui.QIcon(":/eject.svg"))

        self.rfactor = QtGui.QTreeWidgetItem()
        self.rfactor.setText(0, 'Rfactor')
        self.rfactor.setIcon(0, QtGui.QIcon(':/rf.svg'))

        self.addChildren(
            [self.expt, self.theory, self.id, self.weight, self.rfactor])

        try:
            if isinstance(iv_pair, IVCurvePair):
                self.load(iv_pair)
        except:
            pass

        def load(self, iv_pair):
            pass
예제 #2
0
    def __init__(self, parent=None, path=None, ivs=[]):
        super(IVGroupItem, self).__init__(parent)
        self.setIcon(0, QtGui.QIcon(":/list.svg"))
        self.setText(0, 'IV_Group')

        # initialise actions
        self.iv_pairs = [IVInfoItem()]

        for iv in self.iv_pairs:
            self.addChild(iv)

        # initialise other aspects
        self.theta = QtGui.QTreeWidgetItem()
        self.theta.setText(0, 'Theta')
        self.theta.setIcon(0, QtGui.QIcon(':/theta.svg'))

        self.phi = QtGui.QTreeWidgetItem()
        self.phi.setText(0, 'Phi')
        self.phi.setIcon(0, QtGui.QIcon(':/phi.svg'))

        self.enabled = QtGui.QTreeWidgetItem()
        self.enabled.setText(0, 'Enabled')
        self.enabled.setIcon(0, QtGui.QIcon(':/check.svg'))

        self.rfactor = QtGui.QTreeWidgetItem()
        self.rfactor.setText(0, 'Rfactor')
        self.rfactor.setIcon(0, QtGui.QIcon(':/rf.svg'))

        self.addChildren([self.theta, self.phi, self.enabled, self.rfactor])