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
Guillaume Sabbagh
Modification de categories
Commits
abd60667
Commit
abd60667
authored
Jun 22, 2021
by
Francois Mares
Browse files
add export graphviz
parent
7323a04a
Changes
2
Hide whitespace changes
Inline
Side-by-side
GUI/tk/MainWindow.py
View file @
abd60667
...
...
@@ -134,8 +134,13 @@ class MainWindow:
i
+=
1
def
exporterGraphviz
(
self
):
#transformer_graphviz()
print
(
"Graphviz"
)
uids
=
self
.
_objFrame
.
getSelectedObjects
()
data
=
self
.
_controller
.
getModel
().
getObject
(
uids
)
for
index
,
row
in
data
.
iterrows
():
obj
=
row
[
"object"
]
if
callable
(
getattr
(
obj
,
"transformer_graphviz"
,
None
)):
obj
.
transformer_graphviz
()
class
ExportAsDialog
(
Toplevel
):
...
...
GUI/tk/NewObjectFrame.py
View file @
abd60667
...
...
@@ -108,24 +108,29 @@ class LabelText(LabelFrame):
_TEXT_MAX_SIZE
=
100
_text
=
None
_scrollbarY
=
None
_description
=
None
def
__init__
(
self
,
parent
,
name
:
str
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
parent
,
name
:
str
,
description
:
str
=
None
,
*
args
,
**
kwargs
):
LabelFrame
.
__init__
(
self
,
parent
,
bd
=
parameters
.
FRAME_BD
,
text
=
name
,
*
args
,
**
kwargs
)
self
.
_description
=
description
self
.
_initFrame
()
def
_initFrame
(
self
):
self
.
columnconfigure
(
0
,
weight
=
1
,
minsize
=
20
)
self
.
columnconfigure
(
1
,
minsize
=
16
)
self
.
rowconfigure
(
0
,
weight
=
1
,
minsize
=
20
)
self
.
rowconfigure
(
1
,
weight
=
1
,
minsize
=
20
)
if
self
.
_description
:
Label
(
self
,
text
=
self
.
_description
,
anchor
=
"w"
).
grid
(
row
=
0
,
column
=
0
,
sticky
=
"new"
)
self
.
_text
=
Text
(
self
)
self
.
_text
.
grid
(
row
=
0
,
column
=
0
,
sticky
=
"nw"
)
self
.
_text
.
grid
(
row
=
1
,
column
=
0
,
sticky
=
"nw"
)
self
.
_scrollbarY
=
Scrollbar
(
self
,
orient
=
VERTICAL
)
self
.
_scrollbarY
.
grid
(
row
=
0
,
column
=
1
,
sticky
=
"nsw"
)
self
.
_scrollbarY
.
grid
(
row
=
1
,
column
=
1
,
sticky
=
"nsw"
)
self
.
_text
.
configure
(
yscrollcommand
=
self
.
_scrollbarY
.
set
)
self
.
_scrollbarY
.
config
(
command
=
self
.
_text
.
yview
)
...
...
@@ -136,7 +141,7 @@ class LabelText(LabelFrame):
class
ObjectLabelText
(
LabelText
):
def
__init__
(
self
,
parent
,
*
args
,
**
kwargs
):
LabelText
.
__init__
(
self
,
parent
,
name
=
"Objets"
,
*
args
,
**
kwargs
)
LabelText
.
__init__
(
self
,
parent
,
name
=
"Objets"
,
description
=
"ex: 1,2,3..."
,
*
args
,
**
kwargs
)
def
getObjectsList
(
self
):
return
[
x
for
x
in
split
(
'[,
\n
]'
,
self
.
getText
())
if
x
]
...
...
@@ -144,7 +149,7 @@ class ObjectLabelText(LabelText):
class
MorphismeLabelText
(
LabelText
):
def
__init__
(
self
,
parent
,
*
args
,
**
kwargs
):
LabelText
.
__init__
(
self
,
parent
,
name
=
"Morphismes"
,
*
args
,
**
kwargs
)
LabelText
.
__init__
(
self
,
parent
,
name
=
"Morphismes"
,
description
=
"ex: (1,2,f)(2,3,g)..."
,
*
args
,
**
kwargs
)
def
getMorphismesList
(
self
):
# (...)
...
...
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