def _setup_ui(self): self.setWindowTitle('Scene Publisher') self.setLayout(Q.VBoxLayout()) hbox = Q.HBoxLayout() self._exporter = SceneExporter() self._publish_widget = PublishWidget(self._exporter) self._publish_widget.layout().setContentsMargins(0, 0, 0, 0) self.layout().addWidget(self._publish_widget) self._publish_widget.beforeScreenshot.connect(self.hide) self._publish_widget.afterScreenshot.connect(self.show) cancel_button = Q.PushButton('Cancel') cancel_button.clicked.connect(self._on_cancel) hbox.addWidget(cancel_button) hbox.addStretch() publish_button = Q.PushButton('Publish') publish_button.clicked.connect(self._on_submit) hbox.addWidget(publish_button) self.layout().addLayout(ui_utils.vbox(hbox)) self._publish_widget.beforePlayblast.connect(self._before_playblast) self._publish_widget.afterPlayblast.connect(self._after_playblast) self._msgbox = None
def _setup_ui(self): self.setLayout(QtGui.QHBoxLayout()) self._path_field = QtGui.QLineEdit("NOT YET IMPLEMENTED") self._browse_button = QtGui.QPushButton("Browse") self.layout().addLayout(vbox("Export Path", hbox(self._path_field, self._browse_button, spacing=2))) self._browse_button.setFixedHeight(self._path_field.sizeHint().height()) self._browse_button.setFixedWidth(self._browse_button.sizeHint().width())
def _setup_ui(self): self.setWindowTitle('Scene Publisher') self.setLayout(QtGui.QVBoxLayout()) self._exporter = SceneExporter() self._publish_widget = PublishWidget(self._exporter) self._publish_widget.layout().setContentsMargins(0, 0, 0, 0) self.layout().addWidget(self._publish_widget) self._publish_widget.beforeScreenshot.connect(self.hide) self._publish_widget.afterScreenshot.connect(self.show) button = QtGui.QPushButton('Publish') button.clicked.connect(self._on_submit) self.layout().addLayout(ui_utils.vbox(button)) self._publish_widget.beforePlayblast.connect(self._before_playblast) self._publish_widget.afterPlayblast.connect(self._after_playblast) self._msgbox = None
def _setup_ui(self): self.setLayout(QtGui.QVBoxLayout()) self._task_combo = ComboBox() self._task_combo.addItem('Loading...', {'loading': True}) self._task_combo.currentIndexChanged.connect(self._task_changed) self._name_combo = ComboBox() self._name_combo.addItem('Loading...', {'loading': True}) self._name_combo.addItem('Create new stream...', {'new': True}) self._name_combo.currentIndexChanged.connect(self._name_changed) self._tasksLabel = QtGui.QLabel("Task") self.layout().addLayout(hbox( vbox(self._tasksLabel, self._task_combo), vbox("Publish Stream", self._name_combo), spacing=4 )) self._name_field = QtGui.QLineEdit(self._basename) self._name_field.setEnabled(False) self._name_field.editingFinished.connect(self._on_name_edited) self._version_spinbox = QtGui.QSpinBox() self._version_spinbox.setMinimum(1) self._version_spinbox.setMaximum(9999) self._version_spinbox.valueChanged.connect(self._on_version_changed) self._version_warning_issued = False self.layout().addLayout(hbox( vbox("Name", self._name_field), vbox("Version", self._version_spinbox), spacing=4 )) # Get publish data in the background. self.loaded_publishes.connect(self._populate_existing_data) self._thread = QtCore.QThread() self._thread.run = self._fetch_existing_data self._thread.start() self._description = QtGui.QTextEdit('') self._description.setMaximumHeight(100) self._thumbnail_path = None self._thumbnail_canvas = QtGui.QLabel() self._thumbnail_canvas.setFrameShadow(QtGui.QFrame.Sunken) self._thumbnail_canvas.setFrameShape(QtGui.QFrame.Panel) self._thumbnail_canvas.setToolTip("Click to specify part of screen.") self._thumbnail_canvas.mouseReleaseEvent = self.take_partial_screenshot self.layout().addLayout(hbox( vbox("Describe Your Changes", self._description), vbox("Thumbnail", self._thumbnail_canvas), )) self._movie_path = QtGui.QLineEdit() self._movie_browse = QtGui.QPushButton(icon('silk/folder', size=12, as_icon=True), "Browse") self._movie_browse.clicked.connect(self._on_movie_browse) self._movie_layout = hbox(self._movie_path, self._movie_browse) self.layout().addLayout(vbox("Path to Movie or Frames (to be copied to publish)", self._movie_layout, spacing=4)) self._movie_browse.setFixedHeight(self._movie_path.sizeHint().height()) self._movie_browse.setFixedWidth(self._movie_browse.sizeHint().width() + 2) self._promote_checkbox = QtGui.QCheckBox("Promote to 'Version' for review") # self.layout().addWidget(self._promote_checkbox) self._timelog_spinbox = TimeSpinner() add_hour = QtGui.QPushButton("+1 Hour") add_hour.setFixedHeight(self._timelog_spinbox.sizeHint().height()) @add_hour.clicked.connect def on_add_hour(): self._timelog_spinbox.setValue(self._timelog_spinbox.value() + 60) add_day = QtGui.QPushButton("+1 Day") add_day.setFixedHeight(self._timelog_spinbox.sizeHint().height()) @add_day.clicked.connect def on_add_day(): self._timelog_spinbox.setValue(self._timelog_spinbox.value() + 60 * 8) self.layout().addLayout(hbox( vbox("Time to Log", hbox(self._timelog_spinbox, "hrs:mins", add_hour, add_day)), vbox("Review", self._promote_checkbox), ))