Exemple #1
0
    def __init__(self,
                 moduleName,
                 moduleInfo,
                 isView=False,
                 wasRequested=False,
                 *args,
                 **kwargs):
        super(ListHandler, self).__init__(
            moduleInfo.get("visibleName", moduleInfo["name"]),
            moduleInfo.get("icon", "icons/modules/list.svg"),
            path=moduleName + "/list" if not wasRequested else None)

        self.moduleName = moduleName
        self.moduleInfo = moduleInfo

        self.mode = moduleInfo.get("mode", "normal")
        assert self.mode in ["normal", "hidden", "group"]

        self.wasRequested = wasRequested
        self.requestedViews = None

        if self.mode == "hidden" or moduleInfo.get("hideInMainBar", False):
            self.hide()
        elif "views" in self.moduleInfo:
            #DeferredCall(self._buildViewPanes, self.moduleInfo["views"])
            self._buildViewPanes(self.moduleInfo["views"])

        if not isView:
            initialHashHandler.insert(1, self.canHandleInitialHash,
                                      self.handleInitialHash)
Exemple #2
0
    def __init__(self, moduleName, moduleInfo, isView=False, *args, **kwargs):
        icon = "icons/modules/list.svg"
        if "icon" in moduleInfo.keys():
            icon = moduleInfo["icon"]

        super(ListHandler,
              self).__init__(moduleInfo.get("visibleName", moduleInfo["name"]),
                             icon)

        self.moduleName = moduleName
        self.moduleInfo = moduleInfo
        self.mode = moduleInfo.get("mode", "normal")
        assert self.mode in ["normal", "hidden", "group"]
        self.requestedViews = None

        if self.mode == "hidden" or moduleInfo.get("hideInMainBar", False):
            self.hide()

        else:
            if "views" in moduleInfo:
                self._buildViewPanes(moduleInfo["views"])

        if not isView:
            initialHashHandler.insert(1, self.canHandleInitialHash,
                                      self.handleInitialHash)
Exemple #3
0
	def __init__(self, moduleName, moduleInfo, *args, **kwargs):
		icon = "icons/modules/hierarchy.svg"
		if "icon" in moduleInfo.keys():
			icon = moduleInfo["icon"]

		super(HierarchyHandler, self).__init__(moduleInfo["visibleName"], icon)

		if "hideInMainBar" in moduleInfo.keys() and moduleInfo["hideInMainBar"]:
			self["style"]["display"] = "none"

		self.moduleName = moduleName

		initialHashHandler.insert(1, self.canHandleInitialHash, self.handleInitialHash)
Exemple #4
0
    def __init__(self, moduleName, moduleInfo, *args, **kwargs):
        super(SingletonHandler, self).__init__(
            moduleInfo["visibleName"],
            moduleInfo.get("icon", "icons/modules/singleton.svg"))

        self.moduleName = moduleName
        self.moduleInfo = moduleInfo

        if "hideInMainBar" in moduleInfo.keys(
        ) and moduleInfo["hideInMainBar"]:
            self["style"]["display"] = "none"

        initialHashHandler.insert(1, self.canHandleInitialHash,
                                  self.handleInitialHash)