Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.editor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
beat
beat.editor
Commits
4d452a77
Commit
4d452a77
authored
6 years ago
by
Flavio TARSETTI
Browse files
Options
Downloads
Patches
Plain Diff
[widget] added dirty flag signal and updated description label
parent
71baf4b3
No related branches found
No related tags found
1 merge request
!55
Reusable widget short description
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beat/editor/widgets/description.py
+6
-3
6 additions, 3 deletions
beat/editor/widgets/description.py
with
6 additions
and
3 deletions
beat/editor/widgets/description.py
+
6
−
3
View file @
4d452a77
...
...
@@ -23,8 +23,9 @@
# #
###############################################################################
from
PyQt5.QtCore
import
pyqtSignal
from
PyQt5.QtWidgets
import
QLineEdit
from
PyQt5.QtWidgets
import
QLabel
from
PyQt5.QtWidgets
import
QWidget
from
PyQt5.QtWidgets
import
QFormLayout
...
...
@@ -32,16 +33,17 @@ from PyQt5.QtWidgets import QFormLayout
class
DescriptionWidget
(
QWidget
):
"""
Class representing the short description of a beat object
"""
data_changed
=
pyqtSignal
()
def
__init__
(
self
,
parent
=
None
):
"""
Constructor
"""
super
(
DescriptionWidget
,
self
).
__init__
(
parent
)
self
.
form_label
=
QLabel
(
"
Short Description:
"
)
self
.
form_description
=
QLineEdit
()
layout
=
QFormLayout
(
self
)
layout
.
addRow
(
self
.
form_label
,
self
.
form_description
)
layout
.
addRow
(
self
.
tr
(
"
Short Description:
"
)
,
self
.
form_description
)
@property
def
short_description
(
self
):
...
...
@@ -52,3 +54,4 @@ class DescriptionWidget(QWidget):
@short_description.setter
def
short_description
(
self
,
name
):
self
.
form_description
.
setText
(
name
)
self
.
data_changed
.
emit
()
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