def __init__(self, parentWindow, deadlineService: DeadlineService):
        super().__init__("Deadline Service", parentWindow,
                         asset_manager.getUIFilePath("deadlineService.ui"))

        self.dbManager = None
        self.deadlineService: DeadlineService = deadlineService
        self.logger = logging.getLogger(__name__)

        self.widget.refreshConnectionButton.clicked.connect(
            self.onRefreshConnectionButtonClick)
        self.widget.installPluginButton.clicked.connect(
            self.onInstallPluginClick)

        textAppendLoggingHandler = QtTextAppendLoggingHandler(
            self.widget.logEdit)
        self.logger.addHandler(textAppendLoggingHandler)
        self.deadlineService.logger.addHandler(textAppendLoggingHandler)

        self.availablePluginsMap = {
            "3ds Max Pipeline Plugin": "3dsMaxPipeline",
            "Metadata Manager Plugin": "MetadataManager"
        }

        for key in self.availablePluginsMap.keys():
            self.widget.installPluginComboBox.addItem(key)
Ejemplo n.º 2
0
    def __init__(self, app, appInfo : AppInfo, serviceRegistry : ServiceRegistry, bootstrapper):
        super(MainWindowManager, self).__init__()
        self.app = app
        self.appInfo = appInfo
        self.currentStyle = None
        self.documentMoficiations = []
        self.dockWidgets : List[DockWidget] = []
        self.serviceRegistry = serviceRegistry
        self.dbManager = self.serviceRegistry.dbManager
        self.bootstrapper = bootstrapper

        # Load the main window ui
        file = QtCore.QFile(asset_manager.getUIFilePath("main.ui"))
        file.open(QtCore.QFile.ReadOnly)
        loader = QtUiTools.QUiLoader()
        self.window = loader.load(file)

        self.setStyle(Style.Light)

        self.initTable()

        self.initViewers()

        self.setupDockWidgets()
        self.setupEventAndActionHandlers()

        self.restoreState()
Ejemplo n.º 3
0
    def __init__(self, parentWindow, dbManager: MongoDBManager):
        super().__init__("Collection Viewer", parentWindow,
                         asset_manager.getUIFilePath("collectionManager.ui"))
        self.dbManager = dbManager
        self.collectionCheckBoxMap = dict()

        self.collectionsLayout.setAlignment(QtCore.Qt.AlignTop)
        self.widget.collectionPropertiesVBox.setAlignment(QtCore.Qt.AlignTop)

        self.collectionsComboBox.currentIndexChanged.connect(
            self.onCollectionsComboBoxIndexChanged)

        self.collectionHeaderKeyInfos = []

        self.collectionTableWidget: QTableWidget = self.widget.collectionPropertiesTableWidget
        self.updateCollections()

        self.headerUpdatedEvent = Event()
Ejemplo n.º 4
0
    def __init__(self, parentWindow):
        super().__init__("Preview", parentWindow, asset_manager.getUIFilePath("previewViewer.ui"))

        self.preview = PhotoViewer(self.widget)
        self.preview.toggleDragMode()
        self.widget.previewFrame.layout().addWidget(self.preview)
        self.widget.playButton.clicked.connect(self.onPlay)
        self.widget.pauseButton.clicked.connect(self.onPause)
        self.widget.nextFrameButton.clicked.connect(self.onNextFrame)
        self.widget.previousFrameButton.clicked.connect(self.onPreviousFrame)
        self.widget.selectBackgroundColorButton.clicked.connect(self.selectBackgroundColor)

        self.curFrameIdx = 0
        self.frames = []

        self.widget.animationSpeedSlider.valueChanged.connect(self.onAnimationSpeedSliderChanged)

        self.animationTimer = QtCore.QTimer()
        self.animationTimer.setInterval(self.widget.animationSpeedSlider.maximum() - self.widget.animationSpeedSlider.value() + 1)
        self.animationTimer.timeout.connect(self.onUpdateAnimation)
Ejemplo n.º 5
0
    def __init__(self, parentWindow, actionManager: ActionManager,
                 dbManager: MongoDBManager):
        super().__init__("Actions Manager", parentWindow,
                         asset_manager.getUIFilePath("actionManager.ui"))

        self.actionManager: ActionManager = actionManager
        self.dbManager: MongoDBManager = dbManager

        # Setup the tree view:
        self.actionsTreeView = self.widget.actionsTreeView
        self.actionsTreeModel = QStandardItemModel(self.widget)
        self.actionsTreeView.setModel(self.actionsTreeModel)

        self.widget.collectionActionsListView = CollectionActionListView(
            self.widget.scrollArea, self)
        self.collectionActionsListView = self.widget.collectionActionsListView

        self.collectionActionsListView.setDragEnabled(True)
        self.collectionActionsListView.setDragDropMode(
            QAbstractItemView.DropOnly)
        self.collectionActionsListView.setMaximumSize(100000, 100000)
        self.collectionActionsListView.setSizePolicy(
            QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding)

        self.collectionActionsListModel = QStandardItemModel(self.widget)
        self.collectionActionsListView.setModel(
            self.collectionActionsListModel)

        self.widget.collectionComboBox.currentIndexChanged.connect(
            self.onCollectionSelectionChanged)

        self.widget.deleteCollectionActionButton.clicked.connect(
            self.onDeleteCollectionActionButtonClick)

        self.refreshTreeView()
        self.refreshCollectionView()

        self.actionManager.registerActionEvent.subscribe(
            lambda action: self.refreshTreeView())
