Skip to content

Commit d296d07

Browse files
committed
qt6 code from dev into root
1 parent b668157 commit d296d07

84 files changed

Lines changed: 6516 additions & 232 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

EasyReflectometryApp.pyproject

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@
3535
"EasyReflectometryApp/Backends/Mock/Report.qml",
3636
"EasyReflectometryApp/Backends/Mock/Status.qml",
3737
"EasyReflectometryApp/Backends/Py/py_backend.py",
38+
"EasyReflectometryApp/Backends/Py/home.py",
3839
"EasyReflectometryApp/Backends/Py/project.py",
40+
"EasyReflectometryApp/Backends/Py/sample.py",
41+
"EasyReflectometryApp/Backends/Py/analysis.py",
3942
"EasyReflectometryApp/Backends/Py/report.py",
4043
"EasyReflectometryApp/Backends/Py/status.py",
4144
"EasyReflectometryApp/Backends/Py/logic/helpers.py",
42-
"EasyReflectometryApp/Backends/Py/logic/project.py"
45+
"EasyReflectometryApp/Backends/Py/logic/project.py",
46+
"EasyReflectometryApp/Backends/Py/logic/sample.py"
4347
]
4448
}

EasyReflectometryApp.qmlproject

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,6 @@ Project {
3737
filter: "qmldir;*.ts;*.qrc;*.html"
3838
recursive: true
3939
}
40+
41+
mainUiFile: "EasyReflectometryApp/mail.qml"
4042
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
pragma Singleton
2+
3+
import QtQuick
4+
5+
QtObject {
6+
readonly property var minimizersAvailable: ['minimizer_1', 'minimizer_2', 'minimizer_3']
7+
readonly property int minimizerCurrentIndex: 0
8+
9+
readonly property var calculatorsAvailable: ['calculator_1', 'calculator_2', 'calculator_3']
10+
readonly property int calculatorCurrentIndex: 1
11+
12+
readonly property var experimentsAvailable: ['experiment_1', 'experiment_2', 'experiment_3']
13+
readonly property int experimentCurrentIndex: 2
14+
15+
// Minimizer
16+
readonly property double minimizerTolerance: 1.0
17+
readonly property int minimizerMaxIterations: 2
18+
19+
// Fitting
20+
readonly property string fittingStatus: ''//undefined //'Success'
21+
readonly property bool isFitFinished: true
22+
readonly property bool fittingRunning: false
23+
24+
// Parameters
25+
property int currentParameterIndex: 0
26+
readonly property int modelParametersCount: 10
27+
readonly property int experimentParametersCount: 20
28+
readonly property int freeParametersCount: 100
29+
readonly property int fixedParametersCount: 200
30+
readonly property var fitableParameters: [
31+
{
32+
'name': 'name 1',
33+
'value': 1.0,
34+
'error': -1.23456,
35+
'max': 100.0,
36+
'min': -100.0,
37+
'units': 'u1',
38+
'fit': true,
39+
'from': -10.0,
40+
'to': 10.0,
41+
},
42+
{
43+
'name': 'name 2',
44+
'value': 2.0,
45+
'error': -2.34567,
46+
'max': 200.0,
47+
'min': -200.0,
48+
'units': 'u2',
49+
'fit': false,
50+
'from': -20.0,
51+
'to': 20.0,
52+
},
53+
{
54+
'name': 'name 3',
55+
'value': 3.0,
56+
'error': -3.45678,
57+
'max': 300.0,
58+
'min': -300.0,
59+
'units': 'u3',
60+
'fit': true,
61+
'from': -30.0,
62+
'to': 30.0,
63+
},
64+
]
65+
function setCurrentParameterMin(value) {
66+
console.debug(`setCurrentParameterMin ${value}`)
67+
}
68+
function setCurrentParameterMax(value) {
69+
console.debug(`setCurrentParameterMax ${value}`)
70+
}
71+
function setCurrentParameterValue(value) {
72+
console.debug(`setCurrentParameterValue ${value}`)
73+
}
74+
function setCurrentParameterFit(value) {
75+
console.debug(`setCurrentParameterFit ${value}`)
76+
}
77+
78+
// Setters
79+
function setCurrentParameterIndex(value) {
80+
currentParameterIndex = value
81+
console.debug(`setCurrentParameterIndex ${value}`)
82+
}
83+
function setCalculatorCurrentIndex(value) {
84+
console.debug(`setCalculatorCurrentIndex ${value}`)
85+
}
86+
function setExperimentCurrentIndex(value) {
87+
console.debug(`setExperimentCurrentIndex ${value}`)
88+
}
89+
function setMinimizerCurrentIndex(value) {
90+
console.debug(`setMinimizer ${value}`)
91+
}
92+
function setMinimizerTolerance(value) {
93+
console.debug(`setMinimizerTolerance ${value}`)
94+
}
95+
function setMinimizerMaxIterations(value) {
96+
console.debug(`setMinimizerMaxIterations ${value}`)
97+
}
98+
99+
//Actions
100+
function fittingStartStop() {
101+
console.debug('fittingStartStop')
102+
}
103+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
pragma Singleton
2+
3+
import QtQuick
4+
5+
QtObject {
6+
property bool experimentalData: true
7+
property double scaling: 1.
8+
property double background: 2.
9+
property string resolution: '3.00'
10+
11+
// Setters
12+
function setScaling(value) {
13+
console.debug(`setScaling ${value}`)
14+
}
15+
function setBackground(value) {
16+
console.debug(`setBackgroun ${value}`)
17+
}
18+
function setResolution(value) {
19+
console.debug(`setResolution ${value}`)
20+
}
21+
22+
function load(path) {
23+
console.debug(`Loading experiment from ${path}`)
24+
}
25+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
pragma Singleton
2+
3+
import QtQuick
4+
5+
QtObject {
6+
7+
property double sampleMinX: -1.
8+
property double sampleMaxX: 1.
9+
property double sampleMinY: -10.
10+
property double sampleMaxY: 10.
11+
property double sldMinX: -2.
12+
property double sldMaxX: 2.
13+
property double sldMinY: -20.
14+
property double sldMaxY: 20.
15+
property double experimentMinX: -3.
16+
property double experimentMaxX: 3.
17+
property double experimentMinY: -30.
18+
property double experimentMaxY: 30.
19+
property double analysisMinX: -4.
20+
property double analysisMaxX: 4.
21+
property double analysisMinY: -40.
22+
property double analysisMaxY: 40.
23+
24+
function setQtChartsSerieRef(value1, value2, value3) {
25+
console.debug(`setQtChartsSerieRef ${value1}, ${value2}, ${value3}`)
26+
}
27+
28+
function drawCalculatedOnSampleChart(){
29+
console.debug(`drawCalculatedOnSampleChart`)
30+
}
31+
32+
function drawCalculatedOnSldChart(){
33+
console.debug(`drawCalculatedOnSldChart`)
34+
}
35+
36+
}

EasyReflectometryApp/Backends/Mock/Project.qml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ QtObject {
88
property string creationDate: ''
99

1010
property string name: 'Super duper project'
11+
function setName(value) { name = value }
1112
property string description: 'Default project description from Mock proxy'
13+
function setDescription(value) { description = value }
1214
property string location: '/path to the project'
15+
function setLocation(value) { location = value }
1316

14-
function create(project_path) {
15-
location = project_path
17+
function create() {
1618
console.debug(`Creating project ${name}`)
1719
creationDate = `${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`
1820
created = true
@@ -22,4 +24,15 @@ QtObject {
2224
console.debug(`Saving project ${name}`)
2325
}
2426

27+
function reset() {
28+
console.debug(`Reset project ${name}`)
29+
created = false
30+
}
31+
32+
function load(path) {
33+
console.debug(`Loading project from ${path}`)
34+
creationDate = `${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`
35+
created = true
36+
}
37+
2538
}

0 commit comments

Comments
 (0)