Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SOHViewer
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Software Public
PASSOFT
SOHViewer
Commits
4d87d055
Commit
4d87d055
authored
1 year ago
by
Lan Dam
Browse files
Options
Downloads
Patches
Plain Diff
change back conversion widget to QLineEdit because conversion can go down to 1.0e-06
parent
dda80caa
No related branches found
No related tags found
1 merge request
!211
Implement dialog to add/edit a single channel in database
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sohstationviewer/view/db_config/add_edit_single_channel_dialog.py
+9
-8
9 additions, 8 deletions
...onviewer/view/db_config/add_edit_single_channel_dialog.py
with
9 additions
and
8 deletions
sohstationviewer/view/db_config/add_edit_single_channel_dialog.py
+
9
−
8
View file @
4d87d055
...
...
@@ -3,7 +3,7 @@ import platform
import
os
from
typing
import
Optional
,
Dict
from
PySide2
import
QtWidgets
from
PySide2
import
QtWidgets
,
QtGui
from
PySide2.QtWidgets
import
QWidget
,
QDialog
,
QLineEdit
from
sohstationviewer.view.util.plot_func_names
import
plot_functions
...
...
@@ -72,13 +72,14 @@ class AddEditSingleChannelDialog(QDialog):
"
added to channel name to be displayed
"
)
# convert factor to change from count to actual value
self
.
conversion_lnedit
=
QtWidgets
.
QSpinBox
()
self
.
conversion_lnedit
.
setMinimum
(
0
)
self
.
conversion_lnedit
.
setMaximum
(
5
)
self
.
conversion_lnedit
.
setToolTip
(
self
.
convesion_lnedit
=
QtWidgets
.
QLineEdit
(
self
)
self
.
convesion_lnedit
.
setPlaceholderText
(
"
to convert from count to actual value
"
)
self
.
conversion_lnedit
.
setValue
(
1
)
validator
=
QtGui
.
QDoubleValidator
(
0.0
,
5.0
,
6
)
validator
.
setNotation
(
QtGui
.
QDoubleValidator
.
StandardNotation
)
self
.
convesion_lnedit
.
setValidator
(
validator
)
self
.
convesion_lnedit
.
setText
(
'
1
'
)
# channel's unit
self
.
unit_lnedit
=
QtWidgets
.
QLineEdit
(
self
)
...
...
@@ -223,8 +224,8 @@ class AddEditSingleChannelDialog(QDialog):
self
.
label_lnedit
.
setText
(
self
.
channel_info
[
'
label
'
])
self
.
conve
r
sion_lnedit
.
set
Value
(
float
(
self
.
channel_info
[
'
convertFactor
'
]))
self
.
convesion_lnedit
.
set
Text
(
str
(
float
(
self
.
channel_info
[
'
convertFactor
'
]))
)
self
.
unit_lnedit
.
setText
(
self
.
channel_info
[
'
unit
'
])
...
...
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