Finally got rid of the camelCase2Readable Utils function.
All checks were successful
continuous-integration/drone/push Build is passing
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
1
assets/icons/properties/displayMode.svg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../common/appearance.svg
|
1
assets/icons/properties/displayStyle.svg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../common/appearance.svg
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
1
assets/icons/properties/labelPosition.svg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../common/arrow.svg
|
1
assets/icons/properties/labelX.svg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../common/position.svg
|
1
assets/icons/properties/om_0.svg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../common/angle.svg
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
1
assets/icons/properties/phase.svg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../common/angle.svg
|
1
assets/icons/properties/pointStyle.svg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../common/appearance.svg
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
1
assets/icons/properties/targetElement.svg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../common/target.svg
|
1
assets/icons/properties/targetValuePosition.svg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../common/position.svg
|
1
assets/icons/properties/text.svg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../common/label.svg
|
1
assets/icons/properties/unit.svg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../common/angle.svg
|
1
assets/icons/properties/x.svg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../common/position.svg
|
1
assets/icons/properties/y.svg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../common/position.svg
|
|
@ -1 +0,0 @@
|
||||||
../../common/appearance.svg
|
|
|
@ -1 +0,0 @@
|
||||||
../../common/appearance.svg
|
|
|
@ -1 +0,0 @@
|
||||||
../../common/arrow.svg
|
|
|
@ -1 +0,0 @@
|
||||||
../../common/position.svg
|
|
|
@ -1 +0,0 @@
|
||||||
../../common/angle.svg
|
|
|
@ -1 +0,0 @@
|
||||||
../../common/appearance.svg
|
|
|
@ -1 +0,0 @@
|
||||||
../../common/target.svg
|
|
|
@ -1 +0,0 @@
|
||||||
../../common/position.svg
|
|
|
@ -1 +0,0 @@
|
||||||
../../common/label.svg
|
|
|
@ -1 +0,0 @@
|
||||||
../../common/angle.svg
|
|
|
@ -1 +0,0 @@
|
||||||
../../common/position.svg
|
|
|
@ -1 +0,0 @@
|
||||||
../../common/position.svg
|
|
|
@ -1 +0,0 @@
|
||||||
../../common/angle.svg
|
|
|
@ -401,18 +401,6 @@ export function parseName(str, removeUnallowed = true) {
|
||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Transforms camel case strings to a space separated one.
|
|
||||||
*
|
|
||||||
* @deprecated
|
|
||||||
* @param {string} label - Camel case to parse
|
|
||||||
* @returns {string} Parsed label.
|
|
||||||
*/
|
|
||||||
export function camelCase2readable(label) {
|
|
||||||
let parsed = parseName(label, false)
|
|
||||||
return parsed.charAt(0).toLatinUppercase() + parsed.slice(1).replace(/([A-Z])/g, " $1")
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a randomized color string.
|
* Creates a randomized color string.
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
|
|
|
@ -104,7 +104,7 @@ def get_platform_qt_style(os) -> str:
|
||||||
def register_icon_directories() -> None:
|
def register_icon_directories() -> None:
|
||||||
icon_fallbacks = QIcon.fallbackSearchPaths()
|
icon_fallbacks = QIcon.fallbackSearchPaths()
|
||||||
base_icon_path = path.join(logarithmplotter_path, "qml", "eu", "ad5001", "LogarithmPlotter", "icons")
|
base_icon_path = path.join(logarithmplotter_path, "qml", "eu", "ad5001", "LogarithmPlotter", "icons")
|
||||||
paths = [["common"], ["objects"], ["history"], ["settings"], ["settings", "custom"]]
|
paths = [["common"], ["objects"], ["history"], ["settings"], ["properties"]]
|
||||||
for p in paths:
|
for p in paths:
|
||||||
icon_fallbacks.append(path.realpath(path.join(base_icon_path, *p)))
|
icon_fallbacks.append(path.realpath(path.join(base_icon_path, *p)))
|
||||||
QIcon.setFallbackSearchPaths(icon_fallbacks)
|
QIcon.setFallbackSearchPaths(icon_fallbacks)
|
||||||
|
|
|
@ -74,7 +74,7 @@ Repeater {
|
||||||
Setting.ExpressionEditor {
|
Setting.ExpressionEditor {
|
||||||
height: 30
|
height: 30
|
||||||
label: propertyLabel
|
label: propertyLabel
|
||||||
icon: `settings/custom/${propertyIcon}.svg`
|
icon: `properties/${propertyIcon}.svg`
|
||||||
defValue: JS.Utils.simplifyExpression(obj[propertyName].toEditableString())
|
defValue: JS.Utils.simplifyExpression(obj[propertyName].toEditableString())
|
||||||
self: obj.name
|
self: obj.name
|
||||||
variables: propertyType.variables
|
variables: propertyType.variables
|
||||||
|
@ -99,7 +99,7 @@ Repeater {
|
||||||
Setting.TextSetting {
|
Setting.TextSetting {
|
||||||
height: 30
|
height: 30
|
||||||
label: propertyLabel
|
label: propertyLabel
|
||||||
icon: `settings/custom/${propertyIcon}.svg`
|
icon: `properties/${propertyIcon}.svg`
|
||||||
min: propertyType == "int" ? 0 : -Infinity
|
min: propertyType == "int" ? 0 : -Infinity
|
||||||
isInt: propertyType == "int"
|
isInt: propertyType == "int"
|
||||||
isDouble: propertyType == "number"
|
isDouble: propertyType == "number"
|
||||||
|
@ -159,7 +159,7 @@ Repeater {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
height: 20
|
height: 20
|
||||||
text: propertyLabel
|
text: propertyLabel
|
||||||
//icon: `settings/custom/${propertyIcon}.svg`
|
//icon: `properties/${propertyIcon}.svg`
|
||||||
|
|
||||||
checked: {
|
checked: {
|
||||||
//if(obj[propertyName] == null) {
|
//if(obj[propertyName] == null) {
|
||||||
|
@ -185,7 +185,7 @@ Repeater {
|
||||||
Setting.ComboBoxSetting {
|
Setting.ComboBoxSetting {
|
||||||
height: 30
|
height: 30
|
||||||
label: propertyLabel
|
label: propertyLabel
|
||||||
icon: `settings/custom/${propertyIcon}.svg`
|
icon: `properties/${propertyIcon}.svg`
|
||||||
// True to select an object of type, false for enums.
|
// True to select an object of type, false for enums.
|
||||||
property bool selectObjMode: paramTypeIn(propertyType, ['ObjectType'])
|
property bool selectObjMode: paramTypeIn(propertyType, ['ObjectType'])
|
||||||
property bool isRealObject: !selectObjMode || (propertyType.objType != "ExecutableObject" && propertyType.objType != "DrawableObject")
|
property bool isRealObject: !selectObjMode || (propertyType.objType != "ExecutableObject" && propertyType.objType != "DrawableObject")
|
||||||
|
@ -246,7 +246,7 @@ Repeater {
|
||||||
|
|
||||||
Setting.ListSetting {
|
Setting.ListSetting {
|
||||||
label: propertyLabel
|
label: propertyLabel
|
||||||
//icon: `settings/custom/${propertyIcon}.svg`
|
//icon: `properties/${propertyIcon}.svg`
|
||||||
dictionaryMode: paramTypeIn(propertyType, ['Dict'])
|
dictionaryMode: paramTypeIn(propertyType, ['Dict'])
|
||||||
keyType: dictionaryMode ? propertyType.keyType : 'string'
|
keyType: dictionaryMode ? propertyType.keyType : 'string'
|
||||||
valueType: propertyType.valueType
|
valueType: propertyType.valueType
|
||||||
|
@ -283,7 +283,7 @@ Repeater {
|
||||||
property string propertyName: modelData[0]
|
property string propertyName: modelData[0]
|
||||||
property var propertyType: modelData[1]
|
property var propertyType: modelData[1]
|
||||||
property string propertyLabel: qsTranslate('prop',propertyName)
|
property string propertyLabel: qsTranslate('prop',propertyName)
|
||||||
property string propertyIcon: JS.Utils.camelCase2readable(propertyName)
|
property string propertyIcon: propertyName
|
||||||
|
|
||||||
sourceComponent: {
|
sourceComponent: {
|
||||||
if(propertyName.startsWith('comment'))
|
if(propertyName.startsWith('comment'))
|
||||||
|
|