Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ExplainDT Advanced
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
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bünyamin Dincer
ExplainDT Advanced
Commits
fe231ea2
Commit
fe231ea2
authored
11 months ago
by
Bünyamin Dincer
Browse files
Options
Downloads
Patches
Plain Diff
Update GUI_byBuni.py
parent
5c306ab4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
GUI_byBuni.py
+11
-11
11 additions, 11 deletions
GUI_byBuni.py
with
11 additions
and
11 deletions
GUI_byBuni.py
+
11
−
11
View file @
fe231ea2
...
...
@@ -8,7 +8,7 @@ class ToolTip:
self
.
widget
=
widget
self
.
tip_window
=
None
self
.
text
=
''
# Display Tooltip
def
show_tip
(
self
,
text
):
"""
Display text in a tooltip window
"""
self
.
text
=
text
...
...
@@ -25,13 +25,13 @@ class ToolTip:
background
=
"
#ffffe0
"
,
relief
=
tk
.
SOLID
,
borderwidth
=
1
,
font
=
(
"
tahoma
"
,
"
8
"
,
"
normal
"
))
label
.
pack
(
ipadx
=
1
)
# hide tooltip
def
hide_tip
(
self
):
tw
=
self
.
tip_window
self
.
tip_window
=
None
if
tw
:
tw
.
destroy
()
# create tooltip for widget
def
create_tooltip
(
widget
,
text
):
tooltip
=
ToolTip
(
widget
)
def
enter
(
event
):
...
...
@@ -41,7 +41,7 @@ def create_tooltip(widget, text):
widget
.
bind
(
'
<Enter>
'
,
enter
)
widget
.
bind
(
'
<Leave>
'
,
leave
)
return
tooltip
# Main
class
DrawingApp
:
def
__init__
(
self
,
root
):
# initialize the drawingapp to set up all the styles
self
.
root
=
root
...
...
@@ -62,15 +62,15 @@ class DrawingApp:
self
.
style
.
configure
(
"
Large.TEntry
"
,
font
=
(
"
Helvetica
"
,
12
),
padding
=
10
)
self
.
root
.
geometry
(
"
1400x800
"
)
# Main Frame
main_frame
=
ttk
.
Frame
(
self
.
root
)
main_frame
.
pack
(
fill
=
tk
.
BOTH
,
expand
=
True
)
# Left Frame for Plugins
left_frame
=
ttk
.
Frame
(
main_frame
)
left_frame
.
grid
(
row
=
0
,
column
=
0
,
sticky
=
"
nswe
"
,
padx
=
10
,
pady
=
10
)
left_frame
.
grid_rowconfigure
(
0
,
weight
=
1
)
left_frame
.
grid_columnconfigure
(
0
,
weight
=
1
)
# Right frame for Eval
right_frame
=
ttk
.
Frame
(
main_frame
)
right_frame
.
grid
(
row
=
0
,
column
=
1
,
sticky
=
"
nswe
"
,
padx
=
10
,
pady
=
10
)
right_frame
.
grid_rowconfigure
(
0
,
weight
=
1
)
...
...
@@ -80,11 +80,11 @@ class DrawingApp:
main_frame
.
grid_columnconfigure
(
1
,
weight
=
2
)
main_frame
.
grid_rowconfigure
(
0
,
weight
=
1
)
# Create a Notebook
(tabbed interface) for
the left side
# Create a Notebook
for the tabs on
the left side
self
.
notebook
=
ttk
.
Notebook
(
left_frame
)
self
.
notebook
.
grid
(
row
=
0
,
column
=
0
,
sticky
=
"
nsew
"
)
# Create
the
28x28
D
rawing
P
anel
2VectorConverter
tab
# Create 28x28
d
rawing
p
anel tab
self
.
drawing_frame
=
ttk
.
Frame
(
self
.
notebook
)
self
.
notebook
.
add
(
self
.
drawing_frame
,
text
=
'
28x28DrawingPanel2VectorConverter
'
)
self
.
notebook
.
bind
(
"
<<NotebookTabChanged>>
"
,
self
.
on_tab_change
)
...
...
@@ -93,7 +93,7 @@ class DrawingApp:
self
.
query_builder_frame
=
ttk
.
Frame
(
self
.
notebook
)
self
.
notebook
.
add
(
self
.
query_builder_frame
,
text
=
'
QueryBuilder
'
)
# Create the Plugin3 tab
# Create the Plugin3
(coming soon)
tab
self
.
plugin3_frame
=
ttk
.
Frame
(
self
.
notebook
)
self
.
notebook
.
add
(
self
.
plugin3_frame
,
text
=
'
Plugin3
'
)
...
...
@@ -296,7 +296,7 @@ class DrawingApp:
query_builder_frame
.
grid_rowconfigure
(
0
,
weight
=
1
)
query_builder_frame
.
grid_columnconfigure
(
0
,
weight
=
1
)
def
insert_grammar_element
(
self
,
element
):
def
insert_grammar_element
(
self
,
element
):
# insert element to query text
self
.
query_text
.
insert
(
tk
.
END
,
f
"
{
element
}
"
)
def
copy_query
(
self
):
# copy query which was generated using query builder plugin
...
...
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