Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
bf352c7
push to andrew
andped10 Sep 3, 2024
45b6ba8
Fix materials group
AndrewSazonov Sep 3, 2024
799440c
format sld and isld
andped10 Sep 3, 2024
0871571
model and materials seems functional
andped10 Sep 4, 2024
adc4f88
sekelton seems to work
andped10 Sep 4, 2024
bb7d53d
not able to manipulate currentAssemblyType
andped10 Sep 4, 2024
c25eaf7
QML as object rather than load
andped10 Sep 4, 2024
a132ebb
ready to the different assemblies
andped10 Sep 4, 2024
3b36e6f
multilayer
andped10 Sep 4, 2024
257509b
repeatin multi layer
andped10 Sep 4, 2024
8fd2f2e
repeating multi layer
andped10 Sep 5, 2024
066a241
surfactant layer
andped10 Sep 5, 2024
a68f529
surfactant seems to work
andped10 Sep 5, 2024
2633e11
sample page seems to work on mock backend
andped10 Sep 5, 2024
daea57f
gui sample moving to backend
andped10 Sep 5, 2024
3110949
need to update GUI on changes
andped10 Sep 5, 2024
f9b64eb
Not able to update GUI when a a new element to materials dict
andped10 Sep 5, 2024
592f6c3
Update .pyproject file
AndrewSazonov Sep 5, 2024
c65000d
Fix `Add material`
AndrewSazonov Sep 5, 2024
ceff1e9
signals
andped10 Sep 6, 2024
2f748fc
various changes
andped10 Sep 19, 2024
707d9b5
Merge branch 'develop' into 206-migrate-sample-page-to-use-qt6-and-ge…
andped10 Oct 3, 2024
5fed740
gui functional, sample py backend should be implemented
andped10 Oct 3, 2024
70c05ab
materials backend
andped10 Oct 3, 2024
8fc8442
model selector seems to work
andped10 Oct 3, 2024
0e3bb90
assemblies seems to be working
andped10 Oct 4, 2024
f6ad905
connections seem to work
andped10 Oct 4, 2024
02caadf
several parts are working
andped10 Oct 5, 2024
98cc46c
combobox does not update
andped10 Oct 5, 2024
2e0371d
materials / solvents seem to work
andped10 Oct 6, 2024
930f31c
repeations moved to assemblies
andped10 Oct 7, 2024
d84d68f
thickness and roughness, repeatiotions
andped10 Oct 7, 2024
15c6bde
clean up passed types
andped10 Oct 7, 2024
15c0fab
update slot types and signals
andped10 Oct 8, 2024
af9e231
towards a graph
andped10 Oct 8, 2024
d7aff8a
frin QGuiApplicationto QApplication
andped10 Oct 8, 2024
f679e1c
cleaning up repeated multi layer
andped10 Oct 9, 2024
5765a89
able to plot data from project lib
andped10 Oct 9, 2024
1f3b656
plotting of reflectometry and sld
andped10 Oct 20, 2024
da22d64
log is now done explicit in plotting_1d
andped10 Oct 21, 2024
4d4d0ad
missing signal
andped10 Oct 21, 2024
e50b057
more consistent naming
andped10 Oct 21, 2024
ca86ec6
scaling seems to work
andped10 Oct 21, 2024
6667111
cleaning
andped10 Oct 21, 2024
e872834
Plotting mock updated
andped10 Oct 21, 2024
d25c8c1
clean up / deletion
andped10 Oct 21, 2024
eb13b33
code cleaning
andped10 Oct 21, 2024
103cc21
revert change in pyside2 cide
andped10 Oct 21, 2024
c6a496a
qml entry point
andped10 Oct 21, 2024
4b0aa68
remove utils
andped10 Oct 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src_qt6/EasyReflectometryApp.pyproject
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@
"EasyReflectometryApp/Backends/Mock/Report.qml",
"EasyReflectometryApp/Backends/Mock/Status.qml",
"EasyReflectometryApp/Backends/Py/py_backend.py",
"EasyReflectometryApp/Backends/Py/home.py",
"EasyReflectometryApp/Backends/Py/project.py",
"EasyReflectometryApp/Backends/Py/sample.py",
"EasyReflectometryApp/Backends/Py/analysis.py",
"EasyReflectometryApp/Backends/Py/report.py",
"EasyReflectometryApp/Backends/Py/status.py",
"EasyReflectometryApp/Backends/Py/logic/helpers.py",
"EasyReflectometryApp/Backends/Py/logic/project.py"
"EasyReflectometryApp/Backends/Py/logic/project.py",
"EasyReflectometryApp/Backends/Py/logic/sample.py"
]
}
2 changes: 2 additions & 0 deletions src_qt6/EasyReflectometryApp.qmlproject
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ Project {
filter: "qmldir;*.ts;*.qrc;*.html"
recursive: true
}

