def _setup_ui(self): self.setWindowModality(QtCore.Qt.ApplicationModal) self.setModal(True) self.resize(300, 300) size_policy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred ) size_policy.setHorizontalStretch(1) size_policy.setVerticalStretch(1) size_policy.setHeightForWidth(self.sizePolicy().hasHeightForWidth()) self.setSizePolicy(size_policy) self.setSizeGripEnabled(True) self.horizontal_layout = QtWidgets.QHBoxLayout(self) self.toolbox_widget = QtWidgets.QWidget(self) self.horizontal_layout.addWidget(self.toolbox_widget) self.toolbox_layout = ToolboxLayout(self.toolbox_widget) self.toolbox_layout.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize) self.toolbox_layout.setContentsMargins(0, 0, 0, 0) # setup icon global __here__ icon_path = os.path.abspath( os.path.join(__here__, "../../../ui/images/fusion9.png") ) icon = QtGui.QIcon(icon_path) self.setWindowIcon(icon)
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('Resource') self.responsible_label.setStyleSheet(""" background-color: gray; font-weight: bold; color: white; padding: 0.5em; """) self.add_resource_button = QtWidgets.QPushButton(self) self.add_resource_button.setText('+') self.add_resource_button.setStyleSheet(""" background-color: gray; color: white; padding: 0.5em; """) self.header_horizontal_layout.addWidget(self.responsible_label) self.header_horizontal_layout.addStretch(1) self.header_horizontal_layout.addWidget(self.add_resource_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)
def create_layouts(self): """ Creates layouts """ form_layout = QtWidgets.QFormLayout() form_layout.addRow("Name", self.name_line_edit) form_layout.addRow("Login", self.login_line_edit) form_layout.addRow("Email", self.email_line_edit) form_layout.addRow("Password", self.password_line_edit) button_layout = QtWidgets.QHBoxLayout() button_layout.addStretch() button_layout.addWidget(self.ok_button) button_layout.addWidget(self.cancel_button) label_layout = QtWidgets.QVBoxLayout() label_layout.addWidget(self.dialog_label) label_layout.addWidget(self.line) label_layout.addStretch() main_layout = QtWidgets.QVBoxLayout(self) main_layout.addLayout(label_layout) main_layout.addLayout(form_layout) main_layout.addLayout(button_layout) self.resize(328, 184)
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)
def setup_ui(self): """add tools """ # create the main tab layout main_tab_widget = QtWidgets.QTabWidget(self.widget()) self.addWidget(main_tab_widget) # add the General Tab general_tab_widget = QtWidgets.QWidget(self.widget()) general_tab_vertical_layout = QtWidgets.QVBoxLayout() general_tab_widget.setLayout(general_tab_vertical_layout) main_tab_widget.addTab(general_tab_widget, 'Generic') # Create tools for general tab from anima.ui.utils import add_button # ------------------------------------------------------------------- # Per Clip Output Generator add_button('Per Clip Output Generator', general_tab_vertical_layout, GenericTools.per_clip_output_generator) # Clip Output Generator # create a new layout layout = QtWidgets.QHBoxLayout() general_tab_vertical_layout.addLayout(layout) clip_index_spinbox = QtWidgets.QSpinBox() clip_index_spinbox.setMinimum(1) version_spinbox = QtWidgets.QSpinBox() version_spinbox.setMinimum(1) def clip_output_generator_wrapper(): clip_index = clip_index_spinbox.value() version_number = version_spinbox.value() GenericTools.clip_output_generator(clip_index, version_number) add_button('Clip Output Generator', layout, clip_output_generator_wrapper) layout.addWidget(clip_index_spinbox) layout.addWidget(version_spinbox) # ------------------------------------------------------------------- # Add the stretcher general_tab_vertical_layout.addStretch()
def setup_ui(self): """create the UI widgets """ self.vertical_layout = QtWidgets.QVBoxLayout(self) self.header_horizontal_layout = QtWidgets.QHBoxLayout() self.versions_use_in_label = QtWidgets.QLabel(self) self.versions_use_in_label.setText('Versions are used in') self.versions_use_in_label.setStyleSheet(""" background-color: gray; color: white; font-weight: bold; padding: 0.5em; """) self.header_horizontal_layout.addWidget(self.versions_use_in_label) self.vertical_layout.addLayout(self.header_horizontal_layout)
def _setup_ui(self): self.setWindowModality(QtCore.Qt.ApplicationModal) self.setModal(True) self.resize(300, 800) size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) size_policy.setHorizontalStretch(1) size_policy.setVerticalStretch(1) size_policy.setHeightForWidth(self.sizePolicy().hasHeightForWidth()) self.setSizePolicy(size_policy) self.setSizeGripEnabled(True) self.horizontal_layout = QtWidgets.QHBoxLayout(self) self.toolbox_widget = QtWidgets.QWidget(self) self.horizontal_layout.addWidget(self.toolbox_widget) self.toolbox_layout = ToolboxLayout(self.toolbox_widget) self.toolbox_layout.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize) self.toolbox_layout.setContentsMargins(0, 0, 0, 0)
def _setup_ui(self): """creates the ui elements """ self.label = QtWidgets.QLabel(self.parent) self.parent_form_layout.setWidget(self.parent_form_layout_index, QtWidgets.QFormLayout.LabelRole, self.label) self.horizontal_layout = QtWidgets.QHBoxLayout() self.combo_box = QtWidgets.QComboBox(self.parent) self.horizontal_layout.addWidget(self.combo_box) self.update_push_button = QtWidgets.QPushButton(self.parent) self.horizontal_layout.addWidget(self.update_push_button) self.create_push_button = QtWidgets.QPushButton(self.parent) self.horizontal_layout.addWidget(self.create_push_button) self.horizontal_layout.setStretch(0, 1) self.parent_form_layout.setLayout(self.parent_form_layout_index, QtWidgets.QFormLayout.FieldRole, self.horizontal_layout) self.label.setText("Image Format") self.update_push_button.setText("Update...") self.create_push_button.setText("New...")
def create(self, parent=None): """Creates this publisher :param parent: :return: """ # Create layout self.layout = QtWidgets.QHBoxLayout(parent) # Create Icons self.publisher_state_ok_icon = parent.style() \ .standardIcon(QtWidgets.QStyle.SP_DialogYesButton) self.publisher_state_not_ok_icon = parent.style() \ .standardIcon(QtWidgets.QStyle.SP_DialogNoButton) # Create check push button self.check_push_button = QtWidgets.QPushButton(parent) self.check_push_button.setText('Check') self.layout.addWidget(self.check_push_button) self.check_push_button.setSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) # Create fix push button self.fix_push_button = QtWidgets.QPushButton(parent) self.fix_push_button.setText('Fix') self.layout.addWidget(self.fix_push_button) self.fix_push_button.setSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) self.fix_push_button.setMaximumWidth(40) # Create Progress Bar self.progress_bar = QtWidgets.QProgressBar(parent) self.progress_bar.setFixedWidth(100) self.progress_bar.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) self.layout.addWidget(self.progress_bar) self.progress_bar_manager = QProgressBarWrapper( progress_bar=self.progress_bar, minimum=0, maximum=100.0, value=0.0) # Create state label self.publisher_state_label = QtWidgets.QLabel(parent) self.publisher_state_label.setSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) self.layout.addWidget(self.publisher_state_label) # Create performance label self.performance_label = QtWidgets.QLabel(parent) self.performance_label.setText('x.x sec') self.performance_label.setSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) self.layout.addWidget(self.performance_label) # Create name label self.publisher_name_label = QtWidgets.QLabel(parent) self.publisher_name_label.setText( self.publisher.__doc__.split('\n')[0].strip()) self.publisher_name_label.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.publisher_name_label.setToolTip(self.publisher.__doc__) self.performance_label.setSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) self.layout.addWidget(self.publisher_name_label) # Create help push button self.help_push_button = QtWidgets.QPushButton(parent) self.help_push_button.setText('?') self.layout.addWidget(self.help_push_button) self.help_push_button.setSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) self.help_push_button.setMaximumWidth(20) spacer = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.layout.addItem(spacer) self.state = False # create button signal QtCore.QObject.connect(self.check_push_button, QtCore.SIGNAL("clicked()"), self.run_publisher) QtCore.QObject.connect(self.help_push_button, QtCore.SIGNAL('clicked()'), self.show_publisher_docs) QtCore.QObject.connect(self.fix_push_button, QtCore.SIGNAL('clicked()'), self.run_fix_definition)
def setup_ui(self): """create UI widgets """ self.resize(447, 546) self.setWindowTitle("TimeLog Dialog") # ----------------------------- # Setup Main Layout self.main_layout = QtWidgets.QHBoxLayout(self) # create the left column self.left_layout = QtWidgets.QVBoxLayout() self.main_layout.addLayout(self.left_layout) # create the right column # this will list the previously entered time logs self.right_layout = QtWidgets.QVBoxLayout() self.main_layout.addLayout(self.right_layout) # ----------------------------- # Setup Form Layout self.form_layout = QtWidgets.QFormLayout() self.form_layout.setFieldGrowthPolicy( QtWidgets.QFormLayout.AllNonFixedFieldsGrow ) self.left_layout.addLayout(self.form_layout) i = 0 # ----------------------------- # Tasks self.tasks_label = QtWidgets.QLabel(self) self.tasks_label.setText("Task") self.form_layout.setWidget( i, QtWidgets.QFormLayout.LabelRole, self.tasks_label ) from anima.ui.widgets import TaskComboBox self.tasks_combo_box = TaskComboBox(self) self.tasks_combo_box.setObjectName("tasks_combo_box") self.form_layout.setWidget( i, QtWidgets.QFormLayout.FieldRole, self.tasks_combo_box ) # ----------------------------- # Tasks Progress Bar i += 1 self.task_progress_bar = QtWidgets.QProgressBar(self) self.task_progress_bar.setProperty("value", 24) self.form_layout.setWidget( i, QtWidgets.QFormLayout.FieldRole, self.task_progress_bar ) # ----------------------------- # Resources i += 1 self.resources_label = QtWidgets.QLabel(self) self.resources_label.setText("Resource") self.form_layout.setWidget( i, QtWidgets.QFormLayout.LabelRole, self.resources_label ) self.resource_combo_box = QtWidgets.QComboBox(self) self.form_layout.setWidget( i, QtWidgets.QFormLayout.FieldRole, self.resource_combo_box ) # ----------------------------- # Calendar, Start & End Time i += 1 # Label self.date_label = QtWidgets.QLabel(self) self.date_label.setText("Date") self.form_layout.setWidget( i, QtWidgets.QFormLayout.LabelRole, self.date_label ) # Calendar Widget self.calendar_widget = QtWidgets.QCalendarWidget(self) self.calendar_widget.setFirstDayOfWeek(QtCore.Qt.Monday) self.form_layout.setWidget( i, QtWidgets.QFormLayout.FieldRole, self.calendar_widget ) # ----------------------------- # Start Time from anima.ui.widgets import TimeEdit i += 1 self.start_time_label = QtWidgets.QLabel(self) self.start_time_label.setText("Start") self.form_layout.setWidget( i, QtWidgets.QFormLayout.LabelRole, self.start_time_label ) from anima import TIMING_RESOLUTION self.start_time_edit = TimeEdit(self, resolution=TIMING_RESOLUTION) self.start_time_edit.setCurrentSection(QtWidgets.QDateTimeEdit.MinuteSection) self.start_time_edit.setCalendarPopup(True) self.start_time_edit.setObjectName("start_time_edit") self.start_time_edit.setWrapping(True) self.form_layout.setWidget( i, QtWidgets.QFormLayout.FieldRole, self.start_time_edit ) self.start_time_edit.setDisplayFormat("HH:mm") # ----------------------------- # End Time i += 1 self.end_time_label = QtWidgets.QLabel(self) self.end_time_label.setText("End") self.form_layout.setWidget( i, QtWidgets.QFormLayout.LabelRole, self.end_time_label ) self.end_time_edit = TimeEdit(self, resolution=TIMING_RESOLUTION) self.end_time_edit.setCurrentSection( QtWidgets.QDateTimeEdit.MinuteSection ) self.end_time_edit.setCalendarPopup(True) self.end_time_edit.setObjectName("end_time_edit") self.end_time_edit.setWrapping(True) self.form_layout.setWidget( i, QtWidgets.QFormLayout.FieldRole, self.end_time_edit ) self.end_time_edit.setDisplayFormat("HH:mm") # ----------------------------- # Effort i += 1 # Label self.effort_label = QtWidgets.QLabel(self) self.effort_label.setText("Effort") self.form_layout.setWidget( i, QtWidgets.QFormLayout.LabelRole, self.effort_label ) effort_layout = QtWidgets.QHBoxLayout(self) self.form_layout.setLayout( i, QtWidgets.QFormLayout.FieldRole, effort_layout ) self.effort_time_edit = TimeEdit(self, resolution=TIMING_RESOLUTION) self.effort_time_edit.setCurrentSection(QtWidgets.QDateTimeEdit.MinuteSection) self.effort_time_edit.setCalendarPopup(True) self.effort_time_edit.setObjectName("effort_time_edit") self.effort_time_edit.setWrapping(True) # self.form_layout.setWidget( # i, # QtWidgets.QFormLayout.FieldRole, # self.effort_time_edit # ) effort_layout.addWidget(self.effort_time_edit) self.effort_time_edit.setDisplayFormat("HH:mm") # ----------------------------- # Advanced Time Controls self.show_advanced_time_controls_check_box = QtWidgets.QCheckBox(self) self.show_advanced_time_controls_check_box.setText('Advanced Controls') effort_layout.addWidget(self.show_advanced_time_controls_check_box) # ----------------------------- # Time Left Info i += 1 self.info_area_label = QtWidgets.QLabel(self) self.info_area_label.setText("INFO") self.form_layout.setWidget( i, QtWidgets.QFormLayout.FieldRole, self.info_area_label ) # ----------------------------- # Status i += 1 self.status_label = QtWidgets.QLabel(self) self.status_label.setText("Status") self.form_layout.setWidget( i, QtWidgets.QFormLayout.LabelRole, self.status_label ) self.not_finished_yet_radio_button = QtWidgets.QRadioButton(self) self.not_finished_yet_radio_button.setText("Not Finished Yet") self.not_finished_yet_radio_button.setChecked(True) self.form_layout.setWidget( i, QtWidgets.QFormLayout.FieldRole, self.not_finished_yet_radio_button ) i += 1 self.set_as_complete_radio_button = QtWidgets.QRadioButton(self) self.set_as_complete_radio_button.setText("Set As Completed") self.form_layout.setWidget( i, QtWidgets.QFormLayout.FieldRole, self.set_as_complete_radio_button ) i += 1 self.submit_for_final_review_radio_button = \ QtWidgets.QRadioButton(self) self.submit_for_final_review_radio_button.setText( "Submit For Final Review" ) self.form_layout.setWidget( i, QtWidgets.QFormLayout.FieldRole, self.submit_for_final_review_radio_button ) # ----------------------------- # Dialog Button Box self.dialog_button_box = QtWidgets.QDialogButtonBox(self) self.dialog_button_box.setOrientation(QtCore.Qt.Horizontal) self.dialog_button_box.setStandardButtons( QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok ) self.left_layout.addWidget(self.dialog_button_box) # create the right column which is the current date details self.formatted_date_label = QtWidgets.QLabel(self) self.formatted_date_label.setText("") self.right_layout.addWidget(self.formatted_date_label) # create the right column which is the current date details self.time_log_info_label = QtWidgets.QLabel(self) self.time_log_info_label.setText("") self.right_layout.addWidget(self.time_log_info_label) # set stretch self.main_layout.setStretchFactor(self.left_layout, 0) self.main_layout.setStretchFactor(self.right_layout, 1) # setup signals self._setup_signals() # setup defaults self._set_defaults() # center window self.center_window()
def setup_ui(self): """create UI widgets """ self.resize(447, 546) self.setWindowTitle("TimeLog Dialog") # ----------------------------- # Setup Main Layout self.main_layout = QtWidgets.QHBoxLayout(self) # create the left column self.left_layout = QtWidgets.QVBoxLayout() self.main_layout.addLayout(self.left_layout) # create the right column # this will list the previously entered time logs self.right_layout = QtWidgets.QVBoxLayout() self.main_layout.addLayout(self.right_layout) # ----------------------------- # Setup Form Layout self.form_layout = QtWidgets.QFormLayout() self.form_layout.setFieldGrowthPolicy( QtWidgets.QFormLayout.AllNonFixedFieldsGrow ) self.left_layout.addLayout(self.form_layout) # ----------------------------- # Tasks self.tasks_label = QtWidgets.QLabel(self) self.tasks_label.setText("Task") self.form_layout.setWidget( 0, QtWidgets.QFormLayout.LabelRole, self.tasks_label ) from anima.ui.widgets import TaskComboBox self.tasks_combo_box = TaskComboBox(self) self.tasks_combo_box.setObjectName("tasks_combo_box") self.form_layout.setWidget( 0, QtWidgets.QFormLayout.FieldRole, self.tasks_combo_box ) # ----------------------------- # Tasks Progress Bar self.task_progress_bar = QtWidgets.QProgressBar(self) self.task_progress_bar.setProperty("value", 24) self.form_layout.setWidget( 1, QtWidgets.QFormLayout.FieldRole, self.task_progress_bar ) # ----------------------------- # Resources self.resources_label = QtWidgets.QLabel(self) self.resources_label.setText("Resource") self.form_layout.setWidget( 2, QtWidgets.QFormLayout.LabelRole, self.resources_label ) self.resource_combo_box = QtWidgets.QComboBox(self) self.form_layout.setWidget( 2, QtWidgets.QFormLayout.FieldRole, self.resource_combo_box ) # ----------------------------- # Calendar, Start & End Time # Label self.date_label = QtWidgets.QLabel(self) self.date_label.setText("Date") self.form_layout.setWidget( 3, QtWidgets.QFormLayout.LabelRole, self.date_label ) # Calendar Widget self.calendar_widget = QtWidgets.QCalendarWidget(self) self.calendar_widget.setFirstDayOfWeek(QtCore.Qt.Monday) self.form_layout.setWidget( 3, QtWidgets.QFormLayout.FieldRole, self.calendar_widget ) # Start Time self.start_time_label = QtWidgets.QLabel(self) self.start_time_label.setText("Start") self.form_layout.setWidget( 4, QtWidgets.QFormLayout.LabelRole, self.start_time_label ) from anima.ui.widgets import TimeEdit self.start_time_edit = TimeEdit(self, resolution=timing_resolution) self.start_time_edit.setCurrentSection( QtWidgets.QDateTimeEdit.MinuteSection ) self.start_time_edit.setCalendarPopup(True) self.start_time_edit.setObjectName("start_time_edit") self.start_time_edit.setWrapping(True) self.form_layout.setWidget( 4, QtWidgets.QFormLayout.FieldRole, self.start_time_edit ) self.start_time_edit.setDisplayFormat("HH:mm") # End Time self.end_time_label = QtWidgets.QLabel(self) self.end_time_label.setText("End") self.form_layout.setWidget( 5, QtWidgets.QFormLayout.LabelRole, self.end_time_label ) self.end_time_edit = TimeEdit(self, resolution=timing_resolution) self.end_time_edit.setCurrentSection( QtWidgets.QDateTimeEdit.MinuteSection ) self.end_time_edit.setCalendarPopup(True) self.end_time_edit.setObjectName("end_time_edit") self.end_time_edit.setWrapping(True) self.form_layout.setWidget( 5, QtWidgets.QFormLayout.FieldRole, self.end_time_edit ) self.end_time_edit.setDisplayFormat("HH:mm") # ----------------------------- # Time Left Info self.info_area_label = QtWidgets.QLabel(self) self.info_area_label.setText("INFO") self.form_layout.setWidget( 6, QtWidgets.QFormLayout.FieldRole, self.info_area_label ) # ----------------------------- # Revision self.revision_label = QtWidgets.QLabel(self) self.revision_label.setText( """<html> <head/> <body> <p align=\"right\"> Revision <br/> Type </p> </body> </html> """ ) self.form_layout.setWidget( 7, QtWidgets.QFormLayout.LabelRole, self.revision_label ) self.revision_type_combo_box = QtWidgets.QComboBox(self) self.form_layout.setWidget( 7, QtWidgets.QFormLayout.FieldRole, self.revision_type_combo_box ) # ----------------------------- # Description self.description_label = QtWidgets.QLabel(self) self.description_label.setText("Description") self.form_layout.setWidget( 8, QtWidgets.QFormLayout.LabelRole, self.description_label ) self.description_plain_text_edit = QtWidgets.QPlainTextEdit(self) self.form_layout.setWidget( 8, QtWidgets.QFormLayout.FieldRole, self.description_plain_text_edit ) # ----------------------------- # Status self.status_label = QtWidgets.QLabel(self) self.status_label.setText("Status") self.form_layout.setWidget( 9, QtWidgets.QFormLayout.LabelRole, self.status_label ) self.not_finished_yet_radio_button = QtWidgets.QRadioButton(self) self.not_finished_yet_radio_button.setText("Not Finished Yet") self.not_finished_yet_radio_button.setChecked(True) self.form_layout.setWidget( 9, QtWidgets.QFormLayout.FieldRole, self.not_finished_yet_radio_button ) self.set_as_complete_radio_button = QtWidgets.QRadioButton(self) self.set_as_complete_radio_button.setText("Set As Complete") self.form_layout.setWidget( 10, QtWidgets.QFormLayout.FieldRole, self.set_as_complete_radio_button ) self.submit_for_final_review_radio_button = \ QtWidgets.QRadioButton(self) self.submit_for_final_review_radio_button.setText( "Submit For Final Review" ) self.form_layout.setWidget( 11, QtWidgets.QFormLayout.FieldRole, self.submit_for_final_review_radio_button ) # ----------------------------- # Dialog Button Box self.dialog_button_box = QtWidgets.QDialogButtonBox(self) self.dialog_button_box.setOrientation(QtCore.Qt.Horizontal) self.dialog_button_box.setStandardButtons( QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok ) self.left_layout.addWidget(self.dialog_button_box) # create the right column which is the current date details self.formatted_date_label = QtWidgets.QLabel(self) self.formatted_date_label.setText("") self.right_layout.addWidget(self.formatted_date_label) # create the right column which is the current date details self.time_log_info_label = QtWidgets.QLabel(self) self.time_log_info_label.setText("") self.right_layout.addWidget(self.time_log_info_label) # set stretch self.main_layout.setStretchFactor(self.left_layout, 0) self.main_layout.setStretchFactor(self.right_layout, 1) # setup signals self._setup_signals() # setup defaults self._set_defaults() # center window self.center_window()
def create(self, parent=None): """Creates the fields under the given layout :param parent: :return: """ self.parent = parent # Main Layout self.layout = QtWidgets.QHBoxLayout(parent) layout_widget = self.layout.widget() # Shot Name Field self.shot_name_field = QtWidgets.QLineEdit(layout_widget) self.layout.addWidget(self.shot_name_field) # FBX file field self.fbx_file_field = QtWidgets.QLineEdit(layout_widget) self.fbx_file_field.setPlaceholderText("Choose FBX File") self.layout.addWidget(self.fbx_file_field) # FBX Button self.fbx_choose_button = QtWidgets.QPushButton(layout_widget) self.fbx_choose_button.setText("...") self.layout.addWidget(self.fbx_choose_button) # Video file field self.video_file_field = QtWidgets.QLineEdit(layout_widget) self.video_file_field.setPlaceholderText("Choose Video File") self.layout.addWidget(self.video_file_field) # FBX Button self.video_choose_button = QtWidgets.QPushButton(layout_widget) self.video_choose_button.setText("...") self.layout.addWidget(self.video_choose_button) # Cut in Field self.cut_in_field = QtWidgets.QSpinBox() self.cut_in_field.setMinimum(0) self.cut_in_field.setMaximum(9999999) self.layout.addWidget(self.cut_in_field) # Cut out Field self.cut_out_field = QtWidgets.QSpinBox() self.cut_out_field.setMinimum(0) self.cut_out_field.setMaximum(9999999) self.layout.addWidget(self.cut_out_field) # FPS Field self.fps_field = QtWidgets.QDoubleSpinBox() self.fps_field.setMinimum(0) self.fps_field.setMaximum(9999999) self.fps_field.setDecimals(2) self.layout.addWidget(self.fps_field) # Delete Button self.delete_push_button = QtWidgets.QPushButton(layout_widget) self.delete_push_button.setText("Delete") self.layout.addWidget(self.delete_push_button) # Signals import functools # Choose FBX Push Button QtCore.QObject.connect( self.fbx_choose_button, QtCore.SIGNAL("clicked()"), functools.partial(self.fbx_choose_button_clicked)) # Choose Video Push Button QtCore.QObject.connect( self.video_choose_button, QtCore.SIGNAL("clicked()"), functools.partial(self.video_choose_button_clicked)) QtCore.QObject.connect(self.delete_push_button, QtCore.SIGNAL("clicked()"), functools.partial(self.delete)) QtCore.QObject.connect( self.video_file_field, QtCore.SIGNAL("editingFinished()"), functools.partial(self.video_file_field_changed))
def setup_ui(self, dialog): """Sets up the dialog :param dialog: QtGui.QDialog instance :return: """ dialog.setObjectName("Dialog") dialog.setWindowModality(QtCore.Qt.ApplicationModal) dialog.resize(1200, 800) # layout vertical first self.vertical_layout = QtWidgets.QVBoxLayout(dialog) self.vertical_layout.setObjectName('verticalLayout1') self.horizontal_layout = QtWidgets.QHBoxLayout() self.from_task_tree_view = QtWidgets.QTreeView(dialog) self.from_task_tree_view.setObjectName("from_tasks_treeView") self.copy_push_button = QtWidgets.QPushButton(dialog) self.copy_push_button.setObjectName("copy_push_button") self.copy_push_button.setText('>') self.to_task_tree_view = TaskTreeView(dialog) self.to_task_tree_view.setObjectName("to_tasks_treeView") # self.horizontal_layout1.addWidget(self.from_task_tree_view) self.horizontal_layout.addWidget(self.from_task_tree_view) self.horizontal_layout.addWidget(self.copy_push_button) self.horizontal_layout.addWidget(self.to_task_tree_view) self.vertical_layout.addLayout(self.horizontal_layout) self.horizontal_layout_2 = QtWidgets.QHBoxLayout() self.horizontal_layout_2.setContentsMargins(-1, 10, -1, -1) self.horizontal_layout_2.setObjectName("horizontal_layout_2") self.vertical_layout.addLayout(self.horizontal_layout_2) QtCore.QMetaObject.connectSlotsByName(dialog) # initialize elements logged_in_user = self.get_logged_in_user() projects = Project.query.order_by(Project.name).all() task_tree_model = TaskTreeModel() task_tree_model.user = logged_in_user task_tree_model.populateTree(projects) # fit to elements self.from_tasks_tree_view_auto_fit_column() self.to_tasks_tree_view_auto_fit_column() self.from_task_tree_view.setModel(task_tree_model) self.to_task_tree_view.setModel(task_tree_model) # setup signals # tasks_treeView QtCore.QObject.connect( self.from_task_tree_view.selectionModel(), QtCore.SIGNAL('selectionChanged(const QItemSelection &, ' 'const QItemSelection &)'), self.from_task_tree_view_changed) QtCore.QObject.connect( self.to_task_tree_view.selectionModel(), QtCore.SIGNAL('selectionChanged(const QItemSelection &, ' 'const QItemSelection &)'), self.to_task_tree_view_changed) # fit column 0 on expand/collapse QtCore.QObject.connect(self.from_task_tree_view, QtCore.SIGNAL('expanded(QModelIndex)'), self.from_tasks_tree_view_auto_fit_column) QtCore.QObject.connect(self.to_task_tree_view, QtCore.SIGNAL('expanded(QModelIndex)'), self.to_tasks_tree_view_auto_fit_column) # copy_push_button QtCore.QObject.connect(self.copy_push_button, QtCore.SIGNAL("clicked()"), self.copy_versions)
def setup_ui(self): """add tools """ # create the main tab layout main_tab_widget = QtWidgets.QTabWidget(self.widget()) self.addWidget(main_tab_widget) # add the General Tab general_tab_widget = QtWidgets.QWidget(self.widget()) general_tab_vertical_layout = QtWidgets.QVBoxLayout() general_tab_widget.setLayout(general_tab_vertical_layout) main_tab_widget.addTab(general_tab_widget, 'Generic') # Create tools for general tab from anima.ui.utils import add_button # ------------------------------------------------------------------- # Template template_line_edit = QtWidgets.QLineEdit() # template_line_edit.setPlaceHolder("Template") template_line_edit.setText(GenericTools.default_output_template) general_tab_vertical_layout.addWidget(template_line_edit) # ------------------------------------------------------------------- # Per Clip Output Generator # create a new layout layout = QtWidgets.QHBoxLayout() general_tab_vertical_layout.addLayout(layout) per_clip_version_label = QtWidgets.QLabel() per_clip_version_label.setText("Version") per_clip_version_spinbox = QtWidgets.QSpinBox() per_clip_version_spinbox.setMinimum(1) def per_clip_output_generator_wrapper(): version_number = per_clip_version_spinbox.value() template = template_line_edit.text() GenericTools.per_clip_output_generator( version_number=version_number, template=template) add_button('Per Clip Output Generator', layout, per_clip_output_generator_wrapper) layout.addWidget(per_clip_version_label) layout.addWidget(per_clip_version_spinbox) # Clip Output Generator # create a new layout layout = QtWidgets.QHBoxLayout() general_tab_vertical_layout.addLayout(layout) clip_index_label = QtWidgets.QLabel() clip_index_label.setText("Clip Index") clip_index_spinbox = QtWidgets.QSpinBox() clip_index_spinbox.setMinimum(1) version_label = QtWidgets.QLabel() version_label.setText("Version") version_spinbox = QtWidgets.QSpinBox() version_spinbox.setMinimum(1) def clip_output_generator_wrapper(): clip_index = clip_index_spinbox.value() version_number = version_spinbox.value() GenericTools.clip_output_generator(clip_index, version_number) add_button('Clip Output Generator', layout, clip_output_generator_wrapper) layout.addWidget(clip_index_label) layout.addWidget(clip_index_spinbox) layout.addWidget(version_label) layout.addWidget(version_spinbox) # add_button( # "Get Shot Code", # general_tab_vertical_layout, # GenericTools.get_shot_code, # GenericTools.get_shot_code.__doc__ # ) # # ------------------------------------------------------------------- # # Set Shot Code # # layout = QtWidgets.QHBoxLayout() # general_tab_vertical_layout.addLayout(layout) # # set_clip_code_label = QtWidgets.QLabel() # set_clip_code_label.setText("Code") # set_clip_code_line_edit = QtWidgets.QLineEdit() # # def set_shot_code_wrapper(): # shot_code = set_clip_code_line_edit.text() # GenericTools.set_shot_code(shot_code) # # layout.addWidget(set_clip_code_label) # layout.addWidget(set_clip_code_line_edit) # add_button( # "Set Shot Code", # layout, # set_shot_code_wrapper, # GenericTools.set_shot_code.__doc__, # ) def parent_ui_callback(): GenericTools.shot_manager(parent_ui=self.parent()) add_button("Shot Manager", general_tab_vertical_layout, parent_ui_callback, GenericTools.shot_manager.__doc__) # add_button( # "Get Current Thumbnail", # general_tab_vertical_layout, # GenericTools.get_thumbnail, # GenericTools.get_thumbnail.__doc__ # ) # ------------------------------------------------------------------- # Add the stretcher general_tab_vertical_layout.addStretch()
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)
def setup_ui(self): """add tools """ # create the main tab layout main_tab_widget = QtWidgets.QTabWidget(self.widget()) self.addWidget(main_tab_widget) # add the General Tab general_tab_widget = QtWidgets.QWidget(self.widget()) general_tab_vertical_layout = QtWidgets.QVBoxLayout() general_tab_vertical_layout.setSizeConstraint( QtWidgets.QLayout.SetMaximumSize ) general_tab_widget.setLayout(general_tab_vertical_layout) main_tab_widget.addTab(general_tab_widget, 'Generic') # Create tools for general tab # ------------------------------------------------------------------- # Open Version add_button( 'Open Version', general_tab_vertical_layout, GenericTools.version_dialog, callback_kwargs={"parent": self.parent(), "mode": 1} ) # Save As Version add_button( 'Save As Version', general_tab_vertical_layout, GenericTools.version_dialog, callback_kwargs={"parent": self.parent(), "mode": 0} ) # Update Outputs add_button( 'Update Savers', general_tab_vertical_layout, GenericTools.update_savers ) # Loader Report add_button( 'Loader Report', general_tab_vertical_layout, GenericTools.loader_report ) # PassThrough All Saver nodes add_button( 'PassThrough All Savers', general_tab_vertical_layout, GenericTools.pass_through_all_savers ) # Insert Pipe Router add_button( 'Insert Pipe Router', general_tab_vertical_layout, GenericTools.insert_pipe_router_to_selected_node ) # Loader From Saver add_button( 'Loader from Saver', general_tab_vertical_layout, GenericTools.loader_from_saver ) # Delete Recent Comps add_button( 'Delete Recent Comps', general_tab_vertical_layout, GenericTools.delete_recent_comps ) # Set Frames At Once To 1, 5 and 10 hbox_layout = QtWidgets.QHBoxLayout() general_tab_vertical_layout.addLayout(hbox_layout) set_frames_at_once_label = QtWidgets.QLabel() set_frames_at_once_label.setText("Set Frames At Once To") hbox_layout.addWidget(set_frames_at_once_label) for i in [1, 5, 10]: button = add_button( '%s' % i, hbox_layout, GenericTools.set_frames_at_once, callback_kwargs={'count': i} ) button.setMinimumSize(QtCore.QSize(25, 0)) add_line(general_tab_vertical_layout) # Range From Shot add_button( 'Get Comp Range From Database', general_tab_vertical_layout, GenericTools.range_from_shot ) # Shot From Range add_button( 'Set Comp Range To Database', general_tab_vertical_layout, GenericTools.shot_from_range ) add_line(general_tab_vertical_layout) # Render Merger add_button( 'Render Merger', general_tab_vertical_layout, GenericTools.render_merger, tooltip="Creates comp setup to merge renders created with Render Slicer." ) # Render Merger import functools add_button( '3DE4 Lens Distort', general_tab_vertical_layout, functools.partial(GenericTools.tde4_lens_distort_node_creator, self.parent()), tooltip=GenericTools.tde4_lens_distort_node_creator.__doc__ ) # ------------------------------------------------------------------- # Add the stretcher general_tab_vertical_layout.addStretch()
def setup_ui(self): """add tools """ # create the main tab layout main_tab_widget = QtWidgets.QTabWidget(self.widget()) self.addWidget(main_tab_widget) # ********************************************************************* # # GENERAL TAB # # ********************************************************************* # add the General Tab general_tab_widget = QtWidgets.QWidget(self.widget()) general_tab_vertical_layout = QtWidgets.QVBoxLayout() general_tab_widget.setLayout(general_tab_vertical_layout) main_tab_widget.addTab(general_tab_widget, 'Generic') # Create tools for general tab # ------------------------------------------------------------------- # Version Dialog from anima.ui.utils import add_button add_button('Open Version', general_tab_vertical_layout, GenericTools.version_dialog, callback_kwargs={"mode": 1}) add_button('Save As Version', general_tab_vertical_layout, GenericTools.version_dialog, callback_kwargs={"mode": 0}) # Browse $HIP add_button('Browse $HIP', general_tab_vertical_layout, GenericTools.browse_hip) # Copy Path add_button('Copy Node Path', general_tab_vertical_layout, GenericTools.copy_node_path) # Range from shot add_button('Range From Shot', general_tab_vertical_layout, GenericTools.range_from_shot) # Update render settings add_button('Update Render Settings', general_tab_vertical_layout, GenericTools.update_render_settings) def export_rsproxy_data_as_json_callback(): """ """ import hou try: GenericTools.export_rsproxy_data_as_json() except (BaseException, hou.OperationFailed) as e: QtWidgets.QMessageBox.critical(main_tab_widget, "Export", "Error!<br><br>%s" % e) else: QtWidgets.QMessageBox.information( main_tab_widget, "Export", "Data has been exported correctly!") # Export RSProxy Data As JSON add_button('Export RSProxy Data As JSON', general_tab_vertical_layout, export_rsproxy_data_as_json_callback) # Batch Rename batch_rename_layout = QtWidgets.QHBoxLayout() general_tab_vertical_layout.addLayout(batch_rename_layout) search_field = QtWidgets.QLineEdit() search_field.setPlaceholderText("Search") replace_field = QtWidgets.QLineEdit() replace_field.setPlaceholderText("Replace") replace_in_child_nodes_check_box = QtWidgets.QCheckBox() replace_in_child_nodes_check_box.setToolTip("Replace In Child Nodes") replace_in_child_nodes_check_box.setChecked(False) batch_rename_layout.addWidget(search_field) batch_rename_layout.addWidget(replace_field) batch_rename_layout.addWidget(replace_in_child_nodes_check_box) def search_and_replace_callback(): search_str = search_field.text() replace_str = replace_field.text() GenericTools.rename_selected_nodes( search_str, replace_str, replace_in_child_nodes_check_box.isChecked()) add_button("Search && Replace", batch_rename_layout, search_and_replace_callback) # Import Shaders From Maya add_button('Import Shaders From Maya', general_tab_vertical_layout, GenericTools.import_shaders_from_maya) # Create Focus Plane add_button('Creat Focus Plane', general_tab_vertical_layout, GenericTools.create_focus_plane) # ------------------------------------------------------------------- # Add the stretcher general_tab_vertical_layout.addStretch() # ********************************************************************* # # CROWD TAB # # ********************************************************************* # add the Crowd Tab crowd_tab_widget = QtWidgets.QWidget(self.widget()) crowd_tab_vertical_layout = QtWidgets.QVBoxLayout() crowd_tab_widget.setLayout(crowd_tab_vertical_layout) main_tab_widget.addTab(crowd_tab_widget, 'Crowd') # crowd_tools_label = QtWidgets.QLabel("Crowd Tools") # crowd_tab_vertical_layout.addWidget(crowd_tools_label) from anima.env.houdini import crowd_tools # Bake Setup add_button('Create Bake Setup', crowd_tab_vertical_layout, crowd_tools.create_bake_setup) # Bake Setup add_button('Create Render Setup', crowd_tab_vertical_layout, crowd_tools.create_render_setup) # ------------------------------------------------------------------- # Add the stretcher crowd_tab_vertical_layout.addStretch()
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")
def _setup_ui(self): """the ui """ self.resize(243, 209) # from anima.ui.lib import QtWidgets # if False: # from PySide2 import QtWidgets # assert QtWidgets is QtWidgets from PySide2 import QtWidgets self.vertical_layout = QtWidgets.QVBoxLayout(self) self.setLayout(self.vertical_layout) self.vertical_layout.setStretch(2, 1) self.setWindowTitle(self.dialog_name) self.form_layout = QtWidgets.QFormLayout() self.form_layout.setFieldGrowthPolicy( QtWidgets.QFormLayout.AllNonFixedFieldsGrow ) self.form_layout.setLabelAlignment( QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter ) label_role = QtWidgets.QFormLayout.LabelRole field_role = QtWidgets.QFormLayout.FieldRole form_field_index = -1 # -------------------- # Number of Joints Field form_field_index += 1 # Label self.number_of_joints_label = QtWidgets.QLabel(self) self.number_of_joints_label.setText("Number Of Joints") self.form_layout.setWidget( form_field_index, label_role, self.number_of_joints_label, ) # Field self.number_of_joints_spin_box = QtWidgets.QSpinBox(self) self.form_layout.setWidget( form_field_index, field_role, self.number_of_joints_spin_box ) self.number_of_joints_spin_box.setValue(2) self.number_of_joints_spin_box.setMinimum(2) # ----------------------- # Orientation form_field_index += 1 # Label self.orientation_label = QtWidgets.QLabel(self) self.orientation_label.setText("Orientation") self.form_layout.setWidget( form_field_index, label_role, self.orientation_label ) # Field self.orientation_combo_box = QtWidgets.QComboBox(self) self.orientation_combo_box.addItems( [ "xyz", "yzx", "zxy", "xzy", "yxz", "zyx", ] ) self.form_layout.setWidget( form_field_index, field_role, self.orientation_combo_box ) # --------------------------- # Second Axis World Orientation form_field_index += 1 # Label self.second_axis_world_orientation_label = QtWidgets.QLabel(self) self.second_axis_world_orientation_label.setText( "Second Axis World Orientation" ) self.form_layout.setWidget( form_field_index, label_role, self.second_axis_world_orientation_label ) # Field self.second_axis_world_orientation_combo_box = \ QtWidgets.QComboBox(self) self.second_axis_world_orientation_combo_box.addItems( [ "+x", "-x", "+y", "-y", "+z", "-z", ] ) self.form_layout.setWidget( form_field_index, field_role, self.second_axis_world_orientation_combo_box ) # -------------------------------- # Align To World form_field_index += 1 # Label self.align_to_world_label = QtWidgets.QLabel(self) self.align_to_world_label.setText("Align To World") self.form_layout.setWidget( form_field_index, label_role, self.align_to_world_label ) # Field self.align_to_world_check_box = QtWidgets.QCheckBox(self) self.form_layout.setWidget( form_field_index, field_role, self.align_to_world_check_box ) # ---------------------------------- # Reverse Curve form_field_index += 1 # Label self.reverse_curve_label = QtWidgets.QLabel(self) self.reverse_curve_label.setText("Reverse Curve") self.form_layout.setWidget( form_field_index, label_role, self.reverse_curve_label ) self.reverse_curve_check_box = QtWidgets.QCheckBox(self) self.form_layout.setWidget( form_field_index, field_role, self.reverse_curve_check_box ) # ------------------------------- # Joint Names form_field_index += 1 # Label self.joint_names_label = QtWidgets.QLabel(self) self.joint_names_label.setText("Joint Names") self.form_layout.setWidget( form_field_index, label_role, self.joint_names_label ) # Field self.joint_names_layout = QtWidgets.QHBoxLayout(self) self.joint_names_check_box = QtWidgets.QCheckBox(self) self.joint_names_line_edit = QtWidgets.QLineEdit(self) self.joint_names_line_edit.setText("joint") self.joint_names_line_edit.setEnabled(False) self.joint_names_layout.addWidget(self.joint_names_check_box) self.joint_names_layout.addWidget(self.joint_names_line_edit) self.form_layout.setLayout( form_field_index, field_role, self.joint_names_layout ) # setup signals QtCore.QObject.connect( self.joint_names_check_box, QtCore.SIGNAL("stateChanged(int)"), self.joint_names_line_edit.setEnabled ) # ------------------------ # Suffix Joint Names form_field_index += 1 # Label self.suffix_joint_names_label = QtWidgets.QLabel(self) self.suffix_joint_names_label.setText("Suffix Joint Names") self.form_layout.setWidget( form_field_index, label_role, self.suffix_joint_names_label ) # Field self.suffix_joint_names_layout = QtWidgets.QHBoxLayout(self) self.suffix_joint_names_check_box = QtWidgets.QCheckBox(self) self.suffix_joint_names_line_edit = QtWidgets.QLineEdit(self) self.suffix_joint_names_line_edit.setText("_suffix") self.suffix_joint_names_line_edit.setEnabled(False) self.suffix_joint_names_layout.addWidget( self.suffix_joint_names_check_box ) self.suffix_joint_names_layout.addWidget( self.suffix_joint_names_line_edit ) self.form_layout.setLayout( form_field_index, field_role, self.suffix_joint_names_layout ) # setup signals QtCore.QObject.connect( self.suffix_joint_names_check_box, QtCore.SIGNAL("stateChanged(int)"), self.suffix_joint_names_line_edit.setEnabled ) # ---------------- self.vertical_layout.addLayout(self.form_layout) # ---------------- # Create Joints Button self.create_joints_button = QtWidgets.QPushButton() self.create_joints_button.setText("Create Joints") self.vertical_layout.addWidget(self.create_joints_button) # setup signals QtCore.QObject.connect( self.create_joints_button, QtCore.SIGNAL("clicked()"), self.create_joints )
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)
def __init__ui(self): """creates the Widgets """ # create a horizontal layout to hold the widgets self.main_layout = QtWidgets.QHBoxLayout() # ---------------------------------- # Primary Widgets Layout self.primary_widgets_layout = QtWidgets.QVBoxLayout() # label self.primary_label = QtWidgets.QLabel(self.dialog) self.primary_label.setText(self.primary_label_text) self.primary_label.setAlignment(QtCore.Qt.AlignCenter) self.primary_widgets_layout.addWidget(self.primary_label) # list widget self.primary_list_widget = QtWidgets.QListWidget(self.dialog) self.primary_widgets_layout.addWidget(self.primary_list_widget) self.main_layout.addLayout(self.primary_widgets_layout) # ---------------------------------- # Button Layout self.button_layout = QtWidgets.QVBoxLayout() self.button_layout.insertStretch(0, 0) self.primary_to_secondary_push_button = \ QtWidgets.QPushButton('>>', parent=self.dialog) self.secondary_to_primary_push_button = \ QtWidgets.QPushButton('<<', parent=self.dialog) self.primary_to_secondary_push_button.setMaximumSize(25, 16777215) self.secondary_to_primary_push_button.setMaximumSize(25, 16777215) self.button_layout.addWidget(self.primary_to_secondary_push_button) self.button_layout.addWidget(self.secondary_to_primary_push_button) self.button_layout.insertStretch(3, 0) self.main_layout.addLayout(self.button_layout) # ---------------------------------- # Secondary Widgets Layout self.secondary_widgets_layout = QtWidgets.QVBoxLayout() # label self.secondary_label = QtWidgets.QLabel(self.dialog) self.secondary_label.setText(self.secondary_label_text) self.secondary_label.setAlignment(QtCore.Qt.AlignCenter) # list widget self.secondary_widgets_layout.addWidget(self.secondary_label) self.secondary_list_widget = QtWidgets.QListWidget(self.dialog) self.secondary_widgets_layout.addWidget(self.secondary_list_widget) self.main_layout.addLayout(self.secondary_widgets_layout) self.main_layout.setStretch(0, 1) self.main_layout.setStretch(1, 0) self.main_layout.setStretch(2, 1) self.parent_layout.addLayout(self.main_layout) # Create signals QtCore.QObject.connect(self.primary_to_secondary_push_button, QtCore.SIGNAL('clicked()'), self.primary_to_secondary_push_button_clicked) QtCore.QObject.connect( self.primary_list_widget, QtCore.SIGNAL('itemDoubleClicked(QListWidgetItem*)'), self.primary_to_secondary_push_button_clicked) QtCore.QObject.connect(self.secondary_to_primary_push_button, QtCore.SIGNAL('clicked()'), self.secondary_to_primary_push_button_clicked) QtCore.QObject.connect( self.secondary_list_widget, QtCore.SIGNAL('itemDoubleClicked(QListWidgetItem*)'), self.secondary_to_primary_push_button_clicked)
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)
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()