Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
su
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
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
dmeiss2s
su
Commits
8f8ceb82
Commit
8f8ceb82
authored
9 years ago
by
Daniel Meißner
Committed by
Daniel Meißner
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
gui: added widget to view results, still WIP
parent
b03c4033
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/gui/gui.py
+13
-3
13 additions, 3 deletions
lib/gui/gui.py
lib/gui/results.py
+32
-0
32 additions, 0 deletions
lib/gui/results.py
lib/gui/su_results.ui
+103
-0
103 additions, 0 deletions
lib/gui/su_results.ui
with
148 additions
and
3 deletions
lib/gui/gui.py
+
13
−
3
View file @
8f8ceb82
...
...
@@ -17,6 +17,7 @@ from lib.gr.noise_detect import NoiseFloorDetect
from
lib.gui.update_progress_bar
import
UpdateProgressBar
from
lib.gui.capture
import
Capture
from
lib.gui.noise_floor_plot
import
NoiseFloorPlot
from
lib.gui.results
import
Results
class
SuGui
(
QtWidgets
.
QMainWindow
):
...
...
@@ -168,9 +169,6 @@ class SuGui(QtWidgets.QMainWindow):
logging
.
info
(
"
Close application
"
)
QtCore
.
QCoreApplication
.
instance
().
quit
()
def
results_button
(
self
):
pass
def
refresh_hw_button
(
self
):
"""
Refresh combo box with current connected hardware.
...
...
@@ -215,6 +213,17 @@ class SuGui(QtWidgets.QMainWindow):
self
.
nf_plot
.
label_data
.
setText
(
string
)
self
.
nf_plot
.
show
()
def
results_button
(
self
):
if
len
(
Disk
.
get_su_created_folders
(
self
.
lineEdit_dump_file
.
text
()))
==
0
:
QtWidgets
.
QMessageBox
.
about
(
self
,
"
No su path selected
"
,
"
Please select a su path.
"
)
else
:
self
.
results
=
Results
(
self
.
lineEdit_dump_file
.
text
())
self
.
results
.
show
()
def
nf_plot_result
(
self
,
result
):
print
(
"
Returned nf detect thread.
"
)
self
.
nf_result
=
result
...
...
@@ -229,6 +238,7 @@ class SuGui(QtWidgets.QMainWindow):
self
.
label_file_overwrite
.
setText
(
"
not writable
"
)
self
.
label_file_overwrite
.
setStyleSheet
(
'
color: red
'
)
else
:
self
.
button_results
.
setEnabled
(
False
)
self
.
label_file_overwrite
.
setText
(
""
)
self
.
label_disk_space
.
setText
(
"
Free disk space:
\n
"
\
""
+
Disk
.
sizeof_fmt
(
free_disk_space
))
...
...
This diff is collapsed.
Click to expand it.
lib/gui/results.py
0 → 100644
+
32
−
0
View file @
8f8ceb82
# -*- coding: utf-8 -*-
from
PyQt5
import
QtCore
,
QtGui
,
QtWidgets
,
uic
from
lib.disk
import
Disk
class
Results
(
QtWidgets
.
QMainWindow
):
def
__init__
(
self
,
path
):
super
(
Results
,
self
).
__init__
()
uic
.
loadUi
(
"
lib/gui/su_results.ui
"
,
self
)
self
.
path
=
path
self
.
setWindowTitle
(
"
Measurements in %s
"
%
self
.
path
)
self
.
tableView_results
.
setDisabled
(
True
)
self
.
button_close
.
clicked
.
connect
(
self
.
close_button
)
# holds full path
self
.
su_directories
=
Disk
.
get_su_created_folders
(
path
)
self
.
create_table_view
()
def
close_button
(
self
):
"""
Close button action
"""
self
.
close
()
def
create_table_view
(
self
):
pass
This diff is collapsed.
Click to expand it.
lib/gui/su_results.ui
0 → 100644
+
103
−
0
View file @
8f8ceb82
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
SU::Results
</class>
<widget
class=
"QMainWindow"
name=
"SU::Results"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
1009
</width>
<height>
571
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string/>
</property>
<widget
class=
"QWidget"
name=
"centralWidget"
>
<widget
class=
"QPushButton"
name=
"button_close"
>
<property
name=
"geometry"
>
<rect>
<x>
860
</x>
<y>
530
</y>
<width>
141
</width>
<height>
31
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Close
</string>
</property>
</widget>
<widget
class=
"QColumnView"
name=
"columnView_runs"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
10
</y>
<width>
301
</width>
<height>
271
</height>
</rect>
</property>
</widget>
<widget
class=
"QTableView"
name=
"tableView_results"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"geometry"
>
<rect>
<x>
320
</x>
<y>
10
</y>
<width>
681
</width>
<height>
511
</height>
</rect>
</property>
</widget>
<widget
class=
"QPushButton"
name=
"button_close_2"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
530
</y>
<width>
301
</width>
<height>
31
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Run signal detection
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
290
</y>
<width>
291
</width>
<height>
231
</height>
</rect>
</property>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"textFormat"
>
<enum>
Qt::AutoText
</enum>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
</set>
</property>
</widget>
</widget>
<action
name=
"actionAbout"
>
<property
name=
"text"
>
<string>
About
</string>
</property>
</action>
<action
name=
"actionQuit"
>
<property
name=
"text"
>
<string>
Quit
</string>
</property>
</action>
</widget>
<layoutdefault
spacing=
"6"
margin=
"11"
/>
<tabstops>
<tabstop>
button_close
</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
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