Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.editor
Commits
a89a04bb
Commit
a89a04bb
authored
May 21, 2019
by
Samuel GAIST
Browse files
[widgets][dataformateditor] Improved buttons
parent
01bb594b
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/editor/widgets/dataformateditor.py
View file @
a89a04bb
...
...
@@ -63,20 +63,20 @@ def create_button_layout(button):
def
create_add_button_layout
():
"""Returns a ready to use layout as well as add actions"""
add_pushbutton
=
QPushButton
(
"+"
)
add_pushbutton
=
QPushButton
(
QCoreApplication
.
translate
(
"Dataformat"
,
"Add"
))
add_menu
=
QMenu
()
add_type_action
=
add_menu
.
addAction
(
QCoreApplication
.
translate
(
"Dataformat"
,
"
Add t
ype"
)
QCoreApplication
.
translate
(
"Dataformat"
,
"
T
ype"
)
)
add_object_action
=
add_menu
.
addAction
(
QCoreApplication
.
translate
(
"Dataformat"
,
"
Add o
bject"
)
QCoreApplication
.
translate
(
"Dataformat"
,
"
O
bject"
)
)
add_type_array_action
=
add_menu
.
addAction
(
QCoreApplication
.
translate
(
"Dataformat"
,
"
Add t
ype array"
)
QCoreApplication
.
translate
(
"Dataformat"
,
"
T
ype array"
)
)
add_object_array_action
=
add_menu
.
addAction
(
QCoreApplication
.
translate
(
"Dataformat"
,
"
Add o
bject array"
)
QCoreApplication
.
translate
(
"Dataformat"
,
"
O
bject array"
)
)
add_pushbutton
.
setMenu
(
add_menu
)
...
...
@@ -117,6 +117,8 @@ class DataformatBaseWidget(QWidget):
self
.
__has_name
=
False
self
.
delete_button
=
QPushButton
(
self
.
tr
(
"-"
))
self
.
delete_button
.
setFixedSize
(
30
,
30
)
delete_layout
=
QHBoxLayout
()
delete_layout
.
addStretch
(
1
)
delete_layout
.
addWidget
(
self
.
delete_button
)
...
...
@@ -407,6 +409,7 @@ class DataformatArrayWidget(DataformatBaseWidget):
self
.
dimension_box
=
QGroupBox
(
self
.
tr
(
"Dimensions"
))
self
.
add_dimension_button
=
QPushButton
(
self
.
tr
(
"+"
))
self
.
add_dimension_button
.
setFixedSize
(
30
,
30
)
add_dimension_layout
=
create_button_layout
(
self
.
add_dimension_button
)
self
.
dimension_layout
=
QVBoxLayout
(
self
.
dimension_box
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment