Ejemplo n.º 1
0
 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())
Ejemplo n.º 2
0
 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),
     ))
Ejemplo n.º 3
0
 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),
     ))