Esempio n. 1
0
    def __init__(self, *args, **kwargs):
        """
        Engine Constructor
        """
        self._qt_app = None
        self._dcc_app = None
        self._menu_generator = None

        Engine.__init__(self, *args, **kwargs)
Esempio n. 2
0
    def show_modal(self, title, bundle, widget_class, *args, **kwargs):
        """
        Shows a modal dialog window in a way suitable for this engine. The engine will attempt to
        integrate it as seamlessly as possible into the host application. This call is blocking 
        until the user closes the dialog.
        
        :param title: The title of the window
        :param bundle: The app, engine or framework object that is associated with this window
        :param widget_class: The class of the UI to be constructed. This must derive from QWidget.
        
        Additional parameters specified will be passed through to the widget_class constructor.

        :returns: (a standard QT dialog status return code, the created widget_class instance)
        """
        if not self._has_qt:
            self.log_error(
                "Cannot show dialog %s! No QT support appears to exist in this engine. "
                "In order for the shell engine to run UI based apps, either pyside "
                "or PyQt needs to be installed in your system." % title)
            return

        self._ui_created = True

        return Engine.show_modal(self, title, bundle, widget_class, *args,
                                 **kwargs)
Esempio n. 3
0
    def show_dialog(self, title, bundle, widget_class, *args, **kwargs):
        """
        Shows a non-modal dialog window in a way suitable for this engine.
        The engine will attempt to parent the dialog nicely to the host application.

        :param title: The title of the window
        :param bundle: The app, engine or framework object that is associated with
            this window
        :param widget_class: The class of the UI to be constructed. This must derive
            from QWidget.

        Additional parameters specified will be passed through to the widget_class
            constructor.

        :returns: the created widget_class instance
        """
        if not self._has_qt:
            self.log_error(
                "Cannot show dialog %s! No QT support appears to exist in this engine. "
                "In order for the shell engine to run UI based apps, either pyside "
                "or PyQt needs to be installed in your system." % title
            )
            return

        self._ui_created = True

        return Engine.show_dialog(self, title, bundle, widget_class, *args, **kwargs)
Esempio n. 4
0
 def show_dialog(self, title, bundle, widget_class, *args, **kwargs):
     """
     Shows a non-modal dialog window in a way suitable for this engine. 
     The engine will attempt to parent the dialog nicely to the host application.
     
     :param title: The title of the window
     :param bundle: The app, engine or framework object that is associated with this window
     :param widget_class: The class of the UI to be constructed. This must derive from QWidget.
     
     Additional parameters specified will be passed through to the widget_class constructor.
     
     :returns: the created widget_class instance
     """
     self._has_received_ui_creation_requests = True
     return Engine.show_dialog(self, title, bundle, widget_class, *args, **kwargs)    
Esempio n. 5
0
    def show_modal(self, title, bundle, widget_class, *args, **kwargs):
        """
        Shows a modal dialog window in a way suitable for this engine. The engine will attempt to
        integrate it as seamlessly as possible into the host application. This call is blocking 
        until the user closes the dialog.
        
        :param title: The title of the window
        :param bundle: The app, engine or framework object that is associated with this window
        :param widget_class: The class of the UI to be constructed. This must derive from QWidget.
        
        Additional parameters specified will be passed through to the widget_class constructor.

        :returns: (a standard QT dialog status return code, the created widget_class instance)
        """
        self._has_received_ui_creation_requests = True
        return Engine.show_modal(self, title, bundle, widget_class, *args, **kwargs)
Esempio n. 6
0
 def show_dialog(self, title, bundle, widget_class, *args, **kwargs):
     """
     Shows a non-modal dialog window in a way suitable for this engine. 
     The engine will attempt to parent the dialog nicely to the host application.
     
     :param title: The title of the window
     :param bundle: The app, engine or framework object that is associated with this window
     :param widget_class: The class of the UI to be constructed. This must derive from QWidget.
     
     Additional parameters specified will be passed through to the widget_class constructor.
     
     :returns: the created widget_class instance
     """
     self._has_received_ui_creation_requests = True
     return Engine.show_dialog(self, title, bundle, widget_class, *args,
                               **kwargs)
Esempio n. 7
0
    def show_modal(self, title, bundle, widget_class, *args, **kwargs):
        """
        Shows a modal dialog window in a way suitable for this engine. The engine will attempt to
        integrate it as seamlessly as possible into the host application. This call is blocking 
        until the user closes the dialog.
        
        :param title: The title of the window
        :param bundle: The app, engine or framework object that is associated with this window
        :param widget_class: The class of the UI to be constructed. This must derive from QWidget.
        
        Additional parameters specified will be passed through to the widget_class constructor.

        :returns: (a standard QT dialog status return code, the created widget_class instance)
        """
        self._has_received_ui_creation_requests = True
        return Engine.show_modal(self, title, bundle, widget_class, *args,
                                 **kwargs)
Esempio n. 8
0
 def show_dialog(self, title, bundle, widget_class, *args, **kwargs):
     """
     Shows a non-modal dialog window in a way suitable for this engine. 
     The engine will attempt to parent the dialog nicely to the host application.
     
     :param title: The title of the window
     :param bundle: The app, engine or framework object that is associated with this window
     :param widget_class: The class of the UI to be constructed. This must derive from QWidget.
     
     Additional parameters specified will be passed through to the widget_class constructor.
     
     :returns: the created widget_class instance
     """
     if not self._has_qt:
         self.log_error("Cannot show dialog %s! No QT support appears to exist in this engine. "
                        "In order for the shell engine to run UI based apps, either pyside "
                        "or PyQt needs to be installed in your system." % title)
         return
     
     self._ui_created = True
     
     return Engine.show_dialog(self, title, bundle, widget_class, *args, **kwargs)    
Esempio n. 9
0
    def show_modal(self, title, bundle, widget_class, *args, **kwargs):
        """
        Shows a modal dialog window in a way suitable for this engine. The engine will attempt to
        integrate it as seamlessly as possible into the host application. This call is blocking 
        until the user closes the dialog.
        
        :param title: The title of the window
        :param bundle: The app, engine or framework object that is associated with this window
        :param widget_class: The class of the UI to be constructed. This must derive from QWidget.
        
        Additional parameters specified will be passed through to the widget_class constructor.

        :returns: (a standard QT dialog status return code, the created widget_class instance)
        """
        if not self._has_qt:
            self.log_error("Cannot show dialog %s! No QT support appears to exist in this engine. "
                           "In order for the shell engine to run UI based apps, either pyside "
                           "or PyQt needs to be installed in your system." % title)
            return

        self._ui_created = True
        
        return Engine.show_modal(self, title, bundle, widget_class, *args, **kwargs)
Esempio n. 10
0
 def __init__(self, *args, **kwargs):
     """
     Engine Constructor
     """
     self._dock_widgets = []
     Engine.__init__(self, *args, **kwargs)