Beispiel #1
0
 def __init__(self, parent):
     super().__init__(parent)
     self.lo = QVBoxLayout()
     self.binder = Binder()
     # Allow the user to disable auto save
     if settings.auto_save:
         g_save_debouncer.action = self.binder.save
Beispiel #2
0
class Module:

    def __init__(self, **params):
        self.binder = Binder()

    def execute(self, id, **data):
        self.binder.execute(id, **data)
Beispiel #3
0
class ContentWidget(QWidget):
    """ The main, central widget for the QMainWindow. Most widgets are a child of this one. """

    def __init__(self, parent):
        super().__init__(parent)
        self.lo = QVBoxLayout()
        self.binder = Binder()
        # Allow the user to disable auto save
        if settings.auto_save:
            g_save_debouncer.action = self.binder.save

    def _show_layout(self):
        self.binder.load_workspace()
        self.lo.addWidget(self.binder)
        self.setLayout(self.lo)

    def show(self, workspace=None):
        super().show()
        # Initialize settings first
        # Set the workspace, if not provided
        if workspace is not None:
            settings.override("workspace_dir", workspace)

        if settings.asset_dir is None:
            settings.override("asset_dir", settings.workspace_dir)

        # Set the currently running application's directory, for convenience
        settings.application_dir = __file__.replace("main.py", "")
        icon_dir = settings.icon_path
        if icon_dir is None:
            icon_dir = path.join(settings.application_dir, "icons")

        # Initialize QIcon search paths and themes
        search_paths = QIcon.themeSearchPaths()
        search_paths.append(icon_dir)
        QIcon.setThemeSearchPaths(search_paths)
        QIcon.setFallbackThemeName(settings.fallback_theme_name)
        self._show_layout()
Beispiel #4
0
from binder import Binder

binder = Binder()
binder.parse_bindings()
binder.bind()
Beispiel #5
0
TRANSACTION_acquireMulticastLock = (FIRST_CALL_TRANSACTION + 25);
TRANSACTION_releaseMulticastLock = (FIRST_CALL_TRANSACTION + 26);
TRANSACTION_setWifiApEnabled = (FIRST_CALL_TRANSACTION + 27);
TRANSACTION_getWifiApEnabledState = (FIRST_CALL_TRANSACTION + 28);
TRANSACTION_getWifiApConfiguration = (FIRST_CALL_TRANSACTION + 29);
TRANSACTION_setWifiApConfiguration = (FIRST_CALL_TRANSACTION + 30);
TRANSACTION_startWifi = (FIRST_CALL_TRANSACTION + 31);
TRANSACTION_stopWifi = (FIRST_CALL_TRANSACTION + 32);
TRANSACTION_addToBlacklist = (FIRST_CALL_TRANSACTION + 33);
TRANSACTION_clearBlacklist = (FIRST_CALL_TRANSACTION + 34);
TRANSACTION_getWifiServiceMessenger = (FIRST_CALL_TRANSACTION + 35);
TRANSACTION_getWifiStateMachineMessenger = (FIRST_CALL_TRANSACTION + 36);
TRANSACTION_getConfigFile = (FIRST_CALL_TRANSACTION + 37);
TRANSACTION_captivePortalCheckComplete = (FIRST_CALL_TRANSACTION + 38);

mRemote = Binder(WIFI_SERVICE)

def transact(TRANSACTION):
    _data = Parcel()
    _reply = Parcel()
    _data.writeInterfaceToken(DESCRIPTOR)
    mRemote.transact(TRANSACTION, _data, _reply, 0)
    _reply.readExceptionCode()
    return _reply.readInt32()

def getConfiguredNetworks():
    pass
def addOrUpdateNetwork():
    pass
def removeNetwork():
    pass
Beispiel #6
0
 def __init__(self, **params):
     self.binder = Binder()
Beispiel #7
0
 def __init__(self, **params):
     self.binder = Binder()
Beispiel #8
0
class Module:
    def __init__(self, **params):
        self.binder = Binder()

    def execute(self, id, **data):
        self.binder.execute(id, **data)