Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pymsc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
TASTE
pymsc
Commits
8ee4f5a0
Commit
8ee4f5a0
authored
Jul 09, 2015
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MSC can show extra characters
parent
b3e636b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
msccore/mscelement.py
msccore/mscelement.py
+5
-3
msccore/mscprocedure.py
msccore/mscprocedure.py
+4
-1
mscgraphics/basicmscgraph/mscGraphProcedure.py
mscgraphics/basicmscgraph/mscGraphProcedure.py
+2
-2
No files found.
msccore/mscelement.py
View file @
8ee4f5a0
...
...
@@ -42,8 +42,7 @@ the name of the element. To modify the name of the element use the method
:meth:`MscElement.setName` and to read the name of the element use
:meth:`MscElement.name`.
"""
from
PySide.QtCore
import
QObject
,
Signal
from
PySide.QtCore
import
QRegExp
from
PySide.QtCore
import
QObject
,
Signal
,
QRegExp
import
mscregexp
...
...
@@ -107,13 +106,16 @@ class MscElement(QObject):
:meth:`MscElement.delete`
"""
_NameRegExp
=
None
def
__init__
(
self
,
name
=
''
,
parent
=
None
,
elemType
=
TYPE
):
'''
construct
'''
super
(
MscElement
,
self
).
__init__
(
parent
)
self
.
_name
=
''
self
.
_NameRegExp
=
QRegExp
(
'('
+
mscregexp
.
Name
+
')'
)
if
not
self
.
_NameRegExp
:
self
.
_NameRegExp
=
QRegExp
(
'('
+
mscregexp
.
Name
+
')'
)
self
.
elemType
=
elemType
self
.
setName
(
name
)
self
.
_comment
=
u""
...
...
msccore/mscprocedure.py
View file @
8ee4f5a0
...
...
@@ -33,7 +33,8 @@ within the MSC.
"""
from
mscelement
import
MscElement
import
mscregexp
from
PySide.QtCore
import
QRegExp
class
MscProcedure
(
MscElement
):
u"""
...
...
@@ -43,6 +44,8 @@ class MscProcedure(MscElement):
:type parent: PySide.QtCore.QObject
"""
TYPE
=
u"Procedure"
# Label allow more character than basic MscElement
_NameRegExp
=
QRegExp
(
'('
+
mscregexp
.
Text
+
')'
)
def
__init__
(
self
,
name
,
orderPos
=
0
,
parent
=
None
):
'''
...
...
mscgraphics/basicmscgraph/mscGraphProcedure.py
View file @
8ee4f5a0
...
...
@@ -93,7 +93,7 @@ class MscGraphProcedure(MscGraphItem):
self
.
label
.
setTextLabel
(
self
.
mscData
().
getName
())
def
updateLabelPosition
(
self
):
self
.
label
.
setCenterPos
(
QPointF
(
0
,
15
))
self
.
label
.
setCenterPos
(
QPointF
(
3
0
,
15
))
#**************************************************************************
# Item Change
...
...
@@ -122,7 +122,7 @@ class MscGraphProcedure(MscGraphItem):
self
.
mscData
().
setAbsPos
(
self
.
mapToScene
(
0
,
0
).
y
())
self
.
yHasChanged
.
emit
(
self
)
return
value
#MscGraphItem.itemChange(self, change, value)
return
value
#**************************************************************************
# Paint Functions
...
...
Write
Preview
Markdown
is supported
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