Ejemplo n.º 1
0
    def setupUi(self, fastControls):
        fastControls.setObjectName("fastControls")
        fastControls.resize(806, 30)
        self.horizontalLayout = QtGui.QHBoxLayout(fastControls)
        self.horizontalLayout.setContentsMargins(4, 4, 4, 6)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.checkinTypeLabel = QtGui.QLabel(fastControls)
        self.checkinTypeLabel.setTextFormat(QtCore.Qt.PlainText)
        self.checkinTypeLabel.setObjectName("checkinTypeLabel")
        self.horizontalLayout.addWidget(self.checkinTypeLabel)
        self.checkinTypeComboBox = QtGui.QComboBox(fastControls)
        self.checkinTypeComboBox.setObjectName("checkinTypeComboBox")
        self.checkinTypeComboBox.addItem("")
        self.checkinTypeComboBox.addItem("")
        self.checkinTypeComboBox.addItem("")
        self.checkinTypeComboBox.addItem("")
        self.checkinTypeComboBox.addItem("")
        self.horizontalLayout.addWidget(self.checkinTypeComboBox)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Preferred,
                                       QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.explicitFilenameLabel = QtGui.QLabel(fastControls)
        self.explicitFilenameLabel.setObjectName("explicitFilenameLabel")
        self.horizontalLayout.addWidget(self.explicitFilenameLabel)
        self.explicitFilenameLineEdit = QtGui.QLineEdit(fastControls)
        self.explicitFilenameLineEdit.setObjectName("explicitFilenameLineEdit")
        self.horizontalLayout.addWidget(self.explicitFilenameLineEdit)
        self.processLabel = QtGui.QLabel(fastControls)
        self.processLabel.setObjectName("processLabel")
        self.horizontalLayout.addWidget(self.processLabel)
        self.processComboBox = QtGui.QComboBox(fastControls)
        self.processComboBox.setObjectName("processComboBox")
        self.horizontalLayout.addWidget(self.processComboBox)
        self.contextLabel = QtGui.QLabel(fastControls)
        self.contextLabel.setTextFormat(QtCore.Qt.PlainText)
        self.contextLabel.setObjectName("contextLabel")
        self.horizontalLayout.addWidget(self.contextLabel)
        self.contextComboBox = QtGui.QComboBox(fastControls)
        self.contextComboBox.setEditable(True)
        self.contextComboBox.setInsertPolicy(QtGui.QComboBox.NoInsert)
        self.contextComboBox.setObjectName("contextComboBox")
        self.horizontalLayout.addWidget(self.contextComboBox)
        self.horizontalLayout.setStretch(2, 1)
        self.horizontalLayout.setStretch(4, 1)
        self.horizontalLayout.setStretch(8, 1)

        self.retranslateUi(fastControls)
        QtCore.QMetaObject.connectSlotsByName(fastControls)
    def create_presets_combo_box(self):
        self.grid_presets = QtGui.QGridLayout()

        self.presets_combo_box = QtGui.QComboBox()

        self.add_new_preset_button = QtGui.QToolButton()
        self.add_new_preset_button.setAutoRaise(True)
        self.add_new_preset_button.setIcon(gf.get_icon('plus-box', icons_set='mdi', scale_factor=1.2))
        self.add_new_preset_button.clicked.connect(self.add_new_preset)
        self.add_new_preset_button.setToolTip('Create new Preset and Save (from current state)')
        self.add_new_preset_button.setHidden(True)

        self.save_new_preset_button = QtGui.QToolButton()
        self.save_new_preset_button.setAutoRaise(True)
        self.save_new_preset_button.setIcon(gf.get_icon('content-save', icons_set='mdi', scale_factor=1))
        self.save_new_preset_button.clicked.connect(self.save_preset_to_server)
        self.save_new_preset_button.setToolTip('Save Current Preset Changes')
        self.save_new_preset_button.setHidden(True)

        self.remove_preset_button = QtGui.QToolButton()
        self.remove_preset_button.setAutoRaise(True)
        self.remove_preset_button.setIcon(gf.get_icon('delete', icons_set='mdi', scale_factor=1))
        self.remove_preset_button.clicked.connect(self.delete_preset_from_server)
        self.remove_preset_button.setToolTip('Remove Current Preset')
        self.remove_preset_button.setHidden(True)

        self.grid_presets.addWidget(self.remove_preset_button, 0, 0, 1, 1)
        self.grid_presets.addWidget(self.presets_combo_box, 0, 1, 1, 1)
        self.grid_presets.addWidget(self.save_new_preset_button, 0, 2, 1, 1)
        self.grid_presets.addWidget(self.add_new_preset_button, 0, 3, 1, 1)

        self.grid_presets.setColumnStretch(1, 0)

        self.grid.addLayout(self.grid_presets, 0, 0, 1, 2)
Ejemplo n.º 3
0
    def create_edits_widgets(self):

        self.context_edit = QtGui.QLineEdit()
        self.context_edit.setText(self.get_only_context())

        self.context_edit_label = QtGui.QLabel('Context:')

        self.explicit_file_name_edit = QtGui.QLineEdit()
        self.explicit_file_name_edit.setText(self.args_dict['explicit_filename'])
        self.explicit_file_name_label = QtGui.QLabel('Explicit File Name:')

        self.context_as_file_name_checkbox = QtGui.QCheckBox('Context as Explicit File Name')

        self.previews_layout = QtGui.QHBoxLayout()
        self.previews_layout.setContentsMargins(0, 0, 0, 0)
        self.previews_widget = QtGui.QWidget()
        self.previews_widget.setLayout(self.previews_layout)

        self.make_screenshot_button = QtGui.QToolButton()
        self.make_screenshot_button.setAutoRaise(True)
        self.make_screenshot_button.setIcon(gf.get_icon('camera'))

        self.choose_preview_button = QtGui.QToolButton()
        self.choose_preview_button.setAutoRaise(True)
        self.choose_preview_button.setIcon(gf.get_icon('folder-open'))

        self.edit_previews_button = QtGui.QToolButton()
        self.edit_previews_button.setAutoRaise(True)
        self.edit_previews_button.setIcon(gf.get_icon('edit'))

        self.clear_previews_button = QtGui.QToolButton()
        self.clear_previews_button.setAutoRaise(True)
        self.clear_previews_button.setIcon(gf.get_icon('trash'))

        self.create_drop_plate()

        self.previews_layout.addWidget(self.make_screenshot_button)
        self.previews_layout.addWidget(self.choose_preview_button)
        self.previews_layout.addWidget(self.drop_plate)
        self.previews_layout.addWidget(self.edit_previews_button)
        self.previews_layout.addWidget(self.clear_previews_button)

        self.repo_combo_box = QtGui.QComboBox()
        self.repo_label = QtGui.QLabel('Repository:')
        self.fill_repo_combo_box()

        self.main_layout.addWidget(self.context_edit, 9, 1, 1, 1)
        self.main_layout.addWidget(self.context_edit_label, 9, 0, 1, 1)
        self.main_layout.addWidget(self.explicit_file_name_edit, 10, 1, 1, 1)
        self.main_layout.addWidget(self.explicit_file_name_label, 10, 0, 1, 1)
        self.main_layout.addWidget(self.repo_combo_box, 11, 1, 1, 1)
        self.main_layout.addWidget(self.repo_label, 11, 0, 1, 1)
        self.main_layout.addWidget(self.context_as_file_name_checkbox, 12, 0, 1, 2)
        self.main_layout.addWidget(self.previews_widget, 0, 0, 1, 2)
Ejemplo n.º 4
0
    def create_control_buttons(self):
        self.addNewButton = QtGui.QPushButton('Create')
        self.addNewButton.setMaximumWidth(80)
        self.saveButton = QtGui.QPushButton('Save')
        self.saveButton.setMaximumWidth(80)
        self.cancelButton = QtGui.QPushButton('Cancel')
        self.cancelButton.setMaximumWidth(80)
        self.buildDirectoryButton = QtGui.QPushButton('Build Full Directory Structure')
        self.buildDirectoryButton.setIcon(gf.get_icon('database'))
        self.build_directory_checkbox = QtGui.QCheckBox('Build Full Directory Structure')
        self.build_directory_checkbox.setChecked(False)
        self.build_directory_checkbox.setIcon(gf.get_icon('database'))

        self.repositoryComboBox = QtGui.QComboBox()
        base_dirs = env_tactic.get_all_base_dirs()
        # Default repo states
        current_repo = gf.get_value_from_config(cfg_controls.get_checkin(), 'repositoryComboBox')
        for key, val in base_dirs:
            if val['value'][4]:
                self.repositoryComboBox.addItem(val['value'][1])
                self.repositoryComboBox.setItemData(self.repositoryComboBox.count() - 1, val)

        # Special for build all repos dirs
        self.repositoryComboBox.addItem('All Repos')

        if current_repo:
            self.repositoryComboBox.setCurrentIndex(current_repo)

        if self.tactic_widget.view == 'insert':
            self.main_layout.addWidget(self.build_directory_checkbox, 1, 0, 1, 1)
            self.main_layout.addWidget(self.repositoryComboBox, 1, 1, 1, 1)
            spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
            self.main_layout.addItem(spacerItem, 1, 2, 1, 1)
            self.main_layout.addWidget(self.addNewButton, 1, 3, 1, 1)
            self.main_layout.addWidget(self.cancelButton, 1, 4, 1, 1)
            self.main_layout.setColumnStretch(1, 0)
        else:
            self.main_layout.addWidget(self.buildDirectoryButton, 1, 0, 1, 1)
            self.main_layout.addWidget(self.repositoryComboBox, 1, 1, 1, 1)
            spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
            self.main_layout.addItem(spacerItem, 1, 2, 1, 1)
            self.main_layout.addWidget(self.saveButton, 1, 3, 1, 1)
            self.main_layout.addWidget(self.cancelButton, 1, 4, 1, 1)
            self.main_layout.setColumnStretch(1, 0)

        if self.item:
            if self.item.type != 'sobject':
                self.buildDirectoryButton.setHidden(True)
                self.repositoryComboBox.setHidden(True)
