Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SGS18-READEX
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Ondrej Vysocky
SGS18-READEX
Commits
029db460
Commit
029db460
authored
7 years ago
by
Ivo Peterek
Browse files
Options
Downloads
Patches
Plain Diff
TMP: working on combobox items selection
#2
parent
fc11cecb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
radarGUI.py
+28
-4
28 additions, 4 deletions
radarGUI.py
with
28 additions
and
4 deletions
radarGUI.py
+
28
−
4
View file @
029db460
...
...
@@ -12,6 +12,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class
Ui_TabWidget
(
object
):
def
__init__
(
self
):
self
.
current_labels_dic
=
{
'
xLabel
'
:
None
,
'
funcLabel
'
:
None
}
self
.
tab_widget
=
None
self
.
data_path
=
''
self
.
config_path
=
''
...
...
@@ -189,6 +190,7 @@ class Ui_TabWidget(object):
lineEdit_parameters_list
=
[]
self
.
comboBox_parameters_list
=
[]
self
.
all_parameters
=
[
'
key
'
,
'
config
'
,
'
funcLabel
'
,
'
xLabel
'
]
self
.
combobox_items_dic
=
{}
for
i
in
range
(
self
.
parameters_count
):
label_parameters_list
.
append
(
QtWidgets
.
QLabel
(
'
Parameter {}
'
.
format
(
i
+
1
)))
label_parameters_list
[
i
].
setFont
(
font
)
...
...
@@ -196,6 +198,9 @@ class Ui_TabWidget(object):
lineEdit_parameters_list
.
append
(
QtWidgets
.
QLineEdit
())
self
.
comboBox_parameters_list
.
append
(
QtWidgets
.
QComboBox
())
self
.
combobox_items_dic
[
self
.
comboBox_parameters_list
[
-
1
]]
=
list
(
self
.
all_parameters
)
func_list
=
[]
...
...
@@ -454,7 +459,6 @@ class Ui_TabWidget(object):
def
retranslateUi
(
self
,
TabWidget_p
):
_translate
=
QtCore
.
QCoreApplication
.
translate
TabWidget_p
.
setWindowTitle
(
_translate
(
"
TabWidget
"
,
"
Radar configuration
"
))
...
...
@@ -528,12 +532,32 @@ class Ui_TabWidget(object):
def
__parameters_combobox
(
self
,
current_combo_box
):
self
.
unused_labels
=
self
.
all_parameters
if
current_combo_box
.
currentText
()
in
[
'
xLabel
'
,
'
funcLabel
'
]:
self
.
unused_labels
.
remove
(
current_combo_box
.
currentText
())
if
self
.
current_labels_dic
[
current_combo_box
.
currentText
()]
!=
current_combo_box
:
self
.
current_labels_dic
[
current_combo_box
.
currentText
()]
=
current_combo_box
for
key
,
val
in
self
.
combobox_items_dic
.
items
():
if
key
==
current_combo_box
:
continue
self
.
combobox_items_dic
[
key
].
remove
(
current_combo_box
.
currentText
())
key
.
clear
()
key
.
addItems
(
self
.
combobox_items_dic
[
key
])
else
:
if
current_combo_box
in
self
.
current_labels_dic
.
values
():
self
.
current_labels_dic
[
current_combo_box
.
currentText
()]
=
None
for
key
,
val
in
self
.
combobox_items_dic
.
items
():
if
key
==
current_combo_box
:
continue
self
.
combobox_items_dic
[
key
].
append
(
current_combo_box
.
currentText
())
key
.
clear
()
key
.
addItems
(
self
.
combobox_items_dic
[
key
])
for
e
in
[
l
for
l
in
self
.
comboBox_parameters_list
if
l
is
not
current_combo_box
]:
'''
for e in [l for l in self.comboBox_parameters_list if l is not current_combo_box]:
e.clear()
e
.
addItems
(
self
.
unused_labels
)
e.addItems(self.unused_labels)
'''
...
...
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