Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
O
objQRcode
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thorfin89
objQRcode
Commits
ebeb41e4
Commit
ebeb41e4
authored
Dec 27, 2023
by
Thorfin89
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correction sur les curseurs
parent
cc90c7cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
+18
-17
main.py
main.py
+18
-17
No files found.
main.py
View file @
ebeb41e4
...
...
@@ -11,8 +11,6 @@ from PIL import Image
COLOR
=
"#000000"
VERSION
=
3
BOXE_SIZE
=
2
BORDER
=
1
# ===== FONCTIONS =====
...
...
@@ -25,11 +23,15 @@ def color_selection():
def
create_qrcode
():
if
texte_a_coder
.
get
()
!=
""
:
global
qrcode_img
bs
=
boxe_size_scale
.
get
()
br
=
border_size_scale
.
get
()
qr
=
qrcode
.
QRCode
(
version
=
VERSION
,
error_correction
=
ERROR_CORRECT_M
,
box_size
=
BOXE_SIZE
,
border
=
BORDER
box_size
=
bs
,
border
=
br
)
qr
.
add_data
(
texte_a_coder
.
get
())
qr
.
make
(
fit
=
'True'
)
...
...
@@ -101,14 +103,13 @@ blue_btn = Radiobutton(left_frame, bg="#CCCCCC", text="Bleu",
red_btn
=
Radiobutton
(
left_frame
,
bg
=
"#CCCCCC"
,
text
=
"Rouge"
,
variable
=
color
,
value
=
"#FF0000"
,
command
=
color_selection
)
green_btn
=
Radiobutton
(
left_frame
,
bg
=
"#CCCCCC"
,
text
=
"Vert"
,
variable
=
color
,
value
=
"#00FF00"
,
command
=
color_selection
)
variable
=
color
,
value
=
"#00FF00"
,
command
=
color_selection
)
violet_btn
=
Radiobutton
(
left_frame
,
bg
=
"#CCCCCC"
,
text
=
"Violet"
,
variable
=
color
,
value
=
"#800080"
,
command
=
color_selection
)
variable
=
color
,
value
=
"#800080"
,
command
=
color_selection
)
orange_btn
=
Radiobutton
(
left_frame
,
bg
=
"#CCCCCC"
,
text
=
"Orange"
,
variable
=
color
,
value
=
"#FFA500"
,
command
=
color_selection
)
variable
=
color
,
value
=
"#FFA500"
,
command
=
color_selection
)
brown_btn
=
Radiobutton
(
left_frame
,
bg
=
"#CCCCCC"
,
text
=
"Marron"
,
variable
=
color
,
value
=
"#6C5417"
,
command
=
color_selection
)
variable
=
color
,
value
=
"#6C5417"
,
command
=
color_selection
)
ESP
=
25
# espace entre les boutons radios
black_btn
.
place
(
x
=
10
,
y
=
20
+
ESP
)
...
...
@@ -120,18 +121,18 @@ orange_btn.place(x=10, y=20 + 6 * ESP)
brown_btn
.
place
(
x
=
10
,
y
=
20
+
7
*
ESP
)
# choix de la BOXE_SIZE
BoxS
=
IntVar
()
boxe_size_scale
=
Scale
(
left_frame
,
from_
=
1
,
to
=
10
,
variable
=
BoxS
,
orient
=
HORIZONTAL
)
boxe_size
=
IntVar
()
boxe_size_scale
=
Scale
(
left_frame
,
from_
=
1
,
to
=
10
,
variable
=
boxe_size
,
orient
=
HORIZONTAL
)
boxe_size_scale
.
config
(
bg
=
"#CCCCCC"
,
label
=
"Taille des points :"
,
length
=
180
,
highlightthickness
=
0
)
boxe_size_scale
.
set
(
5
)
boxe_size_scale
.
place
(
x
=
180
,
y
=
18
)
# choix de la taille de la bordure
BorS
=
IntVar
()
bo
xe_size_scale
=
Scale
(
left_frame
,
from_
=
1
,
to
=
10
,
variable
=
BorS
,
orient
=
HORIZONTAL
)
bo
xe
_size_scale
.
config
(
bg
=
"#CCCCCC"
,
label
=
"Épaisseur de la bordure :"
,
length
=
180
,
highlightthickness
=
0
)
bo
xe
_size_scale
.
set
(
2
)
bo
xe
_size_scale
.
place
(
x
=
180
,
y
=
100
)
border_size
=
IntVar
()
bo
rder_size_scale
=
Scale
(
left_frame
,
from_
=
1
,
to
=
10
,
variable
=
border_size
,
orient
=
HORIZONTAL
)
bo
rder
_size_scale
.
config
(
bg
=
"#CCCCCC"
,
label
=
"Épaisseur de la bordure :"
,
length
=
180
,
highlightthickness
=
0
)
bo
rder
_size_scale
.
set
(
2
)
bo
rder
_size_scale
.
place
(
x
=
180
,
y
=
100
)
# bouton de création du QRCode
create_Btn
=
Button
(
left_frame
,
text
=
"Créer le Code"
,
bg
=
"#88FF88"
,
command
=
create_qrcode
)
...
...
@@ -141,7 +142,7 @@ create_Btn.place(x=260, y=360, width=100, height=40)
titre_texte_a_coder
=
Label
(
bottom_frame
,
text
=
'Données à coder :'
,
bg
=
"#CCCCCC"
)
titre_texte_a_coder
.
place
(
x
=
10
,
y
=
0
)
texte_a_coder
=
Entry
(
bottom_frame
,
width
=
122
)
texte_a_coder
.
insert
(
0
,
"https://objnux.fr"
)
texte_a_coder
.
insert
(
0
,
"https://objnux.fr"
)
# ligne à supprimer une fois le code validé
texte_a_coder
.
place
(
x
=
30
,
y
=
25
)
# affichage du QRcode
...
...
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