Ejemplo n.º 5
0
    def setupUi(self, mayaScenePageWidget):
        mayaScenePageWidget.setObjectName("mayaScenePageWidget")
        self.mayaScenePageWidgetLayout = QtGui.QGridLayout(mayaScenePageWidget)
        self.mayaScenePageWidgetLayout.setContentsMargins(0, 0, 0, 0)
        self.mayaScenePageWidgetLayout.setObjectName(
            "mayaScenePageWidgetLayout")
        self.currentWorkdirLable = QtGui.QLabel(mayaScenePageWidget)
        self.currentWorkdirLable.setObjectName("currentWorkdirLable")
        self.mayaScenePageWidgetLayout.addWidget(self.currentWorkdirLable, 0,
                                                 0, 1, 1)
        self.currentWorkdirLineEdit = QtGui.QLineEdit(mayaScenePageWidget)
        self.currentWorkdirLineEdit.setReadOnly(True)
        self.currentWorkdirLineEdit.setObjectName("currentWorkdirLineEdit")
        self.mayaScenePageWidgetLayout.addWidget(self.currentWorkdirLineEdit,
                                                 0, 1, 1, 1)
        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Expanding)
        self.mayaScenePageWidgetLayout.addItem(spacerItem, 4, 0, 1, 2)
        self.createMayaDirsCheckBox = QtGui.QCheckBox(mayaScenePageWidget)
        self.createMayaDirsCheckBox.setChecked(True)
        self.createMayaDirsCheckBox.setObjectName("createMayaDirsCheckBox")
        self.mayaScenePageWidgetLayout.addWidget(self.createMayaDirsCheckBox,
                                                 2, 0, 1, 1)
        self.createPlayblastCheckBox = QtGui.QCheckBox(mayaScenePageWidget)
        self.createPlayblastCheckBox.setChecked(True)
        self.createPlayblastCheckBox.setObjectName("createPlayblastCheckBox")
        self.mayaScenePageWidgetLayout.addWidget(self.createPlayblastCheckBox,
                                                 3, 0, 1, 1)
        self.mayaSaveFormatLabel = QtGui.QLabel(mayaScenePageWidget)
        self.mayaSaveFormatLabel.setObjectName("mayaSaveFormatLabel")
        self.mayaScenePageWidgetLayout.addWidget(self.mayaSaveFormatLabel, 1,
                                                 0, 1, 1)
        self.formatTypeComboBox = QtGui.QComboBox(mayaScenePageWidget)
        self.formatTypeComboBox.setObjectName("formatTypeComboBox")
        self.mayaScenePageWidgetLayout.addWidget(self.formatTypeComboBox, 1, 1,
                                                 1, 1)
        self.mayaScenePageWidgetLayout.setColumnMinimumWidth(1, 100)
        self.mayaScenePageWidgetLayout.setColumnStretch(1, 1)

        self.retranslateUi(mayaScenePageWidget)
        QtCore.QMetaObject.connectSlotsByName(mayaScenePageWidget)
