Beispiel #1
0
class GuiPrint():
    """There may be only one instance of this class, because of the
    slot declarations.
    """
    def __init__(self, appString, file=None):
        self.app = Application(appString)
        self.settings = self.app.settings

        slot("%s-closeMainWindow" % appString, self.slot_tidy)

        # Prepare the print handler
        self.pView = PrintView()

        self.init(file)

    def init(self, file):
        """Subsequent invocations of the print application start by
        reinitializing the print handler here.
        """
        self.gui = GuiWidget(self.settings)
        self.app.init(self.gui)

        # Set up the print gui
        self.pView.init(self.gui, file)

    def run(self):
        self.app.run()

    def slot_tidy(self, arg):
        """Stuff to do when the program quits
        """
        if self.pView.printer:
            self.pView.printer.abort()
Beispiel #2
0
class GuiPrint():
    """There may be only one instance of this class, because of the
    slot declarations.
    """
    def __init__(self, appString, file=None):
        self.app = Application(appString)
        self.settings = self.app.settings

        slot("%s-closeMainWindow" % appString, self.slot_tidy)

        # Prepare the print handler
        self.pView = PrintView()

        self.init(file)

    def init(self, file):
        """Subsequent invocations of the print application start by
        reinitializing the print handler here.
        """
        self.gui = GuiWidget(self.settings)
        self.app.init(self.gui)

        # Set up the print gui
        self.pView.init(self.gui, file)

    def run(self):
        self.app.run()

    def slot_tidy(self, arg):
        """Stuff to do when the program quits
        """
        if self.pView.printer:
            self.pView.printer.abort()
Beispiel #3
0
    def __init__(self, appString, file=None):
        self.app = Application(appString)
        self.settings = self.app.settings

        slot("%s-closeMainWindow" % appString, self.slot_tidy)

        # Prepare the print handler
        self.pView = PrintView()

        self.init(file)
Beispiel #4
0
    def __init__(self, appString, file=None):
        self.app = Application(appString)
        self.settings = self.app.settings

        slot("%s-closeMainWindow" % appString, self.slot_tidy)

        # Prepare the print handler
        self.pView = PrintView()

        self.init(file)