{
    "version": 1,
    "supportedProjectTypes": [ ],
    "id": "Q.QtStudio.CustomCheckBox",
    "category": "H.StudioControlsFiles",
    "trDescription": "Creates a UI file (.ui.qml) that defines a custom checkbox, which can be styled.",
    "trDisplayName": "Custom CheckBox",
    "trDisplayCategory": "Qt Quick Controls",
    "icon": "custom_checkbox.png",
    "platformIndependent": true,

    "options":
        [
        { "key": "QmlFile", "value": "%{Class}.%{JS: Util.preferredSuffix('application/x-qt.ui+qml')}" },
        { "key": "ApplicationImport", "value": "%{QmlProjectName} 1.0" }
    ],

    "pages" :
        [
        {
            "trDisplayName": "Define Class",
            "trShortTitle": "Details",
            "typeId": "Fields",
            "data" :
                [
                {
                    "name": "Class",
                    "trDisplayName": "Component name:",
                    "mandatory": true,
                    "type": "LineEdit",
                    "data": {
                        "validator": "(?:[A-Z_][a-zA-Z_0-9]*|)",
                        "fixup": "%{JS: '%{INPUT}'.charAt(0).toUpperCase() + '%{INPUT}'.slice(1) }"
                    }
                },
                {
                    "name": "TargetPath",
                    "type": "PathChooser",
                    "trDisplayName": "Path:",
                    "mandatory": true,
                    "data":
                    {
                        "kind": "existingDirectory",
                        "basePath": "%{InitialPath}",
                        "path": "%{InitialPath}"
                    }
                }
            ]
        }
    ],
    "generators" :
        [
        {
            "typeId": "File",
            "data":
            {
                "source": "file.qml.tpl",
                "target": "%{TargetPath}/%{QmlFile}",
                "openInEditor": true
            }
        }
    ]
}
