Exemple #1
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)
Exemple #2
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)