Beispiel #1
0
    def __init__(self, filePath):
        super(AnimationListTabbedEditor, self).__init__(animation_list_compatibility.manager, filePath)

        messages.warning(None, self, "Animation List Editor is experimental!",
                         "This part of CEED is not considered to be ready for "
                         "production. You have been warned. If everything "
                         "breaks you get to keep the pieces!",
                         "animation_list_editor_experimental")

        self.requiresProject = True

        self.visual = visual.VisualEditing(self)
        self.addTab(self.visual, "Visual")

        self.code = code.CodeEditing(self)
        self.addTab(self.code, "Code")

        self.tabWidget = self
Beispiel #2
0
    def __init__(self, filePath):
        super(LookNFeelTabbedEditor,
              self).__init__(looknfeel_compatibility.manager, filePath)

        messages.warning(
            None, self, "LookNFeel Editor is experimental!",
            "This part of CEED is not considered to be ready for "
            "production. You have been warned. If everything "
            "breaks you get to keep the pieces!",
            "looknfeel_editor_experimental")

        self.editorIDString = self.getEditorIDStringPrefix() + str(id(self))

        self.requiresProject = True

        # The name of the widget we are targeting for editing
        self.targetWidgetLook = ""

        self.visual = visual.LookNFeelVisualEditing(self)
        self.addTab(self.visual, "Visual")

        self.code = code.CodeEditing(self)
        self.addTab(self.code, "Code")

        self.nameMappingsOfOwnedWidgetLooks = []

        # Look n' Feel Previewer is not actually an edit mode, you can't edit the Look n' Feel from it,
        # however for everything to work smoothly we do push edit mode changes to it to the
        # undo stack.
        #
        # TODO: This could be improved at least a little bit if 2 consecutive edit mode changes
        #       looked like this: A->Preview, Preview->C.  We could simply turn this into A->C,
        #       and if A = C it would eat the undo command entirely.
        self.previewer = preview.LookNFeelPreviewer(self)
        self.addTab(self.previewer, "Live Preview")

        self.tabWidget = self

        # set the toolbar icon size according to the setting and subscribe to it
        self.tbIconSizeEntry = settings.getEntry("global/ui/toolbar_icon_size")
        self.updateToolbarSize(self.tbIconSizeEntry.value)
        self.tbIconSizeCallback = lambda value: self.updateToolbarSize(value)
        self.tbIconSizeEntry.subscribe(self.tbIconSizeCallback)
Beispiel #3
0
    def __init__(self, filePath):
        super(LookNFeelTabbedEditor, self).__init__(looknfeel_compatibility.manager, filePath)

        messages.warning(None, self, "LookNFeel Editor is experimental!",
                         "This part of CEED is not considered to be ready for "
                         "production. You have been warned. If everything "
                         "breaks you get to keep the pieces!",
                         "looknfeel_editor_experimental")

        self.editorIDString = self.getEditorIDStringPrefix() + str(id(self))

        self.requiresProject = True

        # The name of the widget we are targeting for editing
        self.targetWidgetLook = ""

        self.visual = visual.LookNFeelVisualEditing(self)
        self.addTab(self.visual, "Visual")

        self.code = code.CodeEditing(self)
        self.addTab(self.code, "Code")

        self.nameMappingsOfOwnedWidgetLooks = []

        # Look n' Feel Previewer is not actually an edit mode, you can't edit the Look n' Feel from it,
        # however for everything to work smoothly we do push edit mode changes to it to the
        # undo stack.
        #
        # TODO: This could be improved at least a little bit if 2 consecutive edit mode changes
        #       looked like this: A->Preview, Preview->C.  We could simply turn this into A->C,
        #       and if A = C it would eat the undo command entirely.
        self.previewer = preview.LookNFeelPreviewer(self)
        self.addTab(self.previewer, "Live Preview")

        self.tabWidget = self

        # set the toolbar icon size according to the setting and subscribe to it
        self.tbIconSizeEntry = settings.getEntry("global/ui/toolbar_icon_size")
        self.updateToolbarSize(self.tbIconSizeEntry.value)
        self.tbIconSizeCallback = lambda value: self.updateToolbarSize(value)
        self.tbIconSizeEntry.subscribe(self.tbIconSizeCallback)