Пример #1
0
    def __init__(self, parent=None):
        self.btnFade = OptionButton()
        self.btnFade.setText("Fade")
        self.btnFade.setIcon(QIcon("icons/preferences-desktop-screensaver.svg"))

        self.btnOverlay = OptionButton()
        self.btnOverlay.setText("Overlay")
        self.btnOverlay.setIcon(QIcon("icons/preferences-system-windows.svg"))

        super(EclipseWidget, self).__init__(parent)
Пример #2
0
    def __init__(self, parent=None):
        super(OverscanFreezeWidget, self).__init__(parent)

        self.btnOverscan = OptionButton()
        self.btnOverscan.setText("Overscan")
        self.btnOverscan.setChecked(True)
        self.btnOverscan.setIcon(QIcon("icons/view-fullscreen.svg"))

        self.btnFreeze = OptionButton()
        self.btnFreeze.setText("Freeze")
        self.btnFreeze.setIcon(QIcon("icons/media-playback-pause.svg"))

        self.layout()
Пример #3
0
class EclipseWidget(OverscanFreezeWidget):

    def __init__(self, parent=None):
        self.btnFade = OptionButton()
        self.btnFade.setText("Fade")
        self.btnFade.setIcon(QIcon("icons/preferences-desktop-screensaver.svg"))

        self.btnOverlay = OptionButton()
        self.btnOverlay.setText("Overlay")
        self.btnOverlay.setIcon(QIcon("icons/preferences-system-windows.svg"))

        super(EclipseWidget, self).__init__(parent)

    def layout(self):
        layout = QGridLayout()
        layout.addWidget(self.btnOverlay, 0, 0)
        layout.addWidget(self.btnOverscan, 0, 1)
        layout.addWidget(self.btnFreeze, 1, 0)
        layout.addWidget(self.btnFade, 1, 1)
        self.setLayout(layout)
Пример #4
0
    def makeContent(self):
        layout = QGridLayout()

        self.posDisplay = QGridLayout()

        self.posDisplay.addWidget(QLabel("Pan:"), 0, 0)
        self.posDisplay.addWidget(QLabel("Tilt:"), 1, 0)
        self.posDisplay.addWidget(QLabel("Zoom:"), 2, 0)

        self.posDisplay.addWidget(QLabel(), 0, 1)
        self.posDisplay.addWidget(QLabel(), 1, 1)
        self.posDisplay.addWidget(QLabel(), 2, 1)

        layout.addLayout(self.posDisplay, 1, 0)

        btnGetPos = ExpandingButton()
        btnGetPos.setText("Get Position")
        btnGetPos.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
        layout.addWidget(btnGetPos, 2, 0)
        btnGetPos.clicked.connect(self.displayPosition)

        whiteBalanceGrid = QGridLayout()
        wbTitle = QLabel("White Balance")
        wbTitle.setAlignment(Qt.AlignCenter)
        whiteBalanceGrid.addWidget(wbTitle, 0, 0, 1, 2)

        btnAuto = OptionButton()
        btnAuto.setText("Auto")
        btnAuto.clicked.connect(lambda: self.controller.whiteBalance(self.cameraID, CameraWhiteBalance.Auto))
        whiteBalanceGrid.addWidget(btnAuto, 1, 0)

        btnIndoor = OptionButton()
        btnIndoor.setText("Indoor")
        btnIndoor.clicked.connect(lambda: self.controller.whiteBalance(self.cameraID, CameraWhiteBalance.Indoor))
        whiteBalanceGrid.addWidget(btnIndoor, 2, 0)

        btnOutdoor = OptionButton()
        btnOutdoor.setText("Outdoor")
        btnOutdoor.clicked.connect(lambda: self.controller.whiteBalance(self.cameraID, CameraWhiteBalance.Outdoor))
        whiteBalanceGrid.addWidget(btnOutdoor, 3, 0)

        btnOnePush = OptionButton()
        btnOnePush.setText("One Push")
        btnOnePush.clicked.connect(lambda: self.controller.whiteBalance(self.cameraID, CameraWhiteBalance.OnePush))
        whiteBalanceGrid.addWidget(btnOnePush, 4, 0)

        btnOnePushTrigger = ExpandingButton()
        btnOnePushTrigger.setText("Set")
        btnOnePushTrigger.clicked.connect(lambda: self.controller.whiteBalance(self.cameraID, CameraWhiteBalance.Trigger))
        btnOnePushTrigger.setEnabled(False)
        whiteBalanceGrid.addWidget(btnOnePushTrigger, 4, 1)

        self.wbOpts = QButtonGroup()
        self.wbOpts.addButton(btnAuto, 1)
        self.wbOpts.addButton(btnIndoor, 2)
        self.wbOpts.addButton(btnOutdoor, 3)
        self.wbOpts.addButton(btnOnePush, 4)
        self.wbOpts.buttonClicked.connect(lambda: btnOnePushTrigger.setEnabled(self.wbOpts.checkedId() == 4))

        layout.addLayout(whiteBalanceGrid, 1, 1, 2, 1)

        return layout