Пример #1
0
    def __init__(self, loop=None):
        """
        Constructor
        """

        Base.__init__(self)

        if getattr(self, "_debug", False):
            self._dbus_peer = NoService(self)
            return
        else:
            self._dbus_peer = self._dbus_connect()

        self._dbus.call_on_disconnection(self._dbus_disconnected)

        __decorators__.addActions(self)
Пример #2
0
    def _createUI(self, form):
        """
        This function creates the user interfaces from the XML form file
        """

        self._ui = _load_ui(form)
        self._settings = _Settings()
        
        if isinstance(self._ui, PyQtAbstractions.Qt.MainWindow)     \
                or isinstance(self._ui, PyQtAbstractions.Qt.Dialog) \
                or Qt.isPyKDE4 and isinstance(self._ui, PyQtAbstractions.Qt.Applet):

            self._ui._setParent(self)
            self._ui._restoreSettings()
            
            __decorators__.addActions(self)

        # Call the a user implemented method that can do any special UI bindings
        self._ui._connectUI()
        self._connectUI()