def _refreshList(self): """Refresh listview content """ model = QtGui.QStandardItemModel(self) for c_node in self.get_component_list(): model.appendRow(QtGui.QStandardItem(c_node)) self.setSourceModel(model)
def _refreshList(self): """Refresh listview content """ model = QtGui.QStandardItemModel(self) for c_node in list_crank_layer_nodes(): model.appendRow(QtGui.QStandardItem(c_node)) self.setSourceModel(model)
def drawShape(self, painter): borderWidth = 1 x = borderWidth / 2.0 y = borderWidth / 2.0 w = self.width() - borderWidth h = self.height() - borderWidth # round radius and outline width if self.height() < self.width(): rr = self.height() * 0.20 ow = self.height() * 0.33 else: rr = self.width() * 0.20 ow = self.width() * 0.33 pathOuter = QtGui.QPainterPath() pathOuter.addRoundedRect(QtCore.QRectF(x, y, w, h), rr, rr) innX = x + ow innY = y + ow innW = w - (ow * 2) innH = h - (ow * 2) innR = rr * 0.2 pathInner = QtGui.QPainterPath() pathInner.addRoundedRect(QtCore.QRectF(innX, innY, innW, innH), innR, innR) self.drawPathWithBorder(painter, pathOuter - pathInner, borderWidth)
def mousePressEvent(self, event): self.prevValue = self.value() self.startDragpos = event.pos() emodif = event.modifiers() modif = [ QtCore.Qt.ControlModifier, QtCore.Qt.ShiftModifier, QtCore.Qt.ControlModifier | QtCore.Qt.ShiftModifier ] if event.button() == QtCore.Qt.MidButton: if self.draggers is None: self.draggers = draggers(self, self.isFloat, draggerSteps=self.draggerSteps) self.draggers.increment.connect(self.valueIncremented.emit) self.draggers.show() if self.isFloat: self.draggers.move( self.mapToGlobal( QtCore.QPoint( event.pos().x() - 1, event.pos().y() - self.draggers.height() / 2))) else: self.draggers.move( self.mapToGlobal( QtCore.QPoint( event.pos().x() - 1, event.pos().y() - (self.draggers.height() - self.draggers.height() / 6)))) elif event.button() == self.LeftButton and emodif not in modif: butts = QtCore.Qt.MouseButtons(self.MidButton) nevent = QtGui.QMouseEvent(event.type(), event.pos(), self.MidButton, butts, event.modifiers()) super(slider, self).mousePressEvent(nevent) elif emodif in modif: st_slider = QtWidgets.QStyleOptionSlider() st_slider.initFrom(self) st_slider.orientation = self.orientation() available = self.style().pixelMetric( QtWidgets.QStyle.PM_SliderSpaceAvailable, st_slider, self) xloc = QtWidgets.QStyle.sliderPositionFromValue( self.minimum(), self.maximum(), super(slider, self).value(), available) butts = QtCore.Qt.MouseButtons(self.MidButton) newPos = QtCore.QPointF() newPos.setX(xloc) nevent = QtGui.QMouseEvent(event.type(), newPos, self.MidButton, butts, event.modifiers()) self.startDragpos = newPos self.realStartDragpos = event.pos() super(slider, self).mousePressEvent(nevent) self.deltaValue = self.value() - self.prevValue self.setValue(self.prevValue) else: super(slider, self).mousePressEvent(event)
def __init__(self, parent=None): super(SelectButton, self).__init__(parent) self.defaultBGColor = QtGui.QPalette().color(self.backgroundRole()) self.setBorderColor(self.defaultBGColor) p = self.palette() p.setColor(self.foregroundRole(), QtGui.QColor(000, 000, 000, 000)) p.setColor(self.backgroundRole(), QtGui.QColor(000, 000, 000, 000)) self.setPalette(p)
def paintSelected(self, paint=False): if paint: p = self.palette() p.setColor(self.foregroundRole(), QtGui.QColor(255, 255, 255, 255)) self.setPalette(p) self.setBorderColor(QtGui.QColor(255, 255, 255, 255)) else: p = self.palette() p.setColor(self.foregroundRole(), QtGui.QColor(000, 000, 000, 0o10)) self.setPalette(p) self.setBorderColor(self.defaultBGColor)
def drawShape(self, painter): borderWidth = 1 w = self.width() - borderWidth h = self.height() - borderWidth triangle = QtGui.QPolygon([QtCore.QPoint(-1, 0), QtCore.QPoint(-1, h - 1), QtCore.QPoint(w - 1, h / 2)]) path = QtGui.QPainterPath() path.addPolygon(triangle) self.drawPathWithBorder(painter, path, borderWidth) painter.setClipRegion(triangle, QtCore.Qt.ReplaceClip)
def get_icon(icon, size=24): """get svg icon from icon resources folder as a pixel map """ img = get_icon_path("{}.svg".format(icon)) svg_renderer = QtSvg.QSvgRenderer(img) image = QtGui.QImage(size, size, QtGui.QImage.Format_ARGB32) # Set the ARGB to 0 to prevent rendering artifacts image.fill(0x00000000) svg_renderer.render(QtGui.QPainter(image)) pixmap = QtGui.QPixmap.fromImage(image) return pixmap
def mouseMoveEvent(self, event): deltaX = event.pos().x() - self.realStartDragpos.x() deltaY = event.pos().y() - self.realStartDragpos.y() newPos = QtCore.QPointF() modif = [QtCore.Qt.ControlModifier, QtCore.Qt.ShiftModifier, QtCore.Qt.ControlModifier | QtCore.Qt.ShiftModifier] modif_ctl_shift = QtCore.Qt.ControlModifier | QtCore.Qt.ShiftModifier if event.modifiers() in modif: if event.modifiers() == QtCore.Qt.ControlModifier: newPos.setX(self.startDragpos.x() + deltaX / 2) newPos.setY(self.startDragpos.y() + deltaY / 2) elif event.modifiers() == QtCore.Qt.ShiftModifier: newPos.setX(self.startDragpos.x() + deltaX / 4) newPos.setY(self.startDragpos.y() + deltaY / 4) elif event.modifiers() == modif_ctl_shift: newPos.setX(self.startDragpos.x() + deltaX / 8) newPos.setY(self.startDragpos.y() + deltaY / 8) nevent = QtGui.QMouseEvent(event.type(), newPos, event.button(), event.buttons(), event.modifiers()) super(slider, self).mouseMoveEvent(nevent) self.setValue(self.value() - self.deltaValue) else: super(slider, self).mouseMoveEvent(event)
def showDialog(dialog, dInst=True, *args): """ Show the defined dialog window Attributes: dialog (QDialog): The window to show. """ if dInst: try: for c in maya_main_window().children(): if isinstance(c, dialog): c.deleteLater() except Exception: pass # Create minimal dialog object # if versions.current() >= 20180000: # window = dialog(maya_main_window()) # else: window = dialog() cursor = QtGui.QCursor().pos() window.move( QtWidgets.QApplication.desktop().screenGeometry(cursor).center() - window.rect().center()) # Delete the UI if errors occur to avoid causing winEvent # and event errors (in Maya 2014) try: window.show() except Exception: window.deleteLater() traceback.print_exc()
def paintEvent(self, event): super(valueBox, self).paintEvent(event) p = QtGui.QPainter() p.begin(self) p.setPen(Colors.DarkGray) p.setFont(self.labelFont) p.drawText(self.rect(), QtCore.Qt.AlignCenter, self.labelText) p.end()
def paintEvent(self, event): painter = QtGui.QPainter() painter.begin(self) if self.over: painter.setBrush(self.color_over) else: painter.setBrush(self.color) self.drawShape(painter) painter.end()
def offsetEvent(self, event): # type: (QtGui.QMouseEvent) -> QtGui.QMouseEvent offsetev = QtGui.QMouseEvent(event.type(), event.pos() + self.offset, event.globalPos(), event.button(), event.buttons(), event.modifiers()) return offsetev
def random_color(min_val=.01, max_val=.6): r = random.uniform(min_val, max_val) g = random.uniform(min_val, max_val) b = random.uniform(min_val, max_val) color = QtGui.QColor() color.setRgbF(r, g, b) return color
def drawShape(self, painter): borderWidth = 1 x = borderWidth / 2.0 y = borderWidth / 2.0 w = self.width() - borderWidth h = self.height() - borderWidth path = QtGui.QPainterPath() path.addEllipse(QtCore.QRectF(x, y, w, h)) self.drawPathWithBorder(painter, path, borderWidth)
class LabeledFrame(QtWidgets.QFrame): margin = 8 padding = 8 color_over = QtGui.QColor(255, 255, 255, 255) borderColor = QtGui.QColor(172, 168, 167, 255) resized = None def __init__(self, parent=None): super(LabeledFrame, self).__init__(parent) self.innerFrame = QtWidgets.QFrame(parent=self) self.innerFrame.setStyleSheet(""" border: 1px solid #aca8a7; border-radius: 4px; padding: 10px; margin: 10px; """) self.label = QtWidgets.QLabel(parent=self) self.label.setStyleSheet(""" color: #bbbbbb; """) def calcTextLength(self, text): return len(text) * 16 def paintEvent(self, event): if not self.resized: w = self.width() h = self.height() self.innerFrame.setGeometry(0, 0, w, h) text = self.property("text") or "" textWidth = self.calcTextLength(text) self.label.setText(text) self.label.setGeometry((w - textWidth) / 2.0, 0, textWidth, 25) self.label.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter) self.resized = True
def set_background(self, path=None): '''Set character snapshot picture ''' if not (path and os.path.exists(path)): path = self._get_default_snapshot() self.background = None else: self.background = path # Load image image = QtGui.QImage(path) self.setPixmap(QtGui.QPixmap.fromImage(image))
def drawShape(self, painter): borderWidth = 1 x = borderWidth / 2.0 y = borderWidth / 2.0 w = self.width() - borderWidth h = self.height() - borderWidth path = QtGui.QPainterPath() path.addEllipse(QtCore.QRectF(x, y, w, h)) if self.height() < self.width(): ow = self.height() * 0.25 else: ow = self.width() * 0.25 innX = x + ow innY = y + ow innW = w - (ow * 2) innH = h - (ow * 2) pathInner = QtGui.QPainterPath() pathInner.addEllipse(QtCore.QRectF(innX, innY, innW, innH)) self.drawPathWithBorder(painter, path - pathInner, borderWidth)
def drawShape(self, painter): borderWidth = 1 x = borderWidth / 2.0 y = borderWidth / 2.0 w = self.width() - borderWidth h = self.height() - borderWidth # round radius if self.height() < self.width(): rr = self.height() * 0.20 else: rr = self.width() * 0.20 path = QtGui.QPainterPath() path.addRoundedRect(QtCore.QRectF(x, y, w, h), rr, rr) self.drawPathWithBorder(painter, path, borderWidth)
def set_color_status(self): '''Set the color to red/green based on node existence status ''' color = QtGui.QColor() # Exists case if self.node_exists(): # pale green color.setRgb(152, 251, 152) # Does not exists case else: # orange color.setRgb(255, 165, 0) brush = self.foreground() brush.setColor(color) self.setForeground(brush)
def auto_color_axis_slot(self): for itm in self.selectedItems(): attr_config = itm.data(QtCore.Qt.UserRole) f_name = attr_config["fullName"] colors = [[0.8, 0.0, 0.1], [0.0, 0.57, 0.0], [0.0, 0.0, 0.75]] color = QtGui.QColor() if f_name.endswith("X"): color.setRgbF(*colors[0]) elif f_name.endswith("Y"): color.setRgbF(*colors[1]) elif f_name.endswith("Z"): color.setRgbF(*colors[2]) else: continue itm.setBackground(color) attr_config["color"] = color.getRgbF() itm.setData(QtCore.Qt.UserRole, attr_config)
def mouseMoveEvent(self, event): mimeData = QtCore.QMimeData() mimeData.setText('%d,%d' % (event.x(), event.y())) drag = QtGui.QDrag(self) drag.setMimeData(mimeData) drag.setHotSpot(event.pos()) dropAction = drag.start(QtCore.Qt.MoveAction) if not dropAction == QtCore.Qt.MoveAction: pos = QtGui.QCursor.pos() qApp = QtWidgets.QApplication.instance() widget = qApp.widgetAt(pos) relpos = widget.mapFromGlobal(pos) # need to invert Y axis invY = widget.frameSize().height() - relpos.y() sel = selectFromScreenApi(relpos.x() - self.exp, invY - self.exp, relpos.x() + self.exp, invY + self.exp) self.doAction(sel)
def mouseMoveEvent(self, event): mimeData = QtCore.QMimeData() mimeData.setText('%d,%d' % (event.x(), event.y())) drag = QtGui.QDrag(self) drag.setMimeData(mimeData) drag.setHotSpot(event.pos()) dropAction = drag.start(QtCore.Qt.MoveAction) if not dropAction == QtCore.Qt.MoveAction: pos = QtGui.QCursor.pos() widget = QtWidgets.QApplication.widgetAt(pos) if self.ignore_self and (widget is self or widget.objectName() == "qt_scrollarea_viewport"): return relpos = widget.mapFromGlobal(pos) # need to invert Y axis invY = widget.frameSize().height() - relpos.y() sel = selectFromScreenApi(relpos.x() - self.exp, invY - self.exp, relpos.x() + self.exp, invY + self.exp) self.doAction(sel)
def __init__(self, labelText="", type="float", buttons=False, decimals=3, draggerSteps=FLOAT_SLIDER_DRAG_STEPS, *args, **kwargs): """ :param type: Choose if create a float or int spinBox, defaults to "float" :type type: str, optional :param buttons: Show or hidden right up/Down Buttons, defaults to False :type buttons: bool, optional :param decimals: Number of decimals if type is "float", defaults to 3 :type decimals: int, optional :param *args: [description] :type *args: [type] :param **kwargs: [description] :type **kwargs: [type] """ super(valueBox, self).__init__(*args, **kwargs) self.labelFont = QtGui.QFont('Serif', 10, QtGui.QFont.Bold) self.labelText = labelText self.draggerSteps = copy(draggerSteps) self.isFloat = type == "float" if not self.isFloat: self.setDecimals(0) else: self.setDecimals(decimals) if not buttons: self.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons) self.setStyleSheet(getSliderStyleSheet("sliderStyleSheetA")) self.lineEdit().installEventFilter(self) self.installEventFilter(self) self.setFocusPolicy(QtCore.Qt.StrongFocus) self.draggers = None self.setRange(FLOAT_RANGE_MIN, FLOAT_RANGE_MAX)
def _refreshList(self): model = QtGui.QStandardItemModel(self) is_asset = self.stUIInst.isAsset_checkBox.isChecked() for t_node in _listSoftModTweaks(is_asset): model.appendRow(QtGui.QStandardItem(t_node.name())) self.setSourceModel(model)
def config_table(self): def value_update(attr_config, *args): """Update the attribute from the channel value Args: ch (QWidget): The channel widget atttr_config (dict): attribute configuration data *args: the current value """ if self.trigger_value_update: try: cmds.setAttr(self.namespace_sync(attr_config["fullName"]), args[0]) # refresh button color while value update for i in xrange(self.rowCount()): item = self.item(i, 0) attr = item.data(QtCore.Qt.UserRole) if (self.namespace_sync(attr["fullName"]) == self.namespace_sync( attr_config["fullName"])): button = self.cellWidget(i, 1) refresh_key_button_color( button, self.namespace_sync(attr_config["fullName"])) break except RuntimeError: fname = self.namespace_sync(attr_config["fullName"]) pm.displayWarning("Channel {} not Found.".format(fname) + " Maybe the channel master" + " contains not existing channels. " + "Review Channel Master configuration") def open_undo_chunk(): cmds.undoInfo(openChunk=True) def close_undo_chunk(): cmds.undoInfo(closeChunk=True) if not self.chan_config: return i = 0 for ch in self.chan_config["channels"]: at = self.chan_config["channels_data"][ch] at_name = self.namespace_sync(at["fullName"]) try: val = cmds.getAttr(at_name) except ValueError: pm.displayWarning( "{} not found. Maybe wrong NameSpace?".format(at_name)) continue if at["type"] in cmu.ATTR_SLIDER_TYPES: if at["type"] == "long": Type = "int" else: Type = "float" ch_ctl = pyflow_widgets.pyf_Slider(self, Type=Type, defaultValue=val, sliderRange=(at["min"], at["max"])) ch_ctl.valueChanged.connect( partial(value_update, at)) ch_ctl.sliderPressed.connect(open_undo_chunk) ch_ctl.sliderReleased.connect(close_undo_chunk) elif at["type"] == "bool": ch_ctl = QtWidgets.QWidget() layout = QtWidgets.QHBoxLayout(ch_ctl) cbox = QtWidgets.QCheckBox() cbox.setStyleSheet(CHECKBOX_STYLE) ch_ctl.setStyleSheet(CHECKBOX_STYLE) layout.addWidget(cbox) layout.setAlignment(QtCore.Qt.AlignCenter) layout.setContentsMargins(0, 0, 0, 0) ch_ctl.setLayout(layout) if val: cbox.setChecked(True) cbox.toggled.connect( partial(value_update, at)) elif at["type"] == "enum": # we handle special naming for separators if at["niceName"] == "__________": continue else: ch_ctl = QtWidgets.QComboBox() ch_ctl.addItems(at["items"]) ch_ctl.setCurrentIndex(val) ch_ctl.currentIndexChanged.connect( partial(value_update, at)) label_item = QtWidgets.QTableWidgetItem(at["niceName"] + " ") if at["color"]: color = QtGui.QColor() color.setRgbF(*at["color"]) label_item.setBackground(color) label_item.setData(QtCore.Qt.UserRole, at) label_item.setTextAlignment(QtCore.Qt.AlignRight) label_item.setToolTip(self.namespace_sync(at["fullName"])) label_item.setFlags(label_item.flags() ^ QtCore.Qt.ItemIsEditable) key_button = self.create_key_button(at) self.insertRow(i) self.setRowHeight(i, 17) self.setItem(i, 0, label_item) self.setCellWidget(i, 1, key_button) self.setCellWidget(i, 2, ch_ctl) self.track_widgets.append([key_button, ch_ctl]) i += 1
def clear_color_slot(self): items = self.selectedItems() if items: for itm in items: itm.setBackground(QtGui.QColor(43, 43, 43))
def create_actions(self): # file actions self.file_new_node_action = QtWidgets.QAction("New Node", self) self.file_new_node_action.setIcon(pyqt.get_icon("mgear_plus-square")) self.file_save_node_action = QtWidgets.QAction("Save Current Node", self) self.file_save_node_action.setIcon(pyqt.get_icon("mgear_save")) self.set_external_config_action = QtWidgets.QAction( "Add External Config", self) self.set_external_config_action.setIcon( pyqt.get_icon("mgear_plus-circle")) self.remove_external_config_action = QtWidgets.QAction( "Remove External Config", self) self.remove_external_config_action.setIcon( pyqt.get_icon("mgear_minus-circle")) self.file_export_all_action = QtWidgets.QAction( "Export All Tabs", self) self.file_export_all_action.setIcon(pyqt.get_icon("mgear_log-out")) self.file_export_current_action = QtWidgets.QAction( "Export Current Tab", self) self.file_export_current_action.setIcon(pyqt.get_icon("mgear_log-out")) self.file_import_action = QtWidgets.QAction("Import", self) self.file_import_action.setIcon(pyqt.get_icon("mgear_log-in")) self.file_import_add_action = QtWidgets.QAction("Import Add", self) self.file_import_add_action.setIcon(pyqt.get_icon("mgear_log-in")) self.use_node_namespace_action = QtWidgets.QAction( "Use Namespace From ChannelMaster Node", self) self.use_node_namespace_action.setCheckable(True) self.use_node_namespace_action.setChecked(True) self.use_only_local_data_action = QtWidgets.QAction( "Use Only Data Embedded in Local Node", self) self.use_only_local_data_action.setCheckable(True) # Display actions self.display_fullname_action = QtWidgets.QAction( "Channel Full Name", self) self.display_fullname_action.setCheckable(True) self.display_fullname_action.setShortcut(QtGui.QKeySequence("Ctrl+F")) self.scrubbing_update_action = QtWidgets.QAction( "Update Value While Scrubbing", self) self.scrubbing_update_action.setCheckable(True) self.scrubbing_update_action.setShortcut(QtGui.QKeySequence("Ctrl+U")) self.display_edit_channel_order_action = QtWidgets.QAction( "Edit Channel Order", self) self.display_sync_graph_action = QtWidgets.QAction( "Sync with Graph Editor", self) self.display_sync_graph_action.setIcon(pyqt.get_icon("mgear_activity")) self.display_auto_sync_graph_action = QtWidgets.QAction( "Auto Sync with Graph Editor", self) self.display_auto_sync_graph_action.setCheckable(True) self.display_order_default_action = QtWidgets.QAction("Default", self) self.display_order_alphabetical_action = QtWidgets.QAction( "Alphabetical", self) # Key actions self.key_all_action = QtWidgets.QAction("Keyframe", self) self.key_all_action.setIcon(pyqt.get_icon("mgear_key")) self.key_all_action.setShortcut(QtGui.QKeySequence("S")) self.key_copy_action = QtWidgets.QAction("Copy Key", self) self.key_copy_action.setIcon(pyqt.get_icon("mgear_copy")) self.key_copy_action.setShortcut(QtGui.QKeySequence("Ctrl+C")) self.key_paste_action = QtWidgets.QAction("Paste Key", self) self.key_paste_action.setIcon(pyqt.get_icon("mgear_clipboard")) self.key_paste_action.setShortcut(QtGui.QKeySequence("Ctrl+V")) self.key_all_tabs_action = QtWidgets.QAction("Keyframe All Tabs", self) self.key_all_tabs_action.setCheckable(True) self.copypaste_all_channels_action = QtWidgets.QAction( "Copy/Paste All Channels", self) self.copypaste_all_channels_action.setCheckable(True) self.key_del_frame_action = QtWidgets.QAction( "Delete Current Frame Keyframe", self) self.key_del_frame_action.setIcon(pyqt.get_icon("mgear_trash-2")) self.key_del_frame_action.setShortcut(QtGui.QKeySequence("Shift+S")) # Tabs Actions self.tab_new_action = QtWidgets.QAction("New Tab", self) self.tab_new_action.setIcon(pyqt.get_icon("mgear_menu")) self.tab_del_action = QtWidgets.QAction("Delete Current Tab", self) self.tab_del_action.setIcon(pyqt.get_icon("mgear_trash-2")) self.tab_dup_action = QtWidgets.QAction("Duplicate Tab", self) self.tab_dup_action.setIcon(pyqt.get_icon("mgear_copy")) self.tab_rename_action = QtWidgets.QAction("Rename Tab", self)
def setBackground(self): # type: () -> None # Retarget background Image to absolute path if self.bgPath is not None: self.img_background.setPixmap(QtGui.QPixmap(self.bgPath))
def create_actions(self): # file actions self.file_new_node_action = QtWidgets.QAction("New Node", self) self.file_new_node_action.setIcon(pyqt.get_icon("plus-square")) self.file_save_node_action = QtWidgets.QAction("Save Current Node", self) self.file_save_node_action.setIcon(pyqt.get_icon("save")) self.file_export_all_action = QtWidgets.QAction( "Export All Tabs", self) self.file_export_all_action.setIcon(pyqt.get_icon("log-out")) self.file_export_current_action = QtWidgets.QAction( "Export Current Tab", self) self.file_export_current_action.setIcon(pyqt.get_icon("log-out")) self.file_import_action = QtWidgets.QAction("Import", self) self.file_import_action.setIcon(pyqt.get_icon("log-in")) self.file_import_add_action = QtWidgets.QAction("Import Add", self) self.file_import_add_action.setIcon(pyqt.get_icon("log-in")) # Display actions self.display_fullname_action = QtWidgets.QAction( "Channel Full Name", self) self.display_fullname_action.setCheckable(True) self.display_fullname_action.setShortcut(QtGui.QKeySequence("Ctrl+F")) self.scrubbing_update_action = QtWidgets.QAction( "Update Value While Scrubbing", self) self.scrubbing_update_action.setCheckable(True) self.scrubbing_update_action.setShortcut(QtGui.QKeySequence("Ctrl+U")) self.display_edit_channel_order_action = QtWidgets.QAction( "Edit Channel Order", self) self.display_sync_graph_action = QtWidgets.QAction( "Sync with Graph Editor", self) self.display_sync_graph_action.setIcon(pyqt.get_icon("activity")) self.display_auto_sync_graph_action = QtWidgets.QAction( "Auto Sync with Graph Editor", self) self.display_auto_sync_graph_action.setCheckable(True) self.display_order_default_action = QtWidgets.QAction("Default", self) self.display_order_alphabetical_action = QtWidgets.QAction( "Alphabetical", self) # Key actions self.key_all_action = QtWidgets.QAction("Keyframe", self) self.key_all_action.setIcon(pyqt.get_icon("key")) self.key_all_action.setShortcut(QtGui.QKeySequence("S")) self.key_copy_action = QtWidgets.QAction("Copy Key", self) self.key_copy_action.setIcon(pyqt.get_icon("copy")) self.key_copy_action.setShortcut(QtGui.QKeySequence("Ctrl+C")) self.key_paste_action = QtWidgets.QAction("Paste Key", self) self.key_paste_action.setIcon(pyqt.get_icon("clipboard")) self.key_paste_action.setShortcut(QtGui.QKeySequence("Ctrl+V")) self.key_all_tabs_action = QtWidgets.QAction("Keyframe All Tabs", self) self.key_all_tabs_action.setCheckable(True) self.copypaste_all_channels_action = QtWidgets.QAction( "Copy/Paste All Channels", self) self.copypaste_all_channels_action.setCheckable(True) self.key_del_frame_action = QtWidgets.QAction( "Delete Current Frame Keyframe", self) self.key_del_frame_action.setIcon(pyqt.get_icon("trash-2")) self.key_del_frame_action.setShortcut(QtGui.QKeySequence("Shift+S")) # Tabs Actions self.tab_new_action = QtWidgets.QAction("New Tab", self) self.tab_new_action.setIcon(pyqt.get_icon("menu")) self.tab_del_action = QtWidgets.QAction("Delete Current Tab", self) self.tab_del_action.setIcon(pyqt.get_icon("trash-2")) self.tab_dup_action = QtWidgets.QAction("Duplicate Tab", self) self.tab_dup_action.setIcon(pyqt.get_icon("copy")) self.tab_rename_action = QtWidgets.QAction("Rename Tab", self)