mainUiFile: "EasyReflectometryApp/mail.qml"
}
9 changes: 9 additions & 0 deletions src_qt6/EasyReflectometryApp/Backends/Mock/Analysis.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pragma Singleton

import QtQuick

QtObject {

readonly property bool isFitFinished: true

}
25 changes: 25 additions & 0 deletions src_qt6/EasyReflectometryApp/Backends/Mock/Plotting.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
pragma Singleton

import QtQuick

QtObject {

property double sampleMinX: -1.
property double sampleMaxX: 1.
property double sampleMinY: -10.
property double sampleMaxY: 10.
property double sldMinX: -2.
property double sldMaxX: 2.
property double sldMinY: -20.
property double sldMaxY: 20.

function setQtChartsReflectometrySerieRef(value1, value2, value3) {
console.debug(`setQtChartsReflectometrySerieRef ${value1}, ${value2}, ${value3}`)
}

function setQtChartsSldSerieRef(value1, value2, value3) {
console.debug(`setQtChartsSldSerieRef ${value1}, ${value2}, ${value3}`)
}


}
267 changes: 267 additions & 0 deletions src_qt6/EasyReflectometryApp/Backends/Mock/Sample.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
pragma Singleton

import QtQuick

QtObject {
// MATERIALS
property int currentMaterialIndex: -1

// Getters
readonly property var materials: [
{
'label': 'label 1',
'sld': '1.23456',
'isld': '-1.23456'
},
{
'label': 'label 2',
'sld': '2.34567',
'isld': '-2.34567'
},
{
'label': 'label 3',
'sld': '3.45678',
'isld': '-3.45678'
},
]
readonly property var materialNames: materials.map(function (item) { return item.label })

// Setters
function setCurrentMaterialIndex(value) {
console.debug(`setCurrentMaterialIndex ${value}`)
}
function setCurrentMaterialName(value) {
console.debug(`setCurrentMaterialName ${value}`)
}
function setCurrentMaterialSld(value) {
console.debug(`setCurrentMaterialSld ${value}`)
}
function setCurrentMaterialISld(value) {
console.debug(`setCurrentMaterialISld ${value}`)
}


// Table functions
function removeMaterial(value) {
console.debug(`removeMaterial ${value}`)
}
function addNewMaterial() {
console.debug(`addNewMaterial`)
}
function duplicateSelectedMaterial() {
console.debug(`duplicateSelectedMaterial ${currentMaterialIndex}`)
}
function moveSelectedMaterialUp() {
console.debug(`moveSelectedMaterialUp ${currentMaterialIndex}`)
}
function moveSelectedMaterialDown() {
console.debug(`moveSelectedMaterialDown ${currentMaterialIndex}`)
}
// MODELS
property int currentModelIndex: -1
property string currentModelName: 'currentModelName'

// Getters
readonly property var models: [
{
'label': 'label 1',
'color': 'red',
},
{
'label': 'label 2',
'color': 'green'
},
{
'label': 'label 3',
'color': 'blue'
},
]

// Setters
function setCurrentModelIndex(value){
console.debug(`setCurrentModelIndex ${value}`)
}
function setCurrentModelName(value) {
console.debug(`setCurrentModelName ${value}`)
}

// Table functions
function removeModel(value) {
console.debug(`removeModel ${value}`)
}
function addNewModel() {
console.debug(`addNewModel`)
}
function duplicateSelectedModel() {
console.debug(`duplicateSelectedModel ${currentModelIndex}`)
}
function moveSelectedModelUp() {
console.debug(`moveSelectedModelUp ${currentModelIndex}`)
}
function moveSelectedModelDown() {
console.debug(`moveSelectedModelDown ${currentModelIndex}`)
}

// ASSEMBLIES
property int currentAssemblyIndex: -1
property bool constrainAPM: false
property bool conformalRoughness: false
property int repeatedLayerReptitions: 1

property string currentAssemblyName: 'currentAssemblyName'
property string currentAssemblyType: 'Surfactant Layer'


// Getters
readonly property var assemblies: [
{
'label': 'label 1',
'type': 'Multi-layer'
},
{
'label': 'label 2',
'type': 'Multi-layer'
},
{
'label': 'label 3',
'type': 'Repeating Multi-layer'

},
{
'label': 'label 4',
'type': 'Surfactant Layer'
},
]

// Setters
function setCurrentAssemblyName(value) {
console.debug(`setCurrentAssemblyName ${value}`)
}
function setCurrentAssemblyType(value) {
console.debug(`setCurrentAssemblyType ${value}`)
}
function setCurrentAssemblyIndex(value) {
currentAssemblyType = assemblies[value].type
console.debug(`setCurrentAssemblyIndex ${value}`)
}

// Table functions
function removeAssembly(value) {
console.debug(`removeAssembly ${value}`)
}
function addNewAssembly() {
console.debug(`addNewAssembly`)
}
function duplicateSelectedAssembly() {
console.debug(`duplicateSelectedAssembly ${currentAssemblyIndex}`)
}
function moveSelectedAssemblyUp() {
console.debug(`moveSelectedAssemblyUp ${currentAssemblyIndex}`)
}
function moveSelectedAssemblyDown() {
console.debug(`moveSelectedAssemblyDown ${currentAssemblyIndex}`)
}

// Assembly specific
property int currentAssemblyRepeatedLayerReptitions: 3

function setCurrentAssemblyRepeatedLayerReptitions(value) {
console.debug(`setCurrentAssemblyRepeatedLayerReptitions ${value}`)
}

function setCurrentAssemblyConstrainAPM(value) {
console.debug(`setCurrentAssemblyConstrainAPM ${value}`)
}

function setCurrentAssemblyConformalRoughness(value) {
console.debug(`setCurrentAssemblyConformalRoughness ${value}`)
}

// LAYERS
property int currentLayerIndex: -1

property string currentLayerName: 'currentLayerName'

// Getters
readonly property var layers: [
{
'formula': 'formula 1',
'material': 'label 1',
'solvent': 'label 1',
'thickness': '1',
'thickness_enabled': 'True',
'roughness': '1',
'roughness_enabled': 'True',
'solvation': '1',
'apm': '1',
'apm_enabled': 'True',
},
{
'formula': 'formula 2',
'material': 'label 2',
'solvent': 'label 2',
'thickness': ' 2',
'thickness_enabled': 'False',
'roughness': '2',
'roughness_enabled': 'False',
'solvation': '2',
'apm': '2',
'apm_enabled': 'False',
},
{
'formula': 'formula 3',
'material': 'label 3',
'solvent': 'label 3',
'thickness': '3',
'thickness_enabled': 'False',
'roughness': '3',
'roughness_enabled': 'False',
'solvation': '3',
'apm': '3',
'apm_enabled': 'False',
},
]

// Setters
function setCurrentLayerIndex(value){
console.debug(`setCurrentLayerIndex ${value}`)
}
function setCurrentLayerFormula(value) {
console.debug(`setCurrentLayerFormula ${value}`)
}
function setCurrentLayerMaterial(value) {
console.debug(`setCurrentLayerMaterialIndex ${value}`)
}
function setCurrentLayerSolvent(value) {
console.debug(`setCurrentLayerSolvent ${value}`)
}
function setCurrentLayerThickness(value) {
console.debug(`setCurrentLayerThickness ${value}`)
}
function setCurrentLayerRoughness(value) {
console.debug(`setCurrentLayerRoughness ${value}`)
}
function setCurrentLayerAPM(value) {
console.debug(`setCurrentLayerAPM ${value}`)
}
function setCurrentLayerSolvation(value) {
console.debug(`setCurrentLayerSolvation ${value}`)
}

// Table functions
function removeLayer(value) {
console.debug(`removeLayer ${value}`)
}
function addNewLayer() {
console.debug(`addNewLayer`)
}
function duplicateSelectedLayer() {
console.debug(`duplicateSelectedLayer ${currentLayerIndex}`)
}
function moveSelectedLayerUp() {
console.debug(`moveSelectedLayerUp ${currentLayerIndex}`)
}
function moveSelectedLayerDown() {
console.debug(`moveSelectedLayerDown ${currentLayerIndex}`)
}
}
3 changes: 3 additions & 0 deletions src_qt6/EasyReflectometryApp/Backends/Mock/qmldir
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
module MockLogic

