Debian Codegraph @

src/history.cc

raw symbols SCIP
1 /***************************************************************************
2 * Copyright (C) 2004-2005 Artur Wiebe *
3 * [email protected] *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20 #include <QLayout>
21 #include <QDebug>
22 #include <QProgressDialog>
23 #include <QHeaderView>
24 #include <QInputDialog>
25 #include <QLineEdit>
26
27 #include "history.h"cxx . . $ `<file>/src/history.h`/
28 #include "common.h"cxx . . $ `<file>/src/common.h`/
29
30
31
32 #define COL_TAG_NRcxx . . $ `src/history.cc:32:9`! 0 // m_tags, this col is hidden.
33 #define COL_TAG_NAMEcxx . . $ `src/history.cc:33:9`! 1
34 #define COL_TAG_VALcxx . . $ `src/history.cc:34:9`! 2
35
36 #define COL_MOVE_NRcxx . . $ `src/history.cc:36:9`! 0 // m_movelist
37 #define COL_MOVEcxx . . $ `src/history.cc:37:9`! 1
38 #define COL_MOVE_COMMcxx . . $ `src/history.cc:38:9`! 2
39
40
41 myHistorycxx . . $ myHistory#::myHistorycxx . . $ myHistory#myHistory(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* parent)
42 : QFramecxx . . $ QFrame#(parent)
43 {
44 //setFixedWidth(240);
45
46 m_gamelistcxx . . $ myHistory#m_gamelist. = new QComboBoxcxx . . $ QComboBox#QComboBox(108f35f7aa7f3cf9).(this);
47 connectcxx . . $ QObject#connect(158df1d9a01a3410).(m_gamelistcxx . . $ myHistory#m_gamelist., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:265:10`!(activated(int)),
48 this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:264:10`!(slot_game_selected(int)));
49
50 m_taglistcxx . . $ myHistory#m_taglist. = new QTreeWidgetcxx . . $ QTreeWidget#QTreeWidget(108f35f7aa7f3cf9).(this);
51 m_taglistcxx . . $ myHistory#m_taglist.->setColumnCountcxx . . $ QTreeWidget#setColumnCount(d4f767463ce0a6b3).(3);
52 m_taglistcxx . . $ myHistory#m_taglist.->headercxx . . $ QTreeView#header(f0c0fe1a435d30ff).()->hidecxx . . $ QWidget#hide(49f6e7a06ebc5aa8).();
53 m_taglistcxx . . $ myHistory#m_taglist.->setColumnHiddencxx . . $ QTreeView#setColumnHidden(918ebd27a9ddbad3).(COL_TAG_NRcxx . . $ `src/history.cc:32:9`!, true);
54 // m_taglist->header()->setStretchLastSection(true);
55 // m_taglist->header()->setResizeMode(QHeaderView::Stretch);
56 m_taglistcxx . . $ myHistory#m_taglist.->setHorizontalScrollBarPolicycxx . . $ QAbstractScrollArea#setHorizontalScrollBarPolicy(ec1b3becc657ee30).(Qtcxx . . $ Qt/::ScrollBarAlwaysOffcxx . . $ Qt/ScrollBarAlwaysOff.);
57 connectcxx . . $ QObject#connect(158df1d9a01a3410).(m_taglistcxx . . $ myHistory#m_taglist., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:265:10`!(itemDoubleClicked(QTreeWidgetItem*, int)),
58 this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:264:10`!(slot_modify_tag(QTreeWidgetItem*, int)));
59
60 m_movelistcxx . . $ myHistory#m_movelist. = new QTreeWidgetcxx . . $ QTreeWidget#QTreeWidget(108f35f7aa7f3cf9).(this);
61 m_movelistcxx . . $ myHistory#m_movelist.->setColumnCountcxx . . $ QTreeWidget#setColumnCount(d4f767463ce0a6b3).(3);
62 m_movelistcxx . . $ myHistory#m_movelist.->headercxx . . $ QTreeView#header(f0c0fe1a435d30ff).()->setStretchLastSectioncxx . . $ QHeaderView#setStretchLastSection(b45ddcbc8423892c).(true);
63 //m_movelist->header()->setMovable(false);
64 m_movelistcxx . . $ myHistory#m_movelist.->setRootIsDecoratedcxx . . $ QTreeView#setRootIsDecorated(b45ddcbc8423892c).(false);
65 QStringListcxx . . $ QStringList# headercxx . . $ QStringList#QStringList(ced63f7c635d850d).;
66 header <<cxx . . $ QStringList#`operator<<`(85116071a693d053). "#"cxx . . $ QString#QString(85c52e162fed56f9). <<cxx . . $ QStringList#`operator<<`(85116071a693d053). trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Move") <<cxx . . $ QStringList#`operator<<`(85116071a693d053). trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Comment");
67 m_movelistcxx . . $ myHistory#m_movelist.->setHeaderLabelscxx . . $ QTreeWidget#setHeaderLabels(631c0101495f0328).(header);
68 //
69 connectcxx . . $ QObject#connect(158df1d9a01a3410).(m_movelistcxx . . $ myHistory#m_movelist., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:265:10`!(itemDoubleClicked(QTreeWidgetItem*, int)),
70 this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:264:10`!(slot_modify_comment(QTreeWidgetItem*, int)));
71 connectcxx . . $ QObject#connect(158df1d9a01a3410).(m_movelistcxx . . $ myHistory#m_movelist.,
72 SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:265:10`!(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),
73 this,
74 SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:264:10`!(slot_move(QTreeWidgetItem*, QTreeWidgetItem*)));
75
76 // history
77 /*
78 gameUndo = new QAction(QIcon(":/icons/undo.svg"), tr("&Undo"), this);
79 connect(gameUndo, SIGNAL(triggered()), m_view, SLOT(slotUndo()));
80
81 gameRedo = new QAction(QIcon(":/icons/redo.svg"), tr("&Redo"), this);
82 connect(gameRedo, SIGNAL(triggered()), m_view, SLOT(slotRedo()));
83
84 gameContinue = new QAction(QIcon(":/icons/continue.svg"),
85 tr("&Continue"), this);
86 connect(gameContinue, SIGNAL(triggered()), m_view, SLOT(slotContinue()));
87
88
89 */
90 m_mode_iconcxx . . $ myHistory#m_mode_icon. = new QLabelcxx . . $ QLabel#QLabel(872e7b0c281abd8d).(this);
91 m_mode_iconcxx . . $ myHistory#m_mode_icon.->setFrameStylecxx . . $ QFrame#setFrameStyle(d4f767463ce0a6b3).(QFramecxx . . $ QFrame#::Panelcxx . . $ QFrame#Panel. |cxx . . $ `operator|`(44af6e16e9fc6bb). QFramecxx . . $ QFrame#::Sunkencxx . . $ QFrame#Sunken.);
92
93 m_undocxx . . $ myHistory#m_undo. = new QToolButtoncxx . . $ QToolButton#QToolButton(108f35f7aa7f3cf9).(this);
94 m_undocxx . . $ myHistory#m_undo.->setIconcxx . . $ QAbstractButton#setIcon(71dcdac178620ed6).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/icons/undo.svg"cxx . . $ QString#QString(85c52e162fed56f9).));
95 m_undocxx . . $ myHistory#m_undo.->setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Undo"));
96 connectcxx . . $ QObject#connect(158df1d9a01a3410).(m_undocxx . . $ myHistory#m_undo., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:265:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:264:10`!(slot_undo()));
97
98 m_redocxx . . $ myHistory#m_redo. = new QToolButtoncxx . . $ QToolButton#QToolButton(108f35f7aa7f3cf9).(this);
99 m_redocxx . . $ myHistory#m_redo.->setIconcxx . . $ QAbstractButton#setIcon(71dcdac178620ed6).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/icons/redo.svg"cxx . . $ QString#QString(85c52e162fed56f9).));
100 m_redocxx . . $ myHistory#m_redo.->setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Redo"));
101 connectcxx . . $ QObject#connect(158df1d9a01a3410).(m_redocxx . . $ myHistory#m_redo., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:265:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:264:10`!(slot_redo()));
102
103 m_contcxx . . $ myHistory#m_cont. = new QToolButtoncxx . . $ QToolButton#QToolButton(108f35f7aa7f3cf9).(this);
104 m_contcxx . . $ myHistory#m_cont.->setIconcxx . . $ QAbstractButton#setIcon(71dcdac178620ed6).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/icons/continue.svg"cxx . . $ QString#QString(85c52e162fed56f9).));
105 m_contcxx . . $ myHistory#m_cont.->setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Continue"));
106 connectcxx . . $ QObject#connect(158df1d9a01a3410).(m_contcxx . . $ myHistory#m_cont., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:265:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:264:10`!(slot_continue()));
107
108 m_currentcxx . . $ myHistory#m_current. = new QLabelcxx . . $ QLabel#QLabel(872e7b0c281abd8d).(this);
109
110 QHBoxLayoutcxx . . $ QHBoxLayout#* history = new QHBoxLayoutcxx . . $ QHBoxLayout#();
111 history->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_mode_iconcxx . . $ myHistory#m_mode_icon.);
112 //TODO history->addStretch();
113 history->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_undocxx . . $ myHistory#m_undo.);
114 history->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_redocxx . . $ myHistory#m_redo.);
115 history->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_contcxx . . $ myHistory#m_cont.);
116 history->addStretchcxx . . $ QBoxLayout#addStretch(d4f767463ce0a6b3).();
117 history->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_currentcxx . . $ myHistory#m_current.);
118
119 // layout
120 QVBoxLayoutcxx . . $ QVBoxLayout#* vb = new QVBoxLayoutcxx . . $ QVBoxLayout#(this);
121 vb->setMargincxx . . $ QLayout#setMargin(d4f767463ce0a6b3).(0);
122 vb->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_gamelistcxx . . $ myHistory#m_gamelist., 0);
123 vb->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_taglistcxx . . $ myHistory#m_taglist., 2);
124 vb->addWidgetcxx . . $ QBoxLayout#addWidget(d39963fa34d6acb).(m_movelistcxx . . $ myHistory#m_movelist., 4);
125 vb->addLayoutcxx . . $ QBoxLayout#addLayout(ecefce2409e37794).(history);
126
127 /*
128 * other stuff
129 */
130 m_pdncxx . . $ myHistory#m_pdn. = new Pdncxx . . $ Pdn#();
131 m_disable_movescxx . . $ myHistory#m_disable_moves. = false;
132 //
133 m_pausedcxx . . $ myHistory#m_paused. = true; // little hack ensures a mode change.
134 m_freeplacecxx . . $ myHistory#m_freeplace. = false;
135 set_modecxx . . $ myHistory#set_mode(b45ddcbc8423892c).(false);
136 }
137
138
139 myHistorycxx . . $ myHistory#::~cxx . . $ myHistory#`~myHistory`(ced63f7c635d850d).myHistorycxx . . $ myHistory#()
140 {
141 delete m_pdncxx . . $ myHistory#m_pdn.;
142 }
143
144
145 void myHistorycxx . . $ myHistory#::clearcxx . . $ myHistory#clear(49f6e7a06ebc5aa8).()
146 {
147 m_gamelistcxx . . $ myHistory#m_gamelist.->clearcxx . . $ QComboBox#clear(49f6e7a06ebc5aa8).();
148 m_pdncxx . . $ myHistory#m_pdn.->clearcxx . . $ Pdn#clear(49f6e7a06ebc5aa8).();
149 m_taglistcxx . . $ myHistory#m_taglist.->clearcxx . . $ QTreeWidget#clear(49f6e7a06ebc5aa8).();
150 m_movelistcxx . . $ myHistory#m_movelist.->clearcxx . . $ QTreeWidget#clear(49f6e7a06ebc5aa8).();
151 }
152
153
154 void myHistorycxx . . $ myHistory#::setTagcxx . . $ myHistory#setTag(843cca5850ba8ec7).(PdnGamecxx . . $ PdnGame#::Tagcxx . . $ PdnGame#Tag# tag, const QStringcxx . . $ QString#& val)
155 {
156 QTreeWidgetItemcxx . . $ QTreeWidgetItem#* item = 0;
157 QListcxx . . $ QList#<QTreeWidgetItemcxx . . $ QTreeWidgetItem#*> item_list = m_taglistcxx . . $ myHistory#m_taglist.->findItemscxx . . $ QTreeWidget#findItems(2d686ae6adb41a18).(
158 tag_to_stringcxx . . $ myHistory#tag_to_string(d9bcd7291d815d28).(tag), Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::MatchExactlycxx . . $ Qt/MatchExactly., COL_TAG_NAMEcxx . . $ `src/history.cc:33:9`!);
159 if(item_list.countcxx . . $ QList#count(455f465bc33b4cdf).()) {
160 if(item_list.countcxx . . $ QList#count(455f465bc33b4cdf).() == 1)
161 item = item_list[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).0];
162 else
163 qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). __PRETTY_FUNCTION__ <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "ERR";
164 }
165
166 if(item) {
167 item->setTextcxx . . $ QTreeWidgetItem#setText(4b11a7293b4ed91c).(COL_TAG_VALcxx . . $ `src/history.cc:34:9`!, val);
168 } else {
169 item = new QTreeWidgetItemcxx . . $ QTreeWidgetItem#QTreeWidgetItem(a0da2fa5542f28a7).(m_taglistcxx . . $ myHistory#m_taglist.);
170 item->setTextcxx . . $ QTreeWidgetItem#setText(4b11a7293b4ed91c).(COL_TAG_NRcxx . . $ `src/history.cc:32:9`!, QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(tag));
171 item->setTextcxx . . $ QTreeWidgetItem#setText(4b11a7293b4ed91c).(COL_TAG_NAMEcxx . . $ `src/history.cc:33:9`!, tag_to_stringcxx . . $ myHistory#tag_to_string(d9bcd7291d815d28).(tag));
172 item->setTextcxx . . $ QTreeWidgetItem#setText(4b11a7293b4ed91c).(COL_TAG_VALcxx . . $ `src/history.cc:34:9`!, val);
173 }
174
175 if(tag==PdnGamecxx . . $ PdnGame#::Typecxx . . $ PdnGame#Type.) {
176 item->setTextcxx . . $ QTreeWidgetItem#setText(4b11a7293b4ed91c).(COL_TAG_VALcxx . . $ `src/history.cc:34:9`!, val +cxx . . $ operator+(3d22f08efddf8107). " ("
177 +cxx . . $ operator+(fab9b4f80031f353). typeToStringcxx . . $ myHistory#typeToString(ce915ed341d4a7f0).(QStringcxx . . $ QString#QString(85c52e162fed56f9).("%1").argcxx . . $ QString#arg(bc823072288cbbb5).(val).toIntcxx . . $ QString#toInt(d7972accae11ee1f).())
178 +cxx . . $ operator+(3d22f08efddf8107). ")");
179 }
180
181 m_gamecxx . . $ myHistory#m_game.->setcxx . . $ PdnGame#set(843cca5850ba8ec7).(tag, val);
182 //TODO m_taglist->resizeColumnToContents(COL_TAG_NAME);
183 }
184
185
186 QStringcxx . . $ QString# myHistorycxx . . $ myHistory#::getTagcxx . . $ myHistory#getTag(d9bcd7291d815d28).(PdnGamecxx . . $ PdnGame#::Tagcxx . . $ PdnGame#Tag# tag)
187 {
188 QListcxx . . $ QList#<QTreeWidgetItemcxx . . $ QTreeWidgetItem#*> item_list = m_taglistcxx . . $ myHistory#m_taglist.->findItemscxx . . $ QTreeWidget#findItems(2d686ae6adb41a18).(
189 tag_to_stringcxx . . $ myHistory#tag_to_string(d9bcd7291d815d28).(tag), Qtcxx . . $ QFlags#QFlags(93d577a3e9528307).::MatchExactlycxx . . $ Qt/MatchExactly., COL_TAG_NAMEcxx . . $ `src/history.cc:33:9`!);
190 if(item_list.countcxx . . $ QList#count(455f465bc33b4cdf).() == 1)
191 return item_list[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).0]->textcxx . . $ QTreeWidgetItem#text(3f3c3d0e9c0eb37f).(COL_TAG_VALcxx . . $ `src/history.cc:34:9`!);
192 return ""cxx . . $ QString#QString(85c52e162fed56f9).;
193 }
194
195
196 QStringcxx . . $ QString# myHistorycxx . . $ myHistory#::tag_to_stringcxx . . $ myHistory#tag_to_string(d9bcd7291d815d28).(PdnGamecxx . . $ PdnGame#::Tagcxx . . $ PdnGame#Tag# tag)
197 {
198 switch(tag) {
199 case PdnGamecxx . . $ PdnGame#::Datecxx . . $ PdnGame#Date.: return /*tr(*/"Date"cxx . . $ QString#QString(85c52e162fed56f9).;//);
200 case PdnGamecxx . . $ PdnGame#::Sitecxx . . $ PdnGame#Site.: return /*tr(*/"Site"cxx . . $ QString#QString(85c52e162fed56f9).;//);
201 case PdnGamecxx . . $ PdnGame#::Typecxx . . $ PdnGame#Type.: return /*tr(*/"Type"cxx . . $ QString#QString(85c52e162fed56f9).;//);
202 case PdnGamecxx . . $ PdnGame#::Eventcxx . . $ PdnGame#Event.: return /*tr(*/"Event"cxx . . $ QString#QString(85c52e162fed56f9).;//);
203 case PdnGamecxx . . $ PdnGame#::Roundcxx . . $ PdnGame#Round.: return /*tr(*/"Round"cxx . . $ QString#QString(85c52e162fed56f9).;//);
204 case PdnGamecxx . . $ PdnGame#::Whitecxx . . $ PdnGame#White.: return /*tr(*/"White"cxx . . $ QString#QString(85c52e162fed56f9).;//);
205 case PdnGamecxx . . $ PdnGame#::Blackcxx . . $ PdnGame#Black.: return /*tr(*/"Black"cxx . . $ QString#QString(85c52e162fed56f9).;//);
206 case PdnGamecxx . . $ PdnGame#::Resultcxx . . $ PdnGame#Result.: return /*tr(*/"Result"cxx . . $ QString#QString(85c52e162fed56f9).;//);
207 }
208
209 return "Site"cxx . . $ QString#QString(85c52e162fed56f9).; // FIXME
210 }
211
212
213 void myHistorycxx . . $ myHistory#::appendMovecxx . . $ myHistory#appendMove(c1427772cd1877b0).(const QStringcxx . . $ QString#& text, const QStringcxx . . $ QString#& comm)
214 {
215 m_disable_movescxx . . $ myHistory#m_disable_moves. = true;
216
217 QTreeWidgetItemcxx . . $ QTreeWidgetItem#* new_item = new QTreeWidgetItemcxx . . $ QTreeWidgetItem#QTreeWidgetItem(a0da2fa5542f28a7).(m_movelistcxx . . $ myHistory#m_movelist.);
218 new_item->setTextcxx . . $ QTreeWidgetItem#setText(4b11a7293b4ed91c).(COL_MOVEcxx . . $ `src/history.cc:37:9`!, text);
219 new_item->setTextcxx . . $ QTreeWidgetItem#setText(4b11a7293b4ed91c).(COL_MOVE_COMMcxx . . $ `src/history.cc:38:9`!, comm);
220
221 int move_nr = (m_movelistcxx . . $ myHistory#m_movelist.->topLevelItemCountcxx . . $ QTreeWidget#topLevelItemCount(455f465bc33b4cdf).() - 2) / 2;
222 PdnMovecxx . . $ PdnMove#* m = m_gamecxx . . $ myHistory#m_game.->getMovecxx . . $ PdnGame#getMove(13c520724813e2b0).(move_nr);
223
224 if(m_movelistcxx . . $ myHistory#m_movelist.->topLevelItemCountcxx . . $ QTreeWidget#topLevelItemCount(455f465bc33b4cdf).()%2) {
225 m->m_secondcxx . . $ PdnMove#m_second. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). text;
226 m->m_comsecondcxx . . $ PdnMove#m_comsecond. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). comm;
227 } else {
228 new_item->setTextcxx . . $ QTreeWidgetItem#setText(4b11a7293b4ed91c).(COL_MOVE_NRcxx . . $ `src/history.cc:36:9`!, QStringcxx . . $ QString#QString(85c52e162fed56f9).("%1.").argcxx . . $ QString#arg(64ab2ed17cc11715).(move_nr+1));
229 m->m_firstcxx . . $ PdnMove#m_first. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). text;
230 m->m_comfirstcxx . . $ PdnMove#m_comfirst. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). comm;
231 }
232
233 m_movelistcxx . . $ myHistory#m_movelist.->setCurrentItemcxx . . $ QTreeWidget#setCurrentItem(7332f4628c1d1841).(new_item);
234 m_movelistcxx . . $ myHistory#m_movelist.->scrollToItemcxx . . $ QTreeWidget#scrollToItem(49c6117030e9f883).(new_item);
235
236 // TODO
237 m_movelistcxx . . $ myHistory#m_movelist.->resizeColumnToContentscxx . . $ QTreeView#resizeColumnToContents(d4f767463ce0a6b3).(COL_MOVE_NRcxx . . $ `src/history.cc:36:9`!);
238
239 m_disable_movescxx . . $ myHistory#m_disable_moves. = false;
240 }
241
242
243 void myHistorycxx . . $ myHistory#::slot_modify_commentcxx . . $ myHistory#slot_modify_comment(abbf99ae0f1fc9f0).(QTreeWidgetItemcxx . . $ QTreeWidgetItem#* item, int)
244 {
245 if(!item || item==m_movelistcxx . . $ myHistory#m_movelist.->topLevelItemcxx . . $ QTreeWidget#topLevelItem(bdbf10533f234380).(0) || m_pausedcxx . . $ myHistory#m_paused.)
246 return;
247
248 bool ok;
249 QStringcxx . . $ QString# new_text = QInputDialogcxx . . $ QInputDialog#::getTextcxx . . $ QInputDialog#getText(3a040172601c4ee1).(this, trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Set Comment"),//FIXME
250 trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Comment")+cxx . . $ operator+(3d22f08efddf8107).":", QLineEditcxx . . $ QLineEdit#::Normalcxx . . $ QLineEdit#Normal., item->textcxx . . $ QTreeWidgetItem#text(3f3c3d0e9c0eb37f).(COL_MOVE_COMMcxx . . $ `src/history.cc:38:9`!),
251 &ok);
252 if(!ok)
253 return;
254
255 new_text.removecxx . . $ QString#remove(30270fe3985671e6).('{'cxx . . $ QChar#QChar(f349c77f591a7878).);
256 new_text.removecxx . . $ QString#remove(30270fe3985671e6).('}'cxx . . $ QChar#QChar(f349c77f591a7878).);
257 if(new_text !=cxx . . $ `operator!=`(5bc2975d2d751687). item->textcxx . . $ QTreeWidgetItem#text(3f3c3d0e9c0eb37f).(COL_MOVE_COMMcxx . . $ `src/history.cc:38:9`!)) {
258 // gui
259 item->setTextcxx . . $ QTreeWidgetItem#setText(4b11a7293b4ed91c).(COL_MOVE_COMMcxx . . $ `src/history.cc:38:9`!, new_text);
260
261 // pdn
262 int index = m_movelistcxx . . $ myHistory#m_movelist.->indexOfTopLevelItemcxx . . $ QTreeWidget#indexOfTopLevelItem(c49126e84bb13168).(item);
263 PdnMovecxx . . $ PdnMove#* move = m_gamecxx . . $ myHistory#m_game.->getMovecxx . . $ PdnGame#getMove(13c520724813e2b0).((index - 1) / 2);
264 if(index%2==1)
265 move->m_comfirstcxx . . $ PdnMove#m_comfirst. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). new_text;
266 else
267 move->m_comsecondcxx . . $ PdnMove#m_comsecond. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). new_text;
268 }
269 }
270
271
272 void myHistorycxx . . $ myHistory#::slot_modify_tagcxx . . $ myHistory#slot_modify_tag(abbf99ae0f1fc9f0).(QTreeWidgetItemcxx . . $ QTreeWidgetItem#* item, int/* col*/)
273 {
274 if(!item || m_pausedcxx . . $ myHistory#m_paused.)
275 return;
276
277 PdnGamecxx . . $ PdnGame#::Tagcxx . . $ PdnGame#Tag# tag =(PdnGamecxx . . $ PdnGame#::Tagcxx . . $ PdnGame#Tag#)item->textcxx . . $ QTreeWidgetItem#text(3f3c3d0e9c0eb37f).(COL_TAG_NRcxx . . $ `src/history.cc:32:9`!).toUIntcxx . . $ QString#toUInt(a0efe6e2edfc86a0).();
278 if(tag==PdnGamecxx . . $ PdnGame#::Typecxx . . $ PdnGame#Type.) {
279 return;
280 }
281
282 bool ok;
283 QStringcxx . . $ QString# new_text = QInputDialogcxx . . $ QInputDialog#::getTextcxx . . $ QInputDialog#getText(3a040172601c4ee1).(this, trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Set Tag"),//FIXME
284 trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Tag")+cxx . . $ operator+(3d22f08efddf8107).":", QLineEditcxx . . $ QLineEdit#::Normalcxx . . $ QLineEdit#Normal., item->textcxx . . $ QTreeWidgetItem#text(3f3c3d0e9c0eb37f).(COL_TAG_VALcxx . . $ `src/history.cc:34:9`!), &ok);
285 if(!ok)
286 return;
287
288 new_text.removecxx . . $ QString#remove(30270fe3985671e6).('"'cxx . . $ QChar#QChar(f349c77f591a7878).);
289 new_text.removecxx . . $ QString#remove(30270fe3985671e6).('['cxx . . $ QChar#QChar(f349c77f591a7878).);
290 new_text.removecxx . . $ QString#remove(30270fe3985671e6).(']'cxx . . $ QChar#QChar(f349c77f591a7878).);
291
292 if(new_text !=cxx . . $ `operator!=`(5bc2975d2d751687). item->textcxx . . $ QTreeWidgetItem#text(3f3c3d0e9c0eb37f).(COL_TAG_VALcxx . . $ `src/history.cc:34:9`!)) {
293 item->setTextcxx . . $ QTreeWidgetItem#setText(4b11a7293b4ed91c).(COL_TAG_VALcxx . . $ `src/history.cc:34:9`!, new_text);
294 m_gamecxx . . $ myHistory#m_game.->setcxx . . $ PdnGame#set(843cca5850ba8ec7).(tag, new_text);
295 if(tag==PdnGamecxx . . $ PdnGame#::Eventcxx . . $ PdnGame#Event.)
296 m_gamelistcxx . . $ myHistory#m_gamelist.->setItemTextcxx . . $ QComboBox#setItemText(4b11a7293b4ed91c).(m_gamelistcxx . . $ myHistory#m_gamelist.->currentIndexcxx . . $ QComboBox#currentIndex(455f465bc33b4cdf).(),
297 new_text);
298 }
299 }
300
301
302 bool myHistorycxx . . $ myHistory#::openPdncxx . . $ myHistory#openPdn(853723320e657e87).(const QStringcxx . . $ QString#& filename, QStringcxx . . $ QString#& log_text)
303 {
304 if(!m_pdncxx . . $ myHistory#m_pdn.->opencxx . . $ Pdn#open(c44dbb032bc1e7d3).(filename, this, trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Reading file..."), log_text)) {
305 set_modecxx . . $ myHistory#set_mode(b45ddcbc8423892c).(false);
306 return false;
307 }
308
309 set_modecxx . . $ myHistory#set_mode(b45ddcbc8423892c).(true);
310
311 m_gamelistcxx . . $ myHistory#m_gamelist.->clearcxx . . $ QComboBox#clear(49f6e7a06ebc5aa8).();
312 m_movelistcxx . . $ myHistory#m_movelist.->clearcxx . . $ QTreeWidget#clear(49f6e7a06ebc5aa8).();
313 m_taglistcxx . . $ myHistory#m_taglist.->clearcxx . . $ QTreeWidget#clear(49f6e7a06ebc5aa8).();
314
315 QProgressDialogcxx . . $ QProgressDialog# progresscxx . . $ QProgressDialog#QProgressDialog(872e7b0c281abd8d).(this);
316 progress.setModalcxx . . $ QDialog#setModal(b45ddcbc8423892c).(true);
317 progress.setLabelTextcxx . . $ QProgressDialog#setLabelText(3520e46b33348bf6).(trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Importing games..."));
318 progress.setRangecxx . . $ QProgressDialog#setRange(3e454b8ccf442868).(0, m_pdncxx . . $ myHistory#m_pdn.->countcxx . . $ Pdn#count(455f465bc33b4cdf).());
319 progress.setMinimumDurationcxx . . $ QProgressDialog#setMinimumDuration(d4f767463ce0a6b3).(0);
320
321 for(int i=0; i<m_pdncxx . . $ myHistory#m_pdn.->countcxx . . $ Pdn#count(455f465bc33b4cdf).(); ++i) {
322 if((i%10)==0)
323 progress.setValuecxx . . $ QProgressDialog#setValue(d4f767463ce0a6b3).(i);
324 m_gamelistcxx . . $ myHistory#m_gamelist.->insertItemcxx . . $ QComboBox#insertItem(ec79cc9d4020bf15).(i, m_pdncxx . . $ myHistory#m_pdn.->gamecxx . . $ Pdn#game(43bbca349f83a844).(i)->getcxx . . $ PdnGame#get(2bba888b79065846).(PdnGamecxx . . $ PdnGame#::Eventcxx . . $ PdnGame#Event.));
325 }
326
327 slot_game_selectedcxx . . $ myHistory#slot_game_selected(d4f767463ce0a6b3).(0);
328
329 return true;
330 }
331
332
333 bool myHistorycxx . . $ myHistory#::savePdncxx . . $ myHistory#savePdn(e1defb592416720d).(const QStringcxx . . $ QString#& fn)
334 {
335 return m_pdncxx . . $ myHistory#m_pdn.->savecxx . . $ Pdn#save(e1defb592416720d).(fn);
336 }
337
338
339 void myHistorycxx . . $ myHistory#::slot_game_selectedcxx . . $ myHistory#slot_game_selected(d4f767463ce0a6b3).(int index)
340 {
341 if(index>=m_pdncxx . . $ myHistory#m_pdn.->countcxx . . $ Pdn#count(455f465bc33b4cdf).()) {
342 qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!() <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). __PRETTY_FUNCTION__ <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "Index" <<cxx . . $ QDebug#`operator<<`(6e3b7ae53f380c3). index
343 <<cxx . . $ QDebug#`operator<<`(d8a917b173851aad). "out of range >=" <<cxx . . $ QDebug#`operator<<`(6e3b7ae53f380c3). m_pdncxx . . $ myHistory#m_pdn.->countcxx . . $ Pdn#count(455f465bc33b4cdf).();
344 return;
345 }
346
347 m_gamecxx . . $ myHistory#m_game. = m_pdncxx . . $ myHistory#m_pdn.->gamecxx . . $ Pdn#game(43bbca349f83a844).(index);
348 m_movelistcxx . . $ myHistory#m_movelist.->clearcxx . . $ QTreeWidget#clear(49f6e7a06ebc5aa8).();
349
350 QTreeWidgetItemcxx . . $ QTreeWidgetItem#* root = new QTreeWidgetItemcxx . . $ QTreeWidgetItem#QTreeWidgetItem(a0da2fa5542f28a7).(m_movelistcxx . . $ myHistory#m_movelist.);
351 for(int i=0; i<m_gamecxx . . $ myHistory#m_game.->movesCountcxx . . $ PdnGame#movesCount(455f465bc33b4cdf).(); ++i) {
352 PdnMovecxx . . $ PdnMove#* m = m_gamecxx . . $ myHistory#m_game.->getMovecxx . . $ PdnGame#getMove(13c520724813e2b0).(i);
353
354 appendMovecxx . . $ myHistory#appendMove(c1427772cd1877b0).(m->m_firstcxx . . $ PdnMove#m_first., m->m_comfirstcxx . . $ PdnMove#m_comfirst.);
355 if(m->m_secondcxx . . $ PdnMove#m_second..lengthcxx . . $ QString#length(455f465bc33b4cdf).())
356 appendMovecxx . . $ myHistory#appendMove(c1427772cd1877b0).(m->m_secondcxx . . $ PdnMove#m_second., m->m_comsecondcxx . . $ PdnMove#m_comsecond.);
357 }
358
359 setTagcxx . . $ myHistory#setTag(843cca5850ba8ec7).(PdnGamecxx . . $ PdnGame#::Sitecxx . . $ PdnGame#Site., m_gamecxx . . $ myHistory#m_game.->getcxx . . $ PdnGame#get(2bba888b79065846).(PdnGamecxx . . $ PdnGame#::Sitecxx . . $ PdnGame#Site.));
360 setTagcxx . . $ myHistory#setTag(843cca5850ba8ec7).(PdnGamecxx . . $ PdnGame#::Blackcxx . . $ PdnGame#Black., m_gamecxx . . $ myHistory#m_game.->getcxx . . $ PdnGame#get(2bba888b79065846).(PdnGamecxx . . $ PdnGame#::Blackcxx . . $ PdnGame#Black.));
361 setTagcxx . . $ myHistory#setTag(843cca5850ba8ec7).(PdnGamecxx . . $ PdnGame#::Whitecxx . . $ PdnGame#White., m_gamecxx . . $ myHistory#m_game.->getcxx . . $ PdnGame#get(2bba888b79065846).(PdnGamecxx . . $ PdnGame#::Whitecxx . . $ PdnGame#White.));
362 setTagcxx . . $ myHistory#setTag(843cca5850ba8ec7).(PdnGamecxx . . $ PdnGame#::Resultcxx . . $ PdnGame#Result., m_gamecxx . . $ myHistory#m_game.->getcxx . . $ PdnGame#get(2bba888b79065846).(PdnGamecxx . . $ PdnGame#::Resultcxx . . $ PdnGame#Result.));
363 setTagcxx . . $ myHistory#setTag(843cca5850ba8ec7).(PdnGamecxx . . $ PdnGame#::Datecxx . . $ PdnGame#Date., m_gamecxx . . $ myHistory#m_game.->getcxx . . $ PdnGame#get(2bba888b79065846).(PdnGamecxx . . $ PdnGame#::Datecxx . . $ PdnGame#Date.));
364 setTagcxx . . $ myHistory#setTag(843cca5850ba8ec7).(PdnGamecxx . . $ PdnGame#::Sitecxx . . $ PdnGame#Site., m_gamecxx . . $ myHistory#m_game.->getcxx . . $ PdnGame#get(2bba888b79065846).(PdnGamecxx . . $ PdnGame#::Sitecxx . . $ PdnGame#Site.));
365 setTagcxx . . $ myHistory#setTag(843cca5850ba8ec7).(PdnGamecxx . . $ PdnGame#::Typecxx . . $ PdnGame#Type., m_gamecxx . . $ myHistory#m_game.->getcxx . . $ PdnGame#get(2bba888b79065846).(PdnGamecxx . . $ PdnGame#::Typecxx . . $ PdnGame#Type.));
366 setTagcxx . . $ myHistory#setTag(843cca5850ba8ec7).(PdnGamecxx . . $ PdnGame#::Roundcxx . . $ PdnGame#Round., m_gamecxx . . $ myHistory#m_game.->getcxx . . $ PdnGame#get(2bba888b79065846).(PdnGamecxx . . $ PdnGame#::Roundcxx . . $ PdnGame#Round.));
367 setTagcxx . . $ myHistory#setTag(843cca5850ba8ec7).(PdnGamecxx . . $ PdnGame#::Eventcxx . . $ PdnGame#Event., m_gamecxx . . $ myHistory#m_game.->getcxx . . $ PdnGame#get(2bba888b79065846).(PdnGamecxx . . $ PdnGame#::Eventcxx . . $ PdnGame#Event.));
368
369 // signal to view
370 if(m_pausedcxx . . $ myHistory#m_paused. && !m_freeplacecxx . . $ myHistory#m_freeplace.) {
371 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! previewGamecxx . . $ myHistory#previewGame(d4f767463ce0a6b3).(m_gamecxx . . $ myHistory#m_game.->getcxx . . $ PdnGame#get(2bba888b79065846).(PdnGamecxx . . $ PdnGame#::Typecxx . . $ PdnGame#Type.).toIntcxx . . $ QString#toInt(d7972accae11ee1f).());
372 }
373
374 m_movelistcxx . . $ myHistory#m_movelist.->setCurrentItemcxx . . $ QTreeWidget#setCurrentItem(7332f4628c1d1841).(root);
375 slot_movecxx . . $ myHistory#slot_move(5ef89140c59dd28e).(root, 0);
376 }
377
378
379 void myHistorycxx . . $ myHistory#::newPdncxx . . $ myHistory#newPdn(37c160c81b6367f7).(const QStringcxx . . $ QString#& event, bool freeplace)
380 {
381 m_freeplacecxx . . $ myHistory#m_freeplace. = freeplace;
382 m_pausedcxx . . $ myHistory#m_paused. = !m_freeplacecxx . . $ myHistory#m_freeplace.; // FIXME - needed to force view update.
383 set_modecxx . . $ myHistory#set_mode(b45ddcbc8423892c).(m_freeplacecxx . . $ myHistory#m_freeplace.);
384
385 PdnGamecxx . . $ PdnGame#* game = m_pdncxx . . $ myHistory#m_pdn.->newGamecxx . . $ Pdn#newGame(7f8740dfe427848).();
386 game->setcxx . . $ PdnGame#set(843cca5850ba8ec7).(PdnGamecxx . . $ PdnGame#::Eventcxx . . $ PdnGame#Event., event);
387
388 int index = m_gamelistcxx . . $ myHistory#m_gamelist.->countcxx . . $ QComboBox#count(455f465bc33b4cdf).();
389 m_gamelistcxx . . $ myHistory#m_gamelist.->insertItemcxx . . $ QComboBox#insertItem(ec79cc9d4020bf15).(index, event);
390 m_gamelistcxx . . $ myHistory#m_gamelist.->setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(index);
391
392 slot_game_selectedcxx . . $ myHistory#slot_game_selected(d4f767463ce0a6b3).(index);
393 }
394
395
396 QStringcxx . . $ QString# myHistorycxx . . $ myHistory#::typeToStringcxx . . $ myHistory#typeToString(ce915ed341d4a7f0).(int type)
397 {
398 switch(type) {
399 case ENGLISHcxx . . $ `src/pdn.h:34:9`!: return trcxx . . $ myHistory#tr(75d9f1c324b4579d).("English draughts");
400 case RUSSIANcxx . . $ `src/pdn.h:35:9`!: return trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Russian draughts");
401 };
402 return trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Unknown game type");
403 }
404
405
406 void myHistorycxx . . $ myHistory#::set_modecxx . . $ myHistory#set_mode(b45ddcbc8423892c).(bool paused)
407 {
408 if(m_pausedcxx . . $ myHistory#m_paused. != paused) {
409 m_pausedcxx . . $ myHistory#m_paused. = paused;
410
411 if(m_pausedcxx . . $ myHistory#m_paused.) {
412 if(m_freeplacecxx . . $ myHistory#m_freeplace.) {
413 m_mode_iconcxx . . $ myHistory#m_mode_icon.->setPixmapcxx . . $ QLabel#setPixmap(8887f7d25b86c3f4).(QPixmapcxx . . $ QPixmap#QPixmap(dec4543235ec9b46).(":/icons/freeplace.png"cxx . . $ QString#QString(85c52e162fed56f9).));
414 m_mode_iconcxx . . $ myHistory#m_mode_icon.->setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Free Placement Mode"));
415 } else {
416 m_mode_iconcxx . . $ myHistory#m_mode_icon.->setPixmapcxx . . $ QLabel#setPixmap(8887f7d25b86c3f4).(QPixmapcxx . . $ QPixmap#QPixmap(dec4543235ec9b46).(":/icons/paused.svg"cxx . . $ QString#QString(85c52e162fed56f9).));
417 m_mode_iconcxx . . $ myHistory#m_mode_icon.->setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Paused Mode"));
418 }
419 } else {
420 m_mode_iconcxx . . $ myHistory#m_mode_icon.->setPixmapcxx . . $ QLabel#setPixmap(8887f7d25b86c3f4).(QPixmapcxx . . $ QPixmap#QPixmap(dec4543235ec9b46).(":/icons/logo.svg"cxx . . $ QString#QString(85c52e162fed56f9).));
421 m_mode_iconcxx . . $ myHistory#m_mode_icon.->setToolTipcxx . . $ QWidget#setToolTip(3520e46b33348bf6).(trcxx . . $ myHistory#tr(75d9f1c324b4579d).("Play Mode"));
422 }
423
424 m_gamelistcxx . . $ myHistory#m_gamelist.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(m_pausedcxx . . $ myHistory#m_paused.);
425 //FIXME m_movelist->setEnabled(yes);
426
427 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! newModecxx . . $ myHistory#newMode(b0b38cda41d4ede4).(m_pausedcxx . . $ myHistory#m_paused., m_freeplacecxx . . $ myHistory#m_freeplace.);
428 }
429 }
430
431
432 void myHistorycxx . . $ myHistory#::slot_movecxx . . $ myHistory#slot_move(5ef89140c59dd28e).(QTreeWidgetItemcxx . . $ QTreeWidgetItem#* item, QTreeWidgetItemcxx . . $ QTreeWidgetItem#*)
433 {
434 // update history buttons.
435 bool curr_is_first =
436 (m_movelistcxx . . $ myHistory#m_movelist.->topLevelItemcxx . . $ QTreeWidget#topLevelItem(bdbf10533f234380).(0) == m_movelistcxx . . $ myHistory#m_movelist.->currentItemcxx . . $ QTreeWidget#currentItem(faf259b556e61ea0).());
437 bool curr_is_last =
438 (m_movelistcxx . . $ myHistory#m_movelist.->indexOfTopLevelItemcxx . . $ QTreeWidget#indexOfTopLevelItem(c49126e84bb13168).(m_movelistcxx . . $ myHistory#m_movelist.->currentItemcxx . . $ QTreeWidget#currentItem(faf259b556e61ea0).())
439 == m_movelistcxx . . $ myHistory#m_movelist.->topLevelItemCountcxx . . $ QTreeWidget#topLevelItemCount(455f465bc33b4cdf).()-1);
440
441 m_undocxx . . $ myHistory#m_undo.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!curr_is_first);
442 m_redocxx . . $ myHistory#m_redo.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!curr_is_last);
443 m_contcxx . . $ myHistory#m_cont.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(m_pausedcxx . . $ myHistory#m_paused.);
444
445
446 // process
447 if(!item || !m_pausedcxx . . $ myHistory#m_paused. || m_disable_movescxx . . $ myHistory#m_disable_moves.)
448 return;
449
450 do_movescxx . . $ myHistory#do_moves(49f6e7a06ebc5aa8).();
451 }
452
453
454 void myHistorycxx . . $ myHistory#::history_undocxx . . $ myHistory#history_undo(b45ddcbc8423892c).(bool move_backwards)
455 {
456 int next = m_movelistcxx . . $ myHistory#m_movelist.->indexOfTopLevelItemcxx . . $ QTreeWidget#indexOfTopLevelItem(c49126e84bb13168).(m_movelistcxx . . $ myHistory#m_movelist.->currentItemcxx . . $ QTreeWidget#currentItem(faf259b556e61ea0).())
457 + (move_backwards ? -1 : +1);
458
459 if(next>=0 && next<m_movelistcxx . . $ myHistory#m_movelist.->topLevelItemCountcxx . . $ QTreeWidget#topLevelItemCount(455f465bc33b4cdf).())
460 m_movelistcxx . . $ myHistory#m_movelist.->setCurrentItemcxx . . $ QTreeWidget#setCurrentItem(7332f4628c1d1841).(m_movelistcxx . . $ myHistory#m_movelist.->topLevelItemcxx . . $ QTreeWidget#topLevelItem(bdbf10533f234380).(next));
461 }
462
463
464 void myHistorycxx . . $ myHistory#::do_movescxx . . $ myHistory#do_moves(49f6e7a06ebc5aa8).()
465 {
466 QStringcxx . . $ QString# movescxx . . $ QString#QString(ced63f7c635d850d).;
467 QTreeWidgetItemcxx . . $ QTreeWidgetItem#* item = m_movelistcxx . . $ myHistory#m_movelist.->currentItemcxx . . $ QTreeWidget#currentItem(faf259b556e61ea0).();
468 for(int i=0; i<m_movelistcxx . . $ myHistory#m_movelist.->topLevelItemCountcxx . . $ QTreeWidget#topLevelItemCount(455f465bc33b4cdf).(); ++i) {
469 QTreeWidgetItemcxx . . $ QTreeWidgetItem#* cur = m_movelistcxx . . $ myHistory#m_movelist.->topLevelItemcxx . . $ QTreeWidget#topLevelItem(bdbf10533f234380).(i);
470 moves +=cxx . . $ QString#`operator+=`(6a89d0b7f4d2681c). cur->textcxx . . $ QTreeWidgetItem#text(3f3c3d0e9c0eb37f).(COL_MOVEcxx . . $ `src/history.cc:37:9`!) +cxx . . $ operator+(501d4570f8fec4c9). MOVE_SPLITcxx . . $ `src/history.h:33:9`!;
471 if(m_movelistcxx . . $ myHistory#m_movelist.->topLevelItemcxx . . $ QTreeWidget#topLevelItem(bdbf10533f234380).(i)==item)
472 break;
473 }
474 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! applyMovescxx . . $ myHistory#applyMoves(3520e46b33348bf6).(moves);
475 }
476
477
478 void myHistorycxx . . $ myHistory#::delete_movescxx . . $ myHistory#delete_moves(49f6e7a06ebc5aa8).()
479 {
480 int curr = m_movelistcxx . . $ myHistory#m_movelist.->indexOfTopLevelItemcxx . . $ QTreeWidget#indexOfTopLevelItem(c49126e84bb13168).(m_movelistcxx . . $ myHistory#m_movelist.->currentItemcxx . . $ QTreeWidget#currentItem(faf259b556e61ea0).());
481 while(m_movelistcxx . . $ myHistory#m_movelist.->topLevelItemCountcxx . . $ QTreeWidget#topLevelItemCount(455f465bc33b4cdf).() > curr+1) {
482 delete m_movelistcxx . . $ myHistory#m_movelist.->topLevelItemcxx . . $ QTreeWidget#topLevelItem(bdbf10533f234380).(
483 m_movelistcxx . . $ myHistory#m_movelist.->topLevelItemCountcxx . . $ QTreeWidget#topLevelItemCount(455f465bc33b4cdf).()-1);
484 }
485 }
486
487
488 void myHistorycxx . . $ myHistory#::slot_undocxx . . $ myHistory#slot_undo(49f6e7a06ebc5aa8).()
489 {
490 set_modecxx . . $ myHistory#set_mode(b45ddcbc8423892c).(true);
491 history_undocxx . . $ myHistory#history_undo(b45ddcbc8423892c).(true);
492 do_movescxx . . $ myHistory#do_moves(49f6e7a06ebc5aa8).();
493 }
494
495 void myHistorycxx . . $ myHistory#::slot_redocxx . . $ myHistory#slot_redo(49f6e7a06ebc5aa8).()
496 {
497 set_modecxx . . $ myHistory#set_mode(b45ddcbc8423892c).(true);
498 history_undocxx . . $ myHistory#history_undo(b45ddcbc8423892c).(false);
499 do_movescxx . . $ myHistory#do_moves(49f6e7a06ebc5aa8).();
500 }
501
502
503 void myHistorycxx . . $ myHistory#::slot_continuecxx . . $ myHistory#slot_continue(49f6e7a06ebc5aa8).()
504 {
505 delete_movescxx . . $ myHistory#delete_moves(49f6e7a06ebc5aa8).();
506 set_modecxx . . $ myHistory#set_mode(b45ddcbc8423892c).(false);
507 }
508
509
510 void myHistorycxx . . $ myHistory#::slotWorkingcxx . . $ myHistory#slotWorking(b45ddcbc8423892c).(bool b)
511 {
512 setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!b);
513 }
514