Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
AVVR-Pipeline-GDP4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GDP Project 4
AVVR-Pipeline-GDP4
Commits
dbc2c2b9
Commit
dbc2c2b9
authored
6 months ago
by
mhby1g21
Browse files
Options
Downloads
Plain Diff
Merge branch 'temp-fix-gui-freezes' into 'master'
fixed gui freezes See merge request
!10
parents
c67fc9cf
b92a25e5
No related branches found
No related tags found
1 merge request
!10
fixed gui freezes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/simple_tab.py
+40
-27
40 additions, 27 deletions
scripts/simple_tab.py
with
40 additions
and
27 deletions
scripts/simple_tab.py
+
40
−
27
View file @
dbc2c2b9
...
...
@@ -244,6 +244,9 @@ class SimpleTab(QWidget):
self
.
shift_image_check
.
setStyleSheet
(
"
QCheckBox { margin: 5px; background-color: #3e3e3e;}
"
)
options_layout
.
addWidget
(
self
.
shift_image_check
)
#TODO: FIX THIS, BREAKS THE APP WHEN ENABLED AND PIPELINE IS RUN
self
.
shift_image_check
.
setEnabled
(
False
)
# SSC Model selection
ssc_model_layout
=
QHBoxLayout
()
ssc_model_label
=
QLabel
(
"
SSC Model:
"
)
...
...
@@ -342,7 +345,7 @@ class SimpleTab(QWidget):
layout
.
addWidget
(
controls_group
)
# Image Distance section
#
#
Image Distance section
self
.
image_distance_group
=
QGroupBox
(
"
Image Distance
"
)
distance_layout
=
QVBoxLayout
(
self
.
image_distance_group
)
info_label
=
QLabel
(
"
Please select two point on the image and input the distance from the camera to that point.
"
)
...
...
@@ -353,24 +356,24 @@ class SimpleTab(QWidget):
self
.
points_info_label
=
QLabel
()
# Label to display points and distances
self
.
points_info_label
.
setAlignment
(
Qt
.
AlignmentFlag
.
AlignTop
|
Qt
.
AlignmentFlag
.
AlignCenter
)
self
.
image_distance_group
.
setStyleSheet
(
"""
QGroupBox {
font-weight: bold;
border: 2px solid grey;
border-radius: 20px;
margin-top: 10px;
background-color: #3e3e3e;
padding: 20px;
}
QGroupBox::title {
margin: 10px;
background-color: transparent;
color: white;
}
QLabel {
margin: 5px;
background-color: #3e3e3e;
color: white;
}
QGroupBox {
font-weight: bold;
border: 2px solid grey;
border-radius: 20px;
margin-top: 10px;
background-color: #3e3e3e;
padding: 20px;
}
QGroupBox::title {
margin: 10px;
background-color: transparent;
color: white;
}
QLabel {
margin: 5px;
background-color: #3e3e3e;
color: white;
}
"""
)
# Center the ClickableLabel within its parent layout
distance_preview_layout
=
QHBoxLayout
()
...
...
@@ -382,11 +385,11 @@ class SimpleTab(QWidget):
self
.
distance_reset_btn
.
clicked
.
connect
(
self
.
distance_preview
.
clear_points
)
self
.
distance_reset_btn
.
setFixedSize
(
150
,
40
)
self
.
distance_reset_btn
.
setStyleSheet
(
"""
QPushButton {
margin: 5px;
padding: 5px;
border-radius: 10px;
}
QPushButton {
margin: 5px;
padding: 5px;
border-radius: 10px;
}
"""
)
distance_btn_layout
=
QHBoxLayout
()
distance_btn_layout
.
addStretch
()
...
...
@@ -526,7 +529,7 @@ class SimpleTab(QWidget):
self
.
update_status
(
"
Waiting for distance points...
"
)
self
.
info_labels
[
"
Status:
"
].
setText
(
"
Waiting for distance points...
"
)
# Enable the run pipeline button
#
self.run_pipeline_btn.setEnabled(True)
self
.
run_pipeline_btn
.
setEnabled
(
True
)
# Provide input path to all modules
self
.
shifter
.
input_file_path
=
file_path
...
...
@@ -586,7 +589,8 @@ class SimpleTab(QWidget):
self
.
pipeline_thread
.
finished
.
connect
(
self
.
pipeline_completed
)
# Disable controls while running
self
.
setEnabled
(
False
)
#self.setEnabled(False)
self
.
disable_buttons_while_running
()
self
.
progress_bar
.
setEnabled
(
True
)
# Keep progress bar enabled
#TODO: Add model selection for EdgeNet or MDBNet
...
...
@@ -616,4 +620,13 @@ class SimpleTab(QWidget):
self
.
info_labels
[
"
Status:
"
].
setText
(
message
.
split
(
"
...
"
)[
-
1
]
if
"
...
"
in
message
else
message
)
# Scroll to bottom
scrollbar
=
self
.
status_text
.
verticalScrollBar
()
scrollbar
.
setValue
(
scrollbar
.
maximum
())
\ No newline at end of file
scrollbar
.
setValue
(
scrollbar
.
maximum
())
def
disable_buttons_while_running
(
self
):
self
.
select_btn
.
setEnabled
(
False
)
self
.
run_pipeline_btn
.
setEnabled
(
False
)
self
.
include_top_check
.
setEnabled
(
False
)
self
.
shift_image_check
.
setEnabled
(
False
)
self
.
ssc_model_combo
.
setEnabled
(
False
)
self
.
distance_reset_btn
.
setEnabled
(
False
)
self
.
distance_preview
.
setEnabled
(
False
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment