示例#1
0
    def __init__(self, *args, **kwargs):
        """
        :rtype: None
        """
        super(PosePreviewWidget, self).__init__(*args, **kwargs)

        self.connect(self.ui.keyCheckBox, QtCore.SIGNAL("clicked()"), self.saveSettings)
        self.connect(self.ui.mirrorCheckBox, QtCore.SIGNAL("clicked()"), self.saveSettings)
        self.connect(self.ui.blendSlider, QtCore.SIGNAL("sliderMoved(int)"), self.sliderMoved)
        self.connect(self.ui.blendSlider, QtCore.SIGNAL("sliderReleased()"), self.sliderReleased)

        self.item().blendChanged.connect(self.updateSlider)
        self.item().mirrorChanged.connect(self.updateMirror)
示例#2
0
    def __init__(self, *args, **kwargs):
        """
        :type item: AnimItem
        :type libraryWidget: studiolibrary.LibraryWidget
        """
        transferitem.PreviewWidget.__init__(self, *args, **kwargs)

        self._items = []

        self.connect(self.ui.currentTime, QtCore.SIGNAL("stateChanged(int)"), self.updateState)
        self.connect(self.ui.helpCheckBox, QtCore.SIGNAL('stateChanged(int)'), self.showHelpImage)
        self.connect(self.ui.connectCheckBox, QtCore.SIGNAL('stateChanged(int)'), self.connectChanged)
        self.connect(self.ui.option, QtCore.SIGNAL('currentIndexChanged(const QString&)'), self.optionChanged)

        self.loadSettings()
示例#3
0
    def __init__(self, parent=None):
        """
        :type parent: QtWidgets.QWidget
        """
        QtWidgets.QTreeView.__init__(self, parent)

        self._filter = []
        self._folders = {}
        self._isLocked = False
        self._signalsEnabled = True
        self._enableFolderSettings = False

        self._sourceModel = FileSystemModel(self)

        self.setDpi(1)

        proxyModel = SortFilterProxyModel(self)
        proxyModel.setSourceModel(self._sourceModel)
        proxyModel.sort(0)

        self.setAcceptDrops(True)
        self.setModel(proxyModel)
        self.setHeaderHidden(True)
        self.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.setSelectionMode(QtWidgets.QTreeWidget.ExtendedSelection)
        self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)

        signal = "selectionChanged(const QItemSelection&,const QItemSelection&)"

        self.connect(
            self.selectionModel(),
            QtCore.SIGNAL(signal),
            self._selectionChanged,
        )
示例#4
0
    def __init__(self, *args):
        QtWidgets.QFrame.__init__(self, *args)

        self.setObjectName("statusWidget")
        self.setFrameShape(QtWidgets.QFrame.NoFrame)

        self._blocking = False
        self._timer = QtCore.QTimer(self)

        self._label = QtWidgets.QLabel("", self)
        self._label.setCursor(QtCore.Qt.IBeamCursor)
        self._label.setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse)
        self._label.setSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                  QtWidgets.QSizePolicy.Preferred)

        self._button = QtWidgets.QPushButton(self)
        self._button.setMaximumSize(QtCore.QSize(17, 17))
        self._button.setIconSize(QtCore.QSize(17, 17))

        layout = QtWidgets.QHBoxLayout(self)
        layout.setContentsMargins(1, 0, 0, 0)

        layout.addWidget(self._button)
        layout.addWidget(self._label)

        self.setLayout(layout)
        self.setFixedHeight(19)
        self.setMinimumWidth(5)

        QtCore.QObject.connect(self._timer, QtCore.SIGNAL("timeout()"),
                               self.reset)
示例#5
0
    def __init__(self, *args):
        QtWidgets.QFrame.__init__(self, *args)

        self.setObjectName("statusWidget")
        self.setFrameShape(QtWidgets.QFrame.NoFrame)

        self._label = QtWidgets.QLabel("Hello :)", self)

        policy = QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred
        self._label.setSizePolicy(*policy)

        self._timer = QtCore.QTimer(self)

        self._button = QtWidgets.QPushButton(self)
        self._button.setMaximumSize(QtCore.QSize(17, 17))
        self._button.setIconSize(QtCore.QSize(17, 17))

        layout = QtWidgets.QHBoxLayout(self)
        layout.setContentsMargins(1, 0, 0, 0)

        layout.addWidget(self._button)
        layout.addWidget(self._label)

        self.setLayout(layout)
        self.setFixedHeight(19)
        self.setMinimumWidth(5)

        QtCore.QObject.connect(self._timer, QtCore.SIGNAL("timeout()"),
                               self.clear)
