Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
pymsc
Commits
8ee4f5a0
Commit
8ee4f5a0
authored
Jul 09, 2015
by
Maxime Perrotin
Browse files
MSC can show extra characters
parent
b3e636b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
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
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