def __init__(self): super(tool_tab, self).__init__() # - Build ''' main = QtGui.QVBoxLayout() scroll = QtGui.QScrollArea() scroll.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn) scroll.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) scroll.setWidgetResizable(True) ''' layoutV = QtGui.QVBoxLayout() splitter = QtGui.QSplitter(QtCore.Qt.Vertical) #splitter.setHandleWidth(1) self.fontMetrics = WFontMetrics(self) self.fontZones = WFontZones(self) splitter.addWidget(self.fontMetrics) splitter.addWidget(self.fontZones) splitter.setStretchFactor(0,1) splitter.setStretchFactor(1,2) layoutV.addWidget(splitter) # - Build --------------------------- #layoutV.addStretch() #scroll.setLayout(layoutV) #main.addWidget(scroll) self.setLayout(layoutV)
def __init__(self): super(tool_tab, self).__init__() # - Init layoutV = QtGui.QVBoxLayout() self.KeyboardOverride = False # - Build layoutV.addWidget(QtGui.QLabel('Basic Operations:')) layoutV.addLayout(basicOps()) layoutV.addLayout(glyphComposer(self)) layoutV.addWidget(QtGui.QLabel('Align Shapes:')) self.alignShapes = alignShapes() layoutV.addLayout(self.alignShapes) layoutV.addStretch() layoutV.addWidget(QtGui.QLabel('Transformation:')) self.shapeMovement = shapeMovement() layoutV.addLayout(self.shapeMovement) # - Capture Kyaboard self.btn_capture = QtGui.QPushButton('Capture Keyboard') self.btn_capture.setCheckable(True) self.btn_capture.setToolTip( 'Click here to capture keyboard arrows input.\nNote:\n+10 SHIFT\n+100 CTRL\n Exit ESC' ) self.btn_capture.clicked.connect(self.captureKeyaboard) layoutV.addWidget(self.btn_capture) # - Build --------------------------- self.setLayout(layoutV)
def __init__(self, parentWidget): super(WFontInstances, self).__init__() # - Init self.upperWidget = parentWidget self.gridPlane = QtGui.QGridLayout() self.axisPlane = QtGui.QVBoxLayout() # - Interface self.btn_axis_add = QtGui.QPushButton('New Axis Table') self.btn_apply = QtGui.QPushButton('Apply Changes') self.btn_reset = QtGui.QPushButton('Reset') self.btn_open = QtGui.QPushButton('Open') self.btn_save = QtGui.QPushButton('Save') self.btn_apply.setEnabled(False) self.btn_reset.setEnabled(False) self.btn_open.setEnabled(False) self.btn_save.setEnabled(False) self.btn_axis_add.clicked.connect(self.add_AxisTable) # - Build # -- Main Grid self.gridPlane.addWidget(self.btn_axis_add, 0, 0, 1, 3) self.gridPlane.addWidget(self.btn_save, 0, 3, 1, 3) self.gridPlane.addWidget(self.btn_open, 0, 6, 1, 3) self.gridPlane.addWidget(self.btn_reset, 0, 9, 1, 3) self.gridPlane.addWidget(self.btn_apply, 0, 12, 1, 3) self.gridPlane.addLayout(self.axisPlane, 1, 0, 5, 15) self.setLayout(self.gridPlane)
def __init__(self): super(tool_tab, self).__init__() # - Init layoutV = QtGui.QVBoxLayout() self.layerSelector = QlayerSelect() self.quickTools = QlayerTools(self.layerSelector) self.blendTools = QlayerBlend(self.layerSelector) self.basicTools = QlayerBasic(self.layerSelector) self.unfoldLayers = QlayerMultiEdit(self.layerSelector) layoutV.addLayout(self.layerSelector) layoutV.addWidget(QtGui.QLabel('Basic Tools (Layers selected)')) layoutV.addLayout(self.basicTools) layoutV.addWidget( QtGui.QLabel('Content Tools (Active Layer to selection)')) layoutV.addLayout(self.quickTools) layoutV.addWidget( QtGui.QLabel('Layer Multi-editing (Layers selected)')) layoutV.addLayout(self.unfoldLayers) layoutV.addWidget( QtGui.QLabel('Interpolate/Blend (Active Layer to selection)')) #layoutV.addWidget(QtGui.QLabel('\nWARN: Disabled due FL6 6722 Bug!')) layoutV.addLayout(self.blendTools) # - Build --------------------------- layoutV.addStretch() self.setLayout(layoutV)
def __init__(self): super(typerig_Manager, self).__init__() #self.setStyleSheet(ss_Toolbox_none) # - Tabs -------------------------- # -- Dynamically load all tabs self.tabs = QtGui.QTabWidget() #self.tabs.setTabPosition(QtGui.QTabWidget.East) # --- Load all tabs from this directory as modules. Check __init__.py # --- <dirName>.modules tabs/modules manifest in list format for toolName in Manager.modules: if ignorePanel not in toolName: self.tabs.addTab(eval('Manager.%s.tool_tab()' % toolName), toolName) # - Layouts ------------------------------- layoutV = QtGui.QVBoxLayout() layoutV.setContentsMargins(0, 0, 0, 0) self.lay_layers = QtGui.QGridLayout() self.lay_layers.setContentsMargins(15, 5, 5, 3) # -- Build layouts ------------------------------- layoutV.addWidget(self.tabs) # - Set Widget ------------------------------- self.setLayout(layoutV) self.setWindowTitle('%s %s' % (app_name, app_version)) self.setGeometry(300, 300, 900, 440) self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) # Always on top!! #self.setMinimumWidth(300) self.show()
def __init__(self): super(tool_tab, self).__init__() # - Init layoutV = QtGui.QVBoxLayout() self.outline = QContourSelect() layoutV.addLayout(self.outline) # - Build #layoutV.addStretch() self.setLayout(layoutV)
def __init__(self): super(tool_tab, self).__init__() # - Build layoutV = QtGui.QVBoxLayout() layoutV.addWidget(QtGui.QLabel('Font Anchors')) #layoutV.addLayout(WFontAnchors(self)) print buildGlyphAnchorData() # - Build --------------------------- layoutV.addStretch() self.setLayout(layoutV)
def __init__(self): super(tool_tab, self).__init__() # - Init layoutV = QtGui.QVBoxLayout() self.strGenerator = QStringGen() # - Build --------------------------- layoutV.addWidget(QtGui.QLabel('String generator:')) layoutV.addLayout(self.strGenerator) layoutV.addStretch() self.setLayout(layoutV)
def __init__(self): super(tool_tab, self).__init__() # - Init layoutV = QtGui.QVBoxLayout() # - Build layoutV.addWidget(QtGui.QLabel('Curve optimization')) layoutV.addLayout(curveEq()) # - Build --------------------------- layoutV.addStretch() self.setLayout(layoutV)
def __init__(self): super(tool_tab, self).__init__() # - Init layoutV = QtGui.QVBoxLayout() self.smart_corner = QSmartCorner(self) self.corner_control = QCornerControl(self) layoutV.addLayout(self.smart_corner) layoutV.addLayout(self.corner_control) # - Build layoutV.addStretch() self.setLayout(layoutV)
def __init__(self): super(tool_tab, self).__init__() # - Init layoutV = QtGui.QVBoxLayout() self.dropGuide = QDropGuide() self.glyphTags = QGlyphTag() # - Build --------------------------- layoutV.addLayout(self.dropGuide) layoutV.addLayout(self.glyphTags) layoutV.addStretch() self.setLayout(layoutV)
def __init__(self): super(tool_tab, self).__init__() # - Init layoutV = QtGui.QVBoxLayout() self.blockSelector = QTextBlockSelect() self.basicTools = QTextBlockBasic(self.blockSelector, self) layoutV.addLayout(self.blockSelector) layoutV.addLayout(self.basicTools) # - Build --------------------------- layoutV.addStretch() self.setLayout(layoutV)
def __init__(self): super(tool_tab, self).__init__() # - Init layoutV = QtGui.QVBoxLayout() self.anchorSelector = QlayerSelect() self.basicTools = QanchorBasic(self.anchorSelector) layoutV.addLayout(self.anchorSelector) #layoutV.addWidget(QtGui.QLabel('Basic Tools:')) layoutV.addLayout(self.basicTools) # - Build --------------------------- layoutV.addStretch() self.setLayout(layoutV)
def __init__(self): super(tool_tab, self).__init__() layoutV = QtGui.QVBoxLayout() self.kernGroups = WKernGroups(self) self.ActionsMenu = QtGui.QMenuBar(self) self.ActionsMenu.addMenu(self.kernGroups.menu_data) self.ActionsMenu.addMenu(self.kernGroups.menu_class) self.ActionsMenu.addMenu(self.kernGroups.menu_type) self.ActionsMenu.addMenu(self.kernGroups.menu_memb) layoutV.setMenuBar(self.ActionsMenu) layoutV.addWidget(self.kernGroups) # - Build --------------------------- self.setLayout(layoutV)
def __init__(self): super(tool_tab, self).__init__() # - Init layoutV = QtGui.QVBoxLayout() self.KeyboardOverride = False # - Build layoutV.addWidget(QtGui.QLabel('Basic Operations')) layoutV.addLayout(basicOps()) layoutV.addWidget(QtGui.QLabel('Align nodes')) self.alignNodes = alignNodes() layoutV.addLayout(self.alignNodes) #layoutV.addWidget(QtGui.QLabel('Break/Knot Contour')) #layoutV.addLayout(breakContour()) layoutV.addWidget(QtGui.QLabel('Basic Contour Operations')) layoutV.addLayout(basicContour()) layoutV.addWidget(QtGui.QLabel('Align Contours')) layoutV.addLayout(alignContours()) #layoutV.addWidget(QtGui.QLabel('Convert to Hobby')) #layoutV.addLayout(convertHobby()) layoutV.addWidget(QtGui.QLabel('Movement')) self.advMovement = advMovement(self.alignNodes) layoutV.addLayout(self.advMovement) # - Capture Kyaboard self.btn_capture = QtGui.QPushButton('Capture Keyboard') self.btn_capture.setCheckable(True) self.btn_capture.setToolTip('Click here to capture keyboard arrows input.\nNote:\n+10 SHIFT\n+100 CTRL\n Exit ESC') self.btn_capture.clicked.connect(self.captureKeyaboard) layoutV.addWidget(self.btn_capture) # - Build --------------------------- layoutV.addStretch() self.setLayout(layoutV)
def __init__(self): super(tool_tab, self).__init__() # - Build ''' main = QtGui.QVBoxLayout() scroll = QtGui.QScrollArea() scroll.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn) scroll.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) scroll.setWidgetResizable(True) ''' layoutV = QtGui.QVBoxLayout() self.font_instances = WFontInstances(self) layoutV.addWidget(self.font_instances) # - Build --------------------------- layoutV.addStretch() #scroll.setLayout(layoutV) #main.addWidget(scroll) self.setLayout(layoutV)
def __init__(self): super(tool_tab, self).__init__() # - Init layoutV = QtGui.QVBoxLayout() # - Build #layoutV.addWidget(QtGui.QLabel('Glyph: Adjust Metric data')) layoutV.addLayout(metrics_adjust()) layoutV.addSpacing(10) layoutV.addWidget(QtGui.QLabel('Glyph: Copy Metric data')) layoutV.addLayout(metrics_copy()) layoutV.addSpacing(10) layoutV.addWidget(QtGui.QLabel('Glyph: Set metric expressions')) layoutV.addLayout(metrics_expr()) layoutV.addSpacing(10) layoutV.addWidget(QtGui.QLabel('\nFont: Set Font Metrics')) layoutV.addLayout(metrics_font()) # - Build --------------------------- layoutV.addStretch() self.setLayout(layoutV)
def __init__(self): super(tool_tab, self).__init__() # - Init layoutV = QtGui.QVBoxLayout() layoutH = QtGui.QHBoxLayout() # - Build panel if sysReady: self.head = mixerHead() self.tail = mixerTail() self.head.btn_refresh.clicked.connect(self.refresh) self.head.btn_set_axis.clicked.connect(self.set_axis) self.head.btn_getVstem.clicked.connect(self.get_v_stems) self.head.btn_getHstem.clicked.connect(self.get_h_stems) layoutV.addLayout(self.head) layoutV.addSpacing(15) # -- Set Sliders # --- Mixer layoutV.addWidget(QtGui.QLabel('Interpolate: X (Vertical Stems)')) self.mixer_dx = trSliderCtrl('1', '1000', '0', 10) self.mixer_dx.sld_axis.valueChanged.connect( lambda: self.process_scale(self.head.chk_single.isChecked(), self.head.chk_preview.isChecked())) layoutV.addLayout(self.mixer_dx) layoutV.addWidget( QtGui.QLabel('Interpolate: Y (Horizontal Stems)')) self.mixer_dy = trSliderCtrl('1', '1000', '0', 10) self.mixer_dy.sld_axis.valueChanged.connect( lambda: self.process_scale(self.head.chk_single.isChecked(), self.head.chk_preview.isChecked())) layoutV.addLayout(self.mixer_dy) # - Constant width Button #self.btn_revWidth = QtGui.QPushButton('Constant width for weight') #self.btn_revWidth.setCheckable(True) #layoutV.addWidget(self.btn_revWidth) layoutV.addSpacing(15) # --- Scaler layoutV.addWidget(QtGui.QLabel('Compensative scaler: Width')) self.scaler_dx = trSliderCtrl('1', '200', '100', 10) self.scaler_dx.sld_axis.valueChanged.connect( lambda: self.process_scale(self.head.chk_single.isChecked(), self.head.chk_preview.isChecked())) layoutV.addLayout(self.scaler_dx) layoutV.addSpacing(15) layoutV.addWidget(QtGui.QLabel('Compensative scaler: Height')) self.scaler_dy = trSliderCtrl('1', '200', '100', 10) self.scaler_dy.sld_axis.valueChanged.connect( lambda: self.process_scale(self.head.chk_single.isChecked(), self.head.chk_preview.isChecked())) layoutV.addLayout(self.scaler_dy) layoutV.addSpacing(25) layoutV.addLayout(self.tail) # - Process Button self.btn_process = QtGui.QPushButton('Process Transformation') self.btn_process.clicked.connect(lambda: self.process_scale( self.head.chk_single.isChecked(), True, True)) layoutV.addWidget(self.btn_process) # -- Initialize self.refresh() # -- Finish layoutV.addStretch() else: # - Throw an error layoutV.addLayout(trMsgSimple(warnMessage)) # - Set panel self.setLayout(layoutV)
def __init__(self): super(typerig_filter, self).__init__() #self.setStyleSheet(ss_Toolbox_none) # - Layers -------------------------- self.chk_ActiveLayer = QtGui.QCheckBox('Active') self.chk_Masters = QtGui.QCheckBox('Masters') self.chk_Masks = QtGui.QCheckBox('Masks') self.chk_Service = QtGui.QCheckBox('Services') self.chk_ActiveLayer.setCheckState(QtCore.Qt.Checked) #self.chk_ActiveLayer.setStyleSheet('QCheckBox::indicator:checked {background-color: limegreen; border: 1px Solid limegreen;}') self.chk_ActiveLayer.stateChanged.connect(self.refreshLayers) self.chk_Masters.stateChanged.connect(self.refreshLayers) self.chk_Masks.stateChanged.connect(self.refreshLayers) self.chk_Service.stateChanged.connect(self.refreshLayers) self.refreshLayers() # - Glyphs -------------------------- self.rad_glyph = QtGui.QRadioButton('Glyph') self.rad_window = QtGui.QRadioButton('Window') self.rad_selection = QtGui.QRadioButton('Selection') self.rad_font = QtGui.QRadioButton('Font') self.rad_glyph.toggled.connect(self.refreshMode) self.rad_window.toggled.connect(self.refreshMode) self.rad_selection.toggled.connect(self.refreshMode) self.rad_font.toggled.connect(self.refreshMode) self.rad_glyph.setChecked(True) self.rad_glyph.setEnabled(True) self.rad_window.setEnabled(True) self.rad_selection.setEnabled(True) self.rad_font.setEnabled(False) self.rad_glyph.setToolTip('Affect current glyph') self.rad_window.setToolTip('Affect glyphs in active window') self.rad_selection.setToolTip('Affect selected glyphs') self.rad_font.setToolTip('Affect the entire font') # - Fold Button --------------------- self.btn_fold = QtGui.QPushButton('^') self.btn_unfold = QtGui.QPushButton('Restore Panel') self.btn_fold.setFixedHeight(self.chk_ActiveLayer.sizeHint.height() * 2.5) self.btn_fold.setFixedWidth(self.chk_ActiveLayer.sizeHint.height()) self.btn_unfold.setFixedHeight(self.chk_ActiveLayer.sizeHint.height() + 5) self.btn_fold.setToolTip('Fold Panel') self.btn_unfold.setToolTip('Unfold Panel') self.btn_fold.clicked.connect(self.fold) self.btn_unfold.clicked.connect(self.fold) self.flag_fold = False # - Tabs -------------------------- # -- Dynamically load all tabs self.tabs = QtGui.QTabWidget() self.tabs.setTabPosition(QtGui.QTabWidget.East) # --- Load all tabs from this directory as modules. Check __init__.py # --- <dirName>.modules tabs/modules manifest in list format for toolName in Panel.modules: if ignorePanel not in toolName: self.tabs.addTab(eval('Panel.%s.tool_tab()' % toolName), toolName) # - Layouts ------------------------------- layoutV = QtGui.QVBoxLayout() layoutV.setContentsMargins(0, 0, 0, 0) self.lay_controller = QtGui.QGridLayout() self.fr_controller = QtGui.QFrame() self.lay_controller.setContentsMargins(15, 5, 5, 3) # -- Build layouts ------------------------------- self.lay_controller.addWidget(self.chk_ActiveLayer, 0, 0, 1, 1) self.lay_controller.addWidget(self.chk_Masters, 0, 1, 1, 1) self.lay_controller.addWidget(self.chk_Masks, 0, 2, 1, 1) self.lay_controller.addWidget(self.chk_Service, 0, 3, 1, 1) self.lay_controller.addWidget(self.btn_fold, 0, 4, 2, 1) self.lay_controller.addWidget(self.rad_glyph, 1, 0, 1, 1) self.lay_controller.addWidget(self.rad_window, 1, 1, 1, 1) self.lay_controller.addWidget(self.rad_selection, 1, 2, 1, 1) self.lay_controller.addWidget(self.rad_font, 1, 3, 1, 1) layoutV.addWidget(self.btn_unfold) self.fr_controller.setLayout(self.lay_controller) layoutV.addWidget(self.fr_controller) layoutV.addWidget(self.tabs) self.btn_unfold.hide() # - Set Widget ------------------------------- self.setLayout(layoutV) self.setWindowTitle('%s %s' % (app_name, app_version)) self.setGeometry(300, 300, 240, 440) self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) # Always on top!! #self.setMinimumWidth(300) self.show()