예제 #1
0
    def __style(self, text):
        reg_exp = QtCore.QRegExp('[a-zA-Z0-9_]+')
        validator = QtGui.QRegExpValidator(reg_exp, self)
        self.setValidator(validator)
        font = QtGui.QFont()
        font.setBold(True)
        font.setPointSize(15)
        self.setFont(font)

        self.text_label = QtWidgets.QLabel(self)
        self.text_label.setFocusPolicy(QtCore.Qt.NoFocus)
        self.text_label.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.text_label.setFont(font)
        self.text_label.setText(text)
        self.text_label.setStyleSheet("color: rgb{0}".format(self.color))
        self.text_label.setEnabled(False)

        self.main_layout = QtWidgets.QHBoxLayout()
        self.main_layout.addWidget(self.text_label)
        self.main_layout.addStretch()
        self.main_layout.setContentsMargins(4, 0, 0, 0)

        self.setFocusPolicy(QtCore.Qt.TabFocus | QtCore.Qt.ClickFocus
                            | QtCore.Qt.StrongFocus)
        self.setFrame(False)
        self.setTextMargins(self.get_text_width() + 12, 0, 0, 0)
        self.setContentsMargins(0, 0, 0, 0)
        self.setLayout(self.main_layout)

        self.setMinimumSize(QtCore.QSize(30, 30))
예제 #2
0
    def __style(self):
        reg_exp = QtCore.QRegExp('[a-zA-Z0-9_]+')
        validator = QtGui.QRegExpValidator(reg_exp, self)
        self.setValidator(validator)
        self.setFocusPolicy(QtCore.Qt.TabFocus | QtCore.Qt.ClickFocus)
        self.setFrame(False)
        self.setTextMargins(24, 0, 0, 0)
        self.setContentsMargins(0, 0, 0, 0)
        self.setStyleSheet("color: rgb(200, 200, 200, 255)")

        # self.icon_btn = QtWidgets.QPushButton(self)
        # self.icon_btn.setFixedSize(25, 25)
        # self.icon_btn.setIconSize(QtCore.QSize(20, 20))
        # self.icon_btn.setFocusPolicy(QtCore.Qt.NoFocus)
        # self.icon_btn.setFlat(True)
        # self.icon_btn.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        # self.icon_btn.setEnabled(False)
        # self.icon_btn.setIcon(self.icon)
        # self.icon_btn.setStyleSheet("QPushButton{background:transparent;}")

        self.label_icon = QtWidgets.QLabel(self)
        self.label_icon.setFixedSize(25, 25)
        self.label_icon.setFocusPolicy(QtCore.Qt.NoFocus)
        self.label_icon.setStyleSheet("background:transparent;")
        self.label_icon.setPixmap(self.icon.pixmap(20, 20))
        self.label_icon.setEnabled(False)

        self.lock_btn = QtWidgets.QPushButton(self)
        self.lock_btn.setFixedSize(15, 28)
        self.lock_btn.setIconSize(QtCore.QSize(15, 15))
        self.lock_btn.setFocusPolicy(QtCore.Qt.NoFocus)
        self.lock_btn.setFlat(False)
        self.lock_btn.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
        self.lock_btn.setEnabled(True)
        self.lock_btn.setIcon(self.unlock_icon)
        self.lock_btn.setStyleSheet(
            "QPushButton{background-color: rgb(25, 25, 25, 75);}"
            "QPushButton:hover{background-color: rgb(0, 0, 0, 0);}")

        self.main_layout = QtWidgets.QHBoxLayout()
        self.main_layout.addWidget(self.label_icon)
        self.main_layout.addItem(
            QtWidgets.QSpacerItem(10000, 20, QtWidgets.QSizePolicy.Expanding,
                                  QtWidgets.QSizePolicy.Expanding))
        self.main_layout.addWidget(self.lock_btn)
        self.main_layout.addStretch()
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        self.setLayout(self.main_layout)
        self.setMinimumSize(QtCore.QSize(30, 30))
        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Minimum)
        self.setSizePolicy(size_policy)
예제 #3
0
    def __style(self):
        self.setMinimumSize(QtCore.QSize(self.wh[0], self.wh[1]))
        self.setMaximumSize(QtCore.QSize(250, 40))

        font = QtGui.QFont()
        font.setBold(True)
        self.setFont(font)
        self.setMouseTracking(True)
        self.setText(self.text)
        self.setStyleSheet(
            "background-color: rgb({0}, {1}, {2}, {3});".format(self.basic[0], self.basic[1],
                                                                self.basic[2], self.basic[3])
        )

        self.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.setAlignment(QtCore.Qt.AlignCenter)
예제 #4
0
    def __init__(self, parent=None, front_color=None, background_color=None, *args):
        QtWidgets.QLabel.__init__(self, parent, *args)
        if front_color is None:
            front_color = (255, 255, 255)
        if background_color is None:
            background_color = (0, 0, 0)

        self._alpha = 255

        self.__style()
        self.front_color = QtGui.QColor(front_color[0], front_color[1], front_color[2])
        self.background_color = QtGui.QColor(background_color[0], background_color[1], background_color[2])
        self._message_display_timer = QtCore.QTimer(self)
        self._message_display_timer.timeout.connect(self.display)
        self._message_fadeout_timer = QtCore.QTimer(self)
        self._message_fadeout_timer.timeout.connect(self.fadeout)
예제 #5
0
    def reset(self):
        if not self._timer:
            self._timer = QtCore.QTimer(self.parent())
            self._timer.setSingleShot(False)
            self._timer.timeout.connect(self._frame_changed)

        if not self._paused:
            self._frame = 0
        self._timer.stop()
