예제 #1
0
    def create_widgets(self):
        """
        Creates widgets
        """

        self.dialog_label = QtWidgets.QLabel()
        self.dialog_label.setStyleSheet("color: rgb(71, 143, 202);\n"
                                        "font: 18pt;")
        self.dialog_label.setText("Create User")

        self.line = QtWidgets.QFrame()
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)

        self.name_line_edit = QtWidgets.QLineEdit()
        self.name_line_edit.setPlaceholderText("Enter Name")

        self.login_line_edit = QtWidgets.QLineEdit()
        self.login_line_edit.setPlaceholderText("stalker")

        self.email_line_edit = QtWidgets.QLineEdit()
        self.email_line_edit.setPlaceholderText("*****@*****.**")

        self.password_line_edit = QtWidgets.QLineEdit()
        self.password_line_edit.setPlaceholderText("******")

        self.ok_button = QtWidgets.QPushButton("OK")
        self.cancel_button = QtWidgets.QPushButton("Cancel")
예제 #2
0
    def _setup_ui(self):
        """create the UI elements
        """
        # Create the main layout
        self.resize(850, 650)

        # Main Layout
        self.main_layout = QtWidgets.QVBoxLayout(self)

        # Dialog Label
        self.dialog_label = QtWidgets.QLabel(self)

        self.dialog_label.setText("Clip Manager")
        self.dialog_label.setStyleSheet("color: rgb(71, 143, 202);font: 18pt;")

        self.main_layout.addWidget(self.dialog_label)

        # Title Line
        line = QtWidgets.QFrame(self)
        line.setFrameShape(QtWidgets.QFrame.HLine)
        line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.main_layout.addWidget(line)

        # Add Clip Field Button
        self.add_clip_field_push_button = QtWidgets.QPushButton(self)
        self.add_clip_field_push_button.setText("Add Clip")
        self.main_layout.addWidget(self.add_clip_field_push_button)

        # Clip Fields Layout
        self.scroll_area_widget = QtWidgets.QWidget(self)
        self.clip_vertical_layout = QtWidgets.QVBoxLayout(self)
        self.scroll_area_widget.setLayout(self.clip_vertical_layout)

        self.scroll_area = QtWidgets.QScrollArea(self)
        self.scroll_area.setVerticalScrollBarPolicy(
            QtCore.Qt.ScrollBarAsNeeded)
        self.scroll_area.setHorizontalScrollBarPolicy(
            QtCore.Qt.ScrollBarAsNeeded)
        self.scroll_area.setWidgetResizable(True)
        self.scroll_area.setWidget(self.scroll_area_widget)

        self.main_layout.addWidget(self.scroll_area)

        # Create Shots Push Button
        self.create_shots_push_button = QtWidgets.QPushButton(self)
        self.create_shots_push_button.setText("Create")
        self.main_layout.addWidget(self.create_shots_push_button)

        # setup signals
        # Add Clip Push Button
        QtCore.QObject.connect(self.add_clip_field_push_button,
                               QtCore.SIGNAL("clicked()"), self.add_clip_field)

        # Create Push Button
        QtCore.QObject.connect(self.create_shots_push_button,
                               QtCore.SIGNAL("clicked()"), self.create_shots)
예제 #3
0
def add_line(layout):
    """Adds a horizontal line

    :param layout:
    :return:
    """

    line = QtWidgets.QFrame(layout.parent())
    line.setFrameShape(QtWidgets.QFrame.HLine)
    line.setFrameShadow(QtWidgets.QFrame.Sunken)
    layout.addWidget(line)
예제 #4
0
    def setup_ui(self):
        """create the UI widgets
        """
        self.vertical_layout = QtWidgets.QVBoxLayout(self)

        self.header_horizontal_layout = QtWidgets.QHBoxLayout()

        self.responsible_label = QtWidgets.QLabel(self)
        self.responsible_label.setText('Responsible')
        self.responsible_label.setStyleSheet("""
            background-color: gray;
            color: white;
            font-weight: bold;
            padding: 0.5em;
        """)

        self.add_responsible_button = QtWidgets.QPushButton(self)
        self.add_responsible_button.setText('+')
        self.add_responsible_button.setStyleSheet("""
            background-color: gray;
            color: white;
            font-weight: bold;
            padding: 0.5em;
        """)

        self.header_horizontal_layout.addWidget(self.responsible_label)
        self.header_horizontal_layout.addStretch(1)
        self.header_horizontal_layout.addWidget(self.add_responsible_button)
        self.header_horizontal_layout.setStretch(0, 1)
        self.header_horizontal_layout.setStretch(1, 0)
        self.vertical_layout.addLayout(self.header_horizontal_layout)

        self.responsible_grid_layout = QtWidgets.QGridLayout()
        self.vertical_layout.addLayout(self.responsible_grid_layout)

        line = QtWidgets.QFrame(self)
        line.setFrameShape(QtWidgets.QFrame.HLine)
        line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.vertical_layout.addWidget(line)

        horizontal_layout = QtWidgets.QHBoxLayout()
        self.vertical_layout.addLayout(horizontal_layout)

        review_set_label = QtWidgets.QLabel(self)
        review_set_label.setText('Review Set')
        horizontal_layout.addWidget(review_set_label)
예제 #5
0
    def _setup(self):
        """create UI elements
        """
        self.setWindowTitle("Create Shot Dialog")
        self.resize(550, 790)
        self.vertical_layout = QtWidgets.QVBoxLayout(self)

        # ----------------------------------------------
        # Dilog Label
        self.dialog_label = QtWidgets.QLabel(self)
        self.dialog_label.setText('Create Shot')
        self.dialog_label.setStyleSheet("color: rgb(71, 143, 202);font: 18pt;")
        self.vertical_layout.addWidget(self.dialog_label)

        # ----------------------------------------------
        # Title Line
        line = QtWidgets.QFrame(self)
        line.setFrameShape(QtWidgets.QFrame.HLine)
        line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.vertical_layout.addWidget(line)

        # ----------------------------------------------
        # Button Box
        self.buttonBox = QtWidgets.QDialogButtonBox(self)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(
            QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok
        )
        self.vertical_layout.addWidget(self.buttonBox)

        # ----------------------------------------------
        # SIGNALS

        # button box
        QtCore.QObject.connect(
            self.buttonBox,
            QtCore.SIGNAL("accepted()"),
            self.accept
        )
        QtCore.QObject.connect(
            self.buttonBox,
            QtCore.SIGNAL("rejected()"),
            self.reject
        )
