예제 #1
0
    def __init__(self, parent):
        ChildDialog.__init__(self, parent)
        self.ui = ui_ray_hack_copy.Ui_Dialog()
        self.ui.setupUi(self)

        self.rename_file = False
        self.ui.pushButtonCopyRename.clicked.connect(self.setRenameFile)
예제 #2
0
    def showEvent(self, event):
        ChildDialog.showEvent(self, event)

        if RS.is_hidden(RS.HD_SnapshotsInfo):
            return

        info_dialog = SnapshotsInfoDialog(self)
        info_dialog.exec()

        if info_dialog.has_to_be_hidden_next_time():
            RS.set_hidden(RS.HD_SnapshotsInfo)
예제 #3
0
    def __init__(self, parent):
        ChildDialog.__init__(self, parent)
        self.ui = ui.snapshot_name.Ui_Dialog()
        self.ui.setupUi(self)

        self.ui.lineEdit.textChanged.connect(self._text_changed)
        self.ui.pushButtonSave.setEnabled(False)
        self.ui.pushButtonSnapshot.setEnabled(False)

        self._save_asked = False
        self.ui.pushButtonSave.clicked.connect(self._accept_with_save)
예제 #4
0
    def showEvent(self, event):
        ChildDialog.showEvent(self, event)

        if RS.settings.value('hide_snapshots_info'):
            return

        info_dialog = SnapshotsInfoDialog(self)
        info_dialog.exec()

        if info_dialog.hasToBeHiddenNextTime():
            RS.settings.setValue('hide_snapshots_info', True)
예제 #5
0
    def __init__(self, parent):
        ChildDialog.__init__(self, parent)
        self.ui = ui_snapshot_name.Ui_Dialog()
        self.ui.setupUi(self)

        self.ui.lineEdit.textChanged.connect(self.textChanged)
        #self.ui.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
        self.ui.pushButtonSave.setEnabled(False)
        self.ui.pushButtonSnapshot.setEnabled(False)

        self.__save_asked = False
        self.ui.pushButtonSave.clicked.connect(self.acceptWithSave)
    def __init__(self, parent, template_name):
        ChildDialog.__init__(self, parent)
        self.ui = ui.remove_template.Ui_Dialog()
        self.ui.setupUi(self)

        self.ui.label.setText(
            _translate(
                'add_app_dialog',
                '<p>Are you sure to want to remove<br>the template "%s" and all its files ?</p>'
            ) % template_name)

        self.ui.pushButtonCancel.setFocus()
예제 #7
0
    def __init__(self, parent):
        ChildDialog.__init__(self, parent)
        self.ui = ui.hydro_rh_nsm.Ui_Dialog()
        self.ui.setupUi(self)
        self.ui.checkBoxCurrentSession.stateChanged.connect(
            self._current_session_check)
        self._check_boxes = (self.ui.checkBoxAllSessions,
                             self.ui.checkBoxClientTemplates,
                             self.ui.checkBoxSessionTemplates)

        for check_box in self._check_boxes:
            check_box.stateChanged.connect(self._one_state_changed)

        if self.session.server_status != ray.ServerStatus.READY:
            self.ui.checkBoxCurrentSession.setEnabled(False)
예제 #8
0
    def __init__(self, parent):
        ChildDialog.__init__(self, parent)
        self.ui = ui_list_snapshots.Ui_Dialog()
        self.ui.setupUi(self)

        self._signaler.reply_auto_snapshot.connect(
            self.ui.checkBoxAutoSnapshot.setChecked)
        self._signaler.snapshots_found.connect(self.addSnapshots)

        self.snapshots = []
        self.main_snap_group = SnapGroup()

        self.ui.snapshotsList.setHeaderHidden(True)
        self.ui.snapshotsList.currentItemChanged.connect(
            self.currentItemChanged)

        self.ui.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
