Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 0 additions & 20 deletions src/EasyTextureApp/Backends/MockQml/Project.qml
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,6 @@ QtObject {
'description': 'neutron, powder, simulation, POWTEX@MLZ',
'name': 'Powder-Sample (POWTEX)',
'path': '/Examples/Powder-sample/powder.json'
},
{
'description': 'neutrons, powder, constant wavelength, D20@ILL',
'name': 'Co2SiO4 (D20)',
'path': '/Examples/Co2SiO4_D20@ILL/project.cif'
},
{
'description': 'neutrons, powder, constant wavelength, G41@LLB',
'name': 'Dy3Al5O12 (G41)',
'path': '/Examples/Dy3Al5O12_G41@LLB/project.cif'
},
{
'description': 'neutrons, powder, constant wavelength, D1A@ILL',
'name': 'PbSO4 (D1A)',
'path': '/Examples/PbSO4_D1A@ILL/project.cif'
},
{
'description': 'neutrons, powder, constant wavelength, 3T2@LLB',
'name': 'LaMnO3 (3T2)',
'path': '/Examples/LaMnO3_3T2@LLB/project.cif'
}
]

Expand Down
4 changes: 2 additions & 2 deletions src/EasyTextureApp/Gui/Pages/Corrections/Layout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ EaComponents.ContentPage {

sideBar: EaComponents.SideBar {
tabs: [
EaElements.TabButton { text: qsTr('Basic controls') },
EaElements.TabButton { text: qsTr('Extra controls') }
EaElements.TabButton { text: qsTr('Basic') },
EaElements.TabButton { text: qsTr('Extra') }
]

items: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ import EasyApp.Gui.Components as EaComponents
import Gui.Globals as Globals


Grid {
rows: 2
rowSpacing: 15

Column {
property int radioButtonWidth: (EaStyle.Sizes.sideBarContentWidth - spacing) / 2

spacing: EaStyle.Sizes.fontPixelSize / 2

Row {
EaElements.RadioButton {
id: noCalibration
text: qsTr('No background correction')
width: EaStyle.Sizes.fontPixelSize * 15
width: radioButtonWidth
checked: true

onClicked: {
Expand All @@ -30,7 +31,6 @@ Grid {
}

EaElements.RadioButton {
id: calibration
text: qsTr('Use empty can measurement')
width: EaStyle.Sizes.fontPixelSize * 15

Expand All @@ -40,45 +40,35 @@ Grid {
}
}

// Location
Row {
spacing: EaStyle.Sizes.fontPixelSize * 0.5

EaElements.Label {
id: locationLabel
text: qsTr('File')
enabled: Globals.BackendWrapper.correctionsLoadEmpty
anchors.verticalCenter: parent.verticalCenter
}

EaElements.TextField {
id: reportLocationField
placeholderText: qsTr('Enter empty can measurement filename here')
enabled: Globals.BackendWrapper.correctionsLoadEmpty
EaElements.TextField {
placeholderText: qsTr('Enter empty can measurement filename here')
enabled: Globals.BackendWrapper.correctionsLoadEmpty

width: EaStyle.Sizes.sideBarContentWidth - locationLabel.width - EaStyle.Sizes.fontPixelSize * 0.5
rightPadding: chooseButton.width
horizontalAlignment: TextInput.AlignLeft
width: EaStyle.Sizes.sideBarContentWidth
rightPadding: chooseButton.width
horizontalAlignment: TextInput.AlignLeft

EaElements.ToolButton {
id: chooseButton
EaElements.ToolButton {
id: chooseButton

anchors.right: parent.right
anchors.right: parent.right

showBackground: false
fontIcon: 'folder-open'
ToolTip.text: qsTr('Choose empty can measurement file here')
showBackground: false
fontIcon: 'folder-open'
ToolTip.text: qsTr('Choose empty can measurement file here')

onClicked: {
console.debug(`Clicking load empty can measurement file button ::: ${this}`)
Globals.References.pages.corrections.sidebar.basic.popups.loadEmptyMeasurementFile.open()
}
onClicked: {
console.debug(`Clicking load empty can measurement file button ::: ${this}`)
Globals.References.pages.corrections.sidebar.basic.popups.loadEmptyMeasurementFile.open()
}

Loader {
source: '../Popups/LoadEmptyMeasurementFile.qml'
}
Loader {
source: '../Popups/LoadEmptyMeasurementFile.qml'
}
}
}

}


Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ import EasyApp.Gui.Components as EaComponents
import Gui.Globals as Globals


Grid {
rows: 2
rowSpacing: 15
Column {
property int radioButtonWidth: (EaStyle.Sizes.sideBarContentWidth - spacing) / 2

spacing: EaStyle.Sizes.fontPixelSize / 2

Row {
EaElements.RadioButton {
id: noCalibration
text: qsTr('No vanadium correction')
width: EaStyle.Sizes.fontPixelSize * 15
width: radioButtonWidth
checked: true

onClicked: {
Expand All @@ -32,53 +32,43 @@ Grid {
EaElements.RadioButton {
id: calibration
text: qsTr('Use vanadium measurement')
width: EaStyle.Sizes.fontPixelSize * 15
width: radioButtonWidth

onClicked: {
Globals.BackendWrapper.correctionsLoadVanadium = true
}
}
}

// Location
Row {
spacing: EaStyle.Sizes.fontPixelSize * 0.5

EaElements.Label {
id: locationLabel
text: qsTr('File')
enabled: Globals.BackendWrapper.correctionsLoadVanadium
anchors.verticalCenter: parent.verticalCenter
}

EaElements.TextField {
id: reportLocationField
placeholderText: qsTr('Enter vanadium measurement filename here')
enabled: Globals.BackendWrapper.correctionsLoadVanadium
EaElements.TextField {
id: reportLocationField
placeholderText: qsTr('Enter vanadium measurement filename here')
enabled: Globals.BackendWrapper.correctionsLoadVanadium

width: EaStyle.Sizes.sideBarContentWidth - locationLabel.width - EaStyle.Sizes.fontPixelSize * 0.5
rightPadding: chooseButton.width
horizontalAlignment: TextInput.AlignLeft
width: EaStyle.Sizes.sideBarContentWidth
rightPadding: chooseButton.width
horizontalAlignment: TextInput.AlignLeft

EaElements.ToolButton {
id: chooseButton
EaElements.ToolButton {
id: chooseButton

anchors.right: parent.right
anchors.right: parent.right

showBackground: false
fontIcon: 'folder-open'
ToolTip.text: qsTr('Choose vanadium measurement file here')
showBackground: false
fontIcon: 'folder-open'
ToolTip.text: qsTr('Choose vanadium measurement file here')

onClicked: {
console.debug(`Clicking load vanadium measurement file button ::: ${this}`)
Globals.References.pages.corrections.sidebar.basic.popups.loadVanadiumMeasurementFile.open()
}
onClicked: {
console.debug(`Clicking load vanadium measurement file button ::: ${this}`)
Globals.References.pages.corrections.sidebar.basic.popups.loadVanadiumMeasurementFile.open()
}

Loader {
source: '../Popups/LoadVanadiumMeasurementFile.qml'
}
Loader {
source: '../Popups/LoadVanadiumMeasurementFile.qml'
}
}
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -13,72 +13,57 @@ import EasyApp.Gui.Components as EaComponents
import Gui.Globals as Globals


Grid {
rows: 2
rowSpacing: 15
Column {
property int radioButtonWidth: (EaStyle.Sizes.sideBarContentWidth - spacing) / 2

spacing: EaStyle.Sizes.fontPixelSize / 2

Row {
EaElements.RadioButton {
id: noCalibration
text: qsTr('No voxel calibration')
width: EaStyle.Sizes.fontPixelSize * 15
width: radioButtonWidth
checked: true

onClicked: {
Globals.BackendWrapper.correctionsLoadCalibration = false
}
onClicked: Globals.BackendWrapper.correctionsLoadCalibration = false
}

EaElements.RadioButton {
id: calibration
text: qsTr('Use voxel calibration')
width: EaStyle.Sizes.fontPixelSize * 15
width: radioButtonWidth

onClicked: {
Globals.BackendWrapper.correctionsLoadCalibration = true
}
onClicked: Globals.BackendWrapper.correctionsLoadCalibration = true
}
}

// Location
Row {
spacing: EaStyle.Sizes.fontPixelSize * 0.5

EaElements.Label {
id: locationLabel
text: qsTr('File')
enabled: Globals.BackendWrapper.correctionsLoadCalibration
anchors.verticalCenter: parent.verticalCenter
}

EaElements.TextField {
id: reportLocationField
placeholderText: qsTr('Enter calibration filename here')
enabled: Globals.BackendWrapper.correctionsLoadCalibration
EaElements.TextField {
placeholderText: qsTr('Enter calibration filename here')
enabled: Globals.BackendWrapper.correctionsLoadCalibration

width: EaStyle.Sizes.sideBarContentWidth - locationLabel.width - EaStyle.Sizes.fontPixelSize * 0.5
rightPadding: chooseButton.width
horizontalAlignment: TextInput.AlignLeft
width: EaStyle.Sizes.sideBarContentWidth
rightPadding: chooseButton.width
horizontalAlignment: TextInput.AlignLeft

EaElements.ToolButton {
id: chooseButton
EaElements.ToolButton {
id: chooseButton

anchors.right: parent.right
anchors.right: parent.right

showBackground: false
fontIcon: 'folder-open'
ToolTip.text: qsTr('Choose calibration file here')
showBackground: false
fontIcon: 'folder-open'
ToolTip.text: qsTr('Choose calibration file here')

onClicked: {
console.debug(`Clicking load calibration file button ::: ${this}`)
Globals.References.pages.corrections.sidebar.basic.popups.loadVortexCalibrationFile.open()
}
onClicked: {
console.debug(`Clicking load calibration file button ::: ${this}`)
Globals.References.pages.corrections.sidebar.basic.popups.loadVortexCalibrationFile.open()
}

Loader {
source: '../Popups/LoadVortexCalibrationFile.qml'
}
Loader {
source: '../Popups/LoadVortexCalibrationFile.qml'
}
}
}

}


17 changes: 6 additions & 11 deletions src/EasyTextureApp/Gui/Pages/Corrections/Sidebar/Basic/Layout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,44 +14,39 @@ import Gui.Globals as Globals
EaComponents.SideBarColumn {

EaElements.GroupBox {
//enabled: false
title: qsTr('Voxel calibration using ?diamond? standard')
icon: 'hammer'
collapsed: false

Loader { source: 'Groups/VoxelCalibration.qml' }
}

EaElements.GroupBox {
//enabled: false
title: qsTr('Background correction using empty can measurement')
icon: 'hammer'
collapsed: false

Loader { source: 'Groups/EmptyCorrection.qml' }
}

EaElements.GroupBox {
//enabled: false
title: qsTr('Detector efficiency correction using vanadium standard')
icon: 'hammer'
collapsed: false

Loader { source: 'Groups/VanadiumCorrection.qml' }
}

// Apply corrections button
Row {
spacing: EaStyle.Sizes.fontPixelSize
EaElements.GroupBox {
collapsible: false


EaElements.SideBarButton {
id: applyCorrectionsButton
text: qsTr('Apply selected corrections')
wide: true
fontIcon: 'download'
fontIcon: 'check-circle'

onClicked: {
console.debug(`In ${this}: Apply corrections clicked.`)
}
}
}

}
Loading
Loading