예제 #6
0
    def _setup_ui(self):
        """create UI elements
        """
        self.resize(517, 545)
        self.verticalLayout = QtWidgets.QVBoxLayout(self)

        self.setWindowTitle("Project Dialog")

        # ----------------------
        # Dialog Label
        self.dialog_label = QtWidgets.QLabel(self)
        self.dialog_label.setText('%s Project' % self.mode)
        self.dialog_label.setStyleSheet(
            "color: rgb(71, 143, 202);\nfont: 18pt;")
        self.verticalLayout.addWidget(self.dialog_label)
        self.line = QtWidgets.QFrame(self)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.verticalLayout.addWidget(self.line)

        self.project_info_formLayout = QtWidgets.QFormLayout()
        self.project_info_formLayout.setLabelAlignment(
            QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing
            | QtCore.Qt.AlignVCenter)

        # ----------------------
        # Name Fields
        self.name_label = QtWidgets.QLabel(self)
        self.name_label.setText("Name")
        self.project_info_formLayout.setWidget(0,
                                               QtWidgets.QFormLayout.LabelRole,
                                               self.name_label)

        self.name_fields_verticalLayout = QtWidgets.QVBoxLayout()
        self.name_validator_label = QtWidgets.QLabel(self)
        self.name_validator_label.setText("Validator Message")
        self.name_validator_label.setStyleSheet("color: rgb(255, 0, 0);")
        self.name_fields_verticalLayout.addWidget(self.name_validator_label)
        self.project_info_formLayout.setLayout(0,
                                               QtWidgets.QFormLayout.FieldRole,
                                               self.name_fields_verticalLayout)

        # add name_lineEdit
        from anima.ui.widgets import ValidatedLineEdit
        self.name_lineEdit = ValidatedLineEdit(
            message_field=self.name_validator_label)
        self.name_fields_verticalLayout.insertWidget(0, self.name_lineEdit)

        # ----------------------
        # Code Fields
        self.code_label = QtWidgets.QLabel(self)
        self.code_label.setText("Code")
        self.project_info_formLayout.setWidget(1,
                                               QtWidgets.QFormLayout.LabelRole,
                                               self.code_label)
        self.code_fields_verticalLayout = QtWidgets.QVBoxLayout()
        self.code_validator_label = QtWidgets.QLabel(self)
        self.code_validator_label.setText("Validator Message")
        self.code_validator_label.setStyleSheet("color: rgb(255, 0, 0);")
        self.code_fields_verticalLayout.addWidget(self.code_validator_label)
        self.project_info_formLayout.setLayout(1,
                                               QtWidgets.QFormLayout.FieldRole,
                                               self.code_fields_verticalLayout)

        # add code_lineEdit
        self.code_lineEdit = ValidatedLineEdit(
            message_field=self.code_validator_label)
        self.code_fields_verticalLayout.insertWidget(0, self.code_lineEdit)

        # ----------------------
        # Type Fields
        self.type_label = QtWidgets.QLabel(self)
        self.type_label.setText("Type")
        self.project_info_formLayout.setWidget(2,
                                               QtWidgets.QFormLayout.LabelRole,
                                               self.type_label)
        self.type_comboBox = QtWidgets.QComboBox(self)
        self.type_comboBox.setEditable(True)
        self.project_info_formLayout.setWidget(2,
                                               QtWidgets.QFormLayout.FieldRole,
                                               self.type_comboBox)

        # ----------------------
        # Date Fields
        self.date_label = QtWidgets.QLabel(self)
        self.date_label.setText("Date")
        self.project_info_formLayout.setWidget(3,
                                               QtWidgets.QFormLayout.LabelRole,
                                               self.date_label)
        self.date_dateEdit = QtWidgets.QDateEdit(self)
        self.project_info_formLayout.setWidget(3,
                                               QtWidgets.QFormLayout.FieldRole,
                                               self.date_dateEdit)

        # ----------------------
        # Image Format Fields
        from anima.ui.widgets.image_format import ImageFormatWidget
        self.image_format = ImageFormatWidget(
            parent=self,
            parent_form_layout=self.project_info_formLayout,
            parent_form_layout_index=4)

        # ----------------------
        # FPS Fields
        self.fps_label = QtWidgets.QLabel(self)
        self.fps_label.setText("FPS")
        self.project_info_formLayout.setWidget(5,
                                               QtWidgets.QFormLayout.LabelRole,
                                               self.fps_label)
        self.fps_spinBox = QtWidgets.QSpinBox(self)
        self.fps_spinBox.setMinimum(1)
        self.fps_spinBox.setProperty("value", 25)
        self.project_info_formLayout.setWidget(5,
                                               QtWidgets.QFormLayout.FieldRole,
                                               self.fps_spinBox)

        # ----------------------
        # Repository Fields
        self.repository_label = QtWidgets.QLabel(self)
        self.repository_label.setText("Repository")
        self.project_info_formLayout.setWidget(6,
                                               QtWidgets.QFormLayout.LabelRole,
                                               self.repository_label)
        self.repository_horizontalLayout = QtWidgets.QHBoxLayout()
        self.repository_comboBox = QtWidgets.QComboBox(self)
        self.repository_horizontalLayout.addWidget(self.repository_comboBox)

        # Update Repository Push Button
        self.update_repository_pushButton = QtWidgets.QPushButton(self)
        self.update_repository_pushButton.setText("Update...")
        self.repository_horizontalLayout.addWidget(
            self.update_repository_pushButton)

        # Create Repository Push Button
        self.create_repository_pushButton = QtWidgets.QPushButton(self)
        self.create_repository_pushButton.setText("New...")
        self.repository_horizontalLayout.addWidget(
            self.create_repository_pushButton)

        self.repository_horizontalLayout.setStretch(0, 1)
        self.project_info_formLayout.setLayout(
            6, QtWidgets.QFormLayout.FieldRole,
            self.repository_horizontalLayout)

        # ----------------------
        self.structure_label = QtWidgets.QLabel(self)
        self.structure_label.setText("Structure")

        self.project_info_formLayout.setWidget(7,
                                               QtWidgets.QFormLayout.LabelRole,
                                               self.structure_label)
        self.structure_horizontalLayout = QtWidgets.QHBoxLayout()
        self.structure_comboBox = QtWidgets.QComboBox(self)
        self.structure_horizontalLayout.addWidget(self.structure_comboBox)

        # Update Structure Push Button
        self.update_structure_pushButton = QtWidgets.QPushButton(self)
        self.update_structure_pushButton.setText("Update...")
        self.structure_horizontalLayout.addWidget(
            self.update_structure_pushButton)

        # Create Structure Push Button
        self.create_structure_pushButton = QtWidgets.QPushButton(self)
        self.create_structure_pushButton.setText("New...")
        self.structure_horizontalLayout.addWidget(
            self.create_structure_pushButton)

        self.structure_horizontalLayout.setStretch(0, 1)
        self.project_info_formLayout.setLayout(7,
                                               QtWidgets.QFormLayout.FieldRole,
                                               self.structure_horizontalLayout)

        # ----------------------
        # Status Fields
        self.status_label = QtWidgets.QLabel(self)
        self.status_label.setText("Status")
        self.project_info_formLayout.setWidget(8,
                                               QtWidgets.QFormLayout.LabelRole,
                                               self.status_label)
        self.status_comboBox = QtWidgets.QComboBox(self)
        self.project_info_formLayout.setWidget(8,
                                               QtWidgets.QFormLayout.FieldRole,
                                               self.status_comboBox)
        self.verticalLayout.addLayout(self.project_info_formLayout)

        # ----------------------
        # Client Fields
        self.client_info_label = QtWidgets.QLabel(self)
        self.client_info_label.setText("Client Info")
        self.client_info_label.setStyleSheet(
            "color: rgb(71, 143, 202);\nfont: 18pt;")
        self.verticalLayout.addWidget(self.client_info_label)
        self.line_2 = QtWidgets.QFrame(self)
        self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.verticalLayout.addWidget(self.line_2)
        self.client_info_formLayout = QtWidgets.QFormLayout()
        self.client_info_formLayout.setLabelAlignment(QtCore.Qt.AlignRight
                                                      | QtCore.Qt.AlignTrailing
                                                      | QtCore.Qt.AlignVCenter)

        # Client Fields
        self.client_label = QtWidgets.QLabel(self)
        self.client_label.setText("Client")
        self.client_info_formLayout.setWidget(0,
                                              QtWidgets.QFormLayout.LabelRole,
                                              self.client_label)
        self.client_comboBox = QtWidgets.QComboBox(self)
        self.client_comboBox.setEditable(True)
        self.client_info_formLayout.setWidget(0,
                                              QtWidgets.QFormLayout.FieldRole,
                                              self.client_comboBox)

        # Agency Fields
        self.agency_label = QtWidgets.QLabel(self)
        self.agency_label.setText("Agency")
        self.client_info_formLayout.setWidget(1,
                                              QtWidgets.QFormLayout.LabelRole,
                                              self.agency_label)
        self.agency_comboBox = QtWidgets.QComboBox(self)
        self.agency_comboBox.setEditable(True)
        self.client_info_formLayout.setWidget(1,
                                              QtWidgets.QFormLayout.FieldRole,
                                              self.agency_comboBox)

        # Production Company Fields
        self.production_company_label = QtWidgets.QLabel(self)
        self.production_company_label.setText(
            "<html><head/><body><p align=\"right\">Production<br/>"
            "Company</p></body></html>")

        self.client_info_formLayout.setWidget(2,
                                              QtWidgets.QFormLayout.LabelRole,
                                              self.production_company_label)
        self.production_company_comboBox = QtWidgets.QComboBox(self)
        self.production_company_comboBox.setEditable(True)
        self.client_info_formLayout.setWidget(2,
                                              QtWidgets.QFormLayout.FieldRole,
                                              self.production_company_comboBox)
        self.verticalLayout.addLayout(self.client_info_formLayout)
        self.buttonBox = QtWidgets.QDialogButtonBox(self)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                          | QtWidgets.QDialogButtonBox.Ok)
        self.verticalLayout.addWidget(self.buttonBox)
        self.verticalLayout.setStretch(2, 2)
        self.verticalLayout.setStretch(5, 1)
