Compare commits
2 commits
4fe1086d68
...
bc35b18da0
Author | SHA1 | Date | |
---|---|---|---|
bc35b18da0 | |||
7542d63121 |
10 changed files with 81 additions and 10 deletions
|
@ -54,6 +54,7 @@ Item {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
placeholderText: qsTr("Filter...")
|
placeholderText: qsTr("Filter...")
|
||||||
|
category: "all"
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView {
|
ScrollView {
|
||||||
|
|
|
@ -103,14 +103,21 @@ Repeater {
|
||||||
height: 30
|
height: 30
|
||||||
label: propertyLabel
|
label: propertyLabel
|
||||||
icon: `settings/custom/${propertyIcon}.svg`
|
icon: `settings/custom/${propertyIcon}.svg`
|
||||||
isDouble: propertyType == 'number'
|
isDouble: propertyType == "number"
|
||||||
defValue: obj[propertyName] == null ? '' : obj[propertyName].toString()
|
defValue: obj[propertyName] == null ? '' : obj[propertyName].toString()
|
||||||
|
category: {
|
||||||
|
return {
|
||||||
|
"Domain": "domain",
|
||||||
|
"string": "all",
|
||||||
|
"number": "all"
|
||||||
|
}[propertyType]
|
||||||
|
}
|
||||||
onChanged: function(newValue) {
|
onChanged: function(newValue) {
|
||||||
try {
|
try {
|
||||||
var newValueParsed = {
|
var newValueParsed = {
|
||||||
'Domain': () => MathLib.parseDomain(newValue),
|
"Domain": () => MathLib.parseDomain(newValue),
|
||||||
'string': () => newValue,
|
"string": () => newValue,
|
||||||
'number': () => parseFloat(newValue)
|
"number": () => parseFloat(newValue)
|
||||||
}[propertyType]()
|
}[propertyType]()
|
||||||
|
|
||||||
// Ensuring old and new values are different to prevent useless adding to history.
|
// Ensuring old and new values are different to prevent useless adding to history.
|
||||||
|
|
|
@ -107,6 +107,7 @@ Popup.BaseDialog {
|
||||||
height: 30
|
height: 30
|
||||||
label: qsTr("Name")
|
label: qsTr("Name")
|
||||||
icon: "common/label.svg"
|
icon: "common/label.svg"
|
||||||
|
category: "name"
|
||||||
width: dlgProperties.width
|
width: dlgProperties.width
|
||||||
value: objEditor.obj.name
|
value: objEditor.obj.name
|
||||||
onChanged: function(newValue) {
|
onChanged: function(newValue) {
|
||||||
|
|
|
@ -31,8 +31,19 @@ Popup {
|
||||||
|
|
||||||
signal selected(string character)
|
signal selected(string character)
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\qmlproperty string InsertCharacter::category
|
||||||
|
Type of special character to insert.
|
||||||
|
Possible values:
|
||||||
|
- expression
|
||||||
|
- domain
|
||||||
|
- name
|
||||||
|
- all
|
||||||
|
*/
|
||||||
|
property string category: 'all'
|
||||||
|
|
||||||
width: 280
|
width: 280
|
||||||
height: insertGrid.insertChars.length/insertGrid.columns*(width/insertGrid.columns)
|
height: Math.ceil(insertGrid.insertChars.length/insertGrid.columns)*(width/insertGrid.columns)+5
|
||||||
modal: true
|
modal: true
|
||||||
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
||||||
|
|
||||||
|
@ -41,17 +52,40 @@ Popup {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
columns: 7
|
columns: 7
|
||||||
|
|
||||||
property var insertChars: [
|
property var insertCharsExpression: [
|
||||||
|
"∞","π","¹","²","³","⁴","⁵",
|
||||||
|
"⁶","⁷","⁸","⁹","⁰"
|
||||||
|
]
|
||||||
|
|
||||||
|
property var insertCharsDomain: [
|
||||||
|
"∅","∪","∩","∖","ℝ","ℕ","ℤ",
|
||||||
|
"⁺","⁻",...insertCharsExpression
|
||||||
|
]
|
||||||
|
|
||||||
|
property var insertCharsName: [
|
||||||
"α","β","γ","δ","ε","ζ","η",
|
"α","β","γ","δ","ε","ζ","η",
|
||||||
"π","θ","κ","λ","μ","ξ","ρ",
|
"π","θ","κ","λ","μ","ξ","ρ",
|
||||||
"ς","σ","τ","φ","χ","ψ","ω",
|
"ς","σ","τ","φ","χ","ψ","ω",
|
||||||
"Γ","Δ","Θ","Λ","Ξ","Π","Σ",
|
"Γ","Δ","Θ","Λ","Ξ","Π","Σ",
|
||||||
"Φ","Ψ","Ω","ₐ","ₑ","ₒ","ₓ",
|
"Φ","Ψ","Ω","ₐ","ₑ","ₒ","ₓ",
|
||||||
"ₕ","ₖ","ₗ","ₘ","ₙ","ₚ","ₛ",
|
"ₕ","ₖ","ₗ","ₘ","ₙ","ₚ","ₛ",
|
||||||
"ₜ","¹","²","³","⁴","⁵","⁶",
|
"ₜ","₁","₂","₃","₄","₅","₆",
|
||||||
"⁷","⁸","⁹","⁰","₁","₂","₃",
|
"₇","₈","₉","₀"
|
||||||
"₄","₅","₆","₇","₈","₉","₀"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
property var insertCharsAll: [
|
||||||
|
...insertCharsName, ...insertCharsDomain
|
||||||
|
]
|
||||||
|
|
||||||
|
property var insertChars: {
|
||||||
|
return {
|
||||||
|
"expression": insertCharsExpression,
|
||||||
|
"domain": insertCharsDomain,
|
||||||
|
"name": insertCharsName,
|
||||||
|
"all": insertCharsAll
|
||||||
|
}[insertPopup.category]
|
||||||
|
}
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: parent.insertChars.length
|
model: parent.insertChars.length
|
||||||
|
|
||||||
|
|
|
@ -507,6 +507,8 @@ Item {
|
||||||
x: Math.round((parent.width - width) / 2)
|
x: Math.round((parent.width - width) / 2)
|
||||||
y: Math.round((parent.height - height) / 2)
|
y: Math.round((parent.height - height) / 2)
|
||||||
|
|
||||||
|
category: "expression"
|
||||||
|
|
||||||
onSelected: function(c) {
|
onSelected: function(c) {
|
||||||
editor.insert(editor.cursorPosition, c)
|
editor.insert(editor.cursorPosition, c)
|
||||||
insertPopup.close()
|
insertPopup.close()
|
||||||
|
|
|
@ -49,6 +49,12 @@ Item {
|
||||||
If true, the input is being parsed an double before being emitting the \a changed signal.
|
If true, the input is being parsed an double before being emitting the \a changed signal.
|
||||||
*/
|
*/
|
||||||
property bool isDouble: false
|
property bool isDouble: false
|
||||||
|
/*!
|
||||||
|
\qmlproperty bool TextSetting::category
|
||||||
|
Type of special character to insert from the popup.
|
||||||
|
\sa InsertCharacter::category
|
||||||
|
*/
|
||||||
|
property alias category: insertPopup.category
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty double TextSetting::min
|
\qmlproperty double TextSetting::min
|
||||||
Minimum value for numbers that can be entered into the input.
|
Minimum value for numbers that can be entered into the input.
|
||||||
|
|
|
@ -255,6 +255,7 @@ ScrollView {
|
||||||
Setting.TextSetting {
|
Setting.TextSetting {
|
||||||
id: xAxisStep
|
id: xAxisStep
|
||||||
height: 30
|
height: 30
|
||||||
|
category: "expression"
|
||||||
label: qsTr("X Axis Step")
|
label: qsTr("X Axis Step")
|
||||||
icon: "settings/xaxisstep.svg"
|
icon: "settings/xaxisstep.svg"
|
||||||
width: settings.settingWidth
|
width: settings.settingWidth
|
||||||
|
@ -269,6 +270,7 @@ ScrollView {
|
||||||
Setting.TextSetting {
|
Setting.TextSetting {
|
||||||
id: yAxisStep
|
id: yAxisStep
|
||||||
height: 30
|
height: 30
|
||||||
|
category: "expression"
|
||||||
label: qsTr("Y Axis Step")
|
label: qsTr("Y Axis Step")
|
||||||
icon: "settings/yaxisstep.svg"
|
icon: "settings/yaxisstep.svg"
|
||||||
width: settings.settingWidth
|
width: settings.settingWidth
|
||||||
|
|
|
@ -72,11 +72,13 @@ class Domain {
|
||||||
case "RP":
|
case "RP":
|
||||||
case "R+":
|
case "R+":
|
||||||
case "ℝ⁺":
|
case "ℝ⁺":
|
||||||
|
case "ℝ+":
|
||||||
return Domain.RP
|
return Domain.RP
|
||||||
break;
|
break;
|
||||||
case "RM":
|
case "RM":
|
||||||
case "R-":
|
case "R-":
|
||||||
case "ℝ⁻":
|
case "ℝ⁻":
|
||||||
|
case "ℝ-":
|
||||||
return Domain.RM
|
return Domain.RM
|
||||||
break;
|
break;
|
||||||
case "RPE":
|
case "RPE":
|
||||||
|
@ -85,6 +87,8 @@ class Domain {
|
||||||
case "R*+":
|
case "R*+":
|
||||||
case "ℝ*⁺":
|
case "ℝ*⁺":
|
||||||
case "ℝ⁺*":
|
case "ℝ⁺*":
|
||||||
|
case "ℝ*+":
|
||||||
|
case "ℝ+*":
|
||||||
return Domain.RPE
|
return Domain.RPE
|
||||||
break;
|
break;
|
||||||
case "RME":
|
case "RME":
|
||||||
|
@ -93,16 +97,21 @@ class Domain {
|
||||||
case "R*-":
|
case "R*-":
|
||||||
case "ℝ⁻*":
|
case "ℝ⁻*":
|
||||||
case "ℝ*⁻":
|
case "ℝ*⁻":
|
||||||
|
case "ℝ-*":
|
||||||
|
case "ℝ*-":
|
||||||
return Domain.RME
|
return Domain.RME
|
||||||
break;
|
break;
|
||||||
case "ℕ":
|
case "ℕ":
|
||||||
case "N":
|
case "N":
|
||||||
case "ZP":
|
case "ZP":
|
||||||
|
case "Z+":
|
||||||
case "ℤ⁺":
|
case "ℤ⁺":
|
||||||
|
case "ℤ+":
|
||||||
return Domain.N
|
return Domain.N
|
||||||
break;
|
break;
|
||||||
case "NLOG":
|
case "NLOG":
|
||||||
case "ℕˡᵒᵍ":
|
case "ℕˡᵒᵍ":
|
||||||
|
case "ℕLOG":
|
||||||
return Domain.NLog
|
return Domain.NLog
|
||||||
break;
|
break;
|
||||||
case "NE":
|
case "NE":
|
||||||
|
@ -111,12 +120,15 @@ class Domain {
|
||||||
case "N+":
|
case "N+":
|
||||||
case "ℕ*":
|
case "ℕ*":
|
||||||
case "ℕ⁺":
|
case "ℕ⁺":
|
||||||
|
case "ℕ+":
|
||||||
case "ZPE":
|
case "ZPE":
|
||||||
case "ZEP":
|
case "ZEP":
|
||||||
case "Z+*":
|
case "Z+*":
|
||||||
case "Z*+":
|
case "Z*+":
|
||||||
case "ℤ⁺*":
|
case "ℤ⁺*":
|
||||||
case "ℤ*⁺":
|
case "ℤ*⁺":
|
||||||
|
case "ℤ+*":
|
||||||
|
case "ℤ*+":
|
||||||
return Domain.NE
|
return Domain.NE
|
||||||
break;
|
break;
|
||||||
case "Z":
|
case "Z":
|
||||||
|
@ -126,6 +138,7 @@ class Domain {
|
||||||
case "ZM":
|
case "ZM":
|
||||||
case "Z-":
|
case "Z-":
|
||||||
case "ℤ⁻":
|
case "ℤ⁻":
|
||||||
|
case "ℤ-":
|
||||||
return Domain.ZM
|
return Domain.ZM
|
||||||
break;
|
break;
|
||||||
case "ZME":
|
case "ZME":
|
||||||
|
@ -134,6 +147,8 @@ class Domain {
|
||||||
case "Z*-":
|
case "Z*-":
|
||||||
case "ℤ⁻*":
|
case "ℤ⁻*":
|
||||||
case "ℤ*⁻":
|
case "ℤ*⁻":
|
||||||
|
case "ℤ-*":
|
||||||
|
case "ℤ*-":
|
||||||
return Domain.ZME
|
return Domain.ZME
|
||||||
break;
|
break;
|
||||||
case "ZE":
|
case "ZE":
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -67,6 +67,9 @@ Operating System :: POSIX :: BSD
|
||||||
Operating System :: POSIX :: Linux
|
Operating System :: POSIX :: Linux
|
||||||
Programming Language :: Python :: 3.8
|
Programming Language :: Python :: 3.8
|
||||||
Programming Language :: Python :: 3.9
|
Programming Language :: Python :: 3.9
|
||||||
|
Programming Language :: Python :: 3.10
|
||||||
|
Programming Language :: Python :: 3.11
|
||||||
|
Programming Language :: Python :: 3.12
|
||||||
Programming Language :: Python :: Implementation :: CPython
|
Programming Language :: Python :: Implementation :: CPython
|
||||||
Topic :: Utilities
|
Topic :: Utilities
|
||||||
Topic :: Scientific/Engineering
|
Topic :: Scientific/Engineering
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: logarithmplotter
|
name: logarithmplotter
|
||||||
title: LogarithmPlotter
|
title: LogarithmPlotter
|
||||||
version: '0.4.0'
|
version: '0.4.1'
|
||||||
summary: 2D logarithmic-scaled plotter software to create asymptotic Bode plots
|
summary: 2D logarithmic-scaled plotter software to create asymptotic Bode plots
|
||||||
confinement: strict
|
confinement: strict
|
||||||
base: core20
|
base: core20
|
||||||
|
|
Loading…
Reference in a new issue