Ejemplo n.º 1
0
 def __init__(self, parent=None, icon=None, color ='white'):
     QtWidgets.QPushButton.__init__(self, parent=parent)
     self.color = color;
     self.bgColor = button_color
     self.hoverColor = button_color_hover
     self.setMouseTracking(True)
     self.setText('')
     if icon:
         self.setIcon(icon)
     self.setIconSize(QtCore.QSize(16, 16))
     self.setMaximumSize(QtCore.QSize(19, 19))
     self.setStyleSheet("background: rgba(255,255,255,0.1);")
Ejemplo n.º 2
0
 def __init__(self, parent=None, width = 320, height =180):
     QtWidgets.QPushButton.__init__(self, parent=parent)
     self.setMouseTracking(True)
     self.setStyleSheet("background-color: rgba(0,0,0,0.1); border: none; margin: 0;")
     self.setIcon(logo_icon)
     self.setIconSize(QtCore.QSize(width, height))
     self.setMinimumSize(width,height)
     self.setToolTip('Play Clip')
Ejemplo n.º 3
0
    def __init__(self, parent=None, color ='white'):
        QtWidgets.QPushButton.__init__(self, parent=parent)
        self.color = color;
        self.bgColor = button_color
        self.hoverColor = button_color_hover
        self.setMouseTracking(True)
        self.setMinimumSize(40,40)
        self.setIconSize(QtCore.QSize(32, 32))

        self.setMaximumWidth(header_size)
        self.setMaximumHeight(header_size)

        self.setStyleSheet("margin:1; background-color: rgba(255,255,255,0.1); border: none;")
    def build_screenshot(self, preset_name=None):
        if not preset_name:
            preset_name = self.ui.ui_viewportpreset_comboBox.currentText()

        preset_file = path.get_config_yaml(VIEWPORT_YAML)

        current_camera = database.read_cache('selected_camera')
        fname = maya_scene.screenshot_current_editor(preset_file,
                                                     preset_name,
                                                     camera=current_camera)
        self.ui.ui_status_label.update(preset_name)
        if not fname:
            self.ui.screenshot_pushButton.setIcon(logo_icon)
        else:
            icon = _get_qicon(fname)
            self.ui.screenshot_pushButton.setIcon(icon)
            self.ui.ui_status_label.update(
                "Previewing Preset '%s' - from camera '%s'" %
                (preset_name, current_camera))
        self.ui.screenshot_pushButton.setText('')
        self.ui.screenshot_pushButton.setIconSize(QtCore.QSize(480, 270))

        self.setWindowIcon(logo_icon)