Codebase list peg-e / 6b59993
Update upstream source from tag 'upstream/1.3.0' Update to upstream version '1.3.0' with Debian dir 80bf20db8b6ae970d46c1b41953850d4d6b29923 Markus Koschany 2 years ago
32 changed file(s) with 1085 addition(s) and 648 deletion(s). Raw diff Collapse all Expand all
0 cmake_minimum_required(VERSION 3.16.0)
1
2 # Configure project
3 project(peg-e VERSION 1.3.0 LANGUAGES CXX)
4
5 set(CMAKE_CXX_STANDARD 17)
6 set(CMAKE_CXX_STANDARD_REQUIRED ON)
7
8 set(CMAKE_AUTOMOC ON)
9 set(CMAKE_AUTORCC ON)
10
11 find_package(Qt6 REQUIRED COMPONENTS Core Gui LinguistTools Widgets)
12 if(UNIX AND NOT APPLE)
13 include(GNUInstallDirs)
14 endif()
15
16 if(CMAKE_BUILD_TYPE STREQUAL "Debug")
17 add_compile_definitions(
18 QT_STRICT_ITERATORS
19 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
20 QT_DISABLE_DEPRECATED_BEFORE=0x060000
21 )
22 endif()
23
24 # Create translations
25 file(GLOB translations_SRCS translations/*.ts)
26 qt6_add_translation(translations_QM ${translations_SRCS})
27
28 add_custom_target(update_translations
29 COMMAND Qt6::lupdate -no-obsolete -locations none src -ts ${translations_SRCS}
30 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
31 VERBATIM
32 )
33
34 # Create program
35 qt6_add_executable(peg-e
36 src/board.cpp
37 src/hole.cpp
38 src/locale_dialog.cpp
39 src/main.cpp
40 src/movement.cpp
41 src/peg.cpp
42 src/puzzle.cpp
43 src/window.cpp
44 ${translations_QM}
45 )
46
47 target_link_libraries(peg-e PRIVATE
48 Qt6::Core
49 Qt6::Gui
50 Qt6::Widgets
51 )
52
53 target_compile_definitions(peg-e PRIVATE VERSIONSTR="${PROJECT_VERSION}")
54
55 # Install
56 if(UNIX AND NOT APPLE)
57 target_sources(peg-e PRIVATE icons/icon.qrc)
58
59 install(TARGETS peg-e RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
60 install(FILES ${translations_QM} DESTINATION ${CMAKE_INSTALL_DATADIR}/peg-e/translations)
61 install(FILES doc/peg-e.6 DESTINATION ${CMAKE_INSTALL_MANDIR}/man6 COMPONENT doc)
62 install(DIRECTORY icons/hicolor DESTINATION ${CMAKE_INSTALL_DATADIR}/icons)
63 install(DIRECTORY icons/oxygen/hicolor DESTINATION ${CMAKE_INSTALL_DATADIR}/peg-e/icons)
64 install(FILES icons/peg-e.appdata.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo)
65 install(FILES icons/peg-e.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
66 elseif(WIN32)
67 # Use Qt6 macro until CMake provides something
68 # https://bugreports.qt.io/browse/QTBUG-87618
69 set_target_properties(peg-e PROPERTIES
70 WIN32_EXECUTABLE TRUE
71 QT_TARGET_VERSION "${PROJECT_VERSION}"
72 QT_TARGET_COMPANY_NAME "Graeme Gott"
73 QT_TARGET_DESCRIPTION "Peg elimination game"
74 QT_TARGET_COPYRIGHT "Copyright (C) 2021 Graeme Gott"
75 QT_TARGET_PRODUCT_NAME "Peg-E"
76 QT_TARGET_RC_ICONS ${CMAKE_SOURCE_DIR}/icons/peg-e.ico
77 )
78 _qt_internal_generate_win32_rc_file(peg-e)
79 endif()
0 1.3.0
1 -----
2 * Added support for Qt 6.
3 * Refactored code.
4 * Removed XPM icon.
5 * Translation updates: Esperanto, Telugu.
6
07 1.2.8
18 -----
29 * FIXED: Did not load locales with underscores.
1313
1414 3.) Type 'sudo make install' to install the program.
1515
16 Mac OS X:
17 1.) Type 'qmake -spec macx-g++' to configure the program.
16 macOS:
17 1.) Type 'qmake -spec macx-clang' to configure the program.
1818
1919 2.) Type 'make' to compile the program.
2020
2525
2626 2.) Type 'make' to compile the program.
2727
28 3.) Type 'windows_deploy' to create a compressed image of the program. Note
29 that you must have the 7z executable from 7-zip.org in your %PATH% for
30 this to work.
28 3.) Type 'windows_deploy' to create an installer of the program. Note
29 that you must have the NSIS executable from nsis.sourceforge.io in
30 your %PATH% for this to work.
0 .TH "PEG-E" "6" "February 2014"
0 .TH PEG-E 6 "April 2021" "Peg-E 1.2.8" "Games Manual"
11
22 .SH "NAME"
33 peg\-e \- peg elimination solitaire game
44
55 .SH "SYNOPSIS"
6 .PP
76 .B peg\-e
7 [options]
88
99 .SH "DESCRIPTION"
10 .PP
1110 Peg-E is a peg solitaire game in which you jump over pieces in order to
1211 remove them from the board, ultimately trying to eliminate all but one. The
1312 boards are randomly generated, with 100 levels of difficulty. The game
1413 auto-saves, and has undo-redo capability. Pieces can move horizontally,
1514 vertically, and diagonally.
1615
16 .SH "OPTIONS"
17 .TP
18 .BR \-h ", " \-\-help
19 Displays help on commandline options.
20 .TP
21 .B \-\-help-all
22 Displays help including Qt specific options.
23 .TP
24 .BR \-v ", " \-\-version
25 Displays version information.
26
27 .SH "SEE ALSO"
28 .BR qt5options (7)
29
30 .SH "REPORTING BUGS"
31 Report bugs to <peg\-e@bugs.gottcode.org>.
32
1733 .SH "COPYRIGHT"
34 Copyright \(co 2009-2021 Graeme Gott
1835 .PP
19 Copyright \(co 2014 Graeme Gott
20 .PP
21 This program is free software; you can redistribute it and/or modify
22 it under the terms of the GNU General Public License as published by
23 the Free Software Foundation; either version 3 of the License, or
24 (at your option) any later version.
25 .PP
26 This program is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 GNU General Public License for more details.
30 .PP
31 You should have received a copy of the GNU General Public License
32 along with this program. If not, see <http://www.gnu.org/licenses/>.
36 Free use of this software is granted under the terms of the GNU General
37 Public License version 3 (GPLv3). There is NO WARRANTY, to the extent
38 permitted by law.
3339
3440 .SH "AUTHOR"
35 .PP
3641 Graeme Gott <graeme@gottcode.org>.
66 <name xml:lang="cs">Peg-E</name>
77 <name xml:lang="de">Peg-E</name>
88 <name xml:lang="el">Peg-E</name>
9 <name xml:lang="eo">Peg-Eo</name>
910 <name xml:lang="es">Peg-E</name>
1011 <name xml:lang="lt">Peg-E</name>
1112 <name xml:lang="ms">Peg-E</name>
1415 <name xml:lang="pt">Peg-E</name>
1516 <name xml:lang="ro">Peg-E</name>
1617 <name xml:lang="ru">Peg-E</name>
18 <name xml:lang="sv">Peg-E</name>
19 <name xml:lang="te">పెగ్-ఇ</name>
1720 <name xml:lang="tr">Peg-E</name>
1821 <name xml:lang="zh">Peg-E</name>
1922 <summary>Jump pegs to eliminate them</summary>
2023 <summary xml:lang="de">Sprung zu Heringen, um sie zu beseitigen</summary>
2124 <summary xml:lang="el">Μετάβαση σε γόμφους για να εξαλειφθούν</summary>
25 <summary xml:lang="eo">Saltu sur pegojn por ilin elimini </summary>
2226 <summary xml:lang="es">Salta sobre los pegs para eliminarlos</summary>
2327 <summary xml:lang="he">קפוץ מעל גולות כדי לסלק אותן</summary>
2428 <summary xml:lang="lt">Peršokite per kamštelius, kad juos pašalintumėte</summary>
2731 <summary xml:lang="pl">Przeskocz kołki, aby je usunąć</summary>
2832 <summary xml:lang="pt">Salte com os pinos para os eliminar</summary>
2933 <summary xml:lang="ro">Sari peste pioni pentru a-i eliminna</summary>
34 <summary xml:lang="sv">Hoppa över pinnar för att eliminera dem</summary>
35 <summary xml:lang="te">వాటిని తొలగించడానికి పెగ్స్ ని ఎగరవేయి</summary>
3036 <summary xml:lang="zh">跳过棋子,消除它!</summary>
3137
3238 <description>
4147 <p xml:lang="pl">Peg-E to gra typu solitaire, w której przeskakujesz przez części, aby usunąć je z planszy, w końcu próbujesz usunąć wszystkie, oprócz jednego. Plansze generowane są losowo, przy 100 poziomach trudności. Gra automatycznie zapisuje stan i ma opcję cofania ruchu. Części mogą poruszać się poziomo, pionowo i na ukos.</p>
4248 <p xml:lang="pt">O Peg-E é um jogo do tipo solitário em que se salta sobre as peças por forma a removê-las do tabuleiro, por forma a tentar remover todas até restar apenas uma. Os tabuleiros são gerados aleatoriamente, com 100 níveis de dificuldade. O jogo grava automaticamente e tem a funcionalidade de desfazer as jogadas. As peças podem-se mover na horizontal, vertical e diagonal.</p>
4349 <p xml:lang="ro">Peg-E este un joc cu pioni în care sa sari peste piese pentru a le elimina de pe tablă, încercînd, în cele din urmă, a le elimina pe toate cu excepţia uneia. Tablele sunt generate aleator, cu 100 de niveluri de dificultate. Jocul salvează automat şi are capacitatea de a face/reface. Piese se pot deplasa orizontal, vertical şi pe diagonală.</p>
50 <p xml:lang="sv">Peg-E är ett solitairespel där du hoppar över bitar för att ta bort dem från brädet, i slutändan för att eliminera alla utom en. Banorna genereras slumpmässigt i 100 svårighetsgrader. Spelet sparas automatiskt och har ångra-gör-om-funktioner. Bitarna kan röra sig horisontellt, vertikalt och diagonalt.</p>
51 <p xml:lang="te">పెగ్-ఇ అనేది ఒక పెగ్ సాలిటైర్ ఆట, దీనిలో మీరు వాటిని బోర్డు నుండి తొలగించడానికి ముక్కల మీద దూకుతారు, చివరికి ఒకటి తప్తేపి అన్నింటినీ తొలగించడానికి ప్రయత్నిస్తారు. బోర్డులు యాదృచ్ఛికంగా ఉత్పత్తి చేయబడతాయి, కష్టమైన 100 స్థాయిలు ఉంటాయి. ఆట స్వయంచాలకంగా సేవ్ చేస్తుంది మరియు అన్డు-పునరావృత సామర్థ్యాన్ని కలిగి ఉంటుంది. ముక్కలు అడ్డంగా, నిలువుగా మరియు వికర్ణంగా కదలగలవు.</p>
4452 <p xml:lang="zh">Peg-E 是一款孔明棋游戏。一颗棋子跳过另一颗后,该棋子就会被消除,游戏的目的是最终只剩下一颗棋子。本游戏的棋盘自动生成,有100种不同难度可供选择。游戏会自动保存,并具有撤销(悔棋)、重做功能。棋子可以横向、纵向和斜向移动。</p>
4553 </description>
4654
6977 <kudo>ModernToolkit</kudo>
7078 </kudos>
7179
72 <content_rating type="oars-1.1" />
80 <content_rating type="oars-1.1"/>
7381
7482 <releases>
83 <release version="1.3.0" date="2021-09-20">
84 <description>
85 <ul>
86 <li>Added support for Qt 6</li>
87 <li>Refactored code</li>
88 <li>Removed XPM icon</li>
89 <li>Translation updates: Esperanto, Telugu</li>
90 </ul>
91 </description>
92 </release>
7593 <release version="1.2.8" date="2020-04-20">
7694 <description>
7795 <ul>
22 Name[cs]=Peg-E
33 Name[de]=Peg-E
44 Name[el]=Peg-E
5 Name[eo]=Peg-Eo
56 Name[es]=Peg-E
67 Name[lt]=Peg-E
78 Name[ms]=Peg-E
1011 Name[pt]=Peg-E
1112 Name[ro]=Peg-E
1213 Name[ru]=Peg-E
14 Name[sv]=Peg-E
15 Name[te]=పెగ్-ఇ
1316 Name[tr]=Peg-E
1417 Name[zh]=Peg-E
1518 GenericName=Peg Elimination Game
1619 GenericName[cs]=Peg eliminační hra
1720 GenericName[de]=Peg Elimination Spiel
1821 GenericName[el]=Peg παιχνίδι εξάλειψης
22 GenericName[eo]=Pega eliminoludo
1923 GenericName[es]=Juego de eliminación tipo Peg
2024 GenericName[he]=משחק לוח מחשבת
2125 GenericName[lt]=Kamštelių šalinimo žaidimas
2529 GenericName[pt]=Jogo de Eliminação Peg
2630 GenericName[ro]=Peg - joc de eliminare
2731 GenericName[ru]=Peg — игра, в которой нужно очистить игровое поле
32 GenericName[sv]=Peggelimineringsspel
33 GenericName[te]=పెగ్ తొలగించే ఆట
2834 GenericName[tr]=Peg eleme oyunu
2935 GenericName[zh]=孔明棋游戏
3036 Comment=Jump pegs to eliminate them
3137 Comment[de]=Sprung zu Heringen, um sie zu beseitigen
3238 Comment[el]=Μετάβαση σε γόμφους για να εξαλειφθούν
39 Comment[eo]=Saltu sur pegojn por ilin elimini
3340 Comment[es]=Salta sobre los pegs para eliminarlos
3441 Comment[he]=קפוץ מעל גולות כדי לסלק אותן
3542 Comment[lt]=Peršokite per kamštelius, kad juos pašalintumėte
3845 Comment[pl]=Przeskocz kołki, aby je usunąć
3946 Comment[pt]=Salte com os pinos para os eliminar
4047 Comment[ro]=Sari peste pioni pentru a-i eliminna
48 Comment[sv]=Hoppa över pinnar för att eliminera dem
49 Comment[te]=వాటిని తొలగించడానికి పెగ్స్ ని ఎగరవేయి
4150 Comment[zh]=跳过棋子,消除它!
4251 Exec=peg-e
4352 Icon=peg-e
+0
-235
icons/peg-e.xpm less more
0 /* XPM */
1 static char * peg_e_xpm[] = {
2 "32 32 200 2",
3 " c None",
4 ". c #002A7F",
5 "+ c #002B82",
6 "@ c #002B83",
7 "# c #002C84",
8 "$ c #002C86",
9 "% c #002D88",
10 "& c #002D89",
11 "* c #002E8A",
12 "= c #002B81",
13 "- c #002C85",
14 "; c #385CA5",
15 "> c #7D95C5",
16 ", c #9BADD3",
17 "' c #B7C5E0",
18 ") c #D5DDED",
19 "! c #053189",
20 "~ c #5271B0",
21 "{ c #AAB9DA",
22 "] c #CFD8EA",
23 "^ c #CFD8EB",
24 "/ c #CFD8EC",
25 "( c #07338B",
26 "_ c #879DC9",
27 ": c #BBC8E2",
28 "< c #BBC8E3",
29 "[ c #BBC8E4",
30 "} c #BBC9E4",
31 "| c #BBC9E5",
32 "1 c #09348D",
33 "2 c #8097C7",
34 "3 c #A7B8DA",
35 "4 c #A7B8DB",
36 "5 c #A7B9DC",
37 "6 c #A7B9DE",
38 "7 c #A7BADF",
39 "8 c #A7BAE0",
40 "9 c #3D61A9",
41 "0 c #93A8D1",
42 "a c #93A9D4",
43 "b c #93A9D5",
44 "c c #93AAD7",
45 "d c #93AAD9",
46 "e c #93ABDA",
47 "f c #93ABDB",
48 "g c #93ABDC",
49 "h c #002E8C",
50 "i c #5C7CB9",
51 "j c #7E98CB",
52 "k c #7E98CE",
53 "l c #7E99D0",
54 "m c #7E9AD3",
55 "n c #7E9BD5",
56 "o c #7E9BD7",
57 "p c #7E9CD8",
58 "q c #7E9CD9",
59 "r c #003090",
60 "s c #6180BF",
61 "t c #6A88C6",
62 "u c #6A8AC9",
63 "v c #6A8BCD",
64 "w c #6A8CCF",
65 "x c #6A8CD2",
66 "y c #6A8DD4",
67 "z c #6A8ED6",
68 "A c #6A8ED7",
69 "B c #002F8D",
70 "C c #003194",
71 "D c #375FB0",
72 "E c #567AC1",
73 "F c #567BC5",
74 "G c #567CC9",
75 "H c #567ECD",
76 "I c #567ED0",
77 "J c #567FD3",
78 "K c #5680D5",
79 "L c #5680D6",
80 "M c #5680D7",
81 "N c #002A80",
82 "O c #003297",
83 "P c #1445A7",
84 "Q c #426BBD",
85 "R c #426CC2",
86 "S c #426EC7",
87 "T c #426FCB",
88 "U c #4271CF",
89 "V c #4271D2",
90 "W c #4273D4",
91 "X c #4273D6",
92 "Y c #4274D7",
93 "Z c #003092",
94 "` c #00339A",
95 " . c #0036A2",
96 ".. c #1649B1",
97 "+. c #2E5EBF",
98 "@. c #2E60C4",
99 "#. c #2E62CA",
100 "$. c #2E63CE",
101 "%. c #2E65D2",
102 "&. c #2E66D5",
103 "*. c #2E67D7",
104 "=. c #2E67D8",
105 "-. c #002E8B",
106 ";. c #00349C",
107 ">. c #0037A5",
108 ",. c #0039AD",
109 "'. c #0B44B7",
110 "). c #1951C3",
111 "!. c #1A54C8",
112 "~. c #1A56CE",
113 "{. c #1A57D3",
114 "]. c #1A59D7",
115 "^. c #1A5AD9",
116 "/. c #1A5ADB",
117 "(. c #003195",
118 "_. c #00349E",
119 ":. c #0037A7",
120 "<. c #003AAF",
121 "[. c #003DB7",
122 "}. c #003FBF",
123 "|. c #0344C7",
124 "1. c #0548CE",
125 "2. c #064AD4",
126 "3. c #064CD9",
127 "4. c #064DDD",
128 "5. c #064EDF",
129 "6. c #003296",
130 "7. c #00359F",
131 "8. c #0038A8",
132 "9. c #003BB1",
133 "0. c #003EB9",
134 "a. c #0040C2",
135 "b. c #0043CA",
136 "c. c #0046D1",
137 "d. c #0048D8",
138 "e. c #004ADE",
139 "f. c #004BE2",
140 "g. c #004CE5",
141 "h. c #003EBA",
142 "i. c #0041C3",
143 "j. c #0044CC",
144 "k. c #0047D4",
145 "l. c #0049DC",
146 "m. c #004CE3",
147 "n. c #004DE8",
148 "o. c #004EEC",
149 "p. c #0041C4",
150 "q. c #0044CD",
151 "r. c #0047D6",
152 "s. c #004DE7",
153 "t. c #004FEE",
154 "u. c #0051F2",
155 "v. c #003193",
156 "w. c #0037A6",
157 "x. c #003DB9",
158 "y. c #0041C2",
159 "z. c #0047D5",
160 "A. c #004ADF",
161 "B. c #0050F1",
162 "C. c #0053F9",
163 "D. c #003399",
164 "E. c #0036A3",
165 "F. c #003DB6",
166 "G. c #0040C0",
167 "H. c #0043C9",
168 "I. c #0046D3",
169 "J. c #004DE6",
170 "K. c #0050EF",
171 "L. c #0053F8",
172 "M. c #0038A9",
173 "N. c #003BB2",
174 "O. c #003EBB",
175 "P. c #0041C5",
176 "Q. c #0045CE",
177 "R. c #0048D7",
178 "S. c #004BE0",
179 "T. c #004FED",
180 "U. c #003091",
181 "V. c #003CB6",
182 "W. c #0042C7",
183 "X. c #0045CF",
184 "Y. c #004ADD",
185 "Z. c #00349D",
186 "`. c #003AAE",
187 " + c #0042C6",
188 ".+ c #0046D4",
189 "++ c #003CB5",
190 "@+ c #0040C1",
191 "#+ c #002F8E",
192 "$+ c #0036A4",
193 "%+ c #0039AB",
194 "&+ c #003AB0",
195 "*+ c #003DB8",
196 "=+ c #0037A4",
197 "-+ c #002F8F",
198 ";+ c #003398",
199 ">+ c #00359E",
200 ",+ c #0035A0",
201 "'+ c #003192",
202 ")+ c #002B84",
203 " ",
204 " ",
205 " . + + @ @ + + . ",
206 " + # $ % & * * & % $ # + ",
207 " = - % ; > , ' ) ) ' , > ; % - = ",
208 " @ ! ~ { ] ^ ^ ^ / / ^ ^ ^ ] { ~ ! @ ",
209 " @ ( _ : < [ } | | | | | | } [ < : _ ( @ ",
210 " @ 1 2 3 4 5 6 7 7 8 8 8 8 7 7 6 5 4 3 2 1 @ ",
211 " = % 9 0 a b c d e f g g g g f e d c b a 0 9 % = ",
212 " - h i j k l m n o p q q q q p o n m l k j i h - ",
213 " + & r s t u v w x y z A A A A z y x w v u t s r & + ",
214 " - B C D E F G H I J K L M M L K J I H G F E D C B - ",
215 " N % r O P Q R S T U V W X Y Y X W V U T S R Q P O r % N ",
216 " + * Z ` ...+.@.#.$.%.&.*.=.=.*.&.%.$.#.@.+... .` Z * + ",
217 " + -.C ;.>.,.'.).!.~.{.].^././.^.].{.~.!.).'.,.>.;.C -.+ ",
218 " @ h (._.:.<.[.}.|.1.2.3.4.5.5.4.3.2.1.|.}.[.<.:._.(.h @ ",
219 " # B 6.7.8.9.0.a.b.c.d.e.f.g.g.f.e.d.c.b.a.0.9.8.7.6.B # ",
220 " + h 6.7.8.9.h.i.j.k.l.m.n.o.o.n.m.l.k.j.i.h.9.8.7.6.h + ",
221 " + -.(._.8.9.h.p.q.r.e.s.t.u.u.t.s.e.r.q.p.h.9.8._.(.-.+ ",
222 " N & v.;.w.<.x.y.j.z.A.n.B.C.C.B.n.A.z.j.y.x.<.w.;.v.& N ",
223 " $ r D.E.,.F.G.H.I.l.J.K.L.L.K.J.l.I.H.G.F.,.E.D.r $ ",
224 " @ h 6.7.M.N.O.P.Q.R.S.n.T.T.n.S.R.Q.P.O.N.M.7.6.h @ ",
225 " % U.` E.,.V.}.W.X.R.Y.S.S.Y.R.X.W.}.V.,.E.` U.% ",
226 " + -.C Z.w.`.[.}. +j.c..+.+c.j. +}.[.`.w.Z.C -.+ ",
227 " - B 6._.w.`.++O.@+P.W.W.P.@+O.++`.w._.6.B - ",
228 " $ #+6.Z.$+%+&+++*+h.h.*+++&+%+$+Z.6.#+$ ",
229 " - h v.` 7.=+8.%+,.,.%+8.=+7.` v.h - ",
230 " + & -+C ;+;.>+,+,+>+;.;+C -+& + ",
231 " @ % h -+U.'+'+U.-+h % @ ",
232 " N @ )+- - )+@ N ",
233 " ",
234 " "};
0 # SOME DESCRIPTIVE TITLE.
1 # Copyright (C) YEAR Graeme Gott
2 # This file is distributed under the same license as the PACKAGE package.
3 #
4 # Translators:
5 # tlhIngan'a' <dave.colletti2@gmail.com>, 2021
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: Peg-E\n"
9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2014-11-14 20:54+0000\n"
11 "PO-Revision-Date: 2021-06-14 11:09+0000\n"
12 "Last-Translator: tlhIngan'a' <dave.colletti2@gmail.com>\n"
13 "Language-Team: Esperanto (http://www.transifex.com/gottcode/peg-e/language/"
14 "eo/)\n"
15 "Language: eo\n"
16 "MIME-Version: 1.0\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
21 #: ../peg-e.appdata.xml.in:6 ../peg-e.desktop.in:3
22 msgid "Peg-E"
23 msgstr "Peg-Eo"
24
25 #: ../peg-e.appdata.xml.in:7 ../peg-e.desktop.in:5
26 msgid "Jump pegs to eliminate them"
27 msgstr "Saltu sur pegojn por ilin elimini "
28
29 #: ../peg-e.appdata.xml.in:10
30 msgid ""
31 "Peg-E is a peg solitaire game in which you jump over pieces in order to "
32 "remove them from the board, ultimately trying to eliminate all but one. The "
33 "boards are randomly generated, with 100 levels of difficulty. The game auto-"
34 "saves, and has undo-redo capability. Pieces can move horizontally, "
35 "vertically, and diagonally."
36 msgstr ""
37
38 #: ../peg-e.desktop.in:4
39 msgid "Peg Elimination Game"
40 msgstr "Pega eliminoludo"
0 # SOME DESCRIPTIVE TITLE.
1 # Copyright (C) YEAR Graeme Gott
2 # This file is distributed under the same license as the PACKAGE package.
3 #
4 # Translators:
5 # Åke Engelbrektson, 2021
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: Peg-E\n"
9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2014-11-14 20:54+0000\n"
11 "PO-Revision-Date: 2021-02-18 04:56+0000\n"
12 "Last-Translator: Åke Engelbrektson\n"
13 "Language-Team: Swedish (http://www.transifex.com/gottcode/peg-e/language/"
14 "sv/)\n"
15 "Language: sv\n"
16 "MIME-Version: 1.0\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
21 #: ../peg-e.appdata.xml.in:6 ../peg-e.desktop.in:3
22 msgid "Peg-E"
23 msgstr "Peg-E"
24
25 #: ../peg-e.appdata.xml.in:7 ../peg-e.desktop.in:5
26 msgid "Jump pegs to eliminate them"
27 msgstr "Hoppa över pinnar för att eliminera dem"
28
29 #: ../peg-e.appdata.xml.in:10
30 msgid ""
31 "Peg-E is a peg solitaire game in which you jump over pieces in order to "
32 "remove them from the board, ultimately trying to eliminate all but one. The "
33 "boards are randomly generated, with 100 levels of difficulty. The game auto-"
34 "saves, and has undo-redo capability. Pieces can move horizontally, "
35 "vertically, and diagonally."
36 msgstr ""
37 "Peg-E är ett solitairespel där du hoppar över bitar för att ta bort dem från "
38 "brädet, i slutändan för att eliminera alla utom en. Banorna genereras "
39 "slumpmässigt i 100 svårighetsgrader. Spelet sparas automatiskt och har ångra-"
40 "gör-om-funktioner. Bitarna kan röra sig horisontellt, vertikalt och "
41 "diagonalt."
42
43 #: ../peg-e.desktop.in:4
44 msgid "Peg Elimination Game"
45 msgstr "Peggelimineringsspel"
0 # SOME DESCRIPTIVE TITLE.
1 # Copyright (C) YEAR Graeme Gott
2 # This file is distributed under the same license as the PACKAGE package.
3 #
4 # Translators:
5 # Jagadeeshvarma, 2021
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: Peg-E\n"
9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2014-11-14 20:54+0000\n"
11 "PO-Revision-Date: 2021-05-16 04:47+0000\n"
12 "Last-Translator: Jagadeeshvarma\n"
13 "Language-Team: Telugu (http://www.transifex.com/gottcode/peg-e/language/"
14 "te/)\n"
15 "Language: te\n"
16 "MIME-Version: 1.0\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
21 #: ../peg-e.appdata.xml.in:6 ../peg-e.desktop.in:3
22 msgid "Peg-E"
23 msgstr "పెగ్-ఇ"
24
25 #: ../peg-e.appdata.xml.in:7 ../peg-e.desktop.in:5
26 msgid "Jump pegs to eliminate them"
27 msgstr "వాటిని తొలగించడానికి పెగ్స్ ని ఎగరవేయి"
28
29 #: ../peg-e.appdata.xml.in:10
30 msgid ""
31 "Peg-E is a peg solitaire game in which you jump over pieces in order to "
32 "remove them from the board, ultimately trying to eliminate all but one. The "
33 "boards are randomly generated, with 100 levels of difficulty. The game auto-"
34 "saves, and has undo-redo capability. Pieces can move horizontally, "
35 "vertically, and diagonally."
36 msgstr ""
37 "పెగ్-ఇ అనేది ఒక పెగ్ సాలిటైర్ ఆట, దీనిలో మీరు వాటిని బోర్డు నుండి తొలగించడానికి ముక్కల మీద దూకుతారు, "
38 "చివరికి ఒకటి తప్తేపి అన్నింటినీ తొలగించడానికి ప్రయత్నిస్తారు. బోర్డులు యాదృచ్ఛికంగా ఉత్పత్తి చేయబడతాయి, కష్టమైన "
39 "100 స్థాయిలు ఉంటాయి. ఆట స్వయంచాలకంగా సేవ్ చేస్తుంది మరియు అన్డు-పునరావృత సామర్థ్యాన్ని కలిగి ఉంటుంది. "
40 "ముక్కలు అడ్డంగా, నిలువుగా మరియు వికర్ణంగా కదలగలవు."
41
42 #: ../peg-e.desktop.in:4
43 msgid "Peg Elimination Game"
44 msgstr "పెగ్ తొలగించే ఆట"
11
22 APP='Peg-E'
33 BUNDLE="$APP.app"
4 VERSION='1.2.8'
4 VERSION='1.3.0'
55
66 # Remove any previous disk folder or DMG
77 echo -n 'Preparing... '
4242 TRANSLATIONS="$APP/$BUNDLE/Contents/Resources/translations"
4343 mkdir "$TRANSLATIONS"
4444 cp translations/*.qm "$TRANSLATIONS"
45 echo 'Done'
46
47 # Make macOS aware that the app bundle is translated.
48 # This is required to translate parts of native open/save dialogs.
49 echo -n 'Creating mac lproj directories for translations... '
50 for translation in $(ls translations | grep qm | cut -d'.' -f1 | cut -d'_' -f2- | uniq); do
51 mkdir -p "$APP/$BUNDLE/Contents/Resources/${translation}.lproj"
52 done
4553 echo 'Done'
4654
4755 # Copy Qt translations
0 lessThan(QT_MAJOR_VERSION, 5) {
1 error("Peg-E requires Qt 5.9 or greater")
2 }
3 equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 9) {
4 error("Peg-E requires Qt 5.9 or greater")
0 !versionAtLeast(QT_VERSION, 5.12) {
1 error("Peg-E requires Qt 5.12 or greater")
52 }
63
74 TEMPLATE = app
85 QT += widgets
9 CONFIG += c++11
6 CONFIG += c++17
107
118 CONFIG(debug, debug|release) {
129 CONFIG += warn_on
1310 DEFINES += QT_DEPRECATED_WARNINGS
14 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x051400
11 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000
1512 DEFINES += QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
1613 }
1714
2118 RCC_DIR = build
2219
2320 # Set program version
24 VERSION = 1.2.8
21 VERSION = 1.3.0
2522 DEFINES += VERSIONSTR=\\\"$${VERSION}\\\"
2623
2724 # Set program name
6966 } else:win32 {
7067 RC_ICONS = icons/peg-e.ico
7168 QMAKE_TARGET_DESCRIPTION = "Peg elimination game"
72 QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2019 Graeme Gott"
69 QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2021 Graeme Gott"
7370 } else:unix {
7471 RESOURCES = icons/icon.qrc
7572
8481
8582 icon.files = icons/hicolor/*
8683 icon.path = $$PREFIX/share/icons/hicolor
87
88 pixmap.files = icons/peg-e.xpm
89 pixmap.path = $$PREFIX/share/pixmaps
9084
9185 icons.files = icons/oxygen/hicolor/*
9286 icons.path = $$PREFIX/share/peg-e/icons/hicolor
10498 man.files = doc/peg-e.6
10599 man.path = $$PREFIX/share/man/man6
106100
107 INSTALLS += target icon pixmap desktop appdata icons qm man
101 INSTALLS += target icon desktop appdata icons qm man
108102 }
0 /***********************************************************************
1 *
2 * Copyright (C) 2009, 2013, 2018 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2009-2020 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #include "board.h"
207
2411 #include "puzzle.h"
2512
2613 #include <QLinearGradient>
27 #include <QRegExp>
2814 #include <QResizeEvent>
2915 #include <QSettings>
3016 #include <QUndoStack>
3319
3420 //-----------------------------------------------------------------------------
3521
22 #if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
3623 inline uint qHash(const QPoint& key)
3724 {
3825 return (key.x() << 16) + key.y();
3926 }
40
41 //-----------------------------------------------------------------------------
42
43 Board::Board(QUndoStack* moves, QWidget* parent) :
44 QGraphicsView(parent),
45 m_color(QSettings().value("Appearance", "#0055ff").toString()),
46 m_status(0),
47 m_moves(moves)
27 #endif
28
29 //-----------------------------------------------------------------------------
30
31 Board::Board(QUndoStack* moves, QWidget* parent)
32 : QGraphicsView(parent)
33 , m_color(QSettings().value("Appearance", "#0055ff").toString())
34 , m_status(0)
35 , m_moves(moves)
4836 {
4937 QGraphicsScene* scene = new QGraphicsScene(this);
5038 setScene(scene);
6250
6351 bool Board::isHole(const QPoint& hole) const
6452 {
65 return m_holes.contains(hole) ? !m_holes.value(hole)->hasPeg() : 0;
53 return m_holes.contains(hole) ? !m_holes[hole]->hasPeg() : false;
6654 }
6755
6856 //-----------------------------------------------------------------------------
6957
7058 bool Board::isPeg(const QPoint& hole) const
7159 {
72 return m_holes.contains(hole) ? m_holes.value(hole)->hasPeg() : 0;
60 return m_holes.contains(hole) ? m_holes[hole]->hasPeg() : false;
7361 }
7462
7563 //-----------------------------------------------------------------------------
7664
7765 Hole* Board::hole(const QPoint& hole) const
7866 {
79 return m_holes.contains(hole) ? m_holes[hole] : 0;
67 return m_holes.contains(hole) ? m_holes[hole] : nullptr;
8068 }
8169
8270 //-----------------------------------------------------------------------------
9179 setInteractive(true);
9280
9381 // Create puzzle
94 Puzzle* puzzle = 0;
82 Puzzle* puzzle = nullptr;
9583 switch (algorithm) {
9684 case 2:
9785 puzzle = new PuzzleBranch;
231219 bool Board::checkFinished()
232220 {
233221 int pegs = 0;
234 for (Hole* hole : m_holes) {
222 for (Hole* hole : qAsConst(m_holes)) {
235223 if (hole->hasPeg()) {
236224 pegs++;
237225 if (hole->peg()->canMove()) {
0 /***********************************************************************
1 *
2 * Copyright (C) 2009, 2012, 2013 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2009-2013 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #ifndef PEGE_BOARD_H
207 #define PEGE_BOARD_H
4431 * @param moves where to store the history of peg movements
4532 * @param parent the game board's parent widget
4633 */
47 Board(QUndoStack* moves, QWidget* parent = 0);
34 explicit Board(QUndoStack* moves, QWidget* parent = nullptr);
4835
4936 /** Returns @c true if there is only one peg left. */
5037 bool isFinished() const
10794
10895 protected:
10996 /** Override parent function to draw background gradient. */
110 void drawBackground(QPainter* painter, const QRectF& rect);
97 void drawBackground(QPainter* painter, const QRectF& rect) override;
11198
11299 /** Override parent function to draw status message. */
113 void drawForeground(QPainter* painter, const QRectF& rect);
100 void drawForeground(QPainter* painter, const QRectF& rect) override;
114101
115102 /** Override parent function to scale board when resized. */
116 void resizeEvent(QResizeEvent* event);
103 void resizeEvent(QResizeEvent* event) override;
117104
118105 private:
119106 /**
0 /***********************************************************************
1 *
2 * Copyright (C) 2009, 2013 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2009-2013 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #include "hole.h"
207
2411
2512 //-----------------------------------------------------------------------------
2613
27 Hole::Hole(const QPoint& position, QGraphicsItem* parent) :
28 QGraphicsEllipseItem(0, 0, 16, 16, parent),
29 m_peg(0)
14 Hole::Hole(const QPoint& position, QGraphicsItem* parent)
15 : QGraphicsEllipseItem(0, 0, 16, 16, parent)
16 , m_peg(nullptr)
3017 {
3118 QRadialGradient gradient(QPointF(8,8), 8);
3219 gradient.setColorAt(0, QColor(0, 0, 0, 0));
0 /***********************************************************************
1 *
2 * Copyright (C) 2009, 2013 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2009-2013 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #ifndef PEGE_HOLE_H
207 #define PEGE_HOLE_H
3926 * @param position the location of the hole
4027 * @param parent the parent item of the hole
4128 */
42 Hole(const QPoint& position, QGraphicsItem* parent = 0);
29 explicit Hole(const QPoint& position, QGraphicsItem* parent = nullptr);
4330
4431 /** Returns @c true if the hole has a peg. */
4532 bool hasPeg() const
4633 {
47 return m_peg != 0;
34 return m_peg;
4835 }
4936
5037 /** Returns the peg contained by the hole. */
0 /***********************************************************************
1 *
2 * Copyright (C) 2010, 2011, 2012, 2014, 2015, 2016, 2018, 2019, 2020 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2010-2020 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #include "locale_dialog.h"
207
4229
4330 //-----------------------------------------------------------------------------
4431
45 LocaleDialog::LocaleDialog(QWidget* parent) :
46 QDialog(parent, Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint)
32 LocaleDialog::LocaleDialog(QWidget* parent)
33 : QDialog(parent, Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint)
4734 {
4835 QString title = parent ? parent->window()->windowTitle() : QString();
4936 setWindowTitle(!title.isEmpty() ? title : QCoreApplication::applicationName());
5239
5340 m_translations = new QComboBox(this);
5441 m_translations->addItem(tr("<System Language>"));
55 QStringList translations = findTranslations();
42 const QStringList translations = findTranslations();
5643 for (QString translation : translations) {
5744 if (translation.startsWith("qt")) {
5845 continue;
9885 // Find current locale
9986 m_current = QSettings().value("Locale/Language").toString();
10087 if (!m_current.isEmpty()) {
101 QLocale::setDefault(m_current);
88 QLocale::setDefault(QLocale(m_current));
10289 }
10390 const QString locale = QLocale().name();
10491
10794 if (translator.load(m_appname + locale, m_path)) {
10895 QCoreApplication::installTranslator(&translator);
10996
97 #if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
98 const QString path = QLibraryInfo::path(QLibraryInfo::TranslationsPath);
99 #else
110100 const QString path = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
101 #endif
111102
112103 static QTranslator qtbase_translator;
113104 if (qtbase_translator.load("qtbase_" + locale, m_path) || qtbase_translator.load("qtbase_" + locale, path)) {
0 /***********************************************************************
1 *
2 * Copyright (C) 2010, 2011, 2012, 2013 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2010-2013 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #ifndef PEGE_LOCALE_DIALOG_H
207 #define PEGE_LOCALE_DIALOG_H
3926 *
4027 * @param parent the parent widget of the dialog
4128 */
42 LocaleDialog(QWidget* parent = 0);
29 explicit LocaleDialog(QWidget* parent = nullptr);
4330
4431 /**
4532 * Load the stored language into the application; defaults to system language.
5946
6047 public slots:
6148 /** Override parent function to store application language. */
62 void accept();
49 void accept() override;
6350
6451 private:
6552 /**
0 /***********************************************************************
1 *
2 * Copyright (C) 2009, 2012, 2013, 2014, 2015, 2018, 2019 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2009-2021 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #include "locale_dialog.h"
207 #include "window.h"
218
229 #include <QApplication>
10 #include <QCommandLineParser>
2311
2412 /**
2513 * Program entry point.
3018 */
3119 int main(int argc, char** argv)
3220 {
21 #if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
3322 #if !defined(Q_OS_MAC)
3423 if (!qEnvironmentVariableIsSet("QT_DEVICE_PIXEL_RATIO")
3524 && !qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR")
3726 && !qEnvironmentVariableIsSet("QT_SCREEN_SCALE_FACTORS")) {
3827 QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
3928 }
29 #endif
30 QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
4031 #endif
4132 QApplication app(argc, argv);
4233 app.setApplicationName("Peg-E");
4940 app.setDesktopFileName("peg-e");
5041 #endif
5142 app.setAttribute(Qt::AA_DontShowIconsInMenus, true);
52 app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
5343
5444 LocaleDialog::loadTranslator("pege_");
5545
7363 // Set up icons
7464 #if defined(Q_OS_MAC) || defined(Q_OS_WIN)
7565 QIcon::setThemeName("hicolor");
76 #elif (QT_VERSION >= QT_VERSION_CHECK(5,12,0))
66 #else
67 if (QIcon::themeName() == "hicolor") {
68 QIcon::setThemeName("Hicolor");
69 }
7770 QIcon::setFallbackThemeName("hicolor");
78 #else
79 if (QIcon::themeName().isEmpty()) {
80 QIcon::setThemeName("hicolor");
81 }
8271 #endif
72
73 QCommandLineParser parser;
74 parser.setApplicationDescription(Window::tr("Peg elimination game"));
75 parser.addHelpOption();
76 parser.addVersionOption();
77 parser.process(app);
8378
8479 Window window;
8580 window.show();
0 /***********************************************************************
1 *
2 * Copyright (C) 2009, 2013 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2009-2013 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #include "movement.h"
207
2613
2714 //-----------------------------------------------------------------------------
2815
29 Movement::Movement(const QPoint& start_hole, const QPoint& end_hole, Board* board) :
30 m_start_hole(start_hole),
31 m_jumped_hole(start_hole + ((end_hole - start_hole) / 2)),
32 m_end_hole(end_hole),
33 m_board(board)
16 Movement::Movement(const QPoint& start_hole, const QPoint& end_hole, Board* board)
17 : m_start_hole(start_hole)
18 , m_jumped_hole(start_hole + ((end_hole - start_hole) / 2))
19 , m_end_hole(end_hole)
20 , m_board(board)
3421 {
3522 Q_ASSERT(m_board->isPeg(m_start_hole));
3623 Q_ASSERT(m_board->isPeg(m_jumped_hole));
4431
4532 void Movement::redo()
4633 {
47 m_board->hole(m_start_hole)->setPeg(0);
48 m_board->hole(m_jumped_hole)->setPeg(0);
34 m_board->hole(m_start_hole)->setPeg(nullptr);
35 m_board->hole(m_jumped_hole)->setPeg(nullptr);
4936 m_board->hole(m_end_hole)->setPeg(m_peg);
5037
5138 m_jumped_peg->hide();
6249 {
6350 m_board->hole(m_start_hole)->setPeg(m_peg);
6451 m_board->hole(m_jumped_hole)->setPeg(m_jumped_peg);
65 m_board->hole(m_end_hole)->setPeg(0);
52 m_board->hole(m_end_hole)->setPeg(nullptr);
6653
6754 m_peg->move(m_start_hole);
6855 m_jumped_peg->show();
0 /***********************************************************************
1 *
2 * Copyright (C) 2009, 2013 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2009-2013 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #ifndef PEGE_MOVEMENT_H
207 #define PEGE_MOVEMENT_H
4734 Movement(const QPoint& start_hole, const QPoint& end_hole, Board* board);
4835
4936 /** Move the peg from the start hole to the end hole, removing the peg in the hole between them. */
50 void redo();
37 void redo() override;
5138
5239 /** Move the peg from the end hole to the start hole, restoring the peg in the hole between them. */
53 void undo();
40 void undo() override;
5441
5542 private:
5643 Peg* m_peg; /**< peg that was moved */
0 /***********************************************************************
1 *
2 * Copyright (C) 2009, 2013 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2009-2013 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #include "peg.h"
207
2512
2613 //-----------------------------------------------------------------------------
2714
28 Peg::Peg(const QPoint& hole, Board* board, QGraphicsItem* parent) :
29 QGraphicsEllipseItem(0, 0, 20, 20, parent),
30 m_hole(hole),
31 m_board(board)
15 Peg::Peg(const QPoint& hole, Board* board, QGraphicsItem* parent)
16 : QGraphicsEllipseItem(0, 0, 20, 20, parent)
17 , m_hole(hole)
18 , m_board(board)
3219 {
3320 setPen(Qt::NoPen);
3421
0 /***********************************************************************
1 *
2 * Copyright (C) 2009, 2013 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2009-2013 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #ifndef PEGE_PEG_H
207 #define PEGE_PEG_H
4229 * @param board the board containing the peg
4330 * @param parent the parent item of the peg
4431 */
45 Peg(const QPoint& hole, Board* board, QGraphicsItem* parent = 0);
32 Peg(const QPoint& hole, Board* board, QGraphicsItem* parent = nullptr);
4633
4734 /** Returns @c true if the peg can move; @c false otherwise */
4835 bool canMove()
6754
6855 protected:
6956 /** Override parent function to check if there are valid moves. */
70 void mousePressEvent(QGraphicsSceneMouseEvent* event);
57 void mousePressEvent(QGraphicsSceneMouseEvent* event) override;
7158
7259 /** Override parent function to handle completing a jump. */
73 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event);
60 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override;
7461
7562 private:
7663 /** Search game board for valid jumps to make. */
0 /***********************************************************************
1 *
2 * Copyright (C) 2009, 2013, 2014 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2009-2014 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #include "puzzle.h"
207
229
2310 //-----------------------------------------------------------------------------
2411
12 #if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
2513 inline uint qHash(const QPoint& key)
2614 {
2715 return (key.x() << 16) + key.y();
2816 }
17 #endif
2918
3019 //-----------------------------------------------------------------------------
3120
10998 bool Puzzle::findNextMove(const QPoint& start_hole, QPoint& jumped_hole, QPoint& end_hole)
11099 {
111100 std::shuffle(m_directions.begin(), m_directions.end(), m_random);
112 for (const QPoint& direction : m_directions) {
101 for (const QPoint& direction : qAsConst(m_directions)) {
113102 jumped_hole = direction + start_hole;
114103 end_hole = (direction * 2) + start_hole;
115104 if (isAvailable(jumped_hole) && isAvailable(end_hole)) {
132121 QPoint jumped_hole, end_hole;
133122 for (int i = 0; i < loops; ++i) {
134123 shuffle(pegs);
135 for (const QPoint& start_hole : pegs) {
124 for (const QPoint& start_hole : qAsConst(pegs)) {
136125 if (findNextMove(start_hole, jumped_hole, end_hole)) {
137126 pegs.removeOne(start_hole);
138127 pegs.append(jumped_hole);
0 /***********************************************************************
1 *
2 * Copyright (C) 2009, 2013, 2014 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2009-2014 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #ifndef PEGE_PUZZLE_H
207 #define PEGE_PUZZLE_H
3623 {
3724 public:
3825 /** Constructs an empty layout. */
39 Puzzle();
26 explicit Puzzle();
4027
4128 /** Destroys the layout. */
4229 virtual ~Puzzle();
132119 *
133120 * @param pegs how many pegs to create
134121 */
135 void generate(int pegs);
122 void generate(int pegs) override;
136123 };
137124
138125 /** Puzzle that doesn't reuse or shuffle any holes. */
144131 *
145132 * @param hole the hole to check
146133 */
147 bool isAvailable(const QPoint& hole) const;
134 bool isAvailable(const QPoint& hole) const override;
148135
149136 /**
150137 * Override parent function to prevent shuffling the pegs.
151138 *
152139 * @param pegs the pegs to shuffle
153140 */
154 void shuffle(QList<QPoint>& pegs);
141 void shuffle(QList<QPoint>& pegs) override;
155142 };
156143
157144 #endif // PEGE_PUZZLE_H
0 /***********************************************************************
1 *
2 * Copyright (C) 2009, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2009-2021 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #include "window.h"
207
3017 #include <QFormLayout>
3118 #include <QMenuBar>
3219 #include <QMessageBox>
20 #include <QRandomGenerator>
21 #include <QRegularExpression>
3322 #include <QSettings>
3423 #include <QSpinBox>
3524 #include <QToolBar>
3625 #include <QUndoStack>
3726 #include <QVBoxLayout>
3827
39 #include <ctime>
40 #include <random>
41
42 //-----------------------------------------------------------------------------
43
44 Window::Window() :
45 m_seed(0),
46 m_difficulty(QSettings().value("Difficulty", 5).toInt()),
47 m_algorithm(QSettings().value("Algorithm", 1).toInt())
28 //-----------------------------------------------------------------------------
29
30 Window::Window()
31 : m_seed(0)
32 , m_difficulty(QSettings().value("Difficulty", 5).toInt())
33 , m_algorithm(QSettings().value("Algorithm", 1).toInt())
4834 {
4935 // Create board
5036 QUndoStack* moves = new QUndoStack(this);
5541 // Create menubar
5642 QMenu* game_menu = menuBar()->addMenu(tr("&Game"));
5743
58 QAction* new_action = game_menu->addAction(QIcon::fromTheme("document-new"), tr("&New"), this, SLOT(newGame()), QKeySequence::New);
59 QAction* restart_action = game_menu->addAction(QIcon::fromTheme("view-refresh"), tr("&Restart Game"), this, SLOT(restartGame()), QKeySequence::Refresh);
60 game_menu->addAction(tr("&Details"), this, SLOT(showDetails()));
44 QAction* new_action = game_menu->addAction(QIcon::fromTheme("document-new"), tr("&New"), this, &Window::newGame, QKeySequence::New);
45 QAction* restart_action = game_menu->addAction(QIcon::fromTheme("view-refresh"), tr("&Restart Game"), this, &Window::restartGame, QKeySequence::Refresh);
46 game_menu->addAction(tr("&Details"), this, &Window::showDetails);
6147 game_menu->addSeparator();
62 QAction* quit_action = game_menu->addAction(QIcon::fromTheme("application-exit"), tr("Quit"), this, SLOT(close()), QKeySequence::Quit);
48 QAction* quit_action = game_menu->addAction(QIcon::fromTheme("application-exit"), tr("Quit"), this, &Window::close, QKeySequence::Quit);
6349 quit_action->setMenuRole(QAction::QuitRole);
6450
6551 QMenu* move_menu = menuBar()->addMenu(tr("&Move"));
6652
67 QAction* undo_action = move_menu->addAction(QIcon::fromTheme("edit-undo"), tr("&Undo"), moves, SLOT(undo()), QKeySequence::Undo);
53 QAction* undo_action = move_menu->addAction(QIcon::fromTheme("edit-undo"), tr("&Undo"), moves, &QUndoStack::undo, QKeySequence::Undo);
6854 undo_action->setEnabled(false);
6955 connect(moves, &QUndoStack::canUndoChanged, undo_action, &QAction::setEnabled);
7056
71 QAction* redo_action = move_menu->addAction(QIcon::fromTheme("edit-redo"), tr("&Redo"), moves, SLOT(redo()), QKeySequence::Redo);
57 QAction* redo_action = move_menu->addAction(QIcon::fromTheme("edit-redo"), tr("&Redo"), moves, &QUndoStack::redo, QKeySequence::Redo);
7258 redo_action->setEnabled(false);
7359 connect(moves, &QUndoStack::canRedoChanged, redo_action, &QAction::setEnabled);
7460
9985
10086 connect(m_colors, &QActionGroup::triggered, this, &Window::changeAppearance);
10187
102 appearance_menu->addAction(tr("Custom..."), this, SLOT(changeAppearanceCustom()));
88 appearance_menu->addAction(tr("Custom..."), this, &Window::changeAppearanceCustom);
10389
10490 QMenu* settings_menu = menuBar()->addMenu(tr("&Settings"));
105 settings_menu->addAction(tr("Application &Language..."), this, SLOT(setLocale()));
91 settings_menu->addAction(tr("Application &Language..."), this, &Window::setLocale);
10692
10793 QMenu* help_menu = menuBar()->addMenu(tr("&Help"));
108 QAction* about_action = help_menu->addAction(tr("&About"), this, SLOT(about()));
94 QAction* about_action = help_menu->addAction(tr("&About"), this, &Window::about);
10995 about_action->setMenuRole(QAction::AboutRole);
110 QAction* about_qt_action = help_menu->addAction(tr("About &Qt"), qApp, SLOT(aboutQt()));
96 QAction* about_qt_action = help_menu->addAction(tr("About &Qt"), qApp, &QApplication::aboutQt);
11197 about_qt_action->setMenuRole(QAction::AboutQtRole);
11298
11399 // Create toolbar
232218 "<p align='center'>%6<br/><small>%7</small></p>")
233219 .arg(tr("Peg-E"), QCoreApplication::applicationVersion(),
234220 tr("Peg elimination game"),
235 tr("Copyright &copy; 2009-%1 Graeme Gott").arg("2020"),
221 tr("Copyright &copy; 2009-%1 Graeme Gott").arg("2021"),
236222 tr("Released under the <a href=%1>GPL 3</a> license").arg("\"http://www.gnu.org/licenses/gpl.html\""),
237223 tr("Uses icons from the <a href=%1>Oxygen</a> icon theme").arg("\"http://www.oxygen-icons.org/\""),
238224 tr("Used under the <a href=%1>LGPL 3</a> license").arg("\"http://www.gnu.org/licenses/lgpl.html\""))
256242 }
257243
258244 QString selected_color = color.name();
259 QList<QAction*> actions = m_colors->actions();
245 const QList<QAction*> actions = m_colors->actions();
260246 for (QAction* action : actions) {
261 action->setChecked(action->data() == selected_color);
247 action->setChecked(action->data().toString() == selected_color);
262248 }
263249
264250 m_board->setAppearance(color);
280266 startGame(seed, difficulty, algorithm);
281267
282268 // Load moves
283 QRegExp parse("(-?\\d+)x(-?\\d+) to (-?\\d+)x(-?\\d+)");
284 for (const QString& move : moves) {
285 if (!parse.exactMatch(move)) {
269 const QRegularExpression parse("^(-?\\d+)x(-?\\d+) to (-?\\d+)x(-?\\d+)$");
270 for (const QString& move : qAsConst(moves)) {
271 const QRegularExpressionMatch match = parse.match(move);
272 if (!match.hasMatch()) {
286273 continue;
287274 }
288275
289 QPoint old_hole(parse.cap(1).toInt(), parse.cap(2).toInt());
290 QPoint new_hole(parse.cap(3).toInt(), parse.cap(4).toInt());
276 QPoint old_hole(match.captured(1).toInt(), match.captured(2).toInt());
277 QPoint new_hole(match.captured(3).toInt(), match.captured(4).toInt());
291278 if (m_board->isPeg(old_hole) && m_board->isHole(new_hole)) {
292279 m_board->move(old_hole, new_hole);
293280 } else {
301288 void Window::startGame(int seed, int difficulty, int algorithm)
302289 {
303290 if (seed == 0) {
304 #ifndef Q_OS_WIN
305 std::random_device rd;
306 std::mt19937 gen(rd());
307 #else
308 std::mt19937 gen(time(0));
309 #endif
310 std::uniform_int_distribution<int> dis;
311 seed = dis(gen);
291 seed = QRandomGenerator::system()->bounded(INT_MAX);
312292 }
313293 m_seed = seed;
314294 m_difficulty = difficulty;
0 /***********************************************************************
1 *
2 * Copyright (C) 2009, 2012, 2013 Graeme Gott <graeme@gottcode.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 ***********************************************************************/
0 /*
1 SPDX-FileCopyrightText: 2009-2013 Graeme Gott <graeme@gottcode.org>
2
3 SPDX-License-Identifier: GPL-3.0-or-later
4 */
185
196 #ifndef PEGE_WINDOW_H
207 #define PEGE_WINDOW_H
3724
3825 public:
3926 /** Constructs the main window. */
40 Window();
27 explicit Window();
4128
4229 protected:
4330 /** Override parent function to save window geometry. */
44 void closeEvent(QCloseEvent* event);
31 void closeEvent(QCloseEvent* event) override;
4532
4633 private slots:
4734 /**
0 <?xml version="1.0" encoding="utf-8"?>
1 <!DOCTYPE TS>
2 <TS version="2.1" language="eo">
3 <context>
4 <name>Board</name>
5 <message>
6 <source>Success</source>
7 <translation>Sukceson!</translation>
8 </message>
9 <message>
10 <source>Game Over</source>
11 <translation>Malsukceson</translation>
12 </message>
13 </context>
14 <context>
15 <name>LocaleDialog</name>
16 <message>
17 <source>Select application language:</source>
18 <translation>Elektu lingvon de programo:</translation>
19 </message>
20 <message>
21 <source>&lt;System Language&gt;</source>
22 <translation>&lt;System Language&gt;</translation>
23 </message>
24 <message>
25 <source>Note</source>
26 <translation>Noto</translation>
27 </message>
28 <message>
29 <source>Please restart this application for the change in language to take effect.</source>
30 <translation>Bonvolu rekomencu ĉi tiun programon, tial la lingvo sanĝiĝas.</translation>
31 </message>
32 </context>
33 <context>
34 <name>Window</name>
35 <message>
36 <source>Peg-E</source>
37 <translation>Peg-E</translation>
38 </message>
39 <message>
40 <source>&amp;Game</source>
41 <translation>Ludo</translation>
42 </message>
43 <message>
44 <source>&amp;New</source>
45 <translation>Nova</translation>
46 </message>
47 <message>
48 <source>&amp;Restart Game</source>
49 <translation>Rekomenci la ludon</translation>
50 </message>
51 <message>
52 <source>&amp;Details</source>
53 <translation>Detaloj</translation>
54 </message>
55 <message>
56 <source>Quit</source>
57 <translation>Fini</translation>
58 </message>
59 <message>
60 <source>&amp;Move</source>
61 <translation>Movi</translation>
62 </message>
63 <message>
64 <source>&amp;Undo</source>
65 <translation type="unfinished"></translation>
66 </message>
67 <message>
68 <source>&amp;Redo</source>
69 <translation>Refari</translation>
70 </message>
71 <message>
72 <source>&amp;Appearance</source>
73 <translation>Aspekto</translation>
74 </message>
75 <message>
76 <source>Blue</source>
77 <translation>Blua</translation>
78 </message>
79 <message>
80 <source>Charcoal</source>
81 <translation>Lignokarbo</translation>
82 </message>
83 <message>
84 <source>Green</source>
85 <translation>Verda</translation>
86 </message>
87 <message>
88 <source>Midnight</source>
89 <translation>Mezonokta</translation>
90 </message>
91 <message>
92 <source>Plum</source>
93 <translation>Pruna</translation>
94 </message>
95 <message>
96 <source>Red</source>
97 <translation>Roĝa</translation>
98 </message>
99 <message>
100 <source>Yellow</source>
101 <translation>Flava</translation>
102 </message>
103 <message>
104 <source>Custom...</source>
105 <translation>Kotimo</translation>
106 </message>
107 <message>
108 <source>&amp;Settings</source>
109 <translation>Agordoj</translation>
110 </message>
111 <message>
112 <source>Application &amp;Language...</source>
113 <translation>Lingvo de programo</translation>
114 </message>
115 <message>
116 <source>&amp;Help</source>
117 <translation>Helpo</translation>
118 </message>
119 <message>
120 <source>&amp;About</source>
121 <translation>Pri</translation>
122 </message>
123 <message>
124 <source>About &amp;Qt</source>
125 <translation type="unfinished"></translation>
126 </message>
127 <message>
128 <source>New Game</source>
129 <translation>Nova ludo</translation>
130 </message>
131 <message>
132 <source>Original</source>
133 <translation type="unfinished"></translation>
134 </message>
135 <message>
136 <source>Branch</source>
137 <translation type="unfinished"></translation>
138 </message>
139 <message>
140 <source>Line</source>
141 <translation type="unfinished"></translation>
142 </message>
143 <message>
144 <source>Random</source>
145 <translation>Hazarda</translation>
146 </message>
147 <message>
148 <source>Algorithm:</source>
149 <translation type="unfinished"></translation>
150 </message>
151 <message>
152 <source>Difficulty:</source>
153 <translation type="unfinished"></translation>
154 </message>
155 <message>
156 <source>Seed:</source>
157 <translation type="unfinished"></translation>
158 </message>
159 <message>
160 <source>Question</source>
161 <translation type="unfinished"></translation>
162 </message>
163 <message>
164 <source>Do you want to restart?</source>
165 <translation>Ĉu vi volas rekomenci</translation>
166 </message>
167 <message>
168 <source>Details</source>
169 <translation type="unfinished"></translation>
170 </message>
171 <message>
172 <source>&lt;p&gt;&lt;b&gt;Algorithm:&lt;/b&gt; %1&lt;br&gt;&lt;b&gt;Difficulty:&lt;/b&gt; %2&lt;br&gt;&lt;b&gt;Seed:&lt;/b&gt; %L3&lt;/p&gt;</source>
173 <translation type="unfinished"></translation>
174 </message>
175 <message>
176 <source>About Peg-E</source>
177 <translation type="unfinished"></translation>
178 </message>
179 <message>
180 <source>Peg elimination game</source>
181 <translation type="unfinished"></translation>
182 </message>
183 <message>
184 <source>Copyright &amp;copy; 2009-%1 Graeme Gott</source>
185 <translation type="unfinished"></translation>
186 </message>
187 <message>
188 <source>Released under the &lt;a href=%1&gt;GPL 3&lt;/a&gt; license</source>
189 <translation type="unfinished"></translation>
190 </message>
191 <message>
192 <source>Uses icons from the &lt;a href=%1&gt;Oxygen&lt;/a&gt; icon theme</source>
193 <translation type="unfinished"></translation>
194 </message>
195 <message>
196 <source>Used under the &lt;a href=%1&gt;LGPL 3&lt;/a&gt; license</source>
197 <translation type="unfinished"></translation>
198 </message>
199 </context>
200 </TS>
0 <?xml version="1.0" encoding="utf-8"?>
1 <!DOCTYPE TS>
2 <TS version="2.1" language="sv">
3 <context>
4 <name>Board</name>
5 <message>
6 <source>Success</source>
7 <translation>Succé</translation>
8 </message>
9 <message>
10 <source>Game Over</source>
11 <translation>Slutspelat</translation>
12 </message>
13 </context>
14 <context>
15 <name>LocaleDialog</name>
16 <message>
17 <source>Select application language:</source>
18 <translation>Välj programspråk:</translation>
19 </message>
20 <message>
21 <source>&lt;System Language&gt;</source>
22 <translation>&lt;Systemspråk&gt;</translation>
23 </message>
24 <message>
25 <source>Note</source>
26 <translation>Notis</translation>
27 </message>
28 <message>
29 <source>Please restart this application for the change in language to take effect.</source>
30 <translation>Starta om programmet för att byta språk.</translation>
31 </message>
32 </context>
33 <context>
34 <name>Window</name>
35 <message>
36 <source>Peg-E</source>
37 <translation>Peg-E</translation>
38 </message>
39 <message>
40 <source>&amp;Game</source>
41 <translation>&amp;Spel</translation>
42 </message>
43 <message>
44 <source>&amp;New</source>
45 <translation>&amp;Nytt</translation>
46 </message>
47 <message>
48 <source>&amp;Restart Game</source>
49 <translation>&amp;Starta om spelet</translation>
50 </message>
51 <message>
52 <source>&amp;Details</source>
53 <translation>&amp;Detaljer</translation>
54 </message>
55 <message>
56 <source>Quit</source>
57 <translation>Avsluta</translation>
58 </message>
59 <message>
60 <source>&amp;Move</source>
61 <translation>&amp;Flytta</translation>
62 </message>
63 <message>
64 <source>&amp;Undo</source>
65 <translation>&amp;Ångra</translation>
66 </message>
67 <message>
68 <source>&amp;Redo</source>
69 <translation>&amp;Upprepa</translation>
70 </message>
71 <message>
72 <source>&amp;Appearance</source>
73 <translation>&amp;Utseende</translation>
74 </message>
75 <message>
76 <source>Blue</source>
77 <translation>Blå</translation>
78 </message>
79 <message>
80 <source>Charcoal</source>
81 <translation>Kol</translation>
82 </message>
83 <message>
84 <source>Green</source>
85 <translation>Grön</translation>
86 </message>
87 <message>
88 <source>Midnight</source>
89 <translation>Midnatt</translation>
90 </message>
91 <message>
92 <source>Plum</source>
93 <translation>Plommon</translation>
94 </message>
95 <message>
96 <source>Red</source>
97 <translation>Röd</translation>
98 </message>
99 <message>
100 <source>Yellow</source>
101 <translation>Gul</translation>
102 </message>
103 <message>
104 <source>Custom...</source>
105 <translation>Anpassa...</translation>
106 </message>
107 <message>
108 <source>&amp;Settings</source>
109 <translation>&amp;Inställningar</translation>
110 </message>
111 <message>
112 <source>Application &amp;Language...</source>
113 <translation>Program&amp;språk...</translation>
114 </message>
115 <message>
116 <source>&amp;Help</source>
117 <translation>&amp;Hjälp</translation>
118 </message>
119 <message>
120 <source>&amp;About</source>
121 <translation>&amp;Om</translation>
122 </message>
123 <message>
124 <source>About &amp;Qt</source>
125 <translation>Om &amp;Qt</translation>
126 </message>
127 <message>
128 <source>New Game</source>
129 <translation>Nytt spel</translation>
130 </message>
131 <message>
132 <source>Original</source>
133 <translation>Original</translation>
134 </message>
135 <message>
136 <source>Branch</source>
137 <translation>Gren</translation>
138 </message>
139 <message>
140 <source>Line</source>
141 <translation>Linje</translation>
142 </message>
143 <message>
144 <source>Random</source>
145 <translation>Slumpmässigt</translation>
146 </message>
147 <message>
148 <source>Algorithm:</source>
149 <translation>Algoritm:</translation>
150 </message>
151 <message>
152 <source>Difficulty:</source>
153 <translation>Svårighet:</translation>
154 </message>
155 <message>
156 <source>Seed:</source>
157 <translation>Slumptal:</translation>
158 </message>
159 <message>
160 <source>Question</source>
161 <translation>Fråga</translation>
162 </message>
163 <message>
164 <source>Do you want to restart?</source>
165 <translation>Vill du starta om?</translation>
166 </message>
167 <message>
168 <source>Details</source>
169 <translation>Detaljer</translation>
170 </message>
171 <message>
172 <source>&lt;p&gt;&lt;b&gt;Algorithm:&lt;/b&gt; %1&lt;br&gt;&lt;b&gt;Difficulty:&lt;/b&gt; %2&lt;br&gt;&lt;b&gt;Seed:&lt;/b&gt; %L3&lt;/p&gt;</source>
173 <translation>&lt;p&gt;&lt;b&gt;Algoritm:&lt;/b&gt; %1&lt;br&gt;&lt;b&gt;Svårighet:&lt;/b&gt; %2&lt;br&gt;&lt;b&gt;Slumptal:&lt;/b&gt; %L3&lt;/p&gt;</translation>
174 </message>
175 <message>
176 <source>About Peg-E</source>
177 <translation>Om Peg-E</translation>
178 </message>
179 <message>
180 <source>Peg elimination game</source>
181 <translation>Peggelimineringsspel</translation>
182 </message>
183 <message>
184 <source>Copyright &amp;copy; 2009-%1 Graeme Gott</source>
185 <translation>Copyright &amp;copy; 2009-%1 Graeme Gott</translation>
186 </message>
187 <message>
188 <source>Released under the &lt;a href=%1&gt;GPL 3&lt;/a&gt; license</source>
189 <translation>Publicerat under &lt;a href=%1&gt;GPL 3&lt;/a&gt;- licensen</translation>
190 </message>
191 <message>
192 <source>Uses icons from the &lt;a href=%1&gt;Oxygen&lt;/a&gt; icon theme</source>
193 <translation>Använder ikoner från &lt;a href=%1&gt;Oxygen&lt;/a&gt; ikontema</translation>
194 </message>
195 <message>
196 <source>Used under the &lt;a href=%1&gt;LGPL 3&lt;/a&gt; license</source>
197 <translation>Använt under &lt;a href=%1&gt;LGPL 3&lt;/a&gt; -licensen</translation>
198 </message>
199 </context>
200 </TS>
0 <?xml version="1.0" encoding="utf-8"?>
1 <!DOCTYPE TS>
2 <TS version="2.1" language="te">
3 <context>
4 <name>Board</name>
5 <message>
6 <source>Success</source>
7 <translation>విజయం</translation>
8 </message>
9 <message>
10 <source>Game Over</source>
11 <translation>ఆట సమాప్తం</translation>
12 </message>
13 </context>
14 <context>
15 <name>LocaleDialog</name>
16 <message>
17 <source>Select application language:</source>
18 <translation>అనువర్తన భాషను ఎంచుకోండి:</translation>
19 </message>
20 <message>
21 <source>&lt;System Language&gt;</source>
22 <translation>&lt;System Language&gt;</translation>
23 </message>
24 <message>
25 <source>Note</source>
26 <translation>గమనిక</translation>
27 </message>
28 <message>
29 <source>Please restart this application for the change in language to take effect.</source>
30 <translation>భాషలో మార్పు అమలులోకి రావడానికి దయచేసి ఈ అనువర్తనాన్ని పునఃప్రారంభించండి.</translation>
31 </message>
32 </context>
33 <context>
34 <name>Window</name>
35 <message>
36 <source>Peg-E</source>
37 <translation>పెగ్-ఇ</translation>
38 </message>
39 <message>
40 <source>&amp;Game</source>
41 <translation>&amp;ఆట</translation>
42 </message>
43 <message>
44 <source>&amp;New</source>
45 <translation>&amp;కొత్త</translation>
46 </message>
47 <message>
48 <source>&amp;Restart Game</source>
49 <translation>&amp;ఆటను పునఃప్రారంభించు</translation>
50 </message>
51 <message>
52 <source>&amp;Details</source>
53 <translation>&amp;వివరాలు</translation>
54 </message>
55 <message>
56 <source>Quit</source>
57 <translation>నిష్క్రమించు</translation>
58 </message>
59 <message>
60 <source>&amp;Move</source>
61 <translation>&amp;కదులు</translation>
62 </message>
63 <message>
64 <source>&amp;Undo</source>
65 <translation>&amp;అన్ డూ</translation>
66 </message>
67 <message>
68 <source>&amp;Redo</source>
69 <translation>&amp;రీడు</translation>
70 </message>
71 <message>
72 <source>&amp;Appearance</source>
73 <translation>&amp;స్వరూపం</translation>
74 </message>
75 <message>
76 <source>Blue</source>
77 <translation>నీలం</translation>
78 </message>
79 <message>
80 <source>Charcoal</source>
81 <translation>బొగ్గు</translation>
82 </message>
83 <message>
84 <source>Green</source>
85 <translation>ఆకుపచ్చ</translation>
86 </message>
87 <message>
88 <source>Midnight</source>
89 <translation>అర్ధరాత్రి</translation>
90 </message>
91 <message>
92 <source>Plum</source>
93 <translation>ప్లం</translation>
94 </message>
95 <message>
96 <source>Red</source>
97 <translation>ఎరుపు</translation>
98 </message>
99 <message>
100 <source>Yellow</source>
101 <translation>పసుపు</translation>
102 </message>
103 <message>
104 <source>Custom...</source>
105 <translation>కస్టమ్...</translation>
106 </message>
107 <message>
108 <source>&amp;Settings</source>
109 <translation>&amp;సెట్టింగులు</translation>
110 </message>
111 <message>
112 <source>Application &amp;Language...</source>
113 <translation>అనువర్తనం &amp;భాష...</translation>
114 </message>
115 <message>
116 <source>&amp;Help</source>
117 <translation>&amp;సహాయం</translation>
118 </message>
119 <message>
120 <source>&amp;About</source>
121 <translation>&amp;గురించి</translation>
122 </message>
123 <message>
124 <source>About &amp;Qt</source>
125 <translation>&amp;Qt గురించి</translation>
126 </message>
127 <message>
128 <source>New Game</source>
129 <translation>కొత్త ఆట</translation>
130 </message>
131 <message>
132 <source>Original</source>
133 <translation>అసలైనది</translation>
134 </message>
135 <message>
136 <source>Branch</source>
137 <translation>శాఖ</translation>
138 </message>
139 <message>
140 <source>Line</source>
141 <translation>గీత</translation>
142 </message>
143 <message>
144 <source>Random</source>
145 <translation>పద్ధతి లేకుండా</translation>
146 </message>
147 <message>
148 <source>Algorithm:</source>
149 <translation>అల్గోరిథం</translation>
150 </message>
151 <message>
152 <source>Difficulty:</source>
153 <translation>కష్టం</translation>
154 </message>
155 <message>
156 <source>Seed:</source>
157 <translation>విత్తనం:</translation>
158 </message>
159 <message>
160 <source>Question</source>
161 <translation>ప్రశ్న</translation>
162 </message>
163 <message>
164 <source>Do you want to restart?</source>
165 <translation>మీరు పునఃప్రారంభించాలనుకుంటున్నారా?</translation>
166 </message>
167 <message>
168 <source>Details</source>
169 <translation>వివరాలు</translation>
170 </message>
171 <message>
172 <source>&lt;p&gt;&lt;b&gt;Algorithm:&lt;/b&gt; %1&lt;br&gt;&lt;b&gt;Difficulty:&lt;/b&gt; %2&lt;br&gt;&lt;b&gt;Seed:&lt;/b&gt; %L3&lt;/p&gt;</source>
173 <translation>&lt;p&gt;&lt;b&gt;అల్గోరిథం:&lt;/b&gt; %1&lt;br&gt;&lt;b&gt;కష్ట్టం:&lt;/b&gt; %2&lt;br&gt;&lt;b&gt;విత్తనం:&lt;/b&gt; %L3&lt;/p&gt;</translation>
174 </message>
175 <message>
176 <source>About Peg-E</source>
177 <translation>పెగ్-ఇ గురించి</translation>
178 </message>
179 <message>
180 <source>Peg elimination game</source>
181 <translation>పెగ్ తొలగించే ఆట</translation>
182 </message>
183 <message>
184 <source>Copyright &amp;copy; 2009-%1 Graeme Gott</source>
185 <translation>కాపీరైట్ &amp;కాపీ; 2009-%1 గ్రేమ్ గాట్</translation>
186 </message>
187 <message>
188 <source>Released under the &lt;a href=%1&gt;GPL 3&lt;/a&gt; license</source>
189 <translation>&lt;a href=%1&gt;GPL3&lt;/a&gt; లైసెన్స్ కింద విడుదల చేయబడింది</translation>
190 </message>
191 <message>
192 <source>Uses icons from the &lt;a href=%1&gt;Oxygen&lt;/a&gt; icon theme</source>
193 <translation>&lt;a href=%1&gt;ఆక్స్సిజన్&lt;/a&gt; చిహ్నం థీమ్ నుండి చిహ్నాలను ఉపయోగిస్తుంది</translation>
194 </message>
195 <message>
196 <source>Used under the &lt;a href=%1&gt;LGPL 3&lt;/a&gt; license</source>
197 <translation>&lt;a href=%1&gt;LGPL3&lt;/a&gt; లైసెన్స్ కింద ఉపయోగించబడినది</translation>
198 </message>
199 </context>
200 </TS>
22
33 !define APPNAME "Peg-E"
44 !define VERSIONMAJOR 1
5 !define VERSIONMINOR 2
6 !define VERSIONPATCH 8
5 !define VERSIONMINOR 3
6 !define VERSIONPATCH 0
77 !define APPVERSION "${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONPATCH}"
88 !define ABOUTURL "https://gottcode.org/peg-e/"
99
0 @ECHO ON>windows\dirs.nsh
1 @ECHO ON>windows\files.nsh
0 @ECHO ON>..\peg-e\windows\dirs.nsh
1 @ECHO ON>..\peg-e\windows\files.nsh
22 @ECHO OFF
33
4 SET SRCDIR=..\peg-e
45 SET APP=Peg-E
5 SET VERSION=1.2.8
6 SET VERSION=1.3.0
67
78 ECHO Copying executable
8 MKDIR %APP%
9 COPY release\%APP%.exe %APP% >nul
9 MKDIR %SRCDIR%\%APP%
10 COPY %APP%.exe %SRCDIR%\%APP%\%APP%.exe >nul
1011
1112 ECHO Copying translations
12 SET TRANSLATIONS=%APP%\translations
13 SET TRANSLATIONS=%SRCDIR%\%APP%\translations
1314 MKDIR %TRANSLATIONS%
14 COPY translations\*.qm %TRANSLATIONS% >nul
15 COPY *.qm %TRANSLATIONS% >nul
16
17 CD %SRCDIR%
1518
1619 ECHO Copying icons
1720 SET ICONS=%APP%\icons\hicolor
1922 XCOPY /Q /S /Y icons\oxygen\hicolor %ICONS% >nul
2023
2124 ECHO Copying Qt
22 %QTDIR%\bin\windeployqt.exe --verbose 0 --no-angle --no-opengl-sw --no-svg %APP%\%APP%.exe
25 %QTDIR%\bin\windeployqt.exe --verbose 0 --no-opengl-sw --no-system-d3d-compiler --no-svg %APP%\%APP%.exe
2326 RMDIR /S /Q %APP%\imageformats
2427
2528 ECHO Creating ReadMe