Ejemplo n.º 6
0
    def create_options_toolbar(self):

        self.collapsable_options_toolbar = Ui_horizontalCollapsableWidget()
        buttons_layout = QtGui.QHBoxLayout()
        buttons_layout.setSpacing(9)
        buttons_layout.setContentsMargins(0, 0, 0, 0)
        self.collapsable_options_toolbar.set_direction('right')
        self.collapsable_options_toolbar.setLayout(buttons_layout)
        self.collapsable_options_toolbar.setCollapsed(True)

        self.auto_save_check_box = QtGui.QCheckBox('Autosave')
        self.auto_save_check_box.setChecked(False)

        self.definition_label = QtGui.QLabel('Definition: ')

        self.definition_combo_box = QtGui.QComboBox()

        buttons_layout.addWidget(self.definition_label)
        buttons_layout.addWidget(self.definition_combo_box)
        buttons_layout.addWidget(self.auto_save_check_box)

        self.main_layout.addWidget(self.collapsable_options_toolbar, 0, 1, 1,
                                   1)
    def setupUi(self, checkinOptionsPageWidget):
        checkinOptionsPageWidget.setObjectName("checkinOptionsPageWidget")
        self.checkinPageWidgetLayout = QtGui.QVBoxLayout(checkinOptionsPageWidget)
        self.checkinPageWidgetLayout.setContentsMargins(0, 0, 0, 0)
        self.checkinPageWidgetLayout.setObjectName("checkinPageWidgetLayout")
        self.checkinMiscOptionsGroupBox = QtGui.QGroupBox(checkinOptionsPageWidget)
        font = Qt4Gui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.checkinMiscOptionsGroupBox.setFont(font)
        self.checkinMiscOptionsGroupBox.setFlat(True)
        self.checkinMiscOptionsGroupBox.setObjectName("checkinMiscOptionsGroupBox")
        self.checkinMiscOptionsLayout = QtGui.QGridLayout(self.checkinMiscOptionsGroupBox)
        self.checkinMiscOptionsLayout.setContentsMargins(10, 24, -1, 0)
        self.checkinMiscOptionsLayout.setObjectName("checkinMiscOptionsLayout")
        self.versionsSeparateCheckinCheckBox = QtGui.QCheckBox(self.checkinMiscOptionsGroupBox)
        self.versionsSeparateCheckinCheckBox.setObjectName("versionsSeparateCheckinCheckBox")
        self.checkinMiscOptionsLayout.addWidget(self.versionsSeparateCheckinCheckBox, 4, 0, 1, 1)
        self.snapshotDescriptionLimitCheckBox = QtGui.QCheckBox(self.checkinMiscOptionsGroupBox)
        self.snapshotDescriptionLimitCheckBox.setChecked(True)
        self.snapshotDescriptionLimitCheckBox.setObjectName("snapshotDescriptionLimitCheckBox")
        self.checkinMiscOptionsLayout.addWidget(self.snapshotDescriptionLimitCheckBox, 6, 0, 1, 1)
        self.snapshotDescriptionLimitSpinBox = QtGui.QSpinBox(self.checkinMiscOptionsGroupBox)
        self.snapshotDescriptionLimitSpinBox.setMinimum(20)
        self.snapshotDescriptionLimitSpinBox.setMaximum(50000)
        self.snapshotDescriptionLimitSpinBox.setSingleStep(5)
        self.snapshotDescriptionLimitSpinBox.setProperty("value", 80)
        self.snapshotDescriptionLimitSpinBox.setObjectName("snapshotDescriptionLimitSpinBox")
        self.checkinMiscOptionsLayout.addWidget(self.snapshotDescriptionLimitSpinBox, 6, 2, 1, 1)
        self.bottomVersionsRadioButton = QtGui.QRadioButton(self.checkinMiscOptionsGroupBox)
        self.bottomVersionsRadioButton.setObjectName("bottomVersionsRadioButton")
        self.checkinMiscOptionsLayout.addWidget(self.bottomVersionsRadioButton, 4, 1, 1, 1)
        self.label_2 = QtGui.QLabel(self.checkinMiscOptionsGroupBox)
        self.label_2.setObjectName("label_2")
        self.checkinMiscOptionsLayout.addWidget(self.label_2, 7, 0, 1, 1)
        self.displayLimitSpinBox = QtGui.QSpinBox(self.checkinMiscOptionsGroupBox)
        self.displayLimitSpinBox.setMinimum(20)
        self.displayLimitSpinBox.setMaximum(500)
        self.displayLimitSpinBox.setSingleStep(5)
        self.displayLimitSpinBox.setObjectName("displayLimitSpinBox")
        self.checkinMiscOptionsLayout.addWidget(self.displayLimitSpinBox, 7, 2, 1, 1)
        self.rightVersionsRadioButton = QtGui.QRadioButton(self.checkinMiscOptionsGroupBox)
        self.rightVersionsRadioButton.setChecked(True)
        self.rightVersionsRadioButton.setObjectName("rightVersionsRadioButton")
        self.checkinMiscOptionsLayout.addWidget(self.rightVersionsRadioButton, 4, 2, 1, 1)
        self.doubleClickSaveCheckBox = QtGui.QCheckBox(self.checkinMiscOptionsGroupBox)
        self.doubleClickSaveCheckBox.setObjectName("doubleClickSaveCheckBox")
        self.checkinMiscOptionsLayout.addWidget(self.doubleClickSaveCheckBox, 1, 0, 1, 3)
        self.doubleClickOpenCheckBox = QtGui.QCheckBox(self.checkinMiscOptionsGroupBox)
        self.doubleClickOpenCheckBox.setObjectName("doubleClickOpenCheckBox")
        self.checkinMiscOptionsLayout.addWidget(self.doubleClickOpenCheckBox, 2, 0, 1, 3)
        self.showAllProcessCheckBox = QtGui.QCheckBox(self.checkinMiscOptionsGroupBox)
        self.showAllProcessCheckBox.setObjectName("showAllProcessCheckBox")
        self.checkinMiscOptionsLayout.addWidget(self.showAllProcessCheckBox, 3, 0, 1, 3)
        self.getPreviewsThroughHttpCheckbox = QtGui.QCheckBox(self.checkinMiscOptionsGroupBox)
        self.getPreviewsThroughHttpCheckbox.setObjectName("getPreviewsThroughHttpCheckbox")
        self.checkinMiscOptionsLayout.addWidget(self.getPreviewsThroughHttpCheckbox, 0, 0, 1, 3)
        self.checkinMiscOptionsLayout.setColumnStretch(0, 1)
        self.checkinPageWidgetLayout.addWidget(self.checkinMiscOptionsGroupBox)
        self.snapshotsSavingOptionsGroupBox = QtGui.QGroupBox(checkinOptionsPageWidget)
        font = Qt4Gui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.snapshotsSavingOptionsGroupBox.setFont(font)
        self.snapshotsSavingOptionsGroupBox.setFlat(True)
        self.snapshotsSavingOptionsGroupBox.setObjectName("snapshotsSavingOptionsGroupBox")
        self.snapshotsSavingOptionsLayout = QtGui.QGridLayout(self.snapshotsSavingOptionsGroupBox)
        self.snapshotsSavingOptionsLayout.setContentsMargins(10, 24, -1, 0)
        self.snapshotsSavingOptionsLayout.setObjectName("snapshotsSavingOptionsLayout")
        self.repositoryComboBox = QtGui.QComboBox(self.snapshotsSavingOptionsGroupBox)
        self.repositoryComboBox.setObjectName("repositoryComboBox")
        self.snapshotsSavingOptionsLayout.addWidget(self.repositoryComboBox, 1, 1, 1, 3)
        self.updateVersionlessCheckBox = QtGui.QCheckBox(self.snapshotsSavingOptionsGroupBox)
        self.updateVersionlessCheckBox.setChecked(True)
        self.updateVersionlessCheckBox.setObjectName("updateVersionlessCheckBox")
        self.snapshotsSavingOptionsLayout.addWidget(self.updateVersionlessCheckBox, 4, 0, 1, 1)
        self.seuqenceNamingHorizontalLayout = QtGui.QHBoxLayout()
        self.seuqenceNamingHorizontalLayout.setSpacing(4)
        self.seuqenceNamingHorizontalLayout.setObjectName("seuqenceNamingHorizontalLayout")
        self.sequenceNamingTemplateLineEdit = QtGui.QLineEdit(self.snapshotsSavingOptionsGroupBox)
        self.sequenceNamingTemplateLineEdit.setReadOnly(True)
        self.sequenceNamingTemplateLineEdit.setObjectName("sequenceNamingTemplateLineEdit")
        self.seuqenceNamingHorizontalLayout.addWidget(self.sequenceNamingTemplateLineEdit)
        self.editSequenceNamingTemplateToolButton = QtGui.QToolButton(self.snapshotsSavingOptionsGroupBox)
        self.editSequenceNamingTemplateToolButton.setText("")
        self.editSequenceNamingTemplateToolButton.setAutoRaise(True)
        self.editSequenceNamingTemplateToolButton.setObjectName("editSequenceNamingTemplateToolButton")
        self.seuqenceNamingHorizontalLayout.addWidget(self.editSequenceNamingTemplateToolButton)
        self.seuqenceNamingHorizontalLayout.setStretch(0, 1)
        self.snapshotsSavingOptionsLayout.addLayout(self.seuqenceNamingHorizontalLayout, 11, 1, 1, 3)
        self.sequencePaddingHorizontalLayout = QtGui.QHBoxLayout()
        self.sequencePaddingHorizontalLayout.setSpacing(4)
        self.sequencePaddingHorizontalLayout.setObjectName("sequencePaddingHorizontalLayout")
        self.sequencePaddingHorizontalSlider = QtGui.QSlider(self.snapshotsSavingOptionsGroupBox)
        self.sequencePaddingHorizontalSlider.setMinimum(1)
        self.sequencePaddingHorizontalSlider.setMaximum(9)
        self.sequencePaddingHorizontalSlider.setProperty("value", 3)
        self.sequencePaddingHorizontalSlider.setOrientation(QtCore.Qt.Horizontal)
        self.sequencePaddingHorizontalSlider.setObjectName("sequencePaddingHorizontalSlider")
        self.sequencePaddingHorizontalLayout.addWidget(self.sequencePaddingHorizontalSlider)
        self.sequencePaddingSpinBox = QtGui.QSpinBox(self.snapshotsSavingOptionsGroupBox)
        self.sequencePaddingSpinBox.setMinimum(1)
        self.sequencePaddingSpinBox.setMaximum(9)
        self.sequencePaddingSpinBox.setProperty("value", 3)
        self.sequencePaddingSpinBox.setObjectName("sequencePaddingSpinBox")
        self.sequencePaddingHorizontalLayout.addWidget(self.sequencePaddingSpinBox)
        self.sequencePaddingHorizontalLayout.setStretch(0, 1)
        self.snapshotsSavingOptionsLayout.addLayout(self.sequencePaddingHorizontalLayout, 10, 1, 1, 3)
        self.createPlayblastCheckBox = QtGui.QCheckBox(self.snapshotsSavingOptionsGroupBox)
        self.createPlayblastCheckBox.setChecked(True)
        self.createPlayblastCheckBox.setObjectName("createPlayblastCheckBox")
        self.snapshotsSavingOptionsLayout.addWidget(self.createPlayblastCheckBox, 7, 0, 1, 1)
        self.confirmsHorizontalLayout = QtGui.QHBoxLayout()
        self.confirmsHorizontalLayout.setSpacing(0)
        self.confirmsHorizontalLayout.setObjectName("confirmsHorizontalLayout")
        self.askBeforeSaveCheckBox = QtGui.QCheckBox(self.snapshotsSavingOptionsGroupBox)
        self.askBeforeSaveCheckBox.setChecked(True)
        self.askBeforeSaveCheckBox.setObjectName("askBeforeSaveCheckBox")
        self.confirmsHorizontalLayout.addWidget(self.askBeforeSaveCheckBox)
        self.askReplaceRevisionCheckBox = QtGui.QCheckBox(self.snapshotsSavingOptionsGroupBox)
        self.askReplaceRevisionCheckBox.setChecked(True)
        self.askReplaceRevisionCheckBox.setObjectName("askReplaceRevisionCheckBox")
        self.confirmsHorizontalLayout.addWidget(self.askReplaceRevisionCheckBox)
        self.snapshotsSavingOptionsLayout.addLayout(self.confirmsHorizontalLayout, 8, 0, 1, 4)
        self.createMayaDirsCheckBox = QtGui.QCheckBox(self.snapshotsSavingOptionsGroupBox)
        self.createMayaDirsCheckBox.setObjectName("createMayaDirsCheckBox")
        self.snapshotsSavingOptionsLayout.addWidget(self.createMayaDirsCheckBox, 6, 0, 1, 1)
        self.generatePreviewsCheckBox = QtGui.QCheckBox(self.snapshotsSavingOptionsGroupBox)
        self.generatePreviewsCheckBox.setChecked(True)
        self.generatePreviewsCheckBox.setObjectName("generatePreviewsCheckBox")
        self.snapshotsSavingOptionsLayout.addWidget(self.generatePreviewsCheckBox, 5, 0, 1, 1)
        self.sequencePaddingCheckBox = QtGui.QCheckBox(self.snapshotsSavingOptionsGroupBox)
        self.sequencePaddingCheckBox.setObjectName("sequencePaddingCheckBox")
        self.snapshotsSavingOptionsLayout.addWidget(self.sequencePaddingCheckBox, 10, 0, 1, 1)
        self.checkinMethodLabel = QtGui.QLabel(self.snapshotsSavingOptionsGroupBox)
        self.checkinMethodLabel.setObjectName("checkinMethodLabel")
        self.snapshotsSavingOptionsLayout.addWidget(self.checkinMethodLabel, 2, 0, 1, 1)
        self.checkinMethodComboBox = QtGui.QComboBox(self.snapshotsSavingOptionsGroupBox)
        self.checkinMethodComboBox.setObjectName("checkinMethodComboBox")
        self.checkinMethodComboBox.addItem("")
        self.checkinMethodComboBox.addItem("")
        self.checkinMethodComboBox.addItem("")
        self.checkinMethodComboBox.addItem("")
        self.checkinMethodComboBox.addItem("")
        self.snapshotsSavingOptionsLayout.addWidget(self.checkinMethodComboBox, 2, 1, 1, 3)
        self.repositoryLabel = QtGui.QLabel(self.snapshotsSavingOptionsGroupBox)
        self.repositoryLabel.setObjectName("repositoryLabel")
        self.snapshotsSavingOptionsLayout.addWidget(self.repositoryLabel, 1, 0, 1, 1)
        self.sequqnceNamingTemplatelabel = QtGui.QLabel(self.snapshotsSavingOptionsGroupBox)
        self.sequqnceNamingTemplatelabel.setObjectName("sequqnceNamingTemplatelabel")
        self.snapshotsSavingOptionsLayout.addWidget(self.sequqnceNamingTemplatelabel, 11, 0, 1, 1)
        self.checkoutMethodLabel = QtGui.QLabel(self.snapshotsSavingOptionsGroupBox)
        self.checkoutMethodLabel.setObjectName("checkoutMethodLabel")
        self.snapshotsSavingOptionsLayout.addWidget(self.checkoutMethodLabel, 3, 0, 1, 1)
        self.checkoutMethodComboBox = QtGui.QComboBox(self.snapshotsSavingOptionsGroupBox)
        self.checkoutMethodComboBox.setObjectName("checkoutMethodComboBox")
        self.checkoutMethodComboBox.addItem("")
        self.checkoutMethodComboBox.addItem("")
        self.snapshotsSavingOptionsLayout.addWidget(self.checkoutMethodComboBox, 3, 1, 1, 3)
        self.checkinPageWidgetLayout.addWidget(self.snapshotsSavingOptionsGroupBox)
        self.dropPlateOptionsGroupBox = QtGui.QGroupBox(checkinOptionsPageWidget)
        font = Qt4Gui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.dropPlateOptionsGroupBox.setFont(font)
        self.dropPlateOptionsGroupBox.setFlat(True)
        self.dropPlateOptionsGroupBox.setObjectName("dropPlateOptionsGroupBox")
        self.dropPlateOptionsLayout = QtGui.QGridLayout(self.dropPlateOptionsGroupBox)
        self.dropPlateOptionsLayout.setContentsMargins(10, 24, -1, 0)
        self.dropPlateOptionsLayout.setObjectName("dropPlateOptionsLayout")
        self.horizontalSlider = QtGui.QSlider(self.dropPlateOptionsGroupBox)
        self.horizontalSlider.setMinimum(1)
        self.horizontalSlider.setMaximum(9)
        self.horizontalSlider.setProperty("value", 3)
        self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSlider.setObjectName("horizontalSlider")
        self.dropPlateOptionsLayout.addWidget(self.horizontalSlider, 5, 1, 1, 1)
        self.minFramesPaddingSpinBox = QtGui.QSpinBox(self.dropPlateOptionsGroupBox)
        self.minFramesPaddingSpinBox.setMinimum(1)
        self.minFramesPaddingSpinBox.setMaximum(9)
        self.minFramesPaddingSpinBox.setProperty("value", 3)
        self.minFramesPaddingSpinBox.setObjectName("minFramesPaddingSpinBox")
        self.dropPlateOptionsLayout.addWidget(self.minFramesPaddingSpinBox, 5, 2, 1, 1)
        self.label = QtGui.QLabel(self.dropPlateOptionsGroupBox)
        self.label.setObjectName("label")
        self.dropPlateOptionsLayout.addWidget(self.label, 5, 0, 1, 1)
        self.uncheckFromDropPlateCheckBox = QtGui.QCheckBox(self.dropPlateOptionsGroupBox)
        self.uncheckFromDropPlateCheckBox.setChecked(True)
        self.uncheckFromDropPlateCheckBox.setObjectName("uncheckFromDropPlateCheckBox")
        self.dropPlateOptionsLayout.addWidget(self.uncheckFromDropPlateCheckBox, 1, 0, 1, 1)
        self.clearDropPlateAfterCheckincheckBox = QtGui.QCheckBox(self.dropPlateOptionsGroupBox)
        self.clearDropPlateAfterCheckincheckBox.setChecked(True)
        self.clearDropPlateAfterCheckincheckBox.setObjectName("clearDropPlateAfterCheckincheckBox")
        self.dropPlateOptionsLayout.addWidget(self.clearDropPlateAfterCheckincheckBox, 2, 0, 1, 1)
        self.oneFrameSequenceDetectionCheckBox = QtGui.QCheckBox(self.dropPlateOptionsGroupBox)
        self.oneFrameSequenceDetectionCheckBox.setChecked(True)
        self.oneFrameSequenceDetectionCheckBox.setObjectName("oneFrameSequenceDetectionCheckBox")
        self.dropPlateOptionsLayout.addWidget(self.oneFrameSequenceDetectionCheckBox, 4, 1, 1, 2)
        self.oneUdimDetectionCheckBox = QtGui.QCheckBox(self.dropPlateOptionsGroupBox)
        self.oneUdimDetectionCheckBox.setChecked(True)
        self.oneUdimDetectionCheckBox.setObjectName("oneUdimDetectionCheckBox")
        self.dropPlateOptionsLayout.addWidget(self.oneUdimDetectionCheckBox, 4, 0, 1, 1)
        self.syckDropPlateCheckBox = QtGui.QCheckBox(self.dropPlateOptionsGroupBox)
        self.syckDropPlateCheckBox.setChecked(True)
        self.syckDropPlateCheckBox.setObjectName("syckDropPlateCheckBox")
        self.dropPlateOptionsLayout.addWidget(self.syckDropPlateCheckBox, 0, 0, 1, 1)
        self.checkinPageWidgetLayout.addWidget(self.dropPlateOptionsGroupBox)
        self.defaultRepoPathsGroupBox = QtGui.QGroupBox(checkinOptionsPageWidget)
        font = Qt4Gui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.defaultRepoPathsGroupBox.setFont(font)
        self.defaultRepoPathsGroupBox.setFlat(True)
        self.defaultRepoPathsGroupBox.setObjectName("defaultRepoPathsGroupBox")
        self.defaultRepoPathsLayout = QtGui.QGridLayout(self.defaultRepoPathsGroupBox)
        self.defaultRepoPathsLayout.setContentsMargins(10, 24, -1, 0)
        self.defaultRepoPathsLayout.setObjectName("defaultRepoPathsLayout")
        self.handoffCheckBox = QtGui.QCheckBox(self.defaultRepoPathsGroupBox)
        self.handoffCheckBox.setObjectName("handoffCheckBox")
        self.defaultRepoPathsLayout.addWidget(self.handoffCheckBox, 5, 0, 1, 1)
        self.clientRepoDirNameLineEdit = QtGui.QLineEdit(self.defaultRepoPathsGroupBox)
        self.clientRepoDirNameLineEdit.setObjectName("clientRepoDirNameLineEdit")
        self.defaultRepoPathsLayout.addWidget(self.clientRepoDirNameLineEdit, 4, 2, 1, 1)
        self.sandboxDirPathLineEdit = QtGui.QLineEdit(self.defaultRepoPathsGroupBox)
        self.sandboxDirPathLineEdit.setObjectName("sandboxDirPathLineEdit")
        self.defaultRepoPathsLayout.addWidget(self.sandboxDirPathLineEdit, 2, 3, 1, 1)
        self.sandboxDirNameLineEdit = QtGui.QLineEdit(self.defaultRepoPathsGroupBox)
        self.sandboxDirNameLineEdit.setObjectName("sandboxDirNameLineEdit")
        self.defaultRepoPathsLayout.addWidget(self.sandboxDirNameLineEdit, 2, 2, 1, 1)
        self.localRepoDirNameLineEdit = QtGui.QLineEdit(self.defaultRepoPathsGroupBox)
        self.localRepoDirNameLineEdit.setObjectName("localRepoDirNameLineEdit")
        self.defaultRepoPathsLayout.addWidget(self.localRepoDirNameLineEdit, 3, 2, 1, 1)
        self.clientRepoCheckBox = QtGui.QCheckBox(self.defaultRepoPathsGroupBox)
        self.clientRepoCheckBox.setObjectName("clientRepoCheckBox")
        self.defaultRepoPathsLayout.addWidget(self.clientRepoCheckBox, 4, 0, 1, 1)
        self.localRepoCheckBox = QtGui.QCheckBox(self.defaultRepoPathsGroupBox)
        self.localRepoCheckBox.setChecked(True)
        self.localRepoCheckBox.setObjectName("localRepoCheckBox")
        self.defaultRepoPathsLayout.addWidget(self.localRepoCheckBox, 3, 0, 1, 1)
        self.handoffDirPathLineEdit = QtGui.QLineEdit(self.defaultRepoPathsGroupBox)
        self.handoffDirPathLineEdit.setObjectName("handoffDirPathLineEdit")
        self.defaultRepoPathsLayout.addWidget(self.handoffDirPathLineEdit, 5, 2, 1, 2)
        self.assetBaseDirColorToolButton = QtGui.QToolButton(self.defaultRepoPathsGroupBox)
        self.assetBaseDirColorToolButton.setMaximumSize(QtCore.QSize(20, 20))
        self.assetBaseDirColorToolButton.setStyleSheet("QToolButton {\n"
"    border: 1px solid rgb(128, 128, 128);\n"
"    border-radius: 4px;\n"
"    background-color:  rgb(96, 96, 96);\n"
"}\n"
"QToolButton:pressed {\n"
"    background-color: rgb(64, 64, 64);\n"
"}")
        self.assetBaseDirColorToolButton.setChecked(False)
        self.assetBaseDirColorToolButton.setObjectName("assetBaseDirColorToolButton")
        self.defaultRepoPathsLayout.addWidget(self.assetBaseDirColorToolButton, 1, 1, 1, 1)
        self.sandboxCheckBox = QtGui.QCheckBox(self.defaultRepoPathsGroupBox)
        self.sandboxCheckBox.setObjectName("sandboxCheckBox")
        self.defaultRepoPathsLayout.addWidget(self.sandboxCheckBox, 2, 0, 1, 1)
        self.localRepoDirPathLineEdit = QtGui.QLineEdit(self.defaultRepoPathsGroupBox)
        self.localRepoDirPathLineEdit.setObjectName("localRepoDirPathLineEdit")
        self.defaultRepoPathsLayout.addWidget(self.localRepoDirPathLineEdit, 3, 3, 1, 1)
        self.sandboxDirColorToolButton = QtGui.QToolButton(self.defaultRepoPathsGroupBox)
        self.sandboxDirColorToolButton.setMaximumSize(QtCore.QSize(20, 20))
        self.sandboxDirColorToolButton.setStyleSheet("QToolButton {\n"
"    border: 1px solid rgb(128, 128, 128);\n"
"    border-radius: 4px;\n"
"    background-color:  rgb(128, 64, 64);\n"
"}\n"
"QToolButton:pressed {\n"
"    background-color: rgb(108, 44, 44);\n"
"}")
        self.sandboxDirColorToolButton.setChecked(False)
        self.sandboxDirColorToolButton.setObjectName("sandboxDirColorToolButton")
        self.defaultRepoPathsLayout.addWidget(self.sandboxDirColorToolButton, 2, 1, 1, 1)
        self.clientRepoDirPathLineEdit = QtGui.QLineEdit(self.defaultRepoPathsGroupBox)
        self.clientRepoDirPathLineEdit.setObjectName("clientRepoDirPathLineEdit")
        self.defaultRepoPathsLayout.addWidget(self.clientRepoDirPathLineEdit, 4, 3, 1, 1)
        self.clientRepoDirColorToolButton = QtGui.QToolButton(self.defaultRepoPathsGroupBox)
        self.clientRepoDirColorToolButton.setMaximumSize(QtCore.QSize(20, 20))
        self.clientRepoDirColorToolButton.setStyleSheet("QToolButton {\n"
"    border: 1px solid rgb(128, 128, 128);\n"
"    border-radius: 4px;\n"
"    background-color:  rgb(31, 143, 0);\n"
"}\n"
"QToolButton:pressed {\n"
"    background-color: rgb(11, 123, 0);\n"
"}")
        self.clientRepoDirColorToolButton.setChecked(False)
        self.clientRepoDirColorToolButton.setObjectName("clientRepoDirColorToolButton")
        self.defaultRepoPathsLayout.addWidget(self.clientRepoDirColorToolButton, 4, 1, 1, 1)
        self.localRepoDirColorToolButton = QtGui.QToolButton(self.defaultRepoPathsGroupBox)
        self.localRepoDirColorToolButton.setMaximumSize(QtCore.QSize(20, 20))
        self.localRepoDirColorToolButton.setStyleSheet("QToolButton {\n"
"    border: 1px solid rgb(128, 128, 128);\n"
"    border-radius: 4px;\n"
"    background-color:  rgb(255, 140, 40);\n"
"}\n"
"QToolButton:pressed {\n"
"    background-color: rgb(235, 120, 20);\n"
"}")
        self.localRepoDirColorToolButton.setChecked(False)
        self.localRepoDirColorToolButton.setObjectName("localRepoDirColorToolButton")
        self.defaultRepoPathsLayout.addWidget(self.localRepoDirColorToolButton, 3, 1, 1, 1)
        self.assetBaseDirCheckBox = QtGui.QCheckBox(self.defaultRepoPathsGroupBox)
        self.assetBaseDirCheckBox.setChecked(True)
        self.assetBaseDirCheckBox.setObjectName("assetBaseDirCheckBox")
        self.defaultRepoPathsLayout.addWidget(self.assetBaseDirCheckBox, 0, 0, 2, 1)
        self.assetBaseDirNameLineEdit = QtGui.QLineEdit(self.defaultRepoPathsGroupBox)
        self.assetBaseDirNameLineEdit.setObjectName("assetBaseDirNameLineEdit")
        self.defaultRepoPathsLayout.addWidget(self.assetBaseDirNameLineEdit, 0, 2, 2, 1)
        self.assetBaseDirPathLineEdit = QtGui.QLineEdit(self.defaultRepoPathsGroupBox)
        self.assetBaseDirPathLineEdit.setObjectName("assetBaseDirPathLineEdit")
        self.defaultRepoPathsLayout.addWidget(self.assetBaseDirPathLineEdit, 0, 3, 2, 1)
        self.defaultRepoPathsLayout.setColumnStretch(3, 1)
        self.checkinPageWidgetLayout.addWidget(self.defaultRepoPathsGroupBox)
        self.customRepoPathsGroupBox = QtGui.QGroupBox(checkinOptionsPageWidget)
        self.customRepoPathsGroupBox.setEnabled(True)
        font = Qt4Gui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.customRepoPathsGroupBox.setFont(font)
        self.customRepoPathsGroupBox.setFlat(True)
        self.customRepoPathsGroupBox.setCheckable(True)
        self.customRepoPathsGroupBox.setChecked(False)
        self.customRepoPathsGroupBox.setObjectName("customRepoPathsGroupBox")
        self.customRepoPathsLayout = QtGui.QGridLayout(self.customRepoPathsGroupBox)
        self.customRepoPathsLayout.setContentsMargins(10, 24, -1, 0)
        self.customRepoPathsLayout.setObjectName("customRepoPathsLayout")
        self.label_7 = QtGui.QLabel(self.customRepoPathsGroupBox)
        self.label_7.setObjectName("label_7")
        self.customRepoPathsLayout.addWidget(self.label_7, 0, 0, 1, 1)
        self.customRepoDirColorToolButton = QtGui.QToolButton(self.customRepoPathsGroupBox)
        self.customRepoDirColorToolButton.setMaximumSize(QtCore.QSize(20, 20))
        self.customRepoDirColorToolButton.setStyleSheet("QToolButton {\n"
"    border: 1px solid rgb(128, 128, 128);\n"
"    border-radius: 4px;\n"
"    background-color:  rgb(64, 64, 64);\n"
"}\n"
"QToolButton:pressed {\n"
"    background-color: rgb(44, 44, 44);\n"
"}")
        self.customRepoDirColorToolButton.setChecked(False)
        self.customRepoDirColorToolButton.setObjectName("customRepoDirColorToolButton")
        self.customRepoPathsLayout.addWidget(self.customRepoDirColorToolButton, 0, 1, 1, 1)
        self.customRepoDirNameLineEdit = QtGui.QLineEdit(self.customRepoPathsGroupBox)
        self.customRepoDirNameLineEdit.setObjectName("customRepoDirNameLineEdit")
        self.customRepoPathsLayout.addWidget(self.customRepoDirNameLineEdit, 0, 2, 1, 3)
        self.label_8 = QtGui.QLabel(self.customRepoPathsGroupBox)
        self.label_8.setObjectName("label_8")
        self.customRepoPathsLayout.addWidget(self.label_8, 1, 0, 1, 1)
        self.customRepoDirPathLineEdit = QtGui.QLineEdit(self.customRepoPathsGroupBox)
        self.customRepoDirPathLineEdit.setObjectName("customRepoDirPathLineEdit")
        self.customRepoPathsLayout.addWidget(self.customRepoDirPathLineEdit, 1, 1, 1, 4)
        self.customRepoComboBox = QtGui.QComboBox(self.customRepoPathsGroupBox)
        self.customRepoComboBox.setObjectName("customRepoComboBox")
        self.customRepoPathsLayout.addWidget(self.customRepoComboBox, 2, 0, 1, 1)
        self.addCustomRepoToListPushButton = QtGui.QPushButton(self.customRepoPathsGroupBox)
        self.addCustomRepoToListPushButton.setObjectName("addCustomRepoToListPushButton")
        self.customRepoPathsLayout.addWidget(self.addCustomRepoToListPushButton, 2, 1, 1, 2)
        self.editCustomRepoPushButton = QtGui.QPushButton(self.customRepoPathsGroupBox)
        self.editCustomRepoPushButton.setObjectName("editCustomRepoPushButton")
        self.customRepoPathsLayout.addWidget(self.editCustomRepoPushButton, 2, 3, 1, 1)
        self.deleteCustomRepoPushButton = QtGui.QPushButton(self.customRepoPathsGroupBox)
        self.deleteCustomRepoPushButton.setObjectName("deleteCustomRepoPushButton")
        self.customRepoPathsLayout.addWidget(self.deleteCustomRepoPushButton, 2, 4, 1, 1)
        self.customRepoTreeWidget = QtGui.QTreeWidget(self.customRepoPathsGroupBox)
        self.customRepoTreeWidget.setStyleSheet("QTreeView::item {\n"
"    padding: 2px;\n"
"}")
        self.customRepoTreeWidget.setIndentation(0)
        self.customRepoTreeWidget.setRootIsDecorated(False)
        self.customRepoTreeWidget.setObjectName("customRepoTreeWidget")
        self.customRepoPathsLayout.addWidget(self.customRepoTreeWidget, 3, 0, 1, 5)
        self.checkinPageWidgetLayout.addWidget(self.customRepoPathsGroupBox)

        self.retranslateUi(checkinOptionsPageWidget)
        QtCore.QObject.connect(self.sequencePaddingHorizontalSlider, QtCore.SIGNAL("valueChanged(int)"), self.sequencePaddingSpinBox.setValue)
        QtCore.QObject.connect(self.sequencePaddingSpinBox, QtCore.SIGNAL("valueChanged(int)"), self.sequencePaddingHorizontalSlider.setValue)
        QtCore.QObject.connect(self.horizontalSlider, QtCore.SIGNAL("valueChanged(int)"), self.minFramesPaddingSpinBox.setValue)
        QtCore.QObject.connect(self.minFramesPaddingSpinBox, QtCore.SIGNAL("valueChanged(int)"), self.horizontalSlider.setValue)
        QtCore.QMetaObject.connectSlotsByName(checkinOptionsPageWidget)