예제 #6
0
    def __style(self):
        self.setMinimumSize(QtCore.QSize(self.wh[0], self.wh[1]))
        self.setMaximumSize(QtCore.QSize(self.wh[0], self.wh[1]))
        self.setMouseTracking(True)
        self.setScaledContents(True)
        self.setAlignment(QtCore.Qt.AlignCenter)
        self.setPixmap(self.pixmap)

        self.close_btn = QtWidgets.QPushButton(self)
        self.close_btn.setFlat(True)
        self.close_btn.setMouseTracking(True)
        self.close_btn.setMinimumSize(QtCore.QSize(int(self.wh[0]/5), int(self.wh[0]/5)))
        self.close_btn.setMaximumSize(QtCore.QSize(int(self.wh[0]/5), int(self.wh[0]/5)))
        self.close_btn.setIcon(self.close_icon)
        self.close_btn.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.close_btn.setGeometry(
            self.width()-self.close_btn.width(), 0, self.close_btn.width(), self.close_btn.height()
        )
        self.close_btn.hide()
예제 #7
0
class ColorfulBGLabel(QtWidgets.QLabel):
    toggled = QtCore.pyqtSignal()

    def __init__(self, parent=None, wh=(40, 16), text='', basic=(75, 75, 75, 255), color=(255, 255, 255, 255)):
        super(ColorfulBGLabel, self).__init__(parent)
        self.state = False

        self.wh = wh
        self.text = text
        self.basic = basic
        self.color = color

        self.__style()

    def __style(self):
        self.setMinimumSize(QtCore.QSize(self.wh[0], self.wh[1]))
        self.setMaximumSize(QtCore.QSize(250, 40))

        font = QtGui.QFont()
        font.setBold(True)
        self.setFont(font)
        self.setMouseTracking(True)
        self.setText(self.text)
        self.setStyleSheet(
            "background-color: rgb({0}, {1}, {2}, {3});".format(self.basic[0], self.basic[1],
                                                                self.basic[2], self.basic[3])
        )

        self.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.setAlignment(QtCore.Qt.AlignCenter)

    def on(self):
        self.state = True
        self.setStyleSheet(
            "background-color: rgb({0}, {1}, {2}, {3});".format(self.color[0], self.color[1],
                                                                self.color[2], self.color[3])
        )

    def off(self):
        self.state = False
        self.setStyleSheet(
            "background-color: rgb({0}, {1}, {2}, {3});".format(self.basic[0], self.basic[1],
                                                                self.basic[2], self.basic[3])
        )

    def toggle(self):
        if self.state:
            self.off()
        else:
            self.on()

    def mousePressEvent(self, event):
        self.toggle()
        self.toggled.emit()
        event.accept()
예제 #8
0
 def set_color(self, color, size=None):
     icon = self
     size = size or icon.actualSize(QtCore.QSize(256, 256))
     pixmap = icon.pixmap(size)
     if not self.isNull():
         painter = QtGui.QPainter(pixmap)
         painter.setCompositionMode(QtGui.QPainter.CompositionMode_SourceIn)
         painter.setBrush(color)
         painter.setPen(color)
         painter.drawRect(pixmap.rect())
         painter.end()
     icon = QtGui.QIcon(pixmap)
     self.swap(icon)
예제 #9
0
    def __style(self):
        self.setMinimumSize(QtCore.QSize(self.wh[0], self.wh[1]))
        self.setMaximumSize(QtCore.QSize(self.wh[0], self.wh[1]))
        self.setMouseTracking(False)
        self.setScaledContents(True)
        self.setAlignment(QtCore.Qt.AlignCenter)
        self.setPixmap(self.pixmap)

        self.close_btn = QtWidgets.QPushButton(self)
        self.close_btn.setFlat(True)
        self.close_btn.setMouseTracking(False)
        self.close_btn.setMinimumSize(QtCore.QSize(int(self.wh[0] / 5), int(self.wh[0] / 5)))
        self.close_btn.setMaximumSize(QtCore.QSize(int(self.wh[0] / 5), int(self.wh[0] / 5)))
        self.close_btn.setIcon(self.close_icon)
        self.close_btn.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))

        self.comb_box = QtWidgets.QComboBox(self)
        self.comb_box.setFocusPolicy(QtCore.Qt.TabFocus | QtCore.Qt.ClickFocus)
        self.comb_box.setFrame(False)
        self.comb_box.setIconSize(QtCore.QSize(16, 16))
        self.comb_box.addItem(self.image_icon, '')
        for c in string.hexdigits[0:10]:
            self.comb_box.addItem(self.image_icon, c)
예제 #10
0
    def __style(self, icon):
        reg_exp = QtCore.QRegExp('[a-zA-Z0-9_]+')
        validator = QtGui.QRegExpValidator(reg_exp, self)
        self.setValidator(validator)
        # self.icon_btn = QtWidgets.QPushButton(self)
        # self.icon_btn.setFixedSize(25, 25)
        # self.icon_btn.setIconSize(QtCore.QSize(20, 20))
        # self.icon_btn.setFocusPolicy(QtCore.Qt.NoFocus)
        # self.icon_btn.setFlat(True)
        # self.icon_btn.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        # self.icon_btn.setEnabled(False)
        # self.icon_btn.setIcon(icon)
        # self.icon_btn.setStyleSheet("QPushButton{background:transparent;}")

        self.label_icon = QtWidgets.QLabel(self)
        self.label_icon.setFixedSize(25, 25)
        self.label_icon.setFocusPolicy(QtCore.Qt.NoFocus)
        self.label_icon.setStyleSheet("background:transparent;")
        self.label_icon.setPixmap(icon.pixmap(20, 20))
        self.label_icon.setEnabled(False)

        self.main_layout = QtWidgets.QHBoxLayout(self)
        self.main_layout.addWidget(self.label_icon)
        self.main_layout.addStretch()
        self.main_layout.setContentsMargins(2, 0, 0, 0)

        self.setFocusPolicy(QtCore.Qt.TabFocus | QtCore.Qt.ClickFocus)
        self.setFrame(False)
        self.setTextMargins(24, 0, 0, 0)
        self.setContentsMargins(0, 0, 0, 0)
        self.setLayout(self.main_layout)

        self.setSizePolicy(
            QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                  QtWidgets.QSizePolicy.Minimum))
        self.setMinimumSize(QtCore.QSize(30, 30))