예제 #9
0
    def __init__(self, parent, client):
        ChildDialog.__init__(self, parent)
        self.ui = ui_client_properties.Ui_Dialog()
        self.ui.setupUi(self)

        self.client = client

        self.setWindowTitle(
            _translate('client_properties', "Properties of client %s") %
            client.client_id)

        self._acceptable_arguments = True
        self._current_status = ray.ClientStatus.STOPPED

        self.ui.lineEditIcon.textEdited.connect(self.changeIconwithText)
        self.ui.pushButtonSaveChanges.clicked.connect(self.saveChanges)

        self.ui.tabWidget.setCurrentIndex(0)
예제 #10
0
    def __init__(self, parent):
        ChildDialog.__init__(self, parent)
        self.ui = ui.ray_to_nsm.Ui_Dialog()
        self.ui.setupUi(self)

        self.choose_current_session = False
        #self.choose_session
        choose_button = self.ui.buttonBox.addButton(
            _translate('utilities', 'Choose a session'),
            QDialogButtonBox.AcceptRole)
        choose_button.setIcon(QIcon.fromTheme('folder-open'))

        this_session_button = self.ui.buttonBox.addButton(
            _translate('utilities', 'Convert the current session'),
            QDialogButtonBox.AcceptRole)

        if not self.session.path:
            this_session_button.setVisible(False)

        this_session_button.clicked.connect(
            self._set_on_choose_current_session)
    def __init__(self, parent):
        ChildDialog.__init__(self, parent)
        self.ui = ui_add_application.Ui_DialogAddApplication()
        self.ui.setupUi(self)

        self._session = parent._session

        self.ui.checkBoxFactory.setChecked(
            RS.settings.value('AddApplication/factory_box', True, type=bool))
        self.ui.checkBoxUser.setChecked(
            RS.settings.value('AddApplication/user_box', True, type=bool))

        self.ui.checkBoxFactory.stateChanged.connect(self.factoryBoxChanged)
        self.ui.checkBoxUser.stateChanged.connect(self.userBoxChanged)

        self.ui.templateList.currentItemChanged.connect(
            self.currentItemChanged)
        self.ui.templateList.setFocus(Qt.OtherFocusReason)
        self.ui.filterBar.textEdited.connect(self.updateFilteredList)
        self.ui.filterBar.updownpressed.connect(self.updownPressed)
        self.ui.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)

        self._signaler.user_client_template_found.connect(
            self.addUserTemplates)
        self._signaler.factory_client_template_found.connect(
            self.addFactoryTemplates)
        self._signaler.client_template_update.connect(
            self.updateClientTemplate)
        self.toDaemon('/ray/server/list_user_client_templates')
        self.toDaemon('/ray/server/list_factory_client_templates')

        self.user_template_list = []
        self.factory_template_list = []

        self.server_will_accept = False
        self.has_selection = False

        self.serverStatusChanged(self._session.server_status)
    def __init__(self, parent):
        ChildDialog.__init__(self, parent)
        self.ui = ui.add_application.Ui_DialogAddApplication()
        self.ui.setupUi(self)

        self.session = parent.session

        self.ui.checkBoxFactory.setChecked(
            RS.settings.value('AddApplication/factory_box', True, type=bool))
        self.ui.checkBoxUser.setChecked(
            RS.settings.value('AddApplication/user_box', True, type=bool))
        self.ui.checkBoxRayHack.setChecked(
            RS.settings.value('AddApplication/ray_hack_box', True, type=bool))
        self.ui.widgetTemplateInfos.setVisible(False)

        self.ui.checkBoxFactory.stateChanged.connect(self._factory_box_changed)
        self.ui.checkBoxUser.stateChanged.connect(self._user_box_changed)
        self.ui.checkBoxNsm.stateChanged.connect(self._nsm_box_changed)
        self.ui.checkBoxRayHack.stateChanged.connect(
            self._ray_hack_box_changed)
        self.ui.pushButtonRefresh.clicked.connect(self._refresh_database)
        self._refresh_shortcut = QShortcut('F5', self)
        self._refresh_shortcut.activated.connect(self._refresh_database)

        self.ui.templateList.currentItemChanged.connect(
            self._current_item_changed)
        self.ui.templateList.setFocus(Qt.OtherFocusReason)
        self.ui.filterBar.textEdited.connect(self._update_filtered_list)
        self.ui.filterBar.up_down_pressed.connect(self._up_down_pressed)

        self.ui.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)

        self.user_menu = QMenu()
        act_remove_template = QAction(QIcon.fromTheme('edit-delete-remove'),
                                      _translate('menu', 'remove'),
                                      self.user_menu)
        act_remove_template.triggered.connect(self._remove_current_template)
        self.user_menu.addAction(act_remove_template)
        self.ui.toolButtonUser.setMenu(self.user_menu)
        self.ui.toolButtonFavorite.set_session(self.session)
        self.ui.widgetNonSaveable.setVisible(False)
        self.ui.toolButtonAdvanced.clicked.connect(
            self._tool_button_advanced_clicked)

        if is_dark_theme(self):
            self.ui.toolButtonUser.setIcon(
                QIcon(':scalable/breeze-dark/im-user.svg'))
            self.ui.toolButtonFavorite.set_dark_theme()
            self.ui.toolButtonNoSave.setIcon(
                QIcon(':scalable/breeze-dark/document-nosave.svg'))

        self.signaler.user_client_template_found.connect(
            self._add_user_templates)
        self.signaler.factory_client_template_found.connect(
            self._add_factory_templates)
        self.signaler.client_template_update.connect(
            self._update_client_template)
        self.signaler.client_template_ray_hack_update.connect(
            self._update_client_template_ray_hack)
        self.signaler.client_template_ray_net_update.connect(
            self._update_client_template_ray_net)
        self.signaler.favorite_added.connect(self._favorite_added)
        self.signaler.favorite_removed.connect(self._favorite_removed)

        self.to_daemon('/ray/server/list_user_client_templates')
        self.to_daemon('/ray/server/list_factory_client_templates')
        self.listing_finished = 0

        self.user_template_list = []
        self.factory_template_list = []

        self._server_will_accept = False
        self.has_selection = False

        self._server_status_changed(self.session.server_status)

        self.ui.filterBar.setFocus()
