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
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @returns {string}
|
||||
|
|
|
@ -104,7 +104,7 @@ def get_platform_qt_style(os) -> str:
|
|||
def register_icon_directories() -> None:
|
||||
icon_fallbacks = QIcon.fallbackSearchPaths()
|
||||
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:
|
||||
icon_fallbacks.append(path.realpath(path.join(base_icon_path, *p)))
|
||||
QIcon.setFallbackSearchPaths(icon_fallbacks)
|
||||
|
|
|
@ -74,7 +74,7 @@ Repeater {
|
|||
Setting.ExpressionEditor {
|
||||
height: 30
|
||||
label: propertyLabel
|
||||
icon: `settings/custom/${propertyIcon}.svg`
|
||||
icon: `properties/${propertyIcon}.svg`
|
||||
defValue: JS.Utils.simplifyExpression(obj[propertyName].toEditableString())
|
||||
self: obj.name
|
||||
variables: propertyType.variables
|
||||
|
@ -99,7 +99,7 @@ Repeater {
|
|||
Setting.TextSetting {
|
||||
height: 30
|
||||
label: propertyLabel
|
||||
icon: `settings/custom/${propertyIcon}.svg`
|
||||
icon: `properties/${propertyIcon}.svg`
|
||||
min: propertyType == "int" ? 0 : -Infinity
|
||||
isInt: propertyType == "int"
|
||||
isDouble: propertyType == "number"
|
||||
|
@ -159,7 +159,7 @@ Repeater {
|
|||
CheckBox {
|
||||
height: 20
|
||||
text: propertyLabel
|
||||
//icon: `settings/custom/${propertyIcon}.svg`
|
||||
//icon: `properties/${propertyIcon}.svg`
|
||||
|
||||
checked: {
|
||||
//if(obj[propertyName] == null) {
|
||||
|
@ -185,7 +185,7 @@ Repeater {
|
|||
Setting.ComboBoxSetting {
|
||||
height: 30
|
||||
label: propertyLabel
|
||||
icon: `settings/custom/${propertyIcon}.svg`
|
||||
icon: `properties/${propertyIcon}.svg`
|
||||
// True to select an object of type, false for enums.
|
||||
property bool selectObjMode: paramTypeIn(propertyType, ['ObjectType'])
|
||||
property bool isRealObject: !selectObjMode || (propertyType.objType != "ExecutableObject" && propertyType.objType != "DrawableObject")
|
||||
|
@ -246,7 +246,7 @@ Repeater {
|
|||
|
||||
Setting.ListSetting {
|
||||
label: propertyLabel
|
||||
//icon: `settings/custom/${propertyIcon}.svg`
|
||||
//icon: `properties/${propertyIcon}.svg`
|
||||
dictionaryMode: paramTypeIn(propertyType, ['Dict'])
|
||||
keyType: dictionaryMode ? propertyType.keyType : 'string'
|
||||
valueType: propertyType.valueType
|
||||
|
@ -283,7 +283,7 @@ Repeater {
|
|||
property string propertyName: modelData[0]
|
||||
property var propertyType: modelData[1]
|
||||
property string propertyLabel: qsTranslate('prop',propertyName)
|
||||
property string propertyIcon: JS.Utils.camelCase2readable(propertyName)
|
||||
property string propertyIcon: propertyName
|
||||
|
||||
sourceComponent: {
|
||||
if(propertyName.startsWith('comment'))
|
||||
|
|