Ejemplo n.º 8
0
    def setupUi(self, dropPlate):
        dropPlate.setObjectName("dropPlate")
        self.gridLayout = QtGui.QGridLayout(dropPlate)
        self.gridLayout.setContentsMargins(4, 4, 4, 6)
        self.gridLayout.setHorizontalSpacing(4)
        self.gridLayout.setObjectName("gridLayout")
        self.dropTreeWidget = QtGui.QTreeWidget(dropPlate)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Ignored, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.dropTreeWidget.sizePolicy().hasHeightForWidth())
        self.dropTreeWidget.setSizePolicy(sizePolicy)
        self.dropTreeWidget.setStyleSheet("QTreeView::item {\n"
"    padding: 2px;\n"
"}\n"
"\n"
"QTreeView::item:selected:active{\n"
"    background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(82, 133, 166, 255), stop:1 rgba(82, 133, 166, 255));\n"
"    border: 1px solid transparent;\n"
"}\n"
"QTreeView::item:selected:!active {\n"
"    background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(82, 133, 166, 255), stop:1 rgba(82, 133, 166, 255));\n"
"    border: 1px solid transparent;\n"
"}\n"
"")
        self.dropTreeWidget.setEditTriggers(QtGui.QAbstractItemView.AllEditTriggers)
        self.dropTreeWidget.setTabKeyNavigation(True)
        self.dropTreeWidget.setAlternatingRowColors(True)
        self.dropTreeWidget.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
        self.dropTreeWidget.setTextElideMode(QtCore.Qt.ElideMiddle)
        self.dropTreeWidget.setVerticalScrollMode(QtGui.QAbstractItemView.ScrollPerPixel)
        self.dropTreeWidget.setIndentation(20)
        self.dropTreeWidget.setRootIsDecorated(True)
        self.dropTreeWidget.setUniformRowHeights(True)
        self.dropTreeWidget.setItemsExpandable(True)
        self.dropTreeWidget.setAllColumnsShowFocus(True)
        self.dropTreeWidget.setWordWrap(True)
        self.dropTreeWidget.setHeaderHidden(False)
        self.dropTreeWidget.setObjectName("dropTreeWidget")
        self.dropTreeWidget.header().setCascadingSectionResizes(True)
        self.gridLayout.addWidget(self.dropTreeWidget, 0, 0, 1, 5)
        self.progressBarLayout = QtGui.QHBoxLayout()
        self.progressBarLayout.setSpacing(0)
        self.progressBarLayout.setObjectName("progressBarLayout")
        self.gridLayout.addLayout(self.progressBarLayout, 1, 0, 1, 5)
        self.filterLineEdit = QtGui.QLineEdit(dropPlate)
        self.filterLineEdit.setEnabled(False)
        self.filterLineEdit.setStyleSheet("QLineEdit {\n"
"    border: 0px;\n"
"    border-radius: 8px;\n"
"    show-decoration-selected: 1;\n"
"    padding: 0px 8px;\n"
"    background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 255, 255, 64), stop:1 rgba(255, 255, 255, 0));\n"
"    background-position: bottom left;\n"
"    background-image: url(\":/ui_check/gliph/search_16.png\");\n"
"    background-repeat: fixed;\n"
"    selection-background-color: darkgray;\n"
"    padding-left: 15px;\n"
"}\n"
"QLineEdit:hover{\n"
"    color: white;\n"
"    background-image: url(\":/ui_check/gliph/searchHover_16.png\");\n"
"}")
        self.filterLineEdit.setObjectName("filterLineEdit")
        self.gridLayout.addWidget(self.filterLineEdit, 2, 0, 1, 1)
        self.expandingLayout = QtGui.QHBoxLayout()
        self.expandingLayout.setObjectName("expandingLayout")
        self.enableFilterCheckBox = QtGui.QCheckBox(dropPlate)
        self.enableFilterCheckBox.setChecked(False)
        self.enableFilterCheckBox.setObjectName("enableFilterCheckBox")
        self.expandingLayout.addWidget(self.enableFilterCheckBox)
        self.filterComboBox = QtGui.QComboBox(dropPlate)
        self.filterComboBox.setEnabled(False)
        self.filterComboBox.setObjectName("filterComboBox")
        self.filterComboBox.addItem("")
        self.filterComboBox.addItem("")
        self.expandingLayout.addWidget(self.filterComboBox)
        self.fromDropListCheckBox = QtGui.QCheckBox(dropPlate)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.fromDropListCheckBox.sizePolicy().hasHeightForWidth())
        self.fromDropListCheckBox.setSizePolicy(sizePolicy)
        self.fromDropListCheckBox.setObjectName("fromDropListCheckBox")
        self.expandingLayout.addWidget(self.fromDropListCheckBox)
        self.groupCheckinCheckBox = QtGui.QCheckBox(dropPlate)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.groupCheckinCheckBox.sizePolicy().hasHeightForWidth())
        self.groupCheckinCheckBox.setSizePolicy(sizePolicy)
        self.groupCheckinCheckBox.setObjectName("groupCheckinCheckBox")
        self.expandingLayout.addWidget(self.groupCheckinCheckBox)
        self.keepFileNameCheckBox = QtGui.QCheckBox(dropPlate)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.keepFileNameCheckBox.sizePolicy().hasHeightForWidth())
        self.keepFileNameCheckBox.setSizePolicy(sizePolicy)
        self.keepFileNameCheckBox.setObjectName("keepFileNameCheckBox")
        self.expandingLayout.addWidget(self.keepFileNameCheckBox)
        self.includeSubfoldersCheckBox = QtGui.QCheckBox(dropPlate)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.includeSubfoldersCheckBox.sizePolicy().hasHeightForWidth())
        self.includeSubfoldersCheckBox.setSizePolicy(sizePolicy)
        self.includeSubfoldersCheckBox.setObjectName("includeSubfoldersCheckBox")
        self.expandingLayout.addWidget(self.includeSubfoldersCheckBox)
        self.gridLayout.addLayout(self.expandingLayout, 2, 1, 1, 2)
        self.configPushButton = QtGui.QToolButton(dropPlate)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.configPushButton.sizePolicy().hasHeightForWidth())
        self.configPushButton.setSizePolicy(sizePolicy)
        self.configPushButton.setMinimumSize(QtCore.QSize(24, 24))
        self.configPushButton.setMaximumSize(QtCore.QSize(24, 24))
        self.configPushButton.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
        self.configPushButton.setAutoRaise(True)
        self.configPushButton.setObjectName("configPushButton")
        self.gridLayout.addWidget(self.configPushButton, 2, 3, 1, 1)
        self.clearPushButton = QtGui.QToolButton(dropPlate)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.clearPushButton.sizePolicy().hasHeightForWidth())
        self.clearPushButton.setSizePolicy(sizePolicy)
        self.clearPushButton.setMinimumSize(QtCore.QSize(24, 24))
        self.clearPushButton.setMaximumSize(QtCore.QSize(24, 24))
        self.clearPushButton.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
        self.clearPushButton.setAutoRaise(True)
        self.clearPushButton.setObjectName("clearPushButton")
        self.gridLayout.addWidget(self.clearPushButton, 2, 4, 1, 1)
        self.gridLayout.setRowStretch(0, 1)

        self.retranslateUi(dropPlate)
        QtCore.QObject.connect(self.enableFilterCheckBox, QtCore.SIGNAL("toggled(bool)"), self.filterComboBox.setEnabled)
        QtCore.QObject.connect(self.enableFilterCheckBox, QtCore.SIGNAL("toggled(bool)"), self.filterLineEdit.setEnabled)
        QtCore.QMetaObject.connectSlotsByName(dropPlate)
