Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyAmak - IHM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
SMAC
AMAK
Python
PyAMAK
pyAmak - IHM
Commits
6cace0c7
Commit
6cace0c7
authored
4 years ago
by
Jdrezen
Browse files
Options
Downloads
Patches
Plain Diff
Nettoyage du constructeur
parent
15576700
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pyAmakIHM/classes/fenetre.py
+9
-58
9 additions, 58 deletions
pyAmakIHM/classes/fenetre.py
pyAmakIHM/classes/panelLogs.py
+2
-4
2 additions, 4 deletions
pyAmakIHM/classes/panelLogs.py
with
11 additions
and
62 deletions
pyAmakIHM/classes/fenetre.py
+
9
−
58
View file @
6cace0c7
...
...
@@ -22,11 +22,10 @@ class Fenetre :
Class Fenetre
"""
"""
def
__init__
(
self
,
name
: str
) -> None
:
name
:
str
)
->
None
:
self
.
__observer
=
None
...
...
@@ -38,57 +37,15 @@ class Fenetre :
self
.
__root
.
title
(
name
)
self.__root.geometry(
"
850x45
0
"
)
self
.
__root
.
geometry
(
"
1000x70
0
"
)
self
.
__panelCommandes
=
PanelCommandes
(
self
.
__root
)
self.__onglet = ttk.Notebook (self.__root)
self.__onglet.pack(fill=
'
both
'
,side=
'
right
'
,expand=
'
yes
'
)
self.__onglet.bind(
'
<ButtonPress>
'
,self.drag_tab)
self.__panelGraphiques = []
self.__panelVue = PanelVue(self.__onglet)
self.__onglet.add(self.__panelVue, text =
"
Vue
"
)
"""
def
__init__
(
self
,
name
:
str
)
->
None
:
self
.
__division
=
PanedWindow
(
self
.
__root
,
orient
=
'
vertical
'
)
self
.
__division
.
pack
(
side
=
'
right
'
,
expand
=
'
yes
'
,
fill
=
'
both
'
)
self
.
__images
=
[]
"""
1200/850=1,41 700/450==1,56
"""
self
.
__root
=
Tk
()
self
.
__onglet
=
ttk
.
Notebook
(
self
.
__division
)
self
.
__root
.
title
(
name
)
self
.
__root
.
geometry
(
"
850x650
"
)
self
.
__panelCommandes
=
PanelCommandes
(
self
.
__root
)
"""
support of the division of the right part
"""
self
.
__support
=
LabelFrame
(
self
.
__root
)
self
.
__support
.
pack
(
side
=
BOTTOM
,
expand
=
'
y
'
,
fill
=
'
both
'
,
pady
=
2
,
padx
=
2
)
"""
self.__support.place(height=435,width=600,relx=0.2575,rely=0.01)
division of the right part
"""
self
.
__division
=
PanedWindow
(
self
.
__support
,
orient
=
'
vertical
'
)
self
.
__division
.
pack
(
side
=
'
top
'
,
expand
=
'
y
'
,
fill
=
'
both
'
,
pady
=
2
,
padx
=
2
)
self
.
__onglet
=
ttk
.
Notebook
(
self
.
__division
,
width
=
600
,
height
=
370
)
self
.
__onglet
.
place
(
relx
=
0.28
,
height
=
320
,
width
=
600
)
"""
place %panedWindow
self.__onglet.pack(fill=
'
both
'
,side=
'
right
'
,expand=
'
yes
'
)
place root
"""
self
.
__onglet
.
bind
(
'
<ButtonPress>
'
,
self
.
drag_tab
)
self
.
__panelGraphiques
=
[]
...
...
@@ -98,13 +55,10 @@ class Fenetre :
self
.
__onglet
.
add
(
self
.
__panelVue
,
text
=
"
Vue
"
)
self
.
__panel_log
=
PanelLogs
(
self
.
__division
)
"""
fulling divisions
"""
self
.
__division
.
add
(
self
.
__onglet
)
self
.
__division
.
add
(
self
.
__panel_log
,
height
=
300
)
self
.
__division
.
add
(
self
.
__panel_log
)
def
get_root
(
self
)
->
Tk
:
return
self
.
__root
...
...
@@ -360,7 +314,7 @@ class Fenetre :
elif
typeError
==
""
:
self
.
__panel_log
.
logsDisplay
(
typeError
)
else
:
else
:
print
(
"
Empty string for typeError and message : at least one of them must not be empty
\n
"
)
def
logsDisplay
(
self
,
message
:
str
)
->
None
:
...
...
@@ -368,6 +322,3 @@ class Fenetre :
print
(
"
The message you want to print is empty.
\n
"
)
else
:
self
.
__panel_log
.
logsDisplay
(
message
)
This diff is collapsed.
Click to expand it.
pyAmakIHM/classes/panelLogs.py
+
2
−
4
View file @
6cace0c7
...
...
@@ -5,7 +5,7 @@ Class PanelLogs
from
tkinter
import
ttk
,
Scrollbar
,
PanedWindow
,
Text
import
sys
,
subprocess
,
os
,
io
import
contextlib
from
tkinter.constants
import
INSERT
from
tkinter.constants
import
INSERT
from
pyAmakIHM.classes.panelCommandes
import
PanelCommandes
...
...
@@ -27,7 +27,7 @@ class PanelLogs(Text):
"""
place where you can write and read logs
"""
self
.
__affichage
=
Text
(
self
,
height
=
300
,
width
=
600
)
self
.
__affichage
=
Text
(
self
)
self
.
__affichage
.
pack
(
fill
=
'
both
'
,
expand
=
'
yes
'
)
...
...
@@ -55,5 +55,3 @@ class PanelLogs(Text):
def
logsDisplay
(
self
,
message
:
str
)
->
None
:
place
=
self
.
getText
()
place
.
insert
(
"
end
"
,
message
+
"
\n
"
)
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