Skip to content

Multi Profile Support #14

@SSgumS

Description

@SSgumS

User can save settings as profile for the script and load them and choose default between them

settings.json should refactor to this format too:

{
    "Default Profile": "Ali Fav",
    "Profiles": [
        {
            "Name": "Default",
            "Line Filter": {
                "Line Type": "Selected"
            },
            "Controls": [
                {
                    "name": "label1",
                    "x": 0,
                    "label": "Direction:",
                    "y": 0,
                    "class": "label",
                    "height": 1,
                    "width": 1
                },
                {
                    "x": 1,
                    "y": 0,
                    "class": "dropdown",
                    "items": [
                        "Horizontal",
                        "Vertical",
                        "Slant",
                        "Oval"
                    ],
                    "hint": "",
                    "value": "Horizontal",
                    "width": 1,
                    "name": "dropdown1",
                    "height": 1
                },
                {
                    "max": 1000000,
                    "x": 2,
                    "y": 0,
                    "class": "floatedit",
                    "min": -1000000,
                    "hint": "The angle:\n in case you are selecting Slant",
                    "value": 45,
                    "step": 0.01,
                    "width": 1,
                    "name": "floatedit1",
                    "height": 1
                }
            ]
        },
        {
            "Name": "Ali Fav",
            "Line Filter": {
                "Line Type": "Selected",
                "Filter Type": "Style",
                "Filter Term": "Mohsen"
            },
            "Controls": [
                {
                    "name": "label1",
                    "x": 0,
                    "label": "Direction:",
                    "y": 0,
                    "class": "label",
                    "height": 1,
                    "width": 1
                },
                {
                    "x": 1,
                    "y": 0,
                    "class": "dropdown",
                    "items": [
                        "Horizontal",
                        "Vertical",
                        "Slant",
                        "Oval"
                    ],
                    "hint": "",
                    "value": "Horizontal",
                    "width": 1,
                    "name": "dropdown1",
                    "height": 1
                },
                {
                    "max": 1000000,
                    "x": 2,
                    "y": 0,
                    "class": "floatedit",
                    "min": -1000000,
                    "hint": "The angle:\n in case you are selecting Slant",
                    "value": 45,
                    "step": 0.01,
                    "width": 1,
                    "name": "floatedit1",
                    "height": 1
                }
            ]
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions