Example #1
0
def _displayGUI(manager, name):
    global __dialog
    if not __dialog:
        global __app
        if __app is None:
            __app = pyqtapplication()

            # since I upgraded to pyqt 4.11.3, the QT input hook turned
            # *extremely* slow. The terminal is not usable anymore once the
            # QApplication gets created. One can try disabling / re-enabling
            # the input hook with functions:
            #
            # pyqtRemoveInputHook()
            # pyqtRestoreInputHook()
            #
            # These functions were developed with pdb (ugh!) users in mind
            # though. They are not meant to be used to fix a problems like
            # the one at hand now. If we call pyqtRemoveInputHook, the command
            # line response time gets back to normal, but the GUI freezes with
            # the spinning beach ball. Calling pyqtRestoreInputHook causes the
            # bug to reappear.

        __dialog = _ModelManagerWidget(manager.manager, name)

    else:
        __dialog._addManager(manager.manager, name)
        __dialog.setVisible(True)
Example #2
0
def _displayGUI(manager, name):
    global __dialog
    if not __dialog:
        global __app
        __app = QApplication([])
        if __app is None:
            __app = pyqtapplication()
        __dialog = _ModelManagerWidget(manager.manager, name)
    else:
        __dialog._addManager(manager.manager, name)
        __dialog.setVisible(True)
Example #3
0
def _displayGUI(manager, name):
    global __dialog
    if not __dialog:
        global __app
        __app = QApplication([])
        if __app is None:
            __app = pyqtapplication()
        __dialog = _ModelManagerWidget(manager.manager, name)
    else:
        __dialog._addManager(manager.manager, name)
        __dialog.setVisible(True)
Example #4
0
    def __init__(self, parent=None):

        if self.__class__.app is None:
            self.__class__.app = pyqtapplication()
        if self.__class__.hub is None:
            self.__class__.hub = Hub()

        super(SpecViewer, self).__init__(parent)

        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.view = SpectrumView(self)
        self.add_viewer(self.view)

        self.setCentralWidget(self.view)

        self.show()
Example #5
0
    def __init__(self, parent=None):

        if self.__class__.app is None:
            self.__class__.app = pyqtapplication()
            if not getattr(self.__class__.app, '_svs_signals', None):
                self.__class__.app._svs_signals = Signals(signal_class=Signal)
        self.signals = self.__class__.app._svs_signals

        super(SpecViewer, self).__init__(parent=parent)

        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.view = (SpectrumView(parent=self))

        self.setCentralWidget(self.view)

        self.show()
Example #6
0
    def __init__(self, parent=None):

        if self.__class__.app is None:
            self.__class__.app = pyqtapplication()
        if self.__class__.signal_handler is None:
            self.__class__.signal_handler = Signals()

        super(SpecViewer, self).__init__(parent)

        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.view = SpectrumView(self)
        self.add_viewer(self.view)

        self.setCentralWidget(self.view)

        self.show()