class ExperimentalIVCurveItem(IVCurveItem):
    def __init__(self, parent=None, path=None):
        super(ExperimentalIVCurveItem, self).__init__(parent)
        self.setIcon(0, QtGui.QIcon(":/iv_expt.svg"))
        self.setText(0, "Experimental IV")


class TheoreticalIVCurveItem(IVCurveItem):
    def __init__(self, parent=None, path=None):
        super(TheoreticalIVCurveItem, self).__init__(parent)
        self.setIcon(0, QtGui.QIcon(":/iv_theory.svg"))
        self.setText(0, "Theoretical IV")
        self.setFlags(self.flags())


if __name__ == '__main__':
    import sys
    app = QtGui.QApplication(sys.argv)
    explorer = ProjectTreeWidget()

    project = ProjectItem()
    #pro2 = ProjectItem()
    explorer.addTopLevelItem(project)
    for child in project.getChildren(project):
        child.setExpanded(True)
    #explorer.addTopLevelItem(pro2)

    explorer.show()
    app.exec_()
Beispiel #2
0
    def save(self, filename, *args):
        '''save an image of the model'''
        self.pymol.cmd.save(filename, *args)

    def _show_cell(self, show):
        if show:
            self.pymol.cmd.do("show cell, {}".format(self.model_name))
        else:
            self.pymol.cmd.do("hide cell, {}".format(self.model_name))


# You don't need anything below this
class PyMolWidgetDemo(QtGui.QMainWindow):
    '''demo class for showing PyMolWidget class'''
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        usr = os.path.expanduser('~/')
        widget = PymolQtWidget(self,
                               False,
                               os.path.join(
                                   usr, r"Dropbox\Structures\spinel111.xyz"),
                               unit_cell=True)
        self.setCentralWidget(widget)


if __name__ == '__main__':
    app = QtGui.QApplication(['PyMol Widget Demo'])
    window = PyMolWidgetDemo()
    window.show()
    app.exec_()
Beispiel #3
0
def main():
    app  = QtGui.QApplication([])
    widget = CLEEDConsoleWidget()
    widget.show()
    app.exec_()