Ejemplo n.º 6
0
    def __init__(self, parentWindow, serviceRegistry):
        super().__init__("Services", parentWindow,
                         asset_manager.getUIFilePath("services.ui"))

        self.serviceManager = serviceRegistry.serviceManager
        self.serviceRegistry = serviceRegistry
        # Maps service class to viewer
        self.serviceViewerClassMap: dict = dict()
        self.currentServiceViewer: ServiceViewer = None

        menuBar = QtWidgets.QMenuBar()
        fileMenu = QtWidgets.QMenu("File")
        menuBar.addMenu(fileMenu)

        self.newServiceAction = QtWidgets.QAction("New Service")
        self.newServiceAction.setShortcut(QtGui.QKeySequence.New)
        self.newServiceAction.triggered.connect(self.onCreateNewService)
        fileMenu.addAction(self.newServiceAction)

        self.widget.mainFrame.layout().insertWidget(0, menuBar)

        self.servicesTableWidget: QtWidgets.QTableWidget = self.widget.servicesTableWidget
        self.servicesTableWidget.setColumnCount(3)
        self.servicesTableWidget.setHorizontalHeaderLabels(
            ['Name', 'Description', 'Status'])

        self.serviceFilterLineEdit: QtWidgets.QLineEdit = self.widget.serviceFilterLineEdit
        self.serviceFilterLineEdit.returnPressed.connect(
            self.updateServiceList)

        self.registerServiceViewerClass(WatchDogService, WatchDogServiceViewer)

        self.updateServiceList()

        self.serviceManager.serviceStatusChangedEvent.subscribe(
            self.onServiceStatusChanged)

        self.setupServicesTableWidgetContextMenu()
Ejemplo n.º 7
0
    def __init__(self, parentWindow, environmentManager: EnvironmentManager,
                 dbManager: MongoDBManager, settings):
        super().__init__("Environment Manager", parentWindow,
                         asset_manager.getUIFilePath("environmentManager.ui"))

        self.autoExportPath: str = None
        self.environmentManager: EnvironmentManager = environmentManager
        self.dbManager: MongoDBManager = dbManager
        self.settings = settings

        self.widget.addButton.clicked.connect(self.onAddKeyValue)

        self.environmentsComboBox: QtWidgets.QComboBox = self.widget.environmentsComboBox
        self.setupEnvironmentComboBox()

        self.settingsTableView: QtWidgets.QTableView = self.widget.settingsTableView
        self.settingsTable = SimpleTableModel(self.settingsTableView,
                                              ["Key", "Value"])
        self.settingsTableView.setModel(self.settingsTable)

        self.currentEnvironment = None

        self.widget.archiveEnvironmentButton.clicked.connect(
            self.onArchiveEnvironment)

        self.widget.chooseFileButton.clicked.connect(self.onChooseFile)
        self.widget.chooseDirButton.clicked.connect(self.onChooseDir)

        self.settingsTableView.doubleClicked.connect(
            self.onTableViewDoubleClicked)

        self.widget.selectValueFileInExplorerButton.clicked.connect(
            self.onSelectValueFileInExplorerButton)
        self.widget.deleteEntryButton.clicked.connect(self.onDeleteEntry)

        self.addMenuBar()
        self.refreshEnvironmentsComboBox()
Ejemplo n.º 8
0
    def __init__(self, app: QApplication, appInfo: AppInfo,
                 parentLogger: logging.Logger, bootstrapper):
        super().__init__()
        self.app = app
        self.appInfo = appInfo
        self.bootstrapper = bootstrapper

        file = QtCore.QFile(asset_manager.getUIFilePath("loader.ui"))
        file.open(QtCore.QFile.ReadOnly)
        loader = QtUiTools.QUiLoader()
        self.window = loader.load(file)

        self.window.setWindowFlags(QtCore.Qt.FramelessWindowHint)
        self.window.setStyleSheet(
            "background:transparent; border-image: url(./assets/images/bg.png) 0 0 0 0 stretch stretch;"
        )
        self.window.setAttribute(QtCore.Qt.WA_TranslucentBackground)
        self.window.setFixedSize(300, 100)
        self.window.statusLabel.setStyleSheet("QLabel { color : white; }")

        parentLogger.addHandler(QtTextLoggingHandler(self.window.statusLabel))

        self.window.show()
        self.window.installEventFilter(self)
Ejemplo n.º 9
0
 def __init__(self, parentWindow):
     super().__init__("Settings", parentWindow,
                      asset_manager.getUIFilePath("settings.ui"))
Ejemplo n.º 10
0
 def __init__(self, parentWindow, dbManager : MongoDBManager):
     super().__init__("Inspector", parentWindow, asset_manager.getUIFilePath("inspector.ui"))
     
     self.dbManager = dbManager