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
a01f48c8
Commit
a01f48c8
authored
1 year ago
by
Lan Dam
Browse files
Options
Downloads
Patches
Plain Diff
trivial modify for type hint and variable name
parent
2d5affef
No related branches found
No related tags found
1 merge request
!217
Implement dialogs to edit valueColors for 2 multiColorDots plot types
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sohstationviewer/view/db_config/value_color_helper/edit_value_color_dialog/multi_color_dot_dialog.py
+7
-6
7 additions, 6 deletions
..._helper/edit_value_color_dialog/multi_color_dot_dialog.py
with
7 additions
and
6 deletions
sohstationviewer/view/db_config/value_color_helper/edit_value_color_dialog/multi_color_dot_dialog.py
+
7
−
6
View file @
a01f48c8
import
sys
import
platform
import
os
from
typing
import
List
,
Dict
from
typing
import
List
,
Dict
,
Optional
from
PySide2
import
QtWidgets
,
QtCore
,
QtGui
from
PySide2.QtWidgets
import
QWidget
...
...
@@ -23,14 +23,14 @@ class BoundValidator(QtGui.QValidator):
Value
'
-
'
to allow typing negative float. If user type
'
-
'
only, it will
be checked when editing is finished.
"""
def
validate
(
self
,
input
,
pos
):
if
input
in
[
''
,
'
-
'
]:
def
validate
(
self
,
input
_val
,
pos
):
if
input
_val
in
[
''
,
'
-
'
]:
return
QtGui
.
QValidator
.
Acceptable
try
:
input
=
float
(
input
)
input
_val
=
float
(
input
_val
)
except
ValueError
:
return
QtGui
.
QValidator
.
Invalid
if
-
10
<=
input
<=
10
:
if
-
10
<=
input
_val
<=
10
:
return
QtGui
.
QValidator
.
Acceptable
else
:
return
QtGui
.
QValidator
.
Invalid
...
...
@@ -38,7 +38,8 @@ class BoundValidator(QtGui.QValidator):
class
MultiColorDotDialog
(
EditValueColorDialog
):
def
__init__
(
self
,
parent
:
QWidget
,
value_color_str
:
str
,
upper_equal
:
bool
):
self
,
parent
:
Optional
[
QWidget
],
value_color_str
:
str
,
upper_equal
:
bool
):
"""
Dialog to edit color for Multi-color Dot Plot
...
...
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