Ejemplo n.º 9
0
    def __init__(self):
        super(self.__class__, self).__init__()
        self.setMinimumSize(400, 300)
        self.setWindowTitle('QtAwesome Icon Browser')

        qtawesome._instance()
        fontMaps = qtawesome._resource['iconic'].charmap

        iconNames = []
        for fontCollection, fontData in fontMaps.items():
            for iconName in fontData:
                iconNames.append('%s.%s' % (fontCollection, iconName))

        self._filterTimer = QtCore.QTimer(self)
        self._filterTimer.setSingleShot(True)
        self._filterTimer.setInterval(AUTO_SEARCH_TIMEOUT)
        self._filterTimer.timeout.connect(self._updateFilter)

        model = IconModel(self.palette().color(QtGui.QPalette.Text))
        model.setStringList(sorted(iconNames))

        self._proxyModel = QtCore.QSortFilterProxyModel()
        self._proxyModel.setSourceModel(model)
        self._proxyModel.setFilterCaseSensitivity(QtCore.Qt.CaseInsensitive)

        self._listView = IconListView(self)
        self._listView.setUniformItemSizes(True)
        self._listView.setViewMode(QtWidgets.QListView.IconMode)
        self._listView.setModel(self._proxyModel)
        self._listView.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        self._listView.doubleClicked.connect(self._copyIconText)

        self._lineEdit = QtWidgets.QLineEdit(self)
        self._lineEdit.setAlignment(QtCore.Qt.AlignCenter)
        self._lineEdit.textChanged.connect(self._triggerDelayedUpdate)
        self._lineEdit.returnPressed.connect(self._triggerImmediateUpdate)

        self._comboBox = QtWidgets.QComboBox(self)
        self._comboBox.setMinimumWidth(75)
        self._comboBox.currentIndexChanged.connect(self._triggerImmediateUpdate)
        self._comboBox.addItems([ALL_COLLECTIONS] + sorted(fontMaps.keys()))

        lyt = QtWidgets.QHBoxLayout()
        lyt.setContentsMargins(0, 0, 0, 0)
        lyt.addWidget(self._comboBox)
        lyt.addWidget(self._lineEdit)

        searchBarFrame = QtWidgets.QFrame(self)
        searchBarFrame.setLayout(lyt)

        self._copyButton = QtWidgets.QPushButton('Copy Name', self)
        self._copyButton.clicked.connect(self._copyIconText)

        lyt = QtWidgets.QVBoxLayout()
        lyt.addWidget(searchBarFrame)
        lyt.addWidget(self._listView)
        lyt.addWidget(self._copyButton)

        frame = QtWidgets.QFrame(self)
        frame.setLayout(lyt)

        self.setCentralWidget(frame)

        QtWidgets.QShortcut(
            QtGui.QKeySequence(QtCore.Qt.Key_Return),
            self,
            self._copyIconText,
        )

        self._lineEdit.setFocus()

        geo = self.geometry()
        desktop = QtWidgets.QApplication.desktop()
        screen = desktop.screenNumber(desktop.cursor().pos())
        centerPoint = desktop.screenGeometry(screen).center()
        geo.moveCenter(centerPoint)
        self.setGeometry(geo)