예제 #11
0
    def __init__(self, parent=None, fps=24, timer=5, *args):
        QtWidgets.QLabel.__init__(self, parent, *args)

        self.__style()
        self._fps = fps
        self.timer = timer * 100

        self._filename = None
        self._image_sequence = ImageSequence(self._fps)
        self._image_sequence.frame_changed.connect(self._frame_changed)

        self.player_install = False
        self.player_install_timer = QtCore.QTimer(self.parent())
        self.player_install_timer.setSingleShot(False)
        self.player_install_timer.timeout.connect(self.__start)
예제 #12
0
class RadioAction(QtWidgets.QWidgetAction):

    _toggled = QtCore.pyqtSignal(str)

    def __init__(self, parent=None, labels=None):
        """
        type parent: QtGui.QMenu
        """

        QtWidgets.QWidgetAction.__init__(self, parent)

        self.labels = labels
        self._frame = QtWidgets.QFrame(parent)

        self.radio_buttons = []

    def frame(self):
        return self._frame

    def radios(self):
        return self.radio_buttons

    def checked(self):
        for radio_button in self.radio_buttons:
            if radio_button.isChecked():
                self._toggled.emit(str(radio_button.text()).lower())
                break

    def createWidget(self, parent=None):
        """
        type parent: QtGui.QMenu
        """
        action_widget = self.frame()
        action_layout = QtWidgets.QVBoxLayout(action_widget)
        action_layout.setSpacing(5)

        action_layout.setContentsMargins(2, 4, 0, 0)

        for label in self.labels:
            radio_button = QtWidgets.QRadioButton(label)
            radio_button.setMouseTracking(0)
            self.radio_buttons.append(radio_button)
            action_layout.addWidget(radio_button)
            radio_button.clicked.connect(self.checked)

        self.radio_buttons[0].setChecked(True)
        action_widget.setLayout(action_layout)
        return action_widget
예제 #13
0
class CloseLabel(QtWidgets.QLabel):
    clicked = QtCore.pyqtSignal()

    def __init__(self, parent=None, wh=None, pixmap=None, close_icon=None):
        super(CloseLabel, self).__init__(parent)

        if wh is None:
            wh = (25, 25)
        self.wh = wh
        self.pixmap = pixmap
        self.close_icon = close_icon

        self.__style()
        self.close_btn.clicked.connect(self.close_btn.hide)

    def __style(self):
        self.setMinimumSize(QtCore.QSize(self.wh[0], self.wh[1]))
        self.setMaximumSize(QtCore.QSize(self.wh[0], self.wh[1]))
        self.setMouseTracking(True)
        self.setScaledContents(True)
        self.setAlignment(QtCore.Qt.AlignCenter)
        self.setPixmap(self.pixmap)

        self.close_btn = QtWidgets.QPushButton(self)
        self.close_btn.setFlat(True)
        self.close_btn.setMouseTracking(True)
        self.close_btn.setMinimumSize(QtCore.QSize(int(self.wh[0]/5), int(self.wh[0]/5)))
        self.close_btn.setMaximumSize(QtCore.QSize(int(self.wh[0]/5), int(self.wh[0]/5)))
        self.close_btn.setIcon(self.close_icon)
        self.close_btn.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.close_btn.setGeometry(
            self.width()-self.close_btn.width(), 0, self.close_btn.width(), self.close_btn.height()
        )
        self.close_btn.hide()

    def mousePressEvent(self, event):
        event.accept()
        self.clicked.emit()

    def mouseMoveEvent(self, event):
        if (event.pos().y() <= int(self.width()/5)) and (event.pos().x() >= self.width()-self.close_btn.width()):
            self.close_btn.show()
        else:
            self.close_btn.hide()

    def leaveEvent(self, event):
        event.accept()
        self.closeButton.hide()
예제 #14
0
class CloseComboBoxLabel(QtWidgets.QLabel):
    clicked = QtCore.pyqtSignal()

    def __init__(self, parent=None, wh=None, pixmap=None, close_icon=None, image_icon=None):
        super(CloseComboBoxLabel, self).__init__(parent)

        if wh is None:
            wh = (25, 25)
        self.wh = wh
        self.pixmap = pixmap
        self.close_icon = close_icon
        self.image_icon = image_icon
        self.__style()

    def __style(self):
        self.setMinimumSize(QtCore.QSize(self.wh[0], self.wh[1]))
        self.setMaximumSize(QtCore.QSize(self.wh[0], self.wh[1]))
        self.setMouseTracking(False)
        self.setScaledContents(True)
        self.setAlignment(QtCore.Qt.AlignCenter)
        self.setPixmap(self.pixmap)

        self.close_btn = QtWidgets.QPushButton(self)
        self.close_btn.setFlat(True)
        self.close_btn.setMouseTracking(False)
        self.close_btn.setMinimumSize(QtCore.QSize(int(self.wh[0] / 5), int(self.wh[0] / 5)))
        self.close_btn.setMaximumSize(QtCore.QSize(int(self.wh[0] / 5), int(self.wh[0] / 5)))
        self.close_btn.setIcon(self.close_icon)
        self.close_btn.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))

        self.comb_box = QtWidgets.QComboBox(self)
        self.comb_box.setFocusPolicy(QtCore.Qt.TabFocus | QtCore.Qt.ClickFocus)
        self.comb_box.setFrame(False)
        self.comb_box.setIconSize(QtCore.QSize(16, 16))
        self.comb_box.addItem(self.image_icon, '')
        for c in string.hexdigits[0:10]:
            self.comb_box.addItem(self.image_icon, c)

    def resizeEvent(self, event):
        event.accept()
        self.close_btn.setGeometry(
            self.width()-self.close_btn.width(), 0, self.close_btn.width(), self.close_btn.height()
        )
        self.comb_box.setGeometry(0, self.height()*0.8, self.width(), self.height()/5)

    def mousePressEvent(self, event):
        event.accept()
        self.clicked.emit()