예제 #7
0
    def _setup_ui(self):
        """create the ui elements
        """
        self.resize(1350, 950)
        self.vertical_layout = QtWidgets.QVBoxLayout(self)

        # Dialog Label
        self.dialog_label = QtWidgets.QLabel(self)
        self.dialog_label.setText('Task Manager')
        self.dialog_label.setStyleSheet("color: rgb(71, 143, 202);font: 18pt;")
        self.vertical_layout.addWidget(self.dialog_label)

        # Title Line
        line = QtWidgets.QFrame(self)
        line.setFrameShape(QtWidgets.QFrame.HLine)
        line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.vertical_layout.addWidget(line)

        # --------------------------------------------
        # Filter Fields
        label_role = QtWidgets.QFormLayout.LabelRole
        field_role = QtWidgets.QFormLayout.FieldRole

        expanding = QtWidgets.QSizePolicy.Expanding
        fixed = QtWidgets.QSizePolicy.Fixed
        minimum = QtWidgets.QSizePolicy.Minimum

        # Filters Form Layout
        self.filters_form_layout = QtWidgets.QFormLayout()
        self.filters_form_layout.setLabelAlignment(QtCore.Qt.AlignRight
                                                   | QtCore.Qt.AlignTrailing
                                                   | QtCore.Qt.AlignVCenter)
        self.vertical_layout.addLayout(self.filters_form_layout)

        # Filer By Label
        i = 0
        self.filter_by_label = QtWidgets.QLabel(self)
        self.filter_by_label.setText('Filter By')
        self.filters_form_layout.setWidget(i, field_role, self.filter_by_label)
        i += 1

        # Project
        #   Label
        self.filter_by_project_label = QtWidgets.QLabel(self)
        self.filter_by_project_label.setText('Project')

        self.filters_form_layout.setWidget(i, label_role,
                                           self.filter_by_project_label)

        #   Field
        self.filter_by_project_combo_box = QtWidgets.QComboBox(self)
        self.filter_by_project_combo_box.setSizePolicy(expanding, fixed)
        self.filter_by_project_combo_box.setEditable(True)

        self.filters_form_layout.setWidget(i, field_role,
                                           self.filter_by_project_combo_box)
        i += 1

        # Entity Type
        #   Label
        self.filter_by_entity_type_label = QtWidgets.QLabel(self)
        self.filter_by_entity_type_label.setText('Entity Type')
        self.filters_form_layout.setWidget(i, label_role,
                                           self.filter_by_entity_type_label)

        #   Field
        self.filter_by_entity_type_combo_box = QtWidgets.QComboBox(self)
        self.filter_by_entity_type_combo_box.setSizePolicy(expanding, fixed)
        self.filters_form_layout.setWidget(
            i, field_role, self.filter_by_entity_type_combo_box)
        i += 1

        # Task Type
        #   Label
        self.filter_by_task_type_label = QtWidgets.QLabel(self)
        self.filter_by_task_type_label.setText('Task Type')
        self.filters_form_layout.setWidget(i, label_role,
                                           self.filter_by_task_type_label)

        #   Field
        self.filter_by_task_type_combo_box = QtWidgets.QComboBox(self)
        self.filter_by_task_type_combo_box.setSizePolicy(expanding, fixed)
        self.filters_form_layout.setWidget(i, field_role,
                                           self.filter_by_task_type_combo_box)
        i += 1

        # Sequence
        #   Only visible when entity type is Shot
        #   Label
        self.filter_by_sequence_label = QtWidgets.QLabel(self)
        self.filter_by_sequence_label.setText('Sequence')
        self.filters_form_layout.setWidget(i, label_role,
                                           self.filter_by_sequence_label)

        #   Field
        self.filter_by_sequence_combo_box = QtWidgets.QComboBox(self)
        self.filter_by_sequence_combo_box.setSizePolicy(expanding, fixed)
        self.filters_form_layout.setWidget(i, field_role,
                                           self.filter_by_sequence_combo_box)
        i += 1

        # Resource
        #   Label
        self.filter_by_resource_label = QtWidgets.QLabel(self)
        self.filter_by_resource_label.setText('Resource')
        self.filters_form_layout.setWidget(i, label_role,
                                           self.filter_by_resource_label)

        #   Field
        self.filter_by_resource_combo_box = QtWidgets.QComboBox(self)
        self.filter_by_resource_combo_box.setSizePolicy(expanding, fixed)
        self.filters_form_layout.setWidget(i, field_role,
                                           self.filter_by_resource_combo_box)
        i += 1

        # ------------------------------------------------
        # Filter Button
        self.filter_button_horizontal_layout = QtWidgets.QHBoxLayout(self)
        self.filters_form_layout.setLayout(
            i, field_role, self.filter_button_horizontal_layout)

        self.filter_push_button = QtWidgets.QPushButton(self)
        self.filter_push_button.setText('-> Apply Filter <-')
        self.filter_button_horizontal_layout.addWidget(self.filter_push_button)

        # spacer
        spacer = QtWidgets.QSpacerItem(40, 20, expanding, minimum)
        self.filter_button_horizontal_layout.addItem(spacer)

        # ------------------------------------------------
        # The main table widget
        self.data_table_widget = QtWidgets.QTableWidget(self)
        self.data_table_widget.setAutoFillBackground(True)
        self.data_table_widget.setEditTriggers(
            QtWidgets.QAbstractItemView.NoEditTriggers)
        self.data_table_widget.setColumnCount(2)
        self.data_table_widget.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.data_table_widget.setHorizontalHeaderItem(0, item)

        item = QtWidgets.QTableWidgetItem()
        self.data_table_widget.setHorizontalHeaderItem(1, item)

        self.data_table_widget.horizontalHeader().setStretchLastSection(True)
        self.vertical_layout.addWidget(self.data_table_widget)