Ejemplo n.º 10
0
    def setupUi(self, tasks):
        tasks.setObjectName("tasks")
        tasks.resize(705, 420)
        self.verticalLayout = QtGui.QVBoxLayout(tasks)
        self.verticalLayout.setContentsMargins(-1, -1, -1, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.splitter = QtGui.QSplitter(tasks)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.gridLayoutWidget = QtGui.QWidget(self.splitter)
        self.gridLayoutWidget.setObjectName("gridLayoutWidget")
        self.gridLayout_2 = QtGui.QGridLayout(self.gridLayoutWidget)
        self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.contextLabel = QtGui.QLabel(self.gridLayoutWidget)
        self.contextLabel.setMinimumSize(QtCore.QSize(50, 0))
        self.contextLabel.setObjectName("contextLabel")
        self.gridLayout_2.addWidget(self.contextLabel, 2, 0, 1, 1)
        self.contextLineEdit = QtGui.QLineEdit(self.gridLayoutWidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.contextLineEdit.sizePolicy().hasHeightForWidth())
        self.contextLineEdit.setSizePolicy(sizePolicy)
        self.contextLineEdit.setObjectName("contextLineEdit")
        self.gridLayout_2.addWidget(self.contextLineEdit, 2, 1, 1, 1)
        self.processTreeWidget = QtGui.QTreeWidget(self.gridLayoutWidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.processTreeWidget.sizePolicy().hasHeightForWidth())
        self.processTreeWidget.setSizePolicy(sizePolicy)
        self.processTreeWidget.setMinimumSize(QtCore.QSize(350, 0))
        self.processTreeWidget.setEditTriggers(
            QtGui.QAbstractItemView.AllEditTriggers)
        self.processTreeWidget.setVerticalScrollMode(
            QtGui.QAbstractItemView.ScrollPerPixel)
        self.processTreeWidget.setAllColumnsShowFocus(True)
        self.processTreeWidget.setColumnCount(1)
        self.processTreeWidget.setObjectName("processTreeWidget")
        self.processTreeWidget.headerItem().setText(0, "Process:")
        self.processTreeWidget.header().setVisible(False)
        self.gridLayout_2.addWidget(self.processTreeWidget, 1, 0, 1, 2)
        self.taskInfoGroupBox = QtGui.QGroupBox(self.splitter)
        self.taskInfoGroupBox.setBaseSize(QtCore.QSize(500, 0))
        self.taskInfoGroupBox.setFlat(True)
        self.taskInfoGroupBox.setObjectName("taskInfoGroupBox")
        self.gridLayout = QtGui.QGridLayout(self.taskInfoGroupBox)
        self.gridLayout.setContentsMargins(4, 6, 4, 4)
        self.gridLayout.setObjectName("gridLayout")
        self.groupBox = QtGui.QGroupBox(self.taskInfoGroupBox)
        self.groupBox.setFlat(True)
        self.groupBox.setObjectName("groupBox")
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox)
        self.verticalLayout_2.setSpacing(0)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.editorLayout = QtGui.QHBoxLayout()
        self.editorLayout.setSpacing(0)
        self.editorLayout.setContentsMargins(-1, 0, -1, -1)
        self.editorLayout.setObjectName("editorLayout")
        self.verticalLayout_2.addLayout(self.editorLayout)
        self.descriptionTextEdit = QtGui.QTextEdit(self.groupBox)
        self.descriptionTextEdit.setObjectName("descriptionTextEdit")
        self.verticalLayout_2.addWidget(self.descriptionTextEdit)
        self.gridLayout.addWidget(self.groupBox, 9, 0, 1, 3)
        self.label_3 = QtGui.QLabel(self.taskInfoGroupBox)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
        self.label = QtGui.QLabel(self.taskInfoGroupBox)
        self.label.setMaximumSize(QtCore.QSize(100, 16777215))
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.assignedToComboBox = QtGui.QComboBox(self.taskInfoGroupBox)
        self.assignedToComboBox.setEditable(True)
        self.assignedToComboBox.setInsertPolicy(QtGui.QComboBox.NoInsert)
        self.assignedToComboBox.setObjectName("assignedToComboBox")
        self.gridLayout.addWidget(self.assignedToComboBox, 0, 1, 1, 2)
        self.label_5 = QtGui.QLabel(self.taskInfoGroupBox)
        self.label_5.setObjectName("label_5")
        self.gridLayout.addWidget(self.label_5, 4, 0, 1, 1)
        self.priorityComboBox = QtGui.QComboBox(self.taskInfoGroupBox)
        self.priorityComboBox.setEditable(True)
        self.priorityComboBox.setInsertPolicy(QtGui.QComboBox.NoInsert)
        self.priorityComboBox.setObjectName("priorityComboBox")
        self.gridLayout.addWidget(self.priorityComboBox, 2, 1, 1, 2)
        self.label_2 = QtGui.QLabel(self.taskInfoGroupBox)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.statusComboBox = QtGui.QComboBox(self.taskInfoGroupBox)
        self.statusComboBox.setEditable(True)
        self.statusComboBox.setInsertPolicy(QtGui.QComboBox.NoInsert)
        self.statusComboBox.setObjectName("statusComboBox")
        self.gridLayout.addWidget(self.statusComboBox, 3, 1, 1, 2)
        self.startedDateTimeEdit = QtGui.QDateTimeEdit(self.taskInfoGroupBox)
        self.startedDateTimeEdit.setCalendarPopup(True)
        self.startedDateTimeEdit.setObjectName("startedDateTimeEdit")
        self.gridLayout.addWidget(self.startedDateTimeEdit, 4, 1, 1, 2)
        self.superviserComboBox = QtGui.QComboBox(self.taskInfoGroupBox)
        self.superviserComboBox.setEditable(True)
        self.superviserComboBox.setInsertPolicy(QtGui.QComboBox.NoInsert)
        self.superviserComboBox.setObjectName("superviserComboBox")
        self.gridLayout.addWidget(self.superviserComboBox, 1, 1, 1, 2)
        self.endDateTimeEdit = QtGui.QDateTimeEdit(self.taskInfoGroupBox)
        self.endDateTimeEdit.setCalendarPopup(True)
        self.endDateTimeEdit.setObjectName("endDateTimeEdit")
        self.gridLayout.addWidget(self.endDateTimeEdit, 5, 1, 1, 2)
        self.label_6 = QtGui.QLabel(self.taskInfoGroupBox)
        self.label_6.setObjectName("label_6")
        self.gridLayout.addWidget(self.label_6, 5, 0, 1, 1)
        self.label_4 = QtGui.QLabel(self.taskInfoGroupBox)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1)
        self.saveChangesButton = QtGui.QPushButton(self.taskInfoGroupBox)
        self.saveChangesButton.setMaximumSize(QtCore.QSize(200, 16777215))
        self.saveChangesButton.setObjectName("saveChangesButton")
        self.gridLayout.addWidget(self.saveChangesButton, 10, 2, 1, 1)
        self.label_7 = QtGui.QLabel(self.taskInfoGroupBox)
        self.label_7.setObjectName("label_7")
        self.gridLayout.addWidget(self.label_7, 6, 0, 1, 1)
        self.showNotesButton = QtGui.QToolButton(self.taskInfoGroupBox)
        self.showNotesButton.setToolButtonStyle(
            QtCore.Qt.ToolButtonTextBesideIcon)
        self.showNotesButton.setAutoRaise(True)
        self.showNotesButton.setArrowType(QtCore.Qt.RightArrow)
        self.showNotesButton.setObjectName("showNotesButton")
        self.gridLayout.addWidget(self.showNotesButton, 10, 0, 1, 1)
        self.subsParentStatusLabel = QtGui.QLabel(self.taskInfoGroupBox)
        self.subsParentStatusLabel.setObjectName("subsParentStatusLabel")
        self.gridLayout.addWidget(self.subsParentStatusLabel, 6, 1, 1, 1)
        self.subsParentPushButton = QtGui.QPushButton(self.taskInfoGroupBox)
        self.subsParentPushButton.setObjectName("subsParentPushButton")
        self.gridLayout.addWidget(self.subsParentPushButton, 6, 2, 1, 1)
        self.subsTaskPushButton = QtGui.QPushButton(self.taskInfoGroupBox)
        self.subsTaskPushButton.setObjectName("subsTaskPushButton")
        self.gridLayout.addWidget(self.subsTaskPushButton, 7, 2, 1, 1)
        self.subsTaskStatusLabel = QtGui.QLabel(self.taskInfoGroupBox)
        self.subsTaskStatusLabel.setObjectName("subsTaskStatusLabel")
        self.gridLayout.addWidget(self.subsTaskStatusLabel, 7, 1, 1, 1)
        self.subsUsersPushButton = QtGui.QPushButton(self.taskInfoGroupBox)
        self.subsUsersPushButton.setObjectName("subsUsersPushButton")
        self.gridLayout.addWidget(self.subsUsersPushButton, 8, 2, 1, 1)
        self.verticalLayout.addWidget(self.splitter)
        self.skeyLineEdit = QtGui.QLineEdit(tasks)
        self.skeyLineEdit.setObjectName("skeyLineEdit")
        self.verticalLayout.addWidget(self.skeyLineEdit)

        self.retranslateUi(tasks)
        QtCore.QMetaObject.connectSlotsByName(tasks)
        tasks.setTabOrder(self.assignedToComboBox, self.superviserComboBox)
        tasks.setTabOrder(self.superviserComboBox, self.priorityComboBox)
        tasks.setTabOrder(self.priorityComboBox, self.statusComboBox)
        tasks.setTabOrder(self.statusComboBox, self.startedDateTimeEdit)
        tasks.setTabOrder(self.startedDateTimeEdit, self.endDateTimeEdit)
        tasks.setTabOrder(self.endDateTimeEdit, self.descriptionTextEdit)
        tasks.setTabOrder(self.descriptionTextEdit, self.saveChangesButton)
        tasks.setTabOrder(self.saveChangesButton, self.subsParentPushButton)
        tasks.setTabOrder(self.subsParentPushButton, self.showNotesButton)
        tasks.setTabOrder(self.showNotesButton, self.skeyLineEdit)
    def create_repo_combo_box(self):
        self.repo_combo_box = QtGui.QComboBox()

        self.main_layout.addWidget(self.repo_combo_box, 1, 0, 1, 1)
 def create_combo_box(self):
     self.combo_box = QtGui.QComboBox()
     self.combo_box.setEditable(True)
     self.combo_box.setCurrentIndex(0)