示例#6
0
    def __init__(self, *args, **kwargs):
        """
        :rtype: None
        """
        transferitem.PreviewWidget.__init__(self, *args, **kwargs)

        self.connect(self.ui.keyCheckBox, QtCore.SIGNAL("clicked()"),
                     self.updateState)
        self.connect(self.ui.mirrorCheckBox, QtCore.SIGNAL("clicked()"),
                     self.updateState)
        self.connect(self.ui.blendSlider, QtCore.SIGNAL("sliderMoved(int)"),
                     self.sliderMoved)
        self.connect(self.ui.blendSlider, QtCore.SIGNAL("sliderReleased()"),
                     self.sliderReleased)

        self.item().blendChanged.connect(self.updateSlider)
        self.item().mirrorChanged.connect(self.updateMirror)
示例#7
0
    def __init__(self, *args, **kwargs):
        """
        :type item: AnimItem
        :type libraryWidget: studiolibrary.LibraryWidget
        """
        super(AnimPreviewWidget, self).__init__(*args, **kwargs)

        self._items = []

        self.createSequenceWidget()

        self.connect(self.ui.currentTime, QtCore.SIGNAL("stateChanged(int)"),
                     self.saveSettings)
        self.connect(self.ui.helpCheckBox, QtCore.SIGNAL('stateChanged(int)'),
                     self.showHelpImage)
        self.connect(self.ui.connectCheckBox,
                     QtCore.SIGNAL('stateChanged(int)'), self.connectChanged)
        self.connect(self.ui.option,
                     QtCore.SIGNAL('currentIndexChanged(const QString&)'),
                     self.optionChanged)
示例#8
0
    def __init__(self, *args, **kwargs):
        """
        :type record: Record
        :type libraryWidget: studiolibrary.LibraryWidget
        """
        mayabaseplugin.PreviewWidget.__init__(self, *args, **kwargs)

        self._records = []

        self.connect(self.ui.currentTime, QtCore.SIGNAL("stateChanged(int)"),
                     self.updateState)
        self.connect(self.ui.helpCheckBox, QtCore.SIGNAL('stateChanged(int)'),
                     self.showHelpImage)
        self.connect(self.ui.connectCheckBox,
                     QtCore.SIGNAL('stateChanged(int)'), self.connectChanged)
        self.connect(self.ui.option,
                     QtCore.SIGNAL('currentIndexChanged(const QString&)'),
                     self.optionChanged)

        self.loadSettings()
示例#9
0
 def reset(self):
     """
     Stop and reset the current frame to 0.
     
     :rtype: None
     """
     if not self._timer:
         self._timer = QtCore.QTimer(self.parent())
         self._timer.setSingleShot(False)
         self.connect(self._timer, QtCore.SIGNAL('timeout()'),
                      self._frameChanged)
     if not self._paused:
         self._frame = 0
     self._timer.stop()
示例#10
0
 def browseBackgroundColor(self, parent = None):
     """
     :type parent: QtWidgets.QWidget
     :rtype: None
     """
     color = self.backgroundColor()
     dialog = QtWidgets.QColorDialog(parent)
     dialog.setCurrentColor(color)
     dialog.connect(dialog, QtCore.SIGNAL('setBackgroundColor(const QColor&)'), self.setBackgroundColor)
     dialog.open()
     if dialog.exec_():
         self.setBackgroundColor(dialog.selectedColor())
     else:
         self.setBackgroundColor(color)
示例#11
0
    def browseAccentColor(self, parent=None):
        """
        Show the color dialog to browser for a accent color.

        :type parent: QtWidgets.QWidget
        :rtype: None
        """
        color = self.accentColor()
        dialog = QtWidgets.QColorDialog(parent)
        dialog.setCurrentColor(color)
        dialog.connect(dialog, QtCore.SIGNAL("setAccentColor(const QColor&)"),
                       self.setAccentColor)
        dialog.open()
        if dialog.exec_():
            self.setAccentColor(dialog.selectedColor())
        else:
            self.setAccentColor(color)
示例#12
0
 def run(self):
     if studiolibrary.package().isUpdateAvailable():
         self.emit(QtCore.SIGNAL('updateAvailable()'))