예제 #8
0
    def setup_ui(self):
        self.resize(328, 184)
        self.vertical_layout = QtWidgets.QVBoxLayout(self)
        self.dialog_label = QtWidgets.QLabel(self)
        self.dialog_label.setStyleSheet("color: rgb(71, 143, 202);\n"
                                        "font: 18pt;")
        self.vertical_layout.addWidget(self.dialog_label)
        self.line = QtWidgets.QFrame(self)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.vertical_layout.addWidget(self.line)
        self.form_layout = QtWidgets.QFormLayout()
        self.form_layout.setLabelAlignment(QtCore.Qt.AlignRight
                                           | QtCore.Qt.AlignTrailing
                                           | QtCore.Qt.AlignVCenter)
        self.name_fields_vertical_layout = QtWidgets.QVBoxLayout()
        self.name_validator_label = QtWidgets.QLabel(self)
        self.name_validator_label.setStyleSheet("color: rgb(255, 0, 0);")
        self.name_fields_vertical_layout.addWidget(self.name_validator_label)
        self.form_layout.setLayout(0, QtWidgets.QFormLayout.FieldRole,
                                   self.name_fields_vertical_layout)
        self.width_height_label = QtWidgets.QLabel(self)
        self.form_layout.setWidget(1, QtWidgets.QFormLayout.LabelRole,
                                   self.width_height_label)
        self.horizontal_layout = QtWidgets.QHBoxLayout()
        self.width_spin_box = QtWidgets.QSpinBox(self)
        self.width_spin_box.setMaximum(99999)
        self.horizontal_layout.addWidget(self.width_spin_box)
        self.label = QtWidgets.QLabel(self)
        self.horizontal_layout.addWidget(self.label)
        self.height_spin_box = QtWidgets.QSpinBox(self)
        self.height_spin_box.setMaximum(99999)
        self.horizontal_layout.addWidget(self.height_spin_box)
        self.horizontal_layout.setStretch(0, 1)
        self.horizontal_layout.setStretch(2, 1)
        self.form_layout.setLayout(1, QtWidgets.QFormLayout.FieldRole,
                                   self.horizontal_layout)
        self.pixel_aspect_label = QtWidgets.QLabel(self)
        self.form_layout.setWidget(2, QtWidgets.QFormLayout.LabelRole,
                                   self.pixel_aspect_label)
        self.pixel_aspect_double_spin_box = QtWidgets.QDoubleSpinBox(self)
        self.pixel_aspect_double_spin_box.setProperty("value", 1.0)
        self.form_layout.setWidget(2, QtWidgets.QFormLayout.FieldRole,
                                   self.pixel_aspect_double_spin_box)
        self.name_label = QtWidgets.QLabel(self)
        self.form_layout.setWidget(0, QtWidgets.QFormLayout.LabelRole,
                                   self.name_label)
        self.vertical_layout.addLayout(self.form_layout)
        self.button_box = QtWidgets.QDialogButtonBox(self)
        self.button_box.setOrientation(QtCore.Qt.Horizontal)
        self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                           | QtWidgets.QDialogButtonBox.Ok)
        self.vertical_layout.addWidget(self.button_box)
        self.vertical_layout.setStretch(2, 1)

        QtCore.QObject.connect(self.button_box, QtCore.SIGNAL("accepted()"),
                               self.accept)
        QtCore.QObject.connect(self.button_box, QtCore.SIGNAL("rejected()"),
                               self.reject)
        QtCore.QMetaObject.connectSlotsByName(self)

        self.setWindowTitle("Image Format Dialog")
        self.dialog_label.setText("Create Image Format")
        self.name_validator_label.setText("Validator Message")
        self.width_height_label.setText("Width x Height")
        self.label.setText("x")
        self.pixel_aspect_label.setText("Pixel Aspect")
        self.name_label.setText("Name")
예제 #9
0
    def _setup_ui(self):
        """setup the ui elements
        """
        self.resize(750, 180)
        self.vertical_layout = QtWidgets.QVBoxLayout(self)

        # Dialog Label
        self.dialog_label = QtWidgets.QLabel(self)
        self.dialog_label.setText('%s Filename Template' % self.mode)
        self.dialog_label.setStyleSheet("color: rgb(71, 143, 202);font: 18pt;")
        self.vertical_layout.addWidget(self.dialog_label)

        # Title Line
        line = QtWidgets.QFrame(self)
        line.setFrameShape(QtWidgets.QFrame.HLine)
        line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.vertical_layout.addWidget(line)

        # Form Layout
        self.form_layout = QtWidgets.QFormLayout()
        self.form_layout.setLabelAlignment(QtCore.Qt.AlignRight
                                           | QtCore.Qt.AlignTrailing
                                           | QtCore.Qt.AlignVCenter)
        self.vertical_layout.addLayout(self.form_layout)

        # ------------------------------------------------
        # Target Entity Type Field

        # label
        self.target_entity_type_label = \
            QtWidgets.QLabel('Target Entity Type', self)
        self.form_layout.setWidget(0, QtWidgets.QFormLayout.LabelRole,
                                   self.target_entity_type_label)

        # field
        self.target_entity_type_combo_box = QtWidgets.QComboBox(self)
        self.form_layout.setWidget(0, QtWidgets.QFormLayout.FieldRole,
                                   self.target_entity_type_combo_box)

        # ------------------------------------------------
        # Name Field
        self.name_label = QtWidgets.QLabel('Name', self)
        self.form_layout.setWidget(1, QtWidgets.QFormLayout.LabelRole,
                                   self.name_label)
        self.name_fields_vertical_layout = QtWidgets.QVBoxLayout()
        self.name_validator_label = QtWidgets.QLabel(self)
        self.name_validator_label.setStyleSheet('color: rgb(255, 0, 0);')

        from anima.ui.widgets import ValidatedLineEdit
        self.name_line_edit = ValidatedLineEdit(
            self, message_field=self.name_validator_label)

        self.name_fields_vertical_layout.addWidget(self.name_line_edit)
        self.name_fields_vertical_layout.addWidget(self.name_validator_label)
        self.form_layout.setLayout(1, QtWidgets.QFormLayout.FieldRole,
                                   self.name_fields_vertical_layout)

        # ------------------------------------------------
        # Path Code Field
        self.path_label = QtWidgets.QLabel('Path', self)
        self.form_layout.setWidget(2, QtWidgets.QFormLayout.LabelRole,
                                   self.path_label)

        self.path_line_edit = QtWidgets.QLineEdit(self)
        # set the default value to something useful
        self.form_layout.setWidget(2, QtWidgets.QFormLayout.FieldRole,
                                   self.path_line_edit)

        # ------------------------------------------------
        # Filename Code Field
        self.filename_label = QtWidgets.QLabel('Filename', self)
        self.form_layout.setWidget(3, QtWidgets.QFormLayout.LabelRole,
                                   self.filename_label)

        self.filename_line_edit = QtWidgets.QLineEdit(self)
        self.form_layout.setWidget(3, QtWidgets.QFormLayout.FieldRole,
                                   self.filename_line_edit)

        # ------------------------------------------------
        # Button Box
        self.button_box = QtWidgets.QDialogButtonBox(self)
        self.button_box.setOrientation(QtCore.Qt.Horizontal)
        self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                           | QtWidgets.QDialogButtonBox.Ok)
        self.vertical_layout.addWidget(self.button_box)
        self.vertical_layout.setStretch(2, 1)

        # ------------------------------------------------
        # Default values
        self.target_entity_type_combo_box.addItems(
            ['Task', 'Asset', 'Shot', 'Sequence'])
        self.name_line_edit.set_invalid()  # Empty field is not valid
        self.path_line_edit.setText(
            '$REPO{{project.repository.code}}/{{project.code}}/'
            '{%- for parent_task in parent_tasks -%}{{parent_task.nice_name}}'
            '/{%- endfor -%}')
        self.filename_line_edit.setText(
            '{{version.nice_name}}_v{{"%03d"|format(version.version_number)}}')

        # ------------------------------------------------
        # Disable Fields
        if self.mode == 'Update':
            self.target_entity_type_combo_box.setEnabled(False)

        # ------------------------------------------------
        # Signals
        # Name
        QtCore.QObject.connect(self.name_line_edit,
                               QtCore.SIGNAL('textChanged(QString)'),
                               self.name_line_edit_changed)

        # Button box
        QtCore.QObject.connect(self.button_box, QtCore.SIGNAL("accepted()"),
                               self.accept)
        QtCore.QObject.connect(self.button_box, QtCore.SIGNAL("rejected()"),
                               self.reject)