Ejemplo n.º 13
0
    def setupUi(self, myNotifications):
        myNotifications.setObjectName("myNotifications")
        myNotifications.resize(561, 373)
        self.gridLayout = QtGui.QGridLayout(myNotifications)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName("gridLayout")
        self.splitter = QtGui.QSplitter(myNotifications)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.verticalLayoutWidget = QtGui.QWidget(self.splitter)
        self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
        self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.treeWidget = QtGui.QTreeWidget(self.verticalLayoutWidget)
        self.treeWidget.setObjectName("treeWidget")
        item_0 = QtGui.QTreeWidgetItem(self.treeWidget)
        item_0 = QtGui.QTreeWidgetItem(self.treeWidget)
        item_1 = QtGui.QTreeWidgetItem(item_0)
        item_2 = QtGui.QTreeWidgetItem(item_1)
        item_1 = QtGui.QTreeWidgetItem(item_0)
        item_2 = QtGui.QTreeWidgetItem(item_1)
        item_2 = QtGui.QTreeWidgetItem(item_1)
        item_0 = QtGui.QTreeWidgetItem(self.treeWidget)
        self.verticalLayout.addWidget(self.treeWidget)
        self.comboBox = QtGui.QComboBox(self.verticalLayoutWidget)
        self.comboBox.setEditable(True)
        self.comboBox.setInsertPolicy(QtGui.QComboBox.NoInsert)
        self.comboBox.setObjectName("comboBox")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.verticalLayout.addWidget(self.comboBox)
        self.verticalLayoutWidget_2 = QtGui.QWidget(self.splitter)
        self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2")
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.verticalLayoutWidget_2)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.tabWidget = QtGui.QTabWidget(self.verticalLayoutWidget_2)
        self.tabWidget.setTabPosition(QtGui.QTabWidget.West)
        self.tabWidget.setObjectName("tabWidget")
        self.tab = QtGui.QWidget()
        self.tab.setObjectName("tab")
        self.horizontalLayout_3 = QtGui.QHBoxLayout(self.tab)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.treeWidget_5 = QtGui.QTreeWidget(self.tab)
        self.treeWidget_5.setVerticalScrollMode(
            QtGui.QAbstractItemView.ScrollPerPixel)
        self.treeWidget_5.setObjectName("treeWidget_5")
        item_0 = QtGui.QTreeWidgetItem(self.treeWidget_5)
        self.treeWidget_5.header().setDefaultSectionSize(80)
        self.horizontalLayout_3.addWidget(self.treeWidget_5)
        self.tabWidget.addTab(self.tab, "")
        self.tab_4 = QtGui.QWidget()
        self.tab_4.setObjectName("tab_4")
        self.horizontalLayout_4 = QtGui.QHBoxLayout(self.tab_4)
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.treeWidget_6 = QtGui.QTreeWidget(self.tab_4)
        self.treeWidget_6.setVerticalScrollMode(
            QtGui.QAbstractItemView.ScrollPerPixel)
        self.treeWidget_6.setObjectName("treeWidget_6")
        item_0 = QtGui.QTreeWidgetItem(self.treeWidget_6)
        self.treeWidget_6.header().setDefaultSectionSize(80)
        self.horizontalLayout_4.addWidget(self.treeWidget_6)
        self.tabWidget.addTab(self.tab_4, "")
        self.tab_2 = QtGui.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.horizontalLayout_2 = QtGui.QHBoxLayout(self.tab_2)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.treeWidget_4 = QtGui.QTreeWidget(self.tab_2)
        self.treeWidget_4.setVerticalScrollMode(
            QtGui.QAbstractItemView.ScrollPerPixel)
        self.treeWidget_4.setObjectName("treeWidget_4")
        item_0 = QtGui.QTreeWidgetItem(self.treeWidget_4)
        self.treeWidget_4.header().setDefaultSectionSize(80)
        self.horizontalLayout_2.addWidget(self.treeWidget_4)
        self.tabWidget.addTab(self.tab_2, "")
        self.tab_3 = QtGui.QWidget()
        self.tab_3.setObjectName("tab_3")
        self.horizontalLayout = QtGui.QHBoxLayout(self.tab_3)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.treeWidget_3 = QtGui.QTreeWidget(self.tab_3)
        self.treeWidget_3.setVerticalScrollMode(
            QtGui.QAbstractItemView.ScrollPerPixel)
        self.treeWidget_3.setObjectName("treeWidget_3")
        item_0 = QtGui.QTreeWidgetItem(self.treeWidget_3)
        self.treeWidget_3.header().setDefaultSectionSize(80)
        self.horizontalLayout.addWidget(self.treeWidget_3)
        self.tabWidget.addTab(self.tab_3, "")
        self.verticalLayout_2.addWidget(self.tabWidget)
        self.gridLayout.addWidget(self.splitter, 0, 0, 1, 1)

        self.retranslateUi(myNotifications)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(myNotifications)
Ejemplo n.º 14
0
    def setupUi(self, serverPageWidget):
        serverPageWidget.setObjectName("serverPageWidget")
        self.serverPageWidgetLayout = QtGui.QVBoxLayout(serverPageWidget)
        self.serverPageWidgetLayout.setSpacing(6)
        self.serverPageWidgetLayout.setContentsMargins(0, 0, 0, 0)
        self.serverPageWidgetLayout.setObjectName("serverPageWidgetLayout")
        self.authorizingGroupBox = QtGui.QGroupBox(serverPageWidget)
        font = Qt4Gui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.authorizingGroupBox.setFont(font)
        self.authorizingGroupBox.setFlat(True)
        self.authorizingGroupBox.setObjectName("authorizingGroupBox")
        self.authorizationLayout = QtGui.QGridLayout(self.authorizingGroupBox)
        self.authorizationLayout.setContentsMargins(10, 24, 9, 0)
        self.authorizationLayout.setObjectName("authorizationLayout")
        self.userNameLable = QtGui.QLabel(self.authorizingGroupBox)
        self.userNameLable.setMinimumSize(QtCore.QSize(120, 0))
        self.userNameLable.setObjectName("userNameLable")
        self.authorizationLayout.addWidget(self.userNameLable, 2, 0, 1, 1)
        self.tacticServerLable = QtGui.QLabel(self.authorizingGroupBox)
        self.tacticServerLable.setObjectName("tacticServerLable")
        self.authorizationLayout.addWidget(self.tacticServerLable, 3, 0, 1, 1)
        self.usePortalSiteCheckBox = QtGui.QCheckBox(self.authorizingGroupBox)
        self.usePortalSiteCheckBox.setObjectName("usePortalSiteCheckBox")
        self.authorizationLayout.addWidget(self.usePortalSiteCheckBox, 4, 0, 1,
                                           1)
        self.savedServerPresetLabel = QtGui.QLabel(self.authorizingGroupBox)
        self.savedServerPresetLabel.setObjectName("savedServerPresetLabel")
        self.authorizationLayout.addWidget(self.savedServerPresetLabel, 1, 0,
                                           1, 1)
        self.userNameLineEdit = QtGui.QLineEdit(self.authorizingGroupBox)
        self.userNameLineEdit.setMinimumSize(QtCore.QSize(80, 0))
        self.userNameLineEdit.setObjectName("userNameLineEdit")
        self.authorizationLayout.addWidget(self.userNameLineEdit, 2, 1, 1, 2)
        self.tacticServerLineEdit = QtGui.QLineEdit(self.authorizingGroupBox)
        self.tacticServerLineEdit.setMinimumSize(QtCore.QSize(80, 0))
        self.tacticServerLineEdit.setObjectName("tacticServerLineEdit")
        self.authorizationLayout.addWidget(self.tacticServerLineEdit, 3, 1, 1,
                                           2)
        self.serverPresetsComboBox = QtGui.QComboBox(self.authorizingGroupBox)
        self.serverPresetsComboBox.setObjectName("serverPresetsComboBox")
        self.authorizationLayout.addWidget(self.serverPresetsComboBox, 1, 1, 1,
                                           2)
        self.editServerPresetsPushButton = QtGui.QPushButton(
            self.authorizingGroupBox)
        self.editServerPresetsPushButton.setObjectName(
            "editServerPresetsPushButton")
        self.authorizationLayout.addWidget(self.editServerPresetsPushButton, 1,
                                           3, 1, 1)
        self.generateTicketButton = QtGui.QPushButton(self.authorizingGroupBox)
        self.generateTicketButton.setObjectName("generateTicketButton")
        self.authorizationLayout.addWidget(self.generateTicketButton, 2, 3, 1,
                                           1)
        self.siteLineEdit = QtGui.QLineEdit(self.authorizingGroupBox)
        self.siteLineEdit.setEnabled(False)
        self.siteLineEdit.setObjectName("siteLineEdit")
        self.authorizationLayout.addWidget(self.siteLineEdit, 4, 1, 1, 3)
        self.connectToServerButton = QtGui.QPushButton(
            self.authorizingGroupBox)
        self.connectToServerButton.setMinimumSize(QtCore.QSize(120, 0))
        self.connectToServerButton.setObjectName("connectToServerButton")
        self.authorizationLayout.addWidget(self.connectToServerButton, 3, 3, 1,
                                           1)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.tacticStatusLable = QtGui.QLabel(self.authorizingGroupBox)
        self.tacticStatusLable.setMinimumSize(QtCore.QSize(90, 0))
        self.tacticStatusLable.setObjectName("tacticStatusLable")
        self.horizontalLayout_2.addWidget(self.tacticStatusLable)
        self.loginStatusLable = QtGui.QLabel(self.authorizingGroupBox)
        self.loginStatusLable.setMinimumSize(QtCore.QSize(90, 0))
        self.loginStatusLable.setObjectName("loginStatusLable")
        self.horizontalLayout_2.addWidget(self.loginStatusLable)
        self.authorizationLayout.addLayout(self.horizontalLayout_2, 0, 0, 1, 4)
        self.authorizationLayout.setColumnStretch(1, 1)
        self.serverPageWidgetLayout.addWidget(self.authorizingGroupBox)
        self.proxyGroupBox = QtGui.QGroupBox(serverPageWidget)
        font = Qt4Gui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.proxyGroupBox.setFont(font)
        self.proxyGroupBox.setFlat(True)
        self.proxyGroupBox.setCheckable(True)
        self.proxyGroupBox.setChecked(False)
        self.proxyGroupBox.setObjectName("proxyGroupBox")
        self.proxyGridLayout = QtGui.QGridLayout(self.proxyGroupBox)
        self.proxyGridLayout.setContentsMargins(10, 24, 9, 0)
        self.proxyGridLayout.setObjectName("proxyGridLayout")
        self.proxyUserNameLabel = QtGui.QLabel(self.proxyGroupBox)
        self.proxyUserNameLabel.setMinimumSize(QtCore.QSize(120, 0))
        self.proxyUserNameLabel.setObjectName("proxyUserNameLabel")
        self.proxyGridLayout.addWidget(self.proxyUserNameLabel, 0, 0, 1, 1)
        self.proxyPasswordLabel = QtGui.QLabel(self.proxyGroupBox)
        self.proxyPasswordLabel.setObjectName("proxyPasswordLabel")
        self.proxyGridLayout.addWidget(self.proxyPasswordLabel, 1, 0, 1, 1)
        self.proxyServerLabel = QtGui.QLabel(self.proxyGroupBox)
        self.proxyServerLabel.setObjectName("proxyServerLabel")
        self.proxyGridLayout.addWidget(self.proxyServerLabel, 2, 0, 1, 1)
        self.proxyLoginLineEdit = QtGui.QLineEdit(self.proxyGroupBox)
        self.proxyLoginLineEdit.setObjectName("proxyLoginLineEdit")
        self.proxyGridLayout.addWidget(self.proxyLoginLineEdit, 0, 1, 1, 1)
        self.proxyPasswordLineEdit = QtGui.QLineEdit(self.proxyGroupBox)
        self.proxyPasswordLineEdit.setEchoMode(QtGui.QLineEdit.Password)
        self.proxyPasswordLineEdit.setObjectName("proxyPasswordLineEdit")
        self.proxyGridLayout.addWidget(self.proxyPasswordLineEdit, 1, 1, 1, 1)
        self.proxyServerLineEdit = QtGui.QLineEdit(self.proxyGroupBox)
        self.proxyServerLineEdit.setObjectName("proxyServerLineEdit")
        self.proxyGridLayout.addWidget(self.proxyServerLineEdit, 2, 1, 1, 1)
        self.serverPageWidgetLayout.addWidget(self.proxyGroupBox)
        self.environmentsGroupBox = QtGui.QGroupBox(serverPageWidget)
        self.environmentsGroupBox.setEnabled(False)
        font = Qt4Gui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.environmentsGroupBox.setFont(font)
        self.environmentsGroupBox.setFlat(True)
        self.environmentsGroupBox.setObjectName("environmentsGroupBox")
        self.environmentLayout = QtGui.QGridLayout(self.environmentsGroupBox)
        self.environmentLayout.setContentsMargins(10, 24, 9, 0)
        self.environmentLayout.setObjectName("environmentLayout")
        self.tacticEnvLable = QtGui.QLabel(self.environmentsGroupBox)
        self.tacticEnvLable.setMinimumSize(QtCore.QSize(120, 0))
        self.tacticEnvLable.setObjectName("tacticEnvLable")
        self.environmentLayout.addWidget(self.tacticEnvLable, 0, 0, 1, 1)
        self.tacticEnvLineEdit = QtGui.QLineEdit(self.environmentsGroupBox)
        self.tacticEnvLineEdit.setObjectName("tacticEnvLineEdit")
        self.environmentLayout.addWidget(self.tacticEnvLineEdit, 0, 1, 1, 1)
        self.tacticInstallDirLable = QtGui.QLabel(self.environmentsGroupBox)
        self.tacticInstallDirLable.setObjectName("tacticInstallDirLable")
        self.environmentLayout.addWidget(self.tacticInstallDirLable, 1, 0, 1,
                                         1)
        self.tacticInstallDirLineEdit = QtGui.QLineEdit(
            self.environmentsGroupBox)
        self.tacticInstallDirLineEdit.setObjectName("tacticInstallDirLineEdit")
        self.environmentLayout.addWidget(self.tacticInstallDirLineEdit, 1, 1,
                                         1, 1)
        self.addTacticEnv = QtGui.QPushButton(self.environmentsGroupBox)
        self.addTacticEnv.setObjectName("addTacticEnv")
        self.environmentLayout.addWidget(self.addTacticEnv, 2, 0, 1, 2)
        self.serverPageWidgetLayout.addWidget(self.environmentsGroupBox)
        spacerItem = QtGui.QSpacerItem(20, 58, QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Expanding)
        self.serverPageWidgetLayout.addItem(spacerItem)

        self.retranslateUi(serverPageWidget)
        QtCore.QObject.connect(self.usePortalSiteCheckBox,
                               QtCore.SIGNAL("toggled(bool)"),
                               self.siteLineEdit.setEnabled)
        QtCore.QMetaObject.connectSlotsByName(serverPageWidget)