예제 #13
0
 def closeEvent(self, event):
     self._cancel_copy_clicked()
     ChildDialog.closeEvent(self, event)
예제 #14
0
 def resizeEvent(self, event):
     ChildDialog.resizeEvent(self, event)
     self._resize_session_names_column()
예제 #15
0
    def __init__(self, parent):
        ChildDialog.__init__(self, parent)
        self.ui = ui.open_session.Ui_DialogOpenSession()
        self.ui.setupUi(self)

        self._pending_action = PENDING_ACTION_NONE
        self._session_renaming = ('', '')
        self._session_duplicating = ('', '')
        self._session_templating = ('', '')

        self._listing_timer_progress_n = 0
        self._listing_timer_progress = QTimer()
        self._listing_timer_progress.setInterval(50)
        self._listing_timer_progress.timeout.connect(
            self._listing_timer_progress_timeout)
        self._listing_timer_progress.start()
        self._progress_inverted = False

        self.session_menu = QMenu()
        self.action_duplicate = self.session_menu.addAction(
            QIcon.fromTheme('duplicate'),
            _translate('session_menu', 'Duplicate session'))
        self.action_save_as_template = self.session_menu.addAction(
            QIcon.fromTheme('template'),
            _translate('session_menu', 'Save session as template'))
        self.action_rename = self.session_menu.addAction(
            QIcon.fromTheme('edit-rename'),
            _translate('session_menu', 'Rename session'))
        self.action_remove = self.session_menu.addAction(
            QIcon.fromTheme('remove'),
            _translate('session_menu', 'Remove session'))

        dark = is_dark_theme(self)
        self.action_duplicate.setIcon(RayIcon('xml-node-duplicate', dark))
        self.action_save_as_template.setIcon(
            RayIcon('document-save-as-template', dark))

        self.action_rename.triggered.connect(self._ask_for_session_rename)
        self.action_duplicate.triggered.connect(
            self._ask_for_session_duplicate)
        self.action_save_as_template.triggered.connect(
            self._ask_for_session_save_as_template)
        self.action_remove.triggered.connect(self._ask_for_session_remove)
        self.ui.toolButtonSessionMenu.setMenu(self.session_menu)
        self.ui.toolButtonFolderPreview.clicked.connect(
            self._open_preview_folder)

        self.ui.splitterMain.setSizes([240, 800])
        self.ui.stackedWidgetSessionName.set_text('')
        self.ui.previewFrame.setEnabled(False)
        self.ui.tabWidget.tabBar().setExpanding(True)
        self.ui.toolButtonFolder.clicked.connect(self._change_root_folder)

        self.ui.splitterMain.splitterMoved.connect(self._splitter_moved)
        self.ui.stackedWidgetSessionName.name_changed.connect(
            self._session_name_changed)
        self.ui.sessionList.currentItemChanged.connect(
            self._current_item_changed)
        self.ui.sessionList.setFocus(Qt.OtherFocusReason)
        self.ui.sessionList.itemDoubleClicked.connect(self._go_if_any)
        self.ui.sessionList.itemClicked.connect(self._deploy_item)
        self.ui.sessionList.customContextMenuRequested.connect(
            self._show_context_menu)
        self.ui.filterBar.textEdited.connect(self._update_filtered_list)
        self.ui.filterBar.key_event.connect(self._up_down_pressed)
        self.ui.listWidgetPreview.properties_request.connect(
            self._show_client_properties)
        self.ui.listWidgetPreview.add_to_session_request.connect(
            self._add_client_to_current_session)
        self.ui.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
        self.ui.currentSessionsFolder.setText(CommandLineArgs.session_root)
        self.ui.checkBoxShowDates.stateChanged.connect(
            self._set_full_sessions_view)
        self.ui.pushButtonCancelProgress.clicked.connect(
            self._cancel_copy_clicked)

        self.signaler.add_sessions_to_list.connect(self._add_sessions)
        self.signaler.root_changed.connect(self._root_changed)
        self.signaler.session_preview_update.connect(
            self._session_preview_update)
        self.signaler.session_details.connect(self._update_session_details)
        self.signaler.scripted_dir.connect(self._scripted_dir)
        self.signaler.parrallel_copy_state.connect(self._parrallel_copy_state)
        self.signaler.parrallel_copy_progress.connect(
            self._parrallel_copy_progress)
        self.signaler.parrallel_copy_aborted.connect(
            self._parrallel_copy_aborted)
        self.signaler.other_session_renamed.connect(
            self._session_renamed_by_server)
        self.signaler.other_session_duplicated.connect(
            self._session_duplicated_by_server)
        self.signaler.other_session_templated.connect(
            self._session_templated_by_server)

        self.to_daemon('/ray/server/list_sessions', 0)

        self.ui.groupBoxProgress.setVisible(False)

        if not self.daemon_manager.is_local:
            self.ui.toolButtonFolder.setVisible(False)
            self.ui.currentSessionsFolder.setVisible(False)
            self.ui.labelSessionsFolder.setVisible(False)

        self._server_will_accept = False
        self._has_selection = False
        self._last_mouse_click = 0
        self._last_session_item = None

        self._server_status_changed(self.session.server_status)

        self._set_preview_scripted(False)

        self.folders = []
        self.all_items = []

        self.ui.filterBar.setFocus(Qt.OtherFocusReason)

        # snapshots related
        self.main_snap_group = SnapGroup()

        self._full_view = True
        self._set_full_sessions_view(False)

        self._current_parrallel_copy_id = 0
        self._corner_mode = CORNER_HIDDEN
        self._set_corner_group(CORNER_HIDDEN)

        self.ui.checkBoxSaveCurrentSession.setVisible(
            self.session.server_status == ray.ServerStatus.READY)
        self.ui.listWidgetPreview.server_status_changed(
            self.session.server_status)

        self._last_selected_session = ''
        self._listing_sessions = False
예제 #16
0
 def __init__(self, parent):
     ChildDialog.__init__(self, parent)
     self.ui = ui_snapshots_info.Ui_Dialog()
     self.ui.setupUi(self)
예제 #17
0
 def __init__(self, parent):
     ChildDialog.__init__(self, parent)
     self.ui = ui.ardour_convert.Ui_Dialog()
     self.ui.setupUi(self)