예제 #10
0
    def _setup_ui(self):
        """create the ui elements
        """
        self.resize(650, 850)
        # ----------------------------------------------------
        # Main Layout
        self.main_layout = QtWidgets.QVBoxLayout(self)

        # ----------------------------------------------------
        # Dialog Label
        self.dialog_label = QtWidgets.QLabel(self)

        self.dialog_label.setText('Publish Checker')
        self.dialog_label.setStyleSheet("color: rgb(71, 143, 202);font: 18pt;")

        self.main_layout.addWidget(self.dialog_label)

        # ----------------------------------------------------
        # Title Line
        line = QtWidgets.QFrame(self)
        line.setFrameShape(QtWidgets.QFrame.HLine)
        line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.main_layout.addWidget(line)

        # Version Label
        self.version_label = QtWidgets.QLabel(self)
        self.version_label.setText(self.version.nice_name)
        self.version_label.setStyleSheet(
            "color: rgb(71, 143, 202);font: 12pt;")
        self.main_layout.addWidget(self.version_label)

        # Version Line
        line1 = QtWidgets.QFrame(self)
        line1.setFrameShape(QtWidgets.QFrame.HLine)
        line1.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.main_layout.addWidget(line1)

        # ----------------------------------------------------
        # Fields

        # Publisher Type ComboBox
        # self.publisher_type_layout = \
        #     QtWidgets.QHBoxLayout(self.main_layout.widget())
        #
        # self.publisher_type_label = QtWidgets.QLabel(self)
        # self.publisher_type_label.setText('Publisher Type')
        # self.publisher_type_layout.addWidget(self.publisher_type_label)
        #
        # self.publisher_type_combo_box = QtWidgets.QComboBox(self)
        # self.publisher_type_layout.addWidget(self.publisher_type_combo_box)
        # self.publisher_type_layout.setStretch(0, 0)
        # self.publisher_type_layout.setStretch(1, 1)
        #
        # self.main_layout.addLayout(self.publisher_type_layout)

        # Check all push button
        self.check_all_push_button = QtWidgets.QPushButton(self)
        self.check_all_push_button.setText('CHECK ALL')
        if self.version and self.version.task.type:
            self.check_all_push_button.setText('CHECK ALL for %s' %
                                               self.version.task.type.name)

        self.main_layout.addWidget(self.check_all_push_button)

        # create the signal for check all push button
        QtCore.QObject.connect(self.check_all_push_button,
                               QtCore.SIGNAL('clicked()'),
                               self.check_all_publishers)

        # Publish Field
        # self.publisher_grid_layout = \
        #     QtWidgets.QGridLayout(self.main_layout.widget())
        self.scroll_area_widget = QtWidgets.QWidget(self)
        self.publisher_vertical_layout = QtWidgets.QVBoxLayout(self)
        self.scroll_area_widget.setLayout(self.publisher_vertical_layout)

        self.scroll_area = QtWidgets.QScrollArea(self)
        self.scroll_area.setVerticalScrollBarPolicy(
            QtCore.Qt.ScrollBarAsNeeded)
        self.scroll_area.setHorizontalScrollBarPolicy(
            QtCore.Qt.ScrollBarAsNeeded)
        self.scroll_area.setWidgetResizable(True)
        self.scroll_area.setWidget(self.scroll_area_widget)

        # self.scroll_area_layout = QtWidgets.QVBoxLayout(self)
        # self.main_layout.addLayout(self.scroll_area_layout)
        self.main_layout.addWidget(self.scroll_area)

        # performance label
        self.duration_label = QtWidgets.QLabel(self)
        self.main_layout.addWidget(self.duration_label)

        # Publish push button
        self.publish_push_button = QtWidgets.QPushButton(self)
        self.publish_push_button.setText('PUBLISH')
        self.publish_push_button.setEnabled(False)
        self.main_layout.addWidget(self.publish_push_button)

        # connect publish button signal
        QtCore.QObject.connect(self.publish_push_button,
                               QtCore.SIGNAL('clicked()'),
                               self.publish_push_button_clicked)
예제 #11
0
    def _setup_ui(self):
        """create UI elements
        """
        self.resize(520, 550)
        self.vertical_layout = QtWidgets.QVBoxLayout(self)

        # -------------------------
        # Dialog Label
        self.dialog_label = QtWidgets.QLabel(self)
        self.dialog_label.setText('Set Project Users')
        self.dialog_label.setStyleSheet(
            "color: rgb(71, 143, 202);\nfont: 18pt;")
        self.vertical_layout.addWidget(self.dialog_label)
        self.line = QtWidgets.QFrame(self)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.vertical_layout.addWidget(self.line)

        self.form_layout = QtWidgets.QFormLayout()
        self.form_layout.setLabelAlignment(QtCore.Qt.AlignRight
                                           | QtCore.Qt.AlignTrailing
                                           | QtCore.Qt.AlignVCenter)
        self.vertical_layout.addLayout(self.form_layout)

        i = -1

        # create Project Combo box
        i += 1
        self.projects_label = QtWidgets.QLabel(self)
        self.projects_label.setText('Projects')
        self.form_layout.setWidget(i, QtWidgets.QFormLayout.LabelRole,
                                   self.projects_label)

        self.projects_combo_box = QtWidgets.QComboBox(self)
        self.form_layout.setWidget(i, QtWidgets.QFormLayout.FieldRole,
                                   self.projects_combo_box)

        # create DoubleListWidget
        i += 1
        self.users_label = QtWidgets.QLabel(self)
        self.users_label.setText('Users')
        self.form_layout.setWidget(i, QtWidgets.QFormLayout.LabelRole,
                                   self.users_label)

        self.users_fields_vertical_layout = QtWidgets.QVBoxLayout()
        self.form_layout.setLayout(i, QtWidgets.QFormLayout.FieldRole,
                                   self.users_fields_vertical_layout)

        from anima.ui.widgets import DoubleListWidget
        self.users_double_list_widget = DoubleListWidget(
            dialog=self,
            parent_layout=self.users_fields_vertical_layout,
            primary_label_text='Users From DB',
            secondary_label_text='Selected Users')
        # set the tooltip
        self.users_double_list_widget\
            .primary_list_widget.setToolTip(
                "Right Click to Create/Update FilenameTemplates"
            )
        self.users_double_list_widget\
            .secondary_list_widget.setToolTip(
                "Right Click to Create/Update FilenameTemplates"
            )

        # Button Box
        self.button_box = QtWidgets.QDialogButtonBox(self)
        self.button_box.setOrientation(QtCore.Qt.Horizontal)
        self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                           | QtWidgets.QDialogButtonBox.Ok)
        self.vertical_layout.addWidget(self.button_box)
        self.vertical_layout.setStretch(2, 1)