Ejemplo n.º 15
0
    def create_ui(self):

        self.setWindowTitle('Script editor')
        self.setObjectName("scriptEditForm")
        self.resize(720, 550)
        self.setSizeGripEnabled(True)
        self.setWindowFlags(QtCore.Qt.Window)

        font = Qt4Gui.QFont()
        font.setPointSize(10)
        font.setFamily('Courier')

        self.main_grid_layout = QtGui.QGridLayout(self)
        self.setLayout(self.main_grid_layout)

        self.main_grid_layout.setObjectName("main_grid_layout")

        self.main_splitter = QtGui.QSplitter(self)
        self.main_splitter.setOrientation(QtCore.Qt.Horizontal)
        self.main_splitter.setObjectName("main_splitter")

        self.verticalLayoutWidget = QtGui.QWidget(self.main_splitter)
        self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")

        self.script_editor_vertical_layout = QtGui.QVBoxLayout(
            self.verticalLayoutWidget)
        self.script_editor_vertical_layout.setContentsMargins(0, 0, 0, 0)
        self.script_editor_vertical_layout.setObjectName(
            "script_editor_vertical_layout")

        self.script_path_horizontal_layout = QtGui.QHBoxLayout()
        self.script_path_horizontal_layout.setObjectName(
            "script_path_horizontal_layout")

        self.path_label = QtGui.QLabel(self.verticalLayoutWidget)
        self.path_label.setObjectName("path_label")
        self.path_label.setText('Script path: ')

        self.first_path_part_line_edit = QtGui.QLineEdit(
            self.verticalLayoutWidget)
        self.first_path_part_line_edit.setObjectName(
            "first_path_part_line_edit")

        self.slash_label = QtGui.QLabel(self.verticalLayoutWidget)
        self.slash_label.setObjectName("slash_label")
        self.slash_label.setText(' / ')

        self.second_path_part_line_edit = QtGui.QLineEdit(
            self.verticalLayoutWidget)
        self.second_path_part_line_edit.setObjectName(
            "second_path_part_line_edit")

        self.script_language_combo_box = QtGui.QComboBox(
            self.verticalLayoutWidget)
        for script in self.sripts_languages:
            self.script_language_combo_box.addItem(script[0])

        self.create_left_collapsable_toolbar()
        self.create_right_collapsable_toolbar()

        self.script_path_horizontal_layout.addWidget(
            self.left_collapsable_toolbar)
        self.script_path_horizontal_layout.setStretch(0, 0)
        self.script_path_horizontal_layout.addWidget(self.path_label)
        self.script_path_horizontal_layout.setStretch(1, 0)
        self.script_path_horizontal_layout.addWidget(
            self.first_path_part_line_edit)
        self.script_path_horizontal_layout.setStretch(2, 1)
        self.script_path_horizontal_layout.addWidget(self.slash_label)
        self.script_path_horizontal_layout.setStretch(3, 0)
        self.script_path_horizontal_layout.addWidget(
            self.second_path_part_line_edit)
        self.script_path_horizontal_layout.setStretch(4, 1)
        self.script_path_horizontal_layout.addWidget(
            self.script_language_combo_box)
        self.script_path_horizontal_layout.setStretch(5, 0)
        self.script_path_horizontal_layout.addWidget(
            self.right_collapsable_toolbar)
        self.script_path_horizontal_layout.setStretch(6, 0)

        self.script_editor_vertical_layout.addLayout(
            self.script_path_horizontal_layout)

        self.splitter = QtGui.QSplitter(self.verticalLayoutWidget)
        self.splitter.setOrientation(QtCore.Qt.Vertical)
        self.splitter.setObjectName("splitter")

        self.output = output_window.OutputWindow(self)
        self.output.setFont(font)
        self.splitter.addWidget(self.output)

        self.console = editor_window.EditorWindow(self)
        self.console.setFont(font)
        self.splitter.addWidget(self.console)

        self.script_editor_vertical_layout.addWidget(self.splitter)

        self.down_buttons_horizontal_layout = QtGui.QHBoxLayout()
        self.down_buttons_horizontal_layout.setObjectName(
            "down_buttons_horizontal_layout")

        self.run_script_button = QtGui.QPushButton(self.verticalLayoutWidget)
        self.run_script_button.setObjectName("run_script_button")
        self.run_script_button.setText('Run Script')
        self.run_script_button.setFlat(True)
        self.run_script_button.setIcon(gf.get_icon('play', icons_set='mdi'))

        self.execute_label = QtGui.QLabel(self.verticalLayoutWidget)
        self.execute_label.setObjectName("execute_label")
        self.execute_label.setText('Execute: ')

        self.run_type_combo_box = QtGui.QComboBox(self.verticalLayoutWidget)
        self.run_type_combo_box.setObjectName("run_type_combo_box")
        self.run_type_combo_box.addItem('Locally')
        self.run_type_combo_box.addItem('Server-Side')

        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Minimum)

        self.down_buttons_horizontal_layout.addWidget(self.run_script_button)
        self.down_buttons_horizontal_layout.addItem(spacerItem)
        self.down_buttons_horizontal_layout.addWidget(self.execute_label)
        self.down_buttons_horizontal_layout.addWidget(self.run_type_combo_box)

        self.script_editor_vertical_layout.addLayout(
            self.down_buttons_horizontal_layout)

        self.scripts_tree_widget = QtGui.QTreeWidget(self.main_splitter)
        self.scripts_tree_widget.setAlternatingRowColors(True)
        self.scripts_tree_widget.setAllColumnsShowFocus(True)
        self.scripts_tree_widget.setVerticalScrollMode(
            QtGui.QAbstractItemView.ScrollPerPixel)
        self.scripts_tree_widget.setStyleSheet(gf.get_qtreeview_style())
        self.scripts_tree_widget.setSelectionMode(
            QtGui.QAbstractItemView.SingleSelection)
        self.scripts_tree_widget.setEditTriggers(
            QtGui.QAbstractItemView.NoEditTriggers)
        self.scripts_tree_widget.setRootIsDecorated(True)
        self.scripts_tree_widget.setHeaderHidden(True)
        self.scripts_tree_widget.setObjectName('scripts_tree_widget')

        self.scripts_tree_widget.setColumnCount(2)

        self.main_grid_layout.addWidget(self.main_splitter)

        self.stream = stream.Stream.get_stream()
        if self.stream is None:
            self.stream = stream.Stream()

        self.console_obj = console.Console()

        if env_inst.get_current_project():
            self.fill_sctipts_tree_widget()

        self.create_scripts_tree_context_menu()