singleton Analysis Analysis.qml
singleton Home Home.qml
singleton Project Project.qml
singleton Report Report.qml
singleton Sample Sample.qml
singleton Status Status.qml
singleton Plotting Plotting.qml
6 changes: 4 additions & 2 deletions src_qt6/EasyReflectometryApp/Backends/MockBackend.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import Backends.Mock as Backend

QtObject {

property var analysis: Backend.Analysis
property var home: Backend.Home
property var project: Backend.Project
property var status: Backend.Status
property var report: Backend.Report

property var sample: Backend.Sample
property var status: Backend.Status
property var plotting: Backend.Plotting
}


2 changes: 1 addition & 1 deletion src_qt6/EasyReflectometryApp/Backends/Py/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .py_backend import PyBackend

__all__ = ['PyBackend']
__all__ = [PyBackend]
23 changes: 23 additions & 0 deletions src_qt6/EasyReflectometryApp/Backends/Py/analysis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from PySide6.QtCore import QObject
from PySide6.QtCore import Signal
from PySide6.QtCore import Slot
from PySide6.QtCore import Property

from easyreflectometry import Project as ProjectLib
#from .logic.Analysis import Analysis as AnalysisLogic


class Analysis(QObject):
fitFinishedChanged = Signal()


def __init__(self, project_lib: ProjectLib, parent=None):
super().__init__(parent)
# self._logic = AnalysisLogic(project_lib)

# Setters and getters

@Property(bool, notify=fitFinishedChanged)
def isFitFinished(self) -> bool:
return True

Loading