예제 #12
0
    def _setup_ui(self):
        self.setObjectName("Dialog")
        self.resize(502, 220)
        self.vertical_layout = QtWidgets.QVBoxLayout(self)
        self.vertical_layout.setObjectName("verticalLayout")
        self.dialog_label = QtWidgets.QLabel(self)
        self.dialog_label.setStyleSheet(
            "color: rgb(71, 143, 202);\n"
            "font: 18pt;"
        )
        self.dialog_label.setObjectName("dialog_label")
        self.dialog_label.setText("Create Repository")

        self.vertical_layout.addWidget(self.dialog_label)
        self.line = QtWidgets.QFrame(self)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.vertical_layout.addWidget(self.line)
        self.form_layout = QtWidgets.QFormLayout()
        self.form_layout.setLabelAlignment(
            QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter
        )
        self.form_layout.setObjectName("form_layout")

        row_number = 0
        # -------------
        # Name
        # Label
        self.name_label = QtWidgets.QLabel(self)
        self.name_label.setObjectName("name_label")
        self.name_label.setText("Name")
        self.form_layout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.name_label)

        # Field
        self.name_fields_vertical_layout = QtWidgets.QVBoxLayout()
        self.name_fields_vertical_layout.setObjectName("name_fields_verticalLayout")
        self.name_validator_label = QtWidgets.QLabel(self)
        self.name_validator_label.setStyleSheet("color: rgb(255, 0, 0);")
        self.name_validator_label.setObjectName("name_validator_label")
        self.name_fields_vertical_layout.addWidget(self.name_validator_label)
        self.form_layout.setLayout(
            row_number,
            QtWidgets.QFormLayout.FieldRole,
            self.name_fields_vertical_layout
        )
        self.name_validator_label.setText("Validator Message")

        # create name_line_edit
        from anima.ui.widgets import ValidatedLineEdit
        self.name_line_edit = ValidatedLineEdit(
            message_field=self.name_validator_label
        )
        self.name_line_edit.setPlaceholderText('Enter Name')
        self.name_fields_vertical_layout.insertWidget(
            0, self.name_line_edit
        )

        row_number += 1
        # -------------
        # Code
        # Label
        self.code_label = QtWidgets.QLabel(self)
        self.code_label.setText("Code")
        self.code_label.setObjectName("code_label")
        self.form_layout.setWidget(
            row_number,
            QtWidgets.QFormLayout.LabelRole,
            self.code_label
        )

        # Field
        self.code_fields_vertical_layout = QtWidgets.QVBoxLayout()
        self.code_fields_vertical_layout.setObjectName("code_fields_verticalLayout")
        self.code_validator_label = QtWidgets.QLabel(self)
        self.code_validator_label.setStyleSheet("color: rgb(255, 0, 0);")
        self.code_validator_label.setObjectName("code_validator_label")
        self.code_fields_vertical_layout.addWidget(self.code_validator_label)
        self.form_layout.setLayout(
            row_number,
            QtWidgets.QFormLayout.FieldRole,
            self.code_fields_vertical_layout
        )

        # create code_line_edit
        from anima.ui.widgets import ValidatedLineEdit
        self.code_line_edit = ValidatedLineEdit(
            message_field=self.code_validator_label
        )
        self.code_line_edit.setPlaceholderText('Enter Code')
        self.code_fields_vertical_layout.insertWidget(
            0, self.code_line_edit
        )

        row_number += 1
        # -------------
        # Windows Path
        # Label
        self.windows_path_label = QtWidgets.QLabel(self)
        self.windows_path_label.setObjectName("windows_path_label")
        self.form_layout.setWidget(
            row_number,
            QtWidgets.QFormLayout.LabelRole,
            self.windows_path_label
        )
        self.windows_path_label.setText("Windows Path")

        # Field
        self.windows_path_line_edit = QtWidgets.QLineEdit(self)
        self.windows_path_line_edit.setObjectName("windows_path_lineEdit")
        self.form_layout.setWidget(
            row_number,
            QtWidgets.QFormLayout.FieldRole,
            self.windows_path_line_edit
        )

        row_number += 1
        # -------------
        # Linux Path
        # Label
        self.linux_label = QtWidgets.QLabel(self)
        self.linux_label.setObjectName("linux_label")
        self.linux_label.setText("Linux Path")
        self.form_layout.setWidget(
            row_number,
            QtWidgets.QFormLayout.LabelRole,
            self.linux_label
        )

        # Field
        self.linux_path_line_edit = QtWidgets.QLineEdit(self)
        self.linux_path_line_edit.setObjectName("linux_path_lineEdit")
        self.form_layout.setWidget(
            row_number,
            QtWidgets.QFormLayout.FieldRole,
            self.linux_path_line_edit
        )

        row_number += 1
        # -------------
        # OSX Path
        # Label
        self.osx_path_label = QtWidgets.QLabel(self)
        self.osx_path_label.setObjectName("osx_path_label")
        self.osx_path_label.setText("OSX Path")
        self.form_layout.setWidget(
            row_number,
            QtWidgets.QFormLayout.LabelRole,
            self.osx_path_label
        )

        # Field
        self.osx_path_line_edit = QtWidgets.QLineEdit(self)
        self.osx_path_line_edit.setObjectName("osx_path_lineEdit")
        self.form_layout.setWidget(
            row_number,
            QtWidgets.QFormLayout.FieldRole,
            self.osx_path_line_edit
        )
        self.vertical_layout.addLayout(self.form_layout)

        # Button Box
        self.button_box = QtWidgets.QDialogButtonBox(self)
        self.button_box.setOrientation(QtCore.Qt.Horizontal)
        self.button_box.setStandardButtons(
            QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok
        )
        self.button_box.setObjectName("button_box")
        self.vertical_layout.addWidget(self.button_box)
        self.vertical_layout.setStretch(2, 1)

        QtCore.QObject.connect(
            self.button_box,
            QtCore.SIGNAL("accepted()"),
            self.accept
        )
        QtCore.QObject.connect(
            self.button_box,
            QtCore.SIGNAL("rejected()"),
            self.reject
        )
        QtCore.QMetaObject.connectSlotsByName(self)
