Finally got rid of the camelCase2Readable Utils function.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2594fd6844
commit
c39498c60f
35 changed files with 20 additions and 32 deletions
|
@ -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'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue