mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-06 22:39:55 +08:00
698 lines
18 KiB
Python
Executable File
698 lines
18 KiB
Python
Executable File
# -*- coding: utf-8 -*-
|
|
|
|
# Form implementation generated from reading ui file 'TextViewer.ui'
|
|
#
|
|
# Created: Mon Jan 23 08:34:47 2006
|
|
# by: The PyQt User Interface Compiler (pyuic) 3.14.1
|
|
#
|
|
# WARNING! All changes made in this file will be lost!
|
|
|
|
|
|
from qt import *
|
|
|
|
image0_data = [
|
|
"16 16 6 1",
|
|
". c None",
|
|
"# c #1414ff",
|
|
"a c #143cff",
|
|
"b c #6464ff",
|
|
"c c #8c8cff",
|
|
"d c #b4b4ff",
|
|
"................",
|
|
".....######.....",
|
|
"....#aaaaaa#....",
|
|
"...#abbbbbba#...",
|
|
"..#abbbbbbbba#..",
|
|
".#abbbccccbbba#.",
|
|
".#abbccccccbba#.",
|
|
".#abbccddccbba#.",
|
|
".#abbccddccbba#.",
|
|
".#abbccccccbba#.",
|
|
".#abbbccccbbba#.",
|
|
"..#abbbbbbbba#..",
|
|
"...#abbbbbba#...",
|
|
"....#aaaaaa#....",
|
|
".....######.....",
|
|
"................"
|
|
]
|
|
image1_data = [
|
|
"22 22 7 1",
|
|
". c None",
|
|
"# c #000000",
|
|
"b c #2e2e2e",
|
|
"c c #5c5c5c",
|
|
"d c #878787",
|
|
"e c #c2c2c2",
|
|
"a c #ffffff",
|
|
"......................",
|
|
"....##########........",
|
|
"....#aaaaaaa#b#.......",
|
|
"....#aaaaaaa#cb#......",
|
|
"....#aaaaaaa#dcb#.....",
|
|
"....#aaaaaaa#edcb#....",
|
|
"....#aaaaaaa#aedcb#...",
|
|
"....#aaaaaaa#######...",
|
|
"....#aaaaaaaaaaaaa#...",
|
|
"....#aaaaaaaaaaaaa#...",
|
|
"....#aaaaaaaaaaaaa#...",
|
|
"....#aaaaaaaaaaaaa#...",
|
|
"....#aaaaaaaaaaaaa#...",
|
|
"....#aaaaaaaaaaaaa#...",
|
|
"....#aaaaaaaaaaaaa#...",
|
|
"....#aaaaaaaaaaaaa#...",
|
|
"....#aaaaaaaaaaaaa#...",
|
|
"....#aaaaaaaaaaaaa#...",
|
|
"....#aaaaaaaaaaaaa#...",
|
|
"....###############...",
|
|
"......................",
|
|
"......................"
|
|
]
|
|
image2_data = [
|
|
"22 22 5 1",
|
|
". c None",
|
|
"# c #000000",
|
|
"c c #848200",
|
|
"a c #ffff00",
|
|
"b c #ffffff",
|
|
"......................",
|
|
"......................",
|
|
"......................",
|
|
"............####....#.",
|
|
"...........#....##.##.",
|
|
"..................###.",
|
|
".................####.",
|
|
".####...........#####.",
|
|
"#abab##########.......",
|
|
"#babababababab#.......",
|
|
"#ababababababa#.......",
|
|
"#babababababab#.......",
|
|
"#ababab###############",
|
|
"#babab##cccccccccccc##",
|
|
"#abab##cccccccccccc##.",
|
|
"#bab##cccccccccccc##..",
|
|
"#ab##cccccccccccc##...",
|
|
"#b##cccccccccccc##....",
|
|
"###cccccccccccc##.....",
|
|
"##cccccccccccc##......",
|
|
"###############.......",
|
|
"......................"
|
|
]
|
|
image3_data = [
|
|
"22 22 5 1",
|
|
". c None",
|
|
"# c #000000",
|
|
"a c #848200",
|
|
"b c #c1c1c1",
|
|
"c c #cab5d1",
|
|
"......................",
|
|
".####################.",
|
|
".#aa#bbbbbbbbbbbb#bb#.",
|
|
".#aa#bbbbbbbbbbbb#bb#.",
|
|
".#aa#bbbbbbbbbcbb####.",
|
|
".#aa#bbbccbbbbbbb#aa#.",
|
|
".#aa#bbbccbbbbbbb#aa#.",
|
|
".#aa#bbbbbbbbbbbb#aa#.",
|
|
".#aa#bbbbbbbbbbbb#aa#.",
|
|
".#aa#bbbbbbbbbbbb#aa#.",
|
|
".#aa#bbbbbbbbbbbb#aa#.",
|
|
".#aaa############aaa#.",
|
|
".#aaaaaaaaaaaaaaaaaa#.",
|
|
".#aaaaaaaaaaaaaaaaaa#.",
|
|
".#aaa#############aa#.",
|
|
".#aaa#########bbb#aa#.",
|
|
".#aaa#########bbb#aa#.",
|
|
".#aaa#########bbb#aa#.",
|
|
".#aaa#########bbb#aa#.",
|
|
".#aaa#########bbb#aa#.",
|
|
"..##################..",
|
|
"......................"
|
|
]
|
|
image4_data = [
|
|
"22 22 88 2",
|
|
"Qt c None",
|
|
".2 c #000000",
|
|
".S c #08ff08",
|
|
"#v c #100810",
|
|
".U c #101010",
|
|
"#c c #101018",
|
|
".M c #181018",
|
|
"#e c #181818",
|
|
".A c #181821",
|
|
".L c #211821",
|
|
"#l c #212121",
|
|
".z c #212129",
|
|
"#m c #292129",
|
|
"#u c #292929",
|
|
"#n c #292931",
|
|
".R c #29ff29",
|
|
"#o c #312931",
|
|
".T c #313131",
|
|
"#p c #313139",
|
|
".Z c #31ff31",
|
|
"#q c #393139",
|
|
"#t c #393939",
|
|
".y c #393942",
|
|
"#s c #423942",
|
|
".o c #424242",
|
|
"#h c #4a4a52",
|
|
".n c #5a525a",
|
|
"#r c #5a5a63",
|
|
".I c #5ace5a",
|
|
"#b c #6b636b",
|
|
".p c #6b6b6b",
|
|
".x c #6b6b73",
|
|
".Y c #6bff63",
|
|
".l c #736b73",
|
|
".t c #7b737b",
|
|
".s c #7b7384",
|
|
".0 c #7bff7b",
|
|
".r c #847b84",
|
|
".u c #847b8c",
|
|
"#g c #84848c",
|
|
".v c #8c7b94",
|
|
"#i c #8c848c",
|
|
".w c #8c8494",
|
|
"#j c #8c8c8c",
|
|
".8 c #8c8c94",
|
|
".m c #948c94",
|
|
"#k c #948c9c",
|
|
"#f c #949494",
|
|
".q c #94949c",
|
|
".J c #94c694",
|
|
"#d c #9c949c",
|
|
"#a c #9c94a5",
|
|
".k c #9c9c9c",
|
|
".N c #9c9ca5",
|
|
".H c #9ccea5",
|
|
".K c #a59ca5",
|
|
"#. c #a59cad",
|
|
".i c #a5a5a5",
|
|
".3 c #a5a5ad",
|
|
"## c #ad9cad",
|
|
".V c #ada5ad",
|
|
".d c #adadad",
|
|
".j c #adadb5",
|
|
".9 c #b5adb5",
|
|
".# c #b5b5b5",
|
|
".a c #bdbdbd",
|
|
".7 c #bdd6bd",
|
|
".c c #c6c6c6",
|
|
".5 c #cec6ce",
|
|
".b c #cecece",
|
|
".4 c #ceced6",
|
|
".F c #d6ced6",
|
|
".G c #d6cede",
|
|
".h c #d6d6d6",
|
|
".E c #d6d6de",
|
|
".Q c #d6ffd6",
|
|
".B c #ded6de",
|
|
".1 c #ded6e7",
|
|
".g c #dedede",
|
|
".D c #dedee7",
|
|
".6 c #e7dee7",
|
|
".f c #e7e7e7",
|
|
".C c #e7e7ef",
|
|
".X c #e7ffe7",
|
|
".O c #efe7ef",
|
|
".e c #efefef",
|
|
".W c #f7f7f7",
|
|
".P c #ffffff",
|
|
"QtQtQtQtQtQt.#.a.b.b.b.b.c.c.a.a.d.aQtQtQtQt",
|
|
"QtQtQtQtQtQt.a.e.f.f.f.f.f.e.e.e.g.aQtQtQtQt",
|
|
"QtQtQtQtQtQt.a.c.c.c.b.b.c.c.c.c.a.cQtQtQtQt",
|
|
"QtQtQtQtQtQt.#.a.a.a.a.#.a.a.#.#.d.aQtQtQtQt",
|
|
"QtQtQtQtQt.c.d.c.a.c.c.c.a.a.a.c.#QtQtQtQtQt",
|
|
"QtQtQtQtQt.a.a.#.a.a.a.a.a.a.c.c.#QtQtQtQtQt",
|
|
"QtQtQtQtQt.a.#.c.a.a.a.a.a.c.a.c.dQtQtQtQtQt",
|
|
"QtQtQtQtQt.c.a.a.a.a.a.a.a.a.a.a.#QtQtQtQtQt",
|
|
"QtQtQtQtQt.d.b.f.g.g.g.g.g.g.h.g.i.i.jQtQtQt",
|
|
"QtQtQt.a.k.l.#.h.b.h.b.h.b.h.g.g.m.n.o.p.#Qt",
|
|
"QtQt.a.q.r.s.t.t.t.t.t.t.t.u.v.w.x.y.z.A.o.i",
|
|
"Qt.a.k.B.C.D.B.E.E.E.E.F.G.H.I.J.K.o.L.L.M.y",
|
|
".a.N.O.P.P.P.P.P.P.P.P.P.Q.R.S.R.b.v.T.A.U.L",
|
|
".V.W.P.P.P.P.P.P.P.P.P.P.X.Y.Z.0.P.1.t.A.2.L",
|
|
".3.E.4.5.4.h.E.E.g.6.D.B.D.E.7.F.4.5.8.M.2.A",
|
|
".m.9.j.V.3#..3.K#.#..i#..K#.###a.q.8#b#c.2.L",
|
|
".m.j.j#..3.K.K.K.N.K.N.N.N.N#a#d#d.w#b#c.2#e",
|
|
"#f#.#..K.N.K.N.N.N#a.k#a#d#d#d#a.m#g#b.M.2#h",
|
|
".m.3.K.K#a.k#a#d#a.k#a#d#a#d.q.m.8#i.x#c#e.d",
|
|
"#f#g#i.w#j.w#i.8.w#i.8.8.m.8.m#k.8.w#b#e#fQt",
|
|
".#.l.z.A#l.z#m#m#m#n#o#o#p#p#q#q#p#o#p#fQtQt",
|
|
"QtQt.d#r#s#s#t#p.T.T.T#u#u.z#e#e#v.o.kQtQtQt"
|
|
]
|
|
image5_data = [
|
|
"22 22 3 1",
|
|
". c None",
|
|
"# c #000084",
|
|
"a c #848284",
|
|
"......................",
|
|
"......................",
|
|
"......................",
|
|
"......................",
|
|
"......................",
|
|
"...........######a....",
|
|
"..#......##########...",
|
|
"..##...####......##a..",
|
|
"..###.###.........##..",
|
|
"..######..........##..",
|
|
"..#####...........##..",
|
|
"..######..........##..",
|
|
"..#######.........##..",
|
|
"..########.......##a..",
|
|
"...............a###...",
|
|
"...............###....",
|
|
"......................",
|
|
"......................",
|
|
"......................",
|
|
"......................",
|
|
"......................",
|
|
"......................"
|
|
]
|
|
image6_data = [
|
|
"22 22 3 1",
|
|
". c None",
|
|
"a c #000084",
|
|
"# c #848284",
|
|
"......................",
|
|
"......................",
|
|
"......................",
|
|
"......................",
|
|
"......................",
|
|
"....#aaaaaa...........",
|
|
"...aaaaaaaaaa......a..",
|
|
"..#aa......aaaa...aa..",
|
|
"..aa.........aaa.aaa..",
|
|
"..aa..........aaaaaa..",
|
|
"..aa...........aaaaa..",
|
|
"..aa..........aaaaaa..",
|
|
"..aa.........aaaaaaa..",
|
|
"..#aa.......aaaaaaaa..",
|
|
"...aaa#...............",
|
|
"....aaa...............",
|
|
"......................",
|
|
"......................",
|
|
"......................",
|
|
"......................",
|
|
"......................",
|
|
"......................"
|
|
]
|
|
image7_data = [
|
|
"22 22 3 1",
|
|
". c None",
|
|
"# c #000000",
|
|
"a c #000082",
|
|
"......................",
|
|
".......#.....#........",
|
|
".......#.....#........",
|
|
".......#.....#........",
|
|
".......#....##........",
|
|
".......##...#.........",
|
|
"........#...#.........",
|
|
"........##.##.........",
|
|
".........###..........",
|
|
".........###..........",
|
|
"..........#...........",
|
|
".........a#a..........",
|
|
"........aa.aaa........",
|
|
".......a.a.a..a.......",
|
|
"......a..a.a...a......",
|
|
".....a...a.a....a.....",
|
|
"....a....a.a....a.....",
|
|
"....a....a..a...a.....",
|
|
"....a....a..a..a......",
|
|
"....a...a....aa.......",
|
|
".....aaa..............",
|
|
"......................"
|
|
]
|
|
image8_data = [
|
|
"22 22 6 1",
|
|
". c None",
|
|
"# c #000000",
|
|
"b c #000082",
|
|
"c c #3c3cfd",
|
|
"d c #8b8bfd",
|
|
"a c #ffffff",
|
|
"......................",
|
|
"......................",
|
|
"########..............",
|
|
"#aaaaaa##.............",
|
|
"#a####a#a#............",
|
|
"#aaaaaa#aa#...........",
|
|
"#a####a#bbbbbbbb......",
|
|
"#aaaaaa#baaaaaabb.....",
|
|
"#a#####aba####abcb....",
|
|
"#aaaaaaabaaaaaabdcb...",
|
|
"#a#####aba####abadcb..",
|
|
"#aaaaaaabaaaaaabbbbbb.",
|
|
"#a#####aba####aaaaaab.",
|
|
"#aaaaaaabaaaaaaaaaaab.",
|
|
"#a#####aba#########ab.",
|
|
"#aaaaaaabaaaaaaaaaaab.",
|
|
"########ba#########ab.",
|
|
"........baaaaaaaaaaab.",
|
|
"........ba#########ab.",
|
|
"........baaaaaaaaaaab.",
|
|
"........bbbbbbbbbbbbb.",
|
|
"......................"
|
|
]
|
|
image9_data = [
|
|
"22 22 8 1",
|
|
". c None",
|
|
"# c #000000",
|
|
"e c #000084",
|
|
"c c #848200",
|
|
"b c #848284",
|
|
"d c #c6c3c6",
|
|
"a c #ffff00",
|
|
"f c #ffffff",
|
|
"......................",
|
|
".......#####..........",
|
|
"..######aaa######.....",
|
|
".######aaaaa######....",
|
|
"##bcb##a###a##bcb##...",
|
|
"#bcb#ddddddddd#bcb#...",
|
|
"#cbc#ddddddddd#cbc#...",
|
|
"#bcb###########bcb#...",
|
|
"#cbcbcbcbcbcbcbcbc#...",
|
|
"#bcbcbcbcbcbcbcbcb#...",
|
|
"#cbcbcbceeeeeeeeee#...",
|
|
"#bcbcbcbefffffffefe...",
|
|
"#cbcbcbcefeeeeefeffe..",
|
|
"#bcbcbcbefffffffefffe.",
|
|
"#cbcbcbcefeeeeefeffffe",
|
|
"#bcbcbcbefffffffeeeeee",
|
|
"#cbcbcbcefeeeeeffffffe",
|
|
"#bcbcbcbeffffffffffffe",
|
|
"#cbcbcbcefeeeeeeeeeefe",
|
|
".#######effffffffffffe",
|
|
"........eeeeeeeeeeeeee",
|
|
"......................"
|
|
]
|
|
image10_data = [
|
|
"22 22 106 2",
|
|
"Qt c None",
|
|
"#N c #212121",
|
|
"#J c #292929",
|
|
"#K c #393939",
|
|
"#M c #424242",
|
|
".m c #5a5a5a",
|
|
"#r c #5a736b",
|
|
"#A c #5a9c84",
|
|
"#B c #636363",
|
|
".N c #636b6b",
|
|
"#G c #63736b",
|
|
"#v c #63ad8c",
|
|
"#H c #6b6b6b",
|
|
".c c #6b7373",
|
|
"#D c #6b7b73",
|
|
".l c #6b7b7b",
|
|
".W c #6b847b",
|
|
".t c #6b8c7b",
|
|
"#x c #6b9484",
|
|
"#w c #6bad94",
|
|
".u c #737373",
|
|
".v c #737b73",
|
|
".g c #737b7b",
|
|
".D c #738c84",
|
|
".7 c #739484",
|
|
"#d c #73948c",
|
|
"#z c #73a59c",
|
|
"#p c #73b594",
|
|
"#o c #73bd9c",
|
|
".b c #7b7b7b",
|
|
".O c #7b8484",
|
|
"#a c #7bad94",
|
|
"#q c #7bad9c",
|
|
"#i c #7bb59c",
|
|
".5 c #7bbd9c",
|
|
"#b c #7bbda5",
|
|
"#h c #7bc69c",
|
|
"#y c #7bc6a5",
|
|
".8 c #848484",
|
|
".4 c #8484b5",
|
|
".h c #849c94",
|
|
"#n c #84a5ad",
|
|
".V c #84ada5",
|
|
"#E c #84b59c",
|
|
"#F c #84b5a5",
|
|
"#j c #84bda5",
|
|
"#t c #84c6a5",
|
|
"#l c #84cead",
|
|
".E c #8c8c8c",
|
|
"#g c #8c8cbd",
|
|
"## c #8c94b5",
|
|
"#m c #8cadbd",
|
|
"#c c #8cb5a5",
|
|
".L c #8cc6ad",
|
|
".T c #8ccead",
|
|
"#f c #8cceb5",
|
|
".a c #949494",
|
|
".n c #94a59c",
|
|
"#u c #94a5ce",
|
|
".k c #94bdad",
|
|
".M c #94c6ad",
|
|
".6 c #94c6b5",
|
|
".B c #94ceb5",
|
|
".1 c #94d6b5",
|
|
".C c #94d6bd",
|
|
".9 c #94debd",
|
|
".K c #9c94d6",
|
|
".d c #9c9c9c",
|
|
".w c #9cbdb5",
|
|
"#. c #9cbdd6",
|
|
"#s c #9ccebd",
|
|
".2 c #9ccece",
|
|
".0 c #9cdebd",
|
|
".S c #9ce7bd",
|
|
".Z c #9ce7c6",
|
|
".U c #a594de",
|
|
"#L c #a5a5a5",
|
|
".A c #a5b5de",
|
|
".3 c #a5b5ef",
|
|
".I c #a5cece",
|
|
"#k c #a5dec6",
|
|
".s c #a5e7c6",
|
|
".f c #adadad",
|
|
".J c #adadef",
|
|
".R c #adb5de",
|
|
".i c #adcec6",
|
|
".P c #add6c6",
|
|
".j c #addece",
|
|
"#e c #ade7ce",
|
|
".# c #b5b5b5",
|
|
".H c #b5bdde",
|
|
".Q c #b5dede",
|
|
".r c #b5efd6",
|
|
".e c #bdbdbd",
|
|
".z c #bdc6f7",
|
|
".y c #bdd6ff",
|
|
".X c #bde7d6",
|
|
".q c #bdefde",
|
|
".Y c #bdf7de",
|
|
"#I c #c6c6c6",
|
|
".x c #c6def7",
|
|
".p c #c6f7e7",
|
|
"#C c #ced6ce",
|
|
".G c #cedeff",
|
|
".o c #ceffef",
|
|
".F c #d6fff7",
|
|
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
|
|
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
|
|
"QtQtQt.#.a.b.c.c.b.d.eQtQtQtQtQtQtQtQtQtQtQt",
|
|
"QtQt.f.g.h.i.j.j.k.l.b.#QtQtQtQtQtQtQtQtQtQt",
|
|
"Qt.f.m.n.o.o.p.q.r.s.t.u.eQtQtQtQtQtQtQtQtQt",
|
|
".e.v.w.q.p.x.y.z.A.B.C.D.EQtQtQtQtQtQtQtQtQt",
|
|
".d.h.F.q.G.H.I.I.J.K.L.M.N.#QtQtQtQtQtQtQtQt",
|
|
".O.P.o.Q.R.B.S.T.A.U.V.B.W.dQtQtQtQtQtQtQtQt",
|
|
".g.X.Y.Z.Z.0.1.2.3.4.5.6.7.8QtQtQtQtQtQtQtQt",
|
|
".g.j.r.0.9.1#..3###a#b#c#d.8QtQtQtQtQtQtQtQt",
|
|
".v.P#e.1.1#f.A#g.5#h#i#j.W.EQtQtQtQtQtQtQtQt",
|
|
".E#c#k#f.L#l#m#n#o#p#p#q#r.fQtQtQtQtQtQtQtQt",
|
|
".f.g#s#t#t#b#u.4#v#w#w#x.u.eQtQtQtQtQtQtQtQt",
|
|
"Qt.E.t#y#b.5#z#d#p#A#A#B.d#C.f.eQtQtQtQtQtQt",
|
|
"Qt.e.b#D#E#F#j#i#a.7.m.dQt.f#B.m.fQtQtQtQtQt",
|
|
"QtQt.e.E.N#D.W.W#G#H.fQtQt#I.b#J#K.E.eQtQtQt",
|
|
"QtQtQtQt.#.d.E.a#L#IQtQtQtQtQt#L#M#J#H.fQtQt",
|
|
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.e.u#N#K.aQt",
|
|
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.d#K#N#H",
|
|
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt.##B.m",
|
|
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
|
|
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"
|
|
]
|
|
|
|
class TextViewer(QMainWindow):
|
|
def __init__(self,parent = None,name = None,fl = 0):
|
|
QMainWindow.__init__(self,parent,name,fl)
|
|
self.statusBar()
|
|
|
|
self.image0 = QPixmap(image0_data)
|
|
self.image1 = QPixmap(image1_data)
|
|
self.image2 = QPixmap(image2_data)
|
|
self.image3 = QPixmap(image3_data)
|
|
self.image4 = QPixmap(image4_data)
|
|
self.image5 = QPixmap(image5_data)
|
|
self.image6 = QPixmap(image6_data)
|
|
self.image7 = QPixmap(image7_data)
|
|
self.image8 = QPixmap(image8_data)
|
|
self.image9 = QPixmap(image9_data)
|
|
self.image10 = QPixmap(image10_data)
|
|
|
|
if not name:
|
|
self.setName("TextViewer")
|
|
|
|
self.setIcon(self.image0)
|
|
|
|
self.setCentralWidget(QWidget(self,"qt_central_widget"))
|
|
TextViewerLayout = QVBoxLayout(self.centralWidget(),2,1,"TextViewerLayout")
|
|
|
|
self.textBrowser = QTextBrowser(self.centralWidget(),"textBrowser")
|
|
TextViewerLayout.addWidget(self.textBrowser)
|
|
|
|
self.fileNewAction = QAction(self,"fileNewAction")
|
|
self.fileNewAction.setIconSet(QIconSet(self.image1))
|
|
self.fileNewAction.setAccel(4194382)
|
|
self.fileOpenAction = QAction(self,"fileOpenAction")
|
|
self.fileOpenAction.setIconSet(QIconSet(self.image2))
|
|
self.fileOpenAction.setAccel(4194383)
|
|
self.fileSaveAction = QAction(self,"fileSaveAction")
|
|
self.fileSaveAction.setIconSet(QIconSet(self.image3))
|
|
self.fileSaveAction.setAccel(4194387)
|
|
self.fileSaveAsAction = QAction(self,"fileSaveAsAction")
|
|
self.fileSaveAsAction.setAccel(0)
|
|
self.filePrintAction = QAction(self,"filePrintAction")
|
|
self.filePrintAction.setIconSet(QIconSet(self.image4))
|
|
self.filePrintAction.setAccel(4194384)
|
|
self.fileExitAction = QAction(self,"fileExitAction")
|
|
self.fileExitAction.setAccel(0)
|
|
self.editUndoAction = QAction(self,"editUndoAction")
|
|
self.editUndoAction.setIconSet(QIconSet(self.image5))
|
|
self.editUndoAction.setAccel(4194394)
|
|
self.editRedoAction = QAction(self,"editRedoAction")
|
|
self.editRedoAction.setIconSet(QIconSet(self.image6))
|
|
self.editRedoAction.setAccel(4194393)
|
|
self.editCutAction = QAction(self,"editCutAction")
|
|
self.editCutAction.setIconSet(QIconSet(self.image7))
|
|
self.editCutAction.setAccel(4194392)
|
|
self.editCopyAction = QAction(self,"editCopyAction")
|
|
self.editCopyAction.setIconSet(QIconSet(self.image8))
|
|
self.editCopyAction.setAccel(4194371)
|
|
self.editPasteAction = QAction(self,"editPasteAction")
|
|
self.editPasteAction.setIconSet(QIconSet(self.image9))
|
|
self.editPasteAction.setAccel(4194390)
|
|
self.editFindAction = QAction(self,"editFindAction")
|
|
self.editFindAction.setIconSet(QIconSet(self.image10))
|
|
self.editFindAction.setAccel(4194374)
|
|
|
|
|
|
|
|
|
|
self.menubar = QMenuBar(self,"menubar")
|
|
|
|
|
|
self.fileMenu = QPopupMenu(self)
|
|
self.fileSaveAction.addTo(self.fileMenu)
|
|
self.fileSaveAsAction.addTo(self.fileMenu)
|
|
self.fileMenu.insertSeparator()
|
|
self.filePrintAction.addTo(self.fileMenu)
|
|
self.fileMenu.insertSeparator()
|
|
self.fileExitAction.addTo(self.fileMenu)
|
|
self.menubar.insertItem(QString(""),self.fileMenu,1)
|
|
|
|
self.editMenu = QPopupMenu(self)
|
|
self.editMenu.insertSeparator()
|
|
self.editCopyAction.addTo(self.editMenu)
|
|
self.editMenu.insertSeparator()
|
|
self.editFindAction.addTo(self.editMenu)
|
|
self.menubar.insertItem(QString(""),self.editMenu,2)
|
|
|
|
|
|
self.languageChange()
|
|
|
|
self.resize(QSize(612,480).expandedTo(self.minimumSizeHint()))
|
|
self.clearWState(Qt.WState_Polished)
|
|
|
|
self.connect(self.fileNewAction,SIGNAL("activated()"),self.fileNew)
|
|
self.connect(self.fileOpenAction,SIGNAL("activated()"),self.fileOpen)
|
|
self.connect(self.fileSaveAction,SIGNAL("activated()"),self.fileSave)
|
|
self.connect(self.fileSaveAsAction,SIGNAL("activated()"),self.fileSaveAs)
|
|
self.connect(self.filePrintAction,SIGNAL("activated()"),self.filePrint)
|
|
self.connect(self.fileExitAction,SIGNAL("activated()"),self.fileExit)
|
|
self.connect(self.editUndoAction,SIGNAL("activated()"),self.editUndo)
|
|
self.connect(self.editRedoAction,SIGNAL("activated()"),self.editRedo)
|
|
self.connect(self.editCutAction,SIGNAL("activated()"),self.editCut)
|
|
self.connect(self.editCopyAction,SIGNAL("activated()"),self.editCopy)
|
|
self.connect(self.editPasteAction,SIGNAL("activated()"),self.editPaste)
|
|
self.connect(self.editFindAction,SIGNAL("activated()"),self.editFind)
|
|
|
|
|
|
def languageChange(self):
|
|
self.setCaption(self.__tr("TextViewer"))
|
|
self.fileNewAction.setText(self.__tr("New"))
|
|
self.fileNewAction.setMenuText(self.__tr("&New"))
|
|
self.fileOpenAction.setText(self.__tr("Open"))
|
|
self.fileOpenAction.setMenuText(self.__tr("&Open..."))
|
|
self.fileSaveAction.setText(self.__tr("Save"))
|
|
self.fileSaveAction.setMenuText(self.__tr("&Save"))
|
|
self.fileSaveAsAction.setText(self.__tr("Save As"))
|
|
self.fileSaveAsAction.setMenuText(self.__tr("Save &As..."))
|
|
self.filePrintAction.setText(self.__tr("Print"))
|
|
self.filePrintAction.setMenuText(self.__tr("&Print..."))
|
|
self.fileExitAction.setText(self.__tr("Exit"))
|
|
self.fileExitAction.setMenuText(self.__tr("E&xit"))
|
|
self.editUndoAction.setText(self.__tr("Undo"))
|
|
self.editUndoAction.setMenuText(self.__tr("&Undo"))
|
|
self.editRedoAction.setText(self.__tr("Redo"))
|
|
self.editRedoAction.setMenuText(self.__tr("&Redo"))
|
|
self.editCutAction.setText(self.__tr("Cut"))
|
|
self.editCutAction.setMenuText(self.__tr("&Cut"))
|
|
self.editCopyAction.setText(self.__tr("Copy"))
|
|
self.editCopyAction.setMenuText(self.__tr("C&opy"))
|
|
self.editPasteAction.setText(self.__tr("Paste"))
|
|
self.editPasteAction.setMenuText(self.__tr("&Paste"))
|
|
self.editFindAction.setText(self.__tr("Find"))
|
|
self.editFindAction.setMenuText(self.__tr("&Find..."))
|
|
if self.menubar.findItem(1):
|
|
self.menubar.findItem(1).setText(self.__tr("&File"))
|
|
if self.menubar.findItem(2):
|
|
self.menubar.findItem(2).setText(self.__tr("&Edit"))
|
|
|
|
|
|
def fileNew(self):
|
|
print "TextViewer.fileNew(): Not implemented yet"
|
|
|
|
def fileOpen(self):
|
|
print "TextViewer.fileOpen(): Not implemented yet"
|
|
|
|
def fileSave(self):
|
|
print "TextViewer.fileSave(): Not implemented yet"
|
|
|
|
def fileSaveAs(self):
|
|
print "TextViewer.fileSaveAs(): Not implemented yet"
|
|
|
|
def filePrint(self):
|
|
print "TextViewer.filePrint(): Not implemented yet"
|
|
|
|
def fileExit(self):
|
|
print "TextViewer.fileExit(): Not implemented yet"
|
|
|
|
def editUndo(self):
|
|
print "TextViewer.editUndo(): Not implemented yet"
|
|
|
|
def editRedo(self):
|
|
print "TextViewer.editRedo(): Not implemented yet"
|
|
|
|
def editCut(self):
|
|
print "TextViewer.editCut(): Not implemented yet"
|
|
|
|
def editCopy(self):
|
|
print "TextViewer.editCopy(): Not implemented yet"
|
|
|
|
def editPaste(self):
|
|
print "TextViewer.editPaste(): Not implemented yet"
|
|
|
|
def editFind(self):
|
|
print "TextViewer.editFind(): Not implemented yet"
|
|
|
|
def __tr(self,s,c = None):
|
|
return qApp.translate("TextViewer",s,c)
|