예제 #13
0
    def setup_ui(self):
        """create the UI widgets
        """
        # we need a main layout
        # may be a vertical one
        # or a form layout
        self.vertical_layout = QtWidgets.QVBoxLayout(self)

        # -------------------------
        # Dialog Label and buttons
        horizontal_layout3 = QtWidgets.QHBoxLayout()
        self.vertical_layout.addLayout(horizontal_layout3)

        self.widget_label = QtWidgets.QLabel(self)
        self.widget_label.setText(self.task.name if self.task else 'Task Name')
        self.widget_label.setStyleSheet(
            "color: rgb(71, 143, 202);\nfont: 18pt;")
        horizontal_layout3.addWidget(self.widget_label)
        horizontal_layout3.addStretch(1)

        # Add Watch Task button
        self.watch_task_button = QtWidgets.QPushButton(self)
        self.watch_task_button.setMaximumWidth(24)
        self.watch_task_button.setMaximumHeight(24)
        self.watch_task_button.setText("W")
        self.watch_task_button.setToolTip("Watch Task")
        self.fix_task_status_button = QtWidgets.QPushButton(self)
        self.fix_task_status_button.setMaximumWidth(24)
        self.fix_task_status_button.setMaximumHeight(24)
        self.fix_task_status_button.setText("F")
        self.fix_task_status_button.setToolTip("Fix Task Status")
        horizontal_layout3.addWidget(self.watch_task_button)
        horizontal_layout3.addWidget(self.fix_task_status_button)

        # Add Status Label
        vertical_layout3 = QtWidgets.QVBoxLayout()
        from anima.ui.widgets.task_status_label import TaskStatusLabel
        self.task_status_label = TaskStatusLabel(task=self.task)
        self.task_status_label.setMaximumHeight(12)
        vertical_layout3.addWidget(self.task_status_label)

        # Add ProgressBar
        self.task_progress = QtWidgets.QProgressBar(self)
        self.task_progress.setMinimum(0)
        self.task_progress.setMaximum(100)
        self.task_progress.setValue(50)
        self.task_progress.setAlignment(QtCore.Qt.AlignCenter)
        self.task_progress.setMaximumHeight(12)
        self.task_progress.setStyleSheet("""
            QProgressBar::chunk {
                background-color: #3add36;
                width: 1px;
            }
        """)
        vertical_layout3.addWidget(self.task_progress)

        # set items closer to each other
        vertical_layout3.setSpacing(0)

        horizontal_layout3.addLayout(vertical_layout3)

        # Add divider
        line = QtWidgets.QFrame(self)
        line.setFrameShape(QtWidgets.QFrame.HLine)
        line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.vertical_layout.addWidget(line)

        horizontal_layout1 = QtWidgets.QHBoxLayout()
        self.vertical_layout.addLayout(horizontal_layout1)

        vertical_layout1 = QtWidgets.QVBoxLayout()
        vertical_layout2 = QtWidgets.QVBoxLayout()
        horizontal_layout1.addLayout(vertical_layout1)
        horizontal_layout1.addLayout(vertical_layout2)

        # --------------------------
        # Horizontal Layout for thumbnail and detail widgets
        horizontal_layout2 = QtWidgets.QHBoxLayout()
        vertical_layout1.addLayout(horizontal_layout2)

        # --------------------------
        # Task Thumbnail
        from anima.ui.widgets.entity_thumbnail import EntityThumbnailWidget
        self.task_thumbnail_widget = \
            EntityThumbnailWidget(task=self.task, parent=self)

        horizontal_layout2.addWidget(self.task_thumbnail_widget)

        # --------------------------
        # Task Detail Info
        from anima.ui.widgets.task_detail import TaskDetailWidget
        self.task_detail_widget = TaskDetailWidget(task=self.task, parent=self)

        horizontal_layout2.addWidget(self.task_detail_widget)

        # --------------------------
        # Task Timing Info
        from anima.ui.widgets.task_timing import TaskTimingWidget
        self.task_timing_widget = TaskTimingWidget(task=self.task, parent=self)

        horizontal_layout2.addWidget(self.task_timing_widget)

        # add stretcher
        # horizontal_layout2.addStretch(1)

        # --------------------------
        # Description field
        self.description_label = QtWidgets.QLabel(self)
        self.description_label.setStyleSheet("""
        background-color: gray;
        color: white;
        font-weight: bold;
        padding: 0.5em;
        """)
        self.description_label.setText("Description")
        self.description_field = QtWidgets.QTextEdit(self)
        self.description_field.setAcceptRichText(True)
        vertical_layout1.addWidget(self.description_label)
        vertical_layout1.addWidget(self.description_field)

        # add stretcher
        vertical_layout1.addStretch(1)

        # ---------------------------
        # Responsible Info
        from anima.ui.widgets.responsible_info import ResponsibleInfoWidget
        self.responsible_info_widget = ResponsibleInfoWidget(task=self.task,
                                                             parent=self)
        vertical_layout2.addWidget(self.responsible_info_widget)

        # ---------------------------
        # Resource Info
        from anima.ui.widgets.resource_info import ResourceInfoWidget
        self.resource_info_widget = ResourceInfoWidget(task=self.task,
                                                       parent=self)
        vertical_layout2.addWidget(self.resource_info_widget)

        # ---------------------------
        # Task Versions Usage Info
        from anima.ui.widgets.task_version_usage_info import \
            TaskVersionUsageInfoWidget
        self.task_versions_usage_info_widget = TaskVersionUsageInfoWidget(
            task=self.task, parent=self)
        vertical_layout2.addWidget(self.task_versions_usage_info_widget)

        vertical_layout2.addStretch(1)

        horizontal_layout1.setStretch(0, 2)
        horizontal_layout1.setStretch(1, 1)

        # ---------------------------
        # Task Notes
        from anima.ui.widgets.entity_notes import EntityNotesWidgets
        self.task_notes_widget = \
            EntityNotesWidgets(entity=self.task, parent=self)
        self.vertical_layout.addWidget(self.task_notes_widget)
