forked from qt-creator/qt-creator
Doc: Update info about custom wizards
Some option values in the wizard used as an example have changed and some new options have been added. Task-number: QTCREATORBUG-26610 Change-Id: I7cf3f5f6d45e4854e547a2fd2bb41b24642578ae Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -176,7 +176,7 @@
|
|||||||
"trDescription": "Creates a C++ header and a source file for a new class that you can add to a C++ project.",
|
"trDescription": "Creates a C++ header and a source file for a new class that you can add to a C++ project.",
|
||||||
"trDisplayName": "C++ Class",
|
"trDisplayName": "C++ Class",
|
||||||
"trDisplayCategory": "C++",
|
"trDisplayCategory": "C++",
|
||||||
"icon": "../../global/genericfilewizard.png",
|
"iconText": "h/cpp",
|
||||||
"enabled": "%{JS: value('Plugins').indexOf('CppEditor') >= 0}",
|
"enabled": "%{JS: value('Plugins').indexOf('CppEditor') >= 0}",
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
@@ -203,7 +203,13 @@
|
|||||||
\li \c icon appears next to the \c trDisplayName in the middle
|
\li \c icon appears next to the \c trDisplayName in the middle
|
||||||
panel when \c trDisplayCategory is selected. We recommend
|
panel when \c trDisplayCategory is selected. We recommend
|
||||||
that you specify the path relative to the wizard.json file,
|
that you specify the path relative to the wizard.json file,
|
||||||
but you can also use an absolute path.
|
but you can also use an absolute path. Omit this value to
|
||||||
|
use the default icon for the wizard type.
|
||||||
|
|
||||||
|
\li \c iconText determines the text overlay for the default
|
||||||
|
file icon.
|
||||||
|
|
||||||
|
\li \c iconKind determines whether the icon is themed.
|
||||||
|
|
||||||
\li \c image specifies a path to an image (for example a
|
\li \c image specifies a path to an image (for example a
|
||||||
screenshot) that appears below the \c trDescription.
|
screenshot) that appears below the \c trDescription.
|
||||||
@@ -281,8 +287,12 @@
|
|||||||
"trDisplayName": "Class name:",
|
"trDisplayName": "Class name:",
|
||||||
"mandatory": true,
|
"mandatory": true,
|
||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"data": { "validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)+[a-zA-Z_][a-zA-Z_0-9]*|)" }
|
"data": {
|
||||||
},
|
"trPlaceholder": "Fully qualified name, including namespaces",
|
||||||
|
"validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)",
|
||||||
|
"completion": "namespaces"
|
||||||
|
}
|
||||||
|
},
|
||||||
...
|
...
|
||||||
]
|
]
|
||||||
\endcode
|
\endcode
|
||||||
@@ -335,11 +345,19 @@
|
|||||||
"source": "file.h",
|
"source": "file.h",
|
||||||
"target": "%{HdrPath}",
|
"target": "%{HdrPath}",
|
||||||
"openInEditor": true
|
"openInEditor": true
|
||||||
|
"options": [
|
||||||
|
{ "key": "Cpp:License:FileName", "value": "%{HdrFileName}" },
|
||||||
|
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "file.cpp",
|
"source": "file.cpp",
|
||||||
"target": "%{SrcPath}",
|
"target": "%{SrcPath}",
|
||||||
"openInEditor": true
|
"openInEditor": true
|
||||||
|
"options": [
|
||||||
|
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" },
|
||||||
|
{ "key": "Cpp:License:ClassName", "value": "%{CN}" }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
\endcode
|
\endcode
|
||||||
@@ -410,7 +428,11 @@
|
|||||||
"trDisplayName": "Class name:",
|
"trDisplayName": "Class name:",
|
||||||
"mandatory": true,
|
"mandatory": true,
|
||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"data": { "validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)+[a-zA-Z_][a-zA-Z_0-9]*|)" }
|
"data": {
|
||||||
|
"trPlaceholder": "Fully qualified name, including namespaces",
|
||||||
|
"validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)",
|
||||||
|
"completion": "namespaces"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
...
|
...
|
||||||
],
|
],
|
||||||
@@ -776,7 +798,11 @@
|
|||||||
"trDisplayName": "Class name:",
|
"trDisplayName": "Class name:",
|
||||||
"mandatory": true,
|
"mandatory": true,
|
||||||
"type": "LineEdit",
|
"type": "LineEdit",
|
||||||
"data": { "validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)+[a-zA-Z_][a-zA-Z_0-9]*|)" }
|
"data": {
|
||||||
|
"trPlaceholder": "Fully qualified name, including namespaces",
|
||||||
|
"validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)",
|
||||||
|
"completion": "namespaces"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "BaseEdit",
|
"name": "BaseEdit",
|
||||||
@@ -787,8 +813,7 @@
|
|||||||
{
|
{
|
||||||
"trText": "%{BaseCB}",
|
"trText": "%{BaseCB}",
|
||||||
"trDisabledText": "%{BaseCB}",
|
"trDisabledText": "%{BaseCB}",
|
||||||
"historyId": "EditValues",
|
"completion": "classes"
|
||||||
"restoreLastHistoryItem": false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
\endcode
|
\endcode
|
||||||
@@ -799,6 +824,11 @@
|
|||||||
|
|
||||||
\li \c trDisabledText specifies the text to display in a disabled field.
|
\li \c trDisabledText specifies the text to display in a disabled field.
|
||||||
|
|
||||||
|
\li \c completion lists existing \c namespaces for the class name line
|
||||||
|
edit and existing \c classes for the base class line edit. This
|
||||||
|
value replaces the history completer that is usually available for
|
||||||
|
such fields.
|
||||||
|
|
||||||
\li \c trPlaceholder specifies the placeholder text.
|
\li \c trPlaceholder specifies the placeholder text.
|
||||||
|
|
||||||
\li \c validator specifies a QRegularExpression to validate the line
|
\li \c validator specifies a QRegularExpression to validate the line
|
||||||
@@ -812,7 +842,8 @@
|
|||||||
contains a password, which will be masked.
|
contains a password, which will be masked.
|
||||||
|
|
||||||
\li \c historyId is a key that specifies the name for a list of items
|
\li \c historyId is a key that specifies the name for a list of items
|
||||||
for the history completer.
|
for the history completer. This value and \c completion are
|
||||||
|
mutually exclusive, so do not set both of them at the same time.
|
||||||
|
|
||||||
\li \c restoreLastHistoryItem is a boolean that specifies that the
|
\li \c restoreLastHistoryItem is a boolean that specifies that the
|
||||||
last history item is automatically set as the default text in
|
last history item is automatically set as the default text in
|
||||||
|
Reference in New Issue
Block a user