2
0
mirror of https://github.com/pyqt/examples.git synced 2025-08-31 05:45:09 +00:00

Initial commit

This commit is contained in:
Marcus Ottosson
2016-10-13 08:05:02 +01:00
parent b53694cfc1
commit a52c47bf2e
701 changed files with 127036 additions and 0 deletions

25
README Normal file
View File

@@ -0,0 +1,25 @@
PyQt is supplied with a number of example applications and demonstrations that
have been written to provide developers with examples of the Qt API in use,
highlight good programming practise, and showcase features found in each of
Qt's core technologies.
The example and demo launcher can be used to explore the different categories
available. It provides an overview of each example, lets you view the
documentation in Qt Assistant, and is able to launch examples and demos.
Documentation for these examples can be found in the Tutorial and Examples
section of the Qt documentation.
Finding the PyQt Examples and Demos launcher
============================================
On Windows:
The launcher can be accessed via the Windows Start menu. Select the menu
entry entitled "Examples and Demos" entry in the submenu containing PyQt5.
On all platforms:
The source code for the launcher can be found in the examples/demos/qtdemo
directory in the PyQt package.

24
activeqt/README Normal file
View File

@@ -0,0 +1,24 @@
On Windows PyQt provides support for integration with ActiveX controls.
These examples demonstrate the basic techniques used to take advantage of
ActiveX in PyQt applications.
The example launcher provided with PyQt can be used to explore each of the
examples in this directory.
Documentation for these examples can be found via the Tutorial and Examples
link in the main Qt documentation.
Finding the PyQt Examples and Demos launcher
============================================
On Windows:
The launcher can be accessed via the Windows Start menu. Select the menu
entry entitled "Examples and Demos" entry in the submenu containing PyQt5.
On all platforms:
The source code for the launcher can be found in the examples/demos/qtdemo
directory in the PyQt package.

View File

@@ -0,0 +1,38 @@
/* XPM */
static char *image0[]={
"32 32 3 1",
". c None",
"a c #000080",
"# c #808080",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
".......#aaaaaaaaa...............",
"......#aaaaaaaaaaa.........a....",
".....#aaa.......aaa.......aa....",
"....#aaa.........aaaa....aaa....",
"....aaa...........aaaa..aaaa....",
"....aa..............aaaaaaaa....",
"....aa...............aaaaaaa....",
"....aa...............aaaaaaa....",
"....aa..............aaaaaaaa....",
"....aa.............aaaaaaaaa....",
"....#aa...........aaaaaaaaaa....",
".....#aa.........aaaaaaaaaaa....",
"......aa#.......................",
".......aa#......................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................"};

View File

@@ -0,0 +1,177 @@
/* XPM */
static char *image1[]={
"32 32 142 2",
"Qt c None",
"#O c #0010f7",
"#P c #0021ef",
"#R c #0021f7",
"#S c #0021ff",
"#T c #0029ff",
"ah c #0031ff",
"#N c #0829f7",
"#x c #0831ff",
"#C c #0839ff",
"#E c #1029e7",
"#r c #1039ff",
"#o c #1042ff",
"#Q c #1831de",
"ak c #1831e7",
"#k c #1842ff",
"#H c #184aff",
"aj c #2139e7",
"#s c #2142de",
"#G c #214aff",
".9 c #2152ff",
"#2 c #2939c6",
"ag c #2939d6",
"a# c #2942ce",
"#p c #2942de",
"#U c #2952ff",
"ae c #295aff",
"#y c #3152de",
".2 c #3152e7",
"#I c #315aff",
"#z c #3163ff",
"#1 c #394abd",
"#L c #394ade",
"#B c #3963ff",
"#w c #396bff",
"#V c #4252d6",
"#l c #4252de",
"#W c #4263ef",
"#q c #426bff",
".1 c #4273ff",
"#5 c #4a5ad6",
"#J c #4a73ff",
"#K c #4a7bff",
"ac c #4a84ff",
"ab c #5263c6",
".T c #5263ce",
".M c #5273d6",
".c c #5273e7",
".U c #527bde",
"#t c #527bf7",
"#A c #5284ff",
"#X c #5a63ad",
".V c #5a84ef",
"#F c #5a84ff",
"#v c #5a8cff",
"ad c #636bbd",
".e c #637bc6",
".W c #637bce",
".3 c #637bd6",
".Q c #6384de",
".5 c #638cef",
"#b c #638cff",
"#j c #6394ff",
"af c #6b73bd",
"#0 c #6b73c6",
".S c #6b84ce",
"#u c #6b94ff",
".C c #6b9cff",
"ai c #737bce",
".z c #7384b5",
".j c #7384c6",
"#6 c #738cce",
".4 c #738cd6",
".b c #739ce7",
".I c #73a5ff",
"#n c #73adff",
"#Z c #7b84b5",
".R c #7b8cbd",
".J c #7b94bd",
".n c #7ba5e7",
".P c #7badff",
"#c c #7bb5ff",
"#M c #84849c",
"#3 c #8484ad",
".i c #848cc6",
"al c #8494bd",
"aa c #849cc6",
".y c #84adff",
".O c #84b5ff",
"#a c #84bdff",
".t c #8c94ad",
".a c #8c94b5",
".D c #8c9cbd",
".m c #8c9cce",
".A c #8ca5ef",
".f c #8cadf7",
".H c #8cbdff",
"#D c #9494a5",
"#8 c #9494bd",
"#9 c #9494c6",
"a. c #949cbd",
".r c #94c6ff",
"#d c #94ceff",
"#4 c #9ca5ad",
"#7 c #9ca5b5",
".u c #9cbdf7",
".6 c #9cc6ff",
".0 c #9cceff",
".x c #9cd6ff",
".L c #a5a5b5",
"#Y c #a5a5bd",
"#e c #a5ceff",
"## c #a5d6ff",
".X c #adadb5",
".k c #adc6ff",
"#i c #add6ff",
".E c #b5b5b5",
".d c #b5b5bd",
".K c #b5bdc6",
".F c #b5ceff",
".N c #b5d6ff",
".B c #b5deff",
".s c #bdbdbd",
".# c #bdbdc6",
"#. c #bdd6ff",
".G c #bde7ff",
"#h c #c6e7ff",
"#f c #c6efff",
".w c #c6f7ff",
".h c #ced6ff",
".Y c #cee7ff",
".q c #ceefff",
".Z c #cef7ff",
".l c #d6efff",
".8 c #d6f7ff",
".o c #deefff",
".7 c #def7ff",
"#m c #deffff",
"#g c #e7ffff",
".v c #efffff",
".p c #f7ffff",
".g c #ffffff",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQt.#.a.b.c.aQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQt.d.e.f.g.h.iQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQt.d.j.k.g.g.l.mQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQt.a.n.o.g.p.q.r.mQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQt.s.t.u.g.g.v.w.x.y.mQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQt.z.A.g.g.v.B.x.r.C.DQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQt.E.a.F.g.g.v.G.r.H.H.I.JQtQtQtQtQtQtQtQtQtQt.s.s.K.K.KQtQt",
"QtQt.L.M.N.g.g.q.x.H.O.y.P.P.Q.LQtQtQt.s.s.K.a.R.S.T.U.V.V.Q.W.X",
"Qt.#.Q.Y.g.g.Z.0.O.y.P.P.P.P.1.2.3.4.S.e.c.5.f.6.N.l.7.8.Z.0.9.T",
".s.W#..g.p.Z###a.O.P.P.I.I.P#b#c#d#e.B#f#g.7.8.8.q#h#i.r.H#j#k#l",
".e#e.g#m.G#d.O.y.P.I.I.I.I.I.I.H.6####.0.r.H#a.O#c.I#n.I#j.1#o#p",
".5.p#f.x.0.O.y.P.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.I.C.C.C#b#q#r#s",
"#t##.r.H.O#c.P.I.I.I.I.I.I.C.I.C.C.I.C.I.C.C.C.C#u.C#j#j#v#w#x#p",
"#y#z#j.I.I.P.I.I.C.C.C.I.I.C.C#j#b#v#v#b#j#j#j#b#j#v#b#v#A#B#C#p",
"#D#E#k#q#A#j.C.I.C.I.C.C.C.I#F#G#k#k#H#G#I#B.1.1#J#K#K.1#q#z#x#L",
".s#M#N#r#z#K#b#u.C#u.C.C.I.I#B#O#P#Q#E#P#R#S#T#x#r#r#H.9#U#G#T#V",
"QtQt.z#N#r#I.1#v#j#u#j.C#u.I#W#X#D.s#Y#D#Z#0#1#2#Q#P#P#N#N#T#E#3",
"QtQt.s#4#5#x#H#B#K#v#j#j#j#j#6QtQtQtQtQtQtQt.s.s.d.X#7#8#9a..X.s",
"QtQtQtQt.da##S#k#z#J#v#b#j#vaaQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQt.Eab#x#o#I#K#v#vac.iQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQt.sad#E#rae#q#K#wafQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQt.#.Lagah#k#U#kafQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQt#4#Q#T#xahaiQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQt#4adajakalQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};

View File

@@ -0,0 +1,177 @@
/* XPM */
static char *image2[]={
"32 32 142 2",
"Qt c None",
"#Y c #0018e7",
"aa c #0018ef",
"#E c #0018ff",
"#Q c #0021ef",
"#K c #0021ff",
"a# c #0029ff",
"a. c #0829ff",
"#P c #0831ff",
"#4 c #1021d6",
"#R c #1021de",
"#L c #1029d6",
"#V c #1029e7",
"#n c #1039f7",
"#W c #1039ff",
"#O c #1042ff",
"ah c #1831ce",
"#y c #1842ff",
"aj c #2131c6",
"#S c #2131ce",
"#z c #2139de",
".0 c #2142de",
"ai c #2142e7",
".t c #214aef",
"#D c #214aff",
".x c #2152ff",
"al c #2939de",
"#d c #294ae7",
"#I c #2952ff",
"#J c #295aff",
"#T c #3142bd",
"#N c #315aff",
"#s c #3163ff",
"#F c #394ac6",
"#G c #3952d6",
"ag c #395ae7",
".B c #3963f7",
"ae c #3963ff",
".g c #396bff",
"#U c #424ab5",
"#2 c #4252b5",
".J c #425ace",
"#A c #4263de",
".b c #426be7",
"#p c #426bef",
"#x c #426bff",
".n c #4273ff",
".o c #4a63ce",
"#t c #4a6be7",
".Q c #4a73de",
"#3 c #4a73ff",
"#C c #4a7bff",
"#Z c #525abd",
".1 c #526bbd",
".W c #526bc6",
".R c #526bce",
".P c #527be7",
"#w c #5284ff",
"#m c #528cff",
"ac c #5a63bd",
"ak c #5a6bbd",
".O c #5a7bf7",
"#H c #5a84ff",
"#9 c #5a8cff",
"af c #636bb5",
".h c #636bbd",
"ab c #6384ef",
"#v c #638cff",
".w c #6394ff",
".s c #639cff",
"#M c #6b73b5",
".C c #6b73bd",
"#u c #6b9cff",
".c c #737bb5",
".S c #7384ce",
".N c #738ce7",
".a c #7394de",
".8 c #7394ef",
"#8 c #739cf7",
"#B c #739cff",
".A c #73a5ff",
"#0 c #7b84b5",
".T c #7b8cbd",
".9 c #7b94c6",
"#. c #7b94d6",
".7 c #7ba5ff",
".X c #7badff",
".I c #7bb5ff",
"#5 c #848ca5",
".y c #848cad",
".M c #8494b5",
"## c #849cd6",
"#c c #84adff",
".G c #84b5ff",
".Z c #84bdff",
"#o c #8c8cad",
"#a c #8ca5ce",
".Y c #8cb5ff",
".H c #8cbdff",
"#1 c #9494a5",
".U c #9494ad",
"#7 c #949cad",
"#b c #94ade7",
".z c #94c6ff",
".v c #94ceff",
".j c #9c9cad",
".u c #9ca5ad",
"#r c #9cc6ff",
".m c #9cceff",
".d c #a5a5a5",
"#6 c #a5a5ad",
".V c #a5a5b5",
".K c #a5adb5",
".2 c #a5ceff",
".r c #a5d6ff",
".L c #adadad",
".i c #adadb5",
".p c #adadbd",
".q c #addeff",
"#e c #ade7ff",
"#X c #b5b5b5",
".D c #b5b5bd",
".E c #b5b5c6",
".F c #b5bdc6",
".f c #b5deff",
"#q c #b5efff",
".# c #bdbdbd",
"ad c #bdbdc6",
".6 c #bddeff",
"#i c #bde7ff",
"#h c #bdefff",
"#g c #c6f7ff",
"#l c #cee7ff",
"#j c #cef7ff",
"#f c #ceffff",
".k c #d6efff",
"#k c #d6f7ff",
".l c #d6ffff",
".e c #deefff",
".5 c #e7ffff",
".4 c #efffff",
".3 c #f7ffff",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.a.b.c.#QtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.d.e.f.g.h.iQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.j.k.l.m.n.o.pQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.d.f.q.r.m.s.t.cQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.u.q.v.m.r.m.w.x.y.#QtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.u.z.z.z.z.m.m.A.B.C.DQtQtQtQt",
"QtQt.#.E.F.#.#QtQtQtQtQtQtQtQtQtQt.j.G.H.z.H.z.m.m.I.n.J.KQtQtQt",
".L.M.N.O.P.Q.R.S.T.U.E.#.#QtQtQt.V.W.X.H.Y.H.H.z.z.z.Z.g.0.VQtQt",
".1.2.3.4.5.k.6.2.Y.7.8.a.9#.###a#b.Y.G.G.G.G.Y.G.Y.H.z#c.n#d.u.#",
".b#e#f#g#h#i.f#h#g#g#j#k#k#k.e.4.4#l#c.X.G.G.G.G.G.G.G.H.H#m#n#o",
"#p.m#q.r.m.m.m.z#r.m.z.m.r.q.q.q.m.H.G.G.X#c.G.G.G.X.X.X.X.7#s.J",
"#t.v.q.m.z.H.H.H.H.H.Z.Y.G.G.G.G.G.G.G.X#c.I#c.X.X.X.A.A#u#u.n#d",
"#t.H.r.z.Y.G#c.X.X.X.7.X.X.X.X.X.X.X.X.X.X.X.X.X.7.A#u#v#w#x#y#z",
"#A.I.m.H.X.X.X.A.A#B.A#B#u#u#u#u#B.X#c.X.X.X.X.A.A#u.w#C.g#D#E#F",
"#G.s.G.A.w#v#H#w#C.n#x#s#I#y#y#y#J#H.X.7.X.X.7.A#u.w#w#J#y#K#L.U",
"#M.x.n#N#D#O#P#K#K#Q#Q#R#S#T#U#U#V#W.A.X.A.A#B#u.w.n#D#P#E#L.VQt",
"#X.h#V#Q#Y#R#S#U#Z#0#1.p.#.#.#.#.V#2.s.7.A#u#u.w#3#D#P#E#4#5QtQt",
"QtQt#6#1#7.D.#.#QtQtQtQtQtQtQtQtQt#6#8#B#u.w#9#s#ya.#E#F.V.#QtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.8#9#H#w#s#Wa#aa#2#XQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#ab#w#C#N#W#K#Eac.#QtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtad.Pae#J#Wa##Vaf#XQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#ag#W#P#Eah#6QtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#ai#K#Eaj.jQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#akalak.iQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};

View File

@@ -0,0 +1,30 @@
/* XPM */
static char *image3[]={
"25 25 2 1",
"# c #000000",
". c #ffffff",
".........................",
".........................",
".........................",
".........######..........",
".......##########........",
"......####....####.......",
".....###........###......",
"....#####........###.....",
"....##.###........##.....",
"...###..###.......###....",
"...##....###.......##....",
"...##.....###......##....",
"...##......###.....##....",
"...##.......###....##....",
"...###.......###..###....",
"....##........###.##.....",
"....###........#####.....",
".....###........###......",
"......####....####.......",
".......##########........",
".........######..........",
".........................",
".........................",
".........................",
"........................."};

View File

@@ -0,0 +1,38 @@
/* XPM */
static char *image4[]={
"32 32 3 1",
". c None",
"# c #000080",
"a c #808080",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"...............#########a.......",
"....#.........###########a......",
"....##.......###.......###a.....",
"....###....####.........###a....",
"....####..####...........###....",
"....########..............##....",
"....#######...............##....",
"....#######...............##....",
"....########..............##....",
"....#########.............##....",
"....##########...........##a....",
"....###########.........##a.....",
".......................a##......",
"......................a##.......",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................",
"................................"};

View File

@@ -0,0 +1,246 @@
/* XPM */
static char *image5[]={
"32 32 211 2",
"Qt c None",
"aJ c #000000",
"#W c #080800",
"#N c #100800",
"#V c #101000",
"#E c #101008",
"#M c #181000",
"#L c #181800",
"#D c #181808",
"#F c #181810",
"as c #211800",
"#K c #211808",
"#J c #212110",
"#G c #212118",
"#q c #212121",
"an c #292100",
"#I c #292110",
"aN c #292910",
"#H c #292918",
"#y c #292921",
"aF c #312900",
"#C c #312918",
"#i c #312929",
".0 c #313131",
"#7 c #393100",
"#U c #393108",
"aG c #393931",
".M c #393939",
"#u c #423939",
"#c c #424a42",
"aE c #4a4200",
"aY c #4a4210",
".V c #4a4239",
"#B c #4a4a39",
".m c #4a4a42",
"aP c #4a5218",
".G c #4a5252",
".z c #4a5a52",
"aO c #524200",
"am c #524a00",
"#T c #524a08",
"#p c #524a4a",
".s c #525252",
"#a c #525a52",
".7 c #52635a",
"#b c #526363",
"az c #5a4a00",
"#6 c #5a5208",
"aw c #5a5210",
".Z c #5a524a",
".L c #5a5a52",
".y c #5a5a5a",
".F c #5a635a",
"#S c #635208",
"ax c #635a10",
".U c #635a52",
".r c #635a5a",
"aZ c #636321",
"## c #63635a",
".A c #636363",
"#h c #636b6b",
"aL c #637329",
"af c #6b5a00",
".6 c #6b635a",
"#o c #6b6363",
".E c #6b6b63",
"a4 c #6b7321",
"aS c #6b7329",
"aR c #6b7331",
"aX c #736300",
"al c #736308",
"#R c #736b10",
".T c #736b63",
"a5 c #737329",
".i c #73736b",
".K c #737373",
"a7 c #737b29",
"#g c #737b73",
"a9 c #7b7318",
"#A c #7b7373",
"a8 c #7b7b21",
"aV c #7b7b29",
"aQ c #7b7b5a",
".J c #7b7b73",
".1 c #7b7b7b",
"b# c #7b8431",
"a3 c #7b844a",
".8 c #7b847b",
"ay c #847308",
"#5 c #847310",
"aT c #847b21",
"b. c #847b29",
".S c #847b73",
".d c #847b7b",
"aW c #848421",
"a1 c #848429",
"a0 c #848431",
"bq c #84844a",
".H c #848484",
"ae c #8c7b08",
"ak c #8c7b10",
"#j c #8c8484",
"ba c #8c8c63",
"a2 c #8c8c7b",
".x c #8c8c84",
".2 c #8c948c",
".9 c #8cada5",
"aC c #947b08",
".Y c #947b73",
"aK c #948c10",
"#Q c #948c18",
"a6 c #948c29",
"#m c #948c84",
"bp c #949442",
"aH c #949484",
".D c #94948c",
".n c #949494",
"bn c #949c4a",
"bl c #949c5a",
"bj c #949c63",
".u c #949c94",
".v c #94a59c",
"aI c #9c8c10",
"#4 c #9c8c18",
"#O c #9c8c29",
"aM c #9c9418",
"#r c #9c948c",
"bo c #9c9c4a",
"bm c #9c9c52",
"bk c #9c9c5a",
"bh c #9c9c6b",
".k c #9c9c94",
".a c #9c9c9c",
"bi c #9ca56b",
"bf c #9ca573",
".h c #9ca59c",
"#f c #9ca5a5",
".B c #9cbdb5",
"#P c #a59400",
"aB c #a59418",
"#k c #a5948c",
"ar c #a59c29",
".N c #a59c8c",
".P c #a59c94",
".W c #a59c9c",
"bg c #a5a573",
"bd c #a5a584",
".q c #a5a59c",
".c c #a5a5a5",
"be c #a5ad7b",
".o c #a5ada5",
".C c #a5adad",
".I c #a5b5ad",
"#d c #a5bdb5",
".w c #a5c6bd",
"ad c #ad9c10",
"aj c #ad9c18",
"#w c #ad9c94",
".f c #ada59c",
"bc c #adad7b",
"bb c #adad84",
".# c #adada5",
".t c #adadad",
".4 c #adb5ad",
"ai c #b5a518",
"aq c #b5a529",
"aD c #b5a542",
"ao c #b5a54a",
".O c #b5a594",
"#v c #b5a59c",
"at c #b5ad52",
"#z c #b5ad9c",
".5 c #b5ada5",
".j c #b5b5ad",
".e c #b5b5b5",
".3 c #b5bdb5",
".Q c #b5bdbd",
"#e c #b5cec6",
"#8 c #bda539",
"#x c #bda59c",
"#3 c #bdad29",
"#X c #bdad31",
"ag c #bdad42",
"#n c #bdb5ad",
".b c #bdbdbd",
".X c #bdcec6",
"aU c #c6b510",
"#. c #c6c6bd",
".p c #c6cece",
".g c #c6ded6",
"ac c #cebd31",
"#l c #ced6ce",
"#s c #ced6d6",
"#t c #cedede",
"#9 c #d6c610",
"#2 c #d6c631",
"ap c #dec608",
"ah c #dece10",
"ab c #dece31",
".l c #deefe7",
".R c #deefef",
"au c #e7ce08",
"a. c #e7d621",
"a# c #e7d631",
"aa c #e7d639",
"#1 c #e7de39",
"#Y c #efde10",
"av c #efde21",
"aA c #efde29",
"#Z c #f7e729",
"#0 c #f7e739",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.#.aQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQt.b.c.d.eQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQt.f.g.h.i.bQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQt.j.k.l.e.m.nQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQt.b.a.o.p.q.r.s.tQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQt.u.v.w.k.x.y.z.A.bQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQt.t.k.B.C.k.D.E.F.G.HQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQt.b.#.#.o.I.b.c.J.K.L.M.tQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQt.a.N.O.P.Q.R.o.S.T.U.V.s.bQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQt.t.N.P.W.k.X.R.P.Y.i.A.Z.0.1QtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQt.b.x.2.w.3.4.I.j.#.5.6.L.F.7.0.cQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQt.n.8.9.p#..o.4.x.x.x##.s#a#b.s#c.bQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQt.t.D.##d#e.h#f.o.P.2.2#g###h.A.z#i.KQtQtQtQtQtQtQt",
"QtQtQtQtQtQt.b#j.P.f.P#k.q.4.X#l#m#n.n#o.J.6#p#i#q.cQtQtQtQtQtQt",
"QtQtQtQtQtQt.W#m#k.O#m#r.5.k#s#t#m.q#r.U.E.T#p#u#i.M.eQtQtQtQtQt",
"QtQtQtQtQt.b.x#r.o.t#v.f.o.4.l#l#w#x.f.i#o.E###a.m#y.nQtQtQtQtQt",
"QtQtQtQtQt.b.e.c#d.o#z.u.q#f.I.q.#.#.2#A.U.m#B#h.h.j.bQtQtQtQtQt",
"QtQtQtQtQtQtQtQt.b#C#D#E#F#G#G#G#H#I#J#K#L#M#N.iQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQt.b#O#P#Q#R#S#T#U#L#M#V#W#N#V#V.iQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQt.b#X#Y#Z#0#0#1#2#3#4#5#6#7#M#V#AQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQt.b#8#9a.a#aaaaabac#3adaeaf#7#M.JQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQt.bagaha.a##1aaaa#2aiajakalaman#AQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtaoapa.a#aaaqaraq#3aj#5afamas.JQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtatauava#aw#V#W#Max#4ayafazan.JQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtatahaAaB#W#N#M#V#V#RaCalazas.JQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQt.baDap#Z#Q#N#M#V#M#N#6akafaEaFaG.E#h.JQtQtQtQtQt",
"QtQtQtQtQtQtQtQtaHaIahaAaB#W#W#N#WaJ#6aKalamaF#WaJaJ#yQtQtQtQtQt",
"QtQtQtQtQtQtQt.qaLaIahavaM#WaJ#W#DaN#RaealaOan#NaNaPaQQtQtQtQtQt",
"QtQtQtQtQtQt.jaRaSaTaUavaB#WaNaPaLaVaWaeaX#6aYaZa0a1a2QtQtQtQtQt",
"QtQtQtQtQt.ba3a4a5a5aVa6a1aZa7aSaSa5a8a9a4a5b.b#a5a5.kQtQtQtQtQt",
"QtQtQtQtQtbaa7a7aVa0b.b#a7b#a0a7a7a7aSaSa7b.aVa0aVaR.#QtQtQtQtQt",
"QtQtQtQtQtbbbcbdbebebfbgbhbhbibjbjbkbkblbmbmbnbobpbq.bQtQtQtQtQt"};

View File

@@ -0,0 +1,190 @@
/* XPM */
static char *image6[]={
"22 22 165 2",
"Qt c None",
".h c #000000",
".o c #010101",
"aF c #030303",
"#n c #060606",
".H c #080808",
".r c #0c0c0c",
".q c #121212",
"#V c #124e7f",
"#m c #131313",
".G c #161615",
"aI c #172cac",
".6 c #181818",
"aH c #1841b2",
".p c #191919",
"#8 c #1928ba",
"#W c #1929ba",
"aj c #192aba",
"av c #1a31c2",
"aE c #1b1b1b",
"aD c #1b2bc8",
"at c #1c79d2",
"ah c #1c7dd4",
"aA c #1d1d1d",
"aC c #1d7ad7",
"#6 c #1d7eda",
".5 c #1e1e1e",
"#7 c #1e8ae0",
"ai c #1e8de0",
"au c #1e90e0",
".g c #242424",
"#5 c #313b6c",
"aB c #343d8d",
"#3 c #393939",
".f c #3d3d3d",
"ak c #433967",
"#C c #434442",
"aw c #443c6e",
"#l c #454643",
"as c #454fa3",
".4 c #474845",
"#R c #474846",
".e c #484848",
"aG c #4856a0",
".d c #4a4a4a",
"#9 c #4c416a",
".c c #4c4c4c",
"ag c #4c5cae",
"#X c #4d4669",
"#z c #4dc2b2",
"#P c #4e445a",
"#G c #53504e",
".l c #545454",
".b c #555555",
"#Q c #595274",
"#i c #62b2a2",
".a c #676767",
"#j c #69b6a3",
".F c #6f6f6a",
".K c #6f8b89",
"ax c #747474",
"#a c #76a1a0",
".# c #797979",
"#A c #7bd7e8",
"ay c #7d7d7d",
"#U c #7e7d73",
".I c #808080",
".O c #81a3b8",
"az c #828282",
"#y c #82d1c0",
"#S c #848484",
"#O c #857e7c",
"#F c #86add2",
"#k c #86cdda",
"#N c #89b1bd",
"#h c #8acec3",
"#o c #8c8c8c",
"#L c #8cbbca",
"al c #8d8d8d",
".s c #8f8f8f",
"#H c #909090",
"#K c #90bac9",
"#M c #91c4cf",
"#t c #929292",
".X c #94c2cf",
".N c #94c2d0",
".W c #959595",
"#B c #96b9cb",
".3 c #97bede",
".L c #98c2ce",
".P c #9b9b9b",
"a. c #9c9c9c",
"am c #9d9d9d",
"#s c #9dbdc4",
"#b c #9e9e9e",
"#Y c #a0a0a0",
"an c #a6a6a6",
"#v c #a6d1d6",
".Z c #a7a1a1",
"#I c #a7a7a7",
"#D c #a7edde",
".M c #a8d8e5",
"#u c #aeaeae",
"ac c #b1b1b1",
"a# c #b2b2b2",
".2 c #b5cbd6",
".V c #b6b6b6",
"ar c #b7b7b7",
"#Z c #b8b8b8",
"#2 c #bababa",
".Q c #babbb9",
"aq c #bbbbbb",
"#c c #bcbcbc",
".8 c #bfbfbf",
"ap c #c0c0c0",
".1 c #c1d9d2",
"aa c #c8c8c8",
"ab c #cacaca",
"ao c #cbcbcb",
".Y c #ccf8f1",
"#J c #cdcdcd",
".R c #cecece",
"#p c #d1f9f4",
"#4 c #d5d5d5",
"#w c #d5ece4",
".9 c #d5f6f5",
"#0 c #d6d6d6",
".U c #d7d7d7",
"af c #d8d8d8",
".x c #dadada",
".y c #dbdbdb",
".w c #dcdcdc",
"#e c #dcf7f4",
"#1 c #dddddd",
"ae c #dedede",
".E c #dfdfdf",
".z c #e0e0e0",
"#g c #e0ebe4",
"#q c #e1edea",
"#d c #e2e2e2",
"#x c #e2ebe2",
".0 c #e2eee5",
".v c #e3e3e3",
"## c #e3e7d5",
"#r c #e4ebd9",
"#E c #e4f2ec",
".u c #e5e5e5",
".S c #e7e7e7",
".k c #e9e9e9",
".A c #ebebeb",
".D c #ededed",
".t c #f0f0f0",
"#T c #f4f4f4",
".n c #f6f6f6",
".C c #f7f7f7",
"#f c #f8f5f2",
".m c #f8f8f8",
".7 c #f9f9f9",
"ad c #fafafa",
"#. c #fbf0eb",
".J c #fbfbfb",
".T c #fcfcfc",
".B c #fdfdfd",
".j c #fefefe",
".i c #ffffff",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQt.#.a.b.c.d.d.e.f.g.hQtQtQtQtQtQtQt",
"QtQtQtQt.#.i.i.i.i.i.i.i.i.i.h.hQtQtQtQtQtQt",
"QtQtQtQt.a.j.j.j.j.j.j.i.i.i.h.k.hQtQtQtQtQt",
"QtQtQtQt.l.m.n.o.p.q.r.s.j.i.h.t.u.hQtQtQtQt",
"QtQtQtQt.e.v.w.x.y.z.A.n.B.B.h.C.D.E.hQtQtQt",
"QtQtQt.h.h.h.h.h.F.G.H.I.n.J.h.h.h.h.h.hQtQt",
"QtQt.h.K.L.M.N.O.h.P.Q.R.S.n.T.j.U.V.W.hQtQt",
"Qt.h.X.Y.Z.0.1.2.3.h.4.5.6.q.r.s.7.v.8.hQtQt",
"Qt.h.9#..###.F.F.F#a.h#b#c#d.m.j.7.v#c.hQtQt",
"Qt.h#e#f.a#g#h#i#j#k.h#l#m.r#n#o.7.v#c.hQtQt",
"Qt.h#p#q.a#r.F.F.F#s.h#t#u.x.n.j.7.v#c.hQtQt",
"Qt.h#v#w.##x#y#z#A#B.h#C#m#m.q#o.7.v#c.hQtQt",
"QtQt.h#D.Z#E.F.F#F.h#G#H#I#J.A.7.m.v#c.hQtQt",
"QtQtQt.h#K#L#M#N.h#O#P#Q#R#m.q#S#T#d#c.hQtQt",
"QtQtQtQt.h.h.h.h.Z#U#V#W#X#Y#Z#0.S#1#2.hQtQt",
"QtQtQtQt#3.t.v.x#4#5#6#7#8#9a.a#aaabac.hQtQt",
"QtQtQtQt.6ad.kae.yafagahaiajakalamana..oQtQt",
"QtQtQtQt.haeaoapaqaqarasatauavawaxayaz.oQtQt",
"QtQtQtQtQt.h.h.h.h.haA.oaBaCaiaD.HaEaFQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtaGaHaIQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};

View File

@@ -0,0 +1,11 @@
<RCC>
<qresource prefix="/" >
<file>icons/image0.xpm</file>
<file>icons/image1.xpm</file>
<file>icons/image2.xpm</file>
<file>icons/image3.xpm</file>
<file>icons/image4.xpm</file>
<file>icons/image5.xpm</file>
<file>icons/image6.xpm</file>
</qresource>
</RCC>

View File

@@ -0,0 +1,215 @@
<ui version="4.0" >
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>812</width>
<height>605</height>
</rect>
</property>
<property name="windowTitle" >
<string>Qt WebBrowser</string>
</property>
<widget class="QWidget" name="centralWidget" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QFrame" name="Frame3" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>1</number>
</property>
<property name="spacing" >
<number>0</number>
</property>
<item>
<widget class="QAxWidget" name="WebBrowser" >
<property name="focusPolicy" >
<enum>Qt::StrongFocus</enum>
</property>
<property name="control" >
<string notr="true">{8856F961-340A-11D0-A96B-00C04FD705A2}</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QToolBar" name="tbNavigate" >
<property name="windowTitle" >
<string>Navigation</string>
</property>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<attribute name="toolBarArea" >
<number>4</number>
</attribute>
<addaction name="actionBack" />
<addaction name="actionForward" />
<addaction name="actionStop" />
<addaction name="actionRefresh" />
<addaction name="actionHome" />
<addaction name="separator" />
<addaction name="actionSearch" />
</widget>
<widget class="QToolBar" name="tbAddress" >
<property name="windowTitle" >
<string>Address</string>
</property>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<attribute name="toolBarArea" >
<number>4</number>
</attribute>
<addaction name="actionGo" />
</widget>
<widget class="QMenuBar" name="menubar" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>812</width>
<height>26</height>
</rect>
</property>
<widget class="QMenu" name="PopupMenu" >
<property name="title" >
<string>&amp;File</string>
</property>
<widget class="QMenu" name="FileNewGroup_2" >
<property name="title" >
<string>New</string>
</property>
<addaction name="actionNewWindow" />
</widget>
<addaction name="FileNewGroup" />
<addaction name="FileNewGroup_2" />
<addaction name="separator" />
<addaction name="actionFileClose" />
</widget>
<widget class="QMenu" name="unnamed" >
<property name="title" >
<string>&amp;Help</string>
</property>
<addaction name="actionAbout" />
<addaction name="actionAboutQt" />
</widget>
<addaction name="PopupMenu" />
<addaction name="unnamed" />
</widget>
<action name="actionGo" >
<property name="icon" >
<iconset resource="mainwindow.qrc" >:/icons/image0.xpm</iconset>
</property>
<property name="iconText" >
<string>Go</string>
</property>
</action>
<action name="actionBack" >
<property name="icon" >
<iconset resource="mainwindow.qrc" >:/icons/image1.xpm</iconset>
</property>
<property name="iconText" >
<string>Back</string>
</property>
<property name="shortcut" >
<string>Backspace</string>
</property>
</action>
<action name="actionForward" >
<property name="icon" >
<iconset resource="mainwindow.qrc" >:/icons/image2.xpm</iconset>
</property>
<property name="iconText" >
<string>Forward</string>
</property>
</action>
<action name="actionStop" >
<property name="icon" >
<iconset resource="mainwindow.qrc" >:/icons/image3.xpm</iconset>
</property>
<property name="iconText" >
<string>Stop</string>
</property>
</action>
<action name="actionRefresh" >
<property name="icon" >
<iconset resource="mainwindow.qrc" >:/icons/image4.xpm</iconset>
</property>
<property name="iconText" >
<string>Refresh</string>
</property>
</action>
<action name="actionHome" >
<property name="icon" >
<iconset resource="mainwindow.qrc" >:/icons/image5.xpm</iconset>
</property>
<property name="iconText" >
<string>Home</string>
</property>
</action>
<action name="actionFileClose" >
<property name="text" >
<string>C&amp;lose</string>
</property>
<property name="iconText" >
<string>Close</string>
</property>
</action>
<action name="actionSearch" >
<property name="icon" >
<iconset resource="mainwindow.qrc" >:/icons/image6.xpm</iconset>
</property>
<property name="iconText" >
<string>Search</string>
</property>
</action>
<action name="actionAbout" >
<property name="iconText" >
<string>About</string>
</property>
</action>
<action name="actionAboutQt" >
<property name="iconText" >
<string>About Qt</string>
</property>
</action>
<actiongroup name="FileNewGroup" >
<action name="actionNewWindow" >
<property name="iconText" >
<string>Window</string>
</property>
<property name="shortcut" >
<string>Ctrl+N</string>
</property>
</action>
</actiongroup>
</widget>
<layoutdefault spacing="6" margin="11" />
<customwidgets>
<customwidget>
<class>QAxWidget</class>
<extends>QWidget</extends>
<header>qaxwidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<connections/>
</ui>

View File

@@ -0,0 +1,863 @@
# -*- coding: utf-8 -*-
# Resource object code
#
# Created: Thu May 2 15:37:04 2013
# by: The Resource Compiler for PyQt (Qt v5.0.2)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x00\xa7\
\x00\
\x00\x03\x23\x78\x9c\xd3\xd7\x52\x88\x08\xf0\x55\xd0\xd2\xe7\x2a\
\x2e\x49\x2c\xc9\x4c\x56\x48\xce\x48\x2c\x52\xd0\xca\xcc\x4d\x4c\
\x4f\x35\x8e\x8e\xb5\xad\xe6\x52\x32\x32\x55\x00\x21\x05\x43\x25\
\x1d\x2e\x25\x65\x85\x64\x05\x65\x03\x30\x00\x71\xf5\x40\xdc\x34\
\x30\x00\x73\x71\x01\x2a\x49\x2a\x83\x01\x56\x49\x65\x38\xc0\x94\
\x84\x89\x22\xc9\xc2\x25\x91\x34\xc0\x99\x30\x49\x14\xe3\x60\x4c\
\x84\x24\xaa\x5e\x64\x49\xb0\x04\x42\x16\xca\x82\x4b\xa2\xda\x8b\
\x45\x12\x21\x8b\x4d\x12\x2e\x8b\x55\x52\x0f\xee\x59\x74\x07\x21\
\x64\x51\x1d\xa4\x87\xea\x49\x0c\x7f\x22\xcb\xa2\x49\xe2\x0d\x3e\
\xfc\x01\x8f\x3f\xca\xe0\xd2\x70\x2e\xb5\xd2\x10\x69\x92\xb5\xd6\
\x5c\x00\xe0\x4d\x89\x7e\
\x00\x00\x05\x19\
\x00\
\x00\x11\x8f\x78\x9c\xe5\x96\x5b\x4f\x23\x47\x10\x85\xdf\xf9\x15\
\xd6\xd6\xdb\x2a\xaa\xc5\xe3\xb9\x2a\xca\x03\x77\x03\xcb\xc5\x5c\
\x8c\x21\xca\x43\xcf\x8c\x6f\x80\xcd\xc5\x06\x83\xa3\xfc\xf7\x54\
\xf7\xa9\xee\x45\xbb\xfb\xb0\x6c\xa4\x48\x51\x54\x80\xf8\x5c\x5d\
\xa7\x4e\xd7\xf4\x8c\xe7\xd3\xc7\x46\xef\xf8\xa0\xf1\xf1\xd3\xca\
\x6c\x6e\xe6\xe3\xaa\x51\x8d\xcc\x63\xe3\xe3\x78\x62\x86\xfd\xe8\
\xf7\x3f\x7e\xfb\x73\xe5\x43\x2b\x6a\xc8\x4f\x33\x8e\x1a\xd1\x87\
\x5f\x56\x3e\x74\xe6\x8d\xaa\x71\x78\x37\xed\x5b\xa0\x4b\x01\x5a\
\x5d\x6d\xe6\xfd\xcc\xb2\x31\x81\x07\x2e\xbf\xe5\x79\x00\xee\x80\
\xa3\xa6\xe6\xf7\x3d\x23\x6f\x48\xb9\x50\x66\xc7\xb9\x67\x3a\x06\
\xb7\x74\x3d\xc5\x96\x9b\x52\x5f\xa7\x8e\x4f\x02\xc3\xdf\x67\xe5\
\x42\xf3\x5d\xcf\xf0\x4b\x53\x70\xab\x18\x80\x2f\x02\x43\xff\x08\
\x1c\x47\xea\x67\xe4\x58\xfa\x57\xd0\x7f\x05\x87\xfc\xb5\xe5\xa8\
\x29\x79\xf4\x3b\x0d\x8c\xf5\x4b\xe5\x02\xfe\x78\x15\x1c\x47\x60\
\x33\xf6\x0c\x7f\x3c\x57\x36\x3a\xaf\x4d\xcf\xe8\xc7\x2f\xe0\xc4\
\xf7\xbf\x75\x5c\x78\x7d\xaa\xc1\x52\x8f\xfd\xed\x82\xfd\x7a\xda\
\x53\x56\x3d\x3a\xb3\xdc\x92\xfe\x65\xed\xf8\x10\x1c\xf2\x33\x70\
\xda\x52\xde\x76\x2c\xfa\xba\xdf\x1d\x70\x12\x61\xde\x66\xa8\xac\
\xfd\x79\x1d\x2c\xf5\x38\x2f\xfd\xc0\xd8\x8f\xae\x4f\x4b\xd5\x3f\
\xb7\x1c\x47\xb1\x29\x13\xc7\x11\x38\x89\xc0\xbc\xa7\x6c\x74\xbe\
\x6b\xe0\xb4\xa5\xf3\x2d\x95\x4b\xdd\xff\x7d\x60\xe8\xbf\x78\xd6\
\xfe\x53\x70\xe6\xfd\xdc\x39\x36\x69\x4b\xf5\xe7\xca\xaa\xc7\x1d\
\x70\xa6\xfd\xa8\xe5\x59\xfd\x6f\x28\xfb\xfd\x5c\x59\x4e\xc4\x2f\
\xe6\xcb\x4d\x70\x5a\x2a\x5f\x78\xc6\x3c\xf9\x24\x30\xf6\x73\x0c\
\xce\xfc\x7e\x16\xe0\x3c\x56\xfd\x89\x72\xa5\xe7\xa1\x72\x2c\xfe\
\xa1\x6f\x6e\x94\x7d\xbf\x23\xb0\xf8\x83\x5e\x1b\x1c\xf4\x0a\x65\
\xaf\x37\xb0\x9c\xb6\xa4\x1e\xf3\x1f\x05\x86\x7e\x09\xce\x63\x9d\
\xef\xb3\xb2\xd6\xf3\x02\x5c\xa8\x3e\xcf\x94\x35\x4f\x07\x8e\xcb\
\xac\xa5\xfa\x1b\x81\x71\x1e\x9f\xc0\x7e\x3d\xbb\xfd\x65\xad\xcc\
\xfb\x39\x05\xe7\xb1\xce\xeb\x50\xb9\xd2\xeb\x65\xc0\x45\xac\xe7\
\x23\xf7\xac\x7e\x3d\x57\x3a\x8f\xf5\xc0\xe8\xb7\x06\x36\x89\xfa\
\x75\xf7\x6f\x56\xe6\xb1\xf6\x3f\x53\xae\x74\xbe\x05\xb8\x88\xf5\
\xfe\x60\xcf\xb8\x3f\x38\x03\x7b\x3d\xee\x29\xd7\xca\xbb\xe0\xd2\
\xf7\x4b\x2c\xe7\x71\x5e\x19\xf4\x7b\x0d\x8c\x7e\x07\xe0\x42\xfd\
\x10\x29\x57\xfa\xfc\xab\xc0\x41\x7f\x07\xec\xf5\xf9\x4a\x59\xf3\
\xe4\xce\x7f\x5e\x79\x7d\x32\x60\x93\xe8\x7c\x2f\xc1\xa1\xbe\xad\
\xec\xeb\xdd\xf9\x2e\xc4\x8f\xfa\x3d\x0f\x0c\xbd\x4c\xd9\xeb\x97\
\x60\x53\xeb\xf5\x5a\x82\xab\x54\xf5\x9f\x95\xfb\xca\xee\x79\x5b\
\x54\xbe\x9e\x9f\xc0\x26\x51\xbd\x47\x70\xa8\x9f\x28\xfb\x7a\xf7\
\x7c\x94\xd5\x09\xfc\x51\x1a\x18\x7a\x5d\xcf\x7a\x7d\xf7\x95\x6b\
\xe5\x08\x1c\xf4\x1e\xc1\xb5\xef\xe7\xbe\x7f\x4c\x6d\xc3\xf1\xd8\
\xb3\xd6\xdf\x07\x46\xfe\x01\x5c\xab\x1e\xf5\xc1\xfd\x4c\xd9\x9d\
\x8f\x32\x29\xbd\x9f\xcd\xc0\xa8\xdf\xf2\xac\xcf\x8f\x6d\xe5\x5a\
\x79\x00\x0e\xfa\x0f\x60\x41\xf8\x75\xe7\xa5\xac\x4b\xf5\x63\x6a\
\xcf\x5a\x9f\x82\x43\xfd\x18\x1c\xfc\x8d\x94\x55\x8f\xdc\xf3\x5c\
\xa6\xef\xf3\xee\xfb\xa9\xea\x87\xf5\xd7\xe0\x90\x1f\x28\x7b\x3f\
\xee\x79\x55\xa7\x41\x4f\xd9\xaf\xe7\x5b\x65\xbf\xde\xcd\xab\xee\
\x87\xfd\xb8\xfb\xc5\x76\x53\x76\xef\x0b\x4e\x1e\xec\x9e\xd7\x83\
\x90\xef\xcc\xff\x59\xfc\xff\x34\x98\xd8\x70\xc9\x15\xd3\x3f\xd0\
\xa8\xb9\xcf\x03\x1e\xf2\x88\xc7\x3f\xad\x71\xcd\x37\x7c\xcb\x13\
\x9e\xf2\x1d\xdf\xff\xb4\x8f\x01\x3f\xf0\xa3\xa8\xcc\x78\xce\xd5\
\x4f\x69\x3c\x89\xc2\xb3\x28\x58\x95\x05\xbf\xf0\xeb\xdb\xc9\xfc\
\xb0\xc6\x52\x63\x22\xb1\xc6\xeb\xbc\xc1\x9b\x5f\x6b\xc8\xe4\xb7\
\x78\x5b\xfe\x7e\x77\xf2\x32\x8f\x1d\x6e\x8b\x42\x5b\x55\x76\x65\
\x32\x7b\xbc\xff\x45\x83\x3f\xf3\x01\x1f\xf2\x11\x1f\x73\x87\x4f\
\xf8\x94\xcf\xf8\x5c\x14\x83\x1e\x77\xf9\x82\x7b\x52\x7f\x29\xbf\
\x6d\xf5\x73\x25\x57\x69\x95\xbb\x41\xa3\xc9\x11\xb7\x38\xe6\x44\
\xa6\x9f\xca\xff\x97\x9c\x71\x2e\x27\xa2\x10\x19\x22\x43\xa5\x7c\
\xb2\xa3\x71\xe9\x7e\x45\x89\x2a\x9e\x52\x2d\xbb\x24\xbc\xa3\x51\
\x9f\x06\x34\xa4\x11\x8d\x79\x20\x7f\x87\x12\xd7\x74\x63\x43\xce\
\x45\xcc\x31\xdd\x4a\x45\x2f\xe8\x20\xc4\x13\x4d\x68\x4a\x77\x78\
\xaf\xe3\x09\xe1\xca\xd9\x58\x92\xfd\x6f\xe9\xae\xc2\x83\x8b\x89\
\xac\xb7\x55\x3d\x51\x42\x7d\x4f\x23\xa3\x19\xef\xe1\xdd\x4e\xae\
\xdb\x83\xab\x6b\x87\xb8\x7a\xe3\x7f\x27\x28\xec\x3a\x3f\x36\xd6\
\x78\x8d\x9e\xe8\xc9\xee\x47\x35\xda\xd2\x73\x69\xab\xc2\x9a\x2c\
\xf4\xfa\x36\x32\x57\xff\x4c\x0b\x7a\xa1\x57\x5a\xe2\x1d\x56\xae\
\x95\xf5\xfb\xa5\xc3\xba\xfd\xb5\x7d\x5c\xac\x3b\x0f\xbd\xb7\x0e\
\x78\x41\x1b\x3c\xa4\x4d\xda\xa2\x6d\xbc\x87\xcb\x09\xde\x91\xdc\
\x42\xb4\xdb\x64\xb3\x53\xe9\x30\xa3\x5d\xe9\x62\x63\x8f\xda\xc1\
\x59\xa6\x0a\x0b\xf9\xf4\x95\xf6\xe9\x33\x9f\xe3\x5d\x4c\x4e\xef\
\x94\x0e\x45\xf5\x88\x8e\xe5\xf3\x7d\xea\x48\x9c\xd0\x29\x9d\xd1\
\xb9\x44\x97\x2e\xa4\x83\x3a\xb4\x0a\xb2\x7a\x53\x56\x6e\x89\x42\
\x17\xe7\x83\x7a\x3c\x92\x75\x1d\xba\x74\x75\xe7\x74\x45\xab\xd4\
\xe4\x7b\x7b\xca\x5c\x74\x29\x12\xa7\x99\x4e\x71\x41\x2d\x55\x88\
\x29\x79\x7b\xd6\x29\xa5\x26\x65\xbc\xf9\xfd\xd3\x2e\xd9\x1c\x0e\
\xa8\x90\x3d\xbe\x1a\xb6\x73\x90\xf3\x4b\xef\xb8\xe7\x88\x73\xa9\
\xb6\xb3\x9a\xd1\x85\x21\x63\x28\xa2\xde\x3b\xef\x5b\x32\xa5\x9d\
\xb5\xcc\xec\x42\xa6\xb5\x65\xaa\xf7\xdf\xfb\xa6\xe6\x63\xd3\x97\
\x2b\x21\x1e\xa8\x6b\x06\x5f\x3c\xbc\xcb\xc7\x50\x1c\xc8\x1c\xcd\
\x88\xd2\xaf\xb3\x3f\xac\x31\x76\x7b\xb8\xe6\xeb\x6f\xb3\x3f\xac\
\x71\x63\x6e\xcd\xcd\xf7\x9e\xea\xff\xb5\xef\xb9\x7f\x41\xe3\xaf\
\x5f\x57\xfe\x06\xf5\x23\xb8\x71\
\x00\x00\x0e\x9f\
\x2f\
\x2a\x20\x58\x50\x4d\x20\x2a\x2f\x0a\x73\x74\x61\x74\x69\x63\x20\
\x63\x68\x61\x72\x20\x2a\x69\x6d\x61\x67\x65\x36\x5b\x5d\x3d\x7b\
\x0a\x22\x32\x32\x20\x32\x32\x20\x31\x36\x35\x20\x32\x22\x2c\x0a\
\x22\x51\x74\x20\x63\x20\x4e\x6f\x6e\x65\x22\x2c\x0a\x22\x2e\x68\
\x20\x63\x20\x23\x30\x30\x30\x30\x30\x30\x22\x2c\x0a\x22\x2e\x6f\
\x20\x63\x20\x23\x30\x31\x30\x31\x30\x31\x22\x2c\x0a\x22\x61\x46\
\x20\x63\x20\x23\x30\x33\x30\x33\x30\x33\x22\x2c\x0a\x22\x23\x6e\
\x20\x63\x20\x23\x30\x36\x30\x36\x30\x36\x22\x2c\x0a\x22\x2e\x48\
\x20\x63\x20\x23\x30\x38\x30\x38\x30\x38\x22\x2c\x0a\x22\x2e\x72\
\x20\x63\x20\x23\x30\x63\x30\x63\x30\x63\x22\x2c\x0a\x22\x2e\x71\
\x20\x63\x20\x23\x31\x32\x31\x32\x31\x32\x22\x2c\x0a\x22\x23\x56\
\x20\x63\x20\x23\x31\x32\x34\x65\x37\x66\x22\x2c\x0a\x22\x23\x6d\
\x20\x63\x20\x23\x31\x33\x31\x33\x31\x33\x22\x2c\x0a\x22\x2e\x47\
\x20\x63\x20\x23\x31\x36\x31\x36\x31\x35\x22\x2c\x0a\x22\x61\x49\
\x20\x63\x20\x23\x31\x37\x32\x63\x61\x63\x22\x2c\x0a\x22\x2e\x36\
\x20\x63\x20\x23\x31\x38\x31\x38\x31\x38\x22\x2c\x0a\x22\x61\x48\
\x20\x63\x20\x23\x31\x38\x34\x31\x62\x32\x22\x2c\x0a\x22\x2e\x70\
\x20\x63\x20\x23\x31\x39\x31\x39\x31\x39\x22\x2c\x0a\x22\x23\x38\
\x20\x63\x20\x23\x31\x39\x32\x38\x62\x61\x22\x2c\x0a\x22\x23\x57\
\x20\x63\x20\x23\x31\x39\x32\x39\x62\x61\x22\x2c\x0a\x22\x61\x6a\
\x20\x63\x20\x23\x31\x39\x32\x61\x62\x61\x22\x2c\x0a\x22\x61\x76\
\x20\x63\x20\x23\x31\x61\x33\x31\x63\x32\x22\x2c\x0a\x22\x61\x45\
\x20\x63\x20\x23\x31\x62\x31\x62\x31\x62\x22\x2c\x0a\x22\x61\x44\
\x20\x63\x20\x23\x31\x62\x32\x62\x63\x38\x22\x2c\x0a\x22\x61\x74\
\x20\x63\x20\x23\x31\x63\x37\x39\x64\x32\x22\x2c\x0a\x22\x61\x68\
\x20\x63\x20\x23\x31\x63\x37\x64\x64\x34\x22\x2c\x0a\x22\x61\x41\
\x20\x63\x20\x23\x31\x64\x31\x64\x31\x64\x22\x2c\x0a\x22\x61\x43\
\x20\x63\x20\x23\x31\x64\x37\x61\x64\x37\x22\x2c\x0a\x22\x23\x36\
\x20\x63\x20\x23\x31\x64\x37\x65\x64\x61\x22\x2c\x0a\x22\x2e\x35\
\x20\x63\x20\x23\x31\x65\x31\x65\x31\x65\x22\x2c\x0a\x22\x23\x37\
\x20\x63\x20\x23\x31\x65\x38\x61\x65\x30\x22\x2c\x0a\x22\x61\x69\
\x20\x63\x20\x23\x31\x65\x38\x64\x65\x30\x22\x2c\x0a\x22\x61\x75\
\x20\x63\x20\x23\x31\x65\x39\x30\x65\x30\x22\x2c\x0a\x22\x2e\x67\
\x20\x63\x20\x23\x32\x34\x32\x34\x32\x34\x22\x2c\x0a\x22\x23\x35\
\x20\x63\x20\x23\x33\x31\x33\x62\x36\x63\x22\x2c\x0a\x22\x61\x42\
\x20\x63\x20\x23\x33\x34\x33\x64\x38\x64\x22\x2c\x0a\x22\x23\x33\
\x20\x63\x20\x23\x33\x39\x33\x39\x33\x39\x22\x2c\x0a\x22\x2e\x66\
\x20\x63\x20\x23\x33\x64\x33\x64\x33\x64\x22\x2c\x0a\x22\x61\x6b\
\x20\x63\x20\x23\x34\x33\x33\x39\x36\x37\x22\x2c\x0a\x22\x23\x43\
\x20\x63\x20\x23\x34\x33\x34\x34\x34\x32\x22\x2c\x0a\x22\x61\x77\
\x20\x63\x20\x23\x34\x34\x33\x63\x36\x65\x22\x2c\x0a\x22\x23\x6c\
\x20\x63\x20\x23\x34\x35\x34\x36\x34\x33\x22\x2c\x0a\x22\x61\x73\
\x20\x63\x20\x23\x34\x35\x34\x66\x61\x33\x22\x2c\x0a\x22\x2e\x34\
\x20\x63\x20\x23\x34\x37\x34\x38\x34\x35\x22\x2c\x0a\x22\x23\x52\
\x20\x63\x20\x23\x34\x37\x34\x38\x34\x36\x22\x2c\x0a\x22\x2e\x65\
\x20\x63\x20\x23\x34\x38\x34\x38\x34\x38\x22\x2c\x0a\x22\x61\x47\
\x20\x63\x20\x23\x34\x38\x35\x36\x61\x30\x22\x2c\x0a\x22\x2e\x64\
\x20\x63\x20\x23\x34\x61\x34\x61\x34\x61\x22\x2c\x0a\x22\x23\x39\
\x20\x63\x20\x23\x34\x63\x34\x31\x36\x61\x22\x2c\x0a\x22\x2e\x63\
\x20\x63\x20\x23\x34\x63\x34\x63\x34\x63\x22\x2c\x0a\x22\x61\x67\
\x20\x63\x20\x23\x34\x63\x35\x63\x61\x65\x22\x2c\x0a\x22\x23\x58\
\x20\x63\x20\x23\x34\x64\x34\x36\x36\x39\x22\x2c\x0a\x22\x23\x7a\
\x20\x63\x20\x23\x34\x64\x63\x32\x62\x32\x22\x2c\x0a\x22\x23\x50\
\x20\x63\x20\x23\x34\x65\x34\x34\x35\x61\x22\x2c\x0a\x22\x23\x47\
\x20\x63\x20\x23\x35\x33\x35\x30\x34\x65\x22\x2c\x0a\x22\x2e\x6c\
\x20\x63\x20\x23\x35\x34\x35\x34\x35\x34\x22\x2c\x0a\x22\x2e\x62\
\x20\x63\x20\x23\x35\x35\x35\x35\x35\x35\x22\x2c\x0a\x22\x23\x51\
\x20\x63\x20\x23\x35\x39\x35\x32\x37\x34\x22\x2c\x0a\x22\x23\x69\
\x20\x63\x20\x23\x36\x32\x62\x32\x61\x32\x22\x2c\x0a\x22\x2e\x61\
\x20\x63\x20\x23\x36\x37\x36\x37\x36\x37\x22\x2c\x0a\x22\x23\x6a\
\x20\x63\x20\x23\x36\x39\x62\x36\x61\x33\x22\x2c\x0a\x22\x2e\x46\
\x20\x63\x20\x23\x36\x66\x36\x66\x36\x61\x22\x2c\x0a\x22\x2e\x4b\
\x20\x63\x20\x23\x36\x66\x38\x62\x38\x39\x22\x2c\x0a\x22\x61\x78\
\x20\x63\x20\x23\x37\x34\x37\x34\x37\x34\x22\x2c\x0a\x22\x23\x61\
\x20\x63\x20\x23\x37\x36\x61\x31\x61\x30\x22\x2c\x0a\x22\x2e\x23\
\x20\x63\x20\x23\x37\x39\x37\x39\x37\x39\x22\x2c\x0a\x22\x23\x41\
\x20\x63\x20\x23\x37\x62\x64\x37\x65\x38\x22\x2c\x0a\x22\x61\x79\
\x20\x63\x20\x23\x37\x64\x37\x64\x37\x64\x22\x2c\x0a\x22\x23\x55\
\x20\x63\x20\x23\x37\x65\x37\x64\x37\x33\x22\x2c\x0a\x22\x2e\x49\
\x20\x63\x20\x23\x38\x30\x38\x30\x38\x30\x22\x2c\x0a\x22\x2e\x4f\
\x20\x63\x20\x23\x38\x31\x61\x33\x62\x38\x22\x2c\x0a\x22\x61\x7a\
\x20\x63\x20\x23\x38\x32\x38\x32\x38\x32\x22\x2c\x0a\x22\x23\x79\
\x20\x63\x20\x23\x38\x32\x64\x31\x63\x30\x22\x2c\x0a\x22\x23\x53\
\x20\x63\x20\x23\x38\x34\x38\x34\x38\x34\x22\x2c\x0a\x22\x23\x4f\
\x20\x63\x20\x23\x38\x35\x37\x65\x37\x63\x22\x2c\x0a\x22\x23\x46\
\x20\x63\x20\x23\x38\x36\x61\x64\x64\x32\x22\x2c\x0a\x22\x23\x6b\
\x20\x63\x20\x23\x38\x36\x63\x64\x64\x61\x22\x2c\x0a\x22\x23\x4e\
\x20\x63\x20\x23\x38\x39\x62\x31\x62\x64\x22\x2c\x0a\x22\x23\x68\
\x20\x63\x20\x23\x38\x61\x63\x65\x63\x33\x22\x2c\x0a\x22\x23\x6f\
\x20\x63\x20\x23\x38\x63\x38\x63\x38\x63\x22\x2c\x0a\x22\x23\x4c\
\x20\x63\x20\x23\x38\x63\x62\x62\x63\x61\x22\x2c\x0a\x22\x61\x6c\
\x20\x63\x20\x23\x38\x64\x38\x64\x38\x64\x22\x2c\x0a\x22\x2e\x73\
\x20\x63\x20\x23\x38\x66\x38\x66\x38\x66\x22\x2c\x0a\x22\x23\x48\
\x20\x63\x20\x23\x39\x30\x39\x30\x39\x30\x22\x2c\x0a\x22\x23\x4b\
\x20\x63\x20\x23\x39\x30\x62\x61\x63\x39\x22\x2c\x0a\x22\x23\x4d\
\x20\x63\x20\x23\x39\x31\x63\x34\x63\x66\x22\x2c\x0a\x22\x23\x74\
\x20\x63\x20\x23\x39\x32\x39\x32\x39\x32\x22\x2c\x0a\x22\x2e\x58\
\x20\x63\x20\x23\x39\x34\x63\x32\x63\x66\x22\x2c\x0a\x22\x2e\x4e\
\x20\x63\x20\x23\x39\x34\x63\x32\x64\x30\x22\x2c\x0a\x22\x2e\x57\
\x20\x63\x20\x23\x39\x35\x39\x35\x39\x35\x22\x2c\x0a\x22\x23\x42\
\x20\x63\x20\x23\x39\x36\x62\x39\x63\x62\x22\x2c\x0a\x22\x2e\x33\
\x20\x63\x20\x23\x39\x37\x62\x65\x64\x65\x22\x2c\x0a\x22\x2e\x4c\
\x20\x63\x20\x23\x39\x38\x63\x32\x63\x65\x22\x2c\x0a\x22\x2e\x50\
\x20\x63\x20\x23\x39\x62\x39\x62\x39\x62\x22\x2c\x0a\x22\x61\x2e\
\x20\x63\x20\x23\x39\x63\x39\x63\x39\x63\x22\x2c\x0a\x22\x61\x6d\
\x20\x63\x20\x23\x39\x64\x39\x64\x39\x64\x22\x2c\x0a\x22\x23\x73\
\x20\x63\x20\x23\x39\x64\x62\x64\x63\x34\x22\x2c\x0a\x22\x23\x62\
\x20\x63\x20\x23\x39\x65\x39\x65\x39\x65\x22\x2c\x0a\x22\x23\x59\
\x20\x63\x20\x23\x61\x30\x61\x30\x61\x30\x22\x2c\x0a\x22\x61\x6e\
\x20\x63\x20\x23\x61\x36\x61\x36\x61\x36\x22\x2c\x0a\x22\x23\x76\
\x20\x63\x20\x23\x61\x36\x64\x31\x64\x36\x22\x2c\x0a\x22\x2e\x5a\
\x20\x63\x20\x23\x61\x37\x61\x31\x61\x31\x22\x2c\x0a\x22\x23\x49\
\x20\x63\x20\x23\x61\x37\x61\x37\x61\x37\x22\x2c\x0a\x22\x23\x44\
\x20\x63\x20\x23\x61\x37\x65\x64\x64\x65\x22\x2c\x0a\x22\x2e\x4d\
\x20\x63\x20\x23\x61\x38\x64\x38\x65\x35\x22\x2c\x0a\x22\x23\x75\
\x20\x63\x20\x23\x61\x65\x61\x65\x61\x65\x22\x2c\x0a\x22\x61\x63\
\x20\x63\x20\x23\x62\x31\x62\x31\x62\x31\x22\x2c\x0a\x22\x61\x23\
\x20\x63\x20\x23\x62\x32\x62\x32\x62\x32\x22\x2c\x0a\x22\x2e\x32\
\x20\x63\x20\x23\x62\x35\x63\x62\x64\x36\x22\x2c\x0a\x22\x2e\x56\
\x20\x63\x20\x23\x62\x36\x62\x36\x62\x36\x22\x2c\x0a\x22\x61\x72\
\x20\x63\x20\x23\x62\x37\x62\x37\x62\x37\x22\x2c\x0a\x22\x23\x5a\
\x20\x63\x20\x23\x62\x38\x62\x38\x62\x38\x22\x2c\x0a\x22\x23\x32\
\x20\x63\x20\x23\x62\x61\x62\x61\x62\x61\x22\x2c\x0a\x22\x2e\x51\
\x20\x63\x20\x23\x62\x61\x62\x62\x62\x39\x22\x2c\x0a\x22\x61\x71\
\x20\x63\x20\x23\x62\x62\x62\x62\x62\x62\x22\x2c\x0a\x22\x23\x63\
\x20\x63\x20\x23\x62\x63\x62\x63\x62\x63\x22\x2c\x0a\x22\x2e\x38\
\x20\x63\x20\x23\x62\x66\x62\x66\x62\x66\x22\x2c\x0a\x22\x61\x70\
\x20\x63\x20\x23\x63\x30\x63\x30\x63\x30\x22\x2c\x0a\x22\x2e\x31\
\x20\x63\x20\x23\x63\x31\x64\x39\x64\x32\x22\x2c\x0a\x22\x61\x61\
\x20\x63\x20\x23\x63\x38\x63\x38\x63\x38\x22\x2c\x0a\x22\x61\x62\
\x20\x63\x20\x23\x63\x61\x63\x61\x63\x61\x22\x2c\x0a\x22\x61\x6f\
\x20\x63\x20\x23\x63\x62\x63\x62\x63\x62\x22\x2c\x0a\x22\x2e\x59\
\x20\x63\x20\x23\x63\x63\x66\x38\x66\x31\x22\x2c\x0a\x22\x23\x4a\
\x20\x63\x20\x23\x63\x64\x63\x64\x63\x64\x22\x2c\x0a\x22\x2e\x52\
\x20\x63\x20\x23\x63\x65\x63\x65\x63\x65\x22\x2c\x0a\x22\x23\x70\
\x20\x63\x20\x23\x64\x31\x66\x39\x66\x34\x22\x2c\x0a\x22\x23\x34\
\x20\x63\x20\x23\x64\x35\x64\x35\x64\x35\x22\x2c\x0a\x22\x23\x77\
\x20\x63\x20\x23\x64\x35\x65\x63\x65\x34\x22\x2c\x0a\x22\x2e\x39\
\x20\x63\x20\x23\x64\x35\x66\x36\x66\x35\x22\x2c\x0a\x22\x23\x30\
\x20\x63\x20\x23\x64\x36\x64\x36\x64\x36\x22\x2c\x0a\x22\x2e\x55\
\x20\x63\x20\x23\x64\x37\x64\x37\x64\x37\x22\x2c\x0a\x22\x61\x66\
\x20\x63\x20\x23\x64\x38\x64\x38\x64\x38\x22\x2c\x0a\x22\x2e\x78\
\x20\x63\x20\x23\x64\x61\x64\x61\x64\x61\x22\x2c\x0a\x22\x2e\x79\
\x20\x63\x20\x23\x64\x62\x64\x62\x64\x62\x22\x2c\x0a\x22\x2e\x77\
\x20\x63\x20\x23\x64\x63\x64\x63\x64\x63\x22\x2c\x0a\x22\x23\x65\
\x20\x63\x20\x23\x64\x63\x66\x37\x66\x34\x22\x2c\x0a\x22\x23\x31\
\x20\x63\x20\x23\x64\x64\x64\x64\x64\x64\x22\x2c\x0a\x22\x61\x65\
\x20\x63\x20\x23\x64\x65\x64\x65\x64\x65\x22\x2c\x0a\x22\x2e\x45\
\x20\x63\x20\x23\x64\x66\x64\x66\x64\x66\x22\x2c\x0a\x22\x2e\x7a\
\x20\x63\x20\x23\x65\x30\x65\x30\x65\x30\x22\x2c\x0a\x22\x23\x67\
\x20\x63\x20\x23\x65\x30\x65\x62\x65\x34\x22\x2c\x0a\x22\x23\x71\
\x20\x63\x20\x23\x65\x31\x65\x64\x65\x61\x22\x2c\x0a\x22\x23\x64\
\x20\x63\x20\x23\x65\x32\x65\x32\x65\x32\x22\x2c\x0a\x22\x23\x78\
\x20\x63\x20\x23\x65\x32\x65\x62\x65\x32\x22\x2c\x0a\x22\x2e\x30\
\x20\x63\x20\x23\x65\x32\x65\x65\x65\x35\x22\x2c\x0a\x22\x2e\x76\
\x20\x63\x20\x23\x65\x33\x65\x33\x65\x33\x22\x2c\x0a\x22\x23\x23\
\x20\x63\x20\x23\x65\x33\x65\x37\x64\x35\x22\x2c\x0a\x22\x23\x72\
\x20\x63\x20\x23\x65\x34\x65\x62\x64\x39\x22\x2c\x0a\x22\x23\x45\
\x20\x63\x20\x23\x65\x34\x66\x32\x65\x63\x22\x2c\x0a\x22\x2e\x75\
\x20\x63\x20\x23\x65\x35\x65\x35\x65\x35\x22\x2c\x0a\x22\x2e\x53\
\x20\x63\x20\x23\x65\x37\x65\x37\x65\x37\x22\x2c\x0a\x22\x2e\x6b\
\x20\x63\x20\x23\x65\x39\x65\x39\x65\x39\x22\x2c\x0a\x22\x2e\x41\
\x20\x63\x20\x23\x65\x62\x65\x62\x65\x62\x22\x2c\x0a\x22\x2e\x44\
\x20\x63\x20\x23\x65\x64\x65\x64\x65\x64\x22\x2c\x0a\x22\x2e\x74\
\x20\x63\x20\x23\x66\x30\x66\x30\x66\x30\x22\x2c\x0a\x22\x23\x54\
\x20\x63\x20\x23\x66\x34\x66\x34\x66\x34\x22\x2c\x0a\x22\x2e\x6e\
\x20\x63\x20\x23\x66\x36\x66\x36\x66\x36\x22\x2c\x0a\x22\x2e\x43\
\x20\x63\x20\x23\x66\x37\x66\x37\x66\x37\x22\x2c\x0a\x22\x23\x66\
\x20\x63\x20\x23\x66\x38\x66\x35\x66\x32\x22\x2c\x0a\x22\x2e\x6d\
\x20\x63\x20\x23\x66\x38\x66\x38\x66\x38\x22\x2c\x0a\x22\x2e\x37\
\x20\x63\x20\x23\x66\x39\x66\x39\x66\x39\x22\x2c\x0a\x22\x61\x64\
\x20\x63\x20\x23\x66\x61\x66\x61\x66\x61\x22\x2c\x0a\x22\x23\x2e\
\x20\x63\x20\x23\x66\x62\x66\x30\x65\x62\x22\x2c\x0a\x22\x2e\x4a\
\x20\x63\x20\x23\x66\x62\x66\x62\x66\x62\x22\x2c\x0a\x22\x2e\x54\
\x20\x63\x20\x23\x66\x63\x66\x63\x66\x63\x22\x2c\x0a\x22\x2e\x42\
\x20\x63\x20\x23\x66\x64\x66\x64\x66\x64\x22\x2c\x0a\x22\x2e\x6a\
\x20\x63\x20\x23\x66\x65\x66\x65\x66\x65\x22\x2c\x0a\x22\x2e\x69\
\x20\x63\x20\x23\x66\x66\x66\x66\x66\x66\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x23\x2e\x61\x2e\x62\x2e\x63\
\x2e\x64\x2e\x64\x2e\x65\x2e\x66\x2e\x67\x2e\x68\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x2e\x23\x2e\x69\x2e\x69\x2e\x69\x2e\x69\
\x2e\x69\x2e\x69\x2e\x69\x2e\x69\x2e\x69\x2e\x68\x2e\x68\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x2e\x61\x2e\x6a\x2e\x6a\x2e\x6a\x2e\x6a\
\x2e\x6a\x2e\x6a\x2e\x69\x2e\x69\x2e\x69\x2e\x68\x2e\x6b\x2e\x68\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x2e\x6c\x2e\x6d\x2e\x6e\x2e\x6f\x2e\x70\
\x2e\x71\x2e\x72\x2e\x73\x2e\x6a\x2e\x69\x2e\x68\x2e\x74\x2e\x75\
\x2e\x68\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x2e\x65\x2e\x76\x2e\x77\x2e\x78\x2e\x79\
\x2e\x7a\x2e\x41\x2e\x6e\x2e\x42\x2e\x42\x2e\x68\x2e\x43\x2e\x44\
\x2e\x45\x2e\x68\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x2e\x68\x2e\x68\x2e\x68\x2e\x68\x2e\x68\x2e\x46\
\x2e\x47\x2e\x48\x2e\x49\x2e\x6e\x2e\x4a\x2e\x68\x2e\x68\x2e\x68\
\x2e\x68\x2e\x68\x2e\x68\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x2e\x68\x2e\x4b\x2e\x4c\x2e\x4d\x2e\x4e\x2e\x4f\x2e\x68\
\x2e\x50\x2e\x51\x2e\x52\x2e\x53\x2e\x6e\x2e\x54\x2e\x6a\x2e\x55\
\x2e\x56\x2e\x57\x2e\x68\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x2e\x68\x2e\x58\x2e\x59\x2e\x5a\x2e\x30\x2e\x31\x2e\x32\x2e\x33\
\x2e\x68\x2e\x34\x2e\x35\x2e\x36\x2e\x71\x2e\x72\x2e\x73\x2e\x37\
\x2e\x76\x2e\x38\x2e\x68\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x2e\x68\x2e\x39\x23\x2e\x2e\x23\x23\x23\x2e\x46\x2e\x46\x2e\x46\
\x23\x61\x2e\x68\x23\x62\x23\x63\x23\x64\x2e\x6d\x2e\x6a\x2e\x37\
\x2e\x76\x23\x63\x2e\x68\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x2e\x68\x23\x65\x23\x66\x2e\x61\x23\x67\x23\x68\x23\x69\x23\x6a\
\x23\x6b\x2e\x68\x23\x6c\x23\x6d\x2e\x72\x23\x6e\x23\x6f\x2e\x37\
\x2e\x76\x23\x63\x2e\x68\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x2e\x68\x23\x70\x23\x71\x2e\x61\x23\x72\x2e\x46\x2e\x46\x2e\x46\
\x23\x73\x2e\x68\x23\x74\x23\x75\x2e\x78\x2e\x6e\x2e\x6a\x2e\x37\
\x2e\x76\x23\x63\x2e\x68\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x2e\x68\x23\x76\x23\x77\x2e\x23\x23\x78\x23\x79\x23\x7a\x23\x41\
\x23\x42\x2e\x68\x23\x43\x23\x6d\x23\x6d\x2e\x71\x23\x6f\x2e\x37\
\x2e\x76\x23\x63\x2e\x68\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x2e\x68\x23\x44\x2e\x5a\x23\x45\x2e\x46\x2e\x46\x23\x46\
\x2e\x68\x23\x47\x23\x48\x23\x49\x23\x4a\x2e\x41\x2e\x37\x2e\x6d\
\x2e\x76\x23\x63\x2e\x68\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x2e\x68\x23\x4b\x23\x4c\x23\x4d\x23\x4e\x2e\x68\
\x23\x4f\x23\x50\x23\x51\x23\x52\x23\x6d\x2e\x71\x23\x53\x23\x54\
\x23\x64\x23\x63\x2e\x68\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x2e\x68\x2e\x68\x2e\x68\x2e\x68\x2e\x5a\
\x23\x55\x23\x56\x23\x57\x23\x58\x23\x59\x23\x5a\x23\x30\x2e\x53\
\x23\x31\x23\x32\x2e\x68\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x23\x33\x2e\x74\x2e\x76\x2e\x78\x23\x34\
\x23\x35\x23\x36\x23\x37\x23\x38\x23\x39\x61\x2e\x61\x23\x61\x61\
\x61\x62\x61\x63\x2e\x68\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x2e\x36\x61\x64\x2e\x6b\x61\x65\x2e\x79\
\x61\x66\x61\x67\x61\x68\x61\x69\x61\x6a\x61\x6b\x61\x6c\x61\x6d\
\x61\x6e\x61\x2e\x2e\x6f\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x2e\x68\x61\x65\x61\x6f\x61\x70\x61\x71\
\x61\x71\x61\x72\x61\x73\x61\x74\x61\x75\x61\x76\x61\x77\x61\x78\
\x61\x79\x61\x7a\x2e\x6f\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x68\x2e\x68\x2e\x68\x2e\x68\
\x2e\x68\x61\x41\x2e\x6f\x61\x42\x61\x43\x61\x69\x61\x44\x2e\x48\
\x61\x45\x61\x46\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x61\x47\x61\x48\x61\x49\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x7d\x3b\x0a\
\x00\x00\x05\x1a\
\x00\
\x00\x11\x8f\x78\x9c\xe5\x96\x49\x73\x32\x47\x0c\x86\xef\xfe\x15\
\x94\x75\x73\xa5\xf4\xc1\xcc\x30\xcc\x54\x2a\x07\xef\x60\xbc\x80\
\x8d\xd7\x54\x0e\x3d\x1b\x06\xbc\xb1\x18\x2f\xa9\xfc\xf7\xa8\x5b\
\x52\xdb\xf9\xca\x17\x93\x5b\x52\x32\x86\x07\x49\xaf\xa4\xee\x9e\
\x19\x7e\x6c\xd4\xae\x7a\x47\xb5\x8d\x1f\x6b\xf3\x85\x59\x8c\xf2\
\x5a\x7e\x6b\x66\xb5\x8d\xd1\xbd\x19\x96\x8d\xdf\xff\xf8\xed\xcf\
\xb5\xf5\x30\xa8\xd1\x5f\x23\x0a\x6a\xc1\xfa\x2f\x6b\xeb\xfd\x45\
\x2d\xaf\x1d\x3f\x3e\x94\x16\xe0\x84\x00\xea\xf5\x46\xbd\x6a\x39\
\xee\x31\x07\x8d\xb2\x72\x7c\xaa\x2c\xfe\x33\xcf\xec\x1f\x08\xa7\
\xcc\xe6\x96\x39\x54\xff\xb1\xe3\x84\xfc\x9c\xff\xca\xec\xfd\xdb\
\xc2\x92\x0f\xbb\x96\x1b\xa4\x57\x72\xfc\x8c\xd9\xfb\x1f\x99\xa3\
\x40\xb8\xef\x98\xf4\x0a\x37\x8f\x99\x28\x4b\xbe\xb0\x8f\x6f\x0b\
\x1b\xe9\x77\x6c\x39\x68\x84\x5a\x6f\xce\x1c\x05\xac\x07\xfb\xc2\
\x12\x8f\x29\x73\x53\xf5\x02\xc7\x69\x98\xe6\xb1\xd3\x1b\x2a\x17\
\xcc\xc0\x1c\x05\x39\xeb\x3d\x29\x8b\xfe\x39\xb3\xea\x99\x52\x58\
\xea\xc1\x9b\xe5\x90\xea\x71\x3c\x06\xca\xd2\x6f\x47\x58\xe3\xdf\
\x99\xe3\x50\xb8\xe1\x38\x8d\x4c\x56\x38\x3e\x54\x96\xfa\x5b\xcc\
\x3e\xfe\x45\x38\x13\xbe\xb0\x1c\x05\x54\xdf\xcd\x03\x77\x9e\x39\
\xff\x92\x39\x0e\xe5\xbc\x4c\x85\x25\x1f\x1b\xcc\x2d\xd5\x6f\x3a\
\x36\x4d\x23\x7a\x07\xcc\xde\xdf\x15\x96\x7c\x93\x33\x27\x91\x70\
\x66\xb9\x49\xf5\x78\xbd\x71\xe0\x99\xd7\xe7\x88\xb9\x15\xb2\x3e\
\xe6\xca\xbc\x5e\x78\x2e\x9c\x49\xff\x0b\x65\x39\x9f\x9b\xcc\x5a\
\x0f\xae\x1c\x9b\x38\x34\x6e\xfd\xf0\x82\x39\x89\x64\xde\x3d\x65\
\x89\x5f\x0a\xe7\xd2\x6f\x61\x39\x0e\xe3\x8c\xd7\x1f\x4b\xe6\x56\
\x26\xfd\x5f\x7a\xe6\xfe\x43\x65\xe9\xbf\xcf\x9c\x44\xb2\xff\x4d\
\xe1\x5c\xea\x67\xca\x52\x7f\xcc\x9c\xea\x7a\x55\x8e\xb3\x56\x28\
\xfb\x5f\x57\x96\xfa\x67\xcc\x49\x24\xe7\xf3\x99\x59\xf3\x71\x5b\
\x58\xe7\x19\x59\x6e\x7d\xf4\xfb\xce\x9c\x44\x59\xd3\xf1\x58\x99\
\xf5\x21\x16\xce\x25\x3e\x52\x96\xf9\x32\xe6\x34\x97\xfd\xe9\x30\
\x9b\xa6\xcc\xf3\x20\x5c\x08\xdf\x38\xce\x7c\xbd\x53\xe1\x5c\xd6\
\xf7\x80\x39\x8d\x84\x39\x3f\x33\x4d\xd1\xef\x09\xab\x5e\xce\x9c\
\x69\x3d\x77\x7e\x92\x28\x89\xd2\xdc\x71\xa8\x2c\xfb\x3f\x12\xce\
\xe5\x7a\xbf\x63\xd6\x7a\xc6\x08\x8b\x1f\xdf\x98\xb5\x1e\x9e\x30\
\xfb\x7a\x12\x9f\xa9\xdf\x9d\xc7\x24\x4f\xb5\x9e\x51\x96\x79\x77\
\x84\x75\xde\x7b\x65\x59\xdf\x4d\x66\x9a\x97\xf5\x2a\xe1\x82\xcf\
\x37\xb6\x99\xb5\x1e\x38\xbd\x94\xfa\x37\x4e\x1f\x12\x65\x39\x2f\
\xa9\xb2\xcc\x8b\xc2\x5a\x7f\xc6\x9c\xc7\xa2\x57\x08\x97\xc2\x6e\
\xbf\xd3\xdc\x5e\xf0\x8e\x5b\xca\x32\xcf\x33\x73\xa6\xfd\xc5\xcc\
\xaa\x87\x75\x61\xd1\xc3\x57\xe6\x42\xfd\xee\x7e\x46\xea\xa2\x07\
\xd7\x9e\xb9\x5e\xc9\xec\xfb\x01\x66\x9f\xef\xae\x6f\x53\x98\x42\
\xfa\x99\x30\xfb\x79\x46\xcc\x3e\xde\x3d\x9f\xb2\x66\xa6\xfd\x17\
\x9e\x79\x3d\xba\xc2\x85\xec\xff\x1e\xb3\xef\xff\x98\xd9\xeb\x6d\
\x09\xab\xdf\x3d\x7f\xb2\xc2\x9a\x63\x50\x96\xeb\x09\x99\x7d\xfe\
\x3e\x73\xd9\x92\x7e\xdd\xf3\x37\x8f\x3d\x57\xc2\x95\xc4\xbf\x30\
\x57\xe2\x47\x8e\x2f\xbd\xde\x35\xb3\xe6\xe3\x54\x58\xf3\x6f\x98\
\x7d\xbe\x3b\xff\xc5\x87\x7e\xc2\xec\xfd\xee\x79\x5d\x7c\xe4\xb7\
\x98\xd5\x0f\xf7\xc2\xe2\x07\xf7\xfc\xb4\xd5\x25\xde\xdd\x4f\x9d\
\x9b\xd9\x3d\x3f\xab\x0f\xbf\x8b\xaf\xbc\xbf\xbf\xf8\x77\xf6\x7f\
\xd0\x40\x40\x83\x19\xe6\x68\x56\xd5\xc0\x02\x4b\xac\x70\x88\xb7\
\x38\x5a\x4d\x83\x14\xc6\x38\x21\x85\x21\xde\xe1\xfd\x2a\x1a\x34\
\xc3\x03\x3e\x52\xfe\x13\x4e\x71\xf6\x7d\x0d\x9c\xe3\x02\x9f\x5d\
\x07\x4b\x7c\xc1\x57\x7c\x5b\x41\xe3\x1d\x37\x45\x61\x8b\x14\x66\
\xb8\x8d\x3b\xdf\xd1\xc0\x5d\x9a\x62\x4f\x14\xf6\x29\xbf\x4d\xd6\
\xc1\x83\xaf\xb2\xa8\xdf\x39\x76\xad\x7d\xd6\xc0\x43\x3c\xc2\x63\
\xa7\x30\xa5\x0e\xda\x78\x42\x73\xf4\xc8\xfa\x78\xf8\x8f\x3c\x83\
\xa7\x78\x86\x03\x3c\xc7\x0b\xb2\x3e\x5e\xe2\x15\x6b\xd0\x69\xe8\
\xe3\xb5\x53\xb8\xc1\xba\xcf\xb7\xd6\xc0\x00\x43\x8c\x28\xaf\xa4\
\xd3\xd2\xa4\x1d\x8f\xa9\xd6\x1d\xb6\x30\x71\xb1\x29\x0e\xf8\x9e\
\x85\x97\x80\x6e\x27\x6e\x00\xc0\x90\x86\xcd\xee\x90\xf5\x20\x83\
\x1c\x0a\x28\x71\x0b\x2a\x18\xba\xcc\x04\xa7\x70\x0b\x23\x3b\x2d\
\x8c\x61\x02\x77\xfc\xbb\x88\x62\x86\x70\x8f\xfb\x50\x48\x0f\x9d\
\x4f\xd6\xc6\x98\x94\x81\x6a\xda\x2c\xaa\x00\x39\x76\xe0\x81\x5e\
\x63\x6c\xc0\x23\x3c\xf1\x6f\x23\x7c\x82\x8a\x56\xa1\xfe\x85\xc2\
\xd7\xb6\x6d\x8d\x7a\x9c\xc2\x0c\xe6\xfc\x7b\x90\xaa\xd8\x7d\xb0\
\x15\x7a\x3f\xc5\x72\xfc\xc7\x27\x9b\xfb\x4c\xaf\x31\xd9\x12\x5e\
\xe0\x95\xfb\x80\x37\x78\xa7\xbe\xdc\xfc\x1f\x55\xf4\x13\xc5\x66\
\x14\xbd\xa4\xff\x63\x67\x99\xcb\xb6\xdf\x6d\xc2\x16\x6c\x8b\xc6\
\x0e\xec\xd2\xda\x4c\xe9\xbb\xf1\x4f\x35\x3b\xb0\x07\xfb\xe4\x9b\
\x40\x9b\xde\x3b\xb0\x45\xfb\xd4\x80\x03\xe8\x42\x97\xde\xa7\x54\
\xfb\x15\x0e\x79\x5f\xe0\x08\x8e\x69\xb2\x77\xf2\x65\xae\xd3\x67\
\xed\x84\x2a\x9d\x40\x0f\xfa\x54\xa5\x07\xa7\x70\x06\x03\xca\x9a\
\x91\xb5\x31\x85\x73\xd2\x1d\xc0\x85\x3f\x63\xef\x4e\xa5\x43\xea\
\x4b\xea\xf5\xd9\x76\x44\x4a\x1d\xb8\x84\x2b\xd8\xa1\x2a\xd7\xd4\
\xed\x0d\xd4\xa1\x01\x01\x29\xf6\xc8\x8e\xc9\x06\xa4\x1d\x7a\x8d\
\x39\x44\xd0\xa4\x1a\x6d\xaa\xdc\x75\x3a\x6c\xf1\x17\xa7\xbc\xc0\
\x2b\x68\x41\x02\xa9\x41\xbc\xc2\xf9\xe7\x6b\x0e\x0b\x03\xd4\xed\
\x84\x66\x3a\x90\x35\x5c\x9a\x6f\xdf\xc7\x70\xd7\x64\xd4\xcb\x23\
\xad\x9e\xed\x65\x69\xf2\x55\xee\x63\x38\x37\x05\xcd\x38\x33\x25\
\xad\x7a\x17\x5e\x4c\xf5\x7d\x0d\x77\xfd\x1d\x9a\xa1\xb9\xa5\x99\
\xce\x61\xb2\x9a\x86\x35\x5a\xdf\xbe\xdd\x45\x73\x6b\x56\xbc\x27\
\xb3\x0a\xfd\x16\x1a\x9b\x89\xb9\x5b\x5d\xe3\x3b\xf6\x9f\xd2\xf8\
\xeb\xd7\xb5\xbf\x01\xda\x3f\xb9\x0e\
\x00\x00\x15\xdf\
\x2f\
\x2a\x20\x58\x50\x4d\x20\x2a\x2f\x0a\x73\x74\x61\x74\x69\x63\x20\
\x63\x68\x61\x72\x20\x2a\x69\x6d\x61\x67\x65\x35\x5b\x5d\x3d\x7b\
\x0a\x22\x33\x32\x20\x33\x32\x20\x32\x31\x31\x20\x32\x22\x2c\x0a\
\x22\x51\x74\x20\x63\x20\x4e\x6f\x6e\x65\x22\x2c\x0a\x22\x61\x4a\
\x20\x63\x20\x23\x30\x30\x30\x30\x30\x30\x22\x2c\x0a\x22\x23\x57\
\x20\x63\x20\x23\x30\x38\x30\x38\x30\x30\x22\x2c\x0a\x22\x23\x4e\
\x20\x63\x20\x23\x31\x30\x30\x38\x30\x30\x22\x2c\x0a\x22\x23\x56\
\x20\x63\x20\x23\x31\x30\x31\x30\x30\x30\x22\x2c\x0a\x22\x23\x45\
\x20\x63\x20\x23\x31\x30\x31\x30\x30\x38\x22\x2c\x0a\x22\x23\x4d\
\x20\x63\x20\x23\x31\x38\x31\x30\x30\x30\x22\x2c\x0a\x22\x23\x4c\
\x20\x63\x20\x23\x31\x38\x31\x38\x30\x30\x22\x2c\x0a\x22\x23\x44\
\x20\x63\x20\x23\x31\x38\x31\x38\x30\x38\x22\x2c\x0a\x22\x23\x46\
\x20\x63\x20\x23\x31\x38\x31\x38\x31\x30\x22\x2c\x0a\x22\x61\x73\
\x20\x63\x20\x23\x32\x31\x31\x38\x30\x30\x22\x2c\x0a\x22\x23\x4b\
\x20\x63\x20\x23\x32\x31\x31\x38\x30\x38\x22\x2c\x0a\x22\x23\x4a\
\x20\x63\x20\x23\x32\x31\x32\x31\x31\x30\x22\x2c\x0a\x22\x23\x47\
\x20\x63\x20\x23\x32\x31\x32\x31\x31\x38\x22\x2c\x0a\x22\x23\x71\
\x20\x63\x20\x23\x32\x31\x32\x31\x32\x31\x22\x2c\x0a\x22\x61\x6e\
\x20\x63\x20\x23\x32\x39\x32\x31\x30\x30\x22\x2c\x0a\x22\x23\x49\
\x20\x63\x20\x23\x32\x39\x32\x31\x31\x30\x22\x2c\x0a\x22\x61\x4e\
\x20\x63\x20\x23\x32\x39\x32\x39\x31\x30\x22\x2c\x0a\x22\x23\x48\
\x20\x63\x20\x23\x32\x39\x32\x39\x31\x38\x22\x2c\x0a\x22\x23\x79\
\x20\x63\x20\x23\x32\x39\x32\x39\x32\x31\x22\x2c\x0a\x22\x61\x46\
\x20\x63\x20\x23\x33\x31\x32\x39\x30\x30\x22\x2c\x0a\x22\x23\x43\
\x20\x63\x20\x23\x33\x31\x32\x39\x31\x38\x22\x2c\x0a\x22\x23\x69\
\x20\x63\x20\x23\x33\x31\x32\x39\x32\x39\x22\x2c\x0a\x22\x2e\x30\
\x20\x63\x20\x23\x33\x31\x33\x31\x33\x31\x22\x2c\x0a\x22\x23\x37\
\x20\x63\x20\x23\x33\x39\x33\x31\x30\x30\x22\x2c\x0a\x22\x23\x55\
\x20\x63\x20\x23\x33\x39\x33\x31\x30\x38\x22\x2c\x0a\x22\x61\x47\
\x20\x63\x20\x23\x33\x39\x33\x39\x33\x31\x22\x2c\x0a\x22\x2e\x4d\
\x20\x63\x20\x23\x33\x39\x33\x39\x33\x39\x22\x2c\x0a\x22\x23\x75\
\x20\x63\x20\x23\x34\x32\x33\x39\x33\x39\x22\x2c\x0a\x22\x23\x63\
\x20\x63\x20\x23\x34\x32\x34\x61\x34\x32\x22\x2c\x0a\x22\x61\x45\
\x20\x63\x20\x23\x34\x61\x34\x32\x30\x30\x22\x2c\x0a\x22\x61\x59\
\x20\x63\x20\x23\x34\x61\x34\x32\x31\x30\x22\x2c\x0a\x22\x2e\x56\
\x20\x63\x20\x23\x34\x61\x34\x32\x33\x39\x22\x2c\x0a\x22\x23\x42\
\x20\x63\x20\x23\x34\x61\x34\x61\x33\x39\x22\x2c\x0a\x22\x2e\x6d\
\x20\x63\x20\x23\x34\x61\x34\x61\x34\x32\x22\x2c\x0a\x22\x61\x50\
\x20\x63\x20\x23\x34\x61\x35\x32\x31\x38\x22\x2c\x0a\x22\x2e\x47\
\x20\x63\x20\x23\x34\x61\x35\x32\x35\x32\x22\x2c\x0a\x22\x2e\x7a\
\x20\x63\x20\x23\x34\x61\x35\x61\x35\x32\x22\x2c\x0a\x22\x61\x4f\
\x20\x63\x20\x23\x35\x32\x34\x32\x30\x30\x22\x2c\x0a\x22\x61\x6d\
\x20\x63\x20\x23\x35\x32\x34\x61\x30\x30\x22\x2c\x0a\x22\x23\x54\
\x20\x63\x20\x23\x35\x32\x34\x61\x30\x38\x22\x2c\x0a\x22\x23\x70\
\x20\x63\x20\x23\x35\x32\x34\x61\x34\x61\x22\x2c\x0a\x22\x2e\x73\
\x20\x63\x20\x23\x35\x32\x35\x32\x35\x32\x22\x2c\x0a\x22\x23\x61\
\x20\x63\x20\x23\x35\x32\x35\x61\x35\x32\x22\x2c\x0a\x22\x2e\x37\
\x20\x63\x20\x23\x35\x32\x36\x33\x35\x61\x22\x2c\x0a\x22\x23\x62\
\x20\x63\x20\x23\x35\x32\x36\x33\x36\x33\x22\x2c\x0a\x22\x61\x7a\
\x20\x63\x20\x23\x35\x61\x34\x61\x30\x30\x22\x2c\x0a\x22\x23\x36\
\x20\x63\x20\x23\x35\x61\x35\x32\x30\x38\x22\x2c\x0a\x22\x61\x77\
\x20\x63\x20\x23\x35\x61\x35\x32\x31\x30\x22\x2c\x0a\x22\x2e\x5a\
\x20\x63\x20\x23\x35\x61\x35\x32\x34\x61\x22\x2c\x0a\x22\x2e\x4c\
\x20\x63\x20\x23\x35\x61\x35\x61\x35\x32\x22\x2c\x0a\x22\x2e\x79\
\x20\x63\x20\x23\x35\x61\x35\x61\x35\x61\x22\x2c\x0a\x22\x2e\x46\
\x20\x63\x20\x23\x35\x61\x36\x33\x35\x61\x22\x2c\x0a\x22\x23\x53\
\x20\x63\x20\x23\x36\x33\x35\x32\x30\x38\x22\x2c\x0a\x22\x61\x78\
\x20\x63\x20\x23\x36\x33\x35\x61\x31\x30\x22\x2c\x0a\x22\x2e\x55\
\x20\x63\x20\x23\x36\x33\x35\x61\x35\x32\x22\x2c\x0a\x22\x2e\x72\
\x20\x63\x20\x23\x36\x33\x35\x61\x35\x61\x22\x2c\x0a\x22\x61\x5a\
\x20\x63\x20\x23\x36\x33\x36\x33\x32\x31\x22\x2c\x0a\x22\x23\x23\
\x20\x63\x20\x23\x36\x33\x36\x33\x35\x61\x22\x2c\x0a\x22\x2e\x41\
\x20\x63\x20\x23\x36\x33\x36\x33\x36\x33\x22\x2c\x0a\x22\x23\x68\
\x20\x63\x20\x23\x36\x33\x36\x62\x36\x62\x22\x2c\x0a\x22\x61\x4c\
\x20\x63\x20\x23\x36\x33\x37\x33\x32\x39\x22\x2c\x0a\x22\x61\x66\
\x20\x63\x20\x23\x36\x62\x35\x61\x30\x30\x22\x2c\x0a\x22\x2e\x36\
\x20\x63\x20\x23\x36\x62\x36\x33\x35\x61\x22\x2c\x0a\x22\x23\x6f\
\x20\x63\x20\x23\x36\x62\x36\x33\x36\x33\x22\x2c\x0a\x22\x2e\x45\
\x20\x63\x20\x23\x36\x62\x36\x62\x36\x33\x22\x2c\x0a\x22\x61\x34\
\x20\x63\x20\x23\x36\x62\x37\x33\x32\x31\x22\x2c\x0a\x22\x61\x53\
\x20\x63\x20\x23\x36\x62\x37\x33\x32\x39\x22\x2c\x0a\x22\x61\x52\
\x20\x63\x20\x23\x36\x62\x37\x33\x33\x31\x22\x2c\x0a\x22\x61\x58\
\x20\x63\x20\x23\x37\x33\x36\x33\x30\x30\x22\x2c\x0a\x22\x61\x6c\
\x20\x63\x20\x23\x37\x33\x36\x33\x30\x38\x22\x2c\x0a\x22\x23\x52\
\x20\x63\x20\x23\x37\x33\x36\x62\x31\x30\x22\x2c\x0a\x22\x2e\x54\
\x20\x63\x20\x23\x37\x33\x36\x62\x36\x33\x22\x2c\x0a\x22\x61\x35\
\x20\x63\x20\x23\x37\x33\x37\x33\x32\x39\x22\x2c\x0a\x22\x2e\x69\
\x20\x63\x20\x23\x37\x33\x37\x33\x36\x62\x22\x2c\x0a\x22\x2e\x4b\
\x20\x63\x20\x23\x37\x33\x37\x33\x37\x33\x22\x2c\x0a\x22\x61\x37\
\x20\x63\x20\x23\x37\x33\x37\x62\x32\x39\x22\x2c\x0a\x22\x23\x67\
\x20\x63\x20\x23\x37\x33\x37\x62\x37\x33\x22\x2c\x0a\x22\x61\x39\
\x20\x63\x20\x23\x37\x62\x37\x33\x31\x38\x22\x2c\x0a\x22\x23\x41\
\x20\x63\x20\x23\x37\x62\x37\x33\x37\x33\x22\x2c\x0a\x22\x61\x38\
\x20\x63\x20\x23\x37\x62\x37\x62\x32\x31\x22\x2c\x0a\x22\x61\x56\
\x20\x63\x20\x23\x37\x62\x37\x62\x32\x39\x22\x2c\x0a\x22\x61\x51\
\x20\x63\x20\x23\x37\x62\x37\x62\x35\x61\x22\x2c\x0a\x22\x2e\x4a\
\x20\x63\x20\x23\x37\x62\x37\x62\x37\x33\x22\x2c\x0a\x22\x2e\x31\
\x20\x63\x20\x23\x37\x62\x37\x62\x37\x62\x22\x2c\x0a\x22\x62\x23\
\x20\x63\x20\x23\x37\x62\x38\x34\x33\x31\x22\x2c\x0a\x22\x61\x33\
\x20\x63\x20\x23\x37\x62\x38\x34\x34\x61\x22\x2c\x0a\x22\x2e\x38\
\x20\x63\x20\x23\x37\x62\x38\x34\x37\x62\x22\x2c\x0a\x22\x61\x79\
\x20\x63\x20\x23\x38\x34\x37\x33\x30\x38\x22\x2c\x0a\x22\x23\x35\
\x20\x63\x20\x23\x38\x34\x37\x33\x31\x30\x22\x2c\x0a\x22\x61\x54\
\x20\x63\x20\x23\x38\x34\x37\x62\x32\x31\x22\x2c\x0a\x22\x62\x2e\
\x20\x63\x20\x23\x38\x34\x37\x62\x32\x39\x22\x2c\x0a\x22\x2e\x53\
\x20\x63\x20\x23\x38\x34\x37\x62\x37\x33\x22\x2c\x0a\x22\x2e\x64\
\x20\x63\x20\x23\x38\x34\x37\x62\x37\x62\x22\x2c\x0a\x22\x61\x57\
\x20\x63\x20\x23\x38\x34\x38\x34\x32\x31\x22\x2c\x0a\x22\x61\x31\
\x20\x63\x20\x23\x38\x34\x38\x34\x32\x39\x22\x2c\x0a\x22\x61\x30\
\x20\x63\x20\x23\x38\x34\x38\x34\x33\x31\x22\x2c\x0a\x22\x62\x71\
\x20\x63\x20\x23\x38\x34\x38\x34\x34\x61\x22\x2c\x0a\x22\x2e\x48\
\x20\x63\x20\x23\x38\x34\x38\x34\x38\x34\x22\x2c\x0a\x22\x61\x65\
\x20\x63\x20\x23\x38\x63\x37\x62\x30\x38\x22\x2c\x0a\x22\x61\x6b\
\x20\x63\x20\x23\x38\x63\x37\x62\x31\x30\x22\x2c\x0a\x22\x23\x6a\
\x20\x63\x20\x23\x38\x63\x38\x34\x38\x34\x22\x2c\x0a\x22\x62\x61\
\x20\x63\x20\x23\x38\x63\x38\x63\x36\x33\x22\x2c\x0a\x22\x61\x32\
\x20\x63\x20\x23\x38\x63\x38\x63\x37\x62\x22\x2c\x0a\x22\x2e\x78\
\x20\x63\x20\x23\x38\x63\x38\x63\x38\x34\x22\x2c\x0a\x22\x2e\x32\
\x20\x63\x20\x23\x38\x63\x39\x34\x38\x63\x22\x2c\x0a\x22\x2e\x39\
\x20\x63\x20\x23\x38\x63\x61\x64\x61\x35\x22\x2c\x0a\x22\x61\x43\
\x20\x63\x20\x23\x39\x34\x37\x62\x30\x38\x22\x2c\x0a\x22\x2e\x59\
\x20\x63\x20\x23\x39\x34\x37\x62\x37\x33\x22\x2c\x0a\x22\x61\x4b\
\x20\x63\x20\x23\x39\x34\x38\x63\x31\x30\x22\x2c\x0a\x22\x23\x51\
\x20\x63\x20\x23\x39\x34\x38\x63\x31\x38\x22\x2c\x0a\x22\x61\x36\
\x20\x63\x20\x23\x39\x34\x38\x63\x32\x39\x22\x2c\x0a\x22\x23\x6d\
\x20\x63\x20\x23\x39\x34\x38\x63\x38\x34\x22\x2c\x0a\x22\x62\x70\
\x20\x63\x20\x23\x39\x34\x39\x34\x34\x32\x22\x2c\x0a\x22\x61\x48\
\x20\x63\x20\x23\x39\x34\x39\x34\x38\x34\x22\x2c\x0a\x22\x2e\x44\
\x20\x63\x20\x23\x39\x34\x39\x34\x38\x63\x22\x2c\x0a\x22\x2e\x6e\
\x20\x63\x20\x23\x39\x34\x39\x34\x39\x34\x22\x2c\x0a\x22\x62\x6e\
\x20\x63\x20\x23\x39\x34\x39\x63\x34\x61\x22\x2c\x0a\x22\x62\x6c\
\x20\x63\x20\x23\x39\x34\x39\x63\x35\x61\x22\x2c\x0a\x22\x62\x6a\
\x20\x63\x20\x23\x39\x34\x39\x63\x36\x33\x22\x2c\x0a\x22\x2e\x75\
\x20\x63\x20\x23\x39\x34\x39\x63\x39\x34\x22\x2c\x0a\x22\x2e\x76\
\x20\x63\x20\x23\x39\x34\x61\x35\x39\x63\x22\x2c\x0a\x22\x61\x49\
\x20\x63\x20\x23\x39\x63\x38\x63\x31\x30\x22\x2c\x0a\x22\x23\x34\
\x20\x63\x20\x23\x39\x63\x38\x63\x31\x38\x22\x2c\x0a\x22\x23\x4f\
\x20\x63\x20\x23\x39\x63\x38\x63\x32\x39\x22\x2c\x0a\x22\x61\x4d\
\x20\x63\x20\x23\x39\x63\x39\x34\x31\x38\x22\x2c\x0a\x22\x23\x72\
\x20\x63\x20\x23\x39\x63\x39\x34\x38\x63\x22\x2c\x0a\x22\x62\x6f\
\x20\x63\x20\x23\x39\x63\x39\x63\x34\x61\x22\x2c\x0a\x22\x62\x6d\
\x20\x63\x20\x23\x39\x63\x39\x63\x35\x32\x22\x2c\x0a\x22\x62\x6b\
\x20\x63\x20\x23\x39\x63\x39\x63\x35\x61\x22\x2c\x0a\x22\x62\x68\
\x20\x63\x20\x23\x39\x63\x39\x63\x36\x62\x22\x2c\x0a\x22\x2e\x6b\
\x20\x63\x20\x23\x39\x63\x39\x63\x39\x34\x22\x2c\x0a\x22\x2e\x61\
\x20\x63\x20\x23\x39\x63\x39\x63\x39\x63\x22\x2c\x0a\x22\x62\x69\
\x20\x63\x20\x23\x39\x63\x61\x35\x36\x62\x22\x2c\x0a\x22\x62\x66\
\x20\x63\x20\x23\x39\x63\x61\x35\x37\x33\x22\x2c\x0a\x22\x2e\x68\
\x20\x63\x20\x23\x39\x63\x61\x35\x39\x63\x22\x2c\x0a\x22\x23\x66\
\x20\x63\x20\x23\x39\x63\x61\x35\x61\x35\x22\x2c\x0a\x22\x2e\x42\
\x20\x63\x20\x23\x39\x63\x62\x64\x62\x35\x22\x2c\x0a\x22\x23\x50\
\x20\x63\x20\x23\x61\x35\x39\x34\x30\x30\x22\x2c\x0a\x22\x61\x42\
\x20\x63\x20\x23\x61\x35\x39\x34\x31\x38\x22\x2c\x0a\x22\x23\x6b\
\x20\x63\x20\x23\x61\x35\x39\x34\x38\x63\x22\x2c\x0a\x22\x61\x72\
\x20\x63\x20\x23\x61\x35\x39\x63\x32\x39\x22\x2c\x0a\x22\x2e\x4e\
\x20\x63\x20\x23\x61\x35\x39\x63\x38\x63\x22\x2c\x0a\x22\x2e\x50\
\x20\x63\x20\x23\x61\x35\x39\x63\x39\x34\x22\x2c\x0a\x22\x2e\x57\
\x20\x63\x20\x23\x61\x35\x39\x63\x39\x63\x22\x2c\x0a\x22\x62\x67\
\x20\x63\x20\x23\x61\x35\x61\x35\x37\x33\x22\x2c\x0a\x22\x62\x64\
\x20\x63\x20\x23\x61\x35\x61\x35\x38\x34\x22\x2c\x0a\x22\x2e\x71\
\x20\x63\x20\x23\x61\x35\x61\x35\x39\x63\x22\x2c\x0a\x22\x2e\x63\
\x20\x63\x20\x23\x61\x35\x61\x35\x61\x35\x22\x2c\x0a\x22\x62\x65\
\x20\x63\x20\x23\x61\x35\x61\x64\x37\x62\x22\x2c\x0a\x22\x2e\x6f\
\x20\x63\x20\x23\x61\x35\x61\x64\x61\x35\x22\x2c\x0a\x22\x2e\x43\
\x20\x63\x20\x23\x61\x35\x61\x64\x61\x64\x22\x2c\x0a\x22\x2e\x49\
\x20\x63\x20\x23\x61\x35\x62\x35\x61\x64\x22\x2c\x0a\x22\x23\x64\
\x20\x63\x20\x23\x61\x35\x62\x64\x62\x35\x22\x2c\x0a\x22\x2e\x77\
\x20\x63\x20\x23\x61\x35\x63\x36\x62\x64\x22\x2c\x0a\x22\x61\x64\
\x20\x63\x20\x23\x61\x64\x39\x63\x31\x30\x22\x2c\x0a\x22\x61\x6a\
\x20\x63\x20\x23\x61\x64\x39\x63\x31\x38\x22\x2c\x0a\x22\x23\x77\
\x20\x63\x20\x23\x61\x64\x39\x63\x39\x34\x22\x2c\x0a\x22\x2e\x66\
\x20\x63\x20\x23\x61\x64\x61\x35\x39\x63\x22\x2c\x0a\x22\x62\x63\
\x20\x63\x20\x23\x61\x64\x61\x64\x37\x62\x22\x2c\x0a\x22\x62\x62\
\x20\x63\x20\x23\x61\x64\x61\x64\x38\x34\x22\x2c\x0a\x22\x2e\x23\
\x20\x63\x20\x23\x61\x64\x61\x64\x61\x35\x22\x2c\x0a\x22\x2e\x74\
\x20\x63\x20\x23\x61\x64\x61\x64\x61\x64\x22\x2c\x0a\x22\x2e\x34\
\x20\x63\x20\x23\x61\x64\x62\x35\x61\x64\x22\x2c\x0a\x22\x61\x69\
\x20\x63\x20\x23\x62\x35\x61\x35\x31\x38\x22\x2c\x0a\x22\x61\x71\
\x20\x63\x20\x23\x62\x35\x61\x35\x32\x39\x22\x2c\x0a\x22\x61\x44\
\x20\x63\x20\x23\x62\x35\x61\x35\x34\x32\x22\x2c\x0a\x22\x61\x6f\
\x20\x63\x20\x23\x62\x35\x61\x35\x34\x61\x22\x2c\x0a\x22\x2e\x4f\
\x20\x63\x20\x23\x62\x35\x61\x35\x39\x34\x22\x2c\x0a\x22\x23\x76\
\x20\x63\x20\x23\x62\x35\x61\x35\x39\x63\x22\x2c\x0a\x22\x61\x74\
\x20\x63\x20\x23\x62\x35\x61\x64\x35\x32\x22\x2c\x0a\x22\x23\x7a\
\x20\x63\x20\x23\x62\x35\x61\x64\x39\x63\x22\x2c\x0a\x22\x2e\x35\
\x20\x63\x20\x23\x62\x35\x61\x64\x61\x35\x22\x2c\x0a\x22\x2e\x6a\
\x20\x63\x20\x23\x62\x35\x62\x35\x61\x64\x22\x2c\x0a\x22\x2e\x65\
\x20\x63\x20\x23\x62\x35\x62\x35\x62\x35\x22\x2c\x0a\x22\x2e\x33\
\x20\x63\x20\x23\x62\x35\x62\x64\x62\x35\x22\x2c\x0a\x22\x2e\x51\
\x20\x63\x20\x23\x62\x35\x62\x64\x62\x64\x22\x2c\x0a\x22\x23\x65\
\x20\x63\x20\x23\x62\x35\x63\x65\x63\x36\x22\x2c\x0a\x22\x23\x38\
\x20\x63\x20\x23\x62\x64\x61\x35\x33\x39\x22\x2c\x0a\x22\x23\x78\
\x20\x63\x20\x23\x62\x64\x61\x35\x39\x63\x22\x2c\x0a\x22\x23\x33\
\x20\x63\x20\x23\x62\x64\x61\x64\x32\x39\x22\x2c\x0a\x22\x23\x58\
\x20\x63\x20\x23\x62\x64\x61\x64\x33\x31\x22\x2c\x0a\x22\x61\x67\
\x20\x63\x20\x23\x62\x64\x61\x64\x34\x32\x22\x2c\x0a\x22\x23\x6e\
\x20\x63\x20\x23\x62\x64\x62\x35\x61\x64\x22\x2c\x0a\x22\x2e\x62\
\x20\x63\x20\x23\x62\x64\x62\x64\x62\x64\x22\x2c\x0a\x22\x2e\x58\
\x20\x63\x20\x23\x62\x64\x63\x65\x63\x36\x22\x2c\x0a\x22\x61\x55\
\x20\x63\x20\x23\x63\x36\x62\x35\x31\x30\x22\x2c\x0a\x22\x23\x2e\
\x20\x63\x20\x23\x63\x36\x63\x36\x62\x64\x22\x2c\x0a\x22\x2e\x70\
\x20\x63\x20\x23\x63\x36\x63\x65\x63\x65\x22\x2c\x0a\x22\x2e\x67\
\x20\x63\x20\x23\x63\x36\x64\x65\x64\x36\x22\x2c\x0a\x22\x61\x63\
\x20\x63\x20\x23\x63\x65\x62\x64\x33\x31\x22\x2c\x0a\x22\x23\x6c\
\x20\x63\x20\x23\x63\x65\x64\x36\x63\x65\x22\x2c\x0a\x22\x23\x73\
\x20\x63\x20\x23\x63\x65\x64\x36\x64\x36\x22\x2c\x0a\x22\x23\x74\
\x20\x63\x20\x23\x63\x65\x64\x65\x64\x65\x22\x2c\x0a\x22\x23\x39\
\x20\x63\x20\x23\x64\x36\x63\x36\x31\x30\x22\x2c\x0a\x22\x23\x32\
\x20\x63\x20\x23\x64\x36\x63\x36\x33\x31\x22\x2c\x0a\x22\x61\x70\
\x20\x63\x20\x23\x64\x65\x63\x36\x30\x38\x22\x2c\x0a\x22\x61\x68\
\x20\x63\x20\x23\x64\x65\x63\x65\x31\x30\x22\x2c\x0a\x22\x61\x62\
\x20\x63\x20\x23\x64\x65\x63\x65\x33\x31\x22\x2c\x0a\x22\x2e\x6c\
\x20\x63\x20\x23\x64\x65\x65\x66\x65\x37\x22\x2c\x0a\x22\x2e\x52\
\x20\x63\x20\x23\x64\x65\x65\x66\x65\x66\x22\x2c\x0a\x22\x61\x75\
\x20\x63\x20\x23\x65\x37\x63\x65\x30\x38\x22\x2c\x0a\x22\x61\x2e\
\x20\x63\x20\x23\x65\x37\x64\x36\x32\x31\x22\x2c\x0a\x22\x61\x23\
\x20\x63\x20\x23\x65\x37\x64\x36\x33\x31\x22\x2c\x0a\x22\x61\x61\
\x20\x63\x20\x23\x65\x37\x64\x36\x33\x39\x22\x2c\x0a\x22\x23\x31\
\x20\x63\x20\x23\x65\x37\x64\x65\x33\x39\x22\x2c\x0a\x22\x23\x59\
\x20\x63\x20\x23\x65\x66\x64\x65\x31\x30\x22\x2c\x0a\x22\x61\x76\
\x20\x63\x20\x23\x65\x66\x64\x65\x32\x31\x22\x2c\x0a\x22\x61\x41\
\x20\x63\x20\x23\x65\x66\x64\x65\x32\x39\x22\x2c\x0a\x22\x23\x5a\
\x20\x63\x20\x23\x66\x37\x65\x37\x32\x39\x22\x2c\x0a\x22\x23\x30\
\x20\x63\x20\x23\x66\x37\x65\x37\x33\x39\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x23\x2e\x61\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\
\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x62\
\x2e\x63\x2e\x64\x2e\x65\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x2e\x66\x2e\x67\x2e\x68\x2e\x69\x2e\x62\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x2e\x6a\x2e\x6b\x2e\x6c\x2e\x65\x2e\x6d\x2e\x6e\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x2e\x62\x2e\x61\x2e\x6f\x2e\x70\x2e\x71\
\x2e\x72\x2e\x73\x2e\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\
\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x75\x2e\x76\x2e\x77\
\x2e\x6b\x2e\x78\x2e\x79\x2e\x7a\x2e\x41\x2e\x62\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x74\x2e\x6b\
\x2e\x42\x2e\x43\x2e\x6b\x2e\x44\x2e\x45\x2e\x46\x2e\x47\x2e\x48\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x62\
\x2e\x23\x2e\x23\x2e\x6f\x2e\x49\x2e\x62\x2e\x63\x2e\x4a\x2e\x4b\
\x2e\x4c\x2e\x4d\x2e\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x2e\x61\x2e\x4e\x2e\x4f\x2e\x50\x2e\x51\x2e\x52\x2e\x6f\
\x2e\x53\x2e\x54\x2e\x55\x2e\x56\x2e\x73\x2e\x62\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\
\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x2e\x74\x2e\x4e\x2e\x50\x2e\x57\x2e\x6b\x2e\x58\
\x2e\x52\x2e\x50\x2e\x59\x2e\x69\x2e\x41\x2e\x5a\x2e\x30\x2e\x31\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x2e\x62\x2e\x78\x2e\x32\x2e\x77\x2e\x33\
\x2e\x34\x2e\x49\x2e\x6a\x2e\x23\x2e\x35\x2e\x36\x2e\x4c\x2e\x46\
\x2e\x37\x2e\x30\x2e\x63\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x6e\x2e\x38\x2e\x39\
\x2e\x70\x23\x2e\x2e\x6f\x2e\x34\x2e\x78\x2e\x78\x2e\x78\x23\x23\
\x2e\x73\x23\x61\x23\x62\x2e\x73\x23\x63\x2e\x62\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x74\x2e\x44\
\x2e\x23\x23\x64\x23\x65\x2e\x68\x23\x66\x2e\x6f\x2e\x50\x2e\x32\
\x2e\x32\x23\x67\x23\x23\x23\x68\x2e\x41\x2e\x7a\x23\x69\x2e\x4b\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\
\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x62\
\x23\x6a\x2e\x50\x2e\x66\x2e\x50\x23\x6b\x2e\x71\x2e\x34\x2e\x58\
\x23\x6c\x23\x6d\x23\x6e\x2e\x6e\x23\x6f\x2e\x4a\x2e\x36\x23\x70\
\x23\x69\x23\x71\x2e\x63\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x2e\x57\x23\x6d\x23\x6b\x2e\x4f\x23\x6d\x23\x72\x2e\x35\
\x2e\x6b\x23\x73\x23\x74\x23\x6d\x2e\x71\x23\x72\x2e\x55\x2e\x45\
\x2e\x54\x23\x70\x23\x75\x23\x69\x2e\x4d\x2e\x65\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x2e\x62\x2e\x78\x23\x72\x2e\x6f\x2e\x74\x23\x76\
\x2e\x66\x2e\x6f\x2e\x34\x2e\x6c\x23\x6c\x23\x77\x23\x78\x2e\x66\
\x2e\x69\x23\x6f\x2e\x45\x23\x23\x23\x61\x2e\x6d\x23\x79\x2e\x6e\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x62\x2e\x65\x2e\x63\x23\x64\
\x2e\x6f\x23\x7a\x2e\x75\x2e\x71\x23\x66\x2e\x49\x2e\x71\x2e\x23\
\x2e\x23\x2e\x32\x23\x41\x2e\x55\x2e\x6d\x23\x42\x23\x68\x2e\x68\
\x2e\x6a\x2e\x62\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\
\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x2e\x62\x23\x43\x23\x44\x23\x45\x23\x46\x23\x47\x23\x47\
\x23\x47\x23\x48\x23\x49\x23\x4a\x23\x4b\x23\x4c\x23\x4d\x23\x4e\
\x2e\x69\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x2e\x62\x23\x4f\x23\x50\x23\x51\x23\x52\
\x23\x53\x23\x54\x23\x55\x23\x4c\x23\x4d\x23\x56\x23\x57\x23\x4e\
\x23\x56\x23\x56\x2e\x69\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x62\x23\x58\x23\x59\
\x23\x5a\x23\x30\x23\x30\x23\x31\x23\x32\x23\x33\x23\x34\x23\x35\
\x23\x36\x23\x37\x23\x4d\x23\x56\x23\x41\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x62\
\x23\x38\x23\x39\x61\x2e\x61\x23\x61\x61\x61\x61\x61\x62\x61\x63\
\x23\x33\x61\x64\x61\x65\x61\x66\x23\x37\x23\x4d\x2e\x4a\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\
\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x2e\x62\x61\x67\x61\x68\x61\x2e\x61\x23\x23\x31\x61\x61\
\x61\x61\x23\x32\x61\x69\x61\x6a\x61\x6b\x61\x6c\x61\x6d\x61\x6e\
\x23\x41\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x61\x6f\x61\x70\x61\x2e\x61\x23\
\x61\x61\x61\x71\x61\x72\x61\x71\x23\x33\x61\x6a\x23\x35\x61\x66\
\x61\x6d\x61\x73\x2e\x4a\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x61\x74\x61\x75\
\x61\x76\x61\x23\x61\x77\x23\x56\x23\x57\x23\x4d\x61\x78\x23\x34\
\x61\x79\x61\x66\x61\x7a\x61\x6e\x2e\x4a\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x61\x74\x61\x68\x61\x41\x61\x42\x23\x57\x23\x4e\x23\x4d\x23\x56\
\x23\x56\x23\x52\x61\x43\x61\x6c\x61\x7a\x61\x73\x2e\x4a\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\
\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x2e\x62\x61\x44\x61\x70\x23\x5a\x23\x51\x23\x4e\x23\x4d\
\x23\x56\x23\x4d\x23\x4e\x23\x36\x61\x6b\x61\x66\x61\x45\x61\x46\
\x61\x47\x2e\x45\x23\x68\x2e\x4a\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x61\x48\x61\x49\x61\x68\x61\x41\x61\x42\
\x23\x57\x23\x57\x23\x4e\x23\x57\x61\x4a\x23\x36\x61\x4b\x61\x6c\
\x61\x6d\x61\x46\x23\x57\x61\x4a\x61\x4a\x23\x79\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x71\x61\x4c\x61\x49\x61\x68\
\x61\x76\x61\x4d\x23\x57\x61\x4a\x23\x57\x23\x44\x61\x4e\x23\x52\
\x61\x65\x61\x6c\x61\x4f\x61\x6e\x23\x4e\x61\x4e\x61\x50\x61\x51\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x6a\x61\x52\x61\x53\
\x61\x54\x61\x55\x61\x76\x61\x42\x23\x57\x61\x4e\x61\x50\x61\x4c\
\x61\x56\x61\x57\x61\x65\x61\x58\x23\x36\x61\x59\x61\x5a\x61\x30\
\x61\x31\x61\x32\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x2c\
\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x2e\x62\x61\x33\
\x61\x34\x61\x35\x61\x35\x61\x56\x61\x36\x61\x31\x61\x5a\x61\x37\
\x61\x53\x61\x53\x61\x35\x61\x38\x61\x39\x61\x34\x61\x35\x62\x2e\
\x62\x23\x61\x35\x61\x35\x2e\x6b\x51\x74\x51\x74\x51\x74\x51\x74\
\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\
\x62\x61\x61\x37\x61\x37\x61\x56\x61\x30\x62\x2e\x62\x23\x61\x37\
\x62\x23\x61\x30\x61\x37\x61\x37\x61\x37\x61\x53\x61\x53\x61\x37\
\x62\x2e\x61\x56\x61\x30\x61\x56\x61\x52\x2e\x23\x51\x74\x51\x74\
\x51\x74\x51\x74\x51\x74\x22\x2c\x0a\x22\x51\x74\x51\x74\x51\x74\
\x51\x74\x51\x74\x62\x62\x62\x63\x62\x64\x62\x65\x62\x65\x62\x66\
\x62\x67\x62\x68\x62\x68\x62\x69\x62\x6a\x62\x6a\x62\x6b\x62\x6b\
\x62\x6c\x62\x6d\x62\x6d\x62\x6e\x62\x6f\x62\x70\x62\x71\x2e\x62\
\x51\x74\x51\x74\x51\x74\x51\x74\x51\x74\x22\x7d\x3b\x0a\
\x00\x00\x00\xad\
\x00\
\x00\x04\xda\x78\x9c\xd3\xd7\x52\x88\x08\xf0\x55\xd0\xd2\xe7\x2a\
\x2e\x49\x2c\xc9\x4c\x56\x48\xce\x48\x2c\x52\xd0\xca\xcc\x4d\x4c\
\x4f\x35\x88\x8e\xb5\xad\xe6\x52\x32\x36\x52\x00\x21\x05\x43\x25\
\x1d\x2e\x25\x3d\x85\x64\x05\xbf\xfc\xbc\x54\x10\x3b\x11\xc8\x56\
\x36\x00\x02\x0b\x03\x10\x57\x19\xc4\xb5\x30\xb0\x80\x72\xf5\x08\
\x80\x51\x35\x60\xa0\x9c\x08\x03\x38\xd5\x20\x94\x20\x29\x4a\x44\
\x51\xa3\x8c\x90\x42\x66\x21\xab\x51\x46\xd1\x0d\xe5\x24\xa2\xaa\
\x41\x75\x05\x44\x51\x22\x86\x1a\x54\x77\x22\xbb\x0c\x97\x1a\x3d\
\x2a\xa9\x21\xc2\xae\x44\x6c\x6a\x94\x31\xfc\x85\xa9\x06\x45\x51\
\x22\x0e\x35\x40\x09\x65\x3d\xec\x00\x29\x4e\x71\x2a\x1a\xc4\xe9\
\x70\x78\xa9\xa9\xb5\xe6\x02\x00\x3d\x48\xf5\x6a\
\x00\x00\x00\xad\
\x00\
\x00\x04\xda\x78\x9c\xd3\xd7\x52\x88\x08\xf0\x55\xd0\xd2\xe7\x2a\
\x2e\x49\x2c\xc9\x4c\x56\x48\xce\x48\x2c\x52\xd0\xca\xcc\x4d\x4c\
\x4f\x35\x89\x8e\xb5\xad\xe6\x52\x32\x36\x52\x00\x21\x05\x43\x25\
\x1d\x2e\x25\x3d\x85\x64\x05\xbf\xfc\xbc\x54\x10\x5b\x19\xc8\x56\
\x36\x00\x02\x0b\x03\x10\x37\x11\xc4\xb5\x30\xb0\x80\x72\xf5\x08\
\x80\x51\x35\x24\xab\x51\x86\x81\x44\x34\x35\xca\x98\x4a\xe0\x8a\
\xe0\x6a\x94\x11\x4a\x10\xac\x44\x34\x35\xca\x30\x43\x90\x4d\x4c\
\x44\x53\xa3\x8c\xa6\x04\xae\x11\x59\x0d\x9a\x0a\xb8\x0b\xd0\xd4\
\x60\x78\x91\x4c\x35\xc4\xd8\x85\xa6\x08\x87\x1a\x54\x7f\x61\xf8\
\x1d\x5d\x11\x7a\x18\x62\x01\x89\x30\xe5\xb8\xd5\xc0\x95\x0c\x74\
\x1a\x1b\x1e\x6a\x6a\xad\xb9\x00\xc3\x36\xd8\x5e\
"
qt_resource_name = b"\
\x00\x05\
\x00\x6f\xa6\x53\
\x00\x69\
\x00\x63\x00\x6f\x00\x6e\x00\x73\
\x00\x0a\
\x0d\x8c\x59\x8d\
\x00\x69\
\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x33\x00\x2e\x00\x78\x00\x70\x00\x6d\
\x00\x0a\
\x0d\x8b\x59\x8d\
\x00\x69\
\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x32\x00\x2e\x00\x78\x00\x70\x00\x6d\
\x00\x0a\
\x0d\x87\x59\x8d\
\x00\x69\
\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x36\x00\x2e\x00\x78\x00\x70\x00\x6d\
\x00\x0a\
\x0d\x8e\x59\x8d\
\x00\x69\
\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x31\x00\x2e\x00\x78\x00\x70\x00\x6d\
\x00\x0a\
\x0d\x8a\x59\x8d\
\x00\x69\
\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x35\x00\x2e\x00\x78\x00\x70\x00\x6d\
\x00\x0a\
\x0d\x8d\x59\x8d\
\x00\x69\
\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x30\x00\x2e\x00\x78\x00\x70\x00\x6d\
\x00\x0a\
\x0d\x89\x59\x8d\
\x00\x69\
\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x34\x00\x2e\x00\x78\x00\x70\x00\x6d\
"
qt_resource_struct = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x07\x00\x00\x00\x02\
\x00\x00\x00\x44\x00\x00\x00\x00\x00\x01\x00\x00\x05\xc8\
\x00\x00\x00\xac\x00\x01\x00\x00\x00\x01\x00\x00\x30\x1d\
\x00\x00\x00\x78\x00\x00\x00\x00\x00\x01\x00\x00\x19\x89\
\x00\x00\x00\x2a\x00\x01\x00\x00\x00\x01\x00\x00\x00\xab\
\x00\x00\x00\x10\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x00\x92\x00\x01\x00\x00\x00\x01\x00\x00\x2f\x6c\
\x00\x00\x00\x5e\x00\x01\x00\x00\x00\x01\x00\x00\x14\x6b\
"
def qInitResources():
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources()

View File

@@ -0,0 +1,143 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created: Fri Jul 26 06:46:58 2013
# by: PyQt5 UI code generator 5.0.1-snapshot-2a99e59669ee
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(812, 605)
self.centralWidget = QtWidgets.QWidget(MainWindow)
self.centralWidget.setObjectName("centralWidget")
self.hboxlayout = QtWidgets.QHBoxLayout(self.centralWidget)
self.hboxlayout.setContentsMargins(0, 0, 0, 0)
self.hboxlayout.setSpacing(6)
self.hboxlayout.setObjectName("hboxlayout")
self.Frame3 = QtWidgets.QFrame(self.centralWidget)
self.Frame3.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.Frame3.setFrameShadow(QtWidgets.QFrame.Sunken)
self.Frame3.setObjectName("Frame3")
self.vboxlayout = QtWidgets.QVBoxLayout(self.Frame3)
self.vboxlayout.setContentsMargins(1, 1, 1, 1)
self.vboxlayout.setSpacing(0)
self.vboxlayout.setObjectName("vboxlayout")
self.WebBrowser = QAxContainer.QAxWidget(self.Frame3)
self.WebBrowser.setFocusPolicy(QtCore.Qt.StrongFocus)
self.WebBrowser.setControl("{8856F961-340A-11D0-A96B-00C04FD705A2}")
self.WebBrowser.setObjectName("WebBrowser")
self.vboxlayout.addWidget(self.WebBrowser)
self.hboxlayout.addWidget(self.Frame3)
MainWindow.setCentralWidget(self.centralWidget)
self.tbNavigate = QtWidgets.QToolBar(MainWindow)
self.tbNavigate.setOrientation(QtCore.Qt.Horizontal)
self.tbNavigate.setObjectName("tbNavigate")
MainWindow.addToolBar(4, self.tbNavigate)
self.tbAddress = QtWidgets.QToolBar(MainWindow)
self.tbAddress.setOrientation(QtCore.Qt.Horizontal)
self.tbAddress.setObjectName("tbAddress")
MainWindow.addToolBar(4, self.tbAddress)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 812, 26))
self.menubar.setObjectName("menubar")
self.PopupMenu = QtWidgets.QMenu(self.menubar)
self.PopupMenu.setObjectName("PopupMenu")
self.FileNewGroup_2 = QtWidgets.QMenu(self.PopupMenu)
self.FileNewGroup_2.setObjectName("FileNewGroup_2")
self.unnamed = QtWidgets.QMenu(self.menubar)
self.unnamed.setObjectName("unnamed")
MainWindow.setMenuBar(self.menubar)
self.actionGo = QtWidgets.QAction(MainWindow)
icon = QtGui.QIcon()
icon.addFile(":/icons/image0.xpm")
self.actionGo.setIcon(icon)
self.actionGo.setObjectName("actionGo")
self.actionBack = QtWidgets.QAction(MainWindow)
icon1 = QtGui.QIcon()
icon1.addFile(":/icons/image1.xpm")
self.actionBack.setIcon(icon1)
self.actionBack.setObjectName("actionBack")
self.actionForward = QtWidgets.QAction(MainWindow)
icon2 = QtGui.QIcon()
icon2.addFile(":/icons/image2.xpm")
self.actionForward.setIcon(icon2)
self.actionForward.setObjectName("actionForward")
self.actionStop = QtWidgets.QAction(MainWindow)
icon3 = QtGui.QIcon()
icon3.addFile(":/icons/image3.xpm")
self.actionStop.setIcon(icon3)
self.actionStop.setObjectName("actionStop")
self.actionRefresh = QtWidgets.QAction(MainWindow)
icon4 = QtGui.QIcon()
icon4.addFile(":/icons/image4.xpm")
self.actionRefresh.setIcon(icon4)
self.actionRefresh.setObjectName("actionRefresh")
self.actionHome = QtWidgets.QAction(MainWindow)
icon5 = QtGui.QIcon()
icon5.addFile(":/icons/image5.xpm")
self.actionHome.setIcon(icon5)
self.actionHome.setObjectName("actionHome")
self.actionFileClose = QtWidgets.QAction(MainWindow)
self.actionFileClose.setObjectName("actionFileClose")
self.actionSearch = QtWidgets.QAction(MainWindow)
icon6 = QtGui.QIcon()
icon6.addFile(":/icons/image6.xpm")
self.actionSearch.setIcon(icon6)
self.actionSearch.setObjectName("actionSearch")
self.actionAbout = QtWidgets.QAction(MainWindow)
self.actionAbout.setObjectName("actionAbout")
self.actionAboutQt = QtWidgets.QAction(MainWindow)
self.actionAboutQt.setObjectName("actionAboutQt")
self.FileNewGroup = QtWidgets.QActionGroup(MainWindow)
self.FileNewGroup.setObjectName("FileNewGroup")
self.actionNewWindow = QtWidgets.QAction(self.FileNewGroup)
self.actionNewWindow.setObjectName("actionNewWindow")
self.tbNavigate.addAction(self.actionBack)
self.tbNavigate.addAction(self.actionForward)
self.tbNavigate.addAction(self.actionStop)
self.tbNavigate.addAction(self.actionRefresh)
self.tbNavigate.addAction(self.actionHome)
self.tbNavigate.addSeparator()
self.tbNavigate.addAction(self.actionSearch)
self.tbAddress.addAction(self.actionGo)
self.FileNewGroup_2.addAction(self.actionNewWindow)
self.PopupMenu.addAction(self.FileNewGroup_2.menuAction())
self.PopupMenu.addSeparator()
self.PopupMenu.addAction(self.actionFileClose)
self.unnamed.addAction(self.actionAbout)
self.unnamed.addAction(self.actionAboutQt)
self.menubar.addAction(self.PopupMenu.menuAction())
self.menubar.addAction(self.unnamed.menuAction())
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Qt WebBrowser"))
self.tbNavigate.setWindowTitle(_translate("MainWindow", "Navigation"))
self.tbAddress.setWindowTitle(_translate("MainWindow", "Address"))
self.PopupMenu.setTitle(_translate("MainWindow", "&File"))
self.FileNewGroup_2.setTitle(_translate("MainWindow", "New"))
self.unnamed.setTitle(_translate("MainWindow", "&Help"))
self.actionGo.setIconText(_translate("MainWindow", "Go"))
self.actionBack.setIconText(_translate("MainWindow", "Back"))
self.actionBack.setShortcut(_translate("MainWindow", "Backspace"))
self.actionForward.setIconText(_translate("MainWindow", "Forward"))
self.actionStop.setIconText(_translate("MainWindow", "Stop"))
self.actionRefresh.setIconText(_translate("MainWindow", "Refresh"))
self.actionHome.setIconText(_translate("MainWindow", "Home"))
self.actionFileClose.setText(_translate("MainWindow", "C&lose"))
self.actionFileClose.setIconText(_translate("MainWindow", "Close"))
self.actionSearch.setIconText(_translate("MainWindow", "Search"))
self.actionAbout.setIconText(_translate("MainWindow", "About"))
self.actionAboutQt.setIconText(_translate("MainWindow", "About Qt"))
self.actionNewWindow.setIconText(_translate("MainWindow", "Window"))
self.actionNewWindow.setShortcut(_translate("MainWindow", "Ctrl+N"))
from PyQt5 import QAxContainer

View File

@@ -0,0 +1,147 @@
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
import sys
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtWidgets import (QApplication, QLabel, QLineEdit, QMainWindow,
QMessageBox, QProgressBar)
import mainwindow_rc
from ui_mainwindow import Ui_MainWindow
class MainWindow(QMainWindow, Ui_MainWindow):
# Maintain the list of browser windows so that they do not get garbage
# collected.
_window_list = []
def __init__(self):
super(MainWindow, self).__init__()
MainWindow._window_list.append(self)
self.setupUi(self)
# Qt Designer (at least to v4.2.1) can't handle arbitrary widgets in a
# QToolBar - even though uic can, and they are in the original .ui
# file. Therefore we manually add the problematic widgets.
self.lblAddress = QLabel("Address", self.tbAddress)
self.tbAddress.insertWidget(self.actionGo, self.lblAddress)
self.addressEdit = QLineEdit(self.tbAddress)
self.tbAddress.insertWidget(self.actionGo, self.addressEdit)
self.addressEdit.returnPressed.connect(self.actionGo.trigger)
self.actionBack.triggered.connect(self.WebBrowser.GoBack)
self.actionForward.triggered.connect(self.WebBrowser.GoForward)
self.actionStop.triggered.connect(self.WebBrowser.Stop)
self.actionRefresh.triggered.connect(self.WebBrowser.Refresh)
self.actionHome.triggered.connect(self.WebBrowser.GoHome)
self.actionSearch.triggered.connect(self.WebBrowser.GoSearch)
self.pb = QProgressBar(self.statusBar())
self.pb.setTextVisible(False)
self.pb.hide()
self.statusBar().addPermanentWidget(self.pb)
self.WebBrowser.dynamicCall('GoHome()')
def closeEvent(self, e):
MainWindow._window_list.remove(self)
e.accept()
def on_WebBrowser_TitleChange(self, title):
self.setWindowTitle("Qt WebBrowser - " + title)
def on_WebBrowser_ProgressChange(self, a, b):
if a <= 0 or b <= 0:
self.pb.hide()
return
self.pb.show()
self.pb.setRange(0, b)
self.pb.setValue(a)
def on_WebBrowser_CommandStateChange(self, cmd, on):
if cmd == 1:
self.actionForward.setEnabled(on)
elif cmd == 2:
self.actionBack.setEnabled(on)
def on_WebBrowser_BeforeNavigate(self):
self.actionStop.setEnabled(True)
def on_WebBrowser_NavigateComplete(self, _):
self.actionStop.setEnabled(False)
@pyqtSlot()
def on_actionGo_triggered(self):
self.WebBrowser.dynamicCall('Navigate(const QString&)',
self.addressEdit.text())
@pyqtSlot()
def on_actionNewWindow_triggered(self):
window = MainWindow()
window.show()
if self.addressEdit.text().isEmpty():
return;
window.addressEdit.setText(self.addressEdit.text())
window.actionStop.setEnabled(True)
window.on_actionGo_triggered()
@pyqtSlot()
def on_actionAbout_triggered(self):
QMessageBox.about(self, "About WebBrowser",
"This Example has been created using the ActiveQt integration into Qt Designer.\n"
"It demonstrates the use of QAxWidget to embed the Internet Explorer ActiveX\n"
"control into a Qt application.")
@pyqtSlot()
def on_actionAboutQt_triggered(self):
QMessageBox.aboutQt(self, "About Qt")
if __name__ == "__main__":
a = QApplication(sys.argv)
w = MainWindow()
w.show()
sys.exit(a.exec_())

24
animation/README Normal file
View File

@@ -0,0 +1,24 @@
The animation framework aims to provide an easy way for creating animated and
smooth GUI's. By animating PyQt properties, the framework provides great
freedom for animating widgets and other QObjects. The framework can also be
used with the Graphics View framework.
The example launcher provided with PyQt can be used to explore each of the
examples in this directory.
Documentation for these examples can be found via the Tutorial and Examples
link in the main Qt documentation.
Finding the PyQt Examples and Demos launcher
============================================
On Windows:
The launcher can be accessed via the Windows Start menu. Select the menu
entry entitled "Examples and Demos" entry in the submenu containing PyQt5.
On all platforms:
The source code for the launcher can be found in the examples/demos/qtdemo
directory in the PyQt package.

View File

@@ -0,0 +1,263 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
from PyQt5.QtCore import (pyqtProperty, pyqtSignal, QEasingCurve, QObject,
QParallelAnimationGroup, QPointF, QPropertyAnimation, qrand, QRectF,
QState, QStateMachine, Qt, QTimer)
from PyQt5.QtGui import (QBrush, QLinearGradient, QPainter, QPainterPath,
QPixmap)
from PyQt5.QtWidgets import (QApplication, QGraphicsItem, QGraphicsPixmapItem,
QGraphicsRectItem, QGraphicsScene, QGraphicsView, QGraphicsWidget,
QStyle)
import animatedtiles_rc
# PyQt doesn't support deriving from more than one wrapped class so we use
# composition and delegate the property.
class Pixmap(QObject):
def __init__(self, pix):
super(Pixmap, self).__init__()
self.pixmap_item = QGraphicsPixmapItem(pix)
self.pixmap_item.setCacheMode(QGraphicsItem.DeviceCoordinateCache)
def _set_pos(self, pos):
self.pixmap_item.setPos(pos)
pos = pyqtProperty(QPointF, fset=_set_pos)
class Button(QGraphicsWidget):
pressed = pyqtSignal()
def __init__(self, pixmap, parent=None):
super(Button, self).__init__(parent)
self._pix = pixmap
self.setAcceptHoverEvents(True)
self.setCacheMode(QGraphicsItem.DeviceCoordinateCache)
def boundingRect(self):
return QRectF(-65, -65, 130, 130)
def shape(self):
path = QPainterPath()
path.addEllipse(self.boundingRect())
return path
def paint(self, painter, option, widget):
down = option.state & QStyle.State_Sunken
r = self.boundingRect()
grad = QLinearGradient(r.topLeft(), r.bottomRight())
if option.state & QStyle.State_MouseOver:
color_0 = Qt.white
else:
color_0 = Qt.lightGray
color_1 = Qt.darkGray
if down:
color_0, color_1 = color_1, color_0
grad.setColorAt(0, color_0)
grad.setColorAt(1, color_1)
painter.setPen(Qt.darkGray)
painter.setBrush(grad)
painter.drawEllipse(r)
color_0 = Qt.darkGray
color_1 = Qt.lightGray
if down:
color_0, color_1 = color_1, color_0
grad.setColorAt(0, color_0)
grad.setColorAt(1, color_1)
painter.setPen(Qt.NoPen)
painter.setBrush(grad)
if down:
painter.translate(2, 2)
painter.drawEllipse(r.adjusted(5, 5, -5, -5))
painter.drawPixmap(-self._pix.width() / 2, -self._pix.height() / 2,
self._pix)
def mousePressEvent(self, ev):
self.pressed.emit()
self.update()
def mouseReleaseEvent(self, ev):
self.update()
class View(QGraphicsView):
def resizeEvent(self, event):
super(View, self).resizeEvent(event)
self.fitInView(self.sceneRect(), Qt.KeepAspectRatio)
if __name__ == '__main__':
import sys
import math
app = QApplication(sys.argv)
kineticPix = QPixmap(':/images/kinetic.png')
bgPix = QPixmap(':/images/Time-For-Lunch-2.jpg')
scene = QGraphicsScene(-350, -350, 700, 700)
items = []
for i in range(64):
item = Pixmap(kineticPix)
item.pixmap_item.setOffset(-kineticPix.width() / 2,
-kineticPix.height() / 2)
item.pixmap_item.setZValue(i)
items.append(item)
scene.addItem(item.pixmap_item)
# Buttons.
buttonParent = QGraphicsRectItem()
ellipseButton = Button(QPixmap(':/images/ellipse.png'), buttonParent)
figure8Button = Button(QPixmap(':/images/figure8.png'), buttonParent)
randomButton = Button(QPixmap(':/images/random.png'), buttonParent)
tiledButton = Button(QPixmap(':/images/tile.png'), buttonParent)
centeredButton = Button(QPixmap(':/images/centered.png'), buttonParent)
ellipseButton.setPos(-100, -100)
figure8Button.setPos(100, -100)
randomButton.setPos(0, 0)
tiledButton.setPos(-100, 100)
centeredButton.setPos(100, 100)
scene.addItem(buttonParent)
buttonParent.setScale(0.75)
buttonParent.setPos(200, 200)
buttonParent.setZValue(65)
# States.
rootState = QState()
ellipseState = QState(rootState)
figure8State = QState(rootState)
randomState = QState(rootState)
tiledState = QState(rootState)
centeredState = QState(rootState)
# Values.
for i, item in enumerate(items):
# Ellipse.
ellipseState.assignProperty(item, 'pos',
QPointF(math.cos((i / 63.0) * 6.28) * 250,
math.sin((i / 63.0) * 6.28) * 250))
# Figure 8.
figure8State.assignProperty(item, 'pos',
QPointF(math.sin((i / 63.0) * 6.28) * 250,
math.sin(((i * 2)/63.0) * 6.28) * 250))
# Random.
randomState.assignProperty(item, 'pos',
QPointF(-250 + qrand() % 500, -250 + qrand() % 500))
# Tiled.
tiledState.assignProperty(item, 'pos',
QPointF(((i % 8) - 4) * kineticPix.width() + kineticPix.width() / 2,
((i // 8) - 4) * kineticPix.height() + kineticPix.height() / 2))
# Centered.
centeredState.assignProperty(item, 'pos', QPointF())
# Ui.
view = View(scene)
view.setWindowTitle("Animated Tiles")
view.setViewportUpdateMode(QGraphicsView.BoundingRectViewportUpdate)
view.setBackgroundBrush(QBrush(bgPix))
view.setCacheMode(QGraphicsView.CacheBackground)
view.setRenderHints(QPainter.Antialiasing | QPainter.SmoothPixmapTransform)
view.show()
states = QStateMachine()
states.addState(rootState)
states.setInitialState(rootState)
rootState.setInitialState(centeredState)
group = QParallelAnimationGroup()
for i, item in enumerate(items):
anim = QPropertyAnimation(item, b'pos')
anim.setDuration(750 + i * 25)
anim.setEasingCurve(QEasingCurve.InOutBack)
group.addAnimation(anim)
trans = rootState.addTransition(ellipseButton.pressed, ellipseState)
trans.addAnimation(group)
trans = rootState.addTransition(figure8Button.pressed, figure8State)
trans.addAnimation(group)
trans = rootState.addTransition(randomButton.pressed, randomState)
trans.addAnimation(group)
trans = rootState.addTransition(tiledButton.pressed, tiledState)
trans.addAnimation(group)
trans = rootState.addTransition(centeredButton.pressed, centeredState)
trans.addAnimation(group)
timer = QTimer()
timer.start(125)
timer.setSingleShot(True)
trans = rootState.addTransition(timer.timeout, ellipseState)
trans.addAnimation(group)
states.start()
sys.exit(app.exec_())

View File

@@ -0,0 +1,11 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>images/Time-For-Lunch-2.jpg</file>
<file>images/centered.png</file>
<file>images/ellipse.png</file>
<file>images/figure8.png</file>
<file>images/kinetic.png</file>
<file>images/random.png</file>
<file>images/tile.png</file>
</qresource>
</RCC>

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -0,0 +1,139 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
from PyQt5.QtCore import (pyqtSignal, QPointF, QPropertyAnimation, QRect,
QRectF, QState, QStateMachine, Qt)
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import (QApplication, QGraphicsScene, QGraphicsView,
QGraphicsWidget)
import appchooser_rc
class Pixmap(QGraphicsWidget):
clicked = pyqtSignal()
def __init__(self, pix, parent=None):
super(Pixmap, self).__init__(parent)
self.orig = QPixmap(pix)
self.p = QPixmap(pix)
def paint(self, painter, option, widget):
painter.drawPixmap(QPointF(), self.p)
def mousePressEvent(self, ev):
self.clicked.emit()
def setGeometry(self, rect):
super(Pixmap, self).setGeometry(rect)
if rect.size().width() > self.orig.size().width():
self.p = self.orig.scaled(rect.size().toSize())
else:
self.p = QPixmap(self.orig)
def createStates(objects, selectedRect, parent):
for obj in objects:
state = QState(parent)
state.assignProperty(obj, 'geometry', selectedRect)
parent.addTransition(obj.clicked, state)
def createAnimations(objects, machine):
for obj in objects:
animation = QPropertyAnimation(obj, b'geometry', obj)
machine.addDefaultAnimation(animation)
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
p1 = Pixmap(QPixmap(':/digikam.png'))
p2 = Pixmap(QPixmap(':/akregator.png'))
p3 = Pixmap(QPixmap(':/accessories-dictionary.png'))
p4 = Pixmap(QPixmap(':/k3b.png'))
p1.setGeometry(QRectF(0.0, 0.0, 64.0, 64.0))
p2.setGeometry(QRectF(236.0, 0.0, 64.0, 64.0))
p3.setGeometry(QRectF(236.0, 236.0, 64.0, 64.0))
p4.setGeometry(QRectF(0.0, 236.0, 64.0, 64.0))
scene = QGraphicsScene(0, 0, 300, 300)
scene.setBackgroundBrush(Qt.white)
scene.addItem(p1)
scene.addItem(p2)
scene.addItem(p3)
scene.addItem(p4)
window = QGraphicsView(scene)
window.setFrameStyle(0)
window.setAlignment(Qt.AlignLeft | Qt.AlignTop)
window.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
window.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
machine = QStateMachine()
machine.setGlobalRestorePolicy(QStateMachine.RestoreProperties)
group = QState(machine)
selectedRect = QRect(86, 86, 128, 128)
idleState = QState(group)
group.setInitialState(idleState)
objects = [p1, p2, p3, p4]
createStates(objects, selectedRect, group)
createAnimations(objects, machine)
machine.setInitialState(group)
machine.start()
window.resize(300, 300)
window.show()
sys.exit(app.exec_())

View File

@@ -0,0 +1,8 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>accessories-dictionary.png</file>
<file>akregator.png</file>
<file>digikam.png</file>
<file>k3b.png</file>
</qresource>
</RCC>

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

267
animation/easing/easing.py Normal file
View File

@@ -0,0 +1,267 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
from PyQt5.QtCore import (pyqtProperty, QEasingCurve, QObject, QPoint, QPointF,
QPropertyAnimation, QRect, QRectF, QSize, Qt)
from PyQt5.QtGui import (QBrush, QColor, QIcon, QLinearGradient, QPainter,
QPainterPath, QPixmap)
from PyQt5.QtWidgets import (QApplication, QGraphicsPixmapItem, QGraphicsScene,
QListWidgetItem, QWidget)
import easing_rc
from ui_form import Ui_Form
class Animation(QPropertyAnimation):
LinearPath, CirclePath = range(2)
def __init__(self, target, prop):
super(Animation, self).__init__(target, prop)
self.setPathType(Animation.LinearPath)
def setPathType(self, pathType):
self.m_pathType = pathType
self.m_path = QPainterPath()
def updateCurrentTime(self, currentTime):
if self.m_pathType == Animation.CirclePath:
if self.m_path.isEmpty():
end = self.endValue()
start = self.startValue()
self.m_path.moveTo(start)
self.m_path.addEllipse(QRectF(start, end))
dura = self.duration()
if dura == 0:
progress = 1.0
else:
progress = (((currentTime - 1) % dura) + 1) / float(dura)
easedProgress = self.easingCurve().valueForProgress(progress)
if easedProgress > 1.0:
easedProgress -= 1.0
elif easedProgress < 0:
easedProgress += 1.0
pt = self.m_path.pointAtPercent(easedProgress)
self.updateCurrentValue(pt)
self.valueChanged.emit(pt)
else:
super(Animation, self).updateCurrentTime(currentTime)
# PyQt doesn't support deriving from more than one wrapped class so we use
# composition and delegate the property.
class PixmapItem(QObject):
def __init__(self, pix):
super(PixmapItem, self).__init__()
self.pixmap_item = QGraphicsPixmapItem(pix)
def _set_pos(self, pos):
self.pixmap_item.setPos(pos)
pos = pyqtProperty(QPointF, fset=_set_pos)
class Window(QWidget):
def __init__(self, parent=None):
super(QWidget, self).__init__(parent)
self.m_iconSize = QSize(64, 64)
self.m_scene = QGraphicsScene()
self.m_ui = Ui_Form()
self.m_ui.setupUi(self)
self.m_ui.easingCurvePicker.setIconSize(self.m_iconSize)
self.m_ui.easingCurvePicker.setMinimumHeight(self.m_iconSize.height() + 50)
self.m_ui.buttonGroup.setId(self.m_ui.lineRadio, 0)
self.m_ui.buttonGroup.setId(self.m_ui.circleRadio, 1)
dummy = QEasingCurve()
self.m_ui.periodSpinBox.setValue(dummy.period())
self.m_ui.amplitudeSpinBox.setValue(dummy.amplitude())
self.m_ui.overshootSpinBox.setValue(dummy.overshoot())
self.m_ui.easingCurvePicker.currentRowChanged.connect(self.curveChanged)
self.m_ui.buttonGroup.buttonClicked[int].connect(self.pathChanged)
self.m_ui.periodSpinBox.valueChanged.connect(self.periodChanged)
self.m_ui.amplitudeSpinBox.valueChanged.connect(self.amplitudeChanged)
self.m_ui.overshootSpinBox.valueChanged.connect(self.overshootChanged)
self.createCurveIcons()
pix = QPixmap(':/images/qt-logo.png')
self.m_item = PixmapItem(pix)
self.m_scene.addItem(self.m_item.pixmap_item)
self.m_ui.graphicsView.setScene(self.m_scene)
self.m_anim = Animation(self.m_item, b'pos')
self.m_anim.setEasingCurve(QEasingCurve.OutBounce)
self.m_ui.easingCurvePicker.setCurrentRow(int(QEasingCurve.OutBounce))
self.startAnimation()
def createCurveIcons(self):
pix = QPixmap(self.m_iconSize)
painter = QPainter()
gradient = QLinearGradient(0, 0, 0, self.m_iconSize.height())
gradient.setColorAt(0.0, QColor(240, 240, 240))
gradient.setColorAt(1.0, QColor(224, 224, 224))
brush = QBrush(gradient)
# The original C++ code uses undocumented calls to get the names of the
# different curve types. We do the Python equivalant (but without
# cheating).
curve_types = [(n, c) for n, c in QEasingCurve.__dict__.items()
if isinstance(c, QEasingCurve.Type) and c != QEasingCurve.Custom]
curve_types.sort(key=lambda ct: ct[1])
painter.begin(pix)
for curve_name, curve_type in curve_types:
painter.fillRect(QRect(QPoint(0, 0), self.m_iconSize), brush)
curve = QEasingCurve(curve_type)
if curve_type == QEasingCurve.BezierSpline:
curve.addCubicBezierSegment(QPointF(0.4, 0.1),
QPointF(0.6, 0.9), QPointF(1.0, 1.0))
elif curve_type == QEasingCurve.TCBSpline:
curve.addTCBSegment(QPointF(0.0, 0.0), 0, 0, 0)
curve.addTCBSegment(QPointF(0.3, 0.4), 0.2, 1, -0.2)
curve.addTCBSegment(QPointF(0.7, 0.6), -0.2, 1, 0.2)
curve.addTCBSegment(QPointF(1.0, 1.0), 0, 0, 0)
painter.setPen(QColor(0, 0, 255, 64))
xAxis = self.m_iconSize.height() / 1.5
yAxis = self.m_iconSize.width() / 3.0
painter.drawLine(0, xAxis, self.m_iconSize.width(), xAxis)
painter.drawLine(yAxis, 0, yAxis, self.m_iconSize.height())
curveScale = self.m_iconSize.height() / 2.0;
painter.setPen(Qt.NoPen)
# Start point.
painter.setBrush(Qt.red)
start = QPoint(yAxis,
xAxis - curveScale * curve.valueForProgress(0))
painter.drawRect(start.x() - 1, start.y() - 1, 3, 3)
# End point.
painter.setBrush(Qt.blue)
end = QPoint(yAxis + curveScale,
xAxis - curveScale * curve.valueForProgress(1))
painter.drawRect(end.x() - 1, end.y() - 1, 3, 3)
curvePath = QPainterPath()
curvePath.moveTo(QPointF(start))
t = 0.0
while t <= 1.0:
to = QPointF(yAxis + curveScale * t,
xAxis - curveScale * curve.valueForProgress(t))
curvePath.lineTo(to)
t += 1.0 / curveScale
painter.setRenderHint(QPainter.Antialiasing, True)
painter.strokePath(curvePath, QColor(32, 32, 32))
painter.setRenderHint(QPainter.Antialiasing, False)
item = QListWidgetItem()
item.setIcon(QIcon(pix))
item.setText(curve_name)
self.m_ui.easingCurvePicker.addItem(item)
painter.end()
def startAnimation(self):
self.m_anim.setStartValue(QPointF(0, 0))
self.m_anim.setEndValue(QPointF(100, 100))
self.m_anim.setDuration(2000)
self.m_anim.setLoopCount(-1)
self.m_anim.start()
def curveChanged(self, row):
curveType = QEasingCurve.Type(row)
self.m_anim.setEasingCurve(curveType)
self.m_anim.setCurrentTime(0)
isElastic = (curveType >= QEasingCurve.InElastic and curveType <= QEasingCurve.OutInElastic)
isBounce = (curveType >= QEasingCurve.InBounce and curveType <= QEasingCurve.OutInBounce)
self.m_ui.periodSpinBox.setEnabled(isElastic)
self.m_ui.amplitudeSpinBox.setEnabled(isElastic or isBounce)
self.m_ui.overshootSpinBox.setEnabled(curveType >= QEasingCurve.InBack and curveType <= QEasingCurve.OutInBack)
def pathChanged(self, index):
self.m_anim.setPathType(index)
def periodChanged(self, value):
curve = self.m_anim.easingCurve()
curve.setPeriod(value)
self.m_anim.setEasingCurve(curve)
def amplitudeChanged(self, value):
curve = self.m_anim.easingCurve()
curve.setAmplitude(value)
self.m_anim.setEasingCurve(curve)
def overshootChanged(self, value):
curve = self.m_anim.easingCurve()
curve.setOvershoot(value)
self.m_anim.setEasingCurve(curve)
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
w = Window()
w.resize(400, 400)
w.show()
sys.exit(app.exec_())

View File

@@ -0,0 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>images/qt-logo.png</file>
</qresource>
</RCC>

View File

@@ -0,0 +1,362 @@
# -*- coding: utf-8 -*-
# Resource object code
#
# Created: Thu May 2 16:22:48 2013
# by: The Resource Compiler for PyQt (Qt v5.0.2)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x14\x1d\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x2e\x00\x00\x00\x37\x08\x06\x00\x00\x00\x73\x60\x78\x64\
\x00\x00\x13\xe4\x49\x44\x41\x54\x78\x9c\x62\xfc\xff\xff\x3f\xc3\
\xdf\x7f\x7f\x99\x99\x99\x98\xff\x3e\x78\xf1\x58\x66\xe9\x9e\x55\
\x09\x87\x2f\x9e\xb6\x79\xf7\xe9\xad\x98\xa4\xf2\x3f\x7e\x51\xb9\
\xbf\xfc\xcc\x1c\x3f\xf8\xfe\xfd\xff\xc7\xca\xc5\xc6\xf7\x46\x9c\
\x5b\xf6\x96\x24\xaf\xd2\x35\x29\x3e\xa5\xcb\xd2\xbc\x4a\xd7\xc4\
\x78\x64\xef\x08\x70\x8a\x3e\x63\x63\x66\xff\xc5\x80\x05\xfc\x67\
\xf8\xcf\xf4\xef\xff\x3f\x26\x06\x86\xff\x0c\x8c\x0c\x8c\xff\x19\
\x19\x18\xff\x33\x30\x42\x69\x0a\x00\x00\x00\x00\xff\xff\x62\xfc\
\xfb\xf7\x2f\x33\x13\x13\xd3\xdf\x59\x9b\x17\xa6\x54\xcf\x6d\xed\
\x7d\xf3\xe6\x0d\x1f\x17\x2f\xdb\x7f\x7b\x2f\x61\x46\x59\x45\x4e\
\x06\x86\x7f\x8c\x0c\x0c\xff\x99\x18\x18\x18\x18\x18\xfe\xfd\xff\
\xc7\xf0\xe7\xdf\x6f\x86\x7f\xff\xff\x30\x30\x30\x30\x32\xb0\x30\
\xb1\x32\x70\xb2\xf0\x7c\xe3\x63\x17\x7a\x26\xcc\x25\x75\x5f\x9c\
\x47\xee\xa6\x04\x8f\xc2\x75\x09\x5e\x85\x9b\xa2\x5c\x52\xf7\x05\
\x38\xc5\x9e\xb1\xb3\x70\xfc\xc0\x6e\xf5\x7f\xc6\x7f\xff\xff\x31\
\xc3\x39\x24\x7a\x08\x00\x00\x00\xff\xff\x62\xfc\xff\xff\x3f\xc3\
\xa4\xb5\xb3\x73\xf2\xbb\xf3\x26\x73\xf2\x09\xff\x63\x67\x63\xfb\
\xef\x1e\x2c\xc4\x20\x21\xc3\xc6\xf8\xed\xeb\x3f\x46\x46\x88\x39\
\x8c\x70\x0b\x18\x99\xfe\x33\x32\x30\xfc\x67\x60\x60\x60\xf8\xff\
\xff\x3f\xd3\xbf\xff\x7f\x19\xff\xfc\xff\x03\xf1\xd0\xbf\x3f\x0c\
\xff\x19\xfe\x33\xb0\x30\xb2\x32\xb0\xb3\x70\xff\xe5\x67\x17\x7e\
\x21\xcc\x25\x79\x5f\x8c\x47\xee\xa6\x14\xaf\xe2\x75\x09\x1e\x85\
\xeb\xa2\x3c\x32\x77\x85\x39\x25\x9e\x70\xb0\x72\x7d\xc5\xe7\xa1\
\xff\x70\x4b\x19\xff\x31\x62\xf1\x10\x00\x00\x00\xff\xff\x6c\x92\
\xbd\x0a\xc2\x30\x14\x46\xbf\x2f\x16\x7f\xd2\x06\x21\x83\xc6\x41\
\xc5\x5d\x70\xec\xa8\xbb\xcf\xe2\x6b\xba\x76\x70\x28\xa8\x83\xe0\
\xd6\xb1\x88\x20\x24\xf7\x3a\x88\x5b\x5e\xe0\x1c\x0e\x1c\x36\xb7\
\xcb\x76\x7f\x3a\x9e\x85\xea\xe2\x87\xb2\xab\x4b\x53\x1f\xa6\x78\
\xbf\x04\x66\x90\x03\x67\x4c\xa0\xfe\x0a\xa9\xc4\x7f\x8f\x64\xa2\
\x44\x24\x89\x48\x1a\xa1\x2a\x30\x2c\x30\x2e\xac\xb8\x91\xef\xfc\
\x24\x3c\x66\xe5\xf2\xba\x70\x9b\x36\x54\xeb\x76\x5e\xad\xee\xde\
\x86\xa7\x1d\xba\x9e\x79\x0f\x45\xc5\x28\x94\x04\xf0\x05\x00\x00\
\xff\xff\x62\x99\xbc\x76\x56\xee\xa7\xef\x5f\x79\xf9\xb9\xf9\xfe\
\x32\xb2\xff\x65\x56\xd6\xe4\x62\xf8\xfd\xeb\x3f\x03\x23\x13\x51\
\x8e\x66\x60\x60\x60\x60\xfc\xcf\xf0\x9f\xf1\xff\x7f\xf4\x18\x66\
\xfc\xcf\xca\xc4\xf6\x9f\x8d\x99\x1d\xc9\x43\x0c\x8c\xff\xfe\xff\
\x65\xfe\xf8\xe3\xb5\xc4\xbb\xef\xcf\x24\x6e\xbc\x39\x65\x01\xf1\
\x10\x33\x03\x3b\x33\xe7\x7f\x1e\x36\xc1\xb7\x82\x9c\xe2\x0f\xc5\
\x79\x64\x6f\x8b\xf3\x28\x5c\x97\xe4\x55\xb8\x2e\xce\x23\x77\x5b\
\x98\x4b\xe2\x11\x0f\x9b\xc0\x3b\x26\x46\xa6\xbf\x30\xd3\x01\x00\
\x00\x00\xff\xff\x62\x54\x89\x34\xbe\xfb\xf4\xed\x0b\x25\x86\xff\
\xcc\xff\x85\x44\x58\x18\xbd\xc3\x45\x88\x76\x31\xb9\x00\x9a\x9e\
\xff\x31\xa2\x79\xe8\xef\x7f\x48\x0c\xfd\xf9\xf7\x9b\xe1\xff\xff\
\x7f\x0c\x8c\x8c\xcc\x0c\x6c\xcc\x1c\x0c\x3c\xac\xfc\x1f\x04\x39\
\xc5\x1e\x89\x72\xcb\xde\x91\xe0\x51\xb8\x26\xc9\xab\x70\x03\x00\
\x00\x00\xff\xff\xbc\xd1\xb1\x0d\x80\x30\x10\x03\x40\x3b\x05\x54\
\x54\xb4\x91\x32\x0e\xa2\x65\xff\x45\xc8\xff\xdb\x54\x94\xb4\x8c\
\x70\x3a\x6e\xe7\xb8\x01\x2f\x73\x1a\x7d\xac\x38\xae\x1d\x11\x06\
\x3f\xbe\x7e\x00\x99\xa0\x5e\x90\xad\x56\x4e\x96\x02\xa9\x84\x5c\
\x20\x1b\x1e\x00\x00\x00\xff\xff\xb4\x92\x21\x12\x00\x20\x0c\xc3\
\xda\x5b\x81\xff\x7f\x98\xa0\x26\x70\x18\x2a\x73\x11\x11\x0d\x30\
\xdd\xd6\xfb\x3d\xbe\x0c\x61\x81\x91\xae\x92\x72\xa8\x0c\x96\xbc\
\x9b\x1d\x00\x00\x00\xff\xff\x94\x94\xb1\x0d\x00\x20\x0c\xc3\xdc\
\x96\xff\x4f\x76\x19\xd8\x10\x42\x70\x40\x6c\x79\xc9\xd8\x96\x7f\
\x22\x21\x33\xa8\x2a\x6c\xd1\x05\xc8\x08\xd6\x27\x34\xb6\x57\xc6\
\x93\xe7\x10\x34\x01\x00\x00\xff\xff\x8c\x91\xc1\x0a\x80\x20\x10\
\x05\x67\xdd\x35\xa5\xfe\xff\x3b\x83\x28\x41\xad\xad\x4b\x67\xeb\
\xdd\x67\x18\x78\x36\x02\x46\xc1\x6a\x42\x9e\x8d\xbd\x1c\xac\x5b\
\x21\x6a\x24\x4d\x09\x01\xaa\x37\x4e\xef\x68\x30\xb2\x2d\x04\x51\
\xfc\xbe\x3e\xac\xef\xed\x3f\xf7\x00\x00\x00\xff\xff\x22\xd9\xe1\
\xff\xff\x31\x30\x70\x70\x32\x33\x7c\xfb\xfa\x87\xe1\xf4\xc9\xc7\
\x0c\x52\x5c\xea\x0c\x5e\x26\x3e\x0c\xc6\xaa\x86\x0c\xa2\x02\x22\
\x0c\x8c\x8c\x0c\x0c\x5f\x7e\x7d\x60\x78\xf6\xe9\x1e\xc3\xb5\xd7\
\x27\x19\xae\xbe\x3a\xc1\xf0\xf5\xf7\x27\x06\x6e\x56\x3e\x9c\x8e\
\x67\x64\x64\x60\x80\x95\x4a\x4c\x8c\x4c\x0c\xff\xff\xff\x67\xf8\
\x4f\xc0\x13\x00\x00\x00\x00\xff\xff\x22\xc9\xe1\xff\xff\x43\x1c\
\x7d\xe7\xc6\x17\x86\xa3\xfb\xde\x32\x54\x84\x54\x30\x14\x85\x67\
\x30\xb0\xb3\xb3\x32\xfc\x87\x54\xe9\x70\xb5\x5a\x62\x16\x0c\xae\
\x2a\xd1\x0c\xcf\x3f\x3f\x60\x58\x73\x75\x22\xc3\xe9\x27\x3b\x19\
\xb8\xd8\xf8\x18\x30\x8b\x4d\x06\x86\x5f\x3f\xff\x31\xb0\xb0\xb0\
\x30\x30\x32\xfd\x65\xf8\xf6\xfb\x0b\x03\x0b\x13\x0b\x03\x2b\x13\
\x3b\x5e\xc7\x03\x00\x00\x00\xff\xff\x22\x3a\x3b\xfe\xff\xc7\xc0\
\xc0\xce\xc1\xc4\x70\xe3\xf2\x57\x86\x9d\x6b\x5f\x30\xcc\x2e\x9c\
\xce\x50\x19\x97\xcb\xc0\xc2\xca\xc4\xf0\xf7\xdf\x5f\x86\xff\xff\
\xff\xc1\x2b\x9b\x3f\x7f\x7f\x33\xfc\xfe\x03\x29\xd2\x24\x79\xe5\
\x19\x72\x2d\xfa\x19\x42\x74\xf2\x19\xbe\xfd\xfa\xcc\xc0\x04\x2d\
\x01\xfe\xff\x67\x60\x60\x65\x63\x64\x78\xf5\xec\x0f\xc3\x92\x59\
\x0f\x18\x3c\xc4\x4b\x18\xba\xbc\x36\x32\xd4\xd8\x2f\x66\x30\x94\
\x74\x64\xf8\xf1\xe7\x1b\x5c\x2d\x36\x00\x00\x00\x00\xff\xff\x8c\
\xd4\x21\x0e\xc2\x40\x10\x40\xd1\x3f\x33\xbb\x75\x0d\x06\x01\x0e\
\x53\x82\x44\x35\x58\x24\xa6\x12\x8d\x20\xe1\x04\x78\x6e\xc4\x01\
\xb8\x0c\x69\x10\x08\x0c\x49\x31\x5d\xb6\x83\x42\x92\x70\x82\xff\
\xd4\xff\x0b\xfe\x8d\x3c\xee\x99\xcb\xf9\xca\x69\x7f\x64\xbb\x6e\
\xe8\x53\x42\x45\x31\x35\x44\x14\xd3\x80\x49\x20\x58\xa4\x08\x05\
\x0e\x0c\xee\x64\xcf\x34\x8b\x03\x9b\xf9\x8e\xae\x7f\xa2\x62\xb8\
\x3b\xaa\xc2\xad\x7d\x11\xbd\xa4\xae\x56\x8c\xe2\x94\x6a\xbc\x64\
\x52\xce\x78\x0f\x09\xf8\xfd\xe4\x0f\x00\x00\x00\xff\xff\x22\x3a\
\xc4\x19\x19\x99\x18\x0e\xee\x7e\xce\xa0\xa9\xac\xcb\x50\x16\x95\
\xcb\xc0\xc0\xc0\xc0\xc0\xca\xc2\xc2\xc0\xc8\xc8\xc8\xf0\xff\x3f\
\x24\x99\xdc\x78\x7b\x92\xa1\x66\x43\x3a\x83\x4f\x65\x04\xc3\xda\
\x43\x5b\xa0\x21\xc6\x08\x0f\xb9\x10\xed\x3c\x06\x45\x41\x6d\x86\
\x9f\x7f\xbe\x31\x30\x33\x31\x33\xfc\xff\xc7\xc8\xf0\xf4\xf1\x17\
\x06\x6d\x25\x55\x06\x19\x51\x69\xa8\x63\x19\x18\xfe\x13\x51\x12\
\x01\x00\x00\x00\xff\xff\x84\xd4\x2b\x0e\xc2\x40\x14\x46\xe1\xf3\
\xdf\xa6\x4c\x05\xeb\x40\xa0\x50\x2c\x02\x0d\x49\x75\x05\x0e\xc9\
\x1e\x58\x09\x8a\x2d\x90\x60\x70\x24\x78\x12\x14\x62\x12\x02\x02\
\x0c\x8f\xb6\x77\xb0\x18\xc2\x0e\x8e\xf8\x72\xfe\x86\xa7\x04\x9d\
\x20\xe2\xe9\x4d\x3c\xde\x99\x4d\x2a\x42\x5e\xd0\xb4\x0d\x92\xf0\
\xe4\x48\xe2\x70\xdd\xb3\xd8\x4c\x89\xb6\xe5\xd6\xdd\x31\x9e\x97\
\x2c\xd7\x2b\x4c\xc2\xdd\xf1\xd4\x92\x67\x81\x51\xaf\xa2\xf6\x1a\
\x99\x78\x3d\xc4\xe5\xfc\x64\xd8\x1f\x00\x7c\xed\x34\xc3\x64\x98\
\x0c\xfd\xe0\xf2\x01\x00\x00\xff\xff\x22\x1c\xe2\xff\x21\x65\xf5\
\x8d\x2b\x1f\x19\x04\x84\xc4\x19\xfc\xad\x3d\x19\x18\x18\x18\x18\
\x98\xa1\x2d\x30\x58\x64\x6e\xbe\x31\x8b\xe1\xdf\xff\xbf\x0c\xec\
\x0c\x02\x0c\xa6\xe6\x92\x0c\x72\x9a\x22\x0c\x55\x33\xda\x18\xbe\
\xff\x82\x84\x2e\x23\xb4\x08\x36\x94\x74\x60\x90\xe1\x57\x66\x60\
\x62\xfd\xc5\xf0\xf2\xc5\x67\x86\xdf\x2f\xdf\x33\x58\xe9\x98\x20\
\x2c\x63\x60\x60\xf8\xf5\xf7\x3b\xc3\xd7\xdf\x9f\x18\xbe\xff\xf9\
\xca\xf0\xeb\x2f\xf6\x56\x31\x00\x00\x00\xff\xff\x22\xe8\x70\x26\
\x66\x06\x86\x9f\xdf\x19\x18\xee\xdf\xfb\xc8\x60\xa9\x63\xc4\x20\
\x25\x2c\x09\x0f\xe5\xff\x0c\xff\x19\x18\x19\x99\x18\x3e\xfc\x78\
\xcd\xf0\xe0\xfd\x55\x06\x0e\x16\x2e\x86\x3f\xff\x7e\x33\xfc\xfe\
\xf3\x87\x41\x53\x47\x90\xe1\xe1\xe3\xfb\x0c\x07\x2e\x1c\x85\x84\
\xe6\xff\x7f\x0c\x7f\xff\xfd\x65\x60\x67\xe1\x64\xe0\xfd\x64\xc4\
\xb0\x62\xfe\x43\x86\x64\xd3\x46\x86\xcd\x33\x76\x30\xb8\x98\x38\
\x40\x03\x03\x52\xc8\x29\x08\x6a\x33\x98\xc9\xb8\x33\x68\x88\x98\
\x30\x48\xf2\x28\x60\x75\x17\x00\x00\x00\xff\xff\xc2\x5b\x1c\xfe\
\xff\xcf\xc0\xc0\xc2\xc2\xc8\xf0\xfe\xdd\x5f\x86\xef\xef\x7f\x30\
\x58\xe9\x9a\x42\x1c\xf1\xef\x1f\x03\x13\x33\xa4\xbc\x65\x64\x64\
\x64\x78\xf9\xe5\x21\xc3\x97\x5f\x1f\x19\xd8\x59\xb8\x20\xc9\xe2\
\xef\x7f\x06\x61\x31\x36\x06\x06\xe6\x7f\x0c\xa7\xae\x9d\x63\xf0\
\x34\x73\x85\xe7\x03\x06\x06\x06\x06\x4d\x51\x33\x86\x77\x8f\xfa\
\x19\x54\xc5\xb4\x19\x34\xe5\xd5\x18\xfe\xfe\xfb\x0b\x75\x38\x24\
\x16\x2d\x65\xbd\x19\x2c\x64\x3c\x19\x18\x19\x99\x18\x9e\x7f\xbe\
\xcf\xd0\xb0\x2f\x02\xc3\x6d\x00\x00\x00\x00\xff\xff\xc2\x1f\xe2\
\xff\x19\x18\x98\x98\x19\x19\xde\xbf\xfd\xcd\xc0\xf0\x8f\x99\x41\
\x5f\x45\x8b\x81\x81\x81\x81\x81\x11\xde\x02\x83\x44\xed\x9b\x6f\
\xcf\x19\xfe\xfc\xfb\xcd\xc0\xc8\xc0\xc8\xc0\xc8\x08\x49\xab\x9c\
\xdc\x4c\x0c\xcc\x5c\x2c\x0c\x37\x1f\xdf\x83\xeb\x61\x64\x82\xe8\
\xd3\x53\xd1\x64\xe0\xe2\xe3\x67\xf8\xf3\xf7\x0f\x6e\x8b\x09\x54\
\x40\x00\x00\x00\x00\xff\xff\x22\x98\x54\x18\x19\x19\x18\x3e\xbc\
\xff\xc5\xc0\xc4\xce\xc9\xa0\x20\x21\x07\x11\x83\x86\x1c\xcc\xe8\
\x4f\x3f\xde\x42\x9a\xa1\x50\xfe\xbf\x7f\x0c\x0c\xac\xac\x0c\x0c\
\xdc\xdc\xac\x0c\xcf\xdf\xbc\x84\x58\xc4\xc8\x04\xd7\x27\x25\x2c\
\xc1\xa0\xa9\x26\xc5\x70\xf1\xfe\x25\x86\xa7\xaf\x9f\xc3\x43\x1a\
\x06\xfe\xfc\xfd\xcb\xf0\xfb\xcf\x3f\x14\xbb\xd0\x01\x00\x00\x00\
\xff\xff\x22\x5c\x73\xfe\x67\x60\xf8\xfc\xe9\x37\x03\x2f\x17\x37\
\x83\x28\xbf\x30\xd4\x33\xd0\x4e\x15\x54\xc9\xb7\xdf\x9f\x51\x3c\
\xc2\xc0\x00\xc9\x1b\x1c\x1c\x2c\x0c\xef\x3f\x7f\x82\xeb\xf9\x0f\
\x0d\x49\x4e\x76\x4e\x86\x88\x28\x2d\x86\xd4\xce\x64\x06\x13\x69\
\x17\x86\xc3\x53\x37\x32\xfc\xff\xff\x9f\xe1\x1f\xc3\x3f\x06\x66\
\x46\x66\x86\xed\x37\x17\x32\xec\xba\xbd\x82\x41\x84\x5b\x92\x01\
\xa9\xef\x80\x02\x00\x00\x00\x00\xff\xff\x7c\x95\x4d\x0a\x80\x20\
\x18\x44\x9f\xf9\x43\x88\x50\xf7\xbf\x5b\x27\x88\x36\x2d\x34\x31\
\xfd\x5a\xb8\x11\x8a\xf6\x03\xf3\x86\x19\x98\x7f\x70\xd5\x77\x9e\
\x62\x21\xf8\x85\xe0\xc3\xa7\x2c\xdf\x91\xf1\x2c\x44\x7a\x53\xce\
\x69\xe2\x95\x28\xb5\x60\xb5\x05\x81\x86\x30\x29\x85\xb7\x2b\xd6\
\x18\x8c\x1e\x11\x7a\xf4\xd4\x4e\xf6\xbc\x91\xe4\xa0\xb6\x8a\xd3\
\xf3\xcb\xf3\x01\x00\x00\xff\xff\x84\x97\xc1\x0a\x80\x30\x0c\x43\
\x5f\xb7\xae\x9b\xc5\xff\xff\x57\xad\x16\x0f\x9e\x64\x03\xef\x21\
\x79\x10\x08\xe4\x7f\xc7\x81\x88\x64\xb3\x41\x57\x5b\x6a\x22\x63\
\x3a\x1e\x22\xa0\x5a\x38\xe2\xe4\xba\x63\x82\xf3\xb6\x93\x99\x7c\
\x7b\x7a\x4d\x8a\x54\x9a\x0c\xac\x3a\x5d\x7d\x99\xf9\x00\x00\x00\
\xff\xff\x22\xaa\x1c\xff\xfb\xf7\x3f\x03\x0b\x33\x33\x03\x13\x13\
\x13\xb2\xf9\x70\x00\x69\xf5\xa1\xbb\x1c\x92\xb1\xff\xfe\xfb\x0b\
\x75\x20\x2a\x60\x65\x62\x83\x26\x1d\x6c\x69\x18\xd2\x3a\xfc\xff\
\xff\x1f\xce\x5a\x14\x00\x00\x00\xff\xff\x22\xb2\xad\x02\x29\xf6\
\x18\x71\xf6\xe7\xb0\x97\x00\x8c\x50\x29\x6c\xb2\x4c\x8c\xc4\x0d\
\x21\xe0\x02\x00\x00\x00\x00\xff\xff\x22\xca\xe1\x4c\x4c\x8c\x0c\
\x7f\xff\xfd\x63\xf8\x87\xa5\x49\xca\xc0\xc0\x80\xbd\x5a\x86\x3a\
\x98\x91\x11\x7b\xb9\x40\x69\xcf\x08\x00\x00\x00\xff\xff\x22\xaa\
\x38\x64\x61\x85\xa4\xd5\xdf\x7f\x7e\xc3\x1d\x85\x0c\x58\x18\x59\
\xb1\xb6\x9d\xff\xfd\xfd\xcf\xc0\xcc\xc4\xc4\xc0\x84\x65\x80\xe6\
\xf7\xbf\x9f\xd0\xa2\x8e\xbc\x91\x38\x00\x00\x00\x00\xff\xff\x22\
\x1c\xe2\x8c\x0c\x0c\xec\xec\x2c\x0c\xdf\x7e\x7c\x67\xf8\xf1\x0b\
\x7b\xbb\x81\x95\x99\x1d\xc3\xfe\xff\x0c\x0c\x0c\x7f\xfe\xfe\x63\
\x60\x65\x65\x65\x60\x61\x46\x76\x38\x24\xfc\x7f\xfc\xf9\x06\x2d\
\x22\xc9\x03\x00\x00\x00\x00\xff\xff\x22\x58\x73\x32\x32\x32\x30\
\x70\x73\x43\xfa\x96\x1f\xbf\x7e\x82\x0a\xff\x87\x3b\x8e\x81\x81\
\x81\x81\x93\x95\x9b\x01\x32\xa8\x89\x70\xda\xff\x7f\x0c\x0c\xbf\
\x7f\xfd\x65\xe0\x64\xe7\x80\x14\x85\x50\x09\x58\x3e\xf9\xfa\xeb\
\x23\x24\x89\x91\xe9\x72\x00\x00\x00\x00\xff\xff\x22\x2a\x8d\xf3\
\xf2\xb1\x32\x7c\xff\xf1\x8d\xe1\xe5\xfb\xd7\x10\x07\xff\x47\x38\
\x90\x81\x81\x81\x81\x87\x4d\x80\x81\x81\x01\x29\xf4\x18\x21\x0e\
\xff\xf9\xf3\x2f\x03\x1f\x17\x2f\x44\x0e\xaa\x89\x91\x81\x91\xe1\
\xcf\xbf\xdf\x0c\x9f\x7e\xbe\x63\x60\x66\x64\x21\xd8\xb7\xc4\x05\
\x00\x00\x00\x00\xff\xff\xc2\xef\x70\xa8\x03\xf8\x05\xd9\x18\x18\
\xfe\xfc\x64\xb8\xf7\xec\x21\xd4\xe1\xa8\x96\x09\x70\x88\xa2\x74\
\xb3\x18\x19\x19\x18\xfe\xfc\x81\x54\x5c\x62\x82\x42\x0c\x0c\x0c\
\x90\x9e\x10\xcc\x8d\x9f\x7e\xbe\x83\x38\x9c\x89\x85\x81\xdc\x20\
\x07\x00\x00\x00\xff\xff\x22\x18\xe2\x7f\xff\xfd\x67\xe0\x17\x64\
\x61\x60\x60\x61\x60\xb8\x78\xe7\x2a\x9a\xbf\x20\x61\x2e\xc2\x25\
\xc5\xc0\xc6\xc2\x09\x29\x29\xa0\xed\xf7\x9f\x3f\xfe\x33\xfc\xfc\
\xf6\x87\x41\x5e\x42\x06\xee\x59\x58\xe8\xbe\xfc\xf2\x88\xe1\xeb\
\xaf\x8f\x0c\xcc\x8c\xcc\x64\xa7\x71\x00\x00\x00\x00\xff\xff\xc2\
\xeb\x70\x46\x46\x06\x86\xbf\x7f\xfe\x33\xf0\xf0\x31\x31\xf0\x0a\
\x73\x32\x9c\xbc\x7a\x8e\x81\x81\x81\x81\x81\x19\x5e\x11\x41\x1c\
\x2e\xca\x2d\xc3\x20\xc0\x2e\xc2\xf0\x17\xda\x4f\x64\x62\x66\x60\
\xf8\xfc\xe1\x0f\x03\xc3\xaf\xff\x0c\xba\xca\x9a\x50\xd3\x10\x2d\
\xbe\x7b\xef\x2e\x33\xfc\xfe\xfb\x0b\x9a\xc6\x91\x9d\x8e\x48\x4e\
\x4c\x8c\x4c\x0c\xac\x2c\x2c\x0c\xcc\xcc\xd8\xcb\x7b\x00\x00\x00\
\x00\xff\xff\x22\x5c\xe5\xff\x63\x60\x60\x65\x67\x60\x50\x50\xe2\
\x67\x38\x7b\xe3\x32\xc3\xa3\x57\x8f\xa1\x5d\x36\x48\xfb\xfa\xdf\
\xff\x7f\x0c\x9c\xac\x3c\x0c\x4a\x42\x3a\x0c\xbf\xfe\xfd\x64\x60\
\x64\x60\x62\x60\x62\x62\x64\x78\xfa\xe8\x3b\x03\x2b\x27\x2f\x83\
\x8d\xae\x05\xc4\x22\xa4\x6e\xd8\xb5\x57\x27\x18\x58\xa0\xc9\x04\
\xa5\x3c\x87\xfa\x81\x87\x4d\x90\xe1\xeb\xef\x8f\x0c\x2f\xdf\xbd\
\x61\x78\xf7\xf1\x23\xd6\x16\x22\x00\x00\x00\xff\xff\x22\xaa\x38\
\xfc\xf7\xf7\x3f\x83\x9a\x06\x2f\xc3\xe7\x8f\x6f\x18\x36\x1f\xdb\
\xc9\xc0\xc0\xc0\x80\x51\x8d\xdb\x2b\x86\x30\xfc\xfb\xfb\x97\x81\
\x99\xed\x1f\xc3\xcf\x6f\x4c\x0c\xa7\x8e\x3e\x60\x08\x75\xf2\x66\
\x50\x93\x51\x61\xf8\xf7\xef\x1f\x03\x23\x23\x24\x24\x9f\x7c\xba\
\xc3\x70\xfb\xed\x45\x06\x0e\x56\x2e\x06\x56\x36\x26\x86\xcf\xdf\
\xbe\x30\x30\x30\x40\x6a\x66\x58\x6d\x6a\x25\xef\xc5\x60\x2d\x92\
\xc0\xa0\xfc\x27\x80\x21\x55\x77\x02\x83\x28\x8f\x34\x24\x86\x90\
\x3c\x00\x00\x00\x00\xff\xff\x22\xaa\x02\xfa\xfd\xeb\x3f\x83\x84\
\x0c\x1b\x83\x84\x12\x1f\xc3\xf4\xf5\x8b\x18\x7e\xfd\xf9\xc5\xc0\
\xc2\xcc\xcc\xf0\x9f\xe1\x3f\x7c\xe4\x49\x5b\xcc\x82\x21\x4c\x2f\
\x9f\xe1\xd3\xa7\xef\x0c\x5b\xd6\x3d\x64\xb0\xd5\x73\x61\x98\x98\
\xd7\x0a\x35\x83\x91\xe1\x1f\x03\xc4\xa3\xfb\xef\xad\x62\xf8\xfa\
\xeb\x13\x03\x0b\x0b\x33\x83\x98\x18\x27\xc3\xc3\x17\x4f\x19\x9e\
\xbf\x7b\x01\x0d\x70\x48\x90\xf3\xb2\x09\x33\x14\xb9\xb6\x30\xb4\
\x25\xb4\x31\x38\xe9\x3a\x33\xc0\x87\xe7\x90\x9a\x1c\x00\x00\x00\
\x00\xff\xff\x22\xae\xad\xc2\xc0\xc0\xf0\x9f\xf1\x1f\x83\xad\x93\
\x04\xc3\xd5\x5b\x17\x19\xa6\xac\x9b\xcd\xc0\xc0\xc0\xc0\xf0\xfb\
\xcf\x1f\xb8\xc3\xfe\xff\xff\xcf\xe0\xa7\x91\xc1\x50\x67\xb7\x86\
\x61\x4d\xf9\x46\x86\xbd\x13\xd7\x30\x88\xf0\x8b\x40\xc6\x56\x18\
\xfe\x32\x30\x33\xb2\x30\xdc\x7b\x77\x99\xe1\xd0\x83\xf5\x0c\xdc\
\x6c\x7c\x0c\xbf\x7e\xfd\x66\x50\xd7\xe1\x67\xf8\xf8\xf1\x15\xc3\
\xca\x3d\x9b\x20\xf6\xfc\x83\xe5\x03\xb4\x21\x38\x2c\x39\x18\x00\
\x00\x00\xff\xff\x22\x6a\x08\x8e\x91\x91\x81\xe1\xf7\xcf\xff\x0c\
\x12\x32\x2c\x0c\xd6\xee\x32\x0c\x95\x53\xdb\x18\x4c\x35\x8d\x18\
\x6c\x75\x2d\x19\x7e\xff\xf9\xcd\xc0\xc4\xc4\xc4\xc0\xcc\xc4\xc4\
\xf0\xff\xff\x3f\x06\x55\x29\x55\x06\x55\x29\x48\x29\x02\x49\xbf\
\xff\x19\x98\x19\x59\x18\x3e\xfd\x7c\xc7\x30\xe7\x6c\x2d\xc3\xdf\
\x7f\xbf\x19\xd8\x59\x38\x19\x7e\xff\xfe\xc7\x20\x24\xc6\xcc\xe0\
\x1a\x28\xcb\xd0\xb1\xaa\x9b\x41\x5c\x58\x94\x21\xc4\xde\x9f\x81\
\x99\x81\x91\xe1\xff\xff\x7f\x0c\x9f\x7f\x7d\x60\x78\xf8\xe1\x3a\
\xc3\xa9\x27\x3b\x19\xde\x7c\x7b\xc6\xc0\xca\xcc\x86\xd2\x52\x04\
\x00\x00\x00\xff\xff\x62\xe4\xf1\x90\xfb\xcf\xc8\xc8\xc0\xf0\xeb\
\xe7\x7f\x06\x59\x45\x76\x06\xb7\x40\xdc\x03\xfb\xff\xff\x33\x30\
\x70\x70\x30\x33\x9c\x3a\xf2\x96\xe1\xe6\xf9\xbf\x0c\x4b\x6b\x66\
\x33\x78\x59\x3a\x42\xca\x75\x68\x1a\xfe\xf7\xff\x1f\xc3\xff\xff\
\x90\x92\x07\x36\x9e\xf8\xe4\xe3\x6d\x86\xe9\xa7\xca\x18\x9e\x7e\
\xba\xcb\xc0\xc9\xca\x03\x1f\xfc\xfc\xff\x9f\x81\x81\x9d\x9d\x89\
\xe1\xcb\x97\x5f\x0c\x2f\x5f\x7e\x65\x50\x93\x51\x66\x10\x17\x12\
\x63\xf8\xf1\xe7\x1b\xc3\xfb\xef\x2f\x19\x3e\xfe\x78\x03\xcf\xfc\
\xe8\x19\x14\x00\x00\x00\xff\xff\x22\xc9\xe1\x30\xcb\x38\x39\x59\
\x18\x1e\xde\xff\xcc\x70\xf1\xf4\x47\x06\x6f\xfd\x50\x86\x64\xcf\
\x78\x06\x1d\x25\x4d\x06\x56\x68\x6f\x06\xe6\xe0\x6f\xbf\x3f\x33\
\xac\xbd\x3a\x99\xe1\xf0\x83\x0d\x0c\x7f\xfe\xfd\x82\x8c\x02\xa0\
\x8d\xd8\xc2\x86\xac\x59\x58\x98\x18\x7e\xfc\xfa\xc1\xf0\xfb\xcf\
\x1f\xc8\x8c\x03\x13\x2b\xb4\xe4\x61\xc4\x3a\xca\x0b\x00\x00\x00\
\xff\xff\x22\x79\x0e\x82\x91\x91\x81\xe1\xfb\xb7\x3f\x0c\x32\x72\
\xdc\x0c\x7e\xe1\xd2\x0c\x77\x19\x37\x31\x18\x25\x58\x31\xb4\x2e\
\xee\x63\x60\x60\x60\x60\xf8\xfb\x17\x61\xc9\x9f\x7f\xbf\x18\x0e\
\xde\x5f\xcb\xc0\xc0\xc0\xc0\xc0\xc5\xca\x8b\xd5\x01\x8c\x4c\x90\
\x51\x81\x9f\x3f\xff\x32\x30\x33\xb0\x31\x70\xb0\x72\x33\xb0\xb3\
\x70\x32\x30\x33\x42\x27\x0b\xb0\x0f\x4d\xff\x07\x00\x00\x00\xff\
\xff\x22\x6b\xf2\x84\x91\x89\x81\xe1\xd7\xaf\x7f\x0c\x3f\xbe\xfd\
\x65\x50\x53\x15\x67\x10\x94\xe0\x65\xd8\x7a\x6c\x0f\x03\x03\x03\
\x03\x03\x13\x33\x33\x3c\xc9\xf0\xb1\x0b\x33\xb8\xa9\xc6\x30\x7c\
\xf8\xf1\x8a\xe1\xe3\xcf\xb7\xd0\x34\x8f\x3d\x2a\x19\x19\x19\x50\
\x7a\x3d\x78\xdb\x30\xff\x19\xfe\x00\x00\x00\x00\xff\xff\x22\x6b\
\x46\x02\x6e\xd1\x3f\x06\x86\xff\x8c\x7f\x18\xd4\x35\x04\x19\xce\
\x1c\xbd\xca\x70\xe9\xde\x15\x06\x3d\x25\x1d\xc8\x80\x11\xb4\x76\
\x0d\xd4\xca\x66\x90\xe1\x53\x65\x78\xf1\xe9\x11\xc3\xb1\x27\x9b\
\x19\x3e\xfc\x78\x85\xb3\xfd\x4e\x84\xad\xff\xff\xfd\xff\xc3\xc8\
\xcf\x2e\xfa\x0c\x00\x00\x00\xff\xff\xa2\x6c\xba\x8a\x91\x81\xe1\
\xf7\xef\xff\x0c\xea\xba\xbc\x0c\x7f\xfe\x7f\x63\x98\xb1\x71\x21\
\x03\x03\x03\x03\xc3\x9f\xbf\x7f\xe0\x0d\x31\x16\x46\x56\x06\x2b\
\x39\x1f\x86\x20\x9d\x2c\x06\x5e\x36\x01\x86\xbf\xff\xfe\x30\xe0\
\xcc\x40\x04\x00\x13\x23\xe3\xbf\xdf\x7f\x7f\x32\xa8\x0a\x1b\xed\
\x07\x00\x00\x00\xff\xff\xa2\xc8\xe1\x8c\x8c\x0c\x0c\x7f\x7f\xff\
\x67\xe0\x15\x60\x64\x70\x74\x97\x65\x98\xb9\x76\x31\xc3\xf6\x13\
\x7b\x19\xd8\x58\xd9\xe0\x0e\xff\xcf\xf0\x9f\x88\xf9\x1f\xa2\xc0\
\xff\xff\x0c\xff\x99\x98\x99\xd8\x7e\x3b\x28\x06\xcf\x02\x00\x00\
\x00\xff\xff\xa2\x78\x82\x90\x91\x89\x81\xe1\xe7\x8f\x7f\x0c\xda\
\x86\x3c\x0c\xf6\x3e\xc2\x0c\x69\x93\x32\x19\x66\x6c\x9a\xcf\xf0\
\xe1\xf3\x67\x86\xff\xff\x11\x6d\x94\x6f\xbf\x3f\x33\xfc\xf9\xff\
\x1b\xe7\xc8\x14\x0e\xd3\xff\x33\x32\x32\xfd\x63\x62\x64\xfe\xc3\
\xc2\xc4\xfa\xfb\xfd\xf7\x57\x8c\x0e\x0a\xa1\x53\xd4\x45\x8d\x8e\
\x03\x00\x00\x00\xff\xff\x22\xb9\x38\xc4\x05\x60\x65\xfc\xb7\xef\
\xbf\x19\x9e\x3c\xfd\xc0\x20\x29\x20\xc5\xa0\x28\x29\xc7\xc0\xce\
\xc6\xce\xf0\xfd\xf7\x67\x86\x8f\x3f\xde\x41\x47\xbc\x30\xd3\x36\
\x64\x62\x16\xba\x82\x02\xba\xd8\xe0\x3f\xc3\x3f\xe6\x7f\xff\x20\
\x0b\x1c\xfe\xfe\xfb\xfd\xef\xf7\xdf\x5f\x4c\xb6\xf2\x41\x2b\x52\
\x4d\x5b\x62\x58\x98\x58\xfe\x02\x00\x00\x00\xff\xff\x22\x3b\x73\
\x62\x58\xce\xc8\xc0\xf0\xe3\xfb\x5f\x06\x16\x66\x66\x06\x35\x15\
\x31\x86\x5f\xbf\xbf\x31\xdc\xff\x78\x09\x3e\xb5\x0d\x9d\x66\xf9\
\x0f\x59\x09\xc1\x04\x6f\xe3\xfe\x67\xf8\xc7\xfc\xf7\xdf\x5f\xc6\
\xbf\xff\x7e\x33\xfe\xfd\xf7\x87\xe1\xef\xbf\xbf\x0c\x8c\x0c\x90\
\x7e\x2c\x17\x2b\xdf\x17\x71\x4e\xb1\xc7\xa2\x5c\x32\xb7\xcd\x64\
\xdc\x97\x9a\xcb\x7a\xac\x82\x0c\xb4\xff\x67\x04\x00\x00\x00\xff\
\xff\x62\x81\xac\x7a\xf8\x4f\x95\x09\x70\x48\xf3\xfa\x3f\xc3\xcf\
\x1f\x7f\xfe\x33\x32\xb2\xfc\xe7\x64\x65\x83\x2f\xd7\xf8\xf7\xff\
\x2f\xf3\xdf\x7f\x7f\x18\x7f\xff\xfb\xcd\xf8\xe7\xdf\x1f\x86\x7f\
\xff\x20\x6b\x5e\xd8\x20\x0e\xfc\x2a\xc0\x21\xff\x58\x94\x5b\xe6\
\xb6\x24\xaf\xc2\x75\x49\x5e\xc5\xab\x92\xbc\x0a\x37\x45\xb8\xa4\
\x1e\xf0\x71\x08\xbd\x66\x62\x64\xfe\xc7\xc0\xc0\xc0\xf0\xff\xff\
\x3f\x26\x06\x68\xac\x00\x00\x00\x00\xff\xff\x62\xf9\xf3\xe7\x0f\
\x03\x1b\x1b\xdb\x3f\x06\x86\xdf\x4c\x24\x25\x3f\x88\x53\xff\x33\
\x32\x32\xa0\x85\xe0\x7f\xe6\x7f\xff\xff\x30\xfe\xfe\xfb\x8b\xf1\
\xef\x9f\xdf\xf0\x10\x64\x61\x66\x67\xe0\x66\xe5\xfb\x2a\xc6\x21\
\xff\x58\x94\x5b\xfa\x0e\xc4\x81\x4a\x57\x25\x78\x14\x6e\x8a\x72\
\x4b\xdd\x47\x76\x20\x3a\x80\x2c\xc8\xf9\xcf\xc0\xc4\xc8\x0c\xcf\
\xe5\x00\x00\x00\x00\xff\xff\x62\x11\x13\x10\x7e\xf2\xf4\xed\x73\
\x59\x76\x66\xee\xbf\xff\xff\x33\x30\x63\x77\x3c\xe3\x7f\xa4\xc5\
\x2e\x28\x69\x10\x11\x82\x10\x33\x59\x61\x0e\xe4\x16\x7d\x22\xca\
\x2d\x73\x5b\x82\x57\xe1\xba\x14\xaf\xe2\x35\x09\x1e\x85\x9b\x22\
\xdc\xd2\xf7\xf9\x39\x84\x5e\xe1\x72\xe0\xff\xff\xff\x98\xff\xc3\
\x63\x1f\xba\x18\x81\x91\xf1\x3f\x13\x96\x21\x5b\x00\x00\x00\x00\
\xff\xff\x62\xd9\xd3\xbf\xc1\x2e\xa4\x2e\x6e\xd3\xc5\x2b\x97\x74\
\x59\x98\xa5\xfe\x42\x06\x53\x99\xfe\x33\x31\x22\x56\x01\xfd\xfd\
\xff\x87\xf1\xcf\x5f\xc8\x0a\x86\xbf\xff\xa1\x21\xc8\xc4\xce\xc0\
\xcd\xc6\xf7\x5d\x94\x43\x0e\x12\x82\x3c\x8a\xd7\x24\x79\x15\xaf\
\x49\xf0\xca\xdf\x10\xe5\x96\xb9\xcf\xcf\x2e\xf4\x8a\x89\x09\xb7\
\x03\xff\x41\x17\xcc\x40\x03\x05\xb2\x04\x84\x91\xe9\x2f\xb1\x91\
\x0e\x00\x00\x00\xff\xff\x62\xfc\xff\xff\x3f\xc3\xeb\x8f\x6f\x84\
\xbd\x4a\xa2\x37\x3f\xfe\x76\xd9\x32\x38\x46\xee\xdf\xd7\x6f\xdf\
\x99\xfe\x33\x40\x06\x32\x59\x99\xd8\x18\xb8\x58\x79\x3f\x09\x70\
\x88\x3d\x11\xe1\x96\xbe\x23\xc1\xa3\x70\x43\x92\x57\xe1\x9a\x38\
\x8f\xfc\x4d\x51\x6e\xa9\x07\xfc\xec\xc2\x78\x1d\x88\x2d\x04\x89\
\x74\x1b\x5e\x00\x00\x00\x00\xff\xff\x62\xfc\xf3\xf7\x0f\x33\x33\
\x13\xf3\xdf\x57\xef\xde\xf3\x66\xcf\x4e\xde\x2e\xa1\xfd\x56\x4f\
\x96\x4f\xfd\xac\x04\xaf\xc2\x75\x69\x3e\x95\x4b\x52\xbc\x8a\xd7\
\xc4\xb8\x65\xef\x08\x70\x8a\xbe\x64\x66\x62\xc6\xde\xe2\xf9\xff\
\x8f\xf9\x1f\xc3\x3f\x68\xc3\x96\x11\x69\xa9\x13\xd9\x9d\x78\x82\
\x00\x00\x00\x00\xff\xff\x03\x00\x3c\x1e\x17\xa6\x18\xe4\xa8\x9e\
\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
"
qt_resource_name = b"\
\x00\x06\
\x07\x03\x7d\xc3\
\x00\x69\
\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x73\
\x00\x0b\
\x05\x52\xbf\x27\
\x00\x71\
\x00\x74\x00\x2d\x00\x6c\x00\x6f\x00\x67\x00\x6f\x00\x2e\x00\x70\x00\x6e\x00\x67\
"
qt_resource_struct = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x12\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
"
def qInitResources():
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources()

270
animation/easing/form.ui Normal file
View File

@@ -0,0 +1,270 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>545</width>
<height>471</height>
</rect>
</property>
<property name="windowTitle">
<string>Easing curves</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<widget class="QListWidget" name="easingCurvePicker">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>120</height>
</size>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="movement">
<enum>QListView::Static</enum>
</property>
<property name="isWrapping" stdset="0">
<bool>false</bool>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>
<property name="selectionRectVisible">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="title">
<string>Path type</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QRadioButton" name="lineRadio">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>40</height>
</size>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Line</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string>buttonGroup</string>
</attribute>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="circleRadio">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>Circle</string>
</property>
<attribute name="buttonGroup">
<string>buttonGroup</string>
</attribute>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Properties</string>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>Period</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="periodSpinBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="minimum">
<double>-1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>-1.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="amplitudeSpinBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="minimum">
<double>-1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>-1.000000000000000</double>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_3">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>Overshoot</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QDoubleSpinBox" name="overshootSpinBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="minimum">
<double>-1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>-1.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>Amplitude</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="1">
<widget class="QGraphicsView" name="graphicsView">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
<buttongroups>
<buttongroup name="buttonGroup"/>
</buttongroups>
</ui>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

136
animation/easing/ui_form.py Normal file
View File

@@ -0,0 +1,136 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'form.ui'
#
# Created: Thu May 2 16:46:55 2013
# by: PyQt5 UI code generator snapshot-5.0-e46cc7cf20da
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(545, 471)
self.gridLayout = QtWidgets.QGridLayout(Form)
self.gridLayout.setObjectName("gridLayout")
self.easingCurvePicker = QtWidgets.QListWidget(Form)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.easingCurvePicker.sizePolicy().hasHeightForWidth())
self.easingCurvePicker.setSizePolicy(sizePolicy)
self.easingCurvePicker.setMaximumSize(QtCore.QSize(16777215, 120))
self.easingCurvePicker.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.easingCurvePicker.setMovement(QtWidgets.QListView.Static)
self.easingCurvePicker.setProperty("isWrapping", False)
self.easingCurvePicker.setViewMode(QtWidgets.QListView.IconMode)
self.easingCurvePicker.setSelectionRectVisible(False)
self.easingCurvePicker.setObjectName("easingCurvePicker")
self.gridLayout.addWidget(self.easingCurvePicker, 0, 0, 1, 2)
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.groupBox_2 = QtWidgets.QGroupBox(Form)
self.groupBox_2.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.groupBox_2.setObjectName("groupBox_2")
self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_2)
self.gridLayout_2.setObjectName("gridLayout_2")
self.lineRadio = QtWidgets.QRadioButton(self.groupBox_2)
self.lineRadio.setMaximumSize(QtCore.QSize(16777215, 40))
self.lineRadio.setLayoutDirection(QtCore.Qt.LeftToRight)
self.lineRadio.setChecked(True)
self.lineRadio.setObjectName("lineRadio")
self.buttonGroup = QtWidgets.QButtonGroup(Form)
self.buttonGroup.setObjectName("buttonGroup")
self.buttonGroup.addButton(self.lineRadio)
self.gridLayout_2.addWidget(self.lineRadio, 0, 0, 1, 1)
self.circleRadio = QtWidgets.QRadioButton(self.groupBox_2)
self.circleRadio.setMaximumSize(QtCore.QSize(16777215, 40))
self.circleRadio.setObjectName("circleRadio")
self.buttonGroup.addButton(self.circleRadio)
self.gridLayout_2.addWidget(self.circleRadio, 1, 0, 1, 1)
self.verticalLayout.addWidget(self.groupBox_2)
self.groupBox = QtWidgets.QGroupBox(Form)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
self.groupBox.setSizePolicy(sizePolicy)
self.groupBox.setObjectName("groupBox")
self.formLayout = QtWidgets.QFormLayout(self.groupBox)
self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
self.formLayout.setObjectName("formLayout")
self.label = QtWidgets.QLabel(self.groupBox)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy)
self.label.setMinimumSize(QtCore.QSize(0, 30))
self.label.setObjectName("label")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label)
self.periodSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox)
self.periodSpinBox.setEnabled(False)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.periodSpinBox.sizePolicy().hasHeightForWidth())
self.periodSpinBox.setSizePolicy(sizePolicy)
self.periodSpinBox.setMinimumSize(QtCore.QSize(0, 30))
self.periodSpinBox.setMinimum(-1.0)
self.periodSpinBox.setSingleStep(0.1)
self.periodSpinBox.setProperty("value", -1.0)
self.periodSpinBox.setObjectName("periodSpinBox")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.periodSpinBox)
self.amplitudeSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox)
self.amplitudeSpinBox.setEnabled(False)
self.amplitudeSpinBox.setMinimumSize(QtCore.QSize(0, 30))
self.amplitudeSpinBox.setMinimum(-1.0)
self.amplitudeSpinBox.setSingleStep(0.1)
self.amplitudeSpinBox.setProperty("value", -1.0)
self.amplitudeSpinBox.setObjectName("amplitudeSpinBox")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.amplitudeSpinBox)
self.label_3 = QtWidgets.QLabel(self.groupBox)
self.label_3.setMinimumSize(QtCore.QSize(0, 30))
self.label_3.setObjectName("label_3")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_3)
self.overshootSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox)
self.overshootSpinBox.setEnabled(False)
self.overshootSpinBox.setMinimumSize(QtCore.QSize(0, 30))
self.overshootSpinBox.setMinimum(-1.0)
self.overshootSpinBox.setSingleStep(0.1)
self.overshootSpinBox.setProperty("value", -1.0)
self.overshootSpinBox.setObjectName("overshootSpinBox")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.overshootSpinBox)
self.label_2 = QtWidgets.QLabel(self.groupBox)
self.label_2.setMinimumSize(QtCore.QSize(0, 30))
self.label_2.setObjectName("label_2")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_2)
self.verticalLayout.addWidget(self.groupBox)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
self.gridLayout.addLayout(self.verticalLayout, 1, 0, 1, 1)
self.graphicsView = QtWidgets.QGraphicsView(Form)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.graphicsView.sizePolicy().hasHeightForWidth())
self.graphicsView.setSizePolicy(sizePolicy)
self.graphicsView.setObjectName("graphicsView")
self.gridLayout.addWidget(self.graphicsView, 1, 1, 1, 1)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Easing curves"))
self.groupBox_2.setTitle(_translate("Form", "Path type"))
self.lineRadio.setText(_translate("Form", "Line"))
self.circleRadio.setText(_translate("Form", "Circle"))
self.groupBox.setTitle(_translate("Form", "Properties"))
self.label.setText(_translate("Form", "Period"))
self.label_3.setText(_translate("Form", "Overshoot"))
self.label_2.setText(_translate("Form", "Amplitude"))

233
animation/moveblocks.py Normal file
View File

@@ -0,0 +1,233 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
from PyQt5.QtCore import (QAbstractTransition, QEasingCurve, QEvent,
QParallelAnimationGroup, QPropertyAnimation, qrand, QRect,
QSequentialAnimationGroup, qsrand, QState, QStateMachine, Qt, QTime,
QTimer)
from PyQt5.QtWidgets import (QApplication, QGraphicsScene, QGraphicsView,
QGraphicsWidget)
class StateSwitchEvent(QEvent):
StateSwitchType = QEvent.User + 256
def __init__(self, rand=0):
super(StateSwitchEvent, self).__init__(StateSwitchEvent.StateSwitchType)
self.m_rand = rand
def rand(self):
return self.m_rand
class QGraphicsRectWidget(QGraphicsWidget):
def paint(self, painter, option, widget):
painter.fillRect(self.rect(), Qt.blue)
class StateSwitchTransition(QAbstractTransition):
def __init__(self, rand):
super(StateSwitchTransition, self).__init__()
self.m_rand = rand
def eventTest(self, event):
return (event.type() == StateSwitchEvent.StateSwitchType and
event.rand() == self.m_rand)
def onTransition(self, event):
pass
class StateSwitcher(QState):
def __init__(self, machine):
super(StateSwitcher, self).__init__(machine)
self.m_stateCount = 0
self.m_lastIndex = 0
def onEntry(self, event):
n = qrand() % self.m_stateCount + 1
while n == self.m_lastIndex:
n = qrand() % self.m_stateCount + 1
self.m_lastIndex = n
self.machine().postEvent(StateSwitchEvent(n))
def onExit(self, event):
pass
def addState(self, state, animation):
self.m_stateCount += 1
trans = StateSwitchTransition(self.m_stateCount)
trans.setTargetState(state)
self.addTransition(trans)
trans.addAnimation(animation)
def createGeometryState(w1, rect1, w2, rect2, w3, rect3, w4, rect4, parent):
result = QState(parent)
result.assignProperty(w1, 'geometry', rect1)
result.assignProperty(w1, 'geometry', rect1)
result.assignProperty(w2, 'geometry', rect2)
result.assignProperty(w3, 'geometry', rect3)
result.assignProperty(w4, 'geometry', rect4)
return result
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
button1 = QGraphicsRectWidget()
button2 = QGraphicsRectWidget()
button3 = QGraphicsRectWidget()
button4 = QGraphicsRectWidget()
button2.setZValue(1)
button3.setZValue(2)
button4.setZValue(3)
scene = QGraphicsScene(0, 0, 300, 300)
scene.setBackgroundBrush(Qt.black)
scene.addItem(button1)
scene.addItem(button2)
scene.addItem(button3)
scene.addItem(button4)
window = QGraphicsView(scene)
window.setFrameStyle(0)
window.setAlignment(Qt.AlignLeft | Qt.AlignTop)
window.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
window.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
machine = QStateMachine()
group = QState()
timer = QTimer()
timer.setInterval(1250)
timer.setSingleShot(True)
group.entered.connect(timer.start)
state1 = createGeometryState(button1, QRect(100, 0, 50, 50), button2,
QRect(150, 0, 50, 50), button3, QRect(200, 0, 50, 50), button4,
QRect(250, 0, 50, 50), group)
state2 = createGeometryState(button1, QRect(250, 100, 50, 50), button2,
QRect(250, 150, 50, 50), button3, QRect(250, 200, 50, 50), button4,
QRect(250, 250, 50, 50), group)
state3 = createGeometryState(button1, QRect(150, 250, 50, 50), button2,
QRect(100, 250, 50, 50), button3, QRect(50, 250, 50, 50), button4,
QRect(0, 250, 50, 50), group)
state4 = createGeometryState(button1, QRect(0, 150, 50, 50), button2,
QRect(0, 100, 50, 50), button3, QRect(0, 50, 50, 50), button4,
QRect(0, 0, 50, 50), group)
state5 = createGeometryState(button1, QRect(100, 100, 50, 50), button2,
QRect(150, 100, 50, 50), button3, QRect(100, 150, 50, 50), button4,
QRect(150, 150, 50, 50), group)
state6 = createGeometryState(button1, QRect(50, 50, 50, 50), button2,
QRect(200, 50, 50, 50), button3, QRect(50, 200, 50, 50), button4,
QRect(200, 200, 50, 50), group)
state7 = createGeometryState(button1, QRect(0, 0, 50, 50), button2,
QRect(250, 0, 50, 50), button3, QRect(0, 250, 50, 50), button4,
QRect(250, 250, 50, 50), group)
group.setInitialState(state1)
animationGroup = QParallelAnimationGroup()
anim = QPropertyAnimation(button4, b'geometry')
anim.setDuration(1000)
anim.setEasingCurve(QEasingCurve.OutElastic)
animationGroup.addAnimation(anim)
subGroup = QSequentialAnimationGroup(animationGroup)
subGroup.addPause(100)
anim = QPropertyAnimation(button3, b'geometry')
anim.setDuration(1000)
anim.setEasingCurve(QEasingCurve.OutElastic)
subGroup.addAnimation(anim)
subGroup = QSequentialAnimationGroup(animationGroup)
subGroup.addPause(150)
anim = QPropertyAnimation(button2, b'geometry')
anim.setDuration(1000)
anim.setEasingCurve(QEasingCurve.OutElastic)
subGroup.addAnimation(anim)
subGroup = QSequentialAnimationGroup(animationGroup)
subGroup.addPause(200)
anim = QPropertyAnimation(button1, b'geometry')
anim.setDuration(1000)
anim.setEasingCurve(QEasingCurve.OutElastic)
subGroup.addAnimation(anim)
stateSwitcher = StateSwitcher(machine)
group.addTransition(timer.timeout, stateSwitcher)
stateSwitcher.addState(state1, animationGroup)
stateSwitcher.addState(state2, animationGroup)
stateSwitcher.addState(state3, animationGroup)
stateSwitcher.addState(state4, animationGroup)
stateSwitcher.addState(state5, animationGroup)
stateSwitcher.addState(state6, animationGroup)
stateSwitcher.addState(state7, animationGroup)
machine.addState(group)
machine.setInitialState(group)
machine.start()
window.resize(300, 300)
window.show()
qsrand(QTime(0, 0, 0).secsTo(QTime.currentTime()))
sys.exit(app.exec_())

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
animation/states/k3b.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
animation/states/kchart.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

272
animation/states/states.py Normal file
View File

@@ -0,0 +1,272 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
from PyQt5.QtCore import (QPointF, QPropertyAnimation, QRect, QRectF,
QSequentialAnimationGroup, QSizeF, QState, QStateMachine, Qt)
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import (QApplication, QGraphicsLinearLayout,
QGraphicsObject, QGraphicsProxyWidget, QGraphicsScene, QGraphicsView,
QGraphicsWidget, QGroupBox, QPushButton, QRadioButton, QTextEdit,
QVBoxLayout)
import states_rc
class Pixmap(QGraphicsObject):
def __init__(self, pix):
super(Pixmap, self).__init__()
self.p = QPixmap(pix)
def paint(self, painter, option, widget):
painter.drawPixmap(QPointF(), self.p)
def boundingRect(self):
return QRectF(QPointF(0, 0), QSizeF(self.p.size()))
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
# Text edit and button.
edit = QTextEdit()
edit.setText("asdf lkjha yuoiqwe asd iuaysd u iasyd uiy "
"asdf lkjha yuoiqwe asd iuaysd u iasyd uiy "
"asdf lkjha yuoiqwe asd iuaysd u iasyd uiy "
"asdf lkjha yuoiqwe asd iuaysd u iasyd uiy!")
button = QPushButton()
buttonProxy = QGraphicsProxyWidget()
buttonProxy.setWidget(button)
editProxy = QGraphicsProxyWidget()
editProxy.setWidget(edit)
box = QGroupBox()
box.setFlat(True)
box.setTitle("Options")
layout2 = QVBoxLayout()
box.setLayout(layout2)
layout2.addWidget(QRadioButton("Herring"))
layout2.addWidget(QRadioButton("Blue Parrot"))
layout2.addWidget(QRadioButton("Petunias"))
layout2.addStretch()
boxProxy = QGraphicsProxyWidget()
boxProxy.setWidget(box)
# Parent widget.
widget = QGraphicsWidget()
layout = QGraphicsLinearLayout(Qt.Vertical, widget)
layout.addItem(editProxy)
layout.addItem(buttonProxy)
widget.setLayout(layout)
p1 = Pixmap(QPixmap(':/digikam.png'))
p2 = Pixmap(QPixmap(':/akregator.png'))
p3 = Pixmap(QPixmap(':/accessories-dictionary.png'))
p4 = Pixmap(QPixmap(':/k3b.png'))
p5 = Pixmap(QPixmap(':/help-browser.png'))
p6 = Pixmap(QPixmap(':/kchart.png'))
scene = QGraphicsScene(0, 0, 400, 300)
scene.setBackgroundBrush(scene.palette().window())
scene.addItem(widget)
scene.addItem(boxProxy)
scene.addItem(p1)
scene.addItem(p2)
scene.addItem(p3)
scene.addItem(p4)
scene.addItem(p5)
scene.addItem(p6)
machine = QStateMachine()
state1 = QState(machine)
state2 = QState(machine)
state3 = QState(machine)
machine.setInitialState(state1)
# State 1.
state1.assignProperty(button, 'text', "Switch to state 2")
state1.assignProperty(widget, 'geometry', QRectF(0, 0, 400, 150))
state1.assignProperty(box, 'geometry', QRect(-200, 150, 200, 150))
state1.assignProperty(p1, 'pos', QPointF(68, 185))
state1.assignProperty(p2, 'pos', QPointF(168, 185))
state1.assignProperty(p3, 'pos', QPointF(268, 185))
state1.assignProperty(p4, 'pos', QPointF(68 - 150, 48 - 150))
state1.assignProperty(p5, 'pos', QPointF(168, 48 - 150))
state1.assignProperty(p6, 'pos', QPointF(268 + 150, 48 - 150))
state1.assignProperty(p1, 'rotation', 0.0)
state1.assignProperty(p2, 'rotation', 0.0)
state1.assignProperty(p3, 'rotation', 0.0)
state1.assignProperty(p4, 'rotation', -270.0)
state1.assignProperty(p5, 'rotation', -90.0)
state1.assignProperty(p6, 'rotation', 270.0)
state1.assignProperty(boxProxy, 'opacity', 0.0)
state1.assignProperty(p1, 'opacity', 1.0)
state1.assignProperty(p2, 'opacity', 1.0)
state1.assignProperty(p3, 'opacity', 1.0)
state1.assignProperty(p4, 'opacity', 0.0)
state1.assignProperty(p5, 'opacity', 0.0)
state1.assignProperty(p6, 'opacity', 0.0)
# State 2.
state2.assignProperty(button, 'text', "Switch to state 3")
state2.assignProperty(widget, 'geometry', QRectF(200, 150, 200, 150))
state2.assignProperty(box, 'geometry', QRect(9, 150, 190, 150))
state2.assignProperty(p1, 'pos', QPointF(68 - 150, 185 + 150))
state2.assignProperty(p2, 'pos', QPointF(168, 185 + 150))
state2.assignProperty(p3, 'pos', QPointF(268 + 150, 185 + 150))
state2.assignProperty(p4, 'pos', QPointF(64, 48))
state2.assignProperty(p5, 'pos', QPointF(168, 48))
state2.assignProperty(p6, 'pos', QPointF(268, 48))
state2.assignProperty(p1, 'rotation', -270.0)
state2.assignProperty(p2, 'rotation', 90.0)
state2.assignProperty(p3, 'rotation', 270.0)
state2.assignProperty(p4, 'rotation', 0.0)
state2.assignProperty(p5, 'rotation', 0.0)
state2.assignProperty(p6, 'rotation', 0.0)
state2.assignProperty(boxProxy, 'opacity', 1.0)
state2.assignProperty(p1, 'opacity', 0.0)
state2.assignProperty(p2, 'opacity', 0.0)
state2.assignProperty(p3, 'opacity', 0.0)
state2.assignProperty(p4, 'opacity', 1.0)
state2.assignProperty(p5, 'opacity', 1.0)
state2.assignProperty(p6, 'opacity', 1.0)
# State 3.
state3.assignProperty(button, 'text', "Switch to state 1")
state3.assignProperty(p1, 'pos', QPointF(0, 5))
state3.assignProperty(p2, 'pos', QPointF(0, 5 + 64 + 5))
state3.assignProperty(p3, 'pos', QPointF(5, 5 + (64 + 5) + 64))
state3.assignProperty(p4, 'pos', QPointF(5 + 64 + 5, 5))
state3.assignProperty(p5, 'pos', QPointF(5 + 64 + 5, 5 + 64 + 5))
state3.assignProperty(p6, 'pos', QPointF(5 + 64 + 5, 5 + (64 + 5) + 64))
state3.assignProperty(widget, 'geometry', QRectF(138, 5, 400 - 138, 200))
state3.assignProperty(box, 'geometry', QRect(5, 205, 400, 90))
state3.assignProperty(p1, 'opacity', 1.0)
state3.assignProperty(p2, 'opacity', 1.0)
state3.assignProperty(p3, 'opacity', 1.0)
state3.assignProperty(p4, 'opacity', 1.0)
state3.assignProperty(p5, 'opacity', 1.0)
state3.assignProperty(p6, 'opacity', 1.0)
t1 = state1.addTransition(button.clicked, state2)
animation1SubGroup = QSequentialAnimationGroup()
animation1SubGroup.addPause(250)
animation1SubGroup.addAnimation(QPropertyAnimation(box, b'geometry', state1))
t1.addAnimation(animation1SubGroup)
t1.addAnimation(QPropertyAnimation(widget, b'geometry', state1))
t1.addAnimation(QPropertyAnimation(p1, b'pos', state1))
t1.addAnimation(QPropertyAnimation(p2, b'pos', state1))
t1.addAnimation(QPropertyAnimation(p3, b'pos', state1))
t1.addAnimation(QPropertyAnimation(p4, b'pos', state1))
t1.addAnimation(QPropertyAnimation(p5, b'pos', state1))
t1.addAnimation(QPropertyAnimation(p6, b'pos', state1))
t1.addAnimation(QPropertyAnimation(p1, b'rotation', state1))
t1.addAnimation(QPropertyAnimation(p2, b'rotation', state1))
t1.addAnimation(QPropertyAnimation(p3, b'rotation', state1))
t1.addAnimation(QPropertyAnimation(p4, b'rotation', state1))
t1.addAnimation(QPropertyAnimation(p5, b'rotation', state1))
t1.addAnimation(QPropertyAnimation(p6, b'rotation', state1))
t1.addAnimation(QPropertyAnimation(p1, b'opacity', state1))
t1.addAnimation(QPropertyAnimation(p2, b'opacity', state1))
t1.addAnimation(QPropertyAnimation(p3, b'opacity', state1))
t1.addAnimation(QPropertyAnimation(p4, b'opacity', state1))
t1.addAnimation(QPropertyAnimation(p5, b'opacity', state1))
t1.addAnimation(QPropertyAnimation(p6, b'opacity', state1))
t2 = state2.addTransition(button.clicked, state3)
t2.addAnimation(QPropertyAnimation(box, b'geometry', state2))
t2.addAnimation(QPropertyAnimation(widget, b'geometry', state2))
t2.addAnimation(QPropertyAnimation(p1, b'pos', state2))
t2.addAnimation(QPropertyAnimation(p2, b'pos', state2))
t2.addAnimation(QPropertyAnimation(p3, b'pos', state2))
t2.addAnimation(QPropertyAnimation(p4, b'pos', state2))
t2.addAnimation(QPropertyAnimation(p5, b'pos', state2))
t2.addAnimation(QPropertyAnimation(p6, b'pos', state2))
t2.addAnimation(QPropertyAnimation(p1, b'rotation', state2))
t2.addAnimation(QPropertyAnimation(p2, b'rotation', state2))
t2.addAnimation(QPropertyAnimation(p3, b'rotation', state2))
t2.addAnimation(QPropertyAnimation(p4, b'rotation', state2))
t2.addAnimation(QPropertyAnimation(p5, b'rotation', state2))
t2.addAnimation(QPropertyAnimation(p6, b'rotation', state2))
t2.addAnimation(QPropertyAnimation(p1, b'opacity', state2))
t2.addAnimation(QPropertyAnimation(p2, b'opacity', state2))
t2.addAnimation(QPropertyAnimation(p3, b'opacity', state2))
t2.addAnimation(QPropertyAnimation(p4, b'opacity', state2))
t2.addAnimation(QPropertyAnimation(p5, b'opacity', state2))
t2.addAnimation(QPropertyAnimation(p6, b'opacity', state2))
t3 = state3.addTransition(button.clicked, state1)
t3.addAnimation(QPropertyAnimation(box, b'geometry', state3))
t3.addAnimation(QPropertyAnimation(widget, b'geometry', state3))
t3.addAnimation(QPropertyAnimation(p1, b'pos', state3))
t3.addAnimation(QPropertyAnimation(p2, b'pos', state3))
t3.addAnimation(QPropertyAnimation(p3, b'pos', state3))
t3.addAnimation(QPropertyAnimation(p4, b'pos', state3))
t3.addAnimation(QPropertyAnimation(p5, b'pos', state3))
t3.addAnimation(QPropertyAnimation(p6, b'pos', state3))
t3.addAnimation(QPropertyAnimation(p1, b'rotation', state3))
t3.addAnimation(QPropertyAnimation(p2, b'rotation', state3))
t3.addAnimation(QPropertyAnimation(p3, b'rotation', state3))
t3.addAnimation(QPropertyAnimation(p4, b'rotation', state3))
t3.addAnimation(QPropertyAnimation(p5, b'rotation', state3))
t3.addAnimation(QPropertyAnimation(p6, b'rotation', state3))
t3.addAnimation(QPropertyAnimation(p1, b'opacity', state3))
t3.addAnimation(QPropertyAnimation(p2, b'opacity', state3))
t3.addAnimation(QPropertyAnimation(p3, b'opacity', state3))
t3.addAnimation(QPropertyAnimation(p4, b'opacity', state3))
t3.addAnimation(QPropertyAnimation(p5, b'opacity', state3))
t3.addAnimation(QPropertyAnimation(p6, b'opacity', state3))
machine.start()
view = QGraphicsView(scene)
view.show()
sys.exit(app.exec_())

View File

@@ -0,0 +1,10 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>accessories-dictionary.png</file>
<file>akregator.png</file>
<file>digikam.png</file>
<file>help-browser.png</file>
<file>k3b.png</file>
<file>kchart.png</file>
</qresource>
</RCC>

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,657 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
import math
from PyQt5.QtCore import (pyqtProperty, pyqtSignal, QDataStream, QDateTime,
QEvent, QEventTransition, QFile, QIODevice, QParallelAnimationGroup,
QPointF, QPropertyAnimation, qrand, QRectF, QSignalTransition, qsrand,
QState, QStateMachine, Qt, QTimer)
from PyQt5.QtGui import QColor, QPen, QPainter, QPainterPath, QPixmap
from PyQt5.QtWidgets import (QApplication, QGraphicsItem, QGraphicsObject,
QGraphicsScene, QGraphicsTextItem, QGraphicsView)
import stickman_rc
class Node(QGraphicsObject):
positionChanged = pyqtSignal()
def __init__(self, pos, parent=None):
super(Node, self).__init__(parent)
self.m_dragging = False
self.setPos(pos)
self.setFlag(QGraphicsItem.ItemSendsGeometryChanges)
def boundingRect(self):
return QRectF(-6.0, -6.0, 12.0, 12.0)
def paint(self, painter, option, widget):
painter.setPen(Qt.white)
painter.drawEllipse(QPointF(0.0, 0.0), 5.0, 5.0)
def itemChange(self, change, value):
if change == QGraphicsItem.ItemPositionChange:
self.positionChanged.emit()
return super(Node, self).itemChange(change, value)
def mousePressEvent(self, event):
self.m_dragging = True
def mouseMoveEvent(self, event):
if self.m_dragging:
self.setPos(self.mapToParent(event.pos()))
def mouseReleaseEvent(self, event):
self.m_dragging = False
Coords = (
# Head: 0
(0.0, -150.0),
# Body pentagon, top->bottom, left->right: 1 - 5
(0.0, -100.0),
(-50.0, -50.0),
(50.0, -50.0),
(-25.0, 50.0),
(25.0, 50.0),
# Right arm: 6 - 7
(-100.0, 0.0),
(-125.0, 50.0),
# Left arm: 8 - 9
(100.0, 0.0),
(125.0, 50.0),
# Lower body: 10 - 11
(-35.0, 75.0),
(35.0, 75.0),
# Right leg: 12 - 13
(-25.0, 200.0),
(-30.0, 300.0),
# Left leg: 14 - 15
(25.0, 200.0),
(30.0, 300.0))
Bones = (
# Neck.
(0, 1),
# Body.
(1, 2),
(1, 3),
(1, 4),
(1, 5),
(2, 3),
(2, 4),
(2, 5),
(3, 4),
(3, 5),
(4, 5),
# Right arm.
(2, 6),
(6, 7),
# Left arm.
(3, 8),
(8, 9),
# Lower body.
(4, 10),
(4, 11),
(5, 10),
(5, 11),
(10, 11),
# Right leg.
(10, 12),
(12, 13),
# Left leg.
(11, 14),
(14, 15))
class StickMan(QGraphicsObject):
def __init__(self):
super(StickMan, self).__init__()
self.m_sticks = True
self.m_isDead = False
self.m_pixmap = QPixmap('images/head.png')
self.m_penColor = QColor(Qt.white)
self.m_fillColor = QColor(Qt.black)
# Set up start position of limbs.
self.m_nodes = []
for x, y in Coords:
node = Node(QPointF(x, y), self)
node.positionChanged.connect(self.childPositionChanged)
self.m_nodes.append(node)
self.m_perfectBoneLengths = []
for n1, n2 in Bones:
node1 = self.m_nodes[n1]
node2 = self.m_nodes[n2]
dist = node1.pos() - node2.pos()
self.m_perfectBoneLengths.append(math.hypot(dist.x(), dist.y()))
self.startTimer(10)
def childPositionChanged(self):
self.prepareGeometryChange()
def setDrawSticks(self, on):
self.m_sticks = on
for node in self.m_nodes:
node.setVisible(on)
def drawSticks(self):
return self.m_sticks
def boundingRect(self):
# Account for head radius of 50.0 plus pen which is 5.0.
return self.childrenBoundingRect().adjusted(-55.0, -55.0, 55.0, 55.0)
def nodeCount(self):
return len(self.m_nodes)
def node(self, idx):
if idx >= 0 and idx < len(self.m_nodes):
return self.m_nodes[idx]
return None
def timerEvent(self, e):
self.update()
def stabilize(self):
threshold = 0.001
for i, (n1, n2) in enumerate(Bones):
node1 = self.m_nodes[n1]
node2 = self.m_nodes[n2]
pos1 = node1.pos()
pos2 = node2.pos()
dist = pos1 - pos2
length = math.hypot(dist.x(), dist.y())
diff = (length - self.m_perfectBoneLengths[i]) / length
p = dist * (0.5 * diff)
if p.x() > threshold and p.y() > threshold:
pos1 -= p
pos2 += p
node1.setPos(pos1)
node2.setPos(pos2)
def posFor(self, idx):
return self.m_nodes[idx].pos()
@pyqtProperty(QColor)
def penColor(self):
return QColor(self.m_penColor)
@penColor.setter
def penColor(self, color):
self.m_penColor = QColor(color)
@pyqtProperty(QColor)
def fillColor(self):
return QColor(self.m_fillColor)
@fillColor.setter
def fillColor(self, color):
self.m_fillColor = QColor(color)
@pyqtProperty(bool)
def isDead(self):
return self.m_isDead
@isDead.setter
def isDead(self, isDead):
self.m_isDead = isDead
def paint(self, painter, option, widget):
self.stabilize()
if self.m_sticks:
painter.setPen(Qt.white)
for n1, n2 in Bones:
node1 = self.m_nodes[n1]
node2 = self.m_nodes[n2]
painter.drawLine(node1.pos(), node2.pos())
else:
# First bone is neck and will be used for head.
path = QPainterPath()
path.moveTo(self.posFor(0))
path.lineTo(self.posFor(1))
# Right arm.
path.lineTo(self.posFor(2))
path.lineTo(self.posFor(6))
path.lineTo(self.posFor(7))
# Left arm.
path.moveTo(self.posFor(3))
path.lineTo(self.posFor(8))
path.lineTo(self.posFor(9))
# Body.
path.moveTo(self.posFor(2))
path.lineTo(self.posFor(4))
path.lineTo(self.posFor(10))
path.lineTo(self.posFor(11))
path.lineTo(self.posFor(5))
path.lineTo(self.posFor(3))
path.lineTo(self.posFor(1))
# Right leg.
path.moveTo(self.posFor(10))
path.lineTo(self.posFor(12))
path.lineTo(self.posFor(13))
# Left leg.
path.moveTo(self.posFor(11))
path.lineTo(self.posFor(14))
path.lineTo(self.posFor(15))
painter.setPen(QPen(self.m_penColor, 5.0, Qt.SolidLine, Qt.RoundCap))
painter.drawPath(path)
n1, n2 = Bones[0]
node1 = self.m_nodes[n1]
node2 = self.m_nodes[n2]
dist = node2.pos() - node1.pos()
sinAngle = dist.x() / math.hypot(dist.x(), dist.y())
angle = math.degrees(math.asin(sinAngle))
headPos = node1.pos()
painter.translate(headPos)
painter.rotate(-angle)
painter.setBrush(self.m_fillColor)
painter.drawEllipse(QPointF(0, 0), 50.0, 50.0)
painter.setBrush(self.m_penColor)
painter.setPen(QPen(self.m_penColor, 2.5, Qt.SolidLine, Qt.RoundCap))
# Eyes.
if self.m_isDead:
painter.drawLine(-30.0, -30.0, -20.0, -20.0)
painter.drawLine(-20.0, -30.0, -30.0, -20.0)
painter.drawLine(20.0, -30.0, 30.0, -20.0)
painter.drawLine(30.0, -30.0, 20.0, -20.0)
else:
painter.drawChord(QRectF(-30.0, -30.0, 25.0, 70.0), 30.0 * 16, 120.0 * 16)
painter.drawChord(QRectF(5.0, -30.0, 25.0, 70.0), 30.0 * 16, 120.0 * 16)
# Mouth.
if self.m_isDead:
painter.drawLine(-28.0, 2.0, 29.0, 2.0)
else:
painter.setBrush(QColor(128, 0, 64 ))
painter.drawChord(QRectF(-28.0, 2.0 - 55.0 / 2.0, 57.0, 55.0), 0.0, -180.0 * 16)
# Pupils.
if not self.m_isDead:
painter.setPen(QPen(self.m_fillColor, 1.0, Qt.SolidLine, Qt.RoundCap))
painter.setBrush(self.m_fillColor)
painter.drawEllipse(QPointF(-12.0, -25.0), 5.0, 5.0)
painter.drawEllipse(QPointF(22.0, -25.0), 5.0, 5.0)
class GraphicsView(QGraphicsView):
keyPressed = pyqtSignal(int)
def keyPressEvent(self, e):
if e.key() == Qt.Key_Escape:
self.close()
self.keyPressed.emit(Qt.Key(e.key()))
class Frame(object):
def __init__(self):
self.m_nodePositions = []
def nodeCount(self):
return len(self.m_nodePositions)
def setNodeCount(self, nodeCount):
while nodeCount > len(self.m_nodePositions):
self.m_nodePositions.append(QPointF())
while nodeCount < len(self.m_nodePositions):
self.m_nodePositions.pop()
def nodePos(self, idx):
return QPointF(self.m_nodePositions[idx])
def setNodePos(self, idx, pos):
self.m_nodePositions[idx] = QPointF(pos)
class Animation(object):
def __init__(self):
self.m_currentFrame = 0
self.m_frames = [Frame()]
self.m_name = ''
def setTotalFrames(self, totalFrames):
while len(self.m_frames) < totalFrames:
self.m_frames.append(Frame())
while totalFrames < len(self.m_frames):
self.m_frames.pop()
def totalFrames(self):
return len(self.m_frames)
def setCurrentFrame(self, currentFrame):
self.m_currentFrame = max(min(currentFrame, self.totalFrames() - 1), 0)
def currentFrame(self):
return self.m_currentFrame
def setNodeCount(self, nodeCount):
frame = self.m_frames[self.m_currentFrame]
frame.setNodeCount(nodeCount)
def nodeCount(self):
frame = self.m_frames[self.m_currentFrame]
return frame.nodeCount()
def setNodePos(self, idx, pos):
frame = self.m_frames[self.m_currentFrame]
frame.setNodePos(idx, pos)
def nodePos(self, idx):
frame = self.m_frames[self.m_currentFrame]
return frame.nodePos(idx)
def name(self):
return self.m_name
def setName(self, name):
self.m_name = name
def save(self, device):
stream = QDataStream(device)
stream.writeQString(self.m_name)
stream.writeInt(len(self.m_frames))
for frame in self.m_frames:
stream.writeInt(frame.nodeCount())
for i in range(frame.nodeCount()):
stream << frame.nodePos(i)
def load(self, device):
self.m_frames = []
stream = QDataStream(device)
self.m_name = stream.readQString()
frameCount = stream.readInt()
for i in range(frameCount):
nodeCount = stream.readInt()
frame = Frame()
frame.setNodeCount(nodeCount)
for j in range(nodeCount):
pos = QPointF()
stream >> pos
frame.setNodePos(j, pos)
self.m_frames.append(frame)
class KeyPressTransition(QSignalTransition):
def __init__(self, receiver, key, target=None):
super(KeyPressTransition, self).__init__(receiver.keyPressed)
self.m_key = key
if target is not None:
self.setTargetState(target)
def eventTest(self, e):
if super(KeyPressTransition, self).eventTest(e):
key = e.arguments()[0]
return key == self.m_key
return False
class LightningStrikesTransition(QEventTransition):
def __init__(self, target):
super(LightningStrikesTransition, self).__init__()
self.setEventSource(self)
self.setEventType(QEvent.Timer)
self.setTargetState(target)
qsrand(QDateTime.currentDateTime().toTime_t())
self.startTimer(1000)
def eventTest(self, e):
return (super(LightningStrikesTransition, self).eventTest(e) and
(qrand() % 50) == 0)
class LifeCycle(object):
def __init__(self, stickMan, keyReceiver):
self.m_stickMan = stickMan
self.m_keyReceiver = keyReceiver
# Create animation group to be used for all transitions.
self.m_animationGroup = QParallelAnimationGroup()
stickManNodeCount = self.m_stickMan.nodeCount()
self._pas = []
for i in range(stickManNodeCount):
pa = QPropertyAnimation(self.m_stickMan.node(i), b'pos')
self._pas.append(pa)
self.m_animationGroup.addAnimation(pa)
# Set up intial state graph.
self.m_machine = QStateMachine()
self.m_machine.addDefaultAnimation(self.m_animationGroup)
self.m_alive = QState(self.m_machine)
self.m_alive.setObjectName('alive')
# Make it blink when lightning strikes before entering dead animation.
lightningBlink = QState(self.m_machine)
lightningBlink.assignProperty(self.m_stickMan.scene(),
'backgroundBrush', Qt.white)
lightningBlink.assignProperty(self.m_stickMan, 'penColor', Qt.black)
lightningBlink.assignProperty(self.m_stickMan, 'fillColor', Qt.white)
lightningBlink.assignProperty(self.m_stickMan, 'isDead', True)
timer = QTimer(lightningBlink)
timer.setSingleShot(True)
timer.setInterval(100)
lightningBlink.entered.connect(timer.start)
lightningBlink.exited.connect(timer.stop)
self.m_dead = QState(self.m_machine)
self.m_dead.assignProperty(self.m_stickMan.scene(), 'backgroundBrush',
Qt.black)
self.m_dead.assignProperty(self.m_stickMan, 'penColor', Qt.white)
self.m_dead.assignProperty(self.m_stickMan, 'fillColor', Qt.black)
self.m_dead.setObjectName('dead')
# Idle state (sets no properties).
self.m_idle = QState(self.m_alive)
self.m_idle.setObjectName('idle')
self.m_alive.setInitialState(self.m_idle)
# Lightning strikes at random.
self.m_alive.addTransition(LightningStrikesTransition(lightningBlink))
lightningBlink.addTransition(timer.timeout, self.m_dead)
self.m_machine.setInitialState(self.m_alive)
def setDeathAnimation(self, fileName):
deathAnimation = self.makeState(self.m_dead, fileName)
self.m_dead.setInitialState(deathAnimation)
def start(self):
self.m_machine.start()
def addActivity(self, fileName, key):
state = self.makeState(self.m_alive, fileName)
self.m_alive.addTransition(KeyPressTransition(self.m_keyReceiver, key, state))
def makeState(self, parentState, animationFileName):
topLevel = QState(parentState)
animation = Animation()
file = QFile(animationFileName)
if file.open(QIODevice.ReadOnly):
animation.load(file)
frameCount = animation.totalFrames()
previousState = None
for i in range(frameCount):
animation.setCurrentFrame(i)
frameState = QState(topLevel)
nodeCount = animation.nodeCount()
for j in range(nodeCount):
frameState.assignProperty(self.m_stickMan.node(j), 'pos',
animation.nodePos(j))
frameState.setObjectName('frame %d' % i)
if previousState is None:
topLevel.setInitialState(frameState)
else:
previousState.addTransition(previousState.propertiesAssigned,
frameState)
previousState = frameState
previousState.addTransition(previousState.propertiesAssigned,
topLevel.initialState())
return topLevel
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
stickMan = StickMan()
stickMan.setDrawSticks(False)
textItem = QGraphicsTextItem()
textItem.setHtml("<font color=\"white\"><b>Stickman</b>"
"<p>"
"Tell the stickman what to do!"
"</p>"
"<p><i>"
"<li>Press <font color=\"purple\">J</font> to make the stickman jump.</li>"
"<li>Press <font color=\"purple\">D</font> to make the stickman dance.</li>"
"<li>Press <font color=\"purple\">C</font> to make him chill out.</li>"
"<li>When you are done, press <font color=\"purple\">Escape</font>.</li>"
"</i></p>"
"<p>If he is unlucky, the stickman will get struck by lightning, and never jump, dance or chill out again."
"</p></font>")
w = textItem.boundingRect().width()
stickManBoundingRect = stickMan.mapToScene(stickMan.boundingRect()).boundingRect()
textItem.setPos(-w / 2.0, stickManBoundingRect.bottom() + 25.0)
scene = QGraphicsScene()
scene.addItem(stickMan)
scene.addItem(textItem)
scene.setBackgroundBrush(Qt.black)
view = GraphicsView()
view.setRenderHints(QPainter.Antialiasing)
view.setTransformationAnchor(QGraphicsView.NoAnchor)
view.setScene(scene)
view.show()
view.setFocus()
# Make enough room in the scene for stickman to jump and die.
sceneRect = scene.sceneRect()
view.resize(sceneRect.width() + 100, sceneRect.height() + 100)
view.setSceneRect(sceneRect)
cycle = LifeCycle(stickMan, view)
cycle.setDeathAnimation(':/animations/dead')
cycle.addActivity(':/animations/jumping', Qt.Key_J)
cycle.addActivity(':/animations/dancing', Qt.Key_D)
cycle.addActivity(':/animations/chilling', Qt.Key_C)
cycle.start()
sys.exit(app.exec_())

View File

@@ -0,0 +1,8 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>animations/chilling</file>
<file>animations/dancing</file>
<file>animations/dead</file>
<file>animations/jumping</file>
</qresource>
</RCC>

View File

@@ -0,0 +1,714 @@
# -*- coding: utf-8 -*-
# Resource object code
#
# Created: Thu May 2 17:29:21 2013
# by: The Resource Compiler for PyQt (Qt v5.0.2)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x19\x6c\
\xff\
\xff\xff\xff\x00\x00\x00\x19\x00\x00\x00\x10\x40\x38\x4c\xca\x3f\
\x4a\x24\xde\xc0\x62\x97\x1b\x32\x01\x5d\xf3\x40\x3a\x05\x25\x01\
\xce\x14\x45\xc0\x58\xb0\x20\xdd\x20\x86\x54\xc0\x40\xc3\x31\xca\
\x2d\xe7\xe8\xc0\x4e\x4e\xc6\x85\x2f\x62\xd8\x40\x50\x0a\x03\xb2\
\x01\xc4\x5d\xc0\x43\x9a\x8e\xca\x3e\xac\x2f\xc0\x3e\x83\x6a\xb1\
\x60\x3b\xb1\x40\x45\x35\x2f\x6e\x30\x18\x5c\x40\x32\x53\x99\xcb\
\xc5\x8d\xfc\x40\x4a\x8f\xc7\x9e\xd3\xec\x98\xc0\x44\x7e\x7d\xc3\
\xb1\x2d\x7e\xc0\x60\x5d\xcb\xb7\xd6\xde\xd5\x40\x22\xa2\xe4\x37\
\x5a\x12\x12\xc0\x63\x69\xe1\x79\x61\x98\x47\x40\x50\x78\x0c\x5a\
\xfa\x18\xc4\xc0\x5b\x79\x6e\x7b\xba\xd3\x77\x40\x3c\x78\x0c\xfd\
\x1b\x24\x7a\xc0\x62\xee\x0e\xa0\x41\x5e\x50\xc0\x46\xd1\x51\x1c\
\xc7\x57\xf6\x40\x50\x2c\x59\x00\x05\x07\x96\x40\x36\xbd\x5a\xba\
\x55\x33\x3c\x40\x53\xeb\xd5\xdc\x95\x84\x02\xc0\x64\x7c\xe6\xa7\
\x82\xd4\x73\x40\x5a\x98\x3a\x9d\x99\xd2\x25\xc0\x67\x9f\x24\xfc\
\xa8\x8b\x88\x40\x69\x6a\x0c\xdc\x04\x07\xad\x40\x61\x88\x18\xa6\
\x50\x33\xdf\x40\x5e\xdc\xf7\xac\x43\x1d\x93\x40\x60\xa1\xe2\xfa\
\x78\x8e\x27\x40\x6b\xea\x33\x3e\x3c\x8e\x55\x00\x00\x00\x10\x40\
\x38\x4c\xcb\x75\x7c\x04\xe4\xc0\x62\x97\x16\xcb\x46\x05\x9e\x40\
\x3a\x04\xf9\x90\xa0\xa1\x90\xc0\x58\xb0\x1c\x43\xe6\x16\xc6\xc0\
\x40\xc3\x37\x29\xb0\xad\x71\xc0\x4e\x4e\xa0\x29\xf8\xaf\x63\x40\
\x50\x0a\x04\xf7\x7a\x75\xf9\xc0\x43\x9a\xa3\xc7\xff\x8e\xe7\xc0\
\x3e\x83\x24\xc7\x88\x06\x31\x40\x45\x35\x0f\x82\x42\x98\x23\x40\
\x32\x53\xbe\x35\xfa\x10\xf1\x40\x4a\x8f\xeb\x86\x7e\xa9\xe7\xc0\
\x44\x7e\x73\x44\xb1\xe1\x51\xc0\x60\x5d\xc2\x5a\x55\xc7\x63\x40\
\x22\xa2\xcb\x69\x59\x50\x4d\xc0\x63\x69\xe0\xb9\x0f\x32\xde\x40\
\x50\x78\x10\xb9\x1c\xd7\xaa\xc0\x5b\x79\x7a\x66\xb3\x79\x6b\x40\
\x3c\x77\xfd\x1b\x3d\x06\x10\xc0\x62\xee\x10\xd4\xaa\xf0\xf0\xc0\
\x46\xd1\x4e\xde\x36\xe2\x04\x40\x50\x2c\x31\x73\xb4\xd5\x4d\x40\
\x36\xbd\x01\xb5\xb5\x00\xbf\x40\x53\xeb\xec\x32\x09\x0f\xf3\xc0\
\x64\x7c\xde\xd4\xf9\xea\x5a\x40\x5a\x98\x39\x7f\xc7\xf1\x43\xc0\
\x67\x9f\x24\x5c\x76\xd5\xf3\x40\x69\x6a\x0a\x70\x9e\x4e\xa4\x40\
\x61\x88\x12\x1f\x05\xdd\x03\x40\x5e\xdc\xf4\xca\xc1\xac\x79\x40\
\x60\xa1\xe3\x0c\x44\xff\x6e\x40\x6b\xea\x32\x47\x27\x58\xb5\x00\
\x00\x00\x10\x40\x38\x4c\xcb\x75\x7c\x04\xe4\xc0\x62\x97\x16\xcb\
\x46\x05\x9e\x40\x3a\x04\xf9\x90\xa0\xa1\x90\xc0\x58\xb0\x1c\x43\
\xe6\x16\xc6\xc0\x40\xc3\x37\x29\xb0\xad\x71\xc0\x4e\x4e\xa0\x29\
\xf8\xaf\x63\x40\x50\x0a\x04\xf7\x7a\x75\xf9\xc0\x43\x9a\xa3\xc7\
\xff\x8e\xe7\xc0\x3e\x83\x24\xc7\x88\x06\x31\x40\x45\x35\x0f\x82\
\x42\x98\x23\x40\x32\x53\xbe\x35\xfa\x10\xf1\x40\x4a\x8f\xeb\x86\
\x7e\xa9\xe7\xc0\x44\x7e\x73\x44\xb1\xe1\x51\xc0\x60\x5d\xc2\x5a\
\x55\xc7\x63\x40\x22\xa2\xcb\x69\x59\x50\x4d\xc0\x63\x69\xe0\xb9\
\x0f\x32\xde\x40\x50\x78\x10\xb9\x1c\xd7\xaa\xc0\x5b\x79\x7a\x66\
\xb3\x79\x6b\x40\x3c\x77\xfd\x1b\x3d\x06\x10\xc0\x62\xee\x10\xd4\
\xaa\xf0\xf0\xc0\x46\xd1\x4e\xde\x36\xe2\x04\x40\x50\x2c\x31\x73\
\xb4\xd5\x4d\x40\x36\xbd\x01\xb5\xb5\x00\xbf\x40\x53\xeb\xec\x32\
\x09\x0f\xf3\xc0\x64\x7c\xde\xd4\xf9\xea\x5a\x40\x5a\x98\x39\x7f\
\xc7\xf1\x43\xc0\x67\x9f\x24\x5c\x76\xd5\xf3\x40\x69\x6a\x0a\x70\
\x9e\x4e\xa4\x40\x61\x88\x12\x1f\x05\xdd\x03\x40\x5e\xdc\xf4\xca\
\xc1\xac\x79\x40\x60\xa1\xe3\x0c\x44\xff\x6e\x40\x6b\xea\x32\x47\
\x27\x58\xb5\x00\x00\x00\x10\x40\x38\x4c\xc9\x02\x38\xef\xcd\xc0\
\x62\x97\x1f\xb1\x2b\xf9\x2a\x40\x3a\x05\x52\xd2\x95\xd7\xab\xc0\
\x58\xb0\x25\xaa\x53\xdb\xfb\xc0\x40\xc3\x2b\xf2\x52\x75\x9c\xc0\
\x4e\x4e\xee\xcf\x9b\x90\x20\x40\x50\x0a\x02\x68\x2b\x0a\x79\xc0\
\x43\x9a\x79\x01\x1a\xe6\xb9\xc0\x3e\x83\xb4\x36\x4e\x91\x1d\x40\
\x45\x35\x51\x17\x06\xbb\x13\x40\x32\x53\x73\x48\x82\xb8\xb3\x40\
\x4a\x8f\xa1\xde\xcc\x91\x1f\xc0\x44\x7e\x88\xc8\x99\xcc\xe3\xc0\
\x60\x5d\xd5\x8c\xe2\xd4\xd6\x40\x22\xa2\xfe\x41\x73\x93\xb3\xc0\
\x63\x69\xe2\x43\x44\x69\xd7\x40\x50\x78\x07\xd5\xb0\x97\xb1\xc0\
\x5b\x79\x62\x25\xed\x42\x8d\x40\x3c\x78\x1d\x6d\x64\xc2\xa2\xc0\
\x62\xee\x0c\x58\x0f\x63\xac\xc0\x46\xd1\x53\xa5\xee\xcf\x4a\x40\
\x50\x2c\x82\x94\x9a\xd5\x79\x40\x36\xbd\xb8\x76\x84\x73\x91\x40\
\x53\xeb\xbe\x59\x7d\x1d\xee\xc0\x64\x7c\xee\xed\xf6\x5d\x09\x40\
\x5a\x98\x3b\xcb\xed\xe6\x6c\xc0\x67\x9f\x25\xa6\x1c\x6e\xe9\x40\
\x69\x6a\x0f\x6b\x3b\xad\xe5\x40\x61\x88\x1f\x86\x72\xb7\xce\x40\
\x5e\xdc\xfa\xb5\x02\x69\xbf\x40\x60\xa1\xe2\xe7\xb9\x5c\x6a\x40\
\x6b\xea\x34\x42\x75\x16\xa6\x00\x00\x00\x10\x40\x38\x4c\xc8\xf1\
\x73\x46\x04\xc0\x62\x97\x1f\xee\x0c\xf5\x37\x40\x3a\x05\x55\x49\
\x9a\x94\xdf\xc0\x58\xb0\x25\xec\x1f\xd6\x66\xc0\x40\xc3\x2b\xa0\
\x8b\xcc\x68\xc0\x4e\x4e\xf0\xf9\x4c\x7d\xc5\x40\x50\x0a\x02\x56\
\xcf\x1b\x74\xc0\x43\x9a\x77\xd7\x9d\x67\xb9\xc0\x3e\x83\xb8\x29\
\x68\x18\xac\x40\x45\x35\x52\xe6\x88\x0c\x08\x40\x32\x53\x71\x35\
\x56\x27\xbe\x40\x4a\x8f\x9f\xd7\xb3\x3a\x64\xc0\x44\x7e\x89\x5f\
\xfb\xd6\xa6\xc0\x60\x5d\xd6\x13\xf6\xcd\x94\x40\x22\xa2\xff\xa7\
\x2c\xa7\x01\xc0\x63\x69\xe2\x4e\x19\xcc\x87\x40\x50\x78\x07\x98\
\x0d\x09\xcb\xc0\x5b\x79\x61\x7d\xbc\xc0\x33\x40\x3c\x78\x1e\x4d\
\x88\xf4\x35\xc0\x62\xee\x0c\x38\xf1\xc4\xe8\xc0\x46\xd1\x53\xca\
\x0b\x08\xfb\x40\x50\x2c\x84\xd0\x5d\x55\x8c\x40\x36\xbd\xbd\x80\
\x5a\xad\x4a\x40\x53\xeb\xbd\x15\xf5\x07\xab\xc0\x64\x7c\xef\x60\
\x1c\x2f\x98\x40\x5a\x98\x3b\xdc\x37\xef\xe9\xc0\x67\x9f\x25\xaf\
\x3d\xbf\xd4\x40\x69\x6a\x0f\x8e\x89\x77\x9f\x40\x61\x88\x1f\xe5\
\x0f\x7e\xd1\x40\x5e\xdc\xfa\xde\xc3\x4f\x44\x40\x60\xa1\xe2\xe6\
\xb7\x5f\xeb\x40\x6b\xea\x34\x50\x71\xf2\x5e\x00\x00\x00\x10\x40\
\x38\x4c\xc8\xe4\xe9\x4a\xe6\xc0\x62\x97\x20\x1b\x90\x2c\x4f\x40\
\x3a\x05\x57\x22\x0c\x24\x7d\xc0\x58\xb0\x26\x1d\x5d\x86\x5d\xc0\
\x40\xc3\x2b\x63\x3b\xcf\x8c\xc0\x4e\x4e\xf2\x97\xc3\x66\xc7\x40\
\x50\x0a\x02\x49\xd6\x8c\x4d\xc0\x43\x9a\x76\xf9\x0d\x28\xdf\xc0\
\x3e\x83\xbb\x1e\x53\x10\x07\x40\x45\x35\x54\x41\x8c\xf4\x10\x40\
\x32\x53\x6f\xa7\x9a\x5e\xd5\x40\x4a\x8f\x9e\x53\x1a\xe6\x20\xc0\
\x44\x7e\x89\xd1\x4c\x49\xec\xc0\x60\x5d\xd6\x79\x12\xe1\x41\x40\
\x22\xa3\x00\xb2\xf0\x65\xf7\xc0\x63\x69\xe2\x56\x35\xbe\x3d\x40\
\x50\x78\x07\x69\xf1\x50\x4e\xc0\x5b\x79\x60\xff\xec\xcb\x67\x40\
\x3c\x78\x1e\xf5\x33\x9c\xb3\xc0\x62\xee\x0c\x21\xab\x29\xe4\xc0\
\x46\xd1\x53\xe5\x27\x99\x97\x40\x50\x2c\x86\x7c\x61\xad\xa6\x40\
\x36\xbd\xc1\x45\xf8\xa0\x3f\x40\x53\xeb\xbc\x23\xbf\xbf\x32\xc0\
\x64\x7c\xef\xb5\x95\x62\x2d\x40\x5a\x98\x3b\xe8\x6a\x6d\xa5\xc0\
\x67\x9f\x25\xb6\x13\xea\x8f\x40\x69\x6a\x0f\xa8\xf8\xea\x0c\x40\
\x61\x88\x20\x2b\xe3\xfb\xb4\x40\x5e\xdc\xfa\xfe\x05\x65\x16\x40\
\x60\xa1\xe2\xe5\xf6\x3c\x86\x40\x6b\xea\x34\x5a\xea\xb2\xfe\x00\
\x00\x00\x10\x40\x38\x4c\xc8\xd4\x84\xf3\x4d\xc0\x62\x97\x20\x57\
\x0f\x3b\xd7\x40\x3a\x05\x59\x8c\x8a\x5e\xce\xc0\x58\xb0\x26\x5d\
\xcd\x2f\x15\xc0\x40\xc3\x2b\x12\xda\xcc\x87\xc0\x4e\x4e\xf4\xb6\
\x3e\xa1\x52\x40\x50\x0a\x02\x38\xe4\x10\x8c\xc0\x43\x9a\x75\xd5\
\xe6\xa1\x5c\xc0\x3e\x83\xbe\xfd\x1d\x6c\x0f\x40\x45\x35\x56\x07\
\xd6\x3e\xb6\x40\x32\x53\x6d\x9e\xdc\x7b\x7c\x40\x4a\x8f\x9c\x56\
\x73\x8e\x7b\xc0\x44\x7e\x8a\x65\x9b\x9a\xc2\xc0\x60\x5d\xd6\xfd\
\x68\xf0\x6a\x40\x22\xa3\x02\x11\x65\xf2\x80\xc0\x63\x69\xe2\x60\
\xd2\xcd\x1f\x40\x50\x78\x07\x2d\xa2\x09\x53\xc0\x5b\x79\x60\x5b\
\x5c\xc5\x6c\x40\x3c\x78\x1f\xd0\x82\x80\xbc\xc0\x62\xee\x0c\x03\
\x39\x4a\xd4\xc0\x46\xd1\x54\x08\xbe\xbb\x9e\x40\x50\x2c\x88\xac\
\xa3\x4c\x7c\x40\x36\xbd\xc6\x35\xfc\x61\x64\x40\x53\xeb\xba\xe6\
\xb1\x05\x48\xc0\x64\x7c\xf0\x25\x7e\x80\x23\x40\x5a\x98\x3b\xf8\
\x62\xb1\x2e\xc0\x67\x9f\x25\xbf\x07\x67\xde\x40\x69\x6a\x0f\xcb\
\x95\x87\xec\x40\x61\x88\x20\x88\x9b\xc5\x2f\x40\x5e\xdc\xfb\x26\
\xf0\x4e\x91\x40\x60\xa1\xe2\xe4\xf9\x69\xcb\x40\x6b\xea\x34\x68\
\x9f\xdc\x0a\x00\x00\x00\x10\x40\x38\x4c\xc8\xcf\x45\x6d\x70\xc0\
\x62\x97\x20\x6a\x1b\x9c\x23\x40\x3a\x05\x5a\x52\xc4\x7b\x1c\xc0\
\x58\xb0\x26\x72\x72\x66\xea\xc0\x40\xc3\x2a\xf9\x10\xed\xb9\xc0\
\x4e\x4e\xf5\x64\x15\x69\xb0\x40\x50\x0a\x02\x33\x77\xa5\x56\xc0\
\x43\x9a\x75\x78\xa3\x77\x6b\xc0\x3e\x83\xc0\x3a\xa2\x9b\x18\x40\
\x45\x35\x56\x99\x6e\xfb\xd2\x40\x32\x53\x6c\xf7\xf3\x6f\x59\x40\
\x4a\x8f\x9b\xb3\x71\xd9\x7e\xc0\x44\x7e\x8a\x95\x22\x08\xc3\xc0\
\x60\x5d\xd7\x27\xd0\xff\x24\x40\x22\xa3\x02\x81\xb3\x6a\x1c\xc0\
\x63\x69\xe2\x64\x39\x77\x1e\x40\x50\x78\x07\x1a\x50\xf1\xd4\xc0\
\x5b\x79\x60\x26\xa7\x76\x2b\x40\x3c\x78\x20\x16\xc0\xae\xfd\xc0\
\x62\xee\x0b\xf9\x78\xf7\x9a\xc0\x46\xd1\x54\x14\x2c\xd4\x30\x40\
\x50\x2c\x89\x60\x2e\x92\x45\x40\x36\xbd\xc7\xcb\x13\x78\x86\x40\
\x53\xeb\xba\x81\x14\xb0\x4f\xc0\x64\x7c\xf0\x49\x5d\x6b\x81\x40\
\x5a\x98\x3b\xfd\x81\x19\xae\xc0\x67\x9f\x25\xc1\xe5\xe5\x65\x40\
\x69\x6a\x0f\xd6\xad\x9f\xef\x40\x61\x88\x20\xa6\x52\x94\x24\x40\
\x5e\xdc\xfb\x34\x0d\x4b\xd1\x40\x60\xa1\xe2\xe4\xa8\x63\x78\x40\
\x6b\xea\x34\x6d\x04\x78\x67\x00\x00\x00\x10\x40\x38\x4c\xc8\xc3\
\x53\xf0\xd7\xc0\x62\x97\x20\x95\x74\xbf\xc7\x40\x3a\x05\x5c\x16\
\x3e\x0f\x2d\xc0\x58\xb0\x26\xa1\x74\xe5\x62\xc0\x40\xc3\x2a\xbe\
\x48\x1a\xc9\xc0\x4e\x4e\xf6\xef\xf7\x35\xd6\x40\x50\x0a\x02\x27\
\x21\x30\x73\xc0\x43\x9a\x74\xa4\x51\xd1\x0d\xc0\x3e\x83\xc3\x0d\
\xc2\x0e\xf4\x40\x45\x35\x57\xe5\x09\x34\x5f\x40\x32\x53\x6b\x7b\
\xc7\x91\x61\x40\x4a\x8f\x9a\x40\x37\x7d\xc1\xc0\x44\x7e\x8b\x01\
\x5c\x12\x71\xc0\x60\x5d\xd7\x88\x63\x00\x6f\x40\x22\xa3\x03\x81\
\x71\x1e\xdd\xc0\x63\x69\xe2\x6b\xf8\x2e\x8c\x40\x50\x78\x06\xee\
\x57\xe8\x39\xc0\x5b\x79\x5f\xae\xab\x35\x22\x40\x3c\x78\x20\xb6\
\xa7\x72\x0b\xc0\x62\xee\x0b\xe3\x46\x4f\xd6\xc0\x46\xd1\x54\x2e\
\x40\x0a\x1b\x40\x50\x2c\x8a\xf9\x12\xa8\xf6\x40\x36\xbd\xcb\x65\
\xa5\xcc\xd1\x40\x53\xeb\xb9\x99\xaa\xcf\x03\xc0\x64\x7c\xf0\x9b\
\x11\xbc\x05\x40\x5a\x98\x3c\x09\x29\xdc\x73\xc0\x67\x9f\x25\xc8\
\x6e\xde\xfd\x40\x69\x6a\x0f\xef\xf2\x9d\x38\x40\x61\x88\x20\xe9\
\xfe\xa9\x62\x40\x5e\xdc\xfb\x51\xea\xa9\x9f\x40\x60\xa1\xe2\xe3\
\xef\xdb\xd6\x40\x6b\xea\x34\x77\x05\xb5\xb1\x00\x00\x00\x10\x40\
\x38\x4c\xc8\xc2\x67\xdd\x57\xc0\x62\x97\x20\x98\xcd\x94\x1a\x40\
\x3a\x05\x5c\x39\x1f\x5d\xdb\xc0\x58\xb0\x26\xa5\x16\x7d\x84\xc0\
\x40\xc3\x2a\xb9\xbc\xba\x60\xc0\x4e\x4e\xf7\x0e\x8c\x4a\xb1\x40\
\x50\x0a\x02\x26\x2d\x64\x0a\xc0\x43\x9a\x74\x93\xeb\xe8\x2d\xc0\
\x3e\x83\xc3\x45\x9f\x4d\x2f\x40\x45\x35\x57\xfe\xa7\x9e\xb3\x40\
\x32\x53\x6b\x5e\x68\x2f\x32\x40\x4a\x8f\x9a\x23\x89\xc3\x22\xc0\
\x44\x7e\x8b\x09\xb8\x5e\x6c\xc0\x60\x5d\xd7\x8f\xd8\xc8\x46\x40\
\x22\xa3\x03\x95\x32\xa9\x80\xc0\x63\x69\xe2\x6c\x91\x58\xc3\x40\
\x50\x78\x06\xea\xf2\x89\xaa\xc0\x5b\x79\x5f\xa5\x67\x05\xe0\x40\
\x3c\x78\x20\xc3\x00\xcb\xb0\xc0\x62\xee\x0b\xe1\x8f\x72\x2a\xc0\
\x46\xd1\x54\x30\x44\x61\xe5\x40\x50\x2c\x8b\x18\xa9\x44\x23\x40\
\x36\xbd\xcb\xac\xeb\xcc\x19\x40\x53\xeb\xb9\x87\xca\x0f\x26\xc0\
\x64\x7c\xf0\xa1\x61\xc8\xea\x40\x5a\x98\x3c\x0a\x10\x78\x9d\xc0\
\x67\x9f\x25\xc8\xf0\x21\x1c\x40\x69\x6a\x0f\xf1\xe6\x6c\xcd\x40\
\x61\x88\x20\xef\x39\x09\x1b\x40\x5e\xdc\xfb\x54\x39\x4e\x8a\x40\
\x60\xa1\xe2\xe3\xe1\x9a\x53\x40\x6b\xea\x34\x77\xcb\x94\x20\x00\
\x00\x00\x10\x40\x38\x4c\xc8\xc1\x32\xe4\xf9\xc0\x62\x97\x20\x9d\
\x2e\xf8\xde\x40\x3a\x05\x5c\x66\xc6\xea\x0b\xc0\x58\xb0\x26\xa9\
\xd7\x32\x7d\xc0\x40\xc3\x2a\xb3\xc9\xdf\x14\xc0\x4e\x4e\xf7\x36\
\x93\x96\x7f\x40\x50\x0a\x02\x24\xee\x51\x65\xc0\x43\x9a\x74\x7e\
\x75\x91\x91\xc0\x3e\x83\xc3\x8e\xbe\x00\x43\x40\x45\x35\x58\x20\
\x2f\xea\x4a\x40\x32\x53\x6b\x37\xf6\x02\x6f\x40\x4a\x8f\x99\xfe\
\x00\x4b\x9f\xc0\x44\x7e\x8b\x14\xa9\xbf\x4b\xc0\x60\x5d\xd7\x99\
\x9c\x71\xc0\x40\x22\xa3\x03\xaf\x0e\x58\x32\xc0\x63\x69\xe2\x6d\
\x59\xd1\xf7\x40\x50\x78\x06\xe6\x80\xb1\x85\xc0\x5b\x79\x5f\x99\
\x46\x45\x3d\x40\x3c\x78\x20\xd3\x2a\x6b\xb5\xc0\x62\xee\x0b\xdf\
\x51\x0d\x21\xc0\x46\xd1\x54\x32\xe8\x5b\x66\x40\x50\x2c\x8b\x42\
\x01\xb4\x84\x40\x36\xbd\xcc\x0a\x35\xc8\xee\x40\x53\xeb\xb9\x70\
\x63\x9a\x1b\xc0\x64\x7c\xf0\xa9\xa5\x0c\xbe\x40\x5a\x98\x3c\x0b\
\x3e\x51\xa0\xc0\x67\x9f\x25\xc9\x99\x51\x18\x40\x69\x6a\x0f\xf4\
\x74\xa1\xea\x40\x61\x88\x20\xf6\x10\xd1\x9d\x40\x5e\xdc\xfb\x57\
\x3e\x65\x10\x40\x60\xa1\xe2\xe3\xce\xf1\x84\x40\x6b\xea\x34\x78\
\xce\x91\x2c\x00\x00\x00\x10\x40\x38\x4c\xc8\xc1\x32\xe4\xf9\xc0\
\x62\x97\x20\x9d\x2e\xf8\xde\x40\x3a\x05\x5c\x66\xc6\xea\x0b\xc0\
\x58\xb0\x26\xa9\xd7\x32\x7d\xc0\x40\xc3\x2a\xb3\xc9\xdf\x14\xc0\
\x4e\x4e\xf7\x36\x93\x96\x7f\x40\x50\x0a\x02\x24\xee\x51\x65\xc0\
\x43\x9a\x74\x7e\x75\x91\x91\xc0\x3e\x83\xc3\x8e\xbe\x00\x43\x40\
\x45\x35\x58\x20\x2f\xea\x4a\x40\x32\x53\x6b\x37\xf6\x02\x6f\x40\
\x4a\x8f\x99\xfe\x00\x4b\x9f\xc0\x44\x7e\x8b\x14\xa9\xbf\x4b\xc0\
\x60\x5d\xd7\x99\x9c\x71\xc0\x40\x22\xa3\x03\xaf\x0e\x58\x32\xc0\
\x63\x69\xe2\x6d\x59\xd1\xf7\x40\x50\x78\x06\xe6\x80\xb1\x85\xc0\
\x5b\x79\x5f\x99\x46\x45\x3d\x40\x3c\x78\x20\xd3\x2a\x6b\xb5\xc0\
\x62\xee\x0b\xdf\x51\x0d\x21\xc0\x46\xd1\x54\x32\xe8\x5b\x66\x40\
\x50\x2c\x8b\x42\x01\xb4\x84\x40\x36\xbd\xcc\x0a\x35\xc8\xee\x40\
\x53\xeb\xb9\x70\x63\x9a\x1b\xc0\x64\x7c\xf0\xa9\xa5\x0c\xbe\x40\
\x5a\x98\x3c\x0b\x3e\x51\xa0\xc0\x67\x9f\x25\xc9\x99\x51\x18\x40\
\x69\x6a\x0f\xf4\x74\xa1\xea\x40\x61\x88\x20\xf6\x10\xd1\x9d\x40\
\x5e\xdc\xfb\x57\x3e\x65\x10\x40\x60\xa1\xe2\xe3\xce\xf1\x84\x40\
\x6b\xea\x34\x78\xce\x91\x2c\x00\x00\x00\x10\x40\x38\x4c\xc8\xbf\
\xcf\xfc\x3c\xc0\x62\x97\x20\xa2\x37\x18\xbc\x40\x3a\x05\x5c\x9b\
\x39\x94\x7a\xc0\x58\xb0\x26\xaf\x4c\xea\x97\xc0\x40\xc3\x2a\xac\
\xf4\x31\x63\xc0\x4e\x4e\xf7\x64\x8f\x9a\x25\x40\x50\x0a\x02\x23\
\x7f\xd0\x06\xc0\x43\x9a\x74\x65\xcd\xff\xd0\xc0\x3e\x83\xc3\xe2\
\xbe\x25\x12\x40\x45\x35\x58\x46\xb5\xb3\x85\x40\x32\x53\x6b\x0b\
\xcb\x0d\x92\x40\x4a\x8f\x99\xd2\xe0\xed\x42\xc0\x44\x7e\x8b\x21\
\x3b\xf0\xf6\xc0\x60\x5d\xd7\xa4\xd4\x07\xaf\x40\x22\xa3\x03\xcc\
\xc2\xf6\xcf\xc0\x63\x69\xe2\x6e\x40\x1f\x33\x40\x50\x78\x06\xe1\
\x65\x9e\x9c\xc0\x5b\x79\x5f\x8b\x57\xc0\xf2\x40\x3c\x78\x20\xe5\
\xbb\x6d\x77\xc0\x62\xee\x0b\xdc\xbd\x3a\x54\xc0\x46\xd1\x54\x35\
\xf1\x1f\xf9\x40\x50\x2c\x8b\x71\x81\x27\x09\x40\x36\xbd\xcc\x75\
\x61\x96\xaf\x40\x53\xeb\xb9\x55\x81\xb9\x30\xc0\x64\x7c\xf0\xb3\
\x23\x22\x31\x40\x5a\x98\x3c\x0c\x99\x17\x47\xc0\x67\x9f\x25\xca\
\x5b\xaf\x44\x40\x69\x6a\x0f\xf7\x64\x34\xea\x40\x61\x88\x20\xfd\
\xed\x47\xed\x40\x5e\xdc\xfb\x5a\xb6\x86\x41\x40\x60\xa1\xe2\xe3\
\xb9\x81\xe1\x40\x6b\xea\x34\x79\xf8\x18\x55\x00\x00\x00\x10\x40\
\x38\x4c\xc8\xc0\x4e\x4f\x3d\xc0\x62\x97\x20\xa0\x6c\x9c\x10\x40\
\x3a\x05\x5c\x88\x8e\x66\x1c\xc0\x58\xb0\x26\xad\x5b\x68\x24\xc0\
\x40\xc3\x2a\xaf\x63\x02\x46\xc0\x4e\x4e\xf7\x54\x31\x68\xc3\x40\
\x50\x0a\x02\x24\x02\x43\xaf\xc0\x43\x9a\x74\x6e\x94\x89\x25\xc0\
\x3e\x83\xc3\xc4\xd7\xce\x09\x40\x45\x35\x58\x38\xff\x69\xa6\x40\
\x32\x53\x6b\x1b\x83\xc1\xd0\x40\x4a\x8f\x99\xe2\x3a\x5a\x44\xc0\
\x44\x7e\x8b\x1c\xc2\x70\xf4\xc0\x60\x5d\xd7\xa0\xd5\xe7\x48\x40\
\x22\xa3\x03\xc2\x30\x23\x5c\xc0\x63\x69\xe2\x6d\xee\x25\xab\x40\
\x50\x78\x06\xe3\x36\xdb\x68\xc0\x5b\x79\x5f\x90\x4d\x36\x90\x40\
\x3c\x78\x20\xdf\x1f\xa6\xa9\xc0\x62\xee\x0b\xdd\xa8\x15\x8e\xc0\
\x46\xd1\x54\x34\xdc\x9c\x16\x40\x50\x2c\x8b\x60\x99\x08\x6c\x40\
\x36\xbd\xcc\x4f\x3b\xe3\xde\x40\x53\xeb\xb9\x5f\x13\x4e\xf5\xc0\
\x64\x7c\xf0\xaf\xc2\x25\x0e\x40\x5a\x98\x3c\x0c\x1d\xa8\x48\xc0\
\x67\x9f\x25\xca\x16\x7f\xd6\x40\x69\x6a\x0f\xf6\x58\xaf\x08\x40\
\x61\x88\x20\xfb\x20\xf3\x53\x40\x5e\xdc\xfb\x59\x7a\x65\xa7\x40\
\x60\xa1\xe2\xe3\xc1\x23\x31\x40\x6b\xea\x34\x79\x8e\x30\xd7\x00\
\x00\x00\x10\x40\x38\x4c\xc8\xc0\x24\xc9\x42\xc0\x62\x97\x20\xa1\
\x03\x51\x04\x40\x3a\x05\x5c\x8e\xb1\x4a\x18\xc0\x58\xb0\x26\xad\
\xfe\xf0\x2a\xc0\x40\xc3\x2a\xae\x96\x4c\x84\xc0\x4e\x4e\xf7\x59\
\x92\xb9\xe9\x40\x50\x0a\x02\x23\xd7\x61\x93\xc0\x43\x9a\x74\x6b\
\xb2\x17\xa4\xc0\x3e\x83\xc3\xce\xab\xca\x54\x40\x45\x35\x58\x3d\
\x81\x3f\x26\x40\x32\x53\x6b\x16\x58\xd6\x2c\x40\x4a\x8f\x99\xdd\
\x2e\xc0\x07\xc0\x44\x7e\x8b\x1e\x3a\xf7\xb4\xc0\x60\x5d\xd7\xa2\
\x25\xe0\x7c\x40\x22\xa3\x03\xc5\xa9\xdf\x80\xc0\x63\x69\xe2\x6e\
\x09\x17\x9f\x40\x50\x78\x06\xe2\x9d\xee\x8d\xc0\x5b\x79\x5f\x8e\
\xab\xef\xf2\x40\x3c\x78\x20\xe1\x4b\xbe\x79\xc0\x62\xee\x0b\xdd\
\x5a\xe2\xd6\xc0\x46\xd1\x54\x35\x37\x7f\x10\x40\x50\x2c\x8b\x66\
\x27\xb0\x54\x40\x36\xbd\xcc\x5b\xc5\xe0\xc4\x40\x53\xeb\xb9\x5b\
\xee\x21\x36\xc0\x64\x7c\xf0\xb0\xde\x77\x49\x40\x5a\x98\x3c\x0c\
\x46\x3a\xd9\xc0\x67\x9f\x25\xca\x2d\x3d\x92\x40\x69\x6a\x0f\xf6\
\xb0\x9e\x4b\x40\x61\x88\x20\xfc\x0c\x68\x9b\x40\x5e\xdc\xfb\x59\
\xe2\x4e\xeb\x40\x60\xa1\xe2\xe3\xbe\xa1\x23\x40\x6b\xea\x34\x79\
\xb1\x00\x66\x00\x00\x00\x10\x40\x38\x4c\xc8\xbf\xee\x70\x14\xc0\
\x62\x97\x20\xa1\xc8\x92\x26\x40\x3a\x05\x5c\x96\xb9\x6c\xbd\xc0\
\x58\xb0\x26\xae\xd4\xfb\x26\xc0\x40\xc3\x2a\xad\x8a\x57\xfb\xc0\
\x4e\x4e\xf7\x60\x9d\x78\x70\x40\x50\x0a\x02\x23\x9f\x41\xd1\xc0\
\x43\x9a\x74\x67\xeb\x91\x0b\xc0\x3e\x83\xc3\xdb\x88\xea\x29\x40\
\x45\x35\x58\x43\x67\x7a\x47\x40\x32\x53\x6b\x0f\x95\x49\xb5\x40\
\x4a\x8f\x99\xd6\x94\x32\x19\xc0\x44\x7e\x8b\x20\x27\xcb\x9d\xc0\
\x60\x5d\xd7\xa3\xdd\xa0\x33\x40\x22\xa3\x03\xca\x36\x6d\xdb\xc0\
\x63\x69\xe2\x6e\x2c\x5c\x37\x40\x50\x78\x06\xe1\xd5\xc5\xef\xc0\
\x5b\x79\x5f\x8c\x89\xc7\x6e\x40\x3c\x78\x20\xe4\x23\x98\x6b\xc0\
\x62\xee\x0b\xdc\xf5\xd8\x14\xc0\x46\xd1\x54\x35\xae\x76\x39\x40\
\x50\x2c\x8b\x6d\x6d\xc6\x31\x40\x36\xbd\xcc\x6c\x2f\x5e\xd3\x40\
\x53\xeb\xb9\x57\xd0\x3e\xef\xc0\x64\x7c\xf0\xb2\x52\x9c\x24\x40\
\x5a\x98\x3c\x0c\x7b\x55\xad\xc0\x67\x9f\x25\xca\x4b\x01\x8e\x40\
\x69\x6a\x0f\xf7\x23\xb6\xf6\x40\x61\x88\x20\xfd\x40\x98\x5e\x40\
\x5e\xdc\xfb\x5a\x6a\x50\xcc\x40\x60\xa1\xe2\xe3\xbb\x58\xc4\x40\
\x6b\xea\x34\x79\xde\x90\x91\x00\x00\x00\x10\x40\x38\x4c\xc8\xbf\
\xdd\x05\x9e\xc0\x62\x97\x20\xa2\x07\xc7\xe2\x40\x3a\x05\x5c\x99\
\x4c\x59\xcf\xc0\x58\xb0\x26\xaf\x19\x92\x90\xc0\x40\xc3\x2a\xad\
\x34\x79\x79\xc0\x4e\x4e\xf7\x62\xdf\x2a\xa1\x40\x50\x0a\x02\x23\
\x8d\x45\xef\xc0\x43\x9a\x74\x66\xb5\xd7\xe9\xc0\x3e\x83\xc3\xdf\
\xa8\x34\xb2\x40\x45\x35\x58\x45\x4b\x6f\x42\x40\x32\x53\x6b\x0d\
\x6a\x68\xe4\x40\x4a\x8f\x99\xd4\x76\x73\x36\xc0\x44\x7e\x8b\x20\
\xc5\xb9\x45\xc0\x60\x5d\xd7\xa4\x6a\x8b\x7a\x40\x22\xa3\x03\xcb\
\xab\x9d\x74\xc0\x63\x69\xe2\x6e\x37\xa9\x75\x40\x50\x78\x06\xe1\
\x95\xa1\xdb\xc0\x5b\x79\x5f\x8b\xda\xc3\x2a\x40\x3c\x78\x20\xe5\
\x0c\xd5\xed\xc0\x62\xee\x0b\xdc\xd5\x77\x11\xc0\x46\xd1\x54\x35\
\xd4\x96\x1e\x40\x50\x2c\x8b\x6f\xc2\x7c\x13\x40\x36\xbd\xcc\x71\
\x71\xc0\xb2\x40\x53\xeb\xb9\x56\x7e\x86\x5a\xc0\x64\x7c\xf0\xb2\
\xc9\xdd\x72\x40\x5a\x98\x3c\x0c\x8c\x5a\x33\xc0\x67\x9f\x25\xca\
\x54\x8b\x69\x40\x69\x6a\x0f\xf7\x48\x99\x09\x40\x61\x88\x20\xfd\
\xa3\x5a\xc4\x40\x5e\xdc\xfb\x5a\x95\xe6\x4c\x40\x60\xa1\xe2\xe3\
\xba\x4b\x77\x40\x6b\xea\x34\x79\xed\x2a\x63\x00\x00\x00\x10\x40\
\x38\x4c\xc8\xbf\xa9\x3c\xf7\xc0\x62\x97\x20\xa2\xc3\xba\x2f\x40\
\x3a\x05\x5c\xa0\xf4\xb7\xf1\xc0\x58\xb0\x26\xaf\xe5\x96\xe4\xc0\
\x40\xc3\x2a\xac\x34\xe6\xf4\xc0\x4e\x4e\xf7\x69\x95\xca\xcd\x40\
\x50\x0a\x02\x23\x57\xdb\x46\xc0\x43\x9a\x74\x63\x1c\x4c\x49\xc0\
\x3e\x83\xc3\xeb\xeb\x58\x7a\x40\x45\x35\x58\x4a\xeb\x0b\xde\x40\
\x32\x53\x6b\x06\xf7\xe1\xda\x40\x4a\x8f\x99\xce\x2a\xed\x2d\xc0\
\x44\x7e\x8b\x22\x9b\x7b\xcb\xc0\x60\x5d\xd7\xa6\x0d\xc7\x6c\x40\
\x22\xa3\x03\xd0\x01\xd2\x5f\xc0\x63\x69\xe2\x6e\x59\x48\xae\x40\
\x50\x78\x06\xe0\xd6\xe9\xc6\xc0\x5b\x79\x5f\x89\xd1\xfd\x18\x40\
\x3c\x78\x20\xe7\xc2\xd5\xed\xc0\x62\xee\x0b\xdc\x75\x1f\x54\xc0\
\x46\xd1\x54\x36\x45\xdf\xf2\x40\x50\x2c\x8b\x76\xb1\x88\xd7\x40\
\x36\xbd\xcc\x81\x16\xe5\x42\x40\x53\xeb\xb9\x52\x91\xe6\x77\xc0\
\x64\x7c\xf0\xb4\x2c\x9e\xd1\x40\x5a\x98\x3c\x0c\xbe\x99\x62\xc0\
\x67\x9f\x25\xca\x70\xda\x68\x40\x69\x6a\x0f\xf7\xb6\x0f\x69\x40\
\x61\x88\x20\xfe\xc9\x33\xea\x40\x5e\xdc\xfb\x5b\x17\x3b\x26\x40\
\x60\xa1\xe2\xe3\xb7\x2f\x1f\x40\x6b\xea\x34\x7a\x18\x57\x7f\x00\
\x00\x00\x10\x40\x39\x3a\xfb\x80\x37\xf3\x20\xc0\x61\xfc\xcb\xa3\
\xcd\x26\xb3\x40\x36\xe1\xc0\x3b\x54\x6a\xc7\xc0\x57\x7d\x1f\x83\
\x86\xf3\x1c\xc0\x42\x8a\xc6\x53\xae\xe3\x90\xc0\x4c\x3d\xf4\x90\
\xee\x6c\x3f\x40\x4e\x2d\x2a\x66\xb7\xf4\x4a\xc0\x40\xfe\x98\xb5\
\x59\x0c\x29\xc0\x41\x9c\x26\x3c\x27\x7a\x60\x40\x47\x49\xd1\x47\
\xd2\xac\x49\x40\x2a\xff\x46\x2d\x2a\xf5\xdd\x40\x4c\xe9\x81\x90\
\xd0\x9c\x7c\xc0\x43\xec\x12\xf4\xe3\xc3\x79\xc0\x5f\xc9\x03\x0f\
\xff\x7b\x76\x40\x21\x4c\x2e\x53\x8d\xf5\xb6\xc0\x63\x5e\x70\x2e\
\xf1\x12\x4a\x40\x60\x35\xaf\x9d\x23\xb9\xb3\xc0\x47\xf5\xbd\xee\
\x88\x2b\x80\x40\x5f\x27\xde\x05\x0a\xe0\xcd\xc0\x59\xe5\xec\x76\
\x6e\x20\x9e\xc0\x49\x4b\x2f\xeb\x9c\x1a\x49\x40\x51\x2b\xee\x40\
\x71\xae\x98\x40\x31\x9e\x54\x8b\xa5\x0f\x9e\x40\x55\x1b\xb6\xcb\
\xa1\xcb\x36\xc0\x65\x42\x19\x74\x05\x9a\xf9\x40\x5a\xb0\xf1\x49\
\x6b\xdf\x29\xc0\x67\xab\x60\x4e\xa0\x19\x85\x40\x69\xa0\x71\xdc\
\x2e\x28\xe1\x40\x61\x1f\xc5\xf2\x50\xd7\x8a\x40\x5e\xb5\x77\xa5\
\x7e\x2d\xd8\x40\x60\xa2\xa4\x00\xc9\xca\x1b\x40\x6b\xdc\x49\x66\
\x6f\x08\x2d\x00\x00\x00\x10\x40\x39\x6d\xdd\x13\x57\xa1\xd5\xc0\
\x61\x88\xae\xf7\xb1\x07\xb9\x40\x3d\xcf\xf4\x8d\x6a\x17\x82\xc0\
\x56\x9d\xa9\x7a\xdd\x4a\xee\xc0\x3f\xd1\x0f\xe0\xc8\xca\x1b\xc0\
\x4b\xe5\xb8\x99\x8a\x88\x81\x40\x50\x1e\xc0\x45\x2f\x34\x10\xc0\
\x3c\xd5\xaf\x28\x25\x54\xfa\xc0\x41\x59\xfd\x10\xd6\x49\xbe\x40\
\x47\x9e\x2c\x2b\x96\x3e\x8e\x40\x2a\xe2\xd5\x8c\x54\xd6\x15\x40\
\x4e\x5c\xbb\xef\xb1\x92\x66\xc0\x43\xbf\xfb\xa6\x99\x4b\x21\xc0\
\x5f\x85\x8a\xa8\x9e\x7f\x25\x40\x20\xe3\xcd\x5f\xf2\x68\xe2\xc0\
\x63\x5a\x9f\x77\xe2\x62\x79\x40\x60\xd6\xe3\xac\xcc\x5f\x90\xc0\
\x34\xa5\x13\xa5\x48\xae\xc2\x40\x64\xe3\x80\x6b\x21\x27\x96\xc0\
\x50\x8d\x0b\x23\xa9\xc3\xe4\xc0\x49\x89\xcb\x5b\xbe\x67\xd3\x40\
\x51\x26\xf3\x40\xd2\x0d\xc1\x40\x30\x53\x3d\xec\x2b\xcb\xe3\x40\
\x55\xdf\xb6\x87\x83\x72\xc9\xc0\x65\x50\x90\x7a\x79\xec\x90\x40\
\x5a\xb3\x5d\xfd\x75\x1b\xbb\xc0\x67\xac\x23\x85\x4c\x3e\xc1\x40\
\x69\xa4\x50\xfd\xc1\x1a\xbe\x40\x61\x15\x08\x2c\x04\x80\x35\x40\
\x5e\xb2\x16\xd8\x69\xeb\x99\x40\x60\xa2\xb0\x72\x32\x30\x48\x40\
\x6b\xdb\x00\x4c\xb4\x72\x34\x00\x00\x00\x10\x40\x39\x79\xe6\xd8\
\x96\x75\x3a\xc0\x61\xc0\x16\x90\x87\x0e\xed\x40\x38\x8f\xec\xd9\
\xc7\x51\xb7\xc0\x57\x00\xb8\x99\x9b\x0c\x77\xc0\x42\x03\xf3\x87\
\x9c\x0b\x95\xc0\x4b\xc8\x06\x2f\x17\xcb\x6f\x40\x4e\x81\x5b\x7b\
\x07\x5f\xac\xc0\x3f\x6b\x1b\x49\x9f\xef\xa8\xc0\x41\xf5\x1a\xbf\
\x81\x76\xdc\x40\x47\xc1\xb0\x33\x3e\x15\x87\x40\x29\x35\xe9\x42\
\xe0\x6f\x26\x40\x4d\xcb\x37\x6d\xa6\xc4\xbd\xc0\x43\xc2\xd2\x31\
\x5b\xf1\xae\xc0\x5f\x8b\xf9\x65\x4b\xb3\xb9\x40\x20\xf2\x38\xea\
\x61\xb5\x68\xc0\x63\x5b\x25\xb1\x29\x73\x44\x40\x60\x74\xb0\xf1\
\xaf\x14\x87\xc0\x3c\x2b\x5b\x9f\xd5\xcc\x3a\x40\x5f\xd1\xff\x1a\
\xb3\xb4\x69\xc0\x54\xf9\x9f\x72\x33\xf9\x81\xc0\x49\xd3\xfa\x57\
\xad\xf2\x84\x40\x51\x56\xe6\x30\xad\x36\xf7\x40\x30\x45\x7a\x8e\
\xd7\x55\xf9\x40\x55\x90\xcf\xcc\x04\x2a\x2d\xc0\x65\x6a\x17\x30\
\x58\x3c\xd3\x40\x5a\xb7\x3e\x31\xfb\xc0\xbc\xc0\x67\xad\x5a\x2e\
\xcc\x97\xbb\x40\x69\xaa\xd2\x12\x76\xcf\xc6\x40\x61\x08\x27\xfd\
\xad\x8d\xa9\x40\x5e\xad\xed\x6b\x24\xb9\x5c\x40\x60\xa2\xbe\x9a\
\x9d\xff\x01\x40\x6b\xd9\x5b\x1b\x78\x99\x99\x00\x00\x00\x10\x40\
\x3a\x1c\xba\xdc\xfa\x1a\x5d\xc0\x60\xf5\xc8\x41\xf4\x13\xe6\x40\
\x41\xfa\x03\xbb\xf4\x1d\x4a\xc0\x55\xaa\x26\xe9\xec\x4c\xf0\xc0\
\x3b\x21\x4c\xc6\x54\x3f\x5c\xc0\x4b\x5b\x50\x0c\x7c\x8f\x98\x40\
\x50\xf9\x7f\xcb\x19\x0b\xae\xc0\x37\x93\x4b\x4f\x3b\xf3\x58\xc0\
\x41\x41\x68\xf8\x0c\x13\x54\x40\x48\x0c\x99\x85\x2c\x7f\x15\x40\
\x2a\x01\x64\x6f\x7e\xaa\x70\x40\x4f\xd5\xa4\x26\x6b\xe0\x61\xc0\
\x43\x74\x8b\x1b\xb1\x98\xf2\xc0\x5f\x1b\xe4\x8e\x02\x7c\x6d\x40\
\x20\x42\xe5\x35\xba\xbe\x4c\xc0\x63\x54\x64\xe8\xa8\x03\x5e\x40\
\x61\x53\x48\x12\x1c\xc4\xf0\xc0\x38\x89\xd7\xe7\xcb\xc4\x43\x40\
\x65\x76\x6e\x3f\xaf\x20\x22\xc0\x51\x65\xa7\xda\xaa\x26\x75\xc0\
\x49\xe6\x46\x82\xd0\x24\xb9\x40\x51\x2f\x67\xdc\xf2\x10\xf5\x40\
\x2d\x70\x6e\xe1\xf3\xcb\xfa\x40\x56\xa2\x91\x0e\xe0\x3f\x9d\xc0\
\x65\x68\x72\x72\x08\xfb\x25\x40\x5a\xb7\x12\xd7\xa9\xc0\x26\xc0\
\x67\xad\x49\xf8\x95\x22\x31\x40\x69\xaa\x71\xed\xc5\x2f\x89\x40\
\x60\xfd\xd6\x05\x90\x17\x3d\x40\x5e\xab\x02\x86\x36\xeb\xc5\x40\
\x60\xa2\xc7\x56\x35\x46\xe9\x40\x6b\xd8\x35\x4f\xe4\xc4\x52\x00\
\x00\x00\x10\x40\x3a\x22\xa0\xc0\xc8\x8c\x68\xc0\x61\x7a\xe1\x71\
\x57\xe2\xd0\x40\x37\x88\x57\x2b\xb4\x27\x65\xc0\x56\x7a\x19\x92\
\x2d\x24\x6c\xc0\x42\xaa\x2f\xed\x9b\x21\x34\xc0\x4a\xf4\xa5\x85\
\xef\xfb\x8d\x40\x4d\xc3\xc6\xac\x45\x1a\x79\xc0\x3d\x0b\xa3\xc1\
\xb3\x70\xbf\xc0\x42\xfd\x76\x03\x11\x38\x1a\x40\x48\x95\x81\x53\
\xec\x54\xe6\x40\x24\xe6\xbc\x4c\xf9\xb4\xf7\x40\x4e\xcc\x4f\xe2\
\x80\x6a\x4e\xc0\x43\x7b\x0d\x6e\x7d\x0a\xc0\xc0\x5f\x26\x9b\xe0\
\x90\x2d\x70\x40\x20\x57\xdc\x86\xe0\xd3\xec\xc0\x63\x55\x29\x47\
\x39\xb3\x08\x40\x60\x47\xa0\x6e\xe2\x7b\xe5\xc0\x3d\x8e\x03\x79\
\xb3\xc5\xd8\x40\x59\xf4\xd9\x6e\xa3\x7d\xca\xc0\x53\xb4\xae\x8b\
\xb8\xe6\x2d\xc0\x4a\xf0\xb2\x63\x73\x25\x8f\x40\x51\xb9\x89\xae\
\x4e\xeb\xcd\x40\x2b\xd9\x2c\xa9\xd0\xb1\x70\x40\x56\x13\x03\x84\
\xe7\x17\x50\xc0\x65\xbe\x60\xdc\xb9\x87\x4b\x40\x5a\xc4\x9a\x9e\
\x26\x0d\xb2\xc0\x67\xb0\xd3\x88\x9b\xee\x09\x40\x69\xbf\x4a\x43\
\x04\x51\xc2\x40\x60\xd2\x70\x29\x96\x40\xc4\x40\x5e\x9e\x5d\xed\
\x9c\x03\x41\x40\x60\xa2\xe4\x5f\xbf\xef\x51\x40\x6b\xd2\xd4\x01\
\xf5\xda\x8f\x00\x00\x00\x10\x40\x39\x93\x07\x18\x7c\x00\x57\xc0\
\x61\xed\x38\x48\x04\xf6\x05\x40\x39\xce\xd4\x3d\x16\x4f\xe1\xc0\
\x57\x5a\x79\x80\xd1\xee\x90\xc0\x41\x5a\xb0\x5b\xd9\x84\xa7\xc0\
\x4c\x6b\x4b\xa6\xc5\x05\x67\x40\x4f\x31\x11\x79\x69\xca\xc4\xc0\
\x40\x72\xd8\x87\x3f\x4a\xdb\xc0\x41\x30\x33\x06\x0e\xbd\x6d\x40\
\x47\x1e\x92\xf6\x5f\x87\x9d\x40\x2c\x56\xb7\x92\x4c\x0f\x54\x40\
\x4d\x1a\xcc\x86\x22\xf3\x62\xc0\x43\xed\x68\x86\x6d\xf1\xf7\xc0\
\x5f\xd7\x21\x49\x55\x4f\x8d\x40\x21\x78\xc7\xca\xdd\xae\x33\xc0\
\x63\x60\x08\x68\x37\x94\x7d\x40\x55\x61\x16\x46\xec\xb7\xbc\xc0\
\x58\xed\xdd\x9f\xdd\x31\xf6\x40\x4d\x34\xd5\x5d\xce\x73\x18\xc0\
\x62\x93\x74\x7f\x87\x8c\xe0\xc0\x49\x09\x16\x63\x43\xbe\xc4\x40\
\x51\x07\x88\xc1\x11\x6b\x6e\x40\x31\xe4\xaf\x64\x08\xd2\xab\x40\
\x55\x38\x17\x72\x80\xb5\xac\xc0\x65\x2c\x52\x57\x7f\x38\xd6\x40\
\x5a\xad\x44\x85\x31\xfe\xd5\xc0\x67\xaa\x28\xdf\x87\x91\xd0\x40\
\x69\x9a\x80\x20\x4d\x49\x84\x40\x61\x2c\x4a\x92\x0c\x64\x0a\x40\
\x5e\xba\x92\xb8\xd5\x32\x10\x40\x60\xa2\x8e\x79\x47\xf5\xf0\x40\
\x6b\xde\x52\x7b\xcd\xff\x76\x00\x00\x00\x10\x40\x39\xa0\x87\x98\
\xb8\xe0\xec\xc0\x62\x2e\x9b\xf4\x0c\x9a\x1f\x40\x38\x3b\x99\x1e\
\x7f\x21\x57\xc0\x57\xde\x76\x78\x0a\x75\x02\xc0\x41\xdb\xc9\xce\
\x7f\xdb\x4c\xc0\x4c\xfd\x56\x17\x6b\xc4\x02\x40\x4e\xdd\x63\x67\
\xe8\x83\x36\xc0\x41\xc3\x56\x92\x55\x6f\xcc\xc0\x40\xe7\x7e\x05\
\xfc\x43\x82\x40\x46\x8a\x57\x00\x41\xd6\xd1\x40\x2d\xd4\x62\x54\
\xe0\x04\x59\x40\x4c\x27\x56\xc2\xcd\x8b\x08\xc0\x42\x5a\xf0\x4d\
\x5a\xcb\xe6\xc0\x60\x15\xda\x3c\x46\xaf\x80\x40\x2e\xe6\x21\xc4\
\x8c\x1a\x04\xc0\x62\x99\x50\xe9\xf4\x73\xa0\x40\x50\x8a\xee\x4b\
\xfe\x05\x2c\xc0\x5a\x86\x37\xad\x7c\x15\x19\x40\x3e\x0c\x8f\x47\
\x89\x42\x31\xc0\x62\x98\x5b\xa9\x88\xc3\x3a\xc0\x48\x95\x4f\x39\
\x7f\x7d\xf0\x40\x50\xcc\x9d\xf9\xdf\xe9\xd6\x40\x33\x0b\xd4\x0c\
\x5e\xaf\x8e\x40\x54\xba\x84\x35\x41\xd8\x1e\xc0\x65\x06\xae\x6d\
\x56\x5a\x3b\x40\x5a\xa7\x7d\x7e\x97\xc5\xb4\xc0\x67\xa7\xfe\xa3\
\xda\x60\x69\x40\x69\x90\x32\x32\xe0\xf7\x43\x40\x61\x3b\xaa\x06\
\x78\xb7\xc1\x40\x5e\xc0\x47\x72\x5e\x23\xb6\x40\x60\xa2\x75\x46\
\x84\x56\xc3\x40\x6b\xe0\x78\xd5\xcc\x8c\x07\
\x00\x00\x05\x1c\
\xff\
\xff\xff\xff\x00\x00\x00\x05\x00\x00\x00\x10\x00\x00\x00\x00\x00\
\x00\x00\x00\xc0\x62\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\xc0\x59\x00\x00\x00\x00\x00\x00\xc0\x49\x00\x00\x00\
\x00\x00\x00\xc0\x49\x00\x00\x00\x00\x00\x00\x40\x49\x00\x00\x00\
\x00\x00\x00\xc0\x49\x00\x00\x00\x00\x00\x00\xc0\x39\x00\x00\x00\
\x00\x00\x00\x40\x49\x00\x00\x00\x00\x00\x00\x40\x39\x00\x00\x00\
\x00\x00\x00\x40\x49\x00\x00\x00\x00\x00\x00\xc0\x59\x00\x00\x00\
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x5f\x40\x00\x00\
\x00\x00\x00\x40\x49\x00\x00\x00\x00\x00\x00\x40\x59\x00\x00\x00\
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x5f\x40\x00\x00\
\x00\x00\x00\x40\x49\x00\x00\x00\x00\x00\x00\xc0\x41\x80\x00\x00\
\x00\x00\x00\x40\x52\xc0\x00\x00\x00\x00\x00\x40\x41\x80\x00\x00\
\x00\x00\x00\x40\x52\xc0\x00\x00\x00\x00\x00\xc0\x39\x00\x00\x00\
\x00\x00\x00\x40\x69\x00\x00\x00\x00\x00\x00\xc0\x3e\x00\x00\x00\
\x00\x00\x00\x40\x72\xc0\x00\x00\x00\x00\x00\x40\x39\x00\x00\x00\
\x00\x00\x00\x40\x69\x00\x00\x00\x00\x00\x00\x40\x3e\x00\x00\x00\
\x00\x00\x00\x40\x72\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x10\xc0\
\x3c\x89\x78\xef\x64\x41\xf9\xc0\x66\xd9\xe8\x90\xe1\x7d\x15\xc0\
\x31\xe3\x24\x6e\x1a\x35\x4b\xc0\x60\xbe\xa8\xcb\xa3\x98\xe8\xc0\
\x4b\x26\x9c\xdd\x08\xb6\xce\xc0\x52\x55\xf3\x5e\x1e\x9a\xcc\x40\
\x45\x5c\xfa\x9b\x0f\x7d\x05\xc0\x58\x63\x42\x06\x4d\xc8\xaa\xc0\
\x17\x5f\xc1\xb2\xd2\x1c\x6d\x40\x31\x9d\xf7\x2f\xd9\x40\x6c\x40\
\x45\x56\x51\xec\xae\x7d\xee\x40\x16\x28\xbe\x3a\x2e\x6a\x36\xc0\
\x55\x8e\x3f\x19\x86\x36\x44\xc0\x24\x7d\xe2\xe5\x56\x5d\x8e\xc0\
\x5d\x38\xe5\xb0\x63\x56\x32\x40\x42\x3f\x2b\xb1\x33\xe6\xab\x40\
\x47\x27\x75\x17\xb2\xff\xe1\xc0\x65\x05\x80\x69\xc9\x45\xe4\x40\
\x46\xa5\x8b\x3a\x6c\xa7\xa8\xc0\x6c\x02\x0f\xa6\x73\xff\xbc\xc0\
\x23\x07\xbb\xb5\xb5\x51\x7d\x40\x46\x24\x27\xde\x37\xae\x65\x40\
\x4d\x34\xca\x20\x80\xfa\x8f\x40\x3b\x64\xbd\x21\x5f\x80\x81\xc0\
\x37\xe9\x56\x97\x59\x09\x15\x40\x65\x1b\x2f\x86\xb4\x04\x4d\xc0\
\x3c\xb5\xb5\xc5\x5a\xd5\x30\x40\x70\xcd\xc0\x3b\x0e\xef\xd6\x40\
\x43\xce\x38\x01\x33\x34\xdd\x40\x62\xec\x1a\xba\x71\x62\x00\x40\
\x3f\x5e\x72\xef\x9e\x8c\x25\x40\x6f\x65\x3a\x4d\xed\xc0\xd9\x00\
\x00\x00\x10\xc0\x3c\x89\xb8\xa7\xeb\xa9\x01\xc0\x66\xda\x0d\x17\
\x53\x31\x17\xc0\x31\xe1\x8c\xf0\xba\xdf\x75\xc0\x60\xbe\xd1\xa6\
\x64\x43\x82\xc0\x4b\x26\x88\x07\x92\xca\xbf\xc0\x52\x56\x94\xaa\
\x30\x5d\x72\x40\x45\x5d\x52\x6d\x57\x9c\xd9\xc0\x58\x62\xcc\x60\
\x74\xfe\x54\xc0\x17\x69\xa4\x0b\x5f\xcf\x0e\x40\x31\xa0\xd0\x0e\
\xd0\x62\xed\x40\x45\x54\xc3\x45\xee\xd2\xcc\x40\x16\x23\xd3\x38\
\xd6\x69\x28\xc0\x55\x8e\x03\x71\x6e\x9d\x31\xc0\x24\x82\xdb\x79\
\xc3\x1b\x6e\xc0\x5d\x38\x8a\xc7\x14\xca\x74\x40\x42\x3e\x16\x8f\
\x10\x50\x33\x40\x47\x27\x55\xb2\x6a\xa5\x2d\xc0\x65\x05\x3e\xa8\
\x00\x01\x15\x40\x46\xa5\x8f\xfd\x66\x67\x23\xc0\x6c\x01\xce\x0e\
\xaa\x42\x46\xc0\x23\x05\x39\x8c\x95\xa5\x0f\x40\x46\x26\xe0\xb5\
\x34\x5e\x5e\x40\x4d\x34\xad\x03\x49\x41\x5e\x40\x3b\x5f\xf9\x28\
\x4b\xa6\x62\xc0\x37\xea\x6c\x93\xfc\xa6\xb3\x40\x65\x1b\xec\xb0\
\x7b\xa8\xfc\xc0\x3c\xb5\xfe\xd2\xbb\xf3\x4b\x40\x70\xce\x1f\x6d\
\x37\x5e\x7d\x40\x43\xce\xcc\x1c\x47\x26\xc2\x40\x62\xeb\x73\x80\
\x3a\x8b\xaf\x40\x3f\x5e\xe2\xb7\xae\x5f\xb6\x40\x6f\x64\x91\x2c\
\x26\xca\x21\x00\x00\x00\x10\xc0\x38\x01\x30\x6b\xba\xdc\x1b\xc0\
\x64\xeb\xbe\xf4\x99\xf2\x9b\xc0\x13\xa3\x04\x1c\x30\xdb\xb6\xc0\
\x5e\x4a\x12\x9f\x80\xef\xb8\xc0\x48\xf6\x8c\x7d\xe9\xbd\xf2\xc0\
\x50\xa8\x10\x7e\x26\x5b\x6d\x40\x48\xcf\x7a\x59\xa1\x24\xc5\xc0\
\x53\x09\x35\x0a\x19\xb4\xbb\xc0\x2f\x0b\x6a\x35\x97\xd3\x7e\x40\
\x3e\x88\x20\x7b\xc1\xb4\x2f\x40\x41\x20\x0b\x54\x51\x2e\x7e\x40\
\x39\xc9\x9e\xf7\xb2\xd8\xc6\xc0\x55\xfe\xc6\x23\xb0\x4f\x25\xc0\
\x1c\x1c\x60\x3d\x66\x92\xe7\xc0\x5d\xba\xce\x5e\x2a\x54\x25\x40\
\x43\xc4\x24\x4f\x00\x90\x62\x40\x58\x0b\xce\x4b\xd9\x22\xe1\xc0\
\x36\xed\xde\xb4\x40\x2c\x73\x40\x5a\xd1\x4e\xef\xc4\x03\x6b\x40\
\x3f\xdc\xbc\xa5\x13\x81\x98\xc0\x37\x1b\xea\x35\xa6\x66\xff\x40\
\x4c\x2e\x2d\x1e\x28\x01\x86\x40\x47\x49\xa3\x1a\xd5\xe2\xf0\x40\
\x48\xdd\x6f\xf6\xf0\x01\x68\xc0\x38\xc1\x32\x29\x64\xfb\x5b\x40\
\x66\xb7\xea\x61\x5e\xb1\x57\xc0\x3d\x45\x4c\x15\xef\x6f\x50\x40\
\x71\x9c\x53\x80\x4b\x64\x0c\x40\x42\x8c\x98\x55\x36\x48\x2a\x40\
\x65\xd8\xb5\x79\xf6\x83\x89\x40\x3d\xa6\xc3\x54\x49\x2b\x98\x40\
\x71\x29\xea\x7e\x10\x5d\xc3\x00\x00\x00\x10\x40\x31\xc2\x13\x60\
\x88\x8b\x4e\xc0\x68\x3c\xec\xdf\xc9\x5c\x2f\x40\x19\x5a\x83\xca\
\x1f\xc9\xc5\xc0\x62\x27\x36\xb4\x9b\x52\x60\xc0\x48\x60\x10\xa3\
\xc6\x74\xb4\xc0\x59\x39\x43\xd2\xf9\x7b\x4b\x40\x49\x55\xa6\x3b\
\x8b\xb1\xc9\xc0\x56\x88\xbb\x33\x01\xdc\x6b\xc0\x41\x53\xb3\x9c\
\x85\xff\x25\x3f\xf3\x70\x84\x8f\xed\xe9\x9b\x40\x2e\x1c\xbe\xb0\
\x48\x52\x79\x40\x1a\x5f\x89\xdb\x5b\x45\xc0\xc0\x50\xc0\xce\xa2\
\xc3\xe5\x44\xc0\x65\x26\x9c\x40\xed\xa0\x1a\xc0\x54\xa2\x72\xde\
\x2f\x48\xc9\xc0\x6b\xdd\x16\xce\x9e\x56\xb3\x40\x55\xdc\x36\x69\
\xb4\x6e\x69\xc0\x3d\xbd\x2f\xf0\x4e\x71\xd7\x40\x5a\x39\x0b\xe0\
\xb9\x21\xc7\x40\x37\x5e\x81\xe7\xe6\x46\x06\xc0\x47\xa4\x74\xb8\
\xaf\xb7\xee\x40\x38\xfe\xaa\x2d\x0e\x97\x7e\x40\x36\x4f\x1c\x98\
\xc9\x38\x7d\x40\x40\x43\x0a\x66\x30\x52\xdc\xc0\x3f\xd3\xf0\xcb\
\x87\x9d\x38\x40\x62\xae\x04\x10\x53\xde\x8c\xc0\x3d\x00\x25\x84\
\x92\xd2\x45\x40\x6f\x30\xbc\x58\x1f\xbc\xdf\x40\x41\x44\xa6\xc0\
\x0b\x29\xd8\x40\x63\xaa\x6a\x7a\x0d\xd9\x34\x40\x3e\xab\x98\x09\
\xd9\x42\x57\x40\x70\x16\x03\x15\xe6\x2f\x0a\
\x00\x00\x09\x2c\
\xff\
\xff\xff\xff\x00\x00\x00\x09\x00\x00\x00\x10\xc0\x36\xc1\x31\xf7\
\x71\x07\xcd\xc0\x62\xc4\x31\x65\x15\x96\x34\xc0\x22\x59\x75\x1b\
\x5e\x3f\xf0\xc0\x59\x80\x9a\x15\x13\xe9\x09\xc0\x47\x52\xc9\x1c\
\x2f\x1a\x7a\xc0\x45\x06\x29\x2a\x67\x31\x79\x40\x49\x64\xe4\x36\
\x8c\xfe\x06\xc0\x50\x22\x71\x64\xe5\x3f\xcb\x3f\xc9\x7e\x46\xc2\
\x82\x74\x41\x40\x48\xe2\x7c\x67\xa7\x02\xf2\x40\x48\x75\xb8\xda\
\x6c\xe4\xac\x40\x43\x43\x8c\xb1\x63\x97\xf6\xc0\x59\x94\x32\xd7\
\x73\x76\xf3\x3f\xf8\xd1\x11\x6b\x2c\x82\x25\xc0\x5f\x82\xbf\x09\
\xb5\x16\xad\x40\x4a\x15\x6d\x1b\x87\x1c\x19\x40\x55\x32\x73\xaa\
\x94\xec\x77\xc0\x04\x4e\x49\x68\xe6\x95\xd3\x40\x60\xe5\xde\x62\
\x15\x6c\x95\xc0\x3a\xbb\x5f\xa9\x86\x06\x7e\xc0\x0f\x68\xca\xdb\
\xdc\xdd\x36\x40\x53\x18\x3a\x74\x13\x56\x51\x40\x50\x12\x0e\xb5\
\x6f\x61\x5c\x40\x4e\x52\x58\x0d\xd3\x0c\x6d\xc0\x38\xbe\x69\x34\
\x34\x0d\xd7\x40\x69\x01\x3e\xaa\x3a\x4e\xf3\xc0\x3d\xff\xa9\xa5\
\x4e\x81\xa7\x40\x72\xc0\x69\xcc\x0a\xb2\x0e\x40\x3f\xa2\xaf\xee\
\xb2\x7a\xa3\x40\x66\xb7\x06\x0c\x87\xf6\x2d\x40\x3d\xae\x9a\x40\
\x3c\x67\x56\x40\x71\x9d\x34\xa4\xbb\x47\x7d\x00\x00\x00\x10\xc0\
\x30\xaf\xc1\x69\x97\x5a\x95\xc0\x63\x49\x63\x4e\x8e\x9f\xdc\xc0\
\x1e\xaf\xb7\x04\x39\xf0\x0c\xc0\x5a\x46\x95\xdc\xfb\x24\x8e\xc0\
\x49\x9c\xd2\x5c\x93\x47\x4c\xc0\x48\xb5\xcf\xe8\x99\x9c\xdd\x40\
\x48\x02\x8f\xa5\xd6\xdc\x31\xc0\x4e\xc7\x1a\x4e\x1b\x4a\x1c\xc0\
\x2c\x94\xbf\x13\x77\x29\x41\x40\x47\x68\xf0\xdd\xb4\xba\x6a\x40\
\x41\xac\x5d\x06\x4f\x13\x18\x40\x44\x62\x29\x5f\x79\x2c\x69\xc0\
\x58\x78\xf9\x10\x42\x39\x8c\x40\x0d\x9e\x34\x27\x91\xbd\x70\xc0\
\x63\x03\xb5\x2e\x0b\xf6\xb5\x40\x31\x49\xc5\x70\x34\x57\xdc\x40\
\x55\x55\x0b\xb2\x96\x65\xb2\xbf\xf7\xd0\xc3\xa3\x37\x60\x82\x40\
\x60\xe6\x74\x90\x7c\xd3\xd5\xc0\x3a\xbd\xb7\xf4\x49\xd6\x6d\xc0\
\x35\x33\x14\x59\x01\x4b\xa9\x40\x52\x36\xaa\xf8\xcd\xd9\x51\x40\
\x48\x24\x95\xbf\x77\x92\xaf\x40\x50\x19\x5d\x72\x39\xa4\xee\xc0\
\x38\x3c\x43\x48\x09\x4c\x70\x40\x68\xc7\x21\x6e\x01\xfb\xd3\xc0\
\x3d\xe6\x09\x44\x84\xd2\x4f\x40\x72\xa2\xff\xdd\x04\x92\x32\x40\
\x3d\x30\xda\x3a\xb4\x2e\xfe\x40\x67\x8a\xdf\x98\x83\xb8\xf6\x40\
\x3d\xa4\x89\x7f\x23\xcd\xd5\x40\x72\x07\x6b\x4d\x22\x90\x7e\x00\
\x00\x00\x10\x3f\xe8\xdc\xd8\x6c\x4e\xe2\x7a\xc0\x63\x6c\xe1\x17\
\xf2\xa0\xbf\xc0\x1c\xa0\x1f\x76\xa3\x67\x0e\xc0\x5a\x82\x4b\xa2\
\xc3\x07\x44\xc0\x4e\x6a\xa4\x92\xae\xdd\x89\xc0\x4e\x00\xb1\x06\
\xb8\xfd\xe4\x40\x43\x6f\xe2\x4f\x4e\xd0\x7e\xc0\x4a\x2d\xf6\xac\
\x0f\xbe\x52\xc0\x45\xc6\xbd\x2e\xcf\xf5\x06\x40\x44\xce\x84\x52\
\x4a\x5a\x37\x40\x19\x34\x31\x96\xfb\x44\x7f\x40\x46\xb7\xe1\xb0\
\xec\xbd\xa9\xc0\x58\xfd\xf7\xfd\x56\xdc\x11\xbf\xf1\xca\x67\x3c\
\x06\x01\x31\xc0\x63\x1e\x02\x33\x3c\x22\x49\xc0\x32\xfa\x9d\x13\
\x66\xaf\x41\x40\x54\x9e\xa9\xbe\x7c\x61\xe3\x40\x0a\x72\xb1\x55\
\x98\x28\x33\x40\x61\x32\xb3\x01\xb0\xbc\x2d\xc0\x18\x63\x1b\xa0\
\x7e\x49\xee\xc0\x4b\xb7\xac\x9e\xf7\xef\xea\x40\x50\x71\xa3\x37\
\xe4\x2e\xa7\x40\x2c\xb8\x60\xb8\xfe\xc6\xc2\x40\x51\xc8\x31\x75\
\xbd\x97\x6c\xc0\x3b\x25\x5d\xe3\x55\xb6\xc3\x40\x67\x7e\x28\x3a\
\x2f\xcf\x04\xc0\x3d\x79\xfb\x74\x2a\xf4\x86\x40\x72\x00\xa4\xae\
\xf2\x81\x95\x40\x3c\xfa\x8b\x66\xc9\x22\x30\x40\x68\x75\x84\x1e\
\x7d\x6d\xd4\x40\x3d\xb5\xf8\x8b\xe7\x75\x6d\x40\x72\x7c\xb6\xc6\
\x9a\xe9\x9a\x00\x00\x00\x10\x3f\xe4\x9d\xa9\x42\x5e\xe7\x43\xc0\
\x63\x56\x3a\x89\xf9\xf5\x03\xc0\x1b\xb9\xb9\x7a\xc0\xda\x37\xc0\
\x5a\x51\x6d\x68\xd6\x38\x91\xc0\x4f\xf0\xb8\xf8\x76\x60\x54\xc0\
\x4f\xad\xc6\x15\x51\x43\xe4\x40\x41\x7d\xdd\x1f\xa6\x7e\x97\xc0\
\x48\x29\x8c\x8c\x88\xc5\xd5\xc0\x4b\x19\x1c\xf8\xef\x04\xe9\x40\
\x43\xa1\x52\x38\x86\xcc\xe1\xc0\x13\x11\x86\xaf\xfa\x18\xd1\x40\
\x47\x64\x45\xcd\x84\x52\xf0\xc0\x5d\x6b\xc7\x4d\xed\xcd\x82\xc0\
\x31\x79\xa5\x95\x16\x3c\x6c\xc0\x64\x78\xba\xa8\x85\x58\x74\xc0\
\x48\x8e\x36\x95\x37\x4b\xa5\x40\x54\xcc\x34\x76\x69\xe8\x4e\x40\
\x0b\x3e\xdf\x5f\x9e\x8d\xa3\x40\x60\x65\x54\x53\xc4\x38\x71\x40\
\x40\x0c\xb3\x84\x9f\xd2\x9c\xc0\x50\xf6\x2c\x1c\x95\xbd\x9f\x40\
\x4f\x3b\xb0\x51\x91\x96\x07\x3f\xf5\xb6\xbb\x4c\x89\xfb\xa7\x40\
\x52\x40\x4d\xcb\x0f\x40\xae\xc0\x3e\x45\x9a\x76\x56\xfb\xac\x40\
\x66\xc3\x4b\x9c\xe2\xcb\x0b\xc0\x3d\x73\xb5\x3b\x21\x32\xb6\x40\
\x71\xa3\x97\xbc\x79\xdf\x84\x40\x3c\xd5\xf8\x27\x62\x64\x9d\x40\
\x68\x6b\x6d\x0c\x69\x1b\x7e\x40\x3d\xb5\x37\x81\x76\xb1\xee\x40\
\x72\x77\xa6\xa6\x21\xce\x5f\x00\x00\x00\x10\xbf\xe3\x54\xf9\xd1\
\xc3\xbb\x96\xc0\x62\x39\x5d\x48\x40\x62\x61\xc0\x13\xa4\x40\xfe\
\x23\x41\x66\xc0\x57\xfe\x9e\x7a\x5a\x8c\x65\xc0\x51\x53\x87\x2f\
\x98\x9f\x2f\xc0\x50\xb1\x13\x00\xa7\xbf\x57\x40\x38\x4d\x1d\xa7\
\x39\x9a\x03\xc0\x3f\x95\x6d\x6a\x72\xf6\x4d\xc0\x54\x45\x8b\x2f\
\x57\x8e\x27\x40\x41\xd1\x53\x04\xab\x6e\xf7\xc0\x41\x24\x47\xc5\
\x1a\x30\x9b\x40\x4a\x9d\x0a\xaa\x84\xfc\x0d\xc0\x61\x26\xda\xae\
\x5a\xbe\x0d\xc0\x47\x87\xad\x31\xe6\x56\x49\xc0\x65\xf1\xab\xa2\
\x9d\x71\x7a\xc0\x55\xef\x9f\x23\x26\xbf\xfd\x40\x44\x02\xa4\x34\
\x49\x99\xb4\x40\x42\xad\xc5\x39\xfc\xc3\xc9\x40\x54\x77\x1a\x63\
\x55\xdd\x55\x3f\xd2\x3b\x7b\x22\x6a\xd6\x1f\xc0\x58\xcf\x8d\xc1\
\xb5\x07\x54\x40\x4b\xc2\x62\x63\xab\x19\x62\xc0\x40\xdb\xfa\x46\
\x22\x87\x89\x40\x54\x09\x64\xf2\x9a\x80\x2a\xc0\x44\xeb\x29\x9a\
\x2f\x94\x49\x40\x64\xe0\x36\x35\x4c\x3c\x43\xc0\x3e\x7e\x4a\x3b\
\x7b\x99\xfd\x40\x70\xa7\xca\x20\xaa\x48\xd9\x40\x39\x90\x46\xa5\
\x32\x46\xfc\x40\x67\xd4\xc0\x6c\x37\x15\xaa\x40\x3d\x93\xe0\x30\
\xd5\xa0\xe6\x40\x72\x2b\x16\x2e\xda\x91\xd2\x00\x00\x00\x10\xbf\
\xd7\x9d\xe7\xa1\x97\x39\xc0\xc0\x62\xbc\xd5\xa4\x38\x2b\x33\xc0\
\x2b\x24\x07\xa2\xf7\xbc\x3a\xc0\x59\x6b\x39\x1d\x48\x8d\x2d\xc0\
\x50\xfc\x22\x5d\x98\xd8\xe0\xc0\x4c\x3b\x80\x46\xaf\xdc\x40\x40\
\x3f\xa3\xe1\x10\x37\xbc\x7c\xc0\x47\xa7\x33\xb0\x1d\xd6\x38\xc0\
\x4a\x1a\x00\x9f\xcb\xe1\x48\x40\x46\xb3\xbc\xc6\xce\x1c\xfe\xc0\
\x03\x4e\xc7\x08\x76\xc7\x1c\x40\x48\xfd\xf5\x33\x7e\x4b\x81\xc0\
\x60\x62\xd0\x37\xd0\x3e\x25\xc0\x38\xa5\xfa\x53\xfc\x7a\x7d\xc0\
\x64\x52\x8c\x8e\xde\xf0\x6d\xc0\x51\xb5\x7b\xf0\xe3\x85\x21\x40\
\x52\x61\x8e\x3b\xeb\xd1\xde\x40\x23\x54\x72\x4d\x7e\x66\xb6\x40\
\x5a\xc6\x30\x18\x78\x65\x5e\xc0\x41\x84\x35\xad\x81\xc8\x84\xc0\
\x50\x1c\xe1\x3c\xef\x41\x96\x40\x51\x58\x7f\x41\x27\xa7\x22\x40\
\x15\x04\xa4\x11\x8b\xa5\x4c\x40\x52\xf2\xe2\x10\x1d\xbe\x94\xc0\
\x3a\xad\xdb\xf6\xe0\xcd\x29\x40\x67\x9e\xa8\x6e\xa4\x7f\x43\xc0\
\x3d\xa4\xca\x4b\x1f\x0f\x46\x40\x72\x10\xa0\x16\xce\x0d\xd1\x40\
\x3d\xed\xb9\x7b\x1d\xf5\x8a\x40\x68\xd7\xc6\xd6\xaf\x31\x50\x40\
\x3d\xb4\xa6\x32\xb3\x72\x09\x40\x72\xad\xe2\x15\x3d\xe8\xd8\x00\
\x00\x00\x10\xc0\x34\xf7\x01\x4a\xe8\x31\x37\xc0\x63\x08\xe7\x3c\
\xd7\x52\x6e\xc0\x32\x87\x01\x16\xce\x22\x54\xc0\x59\x95\x8a\xc3\
\xc9\x1c\xb8\xc0\x51\x35\xc9\xdc\xb0\xdf\xb7\xc0\x4a\x53\xba\xaa\
\x59\xe9\x6d\x40\x3f\x27\xe3\x21\x77\x13\xbc\xc0\x4a\x03\x47\xa6\
\x3c\x27\xd1\xc0\x46\x3c\x28\x27\x7d\x72\x7b\x40\x47\xbf\xcc\xb2\
\x9b\x75\xf7\x40\x16\x1c\xbe\x7d\x45\x21\x89\x40\x47\xe9\x2b\xf5\
\x69\xa9\x7a\xc0\x5e\xfa\xe4\x52\xe2\xee\x3d\xc0\x20\x9f\xc3\x12\
\xc5\x03\x2a\xc0\x63\x2d\x67\xd4\x68\xd9\xd5\xc0\x4b\xe6\x04\xf7\
\xc6\xd3\xb2\x40\x56\x9a\x17\x7f\xf0\x8a\x61\xc0\x2a\xde\xdc\xce\
\x99\x86\xc2\x40\x5d\x35\xe2\x20\x89\xba\x10\xc0\x4f\x58\x95\x85\
\x01\x84\xd4\xc0\x4b\x51\x42\xfa\x2b\xa5\xef\x40\x52\x1b\x84\x34\
\xad\x36\xdf\x40\x2e\xba\x76\xa5\xb1\xb8\x45\x40\x52\x39\x02\x49\
\xaa\x30\x3e\xc0\x37\xb9\x6f\x87\xfd\xd0\x77\x40\x68\x3e\xb5\xb9\
\xe8\xcd\x8a\xc0\x3d\xdf\x2f\x40\x7a\xc8\xd0\x40\x72\x5e\x54\xd0\
\xa5\x34\x44\x40\x3d\x8f\xfd\xe1\x90\x52\x8a\x40\x68\xaf\x88\xff\
\xd8\xfc\x30\x40\x3d\xb4\x96\xe1\xc9\x47\x14\x40\x72\x99\xc3\xc3\
\x16\xad\x07\x00\x00\x00\x10\xc0\x44\x1f\xc5\xb0\x8d\xff\xf8\xc0\
\x62\xd7\xcc\xdb\x51\x37\xe9\xc0\x38\x70\x1f\x26\x3f\xdd\xd1\xc0\
\x59\xd3\xca\x12\xd1\x6d\x66\xc0\x50\x9b\x5f\xdf\x54\x98\x82\xc0\
\x47\x35\x38\xde\x3e\x59\xd1\x40\x40\x3a\x4b\xde\xb1\x11\x5e\xc0\
\x4e\xa8\xe3\x73\xc2\x1e\x04\xc0\x3a\xcd\xa4\x3c\x9c\xa3\x4a\x40\
\x48\x5e\xe9\xc8\x41\x4a\x06\x40\x36\xa3\x67\x5c\xdf\x00\x72\x40\
\x44\xa5\x11\xd4\x30\xbb\xbe\xc0\x58\xc8\x06\xa1\x52\x29\xa4\x40\
\x30\x47\xe1\xaa\x31\x64\x3e\xc0\x63\x5d\xb2\xe9\xcc\x7a\xe2\x40\
\x29\xe9\x00\x97\x5b\x70\xaa\x40\x58\x50\x0c\x6f\xef\x08\x06\xc0\
\x40\x80\xf5\x5f\x55\x35\x51\x40\x60\xea\x26\xcc\x19\xc3\x62\xc0\
\x52\x7c\x87\x94\x54\x11\xcd\xc0\x40\x7b\x99\x9a\x58\x7d\x4e\x40\
\x52\xbc\xf9\x47\x74\x9c\xd3\x40\x42\x20\x54\x4b\xe3\x87\xa0\x40\
\x50\x21\x47\x81\x50\x58\x25\xc0\x35\xd8\x1b\x0b\x45\x8c\xdd\x40\
\x68\xfb\x74\x42\x1b\x4c\x50\xc0\x3e\x4d\x9f\x09\xae\x3a\xcb\x40\
\x72\xb9\xff\x8f\xad\x92\x5a\x40\x3d\x6b\xf8\x3a\xfe\x5b\xcc\x40\
\x67\xb7\x76\x0a\x83\x1d\x2b\x40\x3d\xaf\x2e\x02\x24\x00\xa5\x40\
\x72\x1d\xb9\x4a\x83\x5a\x36\x00\x00\x00\x10\xc0\x56\x21\x7b\x1a\
\x2d\x27\x74\xc0\x5d\x7f\x81\xf7\x72\x97\xeb\xc0\x45\x6a\xce\x4b\
\x4a\x59\x0e\xc0\x58\x6b\x98\xca\x1a\xce\x5b\xc0\x50\x79\x21\x8d\
\x02\xed\x0a\xc0\x3e\xd5\xf2\x5c\x01\x40\xa0\x40\x38\x02\xd4\x2c\
\x79\x7b\xb7\xc0\x52\xa7\xde\x66\xb0\xaa\x42\x3f\xd7\xb5\xe2\x7b\
\x89\xa4\xca\x40\x48\x0f\x83\x05\x1a\x5b\x33\x40\x46\xa9\x42\x70\
\x82\xf2\xfc\x40\x3a\x3a\x42\xb9\x85\x37\x29\xc0\x54\xe2\xc5\x27\
\x1d\x51\x6a\x40\x42\xd1\x7b\x2a\xa1\x08\x15\xc0\x61\x0b\x0a\x8b\
\x23\x7a\xc0\x40\x33\x47\x9a\x49\x82\xe6\x81\x40\x57\xac\xeb\x9b\
\x79\x30\xfa\xc0\x53\x13\x15\xe5\x3e\x1d\x05\x40\x60\x43\xab\x51\
\xbf\x87\xef\xc0\x5d\xe3\x5c\x69\xf3\x2d\x89\x40\x02\x9d\x80\x74\
\x60\xb9\xea\x40\x52\xbe\x74\x1e\x0d\x17\x2d\x40\x50\x50\x9b\xe2\
\xa5\xba\x4e\x40\x46\x29\x92\xd8\xeb\x51\xb2\xc0\x32\x67\x07\xb9\
\x5f\xcb\x99\x40\x68\xd4\xcc\x9f\x63\x2f\x21\xc0\x3e\x08\x79\x67\
\x07\x43\x5b\x40\x72\xa1\x8d\xaf\x2d\x86\xe8\x40\x43\x38\x54\x39\
\x89\x5f\xf6\x40\x64\xda\x52\xe8\xbe\xbd\x10\x40\x3e\xaa\x65\xda\
\xb3\xd9\xcf\x40\x70\xaa\x52\xf4\x99\xff\x0c\
\x00\x00\x01\x0c\
\xff\
\xff\xff\xff\x00\x00\x00\x01\x00\x00\x00\x10\xc0\x72\x75\xd0\xbc\
\x4a\x7e\x3b\x40\x6e\xa8\x3a\x76\xcc\x4a\x4f\xc0\x6e\xc4\x15\x8d\
\xdb\x8a\x81\x40\x6d\x91\x95\x4a\xaf\x90\x71\xc0\x69\x4c\xfe\x50\
\x6c\x77\x6e\x40\x72\x41\xf5\x29\xa3\x44\xca\xc0\x67\xd1\xbb\x6b\
\x66\xf4\xfc\x40\x68\x1a\x7c\x41\xab\x27\xf0\xc0\x59\x09\x41\xf0\
\xd6\x29\x49\x40\x71\x72\x68\x78\x60\x60\x84\xc0\x57\x8e\x4b\x36\
\x5e\x8b\x6f\x40\x6c\xb0\x0b\xce\x10\xc5\x22\xc0\x70\xf5\x12\xcb\
\xa7\x78\x95\x40\x71\x44\x4e\x7a\x50\x85\x9f\xc0\x74\x72\x66\x5a\
\x1e\x1b\xae\x40\x71\x17\xf1\xe4\xf6\x7f\x7e\xc0\x64\x2e\x57\x5b\
\xe3\x6f\x6c\x40\x70\x14\x53\x5e\x5b\x6a\x7a\xc0\x60\x2d\xc9\x35\
\x26\xaf\xd0\x40\x72\xf1\x84\xb6\xf0\xd8\xae\xc0\x53\x20\x21\x2d\
\x64\x5b\xb3\x40\x72\x40\xa0\x97\xbf\x55\x8f\xc0\x51\x0d\xcf\x0f\
\x1b\x48\x3c\x40\x6b\xd1\x05\xa8\x2a\xdf\x62\x40\x44\x77\x7b\xec\
\x05\x04\x13\x40\x6f\x01\xfc\x1b\x65\x69\x69\x40\x61\x21\xf2\x32\
\xa1\xd8\xd9\x40\x71\x41\x25\x0f\x44\xd0\xa8\x40\x4c\x88\xe7\x4e\
\xbb\xeb\xb8\x40\x6c\x7b\xe4\x15\x28\x7a\x0a\x40\x62\x87\x8c\xab\
\xb5\x95\xf1\x40\x70\xd4\x4b\x4c\x03\x9d\x83\
"
qt_resource_name = b"\
\x00\x0a\
\x03\x88\x10\x53\
\x00\x61\
\x00\x6e\x00\x69\x00\x6d\x00\x61\x00\x74\x00\x69\x00\x6f\x00\x6e\x00\x73\
\x00\x08\
\x0f\x03\x25\x67\
\x00\x63\
\x00\x68\x00\x69\x00\x6c\x00\x6c\x00\x69\x00\x6e\x00\x67\
\x00\x07\
\x01\xc4\x70\xa7\
\x00\x6a\
\x00\x75\x00\x6d\x00\x70\x00\x69\x00\x6e\x00\x67\
\x00\x07\
\x0a\x84\xa0\x87\
\x00\x64\
\x00\x61\x00\x6e\x00\x63\x00\x69\x00\x6e\x00\x67\
\x00\x04\
\x00\x06\xab\x74\
\x00\x64\
\x00\x65\x00\x61\x00\x64\
"
qt_resource_struct = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x04\x00\x00\x00\x02\
\x00\x00\x00\x58\x00\x00\x00\x00\x00\x01\x00\x00\x27\xc0\
\x00\x00\x00\x30\x00\x00\x00\x00\x00\x01\x00\x00\x19\x70\
\x00\x00\x00\x44\x00\x00\x00\x00\x00\x01\x00\x00\x1e\x90\
\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
"
def qInitResources():
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources()

200
dbus/chat/chat.py Normal file
View File

@@ -0,0 +1,200 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Q_CLASSINFO
from PyQt5.QtWidgets import QApplication, QDialog, QMainWindow, QMessageBox
from PyQt5.QtDBus import (QDBusAbstractAdaptor, QDBusAbstractInterface,
QDBusConnection, QDBusMessage)
from ui_chatmainwindow import Ui_ChatMainWindow
from ui_chatsetnickname import Ui_NicknameDialog
class ChatAdaptor(QDBusAbstractAdaptor):
Q_CLASSINFO("D-Bus Interface", 'org.example.chat')
Q_CLASSINFO("D-Bus Introspection", ''
' <interface name="org.example.chat">\n'
' <signal name="message">\n'
' <arg direction="out" type="s" name="nickname"/>\n'
' <arg direction="out" type="s" name="text"/>\n'
' </signal>\n'
' <signal name="action">\n'
' <arg direction="out" type="s" name="nickname"/>\n'
' <arg direction="out" type="s" name="text"/>\n'
' </signal>\n'
' </interface>\n'
'')
action = pyqtSignal(str, str)
message = pyqtSignal(str, str)
def __init__(self, parent):
super(ChatAdaptor, self).__init__(parent)
self.setAutoRelaySignals(True)
class ChatInterface(QDBusAbstractInterface):
action = pyqtSignal(str, str)
message = pyqtSignal(str, str)
def __init__(self, service, path, connection, parent=None):
super(ChatInterface, self).__init__(service, path, 'org.example.chat',
connection, parent)
class ChatMainWindow(QMainWindow, Ui_ChatMainWindow):
action = pyqtSignal(str, str)
message = pyqtSignal(str, str)
def __init__(self):
super(ChatMainWindow, self).__init__()
self.m_nickname = "nickname"
self.m_messages = []
self.setupUi(self)
self.sendButton.setEnabled(False)
self.messageLineEdit.textChanged.connect(self.textChangedSlot)
self.sendButton.clicked.connect(self.sendClickedSlot)
self.actionChangeNickname.triggered.connect(self.changeNickname)
self.actionAboutQt.triggered.connect(self.aboutQt)
QApplication.instance().lastWindowClosed.connect(self.exiting)
# Add our D-Bus interface and connect to D-Bus.
ChatAdaptor(self)
QDBusConnection.sessionBus().registerObject('/', self)
iface = ChatInterface('', '', QDBusConnection.sessionBus(), self)
QDBusConnection.sessionBus().connect('', '', 'org.example.chat',
'message', self.messageSlot)
iface.action.connect(self.actionSlot)
dialog = NicknameDialog()
dialog.cancelButton.setVisible(False)
dialog.exec_()
self.m_nickname = dialog.nickname.text().strip()
self.action.emit(self.m_nickname, "joins the chat")
def rebuildHistory(self):
history = '\n'.join(self.m_messages)
self.chatHistory.setPlainText(history)
@pyqtSlot(str, str)
def messageSlot(self, nickname, text):
self.m_messages.append("<%s> %s" % (nickname, text))
if len(self.m_messages) > 100:
self.m_messages.pop(0)
self.rebuildHistory()
@pyqtSlot(str, str)
def actionSlot(self, nickname, text):
self.m_messages.append("* %s %s" % (nickname, text))
if len(self.m_messages) > 100:
self.m_messages.pop(0)
self.rebuildHistory()
@pyqtSlot(str)
def textChangedSlot(self, newText):
self.sendButton.setEnabled(newText != '')
@pyqtSlot()
def sendClickedSlot(self):
msg = QDBusMessage.createSignal('/', 'org.example.chat', 'message')
msg << self.m_nickname << self.messageLineEdit.text()
QDBusConnection.sessionBus().send(msg)
self.messageLineEdit.setText('')
@pyqtSlot()
def changeNickname(self):
dialog = NicknameDialog(self)
if dialog.exec_() == QDialog.Accepted:
old = self.m_nickname
self.m_nickname = dialog.nickname.text().strip()
self.action.emit(old, "is now known as %s" % self.m_nickname)
@pyqtSlot()
def aboutQt(self):
QMessageBox.aboutQt(self)
@pyqtSlot()
def exiting(self):
self.action.emit(self.m_nickname, "leaves the chat")
class NicknameDialog(QDialog, Ui_NicknameDialog):
def __init__(self, parent=None):
super(NicknameDialog, self).__init__(parent)
self.setupUi(self)
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
if not QDBusConnection.sessionBus().isConnected():
sys.stderr.write("Cannot connect to the D-Bus session bus.\n"
"Please check your system settings and try again.\n")
sys.exit(1)
chat = ChatMainWindow()
chat.show()
sys.exit(app.exec_())

185
dbus/chat/chatmainwindow.ui Normal file
View File

@@ -0,0 +1,185 @@
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>ChatMainWindow</class>
<widget class="QMainWindow" name="ChatMainWindow" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle" >
<string>Qt D-Bus Chat</string>
</property>
<widget class="QWidget" name="centralwidget" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QTextBrowser" name="chatHistory" >
<property name="acceptDrops" >
<bool>false</bool>
</property>
<property name="toolTip" >
<string>Messages sent and received from other users</string>
</property>
<property name="acceptRichText" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label" >
<property name="text" >
<string>Message:</string>
</property>
<property name="buddy" >
<cstring>messageLineEdit</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="messageLineEdit" />
</item>
<item>
<widget class="QPushButton" name="sendButton" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip" >
<string>Sends a message to other people</string>
</property>
<property name="whatsThis" >
<string/>
</property>
<property name="text" >
<string>Send</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>31</height>
</rect>
</property>
<widget class="QMenu" name="menuQuit" >
<property name="title" >
<string>Help</string>
</property>
<addaction name="actionAboutQt" />
</widget>
<widget class="QMenu" name="menuFile" >
<property name="title" >
<string>File</string>
</property>
<addaction name="actionChangeNickname" />
<addaction name="separator" />
<addaction name="actionQuit" />
</widget>
<addaction name="menuFile" />
<addaction name="menuQuit" />
</widget>
<widget class="QStatusBar" name="statusbar" />
<action name="actionQuit" >
<property name="text" >
<string>Quit</string>
</property>
<property name="shortcut" >
<string>Ctrl+Q</string>
</property>
</action>
<action name="actionAboutQt" >
<property name="text" >
<string>About Qt...</string>
</property>
</action>
<action name="actionChangeNickname" >
<property name="text" >
<string>Change nickname...</string>
</property>
<property name="shortcut" >
<string>Ctrl+N</string>
</property>
</action>
</widget>
<pixmapfunction></pixmapfunction>
<tabstops>
<tabstop>chatHistory</tabstop>
<tabstop>messageLineEdit</tabstop>
<tabstop>sendButton</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>messageLineEdit</sender>
<signal>returnPressed()</signal>
<receiver>sendButton</receiver>
<slot>animateClick()</slot>
<hints>
<hint type="sourcelabel" >
<x>299</x>
<y>554</y>
</hint>
<hint type="destinationlabel" >
<x>744</x>
<y>551</y>
</hint>
</hints>
</connection>
<connection>
<sender>actionQuit</sender>
<signal>triggered(bool)</signal>
<receiver>ChatMainWindow</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel" >
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel" >
<x>399</x>
<y>299</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@@ -0,0 +1,149 @@
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>NicknameDialog</class>
<widget class="QDialog" name="NicknameDialog" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>396</width>
<height>105</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle" >
<string>Set nickname</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>New nickname:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="nickname" />
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>131</width>
<height>31</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="okButton" >
<property name="text" >
<string>OK</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton" >
<property name="text" >
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<resources/>
<connections>
<connection>
<sender>okButton</sender>
<signal>clicked()</signal>
<receiver>NicknameDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>278</x>
<y>253</y>
</hint>
<hint type="destinationlabel" >
<x>96</x>
<y>254</y>
</hint>
</hints>
</connection>
<connection>
<sender>cancelButton</sender>
<signal>clicked()</signal>
<receiver>NicknameDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>369</x>
<y>253</y>
</hint>
<hint type="destinationlabel" >
<x>179</x>
<y>282</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@@ -0,0 +1,99 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'chatmainwindow.ui'
#
# Created: Fri Jul 26 06:48:06 2013
# by: PyQt5 UI code generator 5.0.1-snapshot-2a99e59669ee
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_ChatMainWindow(object):
def setupUi(self, ChatMainWindow):
ChatMainWindow.setObjectName("ChatMainWindow")
ChatMainWindow.resize(800, 600)
self.centralwidget = QtWidgets.QWidget(ChatMainWindow)
self.centralwidget.setObjectName("centralwidget")
self.hboxlayout = QtWidgets.QHBoxLayout(self.centralwidget)
self.hboxlayout.setContentsMargins(9, 9, 9, 9)
self.hboxlayout.setSpacing(6)
self.hboxlayout.setObjectName("hboxlayout")
self.vboxlayout = QtWidgets.QVBoxLayout()
self.vboxlayout.setContentsMargins(0, 0, 0, 0)
self.vboxlayout.setSpacing(6)
self.vboxlayout.setObjectName("vboxlayout")
self.chatHistory = QtWidgets.QTextBrowser(self.centralwidget)
self.chatHistory.setAcceptDrops(False)
self.chatHistory.setAcceptRichText(True)
self.chatHistory.setObjectName("chatHistory")
self.vboxlayout.addWidget(self.chatHistory)
self.hboxlayout1 = QtWidgets.QHBoxLayout()
self.hboxlayout1.setContentsMargins(0, 0, 0, 0)
self.hboxlayout1.setSpacing(6)
self.hboxlayout1.setObjectName("hboxlayout1")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setObjectName("label")
self.hboxlayout1.addWidget(self.label)
self.messageLineEdit = QtWidgets.QLineEdit(self.centralwidget)
self.messageLineEdit.setObjectName("messageLineEdit")
self.hboxlayout1.addWidget(self.messageLineEdit)
self.sendButton = QtWidgets.QPushButton(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy(1), QtWidgets.QSizePolicy.Policy(0))
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.sendButton.sizePolicy().hasHeightForWidth())
self.sendButton.setSizePolicy(sizePolicy)
self.sendButton.setWhatsThis("")
self.sendButton.setObjectName("sendButton")
self.hboxlayout1.addWidget(self.sendButton)
self.vboxlayout.addLayout(self.hboxlayout1)
self.hboxlayout.addLayout(self.vboxlayout)
ChatMainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(ChatMainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 31))
self.menubar.setObjectName("menubar")
self.menuQuit = QtWidgets.QMenu(self.menubar)
self.menuQuit.setObjectName("menuQuit")
self.menuFile = QtWidgets.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
ChatMainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(ChatMainWindow)
self.statusbar.setObjectName("statusbar")
ChatMainWindow.setStatusBar(self.statusbar)
self.actionQuit = QtWidgets.QAction(ChatMainWindow)
self.actionQuit.setObjectName("actionQuit")
self.actionAboutQt = QtWidgets.QAction(ChatMainWindow)
self.actionAboutQt.setObjectName("actionAboutQt")
self.actionChangeNickname = QtWidgets.QAction(ChatMainWindow)
self.actionChangeNickname.setObjectName("actionChangeNickname")
self.menuQuit.addAction(self.actionAboutQt)
self.menuFile.addAction(self.actionChangeNickname)
self.menuFile.addSeparator()
self.menuFile.addAction(self.actionQuit)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuQuit.menuAction())
self.label.setBuddy(self.messageLineEdit)
self.retranslateUi(ChatMainWindow)
self.messageLineEdit.returnPressed.connect(self.sendButton.animateClick)
self.actionQuit.triggered['bool'].connect(ChatMainWindow.close)
QtCore.QMetaObject.connectSlotsByName(ChatMainWindow)
ChatMainWindow.setTabOrder(self.chatHistory, self.messageLineEdit)
ChatMainWindow.setTabOrder(self.messageLineEdit, self.sendButton)
def retranslateUi(self, ChatMainWindow):
_translate = QtCore.QCoreApplication.translate
ChatMainWindow.setWindowTitle(_translate("ChatMainWindow", "Qt D-Bus Chat"))
self.chatHistory.setToolTip(_translate("ChatMainWindow", "Messages sent and received from other users"))
self.label.setText(_translate("ChatMainWindow", "Message:"))
self.sendButton.setToolTip(_translate("ChatMainWindow", "Sends a message to other people"))
self.sendButton.setText(_translate("ChatMainWindow", "Send"))
self.menuQuit.setTitle(_translate("ChatMainWindow", "Help"))
self.menuFile.setTitle(_translate("ChatMainWindow", "File"))
self.actionQuit.setText(_translate("ChatMainWindow", "Quit"))
self.actionQuit.setShortcut(_translate("ChatMainWindow", "Ctrl+Q"))
self.actionAboutQt.setText(_translate("ChatMainWindow", "About Qt..."))
self.actionChangeNickname.setText(_translate("ChatMainWindow", "Change nickname..."))
self.actionChangeNickname.setShortcut(_translate("ChatMainWindow", "Ctrl+N"))

View File

@@ -0,0 +1,68 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'chatsetnickname.ui'
#
# Created: Fri Jul 26 06:48:20 2013
# by: PyQt5 UI code generator 5.0.1-snapshot-2a99e59669ee
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_NicknameDialog(object):
def setupUi(self, NicknameDialog):
NicknameDialog.setObjectName("NicknameDialog")
NicknameDialog.resize(396, 105)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy(1), QtWidgets.QSizePolicy.Policy(1))
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(NicknameDialog.sizePolicy().hasHeightForWidth())
NicknameDialog.setSizePolicy(sizePolicy)
self.vboxlayout = QtWidgets.QVBoxLayout(NicknameDialog)
self.vboxlayout.setContentsMargins(9, 9, 9, 9)
self.vboxlayout.setSpacing(6)
self.vboxlayout.setObjectName("vboxlayout")
self.vboxlayout1 = QtWidgets.QVBoxLayout()
self.vboxlayout1.setContentsMargins(0, 0, 0, 0)
self.vboxlayout1.setSpacing(6)
self.vboxlayout1.setObjectName("vboxlayout1")
self.label = QtWidgets.QLabel(NicknameDialog)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy(1), QtWidgets.QSizePolicy.Policy(1))
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy)
self.label.setObjectName("label")
self.vboxlayout1.addWidget(self.label)
self.nickname = QtWidgets.QLineEdit(NicknameDialog)
self.nickname.setObjectName("nickname")
self.vboxlayout1.addWidget(self.nickname)
self.vboxlayout.addLayout(self.vboxlayout1)
self.hboxlayout = QtWidgets.QHBoxLayout()
self.hboxlayout.setContentsMargins(0, 0, 0, 0)
self.hboxlayout.setSpacing(6)
self.hboxlayout.setObjectName("hboxlayout")
spacerItem = QtWidgets.QSpacerItem(131, 31, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.hboxlayout.addItem(spacerItem)
self.okButton = QtWidgets.QPushButton(NicknameDialog)
self.okButton.setObjectName("okButton")
self.hboxlayout.addWidget(self.okButton)
self.cancelButton = QtWidgets.QPushButton(NicknameDialog)
self.cancelButton.setObjectName("cancelButton")
self.hboxlayout.addWidget(self.cancelButton)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.hboxlayout.addItem(spacerItem1)
self.vboxlayout.addLayout(self.hboxlayout)
self.retranslateUi(NicknameDialog)
self.okButton.clicked.connect(NicknameDialog.accept)
self.cancelButton.clicked.connect(NicknameDialog.reject)
QtCore.QMetaObject.connectSlotsByName(NicknameDialog)
def retranslateUi(self, NicknameDialog):
_translate = QtCore.QCoreApplication.translate
NicknameDialog.setWindowTitle(_translate("NicknameDialog", "Set nickname"))
self.label.setText(_translate("NicknameDialog", "New nickname:"))
self.okButton.setText(_translate("NicknameDialog", "OK"))
self.cancelButton.setText(_translate("NicknameDialog", "Cancel"))

98
dbus/listnames.py Normal file
View File

@@ -0,0 +1,98 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
import sys
from PyQt5.QtCore import QCoreApplication
from PyQt5.QtDBus import QDBusConnection, QDBusInterface
def method1():
sys.stdout.write("Method 1:\n")
reply = QDBusConnection.sessionBus().interface().registeredServiceNames()
if not reply.isValid():
sys.stdout.write("Error: %s\n" % reply.error().message())
sys.exit(1)
# Mimic the output from the C++ version.
for name in reply.value():
sys.stdout.write('"%s"\n' % name)
def method2():
sys.stdout.write("Method 2:\n")
bus = QDBusConnection.sessionBus()
dbus_iface = QDBusInterface('org.freedesktop.DBus',
'/org/freedesktop/DBus', 'org.freedesktop.DBus', bus)
names = dbus_iface.call('ListNames').arguments()[0]
# Mimic the output from the C++ version.
sys.stdout.write('QVariant(QStringList, ("%s") )\n' % '", "'.join(names))
def method3():
sys.stdout.write("Method 3:\n")
names = QDBusConnection.sessionBus().interface().registeredServiceNames().value()
# Mimic the output from the C++ version.
sys.stdout.write('("%s")\n' % '", "'.join(names))
if __name__ == '__main__':
app = QCoreApplication(sys.argv)
if not QDBusConnection.sessionBus().isConnected():
sys.stderr.write("Cannot connect to the D-Bus session bus.\n"
"To start it, run:\n"
"\teval `dbus-launch --auto-syntax`\n");
sys.exit(1)
method1()
method2()
method3()
sys.exit()

75
dbus/pingpong/ping.py Normal file
View File

@@ -0,0 +1,75 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
import sys
from PyQt5.QtCore import QCoreApplication
from PyQt5.QtDBus import QDBusConnection, QDBusInterface, QDBusReply
if __name__ == '__main__':
app = QCoreApplication(sys.argv)
if not QDBusConnection.sessionBus().isConnected():
sys.stderr.write("Cannot connect to the D-Bus session bus.\n"
"To start it, run:\n"
"\teval `dbus-launch --auto-syntax`\n");
sys.exit(1)
iface = QDBusInterface('org.example.QtDBus.PingExample', '/', '',
QDBusConnection.sessionBus())
if iface.isValid():
msg = iface.call('ping', sys.argv[1] if len(sys.argv) > 1 else "")
reply = QDBusReply(msg)
if reply.isValid():
sys.stdout.write("Reply was: %s\n" % reply.value())
sys.exit()
sys.stderr.write("Call failed: %s\n" % reply.error().message())
sys.exit(1)
sys.stderr.write("%s\n" % QDBusConnection.sessionBus().lastError().message())
sys.exit(1)

77
dbus/pingpong/pong.py Normal file
View File

@@ -0,0 +1,77 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
import sys
from PyQt5.QtCore import pyqtSlot, QCoreApplication, QMetaObject, QObject
from PyQt5.QtDBus import QDBusConnection
class Pong(QObject):
@pyqtSlot(str, result=str)
def ping(self, arg):
QMetaObject.invokeMethod(QCoreApplication.instance(), 'quit')
return "ping(\"%s\") got called" % arg
if __name__ == '__main__':
app = QCoreApplication(sys.argv)
if not QDBusConnection.sessionBus().isConnected():
sys.stderr.write("Cannot connect to the D-Bus session bus.\n"
"To start it, run:\n"
"\teval `dbus-launch --auto-syntax`\n");
sys.exit(1)
if not QDBusConnection.sessionBus().registerService('org.example.QtDBus.PingExample'):
sys.stderr.write("%s\n" % QDBusConnection.sessionBus().lastError().message())
sys.exit(1)
pong = Pong()
QDBusConnection.sessionBus().registerObject('/', pong,
QDBusConnection.ExportAllSlots)
sys.exit(app.exec_())

View File

@@ -0,0 +1,198 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
import math
from PyQt5.QtCore import pyqtSlot, Q_CLASSINFO, QRectF, Qt
from PyQt5.QtGui import QBrush, QPainter, QTransform
from PyQt5.QtWidgets import (QApplication, QGraphicsItem, QGraphicsObject,
QGraphicsScene, QGraphicsView)
from PyQt5.QtDBus import QDBusAbstractAdaptor, QDBusConnection
class Car(QGraphicsObject):
def __init__(self):
super(Car, self).__init__()
self.color = QBrush(Qt.green)
self.wheelsAngle = 0.0
self.speed = 0.0
self.startTimer(1000 // 33)
self.setFlag(QGraphicsItem.ItemIsMovable, True)
self.setFlag(QGraphicsItem.ItemIsFocusable, True)
def accelerate(self):
if self.speed < 10:
self.speed += 1
def decelerate(self):
if self.speed > -10:
self.speed -= 1
def turnLeft(self):
if self.wheelsAngle > -30:
self.wheelsAngle -= 5
def turnRight(self):
if self.wheelsAngle < 30:
self.wheelsAngle += 5
def boundingRect(self):
return QRectF(-35, -81, 70, 115)
def timerEvent(self, event):
axelDistance = 54.0
wheelsAngleRads = (self.wheelsAngle * math.pi) / 180
turnDistance = math.cos(wheelsAngleRads) * axelDistance * 2
turnRateRads = wheelsAngleRads / turnDistance
turnRate = (turnRateRads * 180) / math.pi
rotation = self.speed * turnRate
self.setTransform(QTransform().rotate(rotation), True)
self.setTransform(QTransform.fromTranslate(0, -self.speed), True)
self.update()
def paint(self, painter, option, widget):
painter.setBrush(Qt.gray)
painter.drawRect(-20, -58, 40, 2) # Front axel
painter.drawRect(-20, 7, 40, 2) # Rear axel
painter.setBrush(self.color)
painter.drawRect(-25, -79, 50, 10) # Front wing
painter.drawEllipse(-25, -48, 50, 20) # Side pods
painter.drawRect(-25, -38, 50, 35) # Side pods
painter.drawRect(-5, 9, 10, 10) # Back pod
painter.drawEllipse(-10, -81, 20, 100) # Main body
painter.drawRect(-17, 19, 34, 15) # Rear wing
painter.setBrush(Qt.black)
painter.drawPie(-5, -51, 10, 15, 0, 180 * 16)
painter.drawRect(-5, -44, 10, 10) # Cockpit
painter.save()
painter.translate(-20, -58)
painter.rotate(self.wheelsAngle)
painter.drawRect(-10, -7, 10, 15) # Front left
painter.restore()
painter.save()
painter.translate(20, -58)
painter.rotate(self.wheelsAngle)
painter.drawRect(0, -7, 10, 15) # Front right
painter.restore()
painter.drawRect(-30, 0, 12, 17) # Rear left
painter.drawRect(19, 0, 12, 17) # Rear right
class CarInterfaceAdaptor(QDBusAbstractAdaptor):
Q_CLASSINFO("D-Bus Interface", 'org.example.Examples.CarInterface')
Q_CLASSINFO("D-Bus Introspection", ''
' <interface name="org.example.Examples.CarInterface">\n'
' <method name="accelerate"/>\n'
' <method name="decelerate"/>\n'
' <method name="turnLeft"/>\n'
' <method name="turnRight"/>\n'
' </interface>\n'
'')
def __init__(self, parent):
super(CarInterfaceAdaptor, self).__init__(parent)
self.setAutoRelaySignals(True)
@pyqtSlot()
def accelerate(self):
self.parent().accelerate()
@pyqtSlot()
def decelerate(self):
self.parent().decelerate()
@pyqtSlot()
def turnLeft(self):
self.parent().turnLeft()
@pyqtSlot()
def turnRight(self):
self.parent().turnRight()
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
scene = QGraphicsScene()
scene.setSceneRect(-500, -500, 1000, 1000)
scene.setItemIndexMethod(QGraphicsScene.NoIndex)
car = Car()
scene.addItem(car)
view = QGraphicsView(scene)
view.setRenderHint(QPainter.Antialiasing)
view.setBackgroundBrush(Qt.darkGray)
view.setWindowTitle("Qt DBus Controlled Car")
view.resize(400, 300)
view.show()
a = CarInterfaceAdaptor(car)
connection = QDBusConnection.sessionBus()
connection.registerObject('/Car', car)
connection.registerService('org.example.CarExample')
rc = app.exec_()
# Make sure things get destroyed in the right order.
del view
sys.exit(rc)

View File

@@ -0,0 +1,111 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
from PyQt5.QtWidgets import QApplication, QWidget
from PyQt5.QtDBus import QDBusAbstractInterface, QDBusConnection
from ui_controller import Ui_Controller
class CarInterface(QDBusAbstractInterface):
def __init__(self, service, path, connection, parent=None):
super(CarInterface, self).__init__(service, path,
'org.example.Examples.CarInterface', connection, parent)
def accelerate(self):
self.asyncCall('accelerate')
def decelerate(self):
self.asyncCall('decelerate')
def turnLeft(self):
self.asyncCall('turnLeft')
def turnRight(self):
self.asyncCall('turnRight')
class Controller(QWidget):
def __init__(self, parent=None):
super(Controller, self).__init__(parent)
self.ui = Ui_Controller()
self.ui.setupUi(self)
self.car = CarInterface('org.example.CarExample', '/Car',
QDBusConnection.sessionBus(), self)
self.startTimer(1000)
def timerEvent(self, event):
if self.car.isValid():
self.ui.label.setText("connected")
else:
self.ui.label.setText("disconnected")
def on_accelerate_clicked(self):
self.car.accelerate()
def on_decelerate_clicked(self):
self.car.decelerate()
def on_left_clicked(self):
self.car.turnLeft()
def on_right_clicked(self):
self.car.turnRight()
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
controller = Controller()
controller.show()
sys.exit(app.exec_())

View File

@@ -0,0 +1,64 @@
<ui version="4.0" >
<class>Controller</class>
<widget class="QWidget" name="Controller" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>255</width>
<height>111</height>
</rect>
</property>
<property name="windowTitle" >
<string>Controller</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="1" column="1" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Controller</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QPushButton" name="decelerate" >
<property name="text" >
<string>Decelerate</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QPushButton" name="accelerate" >
<property name="text" >
<string>Accelerate</string>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QPushButton" name="right" >
<property name="text" >
<string>Right</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QPushButton" name="left" >
<property name="text" >
<string>Left</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'controller.ui'
#
# Created: Fri May 31 18:58:37 2013
# by: PyQt5 UI code generator 5.0-snapshot-dd808c1bcced
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Controller(object):
def setupUi(self, Controller):
Controller.setObjectName("Controller")
Controller.resize(255, 111)
self.gridlayout = QtWidgets.QGridLayout(Controller)
self.gridlayout.setContentsMargins(9, 9, 9, 9)
self.gridlayout.setSpacing(6)
self.gridlayout.setObjectName("gridlayout")
self.label = QtWidgets.QLabel(Controller)
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setObjectName("label")
self.gridlayout.addWidget(self.label, 1, 1, 1, 1)
self.decelerate = QtWidgets.QPushButton(Controller)
self.decelerate.setObjectName("decelerate")
self.gridlayout.addWidget(self.decelerate, 2, 1, 1, 1)
self.accelerate = QtWidgets.QPushButton(Controller)
self.accelerate.setObjectName("accelerate")
self.gridlayout.addWidget(self.accelerate, 0, 1, 1, 1)
self.right = QtWidgets.QPushButton(Controller)
self.right.setObjectName("right")
self.gridlayout.addWidget(self.right, 1, 2, 1, 1)
self.left = QtWidgets.QPushButton(Controller)
self.left.setObjectName("left")
self.gridlayout.addWidget(self.left, 1, 0, 1, 1)
self.retranslateUi(Controller)
QtCore.QMetaObject.connectSlotsByName(Controller)
def retranslateUi(self, Controller):
_translate = QtCore.QCoreApplication.translate
Controller.setWindowTitle(_translate("Controller", "Controller"))
self.label.setText(_translate("Controller", "Controller"))
self.decelerate.setText(_translate("Controller", "Decelerate"))
self.accelerate.setText(_translate("Controller", "Accelerate"))
self.right.setText(_translate("Controller", "Right"))
self.left.setText(_translate("Controller", "Left"))

23
designer/README Normal file
View File

@@ -0,0 +1,23 @@
Qt Designer is a capable graphical user interface designer that lets you
create and configure forms without writing code. GUIs created with
Qt Designer can be converted to Python code or created at run-time.
Some of the examples in this directory can be run from the example launcher;
others can only be used from within Qt Designer.
Documentation for these examples can be found via the "Tutorial and Examples"
link in the main Qt documentation.
Finding the PyQt Examples and Demos launcher
============================================
On Windows:
The launcher can be accessed via the Windows Start menu. Select the menu
entry entitled "Examples and Demos" entry in the submenu containing PyQt5.
On all platforms:
The source code for the launcher can be found in the examples/demos/qtdemo
directory in the PyQt package.

View File

@@ -0,0 +1,74 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtWidgets import QApplication, QWidget
from ui_calculatorform import Ui_CalculatorForm
class CalculatorForm(QWidget):
def __init__(self, parent=None):
super(CalculatorForm, self).__init__(parent)
self.ui = Ui_CalculatorForm()
self.ui.setupUi(self)
@pyqtSlot(int)
def on_inputSpinBox1_valueChanged(self, value):
self.ui.outputWidget.setText(str(value + self.ui.inputSpinBox2.value()))
@pyqtSlot(int)
def on_inputSpinBox2_valueChanged(self, value):
self.ui.outputWidget.setText(str(value + self.ui.inputSpinBox1.value()))
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
calculator = CalculatorForm()
calculator.show()
sys.exit(app.exec_())

View File

@@ -0,0 +1,284 @@
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>CalculatorForm</class>
<widget class="QWidget" name="CalculatorForm" >
<property name="objectName" >
<string notr="true" >CalculatorForm</string>
</property>
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle" >
<string>Calculator Form</string>
</property>
<layout class="QGridLayout" >
<property name="objectName" >
<string notr="true" />
</property>
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="6" >
<spacer>
<property name="objectName" >
<string notr="true" >horizontalSpacer</string>
</property>
<property name="geometry" >
<rect>
<x>239</x>
<y>9</y>
<width>152</width>
<height>52</height>
</rect>
</property>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="4" >
<widget class="QLabel" name="label_3_2" >
<property name="objectName" >
<string notr="true" >label_3_2</string>
</property>
<property name="geometry" >
<rect>
<x>169</x>
<y>9</y>
<width>20</width>
<height>52</height>
</rect>
</property>
<property name="text" >
<string>=</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="5" >
<layout class="QVBoxLayout" >
<property name="objectName" >
<string notr="true" />
</property>
<property name="margin" >
<number>1</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_2_2_2" >
<property name="objectName" >
<string notr="true" >label_2_2_2</string>
</property>
<property name="geometry" >
<rect>
<x>1</x>
<y>1</y>
<width>36</width>
<height>17</height>
</rect>
</property>
<property name="text" >
<string>Output</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="outputWidget" >
<property name="objectName" >
<string notr="true" >outputWidget</string>
</property>
<property name="geometry" >
<rect>
<x>1</x>
<y>24</y>
<width>36</width>
<height>27</height>
</rect>
</property>
<property name="frameShape" >
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignAbsolute|Qt::AlignBottom|Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignHorizontal_Mask|Qt::AlignJustify|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing|Qt::AlignVCenter|Qt::AlignVertical_Mask</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="2" >
<spacer>
<property name="objectName" >
<string notr="true" >verticalSpacer</string>
</property>
<property name="geometry" >
<rect>
<x>89</x>
<y>67</y>
<width>20</width>
<height>224</height>
</rect>
</property>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="3" >
<layout class="QVBoxLayout" >
<property name="objectName" >
<string notr="true" />
</property>
<property name="margin" >
<number>1</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_2" >
<property name="objectName" >
<string notr="true" >label_2</string>
</property>
<property name="geometry" >
<rect>
<x>1</x>
<y>1</y>
<width>46</width>
<height>19</height>
</rect>
</property>
<property name="text" >
<string>Input 2</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="inputSpinBox2" >
<property name="objectName" >
<string notr="true" >inputSpinBox2</string>
</property>
<property name="geometry" >
<rect>
<x>1</x>
<y>26</y>
<width>46</width>
<height>25</height>
</rect>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="label_3" >
<property name="objectName" >
<string notr="true" >label_3</string>
</property>
<property name="geometry" >
<rect>
<x>63</x>
<y>9</y>
<width>20</width>
<height>52</height>
</rect>
</property>
<property name="text" >
<string>+</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0" >
<layout class="QVBoxLayout" >
<property name="objectName" >
<string notr="true" />
</property>
<property name="margin" >
<number>1</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label" >
<property name="objectName" >
<string notr="true" >label</string>
</property>
<property name="geometry" >
<rect>
<x>1</x>
<y>1</y>
<width>46</width>
<height>19</height>
</rect>
</property>
<property name="text" >
<string>Input 1</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="inputSpinBox1" >
<property name="objectName" >
<string notr="true" >inputSpinBox1</string>
</property>
<property name="geometry" >
<rect>
<x>1</x>
<y>26</y>
<width>46</width>
<height>25</height>
</rect>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,94 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'calculatorform.ui'
#
# Created: Fri Jul 26 06:41:48 2013
# by: PyQt5 UI code generator 5.0.1-snapshot-2a99e59669ee
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_CalculatorForm(object):
def setupUi(self, CalculatorForm):
CalculatorForm.setObjectName("CalculatorForm")
CalculatorForm.resize(400, 300)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy(5), QtWidgets.QSizePolicy.Policy(5))
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(CalculatorForm.sizePolicy().hasHeightForWidth())
CalculatorForm.setSizePolicy(sizePolicy)
self.gridlayout = QtWidgets.QGridLayout(CalculatorForm)
self.gridlayout.setContentsMargins(9, 9, 9, 9)
self.gridlayout.setSpacing(6)
self.gridlayout.setObjectName("gridlayout")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.gridlayout.addItem(spacerItem, 0, 6, 1, 1)
self.label_3_2 = QtWidgets.QLabel(CalculatorForm)
self.label_3_2.setGeometry(QtCore.QRect(169, 9, 20, 52))
self.label_3_2.setAlignment(QtCore.Qt.AlignCenter)
self.label_3_2.setObjectName("label_3_2")
self.gridlayout.addWidget(self.label_3_2, 0, 4, 1, 1)
self.vboxlayout = QtWidgets.QVBoxLayout()
self.vboxlayout.setContentsMargins(1, 1, 1, 1)
self.vboxlayout.setSpacing(6)
self.vboxlayout.setObjectName("vboxlayout")
self.label_2_2_2 = QtWidgets.QLabel(CalculatorForm)
self.label_2_2_2.setGeometry(QtCore.QRect(1, 1, 36, 17))
self.label_2_2_2.setObjectName("label_2_2_2")
self.vboxlayout.addWidget(self.label_2_2_2)
self.outputWidget = QtWidgets.QLabel(CalculatorForm)
self.outputWidget.setGeometry(QtCore.QRect(1, 24, 36, 27))
self.outputWidget.setFrameShape(QtWidgets.QFrame.Box)
self.outputWidget.setFrameShadow(QtWidgets.QFrame.Sunken)
self.outputWidget.setAlignment(QtCore.Qt.AlignAbsolute|QtCore.Qt.AlignBottom|QtCore.Qt.AlignCenter|QtCore.Qt.AlignHCenter|QtCore.Qt.AlignHorizontal_Mask|QtCore.Qt.AlignJustify|QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignRight|QtCore.Qt.AlignTop|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter|QtCore.Qt.AlignVertical_Mask)
self.outputWidget.setObjectName("outputWidget")
self.vboxlayout.addWidget(self.outputWidget)
self.gridlayout.addLayout(self.vboxlayout, 0, 5, 1, 1)
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.gridlayout.addItem(spacerItem1, 1, 2, 1, 1)
self.vboxlayout1 = QtWidgets.QVBoxLayout()
self.vboxlayout1.setContentsMargins(1, 1, 1, 1)
self.vboxlayout1.setSpacing(6)
self.vboxlayout1.setObjectName("vboxlayout1")
self.label_2 = QtWidgets.QLabel(CalculatorForm)
self.label_2.setGeometry(QtCore.QRect(1, 1, 46, 19))
self.label_2.setObjectName("label_2")
self.vboxlayout1.addWidget(self.label_2)
self.inputSpinBox2 = QtWidgets.QSpinBox(CalculatorForm)
self.inputSpinBox2.setGeometry(QtCore.QRect(1, 26, 46, 25))
self.inputSpinBox2.setObjectName("inputSpinBox2")
self.vboxlayout1.addWidget(self.inputSpinBox2)
self.gridlayout.addLayout(self.vboxlayout1, 0, 3, 1, 1)
self.label_3 = QtWidgets.QLabel(CalculatorForm)
self.label_3.setGeometry(QtCore.QRect(63, 9, 20, 52))
self.label_3.setAlignment(QtCore.Qt.AlignCenter)
self.label_3.setObjectName("label_3")
self.gridlayout.addWidget(self.label_3, 0, 1, 1, 1)
self.vboxlayout2 = QtWidgets.QVBoxLayout()
self.vboxlayout2.setContentsMargins(1, 1, 1, 1)
self.vboxlayout2.setSpacing(6)
self.vboxlayout2.setObjectName("vboxlayout2")
self.label = QtWidgets.QLabel(CalculatorForm)
self.label.setGeometry(QtCore.QRect(1, 1, 46, 19))
self.label.setObjectName("label")
self.vboxlayout2.addWidget(self.label)
self.inputSpinBox1 = QtWidgets.QSpinBox(CalculatorForm)
self.inputSpinBox1.setGeometry(QtCore.QRect(1, 26, 46, 25))
self.inputSpinBox1.setObjectName("inputSpinBox1")
self.vboxlayout2.addWidget(self.inputSpinBox1)
self.gridlayout.addLayout(self.vboxlayout2, 0, 0, 1, 1)
self.retranslateUi(CalculatorForm)
QtCore.QMetaObject.connectSlotsByName(CalculatorForm)
def retranslateUi(self, CalculatorForm):
_translate = QtCore.QCoreApplication.translate
CalculatorForm.setWindowTitle(_translate("CalculatorForm", "Calculator Form"))
self.label_3_2.setText(_translate("CalculatorForm", "="))
self.label_2_2_2.setText(_translate("CalculatorForm", "Output"))
self.outputWidget.setText(_translate("CalculatorForm", "0"))
self.label_2.setText(_translate("CalculatorForm", "Input 2"))
self.label_3.setText(_translate("CalculatorForm", "+"))
self.label.setText(_translate("CalculatorForm", "Input 1"))

View File

@@ -0,0 +1,86 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Riverbank Computing Limited nor the names of
## its contributors may be used to endorse or promote products
## derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
##
#############################################################################
import sys
import os
from PyQt5.QtCore import QLibraryInfo, QProcess, QProcessEnvironment
from PyQt5.QtWidgets import QApplication, QMessageBox
app = QApplication(sys.argv)
QMessageBox.information(None, "PyQt Designer Plugins",
"<p>This example will start Qt Designer when you click the <b>OK</b> "
"button.</p>"
"<p>Before doing so it sets the <tt>PYQTDESIGNERPATH</tt> environment "
"variable to the <tt>python</tt> directory that is part of this "
"example. This directory contains all the example Python plugin "
"modules.</p>"
"<p>It also sets the <tt>PYTHONPATH</tt> environment variable to the "
"<tt>widgets</tt> directory that is also part of this example. This "
"directory contains the Python modules that implement the example "
"custom widgets.</p>"
"<p>All of the example custom widgets should then appear in "
"Designer's widget box in the <b>PyQt Examples</b> group.</p>")
# Tell Qt Designer where it can find the directory containing the plugins and
# Python where it can find the widgets.
base = os.path.dirname(__file__)
env = QProcessEnvironment.systemEnvironment()
env.insert('PYQTDESIGNERPATH', os.path.join(base, 'python'))
env.insert('PYTHONPATH', os.path.join(base, 'widgets'))
# Start Designer.
designer = QProcess()
designer.setProcessEnvironment(env)
designer_bin = QLibraryInfo.location(QLibraryInfo.BinariesPath)
if sys.platform == 'darwin':
designer_bin += '/Designer.app/Contents/MacOS/Designer'
else:
designer_bin += '/designer'
designer.start(designer_bin)
designer.waitForFinished(-1)
sys.exit(designer.exitCode())

View File

@@ -0,0 +1,195 @@
#!/usr/bin/env python
"""
analogclockplugin.py
An analog clock custom widget plugin for Qt Designer.
Copyright (C) 2006 David Boddie <david@boddie.org.uk>
Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
from PyQt5.QtGui import QIcon, QPixmap
from PyQt5.QtDesigner import QPyDesignerCustomWidgetPlugin
from analogclock import PyAnalogClock
class PyAnalogClockPlugin(QPyDesignerCustomWidgetPlugin):
"""PyAnalogClockPlugin(QPyDesignerCustomWidgetPlugin)
Provides a Python custom plugin for Qt Designer by implementing the
QDesignerCustomWidgetPlugin via a PyQt-specific custom plugin class.
"""
# The __init__() method is only used to set up the plugin and define its
# initialized variable.
def __init__(self, parent=None):
super(PyAnalogClockPlugin, self).__init__(parent)
self.initialized = False
# The initialize() and isInitialized() methods allow the plugin to set up
# any required resources, ensuring that this can only happen once for each
# plugin.
def initialize(self, core):
if self.initialized:
return
self.initialized = True
def isInitialized(self):
return self.initialized
# This factory method creates new instances of our custom widget with the
# appropriate parent.
def createWidget(self, parent):
return PyAnalogClock(parent)
# This method returns the name of the custom widget class that is provided
# by this plugin.
def name(self):
return "PyAnalogClock"
# Returns the name of the group in Qt Designer's widget box that this
# widget belongs to.
def group(self):
return "PyQt Examples"
# Returns the icon used to represent the custom widget in Qt Designer's
# widget box.
def icon(self):
return QIcon(_logo_pixmap)
# Returns a short description of the custom widget for use in a tool tip.
def toolTip(self):
return ""
# Returns a short description of the custom widget for use in a "What's
# This?" help message for the widget.
def whatsThis(self):
return ""
# Returns True if the custom widget acts as a container for other widgets;
# otherwise returns False. Note that plugins for custom containers also
# need to provide an implementation of the QDesignerContainerExtension
# interface if they need to add custom editing support to Qt Designer.
def isContainer(self):
return False
# Returns an XML description of a custom widget instance that describes
# default values for its properties. Each custom widget created by this
# plugin will be configured using this description.
def domXml(self):
return '<widget class="PyAnalogClock" name="analogClock">\n' \
' <property name="toolTip">\n' \
' <string>The current time</string>\n' \
' </property>\n' \
' <property name="whatsThis">\n' \
' <string>The analog clock widget displays the current ' \
'time.</string>\n' \
' </property>\n' \
'</widget>\n'
# Returns the module containing the custom widget class. It may include
# a module path.
def includeFile(self):
return "analogclock"
# Define the image used for the icon.
_logo_16x16_xpm = [
"16 16 58 1",
"L c #2d2d2d",
"N c #4f4f4f",
"K c #636363",
"J c #666666",
"I c #696969",
"D c #727272",
"F c #737373",
"O c #757575",
"G c #7f7f7f",
"o c #878787",
"t c #888888",
"Y c #898989",
"c c #8a8a8a",
"d c #8b8b8b",
"H c #8d8d8d",
"Q c #8f8f8f",
"b c #909090",
"M c #959595",
"g c #979797",
"n c #989898",
"x c #999999",
"0 c #9a9a9a",
"X c #9b9b9b",
"a c #9d9d9d",
"E c #9e9e9e",
"1 c #9f9f9f",
"T c #a0a0a0",
"v c #a1a1a1",
"r c #a2a2a2",
"B c #a6a6a6",
"R c #a7a7a7",
"3 c #a8a8a8",
"z c #aaaaaa",
"A c #ababab",
"m c #acacac",
"h c #adadad",
"u c #b1b1b1",
"q c #b2b2b2",
"V c #bfbfbf",
"W c #c6c6c6",
"w c #c7c7c7",
"s c #c8c8c8",
"p c #c9c9c9",
"k c #cdcdcd",
"l c #cfcfcf",
"2 c #d3d3d3",
"S c #d4d4d4",
"C c #d5d5d5",
"y c #d8d8d8",
"# c #d9d9d9",
"e c #dadada",
"i c #dbdbdb",
"P c #dcdcdc",
"U c #dfdfdf",
"j c #e1e1e1",
"f c #fbfbfb",
"Z c #fcfcfc",
". c #ffffff",
"....#abcdbae....",
"..fghijkljimnf..",
".fopjjjqrjjjstf.",
".gsjjjjuvjjjjwx.",
"yvjjjjjzbjjjjjAi",
"BCjjjjjaDjjjjjiE",
"bjjjjjjEFjjjjjjG",
"HjjjjjjIJjjjjjjc",
"HjjjjjjnKLtjjjjc",
"bjjjjjjj#MNOPjjQ",
"RSjjjjjjjj#mdPiE",
"#TjjjjjjjjjjUjzP",
".nVjjjjjjjjjjWX.",
".fEVjjjjjjjjWYZ.",
"..f012jjjj2EXZ..",
"....i3QccQ3P...."]
_logo_pixmap = QPixmap(_logo_16x16_xpm)

View File

@@ -0,0 +1,194 @@
#!/usr/bin/env python
"""
bubbleswidgetplugin.py
A bubbles widget custom widget plugin for Qt Designer.
Copyright (C) 2006 David Boddie <david@boddie.org.uk>
Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
from PyQt5.QtGui import QIcon, QPixmap
from PyQt5.QtDesigner import QPyDesignerCustomWidgetPlugin
from bubbleswidget import BubblesWidget
class BubblesPlugin(QPyDesignerCustomWidgetPlugin):
"""BubblesPlugin(QPyDesignerCustomWidgetPlugin)
Provides a Python custom plugin for Qt Designer by implementing the
QDesignerCustomWidgetPlugin via a PyQt-specific custom plugin class.
"""
# The __init__() method is only used to set up the plugin and define its
# initialized variable.
def __init__(self, parent=None):
super(BubblesPlugin, self).__init__(parent)
self.initialized = False
# The initialize() and isInitialized() methods allow the plugin to set up
# any required resources, ensuring that this can only happen once for each
# plugin.
def initialize(self, core):
if self.initialized:
return
self.initialized = True
def isInitialized(self):
return self.initialized
# This factory method creates new instances of our custom widget with the
# appropriate parent.
def createWidget(self, parent):
return BubblesWidget(parent)
# This method returns the name of the custom widget class that is provided
# by this plugin.
def name(self):
return "BubblesWidget"
# Returns the name of the group in Qt Designer's widget box that this
# widget belongs to.
def group(self):
return "PyQt Examples"
# Returns the icon used to represent the custom widget in Qt Designer's
# widget box.
def icon(self):
return QIcon(_logo_pixmap)
# Returns a short description of the custom widget for use in a tool tip.
def toolTip(self):
return ""
# Returns a short description of the custom widget for use in a "What's
# This?" help message for the widget.
def whatsThis(self):
return ""
# Returns True if the custom widget acts as a container for other widgets;
# otherwise returns False. Note that plugins for custom containers also
# need to provide an implementation of the QDesignerContainerExtension
# interface if they need to add custom editing support to Qt Designer.
def isContainer(self):
return False
# Returns an XML description of a custom widget instance that describes
# default values for its properties. Each custom widget created by this
# plugin will be configured using this description.
def domXml(self):
return '<widget class="BubblesWidget" name="bubblesWidget">\n' \
' <property name="toolTip">\n' \
' <string>Click and drag here</string>\n' \
' </property>\n' \
' <property name="whatsThis">\n' \
' <string>The bubbles widget displays colorful ' \
'bubbles.</string>\n' \
' </property>\n' \
'</widget>\n'
# Returns the module containing the custom widget class. It may include
# a module path.
def includeFile(self):
return "bubbleswidget"
# Define the image used for the icon.
_logo_16x16_xpm = [
"16 16 48 1",
"O c #d0cfcf",
"d c #d0d0d0",
"i c #d3d3d2",
"q c #d3d3d3",
"M c #dad7d7",
"g c #dad8d7",
"e c #dcd9d9",
"f c #e0dcdc",
"c c #e0e0e0",
"L c #e1dddb",
"D c #e1dddc",
"E c #e1e0e0",
"R c #e1e1e1",
"Q c #e2dedc",
"p c #e2dedd",
"j c #e3dfdf",
"b c #e7e7e7",
"S c #ebe4e3",
"z c #ebe5e3",
"r c #ece6e8",
"a c #eeeeee",
"N c #f6edeb",
"I c #f6eeed",
"o c #f6eeee",
"h c #f7f7f7",
"K c #f8efee",
"C c #f8efef",
"T c #f8f8f8",
"y c #f9f1f0",
"H c #f9f1f1",
"n c #f9f1f2",
"m c #f9f1f3",
"k c #f9f2f4",
"x c #faf3f5",
"l c #faf3f6",
"w c #faf3f7",
"G c #faf3f8",
"v c #fbf5fa",
"s c #fbf5fb",
"u c #fbf5fc",
"t c #fbf5fd",
"# c #fbfbfb",
"J c #fcf6fe",
"B c #fcf7fe",
"P c #fcfcfc",
"F c #fdf8ff",
"A c #fefbff",
". c #ffffff",
".....#abba#.....",
"...#cdeffgdc#...",
"..hijkllmnopqh..",
".#irstuvwxnyzq#.",
".cjs.ABuvwknCDE.",
"#dktAAFtsGlmHId#",
"aeluBFJusGlmHKga",
"bflvutusvGlmHKLb",
"bfmwvssvGwxmHKLb",
"agnxwGGGwlmnyKMa",
"#donklllxmnHCNOP",
".cpynmmmmnHCKQR.",
".#qzCHHHHyCKSqP.",
"..hqDIKKKKNQqT..",
"...#EdgLLMORP...",
".....#abbaP....."]
_logo_pixmap = QPixmap(_logo_16x16_xpm)

View File

@@ -0,0 +1,105 @@
#!/usr/bin/env python
"""
counterlabelplugin.py
A counter label custom widget plugin for Qt Designer.
Copyright (C) 2006 David Boddie <david@boddie.org.uk>
Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
from PyQt5.QtGui import QIcon
from PyQt5.QtDesigner import QPyDesignerCustomWidgetPlugin
from counterlabel import CounterLabel
class CounterLabelPlugin(QPyDesignerCustomWidgetPlugin):
"""CounterLabelPlugin(QPyDesignerCustomWidgetPlugin)
Provides a Python custom plugin for Qt Designer by implementing the
QDesignerCustomWidgetPlugin via a PyQt-specific custom plugin class.
"""
# The __init__() method is only used to set up the plugin and define its
# initialized variable.
def __init__(self, parent=None):
super(CounterLabelPlugin, self).__init__(parent)
self.initialized = False
def initialize(self, formEditor):
if self.initialized:
return
self.initialized = True
def isInitialized(self):
return self.initialized
# This factory method creates new instances of our custom widget with the
# appropriate parent.
def createWidget(self, parent):
widget = CounterLabel(parent)
widget.setValue(1)
return widget
# This method returns the name of the custom widget class that is provided
# by this plugin.
def name(self):
return "CounterLabel"
# Returns the name of the group in Qt Designer's widget box that this
# widget belongs to.
def group(self):
return "PyQt Examples"
# Returns the icon used to represent the custom widget in Qt Designer's
# widget box.
def icon(self):
return QIcon()
# Returns a short description of the custom widget for use in a tool tip.
def toolTip(self):
return ""
# Returns a short description of the custom widget for use in a "What's
# This?" help message for the widget.
def whatsThis(self):
return ""
# Returns True if the custom widget acts as a container for other widgets;
# otherwise returns False. Note that plugins for custom containers also
# need to provide an implementation of the QDesignerContainerExtension
# interface if they need to add custom editing support to Qt Designer.
def isContainer(self):
return False
# Returns an XML description of a custom widget instance that describes
# default values for its properties. Each custom widget created by this
# plugin will be configured using this description.
def domXml(self):
return '<widget class="CounterLabel" name="counterLabel" />\n'
# Returns the module containing the custom widget class. It may include
# a module path.
def includeFile(self):
return "counterlabel"

View File

@@ -0,0 +1,126 @@
#============================================================================#
# Designer plugins for PyDateEdit and PyDateTimeEdit #
#----------------------------------------------------------------------------#
# Copyright (c) 2008 by Denviso GmbH, <ulrich.berning@denviso.de> #
# #
# All Rights Reserved #
# #
# Permission to use, copy, modify, and distribute this software and its #
# documentation for any purpose and without fee is hereby granted, #
# provided that the above copyright notice appear in all copies and that #
# both that copyright notice and this permission notice appear in #
# supporting documentation. #
# #
# DENVISO DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS #
# SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY #
# AND FITNESS, IN NO EVENT SHALL DENVISO BE LIABLE FOR ANY #
# SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES #
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, #
# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER #
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE #
# OR PERFORMANCE OF THIS SOFTWARE. #
#----------------------------------------------------------------------------#
from PyQt5.QtGui import QIcon
from PyQt5.QtDesigner import QPyDesignerCustomWidgetPlugin
from datetimeedit import PyDateEdit, PyDateTimeEdit
#============================================================================#
# The group name in designer widgetbox #
#----------------------------------------------------------------------------#
DESIGNER_GROUP_NAME = "PyQt Examples"
#============================================================================#
# Plugin for PyDateEdit #
#----------------------------------------------------------------------------#
class PyDateEditPlugin(QPyDesignerCustomWidgetPlugin):
def __init__(self, parent=None):
super(PyDateEditPlugin, self).__init__(parent)
self.initialized = False
def initialize(self, formEditor):
if self.initialized:
return
self.initialized = True
def isInitialized(self):
return self.initialized
def isContainer(self):
return False
def icon(self):
return QIcon()
def domXml(self):
return '<widget class="PyDateEdit" name="pyDateEdit">\n</widget>\n'
def group(self):
return DESIGNER_GROUP_NAME
def includeFile(self):
return "datetimeedit"
def name(self):
return "PyDateEdit"
def toolTip(self):
return ""
def whatsThis(self):
return ""
def createWidget(self, parent):
return PyDateEdit(parent)
#============================================================================#
# Plugin for PyDateTimeEdit #
#----------------------------------------------------------------------------#
class PyDateTimeEditPlugin(QPyDesignerCustomWidgetPlugin):
def __init__(self, parent=None):
super(PyDateTimeEditPlugin, self).__init__(parent)
self.initialized = False
def initialize(self, formEditor):
if self.initialized:
return
self.initialized = True
def isInitialized(self):
return self.initialized
def isContainer(self):
return False
def icon(self):
return QIcon()
def domXml(self):
return '<widget class="PyDateTimeEdit" name="pyDateTimeEdit">\n</widget>\n'
def group(self):
return DESIGNER_GROUP_NAME
def includeFile(self):
return "datetimeedit"
def name(self):
return "PyDateTimeEdit"
def toolTip(self):
return ""
def whatsThis(self):
return ""
def createWidget(self, parent):
return PyDateTimeEdit(parent)

View File

@@ -0,0 +1,105 @@
#!/usr/bin/env python
"""
helloglwidgetplugin.py
A simple OpenGL custom widget plugin for Qt Designer.
Copyright (C) 2006 David Boddie <david@boddie.org.uk>
Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
from PyQt5.QtGui import QIcon
from PyQt5.QtDesigner import QPyDesignerCustomWidgetPlugin
from helloglwidget import HelloGLWidget
class HelloGLWidgetPlugin(QPyDesignerCustomWidgetPlugin):
"""HelloGLWidgetPlugin(QPyDesignerCustomWidgetPlugin)
Provides a Python custom plugin for Qt Designer by implementing the
QDesignerCustomWidgetPlugin via a PyQt-specific custom plugin class.
"""
# The __init__() method is only used to set up the plugin and define its
# initialized variable.
def __init__(self, parent=None):
super(HelloGLWidgetPlugin, self).__init__(parent)
self.initialized = False
# The initialize() and isInitialized() methods allow the plugin to set up
# any required resources, ensuring that this can only happen once for each
# plugin.
def initialize(self, core):
if self.initialized:
return
self.initialized = True
def isInitialized(self):
return self.initialized
# This factory method creates new instances of our custom widget with the
# appropriate parent.
def createWidget(self, parent):
return HelloGLWidget(parent)
# This method returns the name of the custom widget class that is provided
# by this plugin.
def name(self):
return "HelloGLWidget"
# Returns the name of the group in Qt Designer's widget box that this
# widget belongs to.
def group(self):
return "PyQt Examples"
# Returns the icon used to represent the custom widget in Qt Designer's
# widget box.
def icon(self):
return QIcon()
# Returns a short description of the custom widget for use in a tool tip.
def toolTip(self):
return ""
# Returns a short description of the custom widget for use in a "What's
# This?" help message for the widget.
def whatsThis(self):
return ""
# Returns True if the custom widget acts as a container for other widgets;
# otherwise returns False. Note that plugins for custom containers also
# need to provide an implementation of the QDesignerContainerExtension
# interface if they need to add custom editing support to Qt Designer.
def isContainer(self):
return False
# Returns an XML description of a custom widget instance that describes
# default values for its properties. Each custom widget created by this
# plugin will be configured using this description.
def domXml(self):
return '<widget class="HelloGLWidget" name="helloGLWidget" />\n'
# Returns the module containing the custom widget class. It may include
# a module path.
def includeFile(self):
return "helloglwidget"

View File

@@ -0,0 +1,142 @@
#============================================================================#
# PyQt5 port of the designer/containerextension example from Qt v4.x #
#----------------------------------------------------------------------------#
import sip
from PyQt5.QtGui import QIcon
from PyQt5.QtDesigner import (QDesignerFormWindowInterface, QExtensionFactory,
QPyDesignerContainerExtension, QPyDesignerCustomWidgetPlugin,
QPyDesignerPropertySheetExtension)
from multipagewidget import PyMultiPageWidget
Q_TYPEID = {
'QDesignerContainerExtension': 'org.qt-project.Qt.Designer.Container',
'QDesignerPropertySheetExtension': 'org.qt-project.Qt.Designer.PropertySheet'
}
#============================================================================#
# ContainerExtension #
#----------------------------------------------------------------------------#
class MultiPageWidgetContainerExtension(QPyDesignerContainerExtension):
def __init__(self, widget, parent=None):
super(MultiPageWidgetContainerExtension, self).__init__(parent)
self._widget = widget
def addWidget(self, widget):
self._widget.addPage(widget)
def count(self):
return self._widget.count()
def currentIndex(self):
return self._widget.getCurrentIndex()
def insertWidget(self, index, widget):
self._widget.insertPage(index, widget)
def remove(self, index):
self._widget.removePage(index)
def setCurrentIndex(self, index):
self._widget.setCurrentIndex(index)
def widget(self, index):
return self._widget.widget(index)
#============================================================================#
# ExtensionFactory #
#----------------------------------------------------------------------------#
class MultiPageWidgetExtensionFactory(QExtensionFactory):
def __init__(self, parent=None):
super(MultiPageWidgetExtensionFactory, self).__init__(parent)
def createExtension(self, obj, iid, parent):
if iid != Q_TYPEID['QDesignerContainerExtension']:
return None
if isinstance(obj, PyMultiPageWidget):
return MultiPageWidgetContainerExtension(obj, parent)
return None
#============================================================================#
# CustomWidgetPlugin #
#----------------------------------------------------------------------------#
class MultiPageWidgetPlugin(QPyDesignerCustomWidgetPlugin):
def __init__(self, parent=None):
super(MultiPageWidgetPlugin, self).__init__(parent)
self.initialized = False
def initialize(self, formEditor):
if self.initialized:
return
manager = formEditor.extensionManager()
if manager:
self.factory = MultiPageWidgetExtensionFactory(manager)
manager.registerExtensions(self.factory, Q_TYPEID['QDesignerContainerExtension'])
self.initialized = True
def isInitialized(self):
return self.initialized
def createWidget(self, parent):
widget = PyMultiPageWidget(parent)
widget.currentIndexChanged.connect(self.currentIndexChanged)
widget.pageTitleChanged.connect(self.pageTitleChanged)
return widget
def name(self):
return "PyMultiPageWidget"
def group(self):
return "PyQt Examples"
def icon(self):
return QIcon()
def toolTip(self):
return ""
def whatsThis(self):
return ""
def isContainer(self):
return True
def domXml(self):
return ('<widget class="PyMultiPageWidget" name="multipagewidget">'
' <widget class="QWidget" name="page" />'
'</widget>')
def includeFile(self):
return "multipagewidget"
def currentIndexChanged(self, index):
widget = self.sender()
if widget and isinstance(widget, PyMultiPageWidget):
form = QDesignerFormWindowInterface.findFormWindow(widget)
if form:
form.emitSelectionChanged()
def pageTitleChanged(self, title):
widget = self.sender()
if widget and isinstance(widget, PyMultiPageWidget):
page = widget.widget(widget.getCurrentIndex())
form = QDesignerFormWindowInterface.findFormWindow(widget)
if form:
editor = form.core()
manager = editor.extensionManager()
sheet = manager.extension(page, Q_TYPEID['QDesignerPropertySheetExtension'])
# This explicit cast is necessary here
sheet = sip.cast(sheet, QPyDesignerPropertySheetExtension)
propertyIndex = sheet.indexOf('windowTitle')
sheet.setChanged(propertyIndex, True)
#============================================================================#
# EOF #
#----------------------------------------------------------------------------#

View File

@@ -0,0 +1,175 @@
#!/usr/bin/env python
"""
polygonwidgetplugin.py
A polygon widget custom widget plugin for Qt Designer.
Copyright (C) 2006 David Boddie <david@boddie.org.uk>
Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
from PyQt5.QtGui import QIcon, QPixmap
from PyQt5.QtDesigner import QPyDesignerCustomWidgetPlugin
from polygonwidget import PolygonWidget
class PolygonWidgetPlugin(QPyDesignerCustomWidgetPlugin):
"""PolygonWidgetPlugin(QPyDesignerCustomWidgetPlugin)
Provides a Python custom plugin for Qt Designer by implementing the
QDesignerCustomWidgetPlugin via a PyQt-specific custom plugin class.
"""
# The __init__() method is only used to set up the plugin and define its
# initialized variable.
def __init__(self, parent=None):
super(PolygonWidgetPlugin, self).__init__(parent)
self.initialized = False
# The initialize() and isInitialized() methods allow the plugin to set up
# any required resources, ensuring that this can only happen once for each
# plugin.
def initialize(self, core):
if self.initialized:
return
self.initialized = True
def isInitialized(self):
return self.initialized
# This factory method creates new instances of our custom widget with the
# appropriate parent.
def createWidget(self, parent):
return PolygonWidget(parent)
# This method returns the name of the custom widget class that is provided
# by this plugin.
def name(self):
return "PolygonWidget"
# Returns the name of the group in Qt Designer's widget box that this
# widget belongs to.
def group(self):
return "PyQt Examples"
# Returns the icon used to represent the custom widget in Qt Designer's
# widget box.
def icon(self):
return QIcon(_logo_pixmap)
# Returns a short description of the custom widget for use in a tool tip.
def toolTip(self):
return ""
# Returns a short description of the custom widget for use in a "What's
# This?" help message for the widget.
def whatsThis(self):
return ""
# Returns True if the custom widget acts as a container for other widgets;
# otherwise returns False. Note that plugins for custom containers also
# need to provide an implementation of the QDesignerContainerExtension
# interface if they need to add custom editing support to Qt Designer.
def isContainer(self):
return False
# Returns an XML description of a custom widget instance that describes
# default values for its properties. Each custom widget created by this
# plugin will be configured using this description.
def domXml(self):
return '<widget class="PolygonWidget" name="polygonWidget" />\n'
# Returns the module containing the custom widget class. It may include
# a module path.
def includeFile(self):
return "polygonwidget"
# Define the image used for the icon.
_logo_16x16_xpm = [
"16 16 46 1",
". c #a5a5dc",
"l c #a69fd6",
"k c #a7a5da",
"h c #a7a6dc",
"a c #a7a7de",
"Q c #a8a5da",
"s c #a9a7d7",
"R c #a9a9e0",
"z c #abaad4",
"E c #afafda",
"M c #afafdb",
"K c #b0a8e2",
"o c #b1afe4",
"p c #b2b2d7",
"# c #b2b2ed",
"i c #b39eb6",
"F c #b3b3e1",
"e c #b4b4ef",
"t c #b58bab",
"d c #b6b6f2",
"n c #b798b8",
"P c #b798b9",
"c c #b8b6f2",
"D c #b8b89c",
"m c #b9648d",
"J c #ba84b0",
"A c #bdbdfb",
"f c #bfbffe",
"g c #c06996",
"b c #c0c0ff",
"B c #cbb889",
"L c #cbb989",
"O c #cfcf87",
"I c #d09585",
"w c #d0cf86",
"x c #dede81",
"G c #e8e87c",
"q c #edde7b",
"N c #f1e07b",
"v c #f2e07b",
"H c #f6e57c",
"j c #fb917e",
"u c #ffb580",
"r c #ffda80",
"C c #fffe80",
"y c #ffff80",
".##############a",
"#bbbbbbbbcdbbbbe",
"#bbbbbbbfghbbbbe",
"#bbbbbbbijkbbbbe",
"#blmnobpqrsbbbbe",
"#bbtuvwxyyzbbbbe",
"#bbABCyyyyDEfbbe",
"#bbbFGyyyyyHIJKe",
"#bbbFGyyyyyHIJKe",
"#bbALCyyyyDMfbbe",
"#bbtuNOxyyzbbbbe",
"#blmPobpqrsbbbbe",
"#bbbbbbbijQbbbbe",
"#bbbbbbbfghbbbbe",
"#bbbbbbbbcdbbbbe",
"aeeeeeeeeeeeeeeR"]
_logo_pixmap = QPixmap(_logo_16x16_xpm)

View File

@@ -0,0 +1,168 @@
# A demonstration custom widget plugin for Qt Designer.
#
# Copyright (c) 2013 Riverbank Computing Limited
from PyQt5.QtGui import QIcon, QPixmap
from PyQt5.QtDesigner import QPyDesignerCustomWidgetPlugin
from pydemo import PyDemo
# This class implements the interface expected by Qt Designer to access the
# custom widget. See the description of the QDesignerCustomWidgetInterface
# class for full details.
class PyDemoPlugin(QPyDesignerCustomWidgetPlugin):
# Initialise the instance.
def __init__(self, parent=None):
super(PyDemoPlugin, self).__init__(parent)
self._initialized = False
# Initialise the custom widget for use with the specified formEditor
# interface.
def initialize(self, formEditor):
if self._initialized:
return
self._initialized = True
# Return True if the custom widget has been intialised.
def isInitialized(self):
return self._initialized
# Return a new instance of the custom widget with the given parent.
def createWidget(self, parent):
return PyDemo(parent)
# Return the name of the class that implements the custom widget.
def name(self):
return "PyDemo"
# Return the name of the group to which the custom widget belongs. A new
# group will be created if it doesn't already exist.
def group(self):
return "PyQt Examples"
# Return the icon used to represent the custom widget in Designer's widget
# box.
def icon(self):
return QIcon(_logo_pixmap)
# Return a short description of the custom widget used by Designer in a
# tool tip.
def toolTip(self):
return "PyQt demonstration widget"
# Return a full description of the custom widget used by Designer in
# "What's This?" help for the widget.
def whatsThis(self):
return "PyDemo is a demonstration custom widget written in Python " \
"using PyQt."
# Return True if the custom widget acts as a container for other widgets.
def isContainer(self):
return False
# Return an XML fragment that allows the default values of the custom
# widget's properties to be overridden.
def domXml(self):
return '<widget class="PyDemo" name="pyDemo">\n' \
' <property name="toolTip" >\n' \
' <string>PyQt demonstration widget</string>\n' \
' </property>\n' \
' <property name="whatsThis" >\n' \
' <string>PyDemo is a demonstration custom widget written ' \
'in Python using PyQt.</string>\n' \
' </property>\n' \
'</widget>\n'
# Return the name of the module containing the class that implements the
# custom widget. It may include a module path.
def includeFile(self):
return "pydemo"
# Define the image used for the icon.
_logo_16x16_xpm = [
"16 16 61 1",
"6 c #5bbd7c",
"a c #7aaada",
"h c #7eaddb",
"n c #7faddb",
"E c #82afdc",
"x c #83b0dd",
"C c #84b0dd",
"z c #84b1dd",
"B c #85b1dd",
"u c #87b2de",
"U c #9ec1e4",
"Z c #9fc1e4",
"H c #a1c3e5",
"Y c #a5c5e4",
"V c #a6c6e4",
"P c #afcbe2",
"S c #afcbe3",
"O c #b1cde9",
"T c #b2cee9",
"t c #b4cee3",
"r c #b5cee3",
"q c #c2d8ee",
"0 c #c7dbef",
"f c #cedddb",
"b c #cfdddb",
"1 c #d0e1f2",
"J c #d8e2d2",
"I c #d9e2d2",
"# c #dfeaf6",
"g c #e3edf7",
"K c #ecf2f9",
"N c #ecf3f9",
"o c #eeecbb",
"i c #f2edb2",
"l c #f2edb3",
"w c #f6eea6",
"v c #f7eea6",
"W c #fcee8c",
"m c #fcfdfe",
"L c #fdec73",
"k c #fedd00",
"e c #fede06",
"p c #fede07",
"j c #fee013",
"X c #fee015",
"s c #fee223",
"d c #fee32c",
"A c #fee749",
"Q c #fee850",
"R c #fee851",
"D c #fee854",
"y c #feea65",
"M c #feec74",
"c c #feed7c",
"F c #feee85",
"G c #feee86",
"5 c #fef095",
"4 c #fef195",
"3 c #fef6bb",
"2 c #fefdf5",
". c #fefefe",
"..#abcdeedcfa#..",
".ghijkkkkkkjlhg.",
"mnopkkkkkkkkponm",
"qrskkkkkkkkkkstq",
"uvkkkkkkkkkkkkwu",
"xykkkkkkkkkkkkyx",
"zAkkkkkkkkkkkkAB",
"CDkkkkkkkkkkkkDC",
"EFkkkkkkkkkkkkGE",
"HIekkkkkkkkkkeJH",
"KBLkkkkkkkkkkMBN",
".OPQkkkkkkkkRST.",
"..UVWXkkkkXWYZ..",
"...0123453210...",
"6666666666666666",
"BBBBBBBBBBBBBBBB"]
_logo_pixmap = QPixmap(_logo_16x16_xpm)

View File

@@ -0,0 +1,143 @@
#!/usr/bin/env python
"""
pythonconsoleplugin.py
A Python console custom widget plugin for Qt Designer.
Copyright (C) 2006 David Boddie <david@boddie.org.uk>
Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
from PyQt5.QtGui import QIcon, QPixmap
from PyQt5.QtDesigner import QPyDesignerCustomWidgetPlugin
from pythonconsolewidget import PythonConsoleWidget
class PythonConsolePlugin(QPyDesignerCustomWidgetPlugin):
"""PythonConsolePlugin(QPyDesignerCustomWidgetPlugin)
Provides a Python custom plugin for Qt Designer by implementing the
QDesignerCustomWidgetPlugin via a PyQt-specific custom plugin class.
"""
# The __init__() method is only used to set up the plugin and define its
# initialized variable.
def __init__(self, parent=None):
super(PythonConsolePlugin, self).__init__(parent)
self.initialized = False
# The initialize() and isInitialized() methods allow the plugin to set up
# any required resources, ensuring that this can only happen once for each
# plugin.
def initialize(self, core):
if self.initialized:
return
self.initialized = True
def isInitialized(self):
return self.initialized
# This factory method creates new instances of our custom widget with the
# appropriate parent.
def createWidget(self, parent):
return PythonConsoleWidget(parent)
# This method returns the name of the custom widget class that is provided
# by this plugin.
def name(self):
return "PythonConsoleWidget"
# Returns the name of the group in Qt Designer's widget box that this
# widget belongs to.
def group(self):
return "PyQt Examples"
# Returns the icon used to represent the custom widget in Qt Designer's
# widget box.
def icon(self):
return QIcon(_logo_pixmap)
# Returns a short description of the custom widget for use in a tool tip.
def toolTip(self):
return ""
# Returns a short description of the custom widget for use in a "What's
# This?" help message for the widget.
def whatsThis(self):
return ""
# Returns True if the custom widget acts as a container for other widgets;
# otherwise returns False. Note that plugins for custom containers also
# need to provide an implementation of the QDesignerContainerExtension
# interface if they need to add custom editing support to Qt Designer.
def isContainer(self):
return False
# Returns an XML description of a custom widget instance that describes
# default values for its properties. Each custom widget created by this
# plugin will be configured using this description.
def domXml(self):
return '<widget class="PythonConsoleWidget" name="consoleWidget">\n' \
' <property name="toolTip" >\n' \
' <string>Python console</string>\n' \
' </property>\n' \
' <property name="whatsThis" >\n' \
' <string>The Python console widget can be used to explore ' \
'Qt Designer.</string>\n' \
' </property>\n' \
'</widget>\n'
# Returns the module containing the custom widget class. It may include
# a module path.
def includeFile(self):
return "pythonconsolewidget"
# Define the image used for the icon.
_logo_16x16_xpm = [
"16 16 6 1",
" c None",
". c #FFFFFF",
"a c #000000",
"b c #808080",
"c c #C0C0C0",
"d c #404040",
"................",
"................",
"................",
".aa..aa..aa.....",
"..aa..aa..aa....",
"...aa..aa..aa...",
"....aa..aa..aa..",
".....aa..aa..aa.",
".....aa..aa..aa.",
"....aa..aa..aa..",
"...aa..aa..aa...",
"..aa..aa..aa....",
".aa..aa..aa.....",
"................",
"................",
"................"]
_logo_pixmap = QPixmap(_logo_16x16_xpm)

View File

@@ -0,0 +1,189 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
from PyQt5.QtCore import (pyqtProperty, pyqtSignal, pyqtSlot, QPoint, QSize,
Qt, QTime, QTimer)
from PyQt5.QtGui import QBrush, QColor, QPainter, QPen, QPolygon
from PyQt5.QtWidgets import QApplication, QWidget
class PyAnalogClock(QWidget):
"""PyAnalogClock(QWidget)
Provides an analog clock custom widget with signals, slots and properties.
The implementation is based on the Analog Clock example provided with both
Qt and PyQt.
"""
# Emitted when the clock's time changes.
timeChanged = pyqtSignal(QTime)
# Emitted when the clock's time zone changes.
timeZoneChanged = pyqtSignal(int)
def __init__(self, parent=None):
super(PyAnalogClock, self).__init__(parent)
self.timeZoneOffset = 0
timer = QTimer(self)
timer.timeout.connect(self.update)
timer.timeout.connect(self.updateTime)
timer.start(1000)
self.setWindowTitle("Analog Clock")
self.resize(200, 200)
self.hourHand = QPolygon([
QPoint(7, 8),
QPoint(-7, 8),
QPoint(0, -40)
])
self.minuteHand = QPolygon([
QPoint(7, 8),
QPoint(-7, 8),
QPoint(0, -70)
])
self.hourColor = QColor(0, 127, 0)
self.minuteColor = QColor(0, 127, 127, 191)
def paintEvent(self, event):
side = min(self.width(), self.height())
time = QTime.currentTime()
time = time.addSecs(self.timeZoneOffset * 3600)
painter = QPainter()
painter.begin(self)
painter.setRenderHint(QPainter.Antialiasing)
painter.translate(self.width() / 2, self.height() / 2)
painter.scale(side / 200.0, side / 200.0)
painter.setPen(Qt.NoPen)
painter.setBrush(QBrush(self.hourColor))
painter.save()
painter.rotate(30.0 * ((time.hour() + time.minute() / 60.0)))
painter.drawConvexPolygon(self.hourHand)
painter.restore()
painter.setPen(self.hourColor)
for i in range(0, 12):
painter.drawLine(88, 0, 96, 0)
painter.rotate(30.0)
painter.setPen(Qt.NoPen)
painter.setBrush(QBrush(self.minuteColor))
painter.save()
painter.rotate(6.0 * (time.minute() + time.second() / 60.0))
painter.drawConvexPolygon(self.minuteHand)
painter.restore()
painter.setPen(QPen(self.minuteColor))
for j in range(0, 60):
if (j % 5) != 0:
painter.drawLine(92, 0, 96, 0)
painter.rotate(6.0)
painter.end()
def minimumSizeHint(self):
return QSize(50, 50)
def sizeHint(self):
return QSize(100, 100)
def updateTime(self):
self.timeChanged.emit(QTime.currentTime())
# The timeZone property is implemented using the getTimeZone() getter
# method, the setTimeZone() setter method, and the resetTimeZone() method.
# The getter just returns the internal time zone value.
def getTimeZone(self):
return self.timeZoneOffset
# The setTimeZone() method is also defined to be a slot. The @pyqtSlot
# decorator is used to tell PyQt which argument type the method expects,
# and is especially useful when you want to define slots with the same
# name that accept different argument types.
@pyqtSlot(int)
def setTimeZone(self, value):
self.timeZoneOffset = value
self.timeZoneChanged.emit(value)
self.update()
# Qt's property system supports properties that can be reset to their
# original values. This method enables the timeZone property to be reset.
def resetTimeZone(self):
self.timeZoneOffset = 0
self.timeZoneChanged.emit(0)
self.update()
# Qt-style properties are defined differently to Python's properties.
# To declare a property, we call pyqtProperty() to specify the type and,
# in this case, getter, setter and resetter methods.
timeZone = pyqtProperty(int, getTimeZone, setTimeZone, resetTimeZone)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
clock = PyAnalogClock()
clock.show()
sys.exit(app.exec_())

View File

@@ -0,0 +1,335 @@
#!/usr/bin/env python
"""
bubbleswidget.py
A PyQt custom widget example for Qt Designer.
Copyright (C) 2006 David Boddie <david@boddie.org.uk>
Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import random
from PyQt5.QtCore import (pyqtProperty, pyqtSignal, pyqtSlot, QPointF, QRectF,
QSize, QSizeF, Qt, QTimer)
from PyQt5.QtGui import QBrush, QColor, QPainter, QPen, QRadialGradient
from PyQt5.QtWidgets import QApplication, QWidget
class BaseClass(QWidget):
"""BaseClass(QWidget)
Provides a base custom widget class to show that properties implemented
in Python can be inherited and shown as belonging to distinct classes
in Qt Designer's Property Editor.
"""
def __init__(self, parent=None):
super(BaseClass, self).__init__(parent)
self.resetAuthor()
# Define getter, setter and resetter methods for the author property.
def getAuthor(self):
return self._author
def setAuthor(self, name):
self._author = name
def resetAuthor(self):
self._author = "David Boddie"
author = pyqtProperty(str, getAuthor, setAuthor, resetAuthor)
class Bubble:
"""Bubble
Provides a class to represent individual bubbles in a BubblesWidget.
Each Bubble instance can render itself onto a paint device using a
QPainter passed to its drawBubble() method.
"""
def __init__(self, position, radius, speed, innerColor, outerColor):
self.position = position
self.radius = radius
self.speed = speed
self.innerColor = innerColor
self.outerColor = outerColor
self.updateBrush()
def updateBrush(self):
gradient = QRadialGradient(
QPointF(self.radius, self.radius), self.radius,
QPointF(self.radius*0.5, self.radius*0.5))
gradient.setColorAt(0, QColor(255, 255, 255, 255))
gradient.setColorAt(0.25, self.innerColor)
gradient.setColorAt(1, self.outerColor)
self.brush = QBrush(gradient)
def drawBubble(self, painter):
painter.save()
painter.translate(self.position.x() - self.radius,
self.position.y() - self.radius)
painter.setBrush(self.brush)
painter.drawEllipse(0.0, 0.0, 2*self.radius, 2*self.radius)
painter.restore()
class BubblesWidget(BaseClass):
"""BubblesWidget(BaseClass)
Provides a custom widget that shows a number of rising bubbles.
Various properties are defined so that the user can customize the
appearance of the widget, and change the number and behaviour of the
bubbles shown.
"""
# We define two signals that are used to indicate changes to the status
# of the widget.
bubbleLeft = pyqtSignal()
bubblesRemaining = pyqtSignal(int)
def __init__(self, parent=None):
super(BubblesWidget, self).__init__(parent)
self.pen = QPen(QColor("#cccccc"))
self.bubbles = []
self.backgroundColor1 = self.randomColor()
self.backgroundColor2 = self.randomColor().darker(150)
self.newBubble = None
random.seed()
self.animation_timer = QTimer(self)
self.animation_timer.setSingleShot(False)
self.animation_timer.timeout.connect(self.animate)
self.animation_timer.start(25)
self.bubbleTimer = QTimer()
self.bubbleTimer.setSingleShot(False)
self.bubbleTimer.timeout.connect(self.expandBubble)
self.setMouseTracking(True)
self.setMinimumSize(QSize(200, 200))
self.setWindowTitle("Bubble Maker")
def paintEvent(self, event):
background = QRadialGradient(QPointF(self.rect().topLeft()), 500,
QPointF(self.rect().bottomRight()))
background.setColorAt(0, self.backgroundColor1)
background.setColorAt(1, self.backgroundColor2)
painter = QPainter()
painter.begin(self)
painter.setRenderHint(QPainter.Antialiasing)
painter.fillRect(event.rect(), QBrush(background))
painter.setPen(self.pen)
for bubble in self.bubbles:
if QRectF(bubble.position - QPointF(bubble.radius, bubble.radius),
QSizeF(2*bubble.radius, 2*bubble.radius)).intersects(QRectF(event.rect())):
bubble.drawBubble(painter)
if self.newBubble:
self.newBubble.drawBubble(painter)
painter.end()
def mousePressEvent(self, event):
if event.button() == Qt.LeftButton and self.newBubble is None:
self.newBubble = Bubble(QPointF(event.pos()), 4.0,
1.0 + random.random() * 7,
self.randomColor(), self.randomColor())
self.bubbleTimer.start(50)
event.accept()
def mouseMoveEvent(self, event):
if self.newBubble:
self.update(
QRectF(self.newBubble.position - \
QPointF(self.newBubble.radius + 1, self.newBubble.radius + 1),
QSizeF(2*self.newBubble.radius + 2, 2*self.newBubble.radius + 2)).toRect()
)
self.newBubble.position = QPointF(event.pos())
self.update(
QRectF(self.newBubble.position - \
QPointF(self.newBubble.radius + 1, self.newBubble.radius + 1),
QSizeF(2*self.newBubble.radius + 2, 2*self.newBubble.radius + 2)).toRect()
)
event.accept()
def mouseReleaseEvent(self, event):
if self.newBubble:
self.bubbles.append(self.newBubble)
self.newBubble = None
self.bubbleTimer.stop()
self.bubblesRemaining.emit(len(self.bubbles))
event.accept()
def expandBubble(self):
if self.newBubble:
self.newBubble.radius = min(self.newBubble.radius + 4.0,
self.width()/8.0, self.height()/8.0)
self.update(
QRectF(self.newBubble.position - \
QPointF(self.newBubble.radius + 1, self.newBubble.radius + 1),
QSizeF(2*self.newBubble.radius + 2, 2*self.newBubble.radius + 2)).toRect()
)
self.newBubble.updateBrush()
def randomColor(self):
red = 205 + random.random() * 50
green = 205 + random.random() * 50
blue = 205 + random.random() * 50
alpha = 91 + random.random() * 100
return QColor(red, green, blue, alpha)
def animate(self):
bubbles = []
left = False
for bubble in self.bubbles:
bubble.position = bubble.position + QPointF(0, -bubble.speed)
self.update(
QRectF(bubble.position - QPointF(bubble.radius + 1,
bubble.radius + 1),
QSizeF(2*bubble.radius + 2, 2*bubble.radius + 2 + bubble.speed)).toRect())
if bubble.position.y() + bubble.radius > 0:
bubbles.append(bubble)
else:
self.bubbleLeft.emit()
left = True
if self.newBubble:
self.update(
QRectF(self.newBubble.position - QPointF(
self.newBubble.radius + 1,
self.newBubble.radius + 1),
QSizeF(2*self.newBubble.radius + 2, 2*self.newBubble.radius + 2)).toRect())
self.bubbles = bubbles
if left:
self.bubblesRemaining.emit(len(self.bubbles))
def sizeHint(self):
return QSize(200, 200)
# We provide getter and setter methods for the numberOfBubbles property.
def getBubbles(self):
return len(self.bubbles)
# The setBubbles() method can also be used as a slot.
@pyqtSlot(int)
def setBubbles(self, value):
value = max(0, value)
while len(self.bubbles) < value:
newBubble = Bubble(QPointF(random.random() * self.width(),
random.random() * self.height()),
4.0 + random.random() * 20,
1.0 + random.random() * 7,
self.randomColor(), self.randomColor())
newBubble.updateBrush()
self.bubbles.append(newBubble)
self.bubbles = self.bubbles[:value]
self.bubblesRemaining.emit(value)
self.update()
numberOfBubbles = pyqtProperty(int, getBubbles, setBubbles)
# We provide getter and setter methods for the color1 and color2
# properties. The red, green and blue components for the QColor
# values stored in these properties can be edited individually in
# Qt Designer.
def getColor1(self):
return self.backgroundColor1
def setColor1(self, value):
self.backgroundColor1 = QColor(value)
self.update()
color1 = pyqtProperty(QColor, getColor1, setColor1)
def getColor2(self):
return self.backgroundColor2
def setColor2(self, value):
self.backgroundColor2 = QColor(value)
self.update()
color2 = pyqtProperty(QColor, getColor2, setColor2)
# The stop() and start() slots provide simple control over the animation
# of the bubbles in the widget.
@pyqtSlot()
def stop(self):
self.animation_timer.stop()
@pyqtSlot()
def start(self):
self.animation_timer.start(25)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
widget = BubblesWidget()
widget.show()
sys.exit(app.exec_())

View File

@@ -0,0 +1,177 @@
#!/usr/bin/env python
"""
counterlabel.py
A PyQt custom widget example for Qt Designer.
Copyright (C) 2006 David Boddie <david@boddie.org.uk>
Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QRectF, QSize, Qt
from PyQt5.QtGui import QFont, QFontMetricsF, QPainter
from PyQt5.QtWidgets import QApplication, QWidget
class CounterLabel(QWidget):
"""CounterLabel(QWidget)
Provides a custom label widget to be used as a counter, with signals
similar to those provided by QAbstractSlider subclasses and properties
similar to those provided by QLabel.
"""
# We define two signals that are used to indicate changes to the status
# of the widget.
valueChanged = pyqtSignal((int, ), (str, ))
def __init__(self, parent=None):
super(CounterLabel, self).__init__(parent)
self.setAutoFillBackground(False)
self._font = QFont()
self._minimum = 1
self._maximum = 1
self._value = 1
self._offset = 0
self.rescale()
self.reposition()
def paintEvent(self, event):
p = QPainter()
p.begin(self)
p.setRenderHint(QPainter.Antialiasing)
p.setFont(self._font)
p.translate(self.width()/2.0, self.height()/2.0)
p.scale(self._scale, self._scale)
p.drawText(self._xpos, self._ypos, str(self._value))
p.end()
def sizeHint(self):
return QSize(32, 32)
def rescale(self):
fm = QFontMetricsF(self._font, self)
maxRect = fm.boundingRect(QRectF(self.rect()), Qt.AlignCenter,
str(self._maximum))
xscale = float(self.width())/maxRect.width()
yscale = float(self.height())/maxRect.height()
self._scale = min(xscale, yscale)
def reposition(self):
fm = QFontMetricsF(self._font, self)
rect = fm.boundingRect(QRectF(self.rect()), Qt.AlignCenter,
str(self._value))
self._xpos = -rect.width()/2.0
self._ypos = rect.height()/2.0 - fm.descent()
self.update()
# Provide getter and setter methods for the font property.
def getFont(self):
return self._font
def setFont(self, font):
self._font = font
self.rescale()
self.reposition()
font = pyqtProperty(QFont, getFont, setFont)
# Provide getter and setter methods for the minimum and maximum properties.
def getMinimum(self):
return self._minimum
def setMinimum(self, value):
self._minimum = value
if self._minimum > self._maximum:
self.setMaximum(self._minimum)
if self._minimum > self._value:
self.setValue(self._minimum)
minimum = pyqtProperty(int, getMinimum, setMinimum)
def getMaximum(self):
return self._maximum
def setMaximum(self, value):
self._maximum = value
self._minimum = min(self._minimum, self._maximum)
if self._maximum < self._value:
self.setValue(self._maximum)
self.rescale()
self.reposition()
maximum = pyqtProperty(int, getMaximum, setMaximum)
# We provide an offset property to allow the value shown to differ from
# the internal value held by the widget.
def getOffset(self):
return self._offset
def setOffset(self, value):
self._offset = value
offset = pyqtProperty(int, getOffset, setOffset)
# The value property is implemented using the getValue() and setValue()
# methods.
def getValue(self):
return self._value
# The setter method for the value property can also be used as a slot.
@pyqtSlot(int)
def setValue(self, value):
if not self._minimum <= value <= self._maximum:
return
self._value = value
self.valueChanged[int].emit(value + self._offset)
self.valueChanged[str].emit(str(value + self._offset))
self.reposition()
value = pyqtProperty(int, getValue, setValue)
# Like QAbstractSpinBox, we provide stepUp() and stepDown() slots to
# enable the value to be incremented and decremented.
@pyqtSlot()
def stepUp(self):
self.setValue(self._value + 1)
@pyqtSlot()
def stepDown(self):
self.setValue(self._value - 1)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
widget = CounterLabel()
widget.setValue(123)
widget.show()
sys.exit(app.exec_())

View File

@@ -0,0 +1,371 @@
#!/usr/bin/env python
#============================================================================#
# (Re)Implementation of QDateEdit and QDateTimeEdit. These classes force the #
# use of the calendar popup. #
#----------------------------------------------------------------------------#
# Copyright (c) 2008 by Denviso GmbH, <ulrich.berning@denviso.de> #
# #
# All Rights Reserved #
# #
# Permission to use, copy, modify, and distribute this software and its #
# documentation for any purpose and without fee is hereby granted, #
# provided that the above copyright notice appear in all copies and that #
# both that copyright notice and this permission notice appear in #
# supporting documentation. #
# #
# DENVISO DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS #
# SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY #
# AND FITNESS, IN NO EVENT SHALL DENVISO BE LIABLE FOR ANY #
# SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES #
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, #
# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER #
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE #
# OR PERFORMANCE OF THIS SOFTWARE. #
#----------------------------------------------------------------------------#
from PyQt5.QtCore import pyqtProperty, Qt
from PyQt5.QtWidgets import (QApplication, QCalendarWidget, QDateEdit,
QDateTimeEdit, QHBoxLayout, QWidget)
#============================================================================#
# PyDateEdit #
#----------------------------------------------------------------------------#
class PyDateEdit(QDateEdit):
#
# Initialize base class
# Force use of the calendar popup
# Set default values for calendar properties
#
def __init__(self, *args):
super(PyDateEdit, self).__init__(*args)
self.setCalendarPopup(True)
self.__cw = None
self.__firstDayOfWeek = Qt.Monday
self.__gridVisible = False
self.__horizontalHeaderFormat = QCalendarWidget.ShortDayNames
self.__verticalHeaderFormat = QCalendarWidget.ISOWeekNumbers
self.__navigationBarVisible = True
#
# Call event handler of base class
# Get the calendar widget, if not already done
# Set the calendar properties
#
def mousePressEvent(self, event):
super(PyDateEdit, self).mousePressEvent(event)
if not self.__cw:
self.__cw = self.findChild(QCalendarWidget)
if self.__cw:
self.__cw.setFirstDayOfWeek(self.__firstDayOfWeek)
self.__cw.setGridVisible(self.__gridVisible)
self.__cw.setHorizontalHeaderFormat(self.__horizontalHeaderFormat)
self.__cw.setVerticalHeaderFormat(self.__verticalHeaderFormat)
self.__cw.setNavigationBarVisible(self.__navigationBarVisible)
#
# Make sure, the calendarPopup property is invisible in Designer
#
def getCalendarPopup(self):
return True
calendarPopup = pyqtProperty(bool, fget=getCalendarPopup)
#
# Property firstDayOfWeek: Qt::DayOfWeek
# Get: getFirstDayOfWeek()
# Set: setFirstDayOfWeek()
# Reset: resetFirstDayOfWeek()
#
def getFirstDayOfWeek(self):
return self.__firstDayOfWeek
def setFirstDayOfWeek(self, dayOfWeek):
if dayOfWeek != self.__firstDayOfWeek:
self.__firstDayOfWeek = dayOfWeek
if self.__cw:
self.__cw.setFirstDayOfWeek(dayOfWeek)
def resetFirstDayOfWeek(self):
if self.__firstDayOfWeek != Qt.Monday:
self.__firstDayOfWeek = Qt.Monday
if self.__cw:
self.__cw.setFirstDayOfWeek(Qt.Monday)
firstDayOfWeek = pyqtProperty(Qt.DayOfWeek,
fget=getFirstDayOfWeek,
fset=setFirstDayOfWeek,
freset=resetFirstDayOfWeek)
#
# Property gridVisible: bool
# Get: isGridVisible()
# Set: setGridVisible()
# Reset: resetGridVisible()
#
def isGridVisible(self):
return self.__gridVisible
def setGridVisible(self, show):
if show != self.__gridVisible:
self.__gridVisible = show
if self.__cw:
self.__cw.setGridVisible(show)
def resetGridVisible(self):
if self.__gridVisible != False:
self.__gridVisible = False
if self.__cw:
self.__cw.setGridVisible(False)
gridVisible = pyqtProperty(bool,
fget=isGridVisible,
fset=setGridVisible,
freset=resetGridVisible)
#
# Property horizontalHeaderFormat: QCalendarWidget::HorizontalHeaderFormat
# Get: getHorizontalHeaderFormat()
# Set: setHorizontalHeaderFormat()
# Reset: resetHorizontalHeaderFormat()
#
def getHorizontalHeaderFormat(self):
return self.__horizontalHeaderFormat
def setHorizontalHeaderFormat(self, format):
if format != self.__horizontalHeaderFormat:
self.__horizontalHeaderFormat = format
if self.__cw:
self.__cw.setHorizontalHeaderFormat(format)
def resetHorizontalHeaderFormat(self):
if self.__horizontalHeaderFormat != QCalendarWidget.ShortDayNames:
self.__horizontalHeaderFormat = QCalendarWidget.ShortDayNames
if self.__cw:
self.__cw.setHorizontalHeaderFormat(QCalendarWidget.ShortDayNames)
horizontalHeaderFormat = pyqtProperty(QCalendarWidget.HorizontalHeaderFormat,
fget=getHorizontalHeaderFormat,
fset=setHorizontalHeaderFormat,
freset=resetHorizontalHeaderFormat)
#
# Property verticalHeaderFormat: QCalendarWidget::VerticalHeaderFormat
# Get: getVerticalHeaderFormat()
# Set: setVerticalHeaderFormat()
# Reset: resetVerticalHeaderFormat()
#
def getVerticalHeaderFormat(self):
return self.__verticalHeaderFormat
def setVerticalHeaderFormat(self, format):
if format != self.__verticalHeaderFormat:
self.__verticalHeaderFormat = format
if self.__cw:
self.__cw.setVerticalHeaderFormat(format)
def resetVerticalHeaderFormat(self):
if self.__verticalHeaderFormat != QCalendarWidget.ISOWeekNumbers:
self.__verticalHeaderFormat = QCalendarWidget.ISOWeekNumbers
if self.__cw:
self.__cw.setVerticalHeaderFormat(QCalendarWidget.ISOWeekNumbers)
verticalHeaderFormat = pyqtProperty(QCalendarWidget.VerticalHeaderFormat,
fget=getVerticalHeaderFormat,
fset=setVerticalHeaderFormat,
freset=resetVerticalHeaderFormat)
#
# Property navigationBarVisible: bool
# Get: isNavigationBarVisible()
# Set: setNavigationBarVisible()
# Reset: resetNavigationBarVisible()
#
def isNavigationBarVisible(self):
return self.__navigationBarVisible
def setNavigationBarVisible(self, visible):
if visible != self.__navigationBarVisible:
self.__navigationBarVisible = visible
if self.__cw:
self.__cw.setNavigationBarVisible(visible)
def resetNavigationBarVisible(self):
if self.__navigationBarVisible != True:
self.__navigationBarVisible = True
if self.__cw:
self.__cw.setNavigationBarVisible(True)
navigationBarVisible = pyqtProperty(bool,
fget=isNavigationBarVisible,
fset=setNavigationBarVisible,
freset=resetNavigationBarVisible)
#============================================================================#
# PyDateTimeEdit #
#----------------------------------------------------------------------------#
class PyDateTimeEdit(QDateTimeEdit):
#
# Initialize base class
# Force use of the calendar popup
# Set default values for calendar properties
#
def __init__(self, *args):
super(PyDateTimeEdit, self).__init__(*args)
self.setCalendarPopup(True)
self.__cw = None
self.__firstDayOfWeek = Qt.Monday
self.__gridVisible = False
self.__horizontalHeaderFormat = QCalendarWidget.ShortDayNames
self.__verticalHeaderFormat = QCalendarWidget.ISOWeekNumbers
self.__navigationBarVisible = True
#
# Call event handler of base class
# Get the calendar widget, if not already done
# Set the calendar properties
#
def mousePressEvent(self, event):
super(PyDateTimeEdit, self).mousePressEvent(event)
if not self.__cw:
self.__cw = self.findChild(QCalendarWidget)
if self.__cw:
self.__cw.setFirstDayOfWeek(self.__firstDayOfWeek)
self.__cw.setGridVisible(self.__gridVisible)
self.__cw.setHorizontalHeaderFormat(self.__horizontalHeaderFormat)
self.__cw.setVerticalHeaderFormat(self.__verticalHeaderFormat)
self.__cw.setNavigationBarVisible(self.__navigationBarVisible)
#
# Make sure, the calendarPopup property is invisible in Designer
#
def getCalendarPopup(self):
return True
calendarPopup = pyqtProperty(bool, fget=getCalendarPopup)
#
# Property firstDayOfWeek: Qt::DayOfWeek
# Get: getFirstDayOfWeek()
# Set: setFirstDayOfWeek()
# Reset: resetFirstDayOfWeek()
#
def getFirstDayOfWeek(self):
return self.__firstDayOfWeek
def setFirstDayOfWeek(self, dayOfWeek):
if dayOfWeek != self.__firstDayOfWeek:
self.__firstDayOfWeek = dayOfWeek
if self.__cw:
self.__cw.setFirstDayOfWeek(dayOfWeek)
def resetFirstDayOfWeek(self):
if self.__firstDayOfWeek != Qt.Monday:
self.__firstDayOfWeek = Qt.Monday
if self.__cw:
self.__cw.setFirstDayOfWeek(Qt.Monday)
firstDayOfWeek = pyqtProperty(Qt.DayOfWeek,
fget=getFirstDayOfWeek,
fset=setFirstDayOfWeek,
freset=resetFirstDayOfWeek)
#
# Property gridVisible: bool
# Get: isGridVisible()
# Set: setGridVisible()
# Reset: resetGridVisible()
#
def isGridVisible(self):
return self.__gridVisible
def setGridVisible(self, show):
if show != self.__gridVisible:
self.__gridVisible = show
if self.__cw:
self.__cw.setGridVisible(show)
def resetGridVisible(self):
if self.__gridVisible != False:
self.__gridVisible = False
if self.__cw:
self.__cw.setGridVisible(False)
gridVisible = pyqtProperty(bool,
fget=isGridVisible,
fset=setGridVisible,
freset=resetGridVisible)
#
# Property horizontalHeaderFormat: QCalendarWidget::HorizontalHeaderFormat
# Get: getHorizontalHeaderFormat()
# Set: setHorizontalHeaderFormat()
# Reset: resetHorizontalHeaderFormat()
#
def getHorizontalHeaderFormat(self):
return self.__horizontalHeaderFormat
def setHorizontalHeaderFormat(self, format):
if format != self.__horizontalHeaderFormat:
self.__horizontalHeaderFormat = format
if self.__cw:
self.__cw.setHorizontalHeaderFormat(format)
def resetHorizontalHeaderFormat(self):
if self.__horizontalHeaderFormat != QCalendarWidget.ShortDayNames:
self.__horizontalHeaderFormat = QCalendarWidget.ShortDayNames
if self.__cw:
self.__cw.setHorizontalHeaderFormat(QCalendarWidget.ShortDayNames)
horizontalHeaderFormat = pyqtProperty(QCalendarWidget.HorizontalHeaderFormat,
fget=getHorizontalHeaderFormat,
fset=setHorizontalHeaderFormat,
freset=resetHorizontalHeaderFormat)
#
# Property verticalHeaderFormat: QCalendarWidget::VerticalHeaderFormat
# Get: getVerticalHeaderFormat()
# Set: setVerticalHeaderFormat()
# Reset: resetVerticalHeaderFormat()
#
def getVerticalHeaderFormat(self):
return self.__verticalHeaderFormat
def setVerticalHeaderFormat(self, format):
if format != self.__verticalHeaderFormat:
self.__verticalHeaderFormat = format
if self.__cw:
self.__cw.setVerticalHeaderFormat(format)
def resetVerticalHeaderFormat(self):
if self.__verticalHeaderFormat != QCalendarWidget.ISOWeekNumbers:
self.__verticalHeaderFormat = QCalendarWidget.ISOWeekNumbers
if self.__cw:
self.__cw.setVerticalHeaderFormat(QCalendarWidget.ISOWeekNumbers)
verticalHeaderFormat = pyqtProperty(QCalendarWidget.VerticalHeaderFormat,
fget=getVerticalHeaderFormat,
fset=setVerticalHeaderFormat,
freset=resetVerticalHeaderFormat)
#
# Property navigationBarVisible: bool
# Get: isNavigationBarVisible()
# Set: setNavigationBarVisible()
# Reset: resetNavigationBarVisible()
#
def isNavigationBarVisible(self):
return self.__navigationBarVisible
def setNavigationBarVisible(self, visible):
if visible != self.__navigationBarVisible:
self.__navigationBarVisible = visible
if self.__cw:
self.__cw.setNavigationBarVisible(visible)
def resetNavigationBarVisible(self):
if self.__navigationBarVisible != True:
self.__navigationBarVisible = True
if self.__cw:
self.__cw.setNavigationBarVisible(True)
navigationBarVisible = pyqtProperty(bool,
fget=isNavigationBarVisible,
fset=setNavigationBarVisible,
freset=resetNavigationBarVisible)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
w = QWidget()
lay = QHBoxLayout()
lay.addWidget(PyDateEdit())
lay.addWidget(PyDateTimeEdit())
w.setLayout(lay)
w.show()
sys.exit(app.exec_())
#============================================================================#
# EOF #
#----------------------------------------------------------------------------#

View File

@@ -0,0 +1,261 @@
#!/usr/bin/env python
"""
helloglwidget.py
A simple OpenGL custom widget for Qt Designer.
Copyright (C) 2007 David Boddie <david@boddie.org.uk>
Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import math
from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QPoint, QSize, Qt
from PyQt5.QtGui import QColor
from PyQt5.QtWidgets import QApplication, QOpenGLWidget
class HelloGLWidget(QOpenGLWidget):
"""HelloGLWidget(QOpenGLWidget)
Provides a custom widget to display an OpenGL-rendered Qt logo.
Various properties and slots are defined so that the user can rotate
the logo, and signals are defined to enable other components to
react to changes to its orientation.
"""
# We define three signals that are used to indicate changes to the
# rotation of the logo.
xRotationChanged = pyqtSignal(int)
yRotationChanged = pyqtSignal(int)
zRotationChanged = pyqtSignal(int)
def __init__(self, parent=None):
super(HelloGLWidget, self).__init__(parent)
self.object = 0
self.xRot = 0
self.yRot = 0
self.zRot = 0
self.lastPos = QPoint()
self.trolltechGreen = QColor.fromCmykF(0.40, 0.0, 1.0, 0.0)
self.trolltechPurple = QColor.fromCmykF(0.39, 0.39, 0.0, 0.0)
self.setWindowTitle("Hello GL")
# The rotation of the logo about the x-axis can be controlled using the
# xRotation property, defined using the following getter and setter
# methods.
def getXRotation(self):
return self.xRot
# The setXRotation() setter method is also a slot.
@pyqtSlot(int)
def setXRotation(self, angle):
angle = self.normalizeAngle(angle)
if angle != self.xRot:
self.xRot = angle
self.xRotationChanged.emit(angle)
self.update()
xRotation = pyqtProperty(int, getXRotation, setXRotation)
# The rotation of the logo about the y-axis can be controlled using the
# yRotation property, defined using the following getter and setter
# methods.
def getYRotation(self):
return self.yRot
# The setYRotation() setter method is also a slot.
@pyqtSlot(int)
def setYRotation(self, angle):
angle = self.normalizeAngle(angle)
if angle != self.yRot:
self.yRot = angle
self.yRotationChanged.emit(angle)
self.update()
yRotation = pyqtProperty(int, getYRotation, setYRotation)
# The rotation of the logo about the z-axis can be controlled using the
# zRotation property, defined using the following getter and setter
# methods.
def getZRotation(self):
return self.zRot
# The setZRotation() setter method is also a slot.
@pyqtSlot(int)
def setZRotation(self, angle):
angle = self.normalizeAngle(angle)
if angle != self.zRot:
self.zRot = angle
self.zRotationChanged.emit(angle)
self.update()
zRotation = pyqtProperty(int, getZRotation, setZRotation)
def minimumSizeHint(self):
return QSize(50, 50)
def sizeHint(self):
return QSize(200, 200)
def initializeGL(self):
self.gl = self.context().versionFunctions()
self.gl.initializeOpenGLFunctions()
self.setClearColor(self.trolltechPurple.darker())
self.object = self.makeObject()
self.gl.glShadeModel(self.gl.GL_SMOOTH)
self.gl.glEnable(self.gl.GL_DEPTH_TEST)
self.gl.glEnable(self.gl.GL_CULL_FACE)
def paintGL(self):
self.gl.glClear(self.gl.GL_COLOR_BUFFER_BIT | self.gl.GL_DEPTH_BUFFER_BIT)
self.gl.glLoadIdentity()
self.gl.glTranslated(0.0, 0.0, -10.0)
self.gl.glRotated(self.xRot / 16.0, 1.0, 0.0, 0.0)
self.gl.glRotated(self.yRot / 16.0, 0.0, 1.0, 0.0)
self.gl.glRotated(self.zRot / 16.0, 0.0, 0.0, 1.0)
self.gl.glCallList(self.object)
def resizeGL(self, width, height):
side = min(width, height)
self.gl.glViewport((width - side) / 2, (height - side) / 2, side, side)
self.gl.glMatrixMode(self.gl.GL_PROJECTION)
self.gl.glLoadIdentity()
self.gl.glOrtho(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0)
self.gl.glMatrixMode(self.gl.GL_MODELVIEW)
def mousePressEvent(self, event):
self.lastPos = QPoint(event.pos())
def mouseMoveEvent(self, event):
dx = event.x() - self.lastPos.x()
dy = event.y() - self.lastPos.y()
if event.buttons() & Qt.LeftButton:
self.setXRotation(self.xRot + 8 * dy)
self.setYRotation(self.yRot + 8 * dx)
elif event.buttons() & Qt.RightButton:
self.setXRotation(self.xRot + 8 * dy)
self.setZRotation(self.zRot + 8 * dx)
self.lastPos = QPoint(event.pos())
def makeObject(self):
genList = self.gl.glGenLists(1)
self.gl.glNewList(genList, self.gl.GL_COMPILE)
self.gl.glBegin(self.gl.GL_QUADS)
x1 = +0.06
y1 = -0.14
x2 = +0.14
y2 = -0.06
x3 = +0.08
y3 = +0.00
x4 = +0.30
y4 = +0.22
self.quad(x1, y1, x2, y2, y2, x2, y1, x1)
self.quad(x3, y3, x4, y4, y4, x4, y3, x3)
self.extrude(x1, y1, x2, y2)
self.extrude(x2, y2, y2, x2)
self.extrude(y2, x2, y1, x1)
self.extrude(y1, x1, x1, y1)
self.extrude(x3, y3, x4, y4)
self.extrude(x4, y4, y4, x4)
self.extrude(y4, x4, y3, x3)
Pi = 3.14159265358979323846
NumSectors = 200
for i in range(NumSectors):
angle1 = (i * 2 * Pi) / NumSectors
x5 = 0.30 * math.sin(angle1)
y5 = 0.30 * math.cos(angle1)
x6 = 0.20 * math.sin(angle1)
y6 = 0.20 * math.cos(angle1)
angle2 = ((i + 1) * 2 * Pi) / NumSectors
x7 = 0.20 * math.sin(angle2)
y7 = 0.20 * math.cos(angle2)
x8 = 0.30 * math.sin(angle2)
y8 = 0.30 * math.cos(angle2)
self.quad(x5, y5, x6, y6, x7, y7, x8, y8)
self.extrude(x6, y6, x7, y7)
self.extrude(x8, y8, x5, y5)
self.gl.glEnd()
self.gl.glEndList()
return genList
def quad(self, x1, y1, x2, y2, x3, y3, x4, y4):
self.setColor(self.trolltechGreen)
self.gl.glVertex3d(x1, y1, -0.05)
self.gl.glVertex3d(x2, y2, -0.05)
self.gl.glVertex3d(x3, y3, -0.05)
self.gl.glVertex3d(x4, y4, -0.05)
self.gl.glVertex3d(x4, y4, +0.05)
self.gl.glVertex3d(x3, y3, +0.05)
self.gl.glVertex3d(x2, y2, +0.05)
self.gl.glVertex3d(x1, y1, +0.05)
def extrude(self, x1, y1, x2, y2):
self.setColor(self.trolltechGreen.darker(250 + int(100 * x1)))
self.gl.glVertex3d(x1, y1, +0.05)
self.gl.glVertex3d(x2, y2, +0.05)
self.gl.glVertex3d(x2, y2, -0.05)
self.gl.glVertex3d(x1, y1, -0.05)
def normalizeAngle(self, angle):
while angle < 0:
angle += 360 * 16
while angle > 360 * 16:
angle -= 360 * 16
return angle
def setClearColor(self, c):
self.gl.glClearColor(c.redF(), c.greenF(), c.blueF(), c.alphaF())
def setColor(self, c):
self.gl.glColor4f(c.redF(), c.greenF(), c.blueF(), c.alphaF())
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
widget = HelloGLWidget()
widget.show()
sys.exit(app.exec_())

View File

@@ -0,0 +1,107 @@
#!/usr/bin/env python
#============================================================================#
# PyQt5 port of the designer/containerextension example from Qt v5.x #
#----------------------------------------------------------------------------#
from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QSize
from PyQt5.QtWidgets import (QApplication, QComboBox, QLabel, QStackedWidget,
QVBoxLayout, QWidget)
#============================================================================#
# Implementation of a MultiPageWidget using a QComboBox and a QStackedWidget #
#----------------------------------------------------------------------------#
class PyMultiPageWidget(QWidget):
currentIndexChanged = pyqtSignal(int)
pageTitleChanged = pyqtSignal(str)
def __init__(self, parent=None):
super(PyMultiPageWidget, self).__init__(parent)
self.comboBox = QComboBox()
# MAGIC
# It is important that the combo box has an object name beginning
# with '__qt__passive_', otherwise, it is inactive in the form editor
# of the designer and you can't change the current page via the
# combo box.
# MAGIC
self.comboBox.setObjectName('__qt__passive_comboBox')
self.stackWidget = QStackedWidget()
self.comboBox.activated.connect(self.setCurrentIndex)
self.layout = QVBoxLayout()
self.layout.addWidget(self.comboBox)
self.layout.addWidget(self.stackWidget)
self.setLayout(self.layout)
def sizeHint(self):
return QSize(200, 150)
def count(self):
return self.stackWidget.count()
def widget(self, index):
return self.stackWidget.widget(index)
@pyqtSlot(QWidget)
def addPage(self, page):
self.insertPage(self.count(), page)
@pyqtSlot(int, QWidget)
def insertPage(self, index, page):
page.setParent(self.stackWidget)
self.stackWidget.insertWidget(index, page)
title = page.windowTitle()
if title == "":
title = "Page %d" % (self.comboBox.count() + 1)
page.setWindowTitle(title)
self.comboBox.insertItem(index, title)
@pyqtSlot(int)
def removePage(self, index):
widget = self.stackWidget.widget(index)
self.stackWidget.removeWidget(widget)
self.comboBox.removeItem(index)
def getPageTitle(self):
cw = self.stackWidget.currentWidget()
return cw.windowTitle() if cw is not None else ''
@pyqtSlot(str)
def setPageTitle(self, newTitle):
cw = self.stackWidget.currentWidget()
if cw is not None:
self.comboBox.setItemText(self.getCurrentIndex(), newTitle)
cw.setWindowTitle(newTitle)
self.pageTitleChanged.emit(newTitle)
def getCurrentIndex(self):
return self.stackWidget.currentIndex()
@pyqtSlot(int)
def setCurrentIndex(self, index):
if index != self.getCurrentIndex():
self.stackWidget.setCurrentIndex(index)
self.comboBox.setCurrentIndex(index)
self.currentIndexChanged.emit(index)
pageTitle = pyqtProperty(str, fget=getPageTitle, fset=setPageTitle, stored=False)
currentIndex = pyqtProperty(int, fget=getCurrentIndex, fset=setCurrentIndex)
#============================================================================#
# Main for testing the class #
#----------------------------------------------------------------------------#
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
widget = PyMultiPageWidget()
widget.addPage(QLabel('This is page #1'))
widget.addPage(QLabel('This is page #2'))
widget.show()
sys.exit(app.exec_())
#============================================================================#
# EOF #
#----------------------------------------------------------------------------#

View File

@@ -0,0 +1,192 @@
#!/usr/bin/env python
"""
polygonwidget.py
A PyQt custom widget example for Qt Designer.
Copyright (C) 2006 David Boddie <david@boddie.org.uk>
Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
import math
from PyQt5.QtCore import pyqtProperty, pyqtSlot, QPointF, QSize
from PyQt5.QtGui import QBrush, QColor, QPainter, QPainterPath, QRadialGradient
from PyQt5.QtWidgets import QApplication, QWidget
class PolygonWidget(QWidget):
"""PolygonWidget(QWidget)
Provides a custom widget to display a polygon with properties and slots
that can be used to customize its appearance.
"""
def __init__(self, parent=None):
super(PolygonWidget, self).__init__(parent)
self._sides = 5
self._innerRadius = 20
self._outerRadius = 50
self._angle = 0
self.createPath()
self._innerColor = QColor(255, 255, 128)
self._outerColor = QColor(255, 0, 128)
self.createGradient()
def paintEvent(self, event):
painter = QPainter()
painter.begin(self)
painter.setRenderHint(QPainter.Antialiasing)
painter.setBrush(QBrush(QColor(192, 192, 255)))
painter.drawRect(event.rect())
painter.translate(self.width()/2.0, self.height()/2.0)
painter.rotate(self._angle)
painter.setBrush(QBrush(self.gradient))
painter.drawPath(self.path)
painter.end()
def sizeHint(self):
return QSize(2*self._outerRadius + 20, 2*self._outerRadius + 20)
def createPath(self):
self.path = QPainterPath()
angle = 2*math.pi/self._sides
self.path.moveTo(self._outerRadius, 0)
for step in range(1, self._sides + 1):
self.path.lineTo(
self._innerRadius * math.cos((step - 0.5) * angle),
self._innerRadius * math.sin((step - 0.5) * angle)
)
self.path.lineTo(
self._outerRadius * math.cos(step * angle),
self._outerRadius * math.sin(step * angle)
)
self.path.closeSubpath()
def createGradient(self):
center = QPointF(0, 0)
self.gradient = QRadialGradient(center, self._outerRadius, center)
self.gradient.setColorAt(0.5, QColor(self._innerColor))
self.gradient.setColorAt(1.0, QColor(self._outerColor))
# The angle property is implemented using the getAngle() and setAngle()
# methods.
def getAngle(self):
return self._angle
# The setAngle() setter method is also a slot.
@pyqtSlot(int)
def setAngle(self, angle):
self._angle = min(max(0, angle), 360)
self.update()
angle = pyqtProperty(int, getAngle, setAngle)
# The innerRadius property is implemented using the getInnerRadius() and
# setInnerRadius() methods.
def getInnerRadius(self):
return self._innerRadius
# The setInnerRadius() setter method is also a slot.
@pyqtSlot(int)
def setInnerRadius(self, radius):
self._innerRadius = radius
self.createPath()
self.createGradient()
self.update()
innerRadius = pyqtProperty(int, getInnerRadius, setInnerRadius)
# The outerRadius property is implemented using the getOuterRadius() and
# setOuterRadius() methods.
def getOuterRadius(self):
return self._outerRadius
# The setOuterRadius() setter method is also a slot.
@pyqtSlot(int)
def setOuterRadius(self, radius):
self._outerRadius = radius
self.createPath()
self.createGradient()
self.update()
outerRadius = pyqtProperty(int, getOuterRadius, setOuterRadius)
# The numberOfSides property is implemented using the getNumberOfSides()
# and setNumberOfSides() methods.
def getNumberOfSides(self):
return self._sides
# The setNumberOfSides() setter method is also a slot.
@pyqtSlot(int)
def setNumberOfSides(self, sides):
self._sides = max(3, sides)
self.createPath()
self.update()
numberOfSides = pyqtProperty(int, getNumberOfSides, setNumberOfSides)
# The innerColor property is implemented using the getInnerColor() and
# setInnerColor() methods.
def getInnerColor(self):
return self._innerColor
def setInnerColor(self, color):
self._innerColor = max(3, color)
self.createGradient()
self.update()
innerColor = pyqtProperty(QColor, getInnerColor, setInnerColor)
# The outerColor property is implemented using the getOuterColor() and
# setOuterColor() methods.
def getOuterColor(self):
return self._outerColor
def setOuterColor(self, color):
self._outerColor = color
self.createGradient()
self.update()
outerColor = pyqtProperty(QColor, getOuterColor, setOuterColor)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
window = PolygonWidget()
window.show()
sys.exit(app.exec_())

View File

@@ -0,0 +1,156 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Riverbank Computing Limited nor the names of
## its contributors may be used to endorse or promote products
## derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
##
#############################################################################
from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot
from PyQt5.QtWidgets import QApplication, QTextEdit
# The purpose of this class is to show that Designer's property editor shows
# all Python classes in the hierarchy that define properties.
class PyTextViewer(QTextEdit):
# Initialise the instance.
def __init__(self, parent=None):
super(PyTextViewer, self).__init__(parent)
self.setReadOnly(True)
# Initialise the author property by calling it's reset function.
self.resetAuthor()
# The getter for the author property. Note that we cannot follow the Qt
# naming convention (ie. by using the naming the getter "author") because
# it would conflict with the property name.
def getAuthor(self):
return self._author
# The setter for the author property.
def setAuthor(self, name):
self._author = name
# The resetter for the author property. Only Qt Designer uses this. Qt
# Designer does not use the deleter function of the property.
def resetAuthor(self):
self._author = "David Boddie"
# Define the author property. This will look like a C++ property to Qt
# Designer and a Python property to Python.
author = pyqtProperty(str, getAuthor, setAuthor, resetAuthor)
# This is the class that implements the custom widget.
class PyDemo(PyTextViewer):
# Define the Qt signals as a sequence of C++ function signatures excluding
# the return type. These may be connected to other signals or slots in Qt
# Designer.
zoomChanged = pyqtSignal(int)
# Initialise the instance.
def __init__(self, parent=None):
super(PyDemo, self).__init__(parent)
self.setWindowTitle("PyQt Demonstration Widget")
self.setText(_demo_text)
# Initialise the zoom property. We don't just call the resetter
# because it assumes that this has already been initialised.
self._zoom = 0
# The getter for the zoom property.
def getZoom(self):
return self._zoom
# The setter for the zoom property. We also make define this as a Qt slot
# which can be connected to Qt signals in Qt Designer.
@pyqtSlot(int)
def setZoom(self, zoom):
# Don't do anything if nothing has changed.
if self._zoom == zoom:
return
# Zoom in or out according to the relative zoom levels.
if self._zoom < zoom:
self.zoomIn(zoom - self._zoom)
elif self._zoom > zoom:
self.zoomOut(self._zoom - zoom)
# Remember the new zoom level.
self._zoom = zoom
# Emit the Qt signal to say that the zoom level has changed.
self.zoomChanged.emit(zoom)
# The resetter for the zoom property.
def resetZoom(self):
self.setZoom(0)
# Define the zoom property. Changing the value of this in Qt Designer's
# property editor causes the zoom level to change dynamically.
zoom = pyqtProperty(int, getZoom, setZoom, resetZoom)
# The text displayed in the custom widget.
_demo_text = """<h3>PyQt Demonstration Widget</h3>
<p>This simple example demonstrates the following features.</p>
<ul>
<li>The definition of properties that behave as C++ properties to Qt and
Python properties to Python.</li>
<li>The definition of new Qt signals that can be connected to other signals
and Qt slots in Designer.</li>
<li>The definition of new Qt slots that can be connected to signals in
Designer.</li>
</ul>
"""
# Display the custom widget if the script is being run directly from the
# command line.
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
demo = PyDemo()
demo.show()
sys.exit(app.exec_())

View File

@@ -0,0 +1,98 @@
#!/usr/bin/env python
"""
pythonconsolewidget.py
A Python console custom widget for Qt Designer.
Copyright (C) 2006 David Boddie <david@boddie.org.uk>
Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
from PyQt5.QtCore import pyqtSignal, QEvent, Qt
from PyQt5.QtWidgets import QApplication, QLineEdit
class PythonConsoleWidget(QLineEdit):
"""PythonConsoleWidget(QLineEdit)
Provides a custom widget to accept Python expressions and emit output
to other components via a custom signal.
"""
pythonOutput = pyqtSignal(str)
def __init__(self, parent=None):
super(PythonConsoleWidget, self).__init__(parent)
self.history = []
self.current = -1
self.returnPressed.connect(self.execute)
def keyReleaseEvent(self, event):
if event.type() == QEvent.KeyRelease:
if event.key() == Qt.Key_Up:
current = max(0, self.current - 1)
if 0 <= current < len(self.history):
self.setText(self.history[current])
self.current = current
event.accept()
elif event.key() == Qt.Key_Down:
current = min(len(self.history), self.current + 1)
if 0 <= current < len(self.history):
self.setText(self.history[current])
else:
self.clear()
self.current = current
event.accept()
def execute(self):
# Define this here to give users something to look at.
qApp = QApplication.instance()
self.expression = self.text()
try:
result = str(eval(str(self.expression)))
# Emit the result of the evaluated expression.
self.pythonOutput.emit(result)
# Clear the line edit, append the successful expression to the
# history, and update the current command index.
self.clear()
self.history.append(self.expression)
self.current = len(self.history)
except:
pass
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
widget = PythonConsoleWidget()
widget.show()
sys.exit(app.exec_())

27
desktop/README Normal file
View File

@@ -0,0 +1,27 @@
PyQt provides features to enable applications to integrate with the user's
preferred desktop environment.
Features such as system tray icons, access to the desktop widget, and
support for desktop services can be used to improve the appearance of
applications and take advantage of underlying desktop facilities.
The example launcher provided with PyQt can be used to explore each of the
examples in this directory.
Documentation for these examples can be found via the Tutorial and Examples
link in the main Qt documentation.
Finding the PyQt Examples and Demos launcher
============================================
On Windows:
The launcher can be accessed via the Windows Start menu. Select the menu
entry entitled "Examples and Demos" entry in the submenu containing PyQt5.
On all platforms:
The source code for the launcher can be found in the examples/demos/qtdemo
directory in the PyQt package.

173
desktop/screenshot.py Normal file
View File

@@ -0,0 +1,173 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
from PyQt5.QtCore import QDir, Qt, QTimer
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import (QApplication, QCheckBox, QFileDialog, QGridLayout,
QGroupBox, QHBoxLayout, QLabel, QPushButton, QSizePolicy, QSpinBox,
QVBoxLayout, QWidget)
class Screenshot(QWidget):
def __init__(self):
super(Screenshot, self).__init__()
self.screenshotLabel = QLabel()
self.screenshotLabel.setSizePolicy(QSizePolicy.Expanding,
QSizePolicy.Expanding)
self.screenshotLabel.setAlignment(Qt.AlignCenter)
self.screenshotLabel.setMinimumSize(240, 160)
self.createOptionsGroupBox()
self.createButtonsLayout()
mainLayout = QVBoxLayout()
mainLayout.addWidget(self.screenshotLabel)
mainLayout.addWidget(self.optionsGroupBox)
mainLayout.addLayout(self.buttonsLayout)
self.setLayout(mainLayout)
self.shootScreen()
self.delaySpinBox.setValue(5)
self.setWindowTitle("Screenshot")
self.resize(300, 200)
def resizeEvent(self, event):
scaledSize = self.originalPixmap.size()
scaledSize.scale(self.screenshotLabel.size(), Qt.KeepAspectRatio)
if not self.screenshotLabel.pixmap() or scaledSize != self.screenshotLabel.pixmap().size():
self.updateScreenshotLabel()
def newScreenshot(self):
if self.hideThisWindowCheckBox.isChecked():
self.hide()
self.newScreenshotButton.setDisabled(True)
QTimer.singleShot(self.delaySpinBox.value() * 1000,
self.shootScreen)
def saveScreenshot(self):
format = 'png'
initialPath = QDir.currentPath() + "/untitled." + format
fileName, _ = QFileDialog.getSaveFileName(self, "Save As", initialPath,
"%s Files (*.%s);;All Files (*)" % (format.upper(), format))
if fileName:
self.originalPixmap.save(fileName, format)
def shootScreen(self):
if self.delaySpinBox.value() != 0:
QApplication.instance().beep()
screen = QApplication.primaryScreen()
if screen is not None:
self.originalPixmap = screen.grabWindow(0)
else:
self.originalPixmap = QPixmap()
self.updateScreenshotLabel()
self.newScreenshotButton.setDisabled(False)
if self.hideThisWindowCheckBox.isChecked():
self.show()
def updateCheckBox(self):
if self.delaySpinBox.value() == 0:
self.hideThisWindowCheckBox.setDisabled(True)
else:
self.hideThisWindowCheckBox.setDisabled(False)
def createOptionsGroupBox(self):
self.optionsGroupBox = QGroupBox("Options")
self.delaySpinBox = QSpinBox()
self.delaySpinBox.setSuffix(" s")
self.delaySpinBox.setMaximum(60)
self.delaySpinBox.valueChanged.connect(self.updateCheckBox)
self.delaySpinBoxLabel = QLabel("Screenshot Delay:")
self.hideThisWindowCheckBox = QCheckBox("Hide This Window")
optionsGroupBoxLayout = QGridLayout()
optionsGroupBoxLayout.addWidget(self.delaySpinBoxLabel, 0, 0)
optionsGroupBoxLayout.addWidget(self.delaySpinBox, 0, 1)
optionsGroupBoxLayout.addWidget(self.hideThisWindowCheckBox, 1, 0, 1, 2)
self.optionsGroupBox.setLayout(optionsGroupBoxLayout)
def createButtonsLayout(self):
self.newScreenshotButton = self.createButton("New Screenshot",
self.newScreenshot)
self.saveScreenshotButton = self.createButton("Save Screenshot",
self.saveScreenshot)
self.quitScreenshotButton = self.createButton("Quit", self.close)
self.buttonsLayout = QHBoxLayout()
self.buttonsLayout.addStretch()
self.buttonsLayout.addWidget(self.newScreenshotButton)
self.buttonsLayout.addWidget(self.saveScreenshotButton)
self.buttonsLayout.addWidget(self.quitScreenshotButton)
def createButton(self, text, member):
button = QPushButton(text)
button.clicked.connect(member)
return button
def updateScreenshotLabel(self):
self.screenshotLabel.setPixmap(self.originalPixmap.scaled(
self.screenshotLabel.size(), Qt.KeepAspectRatio,
Qt.SmoothTransformation))
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
screenshot = Screenshot()
screenshot.show()
sys.exit(app.exec_())

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

237
desktop/systray/systray.py Normal file
View File

@@ -0,0 +1,237 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import (QAction, QApplication, QCheckBox, QComboBox,
QDialog, QGridLayout, QGroupBox, QHBoxLayout, QLabel, QLineEdit,
QMessageBox, QMenu, QPushButton, QSpinBox, QStyle, QSystemTrayIcon,
QTextEdit, QVBoxLayout)
import systray_rc
class Window(QDialog):
def __init__(self):
super(Window, self).__init__()
self.createIconGroupBox()
self.createMessageGroupBox()
self.iconLabel.setMinimumWidth(self.durationLabel.sizeHint().width())
self.createActions()
self.createTrayIcon()
self.showMessageButton.clicked.connect(self.showMessage)
self.showIconCheckBox.toggled.connect(self.trayIcon.setVisible)
self.iconComboBox.currentIndexChanged.connect(self.setIcon)
self.trayIcon.messageClicked.connect(self.messageClicked)
self.trayIcon.activated.connect(self.iconActivated)
mainLayout = QVBoxLayout()
mainLayout.addWidget(self.iconGroupBox)
mainLayout.addWidget(self.messageGroupBox)
self.setLayout(mainLayout)
self.iconComboBox.setCurrentIndex(1)
self.trayIcon.show()
self.setWindowTitle("Systray")
self.resize(400, 300)
def setVisible(self, visible):
self.minimizeAction.setEnabled(visible)
self.maximizeAction.setEnabled(not self.isMaximized())
self.restoreAction.setEnabled(self.isMaximized() or not visible)
super(Window, self).setVisible(visible)
def closeEvent(self, event):
if self.trayIcon.isVisible():
QMessageBox.information(self, "Systray",
"The program will keep running in the system tray. To "
"terminate the program, choose <b>Quit</b> in the "
"context menu of the system tray entry.")
self.hide()
event.ignore()
def setIcon(self, index):
icon = self.iconComboBox.itemIcon(index)
self.trayIcon.setIcon(icon)
self.setWindowIcon(icon)
self.trayIcon.setToolTip(self.iconComboBox.itemText(index))
def iconActivated(self, reason):
if reason in (QSystemTrayIcon.Trigger, QSystemTrayIcon.DoubleClick):
self.iconComboBox.setCurrentIndex(
(self.iconComboBox.currentIndex() + 1)
% self.iconComboBox.count())
elif reason == QSystemTrayIcon.MiddleClick:
self.showMessage()
def showMessage(self):
icon = QSystemTrayIcon.MessageIcon(
self.typeComboBox.itemData(self.typeComboBox.currentIndex()))
self.trayIcon.showMessage(self.titleEdit.text(),
self.bodyEdit.toPlainText(), icon,
self.durationSpinBox.value() * 1000)
def messageClicked(self):
QMessageBox.information(None, "Systray",
"Sorry, I already gave what help I could.\nMaybe you should "
"try asking a human?")
def createIconGroupBox(self):
self.iconGroupBox = QGroupBox("Tray Icon")
self.iconLabel = QLabel("Icon:")
self.iconComboBox = QComboBox()
self.iconComboBox.addItem(QIcon(':/images/bad.png'), "Bad")
self.iconComboBox.addItem(QIcon(':/images/heart.png'), "Heart")
self.iconComboBox.addItem(QIcon(':/images/trash.png'), "Trash")
self.showIconCheckBox = QCheckBox("Show icon")
self.showIconCheckBox.setChecked(True)
iconLayout = QHBoxLayout()
iconLayout.addWidget(self.iconLabel)
iconLayout.addWidget(self.iconComboBox)
iconLayout.addStretch()
iconLayout.addWidget(self.showIconCheckBox)
self.iconGroupBox.setLayout(iconLayout)
def createMessageGroupBox(self):
self.messageGroupBox = QGroupBox("Balloon Message")
typeLabel = QLabel("Type:")
self.typeComboBox = QComboBox()
self.typeComboBox.addItem("None", QSystemTrayIcon.NoIcon)
self.typeComboBox.addItem(self.style().standardIcon(
QStyle.SP_MessageBoxInformation), "Information",
QSystemTrayIcon.Information)
self.typeComboBox.addItem(self.style().standardIcon(
QStyle.SP_MessageBoxWarning), "Warning",
QSystemTrayIcon.Warning)
self.typeComboBox.addItem(self.style().standardIcon(
QStyle.SP_MessageBoxCritical), "Critical",
QSystemTrayIcon.Critical)
self.typeComboBox.setCurrentIndex(1)
self.durationLabel = QLabel("Duration:")
self.durationSpinBox = QSpinBox()
self.durationSpinBox.setRange(5, 60)
self.durationSpinBox.setSuffix(" s")
self.durationSpinBox.setValue(15)
durationWarningLabel = QLabel("(some systems might ignore this hint)")
durationWarningLabel.setIndent(10)
titleLabel = QLabel("Title:")
self.titleEdit = QLineEdit("Cannot connect to network")
bodyLabel = QLabel("Body:")
self.bodyEdit = QTextEdit()
self.bodyEdit.setPlainText("Don't believe me. Honestly, I don't have "
"a clue.\nClick this balloon for details.")
self.showMessageButton = QPushButton("Show Message")
self.showMessageButton.setDefault(True)
messageLayout = QGridLayout()
messageLayout.addWidget(typeLabel, 0, 0)
messageLayout.addWidget(self.typeComboBox, 0, 1, 1, 2)
messageLayout.addWidget(self.durationLabel, 1, 0)
messageLayout.addWidget(self.durationSpinBox, 1, 1)
messageLayout.addWidget(durationWarningLabel, 1, 2, 1, 3)
messageLayout.addWidget(titleLabel, 2, 0)
messageLayout.addWidget(self.titleEdit, 2, 1, 1, 4)
messageLayout.addWidget(bodyLabel, 3, 0)
messageLayout.addWidget(self.bodyEdit, 3, 1, 2, 4)
messageLayout.addWidget(self.showMessageButton, 5, 4)
messageLayout.setColumnStretch(3, 1)
messageLayout.setRowStretch(4, 1)
self.messageGroupBox.setLayout(messageLayout)
def createActions(self):
self.minimizeAction = QAction("Mi&nimize", self, triggered=self.hide)
self.maximizeAction = QAction("Ma&ximize", self,
triggered=self.showMaximized)
self.restoreAction = QAction("&Restore", self,
triggered=self.showNormal)
self.quitAction = QAction("&Quit", self,
triggered=QApplication.instance().quit)
def createTrayIcon(self):
self.trayIconMenu = QMenu(self)
self.trayIconMenu.addAction(self.minimizeAction)
self.trayIconMenu.addAction(self.maximizeAction)
self.trayIconMenu.addAction(self.restoreAction)
self.trayIconMenu.addSeparator()
self.trayIconMenu.addAction(self.quitAction)
self.trayIcon = QSystemTrayIcon(self)
self.trayIcon.setContextMenu(self.trayIconMenu)
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
if not QSystemTrayIcon.isSystemTrayAvailable():
QMessageBox.critical(None, "Systray",
"I couldn't detect any system tray on this system.")
sys.exit(1)
QApplication.setQuitOnLastWindowClosed(False)
window = Window()
window.show()
sys.exit(app.exec_())

View File

@@ -0,0 +1,7 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
<file>images/bad.png</file>
<file>images/heart.png</file>
<file>images/trash.png</file>
</qresource>
</RCC>

File diff suppressed because it is too large Load Diff

26
dialogs/README Normal file
View File

@@ -0,0 +1,26 @@
PyQt includes standard dialogs for many common operations, such as file
selection, printing, and color selection.
Custom dialogs can also be created for specialized modal or modeless
interactions with users.
The example launcher provided with PyQt can be used to explore each of the
examples in this directory.
Documentation for these examples can be found via the Tutorial and Examples
link in the main Qt documentation.
Finding the PyQt Examples and Demos launcher
============================================
On Windows:
The launcher can be accessed via the Windows Start menu. Select the menu
entry entitled "Examples and Demos" entry in the submenu containing PyQt5.
On all platforms:
The source code for the launcher can be found in the examples/demos/qtdemo
directory in the PyQt package.

View File

@@ -0,0 +1,403 @@
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows:
##
## "Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in
## the documentation and/or other materials provided with the
## distribution.
## * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
## the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
## $QT_END_LICENSE$
##
#############################################################################
from PyQt5.QtCore import QDir, QFile, QRegExp
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import (QApplication, QCheckBox, QGridLayout, QGroupBox,
QLabel, QLineEdit, QMessageBox, QRadioButton, QVBoxLayout, QWizard,
QWizardPage)
import classwizard_rc
class ClassWizard(QWizard):
def __init__(self, parent=None):
super(ClassWizard, self).__init__(parent)
self.addPage(IntroPage())
self.addPage(ClassInfoPage())
self.addPage(CodeStylePage())
self.addPage(OutputFilesPage())
self.addPage(ConclusionPage())
self.setPixmap(QWizard.BannerPixmap, QPixmap(':/images/banner.png'))
self.setPixmap(QWizard.BackgroundPixmap,
QPixmap(':/images/background.png'))
self.setWindowTitle("Class Wizard")
def accept(self):
className = self.field('className')
baseClass = self.field('baseClass')
macroName = self.field('macroName')
baseInclude = self.field('baseInclude')
outputDir = self.field('outputDir')
header = self.field('header')
implementation = self.field('implementation')
block = ''
if self.field('comment'):
block += '/*\n'
block += ' ' + header + '\n'
block += '*/\n'
block += '\n'
if self.field('protect'):
block += '#ifndef ' + macroName + '\n'
block += '#define ' + macroName + '\n'
block += '\n'
if self.field('includeBase'):
block += '#include ' + baseInclude + '\n'
block += '\n'
block += 'class ' + className
if baseClass:
block += ' : public ' + baseClass
block += '\n'
block += '{\n'
if self.field('qobjectMacro'):
block += ' Q_OBJECT\n'
block += '\n'
block += 'public:\n'
if self.field('qobjectCtor'):
block += ' ' + className + '(QObject *parent = 0);\n'
elif self.field('qwidgetCtor'):
block += ' ' + className + '(QWidget *parent = 0);\n'
elif self.field('defaultCtor'):
block += ' ' + className + '();\n'
if self.field('copyCtor'):
block += ' ' + className + '(const ' + className + ' &other);\n'
block += '\n'
block += ' ' + className + ' &operator=' + '(const ' + className + ' &other);\n'
block += '};\n'
if self.field('protect'):
block += '\n'
block += '#endif\n'
headerFile = QFile(outputDir + '/' + header)
if not headerFile.open(QFile.WriteOnly | QFile.Text):
QMessageBox.warning(None, "Class Wizard",
"Cannot write file %s:\n%s" % (headerFile.fileName(), headerFile.errorString()))
return
headerFile.write(block)
block = ''
if self.field('comment'):
block += '/*\n'
block += ' ' + implementation + '\n'
block += '*/\n'
block += '\n'
block += '#include "' + header + '"\n'
block += '\n'
if self.field('qobjectCtor'):
block += className + '::' + className + '(QObject *parent)\n'
block += ' : ' + baseClass + '(parent)\n'
block += '{\n'
block += '}\n'
elif self.field('qwidgetCtor'):
block += className + '::' + className + '(QWidget *parent)\n'
block += ' : ' + baseClass + '(parent)\n'
block += '{\n'
block += '}\n'
elif self.field('defaultCtor'):
block += className + '::' + className + '()\n'
block += '{\n'
block += ' // missing code\n'
block += '}\n'
if self.field('copyCtor'):
block += '\n'
block += className + '::' + className + '(const ' + className + ' &other)\n'
block += '{\n'
block += ' *this = other;\n'
block += '}\n'
block += '\n'
block += className + ' &' + className + '::operator=(const ' + className + ' &other)\n'
block += '{\n'
if baseClass:
block += ' ' + baseClass + '::operator=(other);\n'
block += ' // missing code\n'
block += ' return *this;\n'
block += '}\n'
implementationFile = QFile(outputDir + '/' + implementation)
if not implementationFile.open(QFile.WriteOnly | QFile.Text):
QMessageBox.warning(None, "Class Wizard",
"Cannot write file %s:\n%s" % (implementationFile.fileName(), implementationFile.errorString()))
return
implementationFile.write(block)
super(ClassWizard, self).accept()
class IntroPage(QWizardPage):
def __init__(self, parent=None):
super(IntroPage, self).__init__(parent)
self.setTitle("Introduction")
self.setPixmap(QWizard.WatermarkPixmap,
QPixmap(':/images/watermark1.png'))
label = QLabel("This wizard will generate a skeleton C++ class "
"definition, including a few functions. You simply need to "
"specify the class name and set a few options to produce a "
"header file and an implementation file for your new C++ "
"class.")
label.setWordWrap(True)
layout = QVBoxLayout()
layout.addWidget(label)
self.setLayout(layout)
class ClassInfoPage(QWizardPage):
def __init__(self, parent=None):
super(ClassInfoPage, self).__init__(parent)
self.setTitle("Class Information")
self.setSubTitle("Specify basic information about the class for "
"which you want to generate skeleton source code files.")
self.setPixmap(QWizard.LogoPixmap, QPixmap(':/images/logo1.png'))
classNameLabel = QLabel("&Class name:")
classNameLineEdit = QLineEdit()
classNameLabel.setBuddy(classNameLineEdit)
baseClassLabel = QLabel("B&ase class:")
baseClassLineEdit = QLineEdit()
baseClassLabel.setBuddy(baseClassLineEdit)
qobjectMacroCheckBox = QCheckBox("Generate Q_OBJECT &macro")
groupBox = QGroupBox("C&onstructor")
qobjectCtorRadioButton = QRadioButton("&QObject-style constructor")
qwidgetCtorRadioButton = QRadioButton("Q&Widget-style constructor")
defaultCtorRadioButton = QRadioButton("&Default constructor")
copyCtorCheckBox = QCheckBox("&Generate copy constructor and operator=")
defaultCtorRadioButton.setChecked(True)
defaultCtorRadioButton.toggled.connect(copyCtorCheckBox.setEnabled)
self.registerField('className*', classNameLineEdit)
self.registerField('baseClass', baseClassLineEdit)
self.registerField('qobjectMacro', qobjectMacroCheckBox)
self.registerField('qobjectCtor', qobjectCtorRadioButton)
self.registerField('qwidgetCtor', qwidgetCtorRadioButton)
self.registerField('defaultCtor', defaultCtorRadioButton)
self.registerField('copyCtor', copyCtorCheckBox)
groupBoxLayout = QVBoxLayout()
groupBoxLayout.addWidget(qobjectCtorRadioButton)
groupBoxLayout.addWidget(qwidgetCtorRadioButton)
groupBoxLayout.addWidget(defaultCtorRadioButton)
groupBoxLayout.addWidget(copyCtorCheckBox)
groupBox.setLayout(groupBoxLayout)
layout = QGridLayout()
layout.addWidget(classNameLabel, 0, 0)
layout.addWidget(classNameLineEdit, 0, 1)
layout.addWidget(baseClassLabel, 1, 0)
layout.addWidget(baseClassLineEdit, 1, 1)
layout.addWidget(qobjectMacroCheckBox, 2, 0, 1, 2)
layout.addWidget(groupBox, 3, 0, 1, 2)
self.setLayout(layout)
class CodeStylePage(QWizardPage):
def __init__(self, parent=None):
super(CodeStylePage, self).__init__(parent)
self.setTitle("Code Style Options")
self.setSubTitle("Choose the formatting of the generated code.")
self.setPixmap(QWizard.LogoPixmap, QPixmap(':/images/logo2.png'))
commentCheckBox = QCheckBox("&Start generated files with a comment")
commentCheckBox.setChecked(True)
protectCheckBox = QCheckBox("&Protect header file against multiple "
"inclusions")
protectCheckBox.setChecked(True)
macroNameLabel = QLabel("&Macro name:")
self.macroNameLineEdit = QLineEdit()
macroNameLabel.setBuddy(self.macroNameLineEdit)
self.includeBaseCheckBox = QCheckBox("&Include base class definition")
self.baseIncludeLabel = QLabel("Base class include:")
self.baseIncludeLineEdit = QLineEdit()
self.baseIncludeLabel.setBuddy(self.baseIncludeLineEdit)
protectCheckBox.toggled.connect(macroNameLabel.setEnabled)
protectCheckBox.toggled.connect(self.macroNameLineEdit.setEnabled)
self.includeBaseCheckBox.toggled.connect(self.baseIncludeLabel.setEnabled)
self.includeBaseCheckBox.toggled.connect(self.baseIncludeLineEdit.setEnabled)
self.registerField('comment', commentCheckBox)
self.registerField('protect', protectCheckBox)
self.registerField('macroName', self.macroNameLineEdit)
self.registerField('includeBase', self.includeBaseCheckBox)
self.registerField('baseInclude', self.baseIncludeLineEdit)
layout = QGridLayout()
layout.setColumnMinimumWidth(0, 20)
layout.addWidget(commentCheckBox, 0, 0, 1, 3)
layout.addWidget(protectCheckBox, 1, 0, 1, 3)
layout.addWidget(macroNameLabel, 2, 1)
layout.addWidget(self.macroNameLineEdit, 2, 2)
layout.addWidget(self.includeBaseCheckBox, 3, 0, 1, 3)
layout.addWidget(self.baseIncludeLabel, 4, 1)
layout.addWidget(self.baseIncludeLineEdit, 4, 2)
self.setLayout(layout)
def initializePage(self):
className = self.field('className')
self.macroNameLineEdit.setText(className.upper() + "_H")
baseClass = self.field('baseClass')
is_baseClass = bool(baseClass)
self.includeBaseCheckBox.setChecked(is_baseClass)
self.includeBaseCheckBox.setEnabled(is_baseClass)
self.baseIncludeLabel.setEnabled(is_baseClass)
self.baseIncludeLineEdit.setEnabled(is_baseClass)
if not is_baseClass:
self.baseIncludeLineEdit.clear()
elif QRegExp('Q[A-Z].*').exactMatch(baseClass):
self.baseIncludeLineEdit.setText('<' + baseClass + '>')
else:
self.baseIncludeLineEdit.setText('"' + baseClass.lower() + '.h"')
class OutputFilesPage(QWizardPage):
def __init__(self, parent=None):
super(OutputFilesPage, self).__init__(parent)
self.setTitle("Output Files")
self.setSubTitle("Specify where you want the wizard to put the "
"generated skeleton code.")
self.setPixmap(QWizard.LogoPixmap, QPixmap(':/images/logo3.png'))
outputDirLabel = QLabel("&Output directory:")
self.outputDirLineEdit = QLineEdit()
outputDirLabel.setBuddy(self.outputDirLineEdit)
headerLabel = QLabel("&Header file name:")
self.headerLineEdit = QLineEdit()
headerLabel.setBuddy(self.headerLineEdit)
implementationLabel = QLabel("&Implementation file name:")
self.implementationLineEdit = QLineEdit()
implementationLabel.setBuddy(self.implementationLineEdit)
self.registerField('outputDir*', self.outputDirLineEdit)
self.registerField('header*', self.headerLineEdit)
self.registerField('implementation*', self.implementationLineEdit)
layout = QGridLayout()
layout.addWidget(outputDirLabel, 0, 0)
layout.addWidget(self.outputDirLineEdit, 0, 1)
layout.addWidget(headerLabel, 1, 0)
layout.addWidget(self.headerLineEdit, 1, 1)
layout.addWidget(implementationLabel, 2, 0)
layout.addWidget(self.implementationLineEdit, 2, 1)
self.setLayout(layout)
def initializePage(self):
className = self.field('className')
self.headerLineEdit.setText(className.lower() + '.h')
self.implementationLineEdit.setText(className.lower() + '.cpp')
self.outputDirLineEdit.setText(QDir.toNativeSeparators(QDir.tempPath()))
class ConclusionPage(QWizardPage):
def __init__(self, parent=None):
super(ConclusionPage, self).__init__(parent)
self.setTitle("Conclusion")
self.setPixmap(QWizard.WatermarkPixmap,
QPixmap(':/images/watermark2.png'))
self.label = QLabel()
self.label.setWordWrap(True)
layout = QVBoxLayout()
layout.addWidget(self.label)
self.setLayout(layout)
def initializePage(self):
finishText = self.wizard().buttonText(QWizard.FinishButton)
finishText.replace('&', '')
self.label.setText("Click %s to generate the class skeleton." % finishText)
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
wizard = ClassWizard()
wizard.show()
sys.exit(app.exec_())

Some files were not shown because too many files have changed in this diff Show More