예제 #14
0
    def _setup_ui(self):
        """setups UI
        """
        try:
            _fromUtf8 = QtCore.QString.fromUtf8
        except AttributeError:
            _fromUtf8 = lambda s: s

        bmgc_project_name = self.project.GetName()
        bmgc_project_fps = self.project.GetSetting('timelineFrameRate')

        self.setWindowTitle('Conformer')
        self.resize(500, 100)

        self.vertical_layout = QtWidgets.QVBoxLayout(self)

        self.bmgc_project_label = QtWidgets.QLabel(self.vertical_layout.widget())
        self.bmgc_project_label.setText('%s - [%s fps] / Resolve' % (bmgc_project_name, bmgc_project_fps))
        self.bmgc_project_label.setStyleSheet(_fromUtf8("color: rgb(71, 143, 202);\n""font: 12pt;"))
        self.vertical_layout.addWidget(self.bmgc_project_label)

        line = QtWidgets.QFrame(self.vertical_layout.parent())
        line.setFrameShape(QtWidgets.QFrame.HLine)
        line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.vertical_layout.addWidget(line)

        self.h_layout1 = QtWidgets.QHBoxLayout(self.vertical_layout.widget())

        self.stalker_project_label = QtWidgets.QLabel(self.h_layout1.widget())
        self.stalker_project_label.setText('Stalker Project:')
        self.h_layout1.addWidget(self.stalker_project_label)

        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        self.project_combo_box = QtWidgets.QComboBox(self.h_layout1.widget())
        self.project_combo_box.setSizePolicy(size_policy)
        self.h_layout1.addWidget(self.project_combo_box)

        self.vertical_layout.addLayout(self.h_layout1)

        self.h_layout2 = QtWidgets.QHBoxLayout(self.vertical_layout.widget())

        self.stalker_seq_label = QtWidgets.QLabel(self.h_layout2.widget())
        self.stalker_seq_label.setText('Stalker Seq:      ')
        self.h_layout2.addWidget(self.stalker_seq_label)

        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        self.seq_combo_box = QtWidgets.QComboBox(self.h_layout2.widget())
        self.seq_combo_box.setSizePolicy(size_policy)
        self.h_layout2.addWidget(self.seq_combo_box)

        self.vertical_layout.addLayout(self.h_layout2)

        self.h_layout3 = QtWidgets.QHBoxLayout(self.vertical_layout.widget())

        self.stalker_scene_label = QtWidgets.QLabel(self.h_layout3.widget())
        self.stalker_scene_label.setText('Stalker Scene:  ')
        self.h_layout3.addWidget(self.stalker_scene_label)

        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        self.scene_combo_box = QtWidgets.QComboBox(self.h_layout3.widget())
        self.scene_combo_box.setSizePolicy(size_policy)
        self.h_layout3.addWidget(self.scene_combo_box)

        self.vertical_layout.addLayout(self.h_layout3)

        self.h_layout_shots = QtWidgets.QHBoxLayout(self.vertical_layout.widget())

        self.shot_in_label = QtWidgets.QLabel(self.h_layout_shots.widget())
        self.shot_in_label.setText('Shot In:')
        self.h_layout_shots.addWidget(self.shot_in_label)

        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        self.shot_in_combo_box = QtWidgets.QComboBox(self.h_layout_shots.widget())
        self.shot_in_combo_box.setSizePolicy(size_policy)
        self.h_layout_shots.addWidget(self.shot_in_combo_box)

        self.shot_out_label = QtWidgets.QLabel(self.h_layout_shots.widget())
        self.shot_out_label.setText('Shot Out:')
        self.h_layout_shots.addWidget(self.shot_out_label)

        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        self.shot_out_combo_box = QtWidgets.QComboBox(self.h_layout_shots.widget())
        self.shot_out_combo_box.setSizePolicy(size_policy)
        self.h_layout_shots.addWidget(self.shot_out_combo_box)

        self.vertical_layout.addLayout(self.h_layout_shots)

        self.h_layout4 = QtWidgets.QHBoxLayout(self.vertical_layout.widget())

        self.width_label = QtWidgets.QLabel(self.h_layout4.widget())
        self.width_label.setText('Width:')
        self.h_layout4.addWidget(self.width_label)

        self.width_line = QtWidgets.QLineEdit(self.h_layout4.widget())
        self.width_line.setText('-')
        self.width_line.setEnabled(0)
        self.h_layout4.addWidget(self.width_line)

        self.height_label = QtWidgets.QLabel(self.h_layout4.widget())
        self.height_label.setText('Height:')
        self.h_layout4.addWidget(self.height_label)

        self.height_line = QtWidgets.QLineEdit(self.h_layout4.widget())
        self.height_line.setText('-')
        self.height_line.setEnabled(0)
        self.h_layout4.addWidget(self.height_line)

        self.fps_label = QtWidgets.QLabel(self.h_layout4.widget())
        self.fps_label.setText('Fps:')
        self.h_layout4.addWidget(self.fps_label)

        self.fps_line = QtWidgets.QLineEdit(self.h_layout4.widget())
        self.fps_line.setText('-')
        self.fps_line.setEnabled(0)
        self.h_layout4.addWidget(self.fps_line)

        self.vertical_layout.addLayout(self.h_layout4)

        self.h_layout4a = QtWidgets.QHBoxLayout(self.vertical_layout.widget())

        self.filter_statuses_check_box = QtWidgets.QCheckBox(self.h_layout4a.widget())
        self.filter_statuses_check_box.setText('Filter Statuses')
        self.h_layout4a.addWidget(self.filter_statuses_check_box)

        self.wip_check_box = QtWidgets.QCheckBox(self.h_layout4a.widget())
        self.wip_check_box.setText('WIP')
        self.h_layout4a.addWidget(self.wip_check_box)

        self.hrev_check_box = QtWidgets.QCheckBox(self.h_layout4a.widget())
        self.hrev_check_box.setText('HREV')
        self.h_layout4a.addWidget(self.hrev_check_box)

        self.prev_check_box = QtWidgets.QCheckBox(self.h_layout4a.widget())
        self.prev_check_box.setText('PREV')
        self.h_layout4a.addWidget(self.prev_check_box)

        self.completed_check_box = QtWidgets.QCheckBox(self.h_layout4a.widget())
        self.completed_check_box.setText('CMLT')
        self.h_layout4a.addWidget(self.completed_check_box)

        self.vertical_layout.addLayout(self.h_layout4a)

        self.h_layout5 = QtWidgets.QHBoxLayout(self.vertical_layout.widget())

        self.task_name_label = QtWidgets.QLabel(self.h_layout5.widget())
        self.task_name_label.setText('Task Name:')
        self.h_layout5.addWidget(self.task_name_label)

        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        self.task_name_combo_box = QtWidgets.QComboBox(self.h_layout5.widget())
        self.task_name_combo_box.setSizePolicy(size_policy)
        self.h_layout5.addWidget(self.task_name_combo_box)

        self.ext_name_label = QtWidgets.QLabel(self.h_layout5.widget())
        self.ext_name_label.setText('Extension:')
        self.h_layout5.addWidget(self.ext_name_label)

        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        self.ext_name_combo_box = QtWidgets.QComboBox(self.h_layout5.widget())
        self.ext_name_combo_box.setSizePolicy(size_policy)
        self.h_layout5.addWidget(self.ext_name_combo_box)

        self.plus_plates_check_box = QtWidgets.QCheckBox(self.h_layout5.widget())
        self.plus_plates_check_box.setText('+ Plates')
        self.h_layout5.addWidget(self.plus_plates_check_box)

        self.alpha_only_check_box = QtWidgets.QCheckBox(self.h_layout5.widget())
        self.alpha_only_check_box.setText('Alpha Only')
        self.h_layout5.addWidget(self.alpha_only_check_box)
        
        self.vertical_layout.addLayout(self.h_layout5)

        self.conform_button = QtWidgets.QPushButton(self.vertical_layout.widget())
        self.conform_button.setText('CONFORM ALL')
        self.vertical_layout.addWidget(self.conform_button)

        line1 = QtWidgets.QFrame(self.vertical_layout.parent())
        line1.setFrameShape(QtWidgets.QFrame.HLine)
        line1.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.vertical_layout.addWidget(line1)

        self.h_layout6 = QtWidgets.QHBoxLayout(self.vertical_layout.widget())

        self.date_label = QtWidgets.QLabel(self.h_layout6.widget())
        self.date_label.setText('check From:')
        self.date_label.setAlignment(QtCore.Qt.AlignCenter)
        self.h_layout6.addWidget(self.date_label)

        self.start_date = QtWidgets.QDateEdit(self.h_layout6.widget())
        self.start_date.setDate(QtCore.QDate.currentDate()) # setDate(QtCore.QDate(2021, 1, 1))
        self.start_date.setCurrentSection(QtWidgets.QDateTimeEdit.MonthSection)
        self.start_date.setCalendarPopup(True)
        self.h_layout6.addWidget(self.start_date)

        self.now_label = QtWidgets.QLabel(self.h_layout6.widget())
        self.now_label.setText(':until Now')
        self.now_label.setAlignment(QtCore.Qt.AlignCenter)
        self.h_layout6.addWidget(self.now_label)

        self.vertical_layout.addLayout(self.h_layout6)

        self.updated_shot_list = QtWidgets.QListWidget(self.vertical_layout.widget())
        self.updated_shot_list.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)
        self.vertical_layout.addWidget(self.updated_shot_list)

        self.status_button= QtWidgets.QPushButton(self.vertical_layout.widget())
        self.status_button.setText('LIST UPDATED SHOTS')
        self.vertical_layout.addWidget(self.status_button)

        self.conform_updates_button= QtWidgets.QPushButton(self.vertical_layout.widget())
        self.conform_updates_button.setText('CONFORM UPDATED SHOTS ONLY')
        self.vertical_layout.addWidget(self.conform_updates_button)

        line2 = QtWidgets.QFrame(self.vertical_layout.parent())
        line2.setFrameShape(QtWidgets.QFrame.HLine)
        line2.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.vertical_layout.addWidget(line2)

        self.info_label = QtWidgets.QLabel(self.vertical_layout.widget())
        self.info_label.setText('check Console for Progress Info...')
        self.vertical_layout.addWidget(self.info_label)

        self.fill_ui_with_stalker_projects()