Skip to content

Commit

Permalink
updating ui. this refs #76
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBilheux committed Aug 16, 2023
1 parent 6fbb433 commit b22c035
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 138 deletions.
4 changes: 2 additions & 2 deletions src/hyperctui/autonomous_reconstruction/event_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ def start_acquisition(self):
self.parent.ui.autonomous_tof_regions_groupBox.setEnabled(False)
self.parent.ui.start_first_reconstruction_pushButton.setEnabled(False)
self.parent.ui.start_first_reconstruction_pushButton.setStyleSheet(normal_style)
self.parent.ui.autonomous_refresh_pushButton.setEnabled(True)

# enable table
# enable
self.parent.ui.autonomous_refresh_pushButton.setEnabled(True)
self.parent.ui.autonomous_monitor_groupBox.setVisible(True)
self.parent.ui.autonomous_refresh_pushButton.setStyleSheet(interact_me_style)

Expand Down
1 change: 1 addition & 0 deletions src/hyperctui/session/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class SessionKeys:

# evaluation regions
evaluation_regions = "evaluation regions dict"
evaluation_frequency = "evaluation frequency"

# tof regions
tof_roi_region = "TOF ROI region of top view dict"
Expand Down
6 changes: 6 additions & 0 deletions src/hyperctui/session/session_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ def save_from_ui(self):
new_tof_regions[str(_key)] = tof_regions[_key]
session_dict[SessionKeys.tof_regions] = new_tof_regions

# evaluation frequency
session_dict[SessionKeys.evaluation_frequency] = self.parent.ui.evaluation_frequency_spinBox.value()

self.parent.session_dict = session_dict

def load_to_ui(self):
Expand Down Expand Up @@ -245,6 +248,9 @@ def load_to_ui(self):
new_evaluation_regions[int(_key)] = self.parent.evaluation_regions[_key]
self.parent.evaluation_regions = new_evaluation_regions

evaluation_frequency = session_dict.get(SessionKeys.evaluation_frequency, 3)
self.parent.ui.evaluation_frequency_spinBox.setValue(evaluation_frequency)

## tof top ROI regions
if not session_dict.get(SessionKeys.tof_roi_region, None):
session_dict[SessionKeys.tof_roi_region] = {'x0': 5,
Expand Down
261 changes: 125 additions & 136 deletions src/hyperctui/ui/main_application.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1378,156 +1378,145 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="autonomous_monitor_groupBox">
<property name="title">
<string>Monitor</string>
<widget class="QTabWidget" name="tabWidget_2">
<property name="currentIndex">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout_21">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_19">
<item>
<spacer name="horizontalSpacer_16">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="autonomous_refresh_pushButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Refresh table</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTableWidget" name="autonomous_reconstruction_tableWidget">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<column>
<property name="text">
<string>Folder name</string>
</property>
</column>
<column>
<property name="text">
<string>Log</string>
</property>
</column>
<column>
<property name="text">
<string>Err</string>
<widget class="QWidget" name="tab_7">
<attribute name="title">
<string>projections</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_23">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_19">
<item>
<spacer name="horizontalSpacer_16">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="autonomous_refresh_pushButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Refresh table</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTableWidget" name="autonomous_reconstruction_tableWidget">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
</column>
<column>
<property name="text">
<string>Meta.</string>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
</column>
<column>
<property name="text">
<string>Status</string>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
</column>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="autonomous_reconstructed_groupBox">
<property name="title">
<string>Reconstructed images</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_20">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_16">
<item>
<widget class="QLabel" name="label_13">
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<column>
<property name="text">
<string>Location:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="autonomous_reconstructed_location_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<string>Folder name</string>
</property>
</column>
<column>
<property name="text">
<string>N/A</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="autonomous_checking_reconstruction_pushButton">
<property name="enabled">
<bool>false</bool>
<string>Log</string>
</property>
</column>
<column>
<property name="text">
<string>Checking reconstruction</string>
<string>Err</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_17">
<item>
<widget class="QLabel" name="label_11">
</column>
<column>
<property name="text">
<string>Reconstruction process:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="autonomous_reconstructed_status_label">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
<string>Meta.</string>
</property>
</column>
<column>
<property name="text">
<string>N/A</string>
<string>Status</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</column>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_8">
<attribute name="title">
<string>reconstructions</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_21">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_18">
<item>
<widget class="QLabel" name="label_13">
<property name="text">
<string>Location:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="autonomous_reconstructed_location_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>N/A</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_15">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="autonomous_checking_reconstruction_pushButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Checking reconstruction</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTableWidget" name="tableWidget"/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
Expand Down

0 comments on commit b22c035

Please sign in to comment.