예제 #15
0
    def setupUi(self, skinClusterManager_Dialog):
        skinClusterManager_Dialog.setObjectName(
            _fromUtf8("skinClusterManager_Dialog"))
        skinClusterManager_Dialog.resize(295, 392)
        self.skinClusterManager_Dialog_verticalLayout = QtWidgets.QVBoxLayout(
            skinClusterManager_Dialog)
        self.skinClusterManager_Dialog_verticalLayout.setSpacing(4)
        self.skinClusterManager_Dialog_verticalLayout.setObjectName(
            _fromUtf8("skinClusterManager_Dialog_verticalLayout"))
        self.skinClusterManager_menu_horizontalLayout = QtWidgets.QHBoxLayout()
        self.skinClusterManager_menu_horizontalLayout.setSpacing(2)
        self.skinClusterManager_menu_horizontalLayout.setSizeConstraint(
            QtWidgets.QLayout.SetMaximumSize)
        self.skinClusterManager_menu_horizontalLayout.setObjectName(
            _fromUtf8("skinClusterManager_menu_horizontalLayout"))
        self.skinClusterManager_home_pushButton = QtWidgets.QPushButton(
            skinClusterManager_Dialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.skinClusterManager_home_pushButton.
                                     sizePolicy().hasHeightForWidth())
        self.skinClusterManager_home_pushButton.setSizePolicy(sizePolicy)
        self.skinClusterManager_home_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_home_pushButton.setFlat(True)
        self.skinClusterManager_home_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_home_pushButton"))
        self.skinClusterManager_menu_horizontalLayout.addWidget(
            self.skinClusterManager_home_pushButton)
        self.skinClusterManager_folder_pushButton = QtWidgets.QPushButton(
            skinClusterManager_Dialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.skinClusterManager_folder_pushButton.
                                     sizePolicy().hasHeightForWidth())
        self.skinClusterManager_folder_pushButton.setSizePolicy(sizePolicy)
        self.skinClusterManager_folder_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_folder_pushButton.setFlat(True)
        self.skinClusterManager_folder_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_folder_pushButton"))
        self.skinClusterManager_menu_horizontalLayout.addWidget(
            self.skinClusterManager_folder_pushButton)
        self.skinClusterManager_refresh_pushButton = QtWidgets.QPushButton(
            skinClusterManager_Dialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterManager_refresh_pushButton.sizePolicy(
            ).hasHeightForWidth())
        self.skinClusterManager_refresh_pushButton.setSizePolicy(sizePolicy)
        self.skinClusterManager_refresh_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_refresh_pushButton.setFlat(True)
        self.skinClusterManager_refresh_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_refresh_pushButton"))
        self.skinClusterManager_menu_horizontalLayout.addWidget(
            self.skinClusterManager_refresh_pushButton)
        self.skinClusterManager_vis_pushButton = QtWidgets.QPushButton(
            skinClusterManager_Dialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.skinClusterManager_vis_pushButton.
                                     sizePolicy().hasHeightForWidth())
        self.skinClusterManager_vis_pushButton.setSizePolicy(sizePolicy)
        self.skinClusterManager_vis_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_vis_pushButton.setFlat(True)
        self.skinClusterManager_vis_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_vis_pushButton"))
        self.skinClusterManager_menu_horizontalLayout.addWidget(
            self.skinClusterManager_vis_pushButton)
        self.skinClusterManager_tool_pushButton = QtWidgets.QPushButton(
            skinClusterManager_Dialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.skinClusterManager_tool_pushButton.
                                     sizePolicy().hasHeightForWidth())
        self.skinClusterManager_tool_pushButton.setSizePolicy(sizePolicy)
        self.skinClusterManager_tool_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_tool_pushButton.setFlat(True)
        self.skinClusterManager_tool_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_tool_pushButton"))
        self.skinClusterManager_menu_horizontalLayout.addWidget(
            self.skinClusterManager_tool_pushButton)
        self.skinClusterManager_path_LineEdit = QtWidgets.QLineEdit(
            skinClusterManager_Dialog)
        self.skinClusterManager_path_LineEdit.setEnabled(False)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.skinClusterManager_path_LineEdit.
                                     sizePolicy().hasHeightForWidth())
        self.skinClusterManager_path_LineEdit.setSizePolicy(sizePolicy)
        self.skinClusterManager_path_LineEdit.setCursor(
            QtGui.QCursor(QtCore.Qt.ArrowCursor))
        self.skinClusterManager_path_LineEdit.setReadOnly(True)
        self.skinClusterManager_path_LineEdit.setObjectName(
            _fromUtf8("skinClusterManager_path_LineEdit"))
        self.skinClusterManager_menu_horizontalLayout.addWidget(
            self.skinClusterManager_path_LineEdit)
        self.skinClusterManager_path_pushButton = QtWidgets.QPushButton(
            skinClusterManager_Dialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.skinClusterManager_path_pushButton.
                                     sizePolicy().hasHeightForWidth())
        self.skinClusterManager_path_pushButton.setSizePolicy(sizePolicy)
        self.skinClusterManager_path_pushButton.setMaximumSize(
            QtCore.QSize(16, 25))
        self.skinClusterManager_path_pushButton.setIconSize(
            QtCore.QSize(12, 12))
        self.skinClusterManager_path_pushButton.setFlat(True)
        self.skinClusterManager_path_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_path_pushButton"))
        self.skinClusterManager_menu_horizontalLayout.addWidget(
            self.skinClusterManager_path_pushButton)
        self.skinClusterManager_Dialog_verticalLayout.addLayout(
            self.skinClusterManager_menu_horizontalLayout)
        self.skinClusterManager_horizontalLayout = QtWidgets.QHBoxLayout()
        self.skinClusterManager_horizontalLayout.setSpacing(3)
        self.skinClusterManager_horizontalLayout.setObjectName(
            _fromUtf8("skinClusterManager_horizontalLayout"))
        self.skinClusterManager_one_listWidget = QtWidgets.QListWidget(
            skinClusterManager_Dialog)
        self.skinClusterManager_one_listWidget.setFocusPolicy(
            QtCore.Qt.NoFocus)
        self.skinClusterManager_one_listWidget.setObjectName(
            _fromUtf8("skinClusterManager_one_listWidget"))
        self.skinClusterManager_horizontalLayout.addWidget(
            self.skinClusterManager_one_listWidget)
        self.skinClusterManager_two_listWidget = QtWidgets.QListWidget(
            skinClusterManager_Dialog)
        self.skinClusterManager_two_listWidget.setFocusPolicy(
            QtCore.Qt.NoFocus)
        self.skinClusterManager_two_listWidget.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.skinClusterManager_two_listWidget.setObjectName(
            _fromUtf8("skinClusterManager_two_listWidget"))
        self.skinClusterManager_horizontalLayout.addWidget(
            self.skinClusterManager_two_listWidget)
        self.skinClusterManager_tools_groupBox_verticalLayout = QtWidgets.QVBoxLayout(
        )
        self.skinClusterManager_tools_groupBox_verticalLayout.setSpacing(3)
        self.skinClusterManager_tools_groupBox_verticalLayout.setObjectName(
            _fromUtf8("skinClusterManager_tools_groupBox_verticalLayout"))
        self.skinClusterManager_one_groupBox = QtWidgets.QGroupBox(
            skinClusterManager_Dialog)
        self.skinClusterManager_one_groupBox.setTitle(_fromUtf8(""))
        self.skinClusterManager_one_groupBox.setObjectName(
            _fromUtf8("skinClusterManager_one_groupBox"))
        self.skinClusterManager_one_groupBox_verticalLayout = QtWidgets.QVBoxLayout(
            self.skinClusterManager_one_groupBox)
        self.skinClusterManager_one_groupBox_verticalLayout.setSpacing(2)
        self.skinClusterManager_one_groupBox_verticalLayout.setObjectName(
            _fromUtf8("skinClusterManager_one_groupBox_verticalLayout"))
        self.skinClusterManager_export_pushButton = QtWidgets.QPushButton(
            self.skinClusterManager_one_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.skinClusterManager_export_pushButton.
                                     sizePolicy().hasHeightForWidth())
        self.skinClusterManager_export_pushButton.setSizePolicy(sizePolicy)
        self.skinClusterManager_export_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_export_pushButton.setFlat(True)
        self.skinClusterManager_export_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_export_pushButton"))
        self.skinClusterManager_one_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_export_pushButton)
        self.skinClusterManager_exportComponents_pushButton = QtWidgets.QPushButton(
            self.skinClusterManager_one_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterManager_exportComponents_pushButton.sizePolicy(
            ).hasHeightForWidth())
        self.skinClusterManager_exportComponents_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterManager_exportComponents_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_exportComponents_pushButton.setFlat(True)
        self.skinClusterManager_exportComponents_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_exportComponents_pushButton"))
        self.skinClusterManager_one_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_exportComponents_pushButton)
        self.skinClusterManager_one_groupBox_one_line = QtWidgets.QFrame(
            self.skinClusterManager_one_groupBox)
        self.skinClusterManager_one_groupBox_one_line.setFrameShape(
            QtWidgets.QFrame.HLine)
        self.skinClusterManager_one_groupBox_one_line.setFrameShadow(
            QtWidgets.QFrame.Sunken)
        self.skinClusterManager_one_groupBox_one_line.setObjectName(
            _fromUtf8("skinClusterManager_one_groupBox_one_line"))
        self.skinClusterManager_one_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_one_groupBox_one_line)
        self.skinClusterManager_import_pushButton = QtWidgets.QPushButton(
            self.skinClusterManager_one_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.skinClusterManager_import_pushButton.
                                     sizePolicy().hasHeightForWidth())
        self.skinClusterManager_import_pushButton.setSizePolicy(sizePolicy)
        self.skinClusterManager_import_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_import_pushButton.setFlat(True)
        self.skinClusterManager_import_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_import_pushButton"))
        self.skinClusterManager_one_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_import_pushButton)
        self.skinClusterManager_batchImport_pushButton = QtWidgets.QPushButton(
            self.skinClusterManager_one_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterManager_batchImport_pushButton.sizePolicy(
            ).hasHeightForWidth())
        self.skinClusterManager_batchImport_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterManager_batchImport_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_batchImport_pushButton.setFlat(True)
        self.skinClusterManager_batchImport_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_batchImport_pushButton"))
        self.skinClusterManager_one_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_batchImport_pushButton)
        self.skinClusterManager_one_groupBox_two_line = QtWidgets.QFrame(
            self.skinClusterManager_one_groupBox)
        self.skinClusterManager_one_groupBox_two_line.setFrameShape(
            QtWidgets.QFrame.HLine)
        self.skinClusterManager_one_groupBox_two_line.setFrameShadow(
            QtWidgets.QFrame.Sunken)
        self.skinClusterManager_one_groupBox_two_line.setObjectName(
            _fromUtf8("skinClusterManager_one_groupBox_two_line"))
        self.skinClusterManager_one_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_one_groupBox_two_line)
        self.skinClusterManager_getInfluenceFromWeightData_pushButton = QtWidgets.QPushButton(
            self.skinClusterManager_one_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterManager_getInfluenceFromWeightData_pushButton.
            sizePolicy().hasHeightForWidth())
        self.skinClusterManager_getInfluenceFromWeightData_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterManager_getInfluenceFromWeightData_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_getInfluenceFromWeightData_pushButton.setFlat(
            True)
        self.skinClusterManager_getInfluenceFromWeightData_pushButton.setObjectName(
            _fromUtf8(
                "skinClusterManager_getInfluenceFromWeightData_pushButton"))
        self.skinClusterManager_one_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_getInfluenceFromWeightData_pushButton)
        self.skinClusterManager_trash_pushButton = QtWidgets.QPushButton(
            self.skinClusterManager_one_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.skinClusterManager_trash_pushButton.
                                     sizePolicy().hasHeightForWidth())
        self.skinClusterManager_trash_pushButton.setSizePolicy(sizePolicy)
        self.skinClusterManager_trash_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_trash_pushButton.setFlat(True)
        self.skinClusterManager_trash_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_trash_pushButton"))
        self.skinClusterManager_one_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_trash_pushButton)
        self.skinClusterManager_reload_pushButton = QtWidgets.QPushButton(
            self.skinClusterManager_one_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.skinClusterManager_reload_pushButton.
                                     sizePolicy().hasHeightForWidth())
        self.skinClusterManager_reload_pushButton.setSizePolicy(sizePolicy)
        self.skinClusterManager_reload_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_reload_pushButton.setFlat(True)
        self.skinClusterManager_reload_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_reload_pushButton"))
        self.skinClusterManager_one_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_reload_pushButton)
        self.skinClusterManager_tools_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_one_groupBox)
        self.skinClusterManager_two_groupBox = QtWidgets.QGroupBox(
            skinClusterManager_Dialog)
        self.skinClusterManager_two_groupBox.setTitle(_fromUtf8(""))
        self.skinClusterManager_two_groupBox.setObjectName(
            _fromUtf8("skinClusterManager_two_groupBox"))
        self.skinClusterManager_two_groupBox_verticalLayout = QtWidgets.QVBoxLayout(
            self.skinClusterManager_two_groupBox)
        self.skinClusterManager_two_groupBox_verticalLayout.setSpacing(2)
        self.skinClusterManager_two_groupBox_verticalLayout.setObjectName(
            _fromUtf8("skinClusterManager_two_groupBox_verticalLayout"))
        self.skinClusterManager_getInfluence_pushButton = QtWidgets.QPushButton(
            self.skinClusterManager_two_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterManager_getInfluence_pushButton.sizePolicy(
            ).hasHeightForWidth())
        self.skinClusterManager_getInfluence_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterManager_getInfluence_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_getInfluence_pushButton.setFlat(True)
        self.skinClusterManager_getInfluence_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_getInfluence_pushButton"))
        self.skinClusterManager_two_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_getInfluence_pushButton)
        self.skinClusterManager_holdInfluence_pushButton = QtWidgets.QPushButton(
            self.skinClusterManager_two_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterManager_holdInfluence_pushButton.sizePolicy(
            ).hasHeightForWidth())
        self.skinClusterManager_holdInfluence_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterManager_holdInfluence_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_holdInfluence_pushButton.setFlat(True)
        self.skinClusterManager_holdInfluence_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_holdInfluence_pushButton"))
        self.skinClusterManager_two_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_holdInfluence_pushButton)
        self.skinClusterManager_unHoldSelectedInfluence_pushButton = QtWidgets.QPushButton(
            self.skinClusterManager_two_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterManager_unHoldSelectedInfluence_pushButton.
            sizePolicy().hasHeightForWidth())
        self.skinClusterManager_unHoldSelectedInfluence_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterManager_unHoldSelectedInfluence_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_unHoldSelectedInfluence_pushButton.setFlat(
            True)
        self.skinClusterManager_unHoldSelectedInfluence_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_unHoldSelectedInfluence_pushButton"))
        self.skinClusterManager_two_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_unHoldSelectedInfluence_pushButton)
        self.skinClusterManager_two_groupBox_line = QtWidgets.QFrame(
            self.skinClusterManager_two_groupBox)
        self.skinClusterManager_two_groupBox_line.setFrameShape(
            QtWidgets.QFrame.HLine)
        self.skinClusterManager_two_groupBox_line.setFrameShadow(
            QtWidgets.QFrame.Sunken)
        self.skinClusterManager_two_groupBox_line.setObjectName(
            _fromUtf8("skinClusterManager_two_groupBox_line"))
        self.skinClusterManager_two_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_two_groupBox_line)
        self.skinClusterManager_resetBindPose_pushButton = QtWidgets.QPushButton(
            self.skinClusterManager_two_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterManager_resetBindPose_pushButton.sizePolicy(
            ).hasHeightForWidth())
        self.skinClusterManager_resetBindPose_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterManager_resetBindPose_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_resetBindPose_pushButton.setFlat(True)
        self.skinClusterManager_resetBindPose_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_resetBindPose_pushButton"))
        self.skinClusterManager_two_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_resetBindPose_pushButton)
        self.skinClusterManager_removeUnusedInfluence_pushButton = QtWidgets.QPushButton(
            self.skinClusterManager_two_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterManager_removeUnusedInfluence_pushButton.
            sizePolicy().hasHeightForWidth())
        self.skinClusterManager_removeUnusedInfluence_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterManager_removeUnusedInfluence_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterManager_removeUnusedInfluence_pushButton.setFlat(True)
        self.skinClusterManager_removeUnusedInfluence_pushButton.setObjectName(
            _fromUtf8("skinClusterManager_removeUnusedInfluence_pushButton"))
        self.skinClusterManager_two_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_removeUnusedInfluence_pushButton)
        spacerItem = QtWidgets.QSpacerItem(20, 40,
                                           QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Expanding)
        self.skinClusterManager_two_groupBox_verticalLayout.addItem(spacerItem)
        self.skinClusterManager_tools_groupBox_verticalLayout.addWidget(
            self.skinClusterManager_two_groupBox)
        self.skinClusterManager_horizontalLayout.addLayout(
            self.skinClusterManager_tools_groupBox_verticalLayout)
        self.skinClusterManager_horizontalLayout.setStretch(0, 3)
        self.skinClusterManager_horizontalLayout.setStretch(1, 5)
        self.skinClusterManager_Dialog_verticalLayout.addLayout(
            self.skinClusterManager_horizontalLayout)
        self.skinClusterManager_progressBar = QtWidgets.QProgressBar(
            skinClusterManager_Dialog)
        self.skinClusterManager_progressBar.setEnabled(True)
        self.skinClusterManager_progressBar.setMaximumSize(
            QtCore.QSize(16777215, 8))
        self.skinClusterManager_progressBar.setTextVisible(False)
        self.skinClusterManager_progressBar.setObjectName(
            _fromUtf8("skinClusterManager_progressBar"))
        self.skinClusterManager_Dialog_verticalLayout.addWidget(
            self.skinClusterManager_progressBar)

        self.retranslateUi(skinClusterManager_Dialog)
        QtCore.QMetaObject.connectSlotsByName(skinClusterManager_Dialog)
    def setupUi(self, skinClusterToolKit_Dialog):
        skinClusterToolKit_Dialog.setObjectName(
            _fromUtf8("skinClusterToolKit_Dialog"))
        skinClusterToolKit_Dialog.resize(211, 35)
        self.skinClusterToolKit_Dialog_verticalLayout = QtWidgets.QVBoxLayout(
            skinClusterToolKit_Dialog)
        self.skinClusterToolKit_Dialog_verticalLayout.setSpacing(2)
        self.skinClusterToolKit_Dialog_verticalLayout.setObjectName(
            _fromUtf8("skinClusterToolKit_Dialog_verticalLayout"))
        self.skinClusterToolKit_groupBox = QtWidgets.QGroupBox(
            skinClusterToolKit_Dialog)
        self.skinClusterToolKit_groupBox.setTitle(_fromUtf8(""))
        self.skinClusterToolKit_groupBox.setObjectName(
            _fromUtf8("skinClusterToolKit_groupBox"))
        self.skinClusterToolKit_groupBox_horizontalLayout = QtWidgets.QHBoxLayout(
            self.skinClusterToolKit_groupBox)
        self.skinClusterToolKit_groupBox_horizontalLayout.setSpacing(2)
        self.skinClusterToolKit_groupBox_horizontalLayout.setObjectName(
            _fromUtf8("skinClusterToolKit_groupBox_horizontalLayout"))
        self.skinClusterToolKit_getInfluence_pushButton = QtWidgets.QPushButton(
            self.skinClusterToolKit_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterToolKit_getInfluence_pushButton.sizePolicy(
            ).hasHeightForWidth())
        self.skinClusterToolKit_getInfluence_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterToolKit_getInfluence_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterToolKit_getInfluence_pushButton.setIconSize(
            QtCore.QSize(20, 20))
        self.skinClusterToolKit_getInfluence_pushButton.setFlat(True)
        self.skinClusterToolKit_getInfluence_pushButton.setObjectName(
            _fromUtf8("skinClusterToolKit_getInfluence_pushButton"))
        self.skinClusterToolKit_groupBox_horizontalLayout.addWidget(
            self.skinClusterToolKit_getInfluence_pushButton)
        self.skinClusterToolKit_holdInfluence_pushButton = QtWidgets.QPushButton(
            self.skinClusterToolKit_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterToolKit_holdInfluence_pushButton.sizePolicy(
            ).hasHeightForWidth())
        self.skinClusterToolKit_holdInfluence_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterToolKit_holdInfluence_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterToolKit_holdInfluence_pushButton.setIconSize(
            QtCore.QSize(20, 20))
        self.skinClusterToolKit_holdInfluence_pushButton.setFlat(True)
        self.skinClusterToolKit_holdInfluence_pushButton.setObjectName(
            _fromUtf8("skinClusterToolKit_holdInfluence_pushButton"))
        self.skinClusterToolKit_groupBox_horizontalLayout.addWidget(
            self.skinClusterToolKit_holdInfluence_pushButton)
        self.skinClusterToolKit_unHoldSelectedInfluence_pushButton = QtWidgets.QPushButton(
            self.skinClusterToolKit_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterToolKit_unHoldSelectedInfluence_pushButton.
            sizePolicy().hasHeightForWidth())
        self.skinClusterToolKit_unHoldSelectedInfluence_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterToolKit_unHoldSelectedInfluence_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterToolKit_unHoldSelectedInfluence_pushButton.setIconSize(
            QtCore.QSize(20, 20))
        self.skinClusterToolKit_unHoldSelectedInfluence_pushButton.setFlat(
            True)
        self.skinClusterToolKit_unHoldSelectedInfluence_pushButton.setObjectName(
            _fromUtf8("skinClusterToolKit_unHoldSelectedInfluence_pushButton"))
        self.skinClusterToolKit_groupBox_horizontalLayout.addWidget(
            self.skinClusterToolKit_unHoldSelectedInfluence_pushButton)
        self.line = QtWidgets.QFrame(self.skinClusterToolKit_groupBox)
        self.line.setFrameShape(QtWidgets.QFrame.VLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName(_fromUtf8("line"))
        self.skinClusterToolKit_groupBox_horizontalLayout.addWidget(self.line)
        self.skinClusterToolKit_copyComponentWeight_pushButton = QtWidgets.QPushButton(
            self.skinClusterToolKit_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterToolKit_copyComponentWeight_pushButton.sizePolicy(
            ).hasHeightForWidth())
        self.skinClusterToolKit_copyComponentWeight_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterToolKit_copyComponentWeight_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterToolKit_copyComponentWeight_pushButton.setIconSize(
            QtCore.QSize(20, 20))
        self.skinClusterToolKit_copyComponentWeight_pushButton.setFlat(True)
        self.skinClusterToolKit_copyComponentWeight_pushButton.setObjectName(
            _fromUtf8("skinClusterToolKit_copyComponentWeight_pushButton"))
        self.skinClusterToolKit_groupBox_horizontalLayout.addWidget(
            self.skinClusterToolKit_copyComponentWeight_pushButton)
        self.skinClusterToolKit_pasteComponentWeight_pushButton = QtWidgets.QPushButton(
            self.skinClusterToolKit_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterToolKit_pasteComponentWeight_pushButton.sizePolicy(
            ).hasHeightForWidth())
        self.skinClusterToolKit_pasteComponentWeight_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterToolKit_pasteComponentWeight_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterToolKit_pasteComponentWeight_pushButton.setIconSize(
            QtCore.QSize(20, 20))
        self.skinClusterToolKit_pasteComponentWeight_pushButton.setFlat(True)
        self.skinClusterToolKit_pasteComponentWeight_pushButton.setObjectName(
            _fromUtf8("skinClusterToolKit_pasteComponentWeight_pushButton"))
        self.skinClusterToolKit_groupBox_horizontalLayout.addWidget(
            self.skinClusterToolKit_pasteComponentWeight_pushButton)
        self.line_2 = QtWidgets.QFrame(self.skinClusterToolKit_groupBox)
        self.line_2.setFrameShape(QtWidgets.QFrame.VLine)
        self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_2.setObjectName(_fromUtf8("line_2"))
        self.skinClusterToolKit_groupBox_horizontalLayout.addWidget(
            self.line_2)
        self.skinClusterToolKit_resetBindPose_pushButton = QtWidgets.QPushButton(
            self.skinClusterToolKit_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterToolKit_resetBindPose_pushButton.sizePolicy(
            ).hasHeightForWidth())
        self.skinClusterToolKit_resetBindPose_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterToolKit_resetBindPose_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterToolKit_resetBindPose_pushButton.setIconSize(
            QtCore.QSize(20, 20))
        self.skinClusterToolKit_resetBindPose_pushButton.setFlat(True)
        self.skinClusterToolKit_resetBindPose_pushButton.setObjectName(
            _fromUtf8("skinClusterToolKit_resetBindPose_pushButton"))
        self.skinClusterToolKit_groupBox_horizontalLayout.addWidget(
            self.skinClusterToolKit_resetBindPose_pushButton)
        self.skinClusterToolKit_removeUnusedInfluence_pushButton = QtWidgets.QPushButton(
            self.skinClusterToolKit_groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.skinClusterToolKit_removeUnusedInfluence_pushButton.
            sizePolicy().hasHeightForWidth())
        self.skinClusterToolKit_removeUnusedInfluence_pushButton.setSizePolicy(
            sizePolicy)
        self.skinClusterToolKit_removeUnusedInfluence_pushButton.setMaximumSize(
            QtCore.QSize(25, 25))
        self.skinClusterToolKit_removeUnusedInfluence_pushButton.setIconSize(
            QtCore.QSize(20, 20))
        self.skinClusterToolKit_removeUnusedInfluence_pushButton.setFlat(True)
        self.skinClusterToolKit_removeUnusedInfluence_pushButton.setObjectName(
            _fromUtf8("skinClusterToolKit_removeUnusedInfluence_pushButton"))
        self.skinClusterToolKit_groupBox_horizontalLayout.addWidget(
            self.skinClusterToolKit_removeUnusedInfluence_pushButton)
        spacerItem = QtWidgets.QSpacerItem(40, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.skinClusterToolKit_groupBox_horizontalLayout.addItem(spacerItem)
        self.skinClusterToolKit_Dialog_verticalLayout.addWidget(
            self.skinClusterToolKit_groupBox)

        self.retranslateUi(skinClusterToolKit_Dialog)
        QtCore.QMetaObject.connectSlotsByName(skinClusterToolKit_Dialog)
예제 #17
0
class ImageSequence(QtCore.QObject):
    IMAGE_TYPE = 'jpg'
    frame_changed = QtCore.pyqtSignal()

    def __init__(self, fps=24, *args):
        QtCore.QObject.__init__(self, *args)

        self._fps = fps
        self._timer = None
        self._frame = 0
        self._frames = []
        self._dirname = None
        self._paused = True

    def set_dir(self, dirname):
        def natural_sort_items(items):
            convert = lambda text: (int(text) if text.isdigit() else text)
            alphanum_key = lambda key: [convert(c) for c in re.split('([0-9]+)', key)]
            items.sort(key=alphanum_key)

        self._dirname = dirname
        if os.path.isdir(dirname):
            self._frames = [os.path.join(dirname, filename) for filename in os.listdir(dirname) if
                            filename.endswith(self.IMAGE_TYPE)]
            natural_sort_items(self._frames)

    def dirname(self):
        return self._dirname

    def reset(self):
        if not self._timer:
            self._timer = QtCore.QTimer(self.parent())
            self._timer.setSingleShot(False)
            self._timer.timeout.connect(self._frame_changed)

        if not self._paused:
            self._frame = 0
        self._timer.stop()

    def pause(self):
        self._paused = True
        if self._timer:
            self._timer.stop()

    def resume(self):
        if self._paused:
            self._paused = False
            self._timer.start()

    def stop(self):
        self._frame = 0
        if self._timer:
            self._timer.stop()

    def start(self):
        self.reset()
        self._paused = False
        if self._timer:
            self._timer.start(1000.0 / self._fps)

    def switch(self):
        if self._paused:
            self.start()
        else:
            self.pause()

    def frames(self):
        return self._frames

    def _frame_changed(self):
        if not self._frames:
            return
        frame = self._frame
        frame += 1
        self.set_current_frame(frame)

    def percent(self):
        if len(self._frames) == self._frame + 1:
            _percent = 1
        else:
            _percent = float(len(self._frames) + self._frame - 1) / (len(self._frames) - 1) - 1
        return _percent

    def duration(self):
        return len(self._frames)

    def current_filename(self):
        try:
            return self._frames[self.current_frame()]
        except IndexError:
            pass

    def current_frame(self):
        return self._frame

    def set_current_frame(self, frame):
        if frame >= self.duration():
            frame = 0
        self._frame = frame
        self.frame_changed.emit()