Beispiel #1
0
class FrameStack(QtWidgets.QStackedWidget):
    def __init__(self, parent):
        super(FrameStack, self).__init__(parent)
        self.main_window = parent
        self.idialog = ImageDialog()
        self.idialog.hide()

        manual = os.path.join(parent.environ.doc_dir, AtAssistant.Manual)
        self.assistant = AtAssistant(manual, None)
        self.assistant.hide()

        self.log_window = LogWindow(self)
        self._wmap = dict()

    def showLogWindow(self):
        self.log_window.show()
        self.log_window.raise_()

    def addWidget(self, widget):
        wi = super(FrameStack, self).addWidget(widget)
        self._wmap[type(widget)] = wi

    def widgetByType(self, type_):
        return self.widget(self._wmap[type_])

    def removeWidget(self, widget):
        del self._wmap[type(widget)]
        super(FrameStack, self).removeWidget(widget)

    def close(self):
        self.assistant.close()
Beispiel #2
0
class FrameStack(QtWidgets.QStackedWidget):

    def __init__(self, parent):
        super(FrameStack, self).__init__(parent)
        self.main_window = parent
        self.idialog = ImageDialog()
        self.idialog.hide()

        manual = os.path.join(parent.environ.doc_dir, AtAssistant.Manual)
        self.assistant = AtAssistant(manual, None)
        self.assistant.hide()

        self.log_window = LogWindow(self)
        self._wmap = dict()

    def showLogWindow(self):
        self.log_window.show()
        self.log_window.raise_()

    def addWidget(self, widget):
        wi = super(FrameStack, self).addWidget(widget)
        self._wmap[type(widget)] = wi

    def widgetByType(self, type_):
        return self.widget(self._wmap[type_])

    def removeWidget(self, widget):
        del self._wmap[type(widget)]
        super(FrameStack, self).removeWidget(widget)

    def close(self):
        self.assistant.close()
Beispiel #3
0
class FrameStack(QtGui.QStackedWidget):

    def __init__(self, parent):
        super(FrameStack, self).__init__(parent)
        self.main_window = parent
        self.idialog = ImageDialog()
        self.idialog.hide()

        self.helpbrowser = HelpBrowser()
        self.helpbrowser.hide()

        self._wmap = dict()

    def addWidget(self, widget):
        wi = super(FrameStack, self).addWidget(widget)
        self._wmap[type(widget)] = wi

    def widgetByType(self, type_):
        return self.widget(self._wmap[type_])

    def removeWidget(self, widget):
        del self._wmap[type(widget)]
        super(FrameStack, self).removeWidget(widget)