Example #1
0
    def __init__(self, *args):
        apply(QWidget.__init__, (self,) + args)

        self.img = ctx.iconfactory.newImage("bottom_image")

        self._layout = QHBoxLayout(self)
        self._layout.setSpacing(20)
        self._layout.setMargin(10)


        self.relNotes = RelButton(self)
        self.relNotes.setIcon("relnotes_button")
        self.relNotes.setText(_("Release Notes"))
        self._layout.addWidget(self.relNotes)
        self._layout.addStretch(1)


        self.nextButton = GUINavButton.nextButton(self)
        self.prevButton = GUINavButton.prevButton(self)

        buttons = QHBoxLayout(self._layout)
#        buttons.addStretch(1)
        buttons.addWidget(self.prevButton)
        buttons.addWidget(self.nextButton)
        self.buttonSpacer = QSpacerItem(0, 0, QSizePolicy.Fixed, QSizePolicy.Fixed)
        buttons.addItem(self.buttonSpacer)


        self.connect(self.relNotes, PYSIGNAL("signalClicked"),
                     self.showReleaseNotes)

        self.connect(self.nextButton, PYSIGNAL("signalClicked"),
                     self.slotNextScreen)
        self.connect(self.prevButton, PYSIGNAL("signalClicked"),
                     self.slotPrevScreen)
Example #2
0
    def __init__(self, *args):
        apply(QMainWindow.__init__, (self,) + args)

        self.topWidget = GUITop.Widget(self)
        self.contentWidget = GUIContentStack.Widget(self)
        self.helpWidget = GUIHelp.Widget(self)
        self.nextButton = GUINavButton.nextButton(self)
        self.prevButton = GUINavButton.prevButton(self)
        self.relNotes = QPushButton(_("Release Notes"), self)

        # Place the widgets using layouts and yada, yada, yada...
        self.__setUpWidgets()

        self.connect(self.nextButton, PYSIGNAL("signalClicked"),
                     self.slotNextScreen)
        self.connect(self.prevButton, PYSIGNAL("signalClicked"),
                     self.slotPrevScreen)

        self.connect(self, PYSIGNAL("signalWindowSize"),
                     self.topWidget.slotResize)
        self.connect(self, PYSIGNAL("signalWindowSize"),
                     self.helpWidget.slotResize)

        self.connect(ctx.screens, PYSIGNAL("nextButtonDisabled"),
                     self.slotNextDisabled)
        self.connect(ctx.screens, PYSIGNAL("prevButtonDisabled"),
                     self.slotPrevDisabled)
        self.connect(ctx.screens, PYSIGNAL("nextButtonEnabled"),
                     self.slotNextEnabled)
        self.connect(ctx.screens, PYSIGNAL("prevButtonEnabled"),
                     self.slotPrevEnabled)


        self.connect(self.relNotes, SIGNAL("clicked()"),
                     self.showReleaseNotes)


        self.setPaletteBackgroundPixmap(ctx.iconfactory.newPixmap("back_tile"))