| 1 | /*************************************************************************** |
| 2 | * Copyright (C) 2009 by The qGo Project * |
| 3 | * * |
| 4 | * This file is part of qGo. * |
| 5 | * * |
| 6 | * qGo is free software: you can redistribute it and/or modify * |
| 7 | * it under the terms of the GNU General Public License as published by * |
| 8 | * the Free Software Foundation; either version 2 of the License, or * |
| 9 | * (at your option) any later version. * |
| 10 | * * |
| 11 | * This program is distributed in the hope that it will be useful, * |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 14 | * GNU General Public License for more details. * |
| 15 | * * |
| 16 | * You should have received a copy of the GNU General Public License * |
| 17 | * along with this program; if not, see <http://www.gnu.org/licenses/> * |
| 18 | * or write to the Free Software Foundation, Inc., * |
| 19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
| 20 | ***************************************************************************/ |
| 21 | |
| 22 | #include "boardwindow.h"cxx . . $ `<file>/src/board/boardwindow.h`/ |
| 23 | #include "board.h"cxx . . $ `<file>/src/board/board.h`/ |
| 24 | #include "clockdisplay.h"cxx . . $ `<file>/src/board/clockdisplay.h`/ |
| 25 | #include "qgoboard.h"cxx . . $ `<file>/src/game_interfaces/qgoboard.h`/ |
| 26 | #include "qgoboard_net.h"cxx . . $ `<file>/src/game_interfaces/qgoboard_net.h`/ |
| 27 | #include "qgoboardlocalinterface.h"cxx . . $ `<file>/src/game_interfaces/qgoboardlocalinterface.h`/ |
| 28 | #include "move.h"cxx . . $ `<file>/src/game_tree/move.h`/ |
| 29 | #include "tree.h"cxx . . $ `<file>/src/game_tree/tree.h`/ |
| 30 | #include "boarddispatch.h"cxx . . $ `<file>/src/network/boarddispatch.h`/ |
| 31 | #include "gameinfo.h"cxx . . $ `<file>/src/board/gameinfo.h`/ |
| 32 | #include "matrix.h"cxx . . $ `<file>/src/game_tree/matrix.h`/ |
| 33 | #include "ui_boardwindow.h"cxx . . $ `<file>/build/ui/ui_boardwindow.h`/ |
| 34 | #include <QtWidgets> |
| 35 | |
| 36 | class BoardHandlercxx . . $ BoardHandler#; |
| 37 | |
| 38 | BoardWindowcxx . . $ BoardWindow#::BoardWindowcxx . . $ BoardWindow#BoardWindow(50cc386dd30baa3b).(GameDatacxx . . $ GameData# *gd, bool iAmBlack , bool iAmWhite, class BoardDispatchcxx . . $ BoardDispatch# * _dispatch) |
| 39 | : QMainWindowcxx . . $ QMainWindow#(0, 0cxx . . $ QFlags#QFlags(e0a983ae3e5301c).), uicxx . . $ BoardWindow#ui.(new Uicxx . . $ Ui/::BoardWindowcxx . . $ Ui/BoardWindow#), addtime_menucxx . . $ BoardWindow#addtime_menu.(0), boardSizecxx . . $ BoardWindow#boardSize.(gd->board_sizecxx . . $ GameData#board_size.) |
| 40 | { |
| 41 | uicxx . . $ BoardWindow#ui.->setupUicxx . . $ Ui_BoardWindow#setupUi(f2c32f691ede4a4e).(this); |
| 42 | |
| 43 | if(gd != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 44 | { |
| 45 | gameDatacxx . . $ BoardWindow#gameData. = gd; |
| 46 | } else { |
| 47 | gameDatacxx . . $ BoardWindow#gameData. = new GameDatacxx . . $ GameData#(); |
| 48 | gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. = modeEditcxx . . $ modeEdit.; |
| 49 | } |
| 50 | |
| 51 | dispatchcxx . . $ BoardWindow#dispatch. = _dispatch; |
| 52 | |
| 53 | if(gameDatacxx . . $ BoardWindow#gameData.->nigiriToBeSettledcxx . . $ GameData#nigiriToBeSettled.) |
| 54 | { |
| 55 | myColorIsBlackcxx . . $ BoardWindow#myColorIsBlack. = false; |
| 56 | myColorIsWhitecxx . . $ BoardWindow#myColorIsWhite. = false; |
| 57 | } |
| 58 | else |
| 59 | { |
| 60 | myColorIsBlackcxx . . $ BoardWindow#myColorIsBlack. = iAmBlack; |
| 61 | myColorIsWhitecxx . . $ BoardWindow#myColorIsWhite. = iAmWhite; |
| 62 | } |
| 63 | |
| 64 | gamePhasecxx . . $ BoardWindow#gamePhase. = phaseInitcxx . . $ phaseInit.; |
| 65 | |
| 66 | //Creates the game tree |
| 67 | treecxx . . $ BoardWindow#tree. = new Treecxx . . $ Tree#Tree(43c79ee2f1b9aefe).(boardSizecxx . . $ BoardWindow#boardSize., gameDatacxx . . $ BoardWindow#gameData.->komicxx . . $ GameData#komi.); |
| 68 | |
| 69 | //Loads the sgf file if any |
| 70 | if (! gameDatacxx . . $ BoardWindow#gameData.->fileNamecxx . . $ GameData#fileName..isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).()) |
| 71 | treecxx . . $ BoardWindow#tree.->importSGFFilecxx . . $ Tree#importSGFFile(7dc6c9a0b6a7270f).(gameDatacxx . . $ QString#QString(132dd6869045752b).->fileNamecxx . . $ GameData#fileName.); |
| 72 | |
| 73 | QSettingscxx . . $ QSettings# settingscxx . . $ QSettings#QSettings(749de1b6ae65bddd).; |
| 74 | uicxx . . $ BoardWindow#ui.->actionWhatsThiscxx . . $ Ui_BoardWindow#actionWhatsThis. = QWhatsThiscxx . . $ QWhatsThis#::createActioncxx . . $ QWhatsThis#createAction(e501fd04705732bd). (); |
| 75 | |
| 76 | moveNumLabelcxx . . $ BoardWindow#moveNumLabel. = new QLabelcxx . . $ QLabel#QLabel(872e7b0c281abd8d).(uicxx . . $ BoardWindow#ui.->statusbarcxx . . $ Ui_BoardWindow#statusbar.); |
| 77 | komiLabelcxx . . $ BoardWindow#komiLabel. = new QLabelcxx . . $ QLabel#QLabel(872e7b0c281abd8d).(uicxx . . $ BoardWindow#ui.->statusbarcxx . . $ Ui_BoardWindow#statusbar.); |
| 78 | buyoyomiLabelcxx . . $ BoardWindow#buyoyomiLabel. = new QLabelcxx . . $ QLabel#QLabel(872e7b0c281abd8d).(uicxx . . $ BoardWindow#ui.->statusbarcxx . . $ Ui_BoardWindow#statusbar.); |
| 79 | handicapLabelcxx . . $ BoardWindow#handicapLabel. = new QLabelcxx . . $ QLabel#QLabel(872e7b0c281abd8d).(uicxx . . $ BoardWindow#ui.->statusbarcxx . . $ Ui_BoardWindow#statusbar.); |
| 80 | freeratedLabelcxx . . $ BoardWindow#freeratedLabel. = new QLabelcxx . . $ QLabel#QLabel(872e7b0c281abd8d).(uicxx . . $ BoardWindow#ui.->statusbarcxx . . $ Ui_BoardWindow#statusbar.); |
| 81 | uicxx . . $ BoardWindow#ui.->statusbarcxx . . $ Ui_BoardWindow#statusbar.->addPermanentWidgetcxx . . $ QStatusBar#addPermanentWidget(156e3b1c1bd4a3d5).(moveNumLabelcxx . . $ BoardWindow#moveNumLabel.); |
| 82 | uicxx . . $ BoardWindow#ui.->statusbarcxx . . $ Ui_BoardWindow#statusbar.->addPermanentWidgetcxx . . $ QStatusBar#addPermanentWidget(156e3b1c1bd4a3d5).(handicapLabelcxx . . $ BoardWindow#handicapLabel.); |
| 83 | uicxx . . $ BoardWindow#ui.->statusbarcxx . . $ Ui_BoardWindow#statusbar.->addPermanentWidgetcxx . . $ QStatusBar#addPermanentWidget(156e3b1c1bd4a3d5).(komiLabelcxx . . $ BoardWindow#komiLabel.); |
| 84 | uicxx . . $ BoardWindow#ui.->statusbarcxx . . $ Ui_BoardWindow#statusbar.->addPermanentWidgetcxx . . $ QStatusBar#addPermanentWidget(156e3b1c1bd4a3d5).(buyoyomiLabelcxx . . $ BoardWindow#buyoyomiLabel.); |
| 85 | uicxx . . $ BoardWindow#ui.->statusbarcxx . . $ Ui_BoardWindow#statusbar.->addPermanentWidgetcxx . . $ QStatusBar#addPermanentWidget(156e3b1c1bd4a3d5).(freeratedLabelcxx . . $ BoardWindow#freeratedLabel.); |
| 86 | |
| 87 | // Initialises the buttons and else |
| 88 | editButtonscxx . . $ BoardWindow#editButtons. = new QButtonGroupcxx . . $ QButtonGroup#QButtonGroup(749de1b6ae65bddd).(this); |
| 89 | editButtonscxx . . $ BoardWindow#editButtons.->addButtoncxx . . $ QButtonGroup#addButton(9334d3adfa4cecff).(uicxx . . $ BoardWindow#ui.->stoneButtoncxx . . $ Ui_BoardWindow#stoneButton., 0); |
| 90 | editButtonscxx . . $ BoardWindow#editButtons.->addButtoncxx . . $ QButtonGroup#addButton(9334d3adfa4cecff).(uicxx . . $ BoardWindow#ui.->squareButtoncxx . . $ Ui_BoardWindow#squareButton., 1); |
| 91 | editButtonscxx . . $ BoardWindow#editButtons.->addButtoncxx . . $ QButtonGroup#addButton(9334d3adfa4cecff).(uicxx . . $ BoardWindow#ui.->circleButtoncxx . . $ Ui_BoardWindow#circleButton., 2); |
| 92 | editButtonscxx . . $ BoardWindow#editButtons.->addButtoncxx . . $ QButtonGroup#addButton(9334d3adfa4cecff).(uicxx . . $ BoardWindow#ui.->triangleButtoncxx . . $ Ui_BoardWindow#triangleButton., 3); |
| 93 | editButtonscxx . . $ BoardWindow#editButtons.->addButtoncxx . . $ QButtonGroup#addButton(9334d3adfa4cecff).(uicxx . . $ BoardWindow#ui.->crossButtoncxx . . $ Ui_BoardWindow#crossButton., 4); |
| 94 | editButtonscxx . . $ BoardWindow#editButtons.->addButtoncxx . . $ QButtonGroup#addButton(9334d3adfa4cecff).(uicxx . . $ BoardWindow#ui.->labelLetterButtoncxx . . $ Ui_BoardWindow#labelLetterButton., 5); |
| 95 | editButtonscxx . . $ BoardWindow#editButtons.->addButtoncxx . . $ QButtonGroup#addButton(9334d3adfa4cecff).(uicxx . . $ BoardWindow#ui.->labelNumberButtoncxx . . $ Ui_BoardWindow#labelNumberButton., 6); |
| 96 | editButtonscxx . . $ BoardWindow#editButtons.->addButtoncxx . . $ QButtonGroup#addButton(9334d3adfa4cecff).(uicxx . . $ BoardWindow#ui.->colorButtoncxx . . $ Ui_BoardWindow#colorButton., 7); |
| 97 | editButtonscxx . . $ BoardWindow#editButtons.->setExclusivecxx . . $ QButtonGroup#setExclusive(b45ddcbc8423892c).(false); |
| 98 | |
| 99 | |
| 100 | QMenucxx . . $ QMenu# *menu = new QMenucxx . . $ QMenu#QMenu(108f35f7aa7f3cf9).(); |
| 101 | // menu->insertAction(0,ui->fileExportASCII); |
| 102 | menu->insertActioncxx . . $ QWidget#insertAction(c5438a09579c6160).(0,uicxx . . $ BoardWindow#ui.->actionExportSgfClipBcxx . . $ Ui_BoardWindow#actionExportSgfClipB.); |
| 103 | menu->insertActioncxx . . $ QWidget#insertAction(c5438a09579c6160).(0,uicxx . . $ BoardWindow#ui.->actionExportPiccxx . . $ Ui_BoardWindow#actionExportPic.); |
| 104 | menu->insertActioncxx . . $ QWidget#insertAction(c5438a09579c6160).(0,uicxx . . $ BoardWindow#ui.->actionExportPicClipBcxx . . $ Ui_BoardWindow#actionExportPicClipB.); |
| 105 | |
| 106 | uicxx . . $ BoardWindow#ui.->actionExportcxx . . $ Ui_BoardWindow#actionExport.->setMenucxx . . $ QAction#setMenu(cb52c12b49e9b51b).(menu); |
| 107 | |
| 108 | QToolButtoncxx . . $ QToolButton# *exportButton = new QToolButtoncxx . . $ QToolButton#QToolButton(108f35f7aa7f3cf9).(); |
| 109 | exportButton->setDefaultActioncxx . . $ QToolButton#setDefaultAction(92b1e80c0a7f1406).(uicxx . . $ BoardWindow#ui.->actionExportcxx . . $ Ui_BoardWindow#actionExport.); |
| 110 | |
| 111 | exportButton->setPopupModecxx . . $ QToolButton#setPopupMode(13f88d37140350cb).( QToolButtoncxx . . $ QToolButton#::InstantPopupcxx . . $ QToolButton#InstantPopup.); |
| 112 | uicxx . . $ BoardWindow#ui.->toolBarcxx . . $ Ui_BoardWindow#toolBar.->insertWidgetcxx . . $ QToolBar#insertWidget(6c1da7ec9d38f4fe). ( uicxx . . $ BoardWindow#ui.->actionImportcxx . . $ Ui_BoardWindow#actionImport., exportButton ); |
| 113 | |
| 114 | clockDisplaycxx . . $ BoardWindow#clockDisplay. = new ClockDisplaycxx . . $ ClockDisplay#ClockDisplay(be30efc1a567c79b).(this, gameDatacxx . . $ BoardWindow#gameData.->timeSystemcxx . . $ GameData#timeSystem., gameDatacxx . . $ BoardWindow#gameData.->maintimecxx . . $ GameData#maintime., gameDatacxx . . $ BoardWindow#gameData.->stones_periodscxx . . $ GameData#stones_periods., gameDatacxx . . $ BoardWindow#gameData.->periodtimecxx . . $ GameData#periodtime.); |
| 115 | |
| 116 | if(dispatchcxx . . $ BoardWindow#dispatch. && dispatchcxx . . $ BoardWindow#dispatch.->flipCoordscxx . . $ BoardDispatch#flipCoords(c9857a73d68e59ba).()) |
| 117 | uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board.->setCoordTypecxx . . $ Board#setCoordType(5fd3bb02e28546ac).(numberbottomicxx . . $ numberbottomi.); |
| 118 | else |
| 119 | uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board.->setCoordTypecxx . . $ Board#setCoordType(5fd3bb02e28546ac).(numbertopnoicxx . . $ numbertopnoi.); |
| 120 | uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board.->initcxx . . $ Board#init(d4f767463ce0a6b3).(boardSizecxx . . $ BoardWindow#boardSize.); |
| 121 | |
| 122 | setModecxx . . $ BoardWindow#setMode(2246a2660efa2d0b).(gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode.); |
| 123 | updateCaptioncxx . . $ BoardWindow#updateCaption(49f6e7a06ebc5aa8).(); |
| 124 | |
| 125 | int window_x, window_y; |
| 126 | QVariantcxx . . $ QVariant# board_window_size_x = settings.valuecxx . . $ QSettings#value(12a1b1749da49362).("BOARD_WINDOW_SIZE_X"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 127 | if(board_window_size_x !=cxx . . $ QVariant#`operator!=`(d03696648ee9d662). QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).()) |
| 128 | { |
| 129 | window_x = board_window_size_x.toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).(); |
| 130 | window_y = settings.valuecxx . . $ QSettings#value(12a1b1749da49362).("BOARD_WINDOW_SIZE_Y"cxx . . $ QString#QString(85c52e162fed56f9).).toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).(); |
| 131 | resizecxx . . $ QWidget#resize(3e454b8ccf442868).(window_x, window_y); |
| 132 | } |
| 133 | |
| 134 | // Connects the nav buttons to the slots |
| 135 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionNext_movecxx . . $ Ui_BoardWindow#actionNext_move.,&QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c).,treecxx . . $ BoardWindow#tree.,&Treecxx . . $ Tree#::slotNavForwardcxx . . $ Tree#slotNavForward(49f6e7a06ebc5aa8).); |
| 136 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionPrevious_movecxx . . $ Ui_BoardWindow#actionPrevious_move.,&QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c).,treecxx . . $ BoardWindow#tree.,&Treecxx . . $ Tree#::slotNavBackwardcxx . . $ Tree#slotNavBackward(49f6e7a06ebc5aa8).); |
| 137 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionFirst_movecxx . . $ Ui_BoardWindow#actionFirst_move.,&QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c).,treecxx . . $ BoardWindow#tree.,&Treecxx . . $ Tree#::slotNavFirstcxx . . $ Tree#slotNavFirst(49f6e7a06ebc5aa8).); |
| 138 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionLast_movecxx . . $ Ui_BoardWindow#actionLast_move.,&QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c).,treecxx . . $ BoardWindow#tree.,&Treecxx . . $ Tree#::slotNavLastcxx . . $ Tree#slotNavLast(49f6e7a06ebc5aa8).); |
| 139 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionPrevious_variationcxx . . $ Ui_BoardWindow#actionPrevious_variation.,&QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c).,treecxx . . $ BoardWindow#tree.,&Treecxx . . $ Tree#::slotNavPrevVarcxx . . $ Tree#slotNavPrevVar(49f6e7a06ebc5aa8).); |
| 140 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionNext_variationcxx . . $ Ui_BoardWindow#actionNext_variation.,&QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c).,treecxx . . $ BoardWindow#tree.,&Treecxx . . $ Tree#::slotNavNextVarcxx . . $ Tree#slotNavNextVar(49f6e7a06ebc5aa8).); |
| 141 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionFind_movecxx . . $ Ui_BoardWindow#actionFind_move.,&QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c).,this,&BoardWindowcxx . . $ BoardWindow#::slotNavIntersectioncxx . . $ BoardWindow#slotNavIntersection(49f6e7a06ebc5aa8).); |
| 142 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionMain_branchcxx . . $ Ui_BoardWindow#actionMain_branch.,&QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c).,treecxx . . $ BoardWindow#tree.,&Treecxx . . $ Tree#::slotNavMainBranchcxx . . $ Tree#slotNavMainBranch(49f6e7a06ebc5aa8).); |
| 143 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionPrevious_commentcxx . . $ Ui_BoardWindow#actionPrevious_comment.,&QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c).,treecxx . . $ BoardWindow#tree.,&Treecxx . . $ Tree#::slotNavPrevCommentcxx . . $ Tree#slotNavPrevComment(49f6e7a06ebc5aa8).); |
| 144 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionNext_commentcxx . . $ Ui_BoardWindow#actionNext_comment.,&QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c).,treecxx . . $ BoardWindow#tree.,&Treecxx . . $ Tree#::slotNavNextCommentcxx . . $ Tree#slotNavNextComment(49f6e7a06ebc5aa8).); |
| 145 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->slidercxx . . $ Ui_BoardWindow#slider., &QSlidercxx . . $ QSlider#::sliderMovedcxx . . $ QAbstractSlider#sliderMoved(d4f767463ce0a6b3)., treecxx . . $ BoardWindow#tree. , &Treecxx . . $ Tree#::slotNthMovecxx . . $ Tree#slotNthMove(d4f767463ce0a6b3).); |
| 146 | |
| 147 | wheelTimecxx . . $ BoardWindow#wheelTime. =cxx . . $ QTime#`operator=`(370b645f04941e62). QTimecxx . . $ QTime#::currentTimecxx . . $ QTime#currentTime(bd2fc2b92108c576).(); |
| 148 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board., &Boardcxx . . $ Board#::signalWheelEventcxx . . $ Board#signalWheelEvent(92d40974398e4832)., this, &BoardWindowcxx . . $ BoardWindow#::slotWheelEventcxx . . $ BoardWindow#slotWheelEvent(92d40974398e4832).); |
| 149 | |
| 150 | |
| 151 | //Connects the 'edit' buttons to the slots |
| 152 | connectcxx . . $ QObject#connect(835f87066c895669).(editButtonscxx . . $ BoardWindow#editButtons., QOverloadcxx . . $ QOverload#<int>::ofcxx . . $ QOverload#of(adaf930115d2ed26).(&QButtonGroupcxx . . $ QButtonGroup#::buttonPressedcxx . . $ QButtonGroup#buttonPressed(d4f767463ce0a6b3).), this, &BoardWindowcxx . . $ BoardWindow#::slotEditButtonPressedcxx . . $ BoardWindow#slotEditButtonPressed(d4f767463ce0a6b3).); |
| 153 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->deleteButtoncxx . . $ Ui_BoardWindow#deleteButton., &QPushButtoncxx . . $ QPushButton#::pressedcxx . . $ QAbstractButton#pressed(49f6e7a06ebc5aa8)., this, &BoardWindowcxx . . $ BoardWindow#::slotEditDeletecxx . . $ BoardWindow#slotEditDelete(49f6e7a06ebc5aa8).); |
| 154 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionCoordinatescxx . . $ Ui_BoardWindow#actionCoordinates., &QActioncxx . . $ QAction#::toggledcxx . . $ QAction#toggled(b45ddcbc8423892c)., uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board., &Boardcxx . . $ Board#::setShowCoordscxx . . $ Board#setShowCoords(b45ddcbc8423892c).); |
| 155 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionFileSavecxx . . $ Ui_BoardWindow#actionFileSave., &QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c)., this, &BoardWindowcxx . . $ BoardWindow#::slotFileSavecxx . . $ BoardWindow#slotFileSave(c9857a73d68e59ba).); |
| 156 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionFileSaveAscxx . . $ Ui_BoardWindow#actionFileSaveAs., &QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c)., this, &BoardWindowcxx . . $ BoardWindow#::slotFileSaveAscxx . . $ BoardWindow#slotFileSaveAs(c9857a73d68e59ba).); |
| 157 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionExportSgfClipBcxx . . $ Ui_BoardWindow#actionExportSgfClipB., &QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c)., this, &BoardWindowcxx . . $ BoardWindow#::slotExportSGFtoClipBcxx . . $ BoardWindow#slotExportSGFtoClipB(49f6e7a06ebc5aa8).); |
| 158 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionExportPicClipBcxx . . $ Ui_BoardWindow#actionExportPicClipB., &QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c)., this, &BoardWindowcxx . . $ BoardWindow#::slotExportPicClipBcxx . . $ BoardWindow#slotExportPicClipB(49f6e7a06ebc5aa8).); |
| 159 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionExportPiccxx . . $ Ui_BoardWindow#actionExportPic., &QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c)., this, &BoardWindowcxx . . $ BoardWindow#::slotExportPiccxx . . $ BoardWindow#slotExportPic(49f6e7a06ebc5aa8).); |
| 160 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionDuplicatecxx . . $ Ui_BoardWindow#actionDuplicate., &QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c)., this, &BoardWindowcxx . . $ BoardWindow#::slotDuplicatecxx . . $ BoardWindow#slotDuplicate(49f6e7a06ebc5aa8).); |
| 161 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionGameInfocxx . . $ Ui_BoardWindow#actionGameInfo., &QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c)., this, &BoardWindowcxx . . $ BoardWindow#::slotGameInfocxx . . $ BoardWindow#slotGameInfo(b45ddcbc8423892c).); |
| 162 | |
| 163 | connectcxx . . $ QObject#connect(835f87066c895669).(treecxx . . $ BoardWindow#tree., &Treecxx . . $ Tree#::currentMoveChangedcxx . . $ Tree#currentMoveChanged(490cd2a4f5caa810)., this, &BoardWindowcxx . . $ BoardWindow#::updateMovecxx . . $ BoardWindow#updateMove(490cd2a4f5caa810).); |
| 164 | connectcxx . . $ QObject#connect(835f87066c895669).(treecxx . . $ BoardWindow#tree., &Treecxx . . $ Tree#::scoreChangedcxx . . $ Tree#scoreChanged(4df37d5d0c1dcce)., this, &BoardWindowcxx . . $ BoardWindow#::slotGetScorecxx . . $ BoardWindow#slotGetScore(4df37d5d0c1dcce).); |
| 165 | |
| 166 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->buttonModeEditcxx . . $ Ui_BoardWindow#buttonModeEdit., &QPushButtoncxx . . $ QPushButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &BoardWindowcxx . . $ BoardWindow#::switchToEditModecxx . . $ BoardWindow#switchToEditMode(49f6e7a06ebc5aa8).); |
| 167 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->buttonModeLocalcxx . . $ Ui_BoardWindow#buttonModeLocal., &QPushButtoncxx . . $ QPushButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &BoardWindowcxx . . $ BoardWindow#::switchToLocalModecxx . . $ BoardWindow#switchToLocalMode(49f6e7a06ebc5aa8).); |
| 168 | |
| 169 | uicxx . . $ BoardWindow#ui.->insertMoveButtoncxx . . $ Ui_BoardWindow#insertMoveButton.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(false); |
| 170 | uicxx . . $ BoardWindow#ui.->insertMoveButtoncxx . . $ Ui_BoardWindow#insertMoveButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeEditcxx . . $ modeEdit.); |
| 171 | if(gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeMatchcxx . . $ modeMatch. /* or teaching? */ && dispatchcxx . . $ BoardWindow#dispatch. && dispatchcxx . . $ BoardWindow#dispatch.->supportsAddTimecxx . . $ BoardDispatch#supportsAddTime(c9857a73d68e59ba).()) |
| 172 | { |
| 173 | addtime_menucxx . . $ BoardWindow#addtime_menu. = new QMenucxx . . $ QMenu#QMenu(108f35f7aa7f3cf9).(); |
| 174 | QActioncxx . . $ QAction# * act = addtime_menucxx . . $ BoardWindow#addtime_menu.->addActioncxx . . $ QMenu#addAction(1ad47f6a39234f8e).(trcxx . . $ BoardWindow#tr(75d9f1c324b4579d).("Add 1 min")); |
| 175 | act->setDatacxx . . $ QAction#setData(244511558b20107a).(1cxx . . $ QVariant#QVariant(d4f767463ce0a6b3).); |
| 176 | act = addtime_menucxx . . $ BoardWindow#addtime_menu.->addActioncxx . . $ QMenu#addAction(1ad47f6a39234f8e).(trcxx . . $ BoardWindow#tr(75d9f1c324b4579d).("Add 5 min")); |
| 177 | act->setDatacxx . . $ QAction#setData(244511558b20107a).(5cxx . . $ QVariant#QVariant(d4f767463ce0a6b3).); |
| 178 | act = addtime_menucxx . . $ BoardWindow#addtime_menu.->addActioncxx . . $ QMenu#addAction(1ad47f6a39234f8e).(trcxx . . $ BoardWindow#tr(75d9f1c324b4579d).("Add 10 min")); |
| 179 | act->setDatacxx . . $ QAction#setData(244511558b20107a).(10cxx . . $ QVariant#QVariant(d4f767463ce0a6b3).); |
| 180 | act = addtime_menucxx . . $ BoardWindow#addtime_menu.->addActioncxx . . $ QMenu#addAction(1ad47f6a39234f8e).(trcxx . . $ BoardWindow#tr(75d9f1c324b4579d).("Add 60 min")); |
| 181 | act->setDatacxx . . $ QAction#setData(244511558b20107a).(60cxx . . $ QVariant#QVariant(d4f767463ce0a6b3).); |
| 182 | act = addtime_menucxx . . $ BoardWindow#addtime_menu.->addActioncxx . . $ QMenu#addAction(1ad47f6a39234f8e).(trcxx . . $ BoardWindow#tr(75d9f1c324b4579d).("Cancel")); |
| 183 | act->setDatacxx . . $ QAction#setData(244511558b20107a).(-cxx . . $ QVariant#QVariant(d4f767463ce0a6b3).1); |
| 184 | |
| 185 | /* Right now, IGS is the only server with addtime, but if nigiri is done in another order |
| 186 | * this will have to be moved elsewhere: */ |
| 187 | if(!gameDatacxx . . $ BoardWindow#gameData.->nigiriToBeSettledcxx . . $ GameData#nigiriToBeSettled.) |
| 188 | { |
| 189 | if(myColorIsBlackcxx . . $ BoardWindow#myColorIsBlack.) |
| 190 | { |
| 191 | uicxx . . $ BoardWindow#ui.->pb_timeWhitecxx . . $ Ui_BoardWindow#pb_timeWhite.->setMenucxx . . $ QPushButton#setMenu(cb52c12b49e9b51b).(addtime_menucxx . . $ BoardWindow#addtime_menu.); |
| 192 | } |
| 193 | else if(myColorIsWhitecxx . . $ BoardWindow#myColorIsWhite.) |
| 194 | { |
| 195 | uicxx . . $ BoardWindow#ui.->pb_timeBlackcxx . . $ Ui_BoardWindow#pb_timeBlack.->setMenucxx . . $ QPushButton#setMenu(cb52c12b49e9b51b).(addtime_menucxx . . $ BoardWindow#addtime_menu.); |
| 196 | } |
| 197 | else |
| 198 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!("Warning: Nigiri settled in match mode but player has no color"); |
| 199 | connectcxx . . $ QObject#connect(835f87066c895669).(addtime_menucxx . . $ BoardWindow#addtime_menu., &QMenucxx . . $ QMenu#::triggeredcxx . . $ QMenu#triggered(92b1e80c0a7f1406)., this, &BoardWindowcxx . . $ BoardWindow#::slot_addtime_menucxx . . $ BoardWindow#slot_addtime_menu(92b1e80c0a7f1406).); |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | //connects the comments and edit line to the slots |
| 204 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->commentEditcxx . . $ Ui_BoardWindow#commentEdit., &QTextEditcxx . . $ QTextEdit#::textChangedcxx . . $ QTextEdit#textChanged(49f6e7a06ebc5aa8)., this, &BoardWindowcxx . . $ BoardWindow#::slotUpdateCommentcxx . . $ BoardWindow#slotUpdateComment(49f6e7a06ebc5aa8).); |
| 205 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->commentEdit2cxx . . $ Ui_BoardWindow#commentEdit2., &QLineEditcxx . . $ QLineEdit#::returnPressedcxx . . $ QLineEdit#returnPressed(49f6e7a06ebc5aa8)., this, &BoardWindowcxx . . $ BoardWindow#::slotSendCommentcxx . . $ BoardWindow#slotSendComment(49f6e7a06ebc5aa8).); |
| 206 | |
| 207 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->computerBlackcxx . . $ Ui_BoardWindow#computerBlack., &QCheckBoxcxx . . $ QCheckBox#::toggledcxx . . $ QAbstractButton#toggled(b45ddcbc8423892c).,this,&BoardWindowcxx . . $ BoardWindow#::setComputerBlackcxx . . $ BoardWindow#setComputerBlack(b45ddcbc8423892c).); |
| 208 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->computerWhitecxx . . $ Ui_BoardWindow#computerWhite., &QCheckBoxcxx . . $ QCheckBox#::toggledcxx . . $ QAbstractButton#toggled(b45ddcbc8423892c)., this, &BoardWindowcxx . . $ BoardWindow#::setComputerWhitecxx . . $ BoardWindow#setComputerWhite(b45ddcbc8423892c).); |
| 209 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->computerMakeMovecxx . . $ Ui_BoardWindow#computerMakeMove., &QPushButtoncxx . . $ QPushButton#::clickedcxx . . $ QAbstractButton#clicked(b45ddcbc8423892c)., this, &BoardWindowcxx . . $ BoardWindow#::requestComputerMovecxx . . $ BoardWindow#requestComputerMove(49f6e7a06ebc5aa8).); |
| 210 | uicxx . . $ BoardWindow#ui.->computerControlsWidgetcxx . . $ Ui_BoardWindow#computerControlsWidget.->setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeLocalcxx . . $ modeLocal.); |
| 211 | |
| 212 | if ((gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeLocalcxx . . $ modeLocal.) || (gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeEditcxx . . $ modeEdit.)) |
| 213 | { |
| 214 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->blackNamecxx . . $ Ui_BoardWindow#blackName., &QLineEditcxx . . $ QLineEdit#::textChangedcxx . . $ QLineEdit#textChanged(3520e46b33348bf6)., this, &BoardWindowcxx . . $ BoardWindow#::setBlackNamecxx . . $ BoardWindow#setBlackName(7df51288a9ebd664).); |
| 215 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->whiteNamecxx . . $ Ui_BoardWindow#whiteName., &QLineEditcxx . . $ QLineEdit#::textChangedcxx . . $ QLineEdit#textChanged(3520e46b33348bf6)., this, &BoardWindowcxx . . $ BoardWindow#::setWhiteNamecxx . . $ BoardWindow#setWhiteName(7df51288a9ebd664).); |
| 216 | uicxx . . $ BoardWindow#ui.->blackNamecxx . . $ Ui_BoardWindow#blackName.->setReadOnlycxx . . $ QLineEdit#setReadOnly(b45ddcbc8423892c).(false); |
| 217 | uicxx . . $ BoardWindow#ui.->whiteNamecxx . . $ Ui_BoardWindow#whiteName.->setReadOnlycxx . . $ QLineEdit#setReadOnly(b45ddcbc8423892c).(false); |
| 218 | } |
| 219 | |
| 220 | //creates the board interface (or proxy) that will handle the moves an command requests |
| 221 | switch (gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode.) |
| 222 | { |
| 223 | case modeEditcxx . . $ modeEdit. : |
| 224 | case modeLocalcxx . . $ modeLocal. : |
| 225 | qgoboardcxx . . $ BoardWindow#qgoboard. = new qGoBoardLocalInterfacecxx . . $ qGoBoardLocalInterface#(this, treecxx . . $ BoardWindow#tree.,gameDatacxx . . $ BoardWindow#gameData.); |
| 226 | uicxx . . $ BoardWindow#ui.->computerBlackcxx . . $ Ui_BoardWindow#computerBlack.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(!iAmBlack); |
| 227 | uicxx . . $ BoardWindow#ui.->computerWhitecxx . . $ Ui_BoardWindow#computerWhite.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(!iAmWhite); |
| 228 | break; |
| 229 | case modeObservecxx . . $ modeObserve. : |
| 230 | qgoboardcxx . . $ BoardWindow#qgoboard. = new qGoBoardObserveInterfacecxx . . $ qGoBoardObserveInterface#(this, treecxx . . $ BoardWindow#tree.,gameDatacxx . . $ BoardWindow#gameData.); |
| 231 | break; |
| 232 | case modeMatchcxx . . $ modeMatch. : |
| 233 | try |
| 234 | { |
| 235 | qgoboardcxx . . $ BoardWindow#qgoboard. = new qGoBoardMatchInterfacecxx . . $ qGoBoardMatchInterface#(this, treecxx . . $ BoardWindow#tree.,gameDatacxx . . $ BoardWindow#gameData.); |
| 236 | } |
| 237 | catch(QStringcxx . . $ QString# errcxx . . $ QString#QString(132dd6869045752b).) |
| 238 | { |
| 239 | QMessageBoxcxx . . $ QMessageBox#::warningcxx . . $ QMessageBox#warning(a9e3742e6f7b4147).(this,QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Error"), err); |
| 240 | return; |
| 241 | } |
| 242 | break; |
| 243 | |
| 244 | case modeReviewcxx . . $ modeReview. : |
| 245 | qgoboardcxx . . $ BoardWindow#qgoboard. = new qGoBoardReviewInterfacecxx . . $ qGoBoardReviewInterface#(this, treecxx . . $ BoardWindow#tree.,gameDatacxx . . $ BoardWindow#gameData.); |
| 246 | break; |
| 247 | |
| 248 | default: |
| 249 | break; |
| 250 | } |
| 251 | if (gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeLocalcxx . . $ modeLocal.) |
| 252 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->insertMoveButtoncxx . . $ Ui_BoardWindow#insertMoveButton., &QPushButtoncxx . . $ QPushButton#::toggledcxx . . $ QAbstractButton#toggled(b45ddcbc8423892c)., static_cast<qGoBoardLocalInterfacecxx . . $ qGoBoardLocalInterface#*>(qgoboardcxx . . $ BoardWindow#qgoboard.), &qGoBoardLocalInterfacecxx . . $ qGoBoardLocalInterface#::slotToggleInsertStonescxx . . $ qGoBoardLocalInterface#slotToggleInsertStones(b45ddcbc8423892c).); |
| 253 | //make sure to set the sound button to the proper state before anything |
| 254 | uicxx . . $ BoardWindow#ui.->actionSoundcxx . . $ Ui_BoardWindow#actionSound.->setCheckedcxx . . $ QAction#setChecked(b45ddcbc8423892c).(qgoboardcxx . . $ BoardWindow#qgoboard.->getPlaySoundcxx . . $ qGoBoard#getPlaySound(c9857a73d68e59ba).()); |
| 255 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->actionSoundcxx . . $ Ui_BoardWindow#actionSound., &QActioncxx . . $ QAction#::toggledcxx . . $ QAction#toggled(b45ddcbc8423892c)., qgoboardcxx . . $ BoardWindow#qgoboard., &qGoBoardcxx . . $ qGoBoard#::setPlaySoundcxx . . $ qGoBoard#setPlaySound(b45ddcbc8423892c).); |
| 256 | |
| 257 | //Connects the board to the interface and boardhandler |
| 258 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board., &Boardcxx . . $ Board#::signalClickedcxx . . $ Board#signalClicked(916cfd9b6aad83bf)., qgoboardcxx . . $ BoardWindow#qgoboard., &qGoBoardcxx . . $ qGoBoard#::slotBoardClickedcxx . . $ qGoBoard#slotBoardClicked(916cfd9b6aad83bf).); |
| 259 | |
| 260 | //Connects the game buttons to the slots |
| 261 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->passButtoncxx . . $ Ui_BoardWindow#passButton., &QPushButtoncxx . . $ QPushButton#::pressedcxx . . $ QAbstractButton#pressed(49f6e7a06ebc5aa8)., qgoboardcxx . . $ BoardWindow#qgoboard., &qGoBoardcxx . . $ qGoBoard#::passRequestcxx . . $ qGoBoard#passRequest(49f6e7a06ebc5aa8).); |
| 262 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->passButton_2cxx . . $ Ui_BoardWindow#passButton_2., &QPushButtoncxx . . $ QPushButton#::pressedcxx . . $ QAbstractButton#pressed(49f6e7a06ebc5aa8)., qgoboardcxx . . $ BoardWindow#qgoboard., &qGoBoardcxx . . $ qGoBoard#::passRequestcxx . . $ qGoBoard#passRequest(49f6e7a06ebc5aa8).); |
| 263 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->scoreButtoncxx . . $ Ui_BoardWindow#scoreButton., &QPushButtoncxx . . $ QPushButton#::toggledcxx . . $ QAbstractButton#toggled(b45ddcbc8423892c)., qgoboardcxx . . $ BoardWindow#qgoboard., &qGoBoardcxx . . $ qGoBoard#::slotScoreToggledcxx . . $ qGoBoard#slotScoreToggled(b45ddcbc8423892c).); |
| 264 | |
| 265 | |
| 266 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->doneButtoncxx . . $ Ui_BoardWindow#doneButton., &QPushButtoncxx . . $ QPushButton#::pressedcxx . . $ QAbstractButton#pressed(49f6e7a06ebc5aa8)., qgoboardcxx . . $ BoardWindow#qgoboard., &qGoBoardcxx . . $ qGoBoard#::slotDonePressedcxx . . $ qGoBoard#slotDonePressed(49f6e7a06ebc5aa8).); |
| 267 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->reviewButtoncxx . . $ Ui_BoardWindow#reviewButton., &QPushButtoncxx . . $ QPushButton#::pressedcxx . . $ QAbstractButton#pressed(49f6e7a06ebc5aa8)., qgoboardcxx . . $ BoardWindow#qgoboard., &qGoBoardcxx . . $ qGoBoard#::slotReviewPressedcxx . . $ qGoBoard#slotReviewPressed(49f6e7a06ebc5aa8).); |
| 268 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton., &QPushButtoncxx . . $ QPushButton#::pressedcxx . . $ QAbstractButton#pressed(49f6e7a06ebc5aa8)., qgoboardcxx . . $ BoardWindow#qgoboard., &qGoBoardcxx . . $ qGoBoard#::slotUndoPressedcxx . . $ qGoBoard#slotUndoPressed(49f6e7a06ebc5aa8).); |
| 269 | |
| 270 | // Why is this conditional? FIXME |
| 271 | if (gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeMatchcxx . . $ modeMatch. || gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeLocalcxx . . $ modeLocal. || gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeEditcxx . . $ modeEdit.) |
| 272 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->resignButtoncxx . . $ Ui_BoardWindow#resignButton., &QPushButtoncxx . . $ QPushButton#::pressedcxx . . $ QAbstractButton#pressed(49f6e7a06ebc5aa8)., qgoboardcxx . . $ BoardWindow#qgoboard., &qGoBoardcxx . . $ qGoBoard#::slotResignPressedcxx . . $ qGoBoard#slotResignPressed(49f6e7a06ebc5aa8).); |
| 273 | |
| 274 | if(gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeMatchcxx . . $ modeMatch.) |
| 275 | { |
| 276 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->adjournButtoncxx . . $ Ui_BoardWindow#adjournButton., &QPushButtoncxx . . $ QPushButton#::pressedcxx . . $ QAbstractButton#pressed(49f6e7a06ebc5aa8)., static_cast<qGoBoardNetworkInterfacecxx . . $ qGoBoardNetworkInterface#*>(qgoboardcxx . . $ BoardWindow#qgoboard.), &qGoBoardNetworkInterfacecxx . . $ qGoBoardNetworkInterface#::slotAdjournPressedcxx . . $ qGoBoardNetworkInterface#slotAdjournPressed(49f6e7a06ebc5aa8).); |
| 277 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->countButtoncxx . . $ Ui_BoardWindow#countButton., &QPushButtoncxx . . $ QPushButton#::pressedcxx . . $ QAbstractButton#pressed(49f6e7a06ebc5aa8)., qgoboardcxx . . $ BoardWindow#qgoboard., &qGoBoardcxx . . $ qGoBoard#::slotCountPressedcxx . . $ qGoBoard#slotCountPressed(49f6e7a06ebc5aa8).); |
| 278 | connectcxx . . $ QObject#connect(835f87066c895669).(uicxx . . $ BoardWindow#ui.->drawButtoncxx . . $ Ui_BoardWindow#drawButton., &QPushButtoncxx . . $ QPushButton#::pressedcxx . . $ QAbstractButton#pressed(49f6e7a06ebc5aa8)., qgoboardcxx . . $ BoardWindow#qgoboard., &qGoBoardcxx . . $ qGoBoard#::slotDrawPressedcxx . . $ qGoBoard#slotDrawPressed(49f6e7a06ebc5aa8).); |
| 279 | } else { |
| 280 | uicxx . . $ BoardWindow#ui.->adjournButtoncxx . . $ Ui_BoardWindow#adjournButton.->hidecxx . . $ QWidget#hide(49f6e7a06ebc5aa8).(); |
| 281 | uicxx . . $ BoardWindow#ui.->countButtoncxx . . $ Ui_BoardWindow#countButton.->hidecxx . . $ QWidget#hide(49f6e7a06ebc5aa8).(); |
| 282 | uicxx . . $ BoardWindow#ui.->drawButtoncxx . . $ Ui_BoardWindow#drawButton.->hidecxx . . $ QWidget#hide(49f6e7a06ebc5aa8).(); |
| 283 | } |
| 284 | if(dispatchcxx . . $ BoardWindow#dispatch. && !dispatchcxx . . $ BoardWindow#dispatch.->supportsRequestAdjourncxx . . $ BoardDispatch#supportsRequestAdjourn(c9857a73d68e59ba).()) |
| 285 | uicxx . . $ BoardWindow#ui.->adjournButtoncxx . . $ Ui_BoardWindow#adjournButton.->hidecxx . . $ QWidget#hide(49f6e7a06ebc5aa8).(); |
| 286 | if(dispatchcxx . . $ BoardWindow#dispatch. && !dispatchcxx . . $ BoardWindow#dispatch.->supportsRequestCountcxx . . $ BoardDispatch#supportsRequestCount(c9857a73d68e59ba).()) |
| 287 | uicxx . . $ BoardWindow#ui.->countButtoncxx . . $ Ui_BoardWindow#countButton.->hidecxx . . $ QWidget#hide(49f6e7a06ebc5aa8).(); |
| 288 | if(dispatchcxx . . $ BoardWindow#dispatch. && !dispatchcxx . . $ BoardWindow#dispatch.->supportsRequestDrawcxx . . $ BoardDispatch#supportsRequestDraw(c9857a73d68e59ba).()) |
| 289 | uicxx . . $ BoardWindow#ui.->drawButtoncxx . . $ Ui_BoardWindow#drawButton.->hidecxx . . $ QWidget#hide(49f6e7a06ebc5aa8).(); |
| 290 | |
| 291 | setGamePhasecxx . . $ BoardWindow#setGamePhase(6ad67d8601499648).(phaseOngoingcxx . . $ phaseOngoing.); |
| 292 | showcxx . . $ QWidget#show(49f6e7a06ebc5aa8).(); |
| 293 | checkHideToolbarcxx . . $ BoardWindow#checkHideToolbar(d4f767463ce0a6b3).(heightcxx . . $ QWidget#height(455f465bc33b4cdf).()); |
| 294 | setFocuscxx . . $ QWidget#setFocus(49f6e7a06ebc5aa8).(); |
| 295 | |
| 296 | //update(); |
| 297 | //gridLayout->update(); |
| 298 | |
| 299 | if(gameDatacxx . . $ BoardWindow#gameData.->record_sgfcxx . . $ GameData#record_sgf. !=cxx . . $ `operator!=`(5bc2975d2d751687). QStringcxx . . $ QString#QString(ced63f7c635d850d).()) |
| 300 | treecxx . . $ BoardWindow#tree.->importSGFStringcxx . . $ Tree#importSGFString(7dc6c9a0b6a7270f).(gameDatacxx . . $ QString#QString(132dd6869045752b).->record_sgfcxx . . $ GameData#record_sgf.); |
| 301 | } |
| 302 | |
| 303 | BoardWindowcxx . . $ BoardWindow#::~cxx . . $ BoardWindow#`~BoardWindow`(ced63f7c635d850d).BoardWindowcxx . . $ BoardWindow#() |
| 304 | { |
| 305 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!("Deleting BoardWindow\n"); |
| 306 | QSettingscxx . . $ QSettings# settingscxx . . $ QSettings#QSettings(749de1b6ae65bddd).; |
| 307 | |
| 308 | settings.setValuecxx . . $ QSettings#setValue(1c60a90c724e6bfb).("BOARD_WINDOW_SIZE_X"cxx . . $ QString#QString(85c52e162fed56f9)., widthcxx . . $ QVariant#QVariant(d4f767463ce0a6b3).()); |
| 309 | settings.setValuecxx . . $ QSettings#setValue(1c60a90c724e6bfb).("BOARD_WINDOW_SIZE_Y"cxx . . $ QString#QString(85c52e162fed56f9)., heightcxx . . $ QVariant#QVariant(d4f767463ce0a6b3).()); |
| 310 | // settings.setValue("BOARD_SIZES", ui->boardSplitter->saveState()); |
| 311 | |
| 312 | delete treecxx . . $ BoardWindow#tree.; //okay? |
| 313 | |
| 314 | delete gameDatacxx . . $ BoardWindow#gameData.; |
| 315 | delete addtime_menucxx . . $ BoardWindow#addtime_menu.; |
| 316 | } |
| 317 | |
| 318 | bool BoardWindowcxx . . $ BoardWindow#::okayToQuitcxx . . $ BoardWindow#okayToQuit(c9857a73d68e59ba).(void) |
| 319 | { |
| 320 | if (!qgoboardcxx . . $ BoardWindow#qgoboard.->getModifiedcxx . . $ qGoBoard#getModified(c9857a73d68e59ba).()) |
| 321 | return true; |
| 322 | |
| 323 | switch (QMessageBoxcxx . . $ QMessageBox#::warningcxx . . $ QMessageBox#warning(a9e3742e6f7b4147).(this, PACKAGEcxx . . $ `src/defines.h:32:9`!, |
| 324 | trcxx . . $ BoardWindow#tr(75d9f1c324b4579d).("You modified the game.\nDo you want to save your changes?"), |
| 325 | QMessageBoxcxx . . $ QMessageBox#::Savecxx . . $ QMessageBox#Save. |cxx . . $ `operator|`(67530149e923fc12). QMessageBoxcxx . . $ QMessageBox#::Discardcxx . . $ QMessageBox#Discard. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QMessageBoxcxx . . $ QMessageBox#::Cancelcxx . . $ QMessageBox#Cancel. , QMessageBoxcxx . . $ QMessageBox#::Cancelcxx . . $ QMessageBox#Cancel.)) |
| 326 | { |
| 327 | case QMessageBoxcxx . . $ QMessageBox#::Savecxx . . $ QMessageBox#Save.: |
| 328 | return slotFileSavecxx . . $ BoardWindow#slotFileSave(c9857a73d68e59ba).() && !qgoboardcxx . . $ BoardWindow#qgoboard.->getModifiedcxx . . $ qGoBoard#getModified(c9857a73d68e59ba).(); |
| 329 | case QMessageBoxcxx . . $ QMessageBox#::Discardcxx . . $ QMessageBox#Discard.: |
| 330 | return true; |
| 331 | case QMessageBoxcxx . . $ QMessageBox#::Cancelcxx . . $ QMessageBox#Cancel.: |
| 332 | return false; |
| 333 | default: |
| 334 | return true; |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | /* FIXME make sure closeEvent doesn't get called on delete */ |
| 339 | void BoardWindowcxx . . $ BoardWindow#::closeEventcxx . . $ BoardWindow#closeEvent(642e80679aeb34f8).(QCloseEventcxx . . $ QCloseEvent# *e) |
| 340 | { |
| 341 | if(dispatchcxx . . $ BoardWindow#dispatch. && !dispatchcxx . . $ BoardWindow#dispatch.->canClosecxx . . $ BoardDispatch#canClose(c9857a73d68e59ba).()) |
| 342 | { |
| 343 | e->ignorecxx . . $ QEvent#ignore(49f6e7a06ebc5aa8).(); |
| 344 | } |
| 345 | else if (okayToQuitcxx . . $ BoardWindow#okayToQuit(c9857a73d68e59ba).()) |
| 346 | { |
| 347 | e->acceptcxx . . $ QEvent#accept(49f6e7a06ebc5aa8).(); |
| 348 | if(dispatchcxx . . $ BoardWindow#dispatch.) |
| 349 | { |
| 350 | dispatchcxx . . $ BoardWindow#dispatch.->closeBoardcxx . . $ BoardDispatch#closeBoard(49f6e7a06ebc5aa8).(); |
| 351 | } |
| 352 | //FIXME delete, make sure there's no canvas destruction |
| 353 | //crashes |
| 354 | deleteLatercxx . . $ QObject#deleteLater(49f6e7a06ebc5aa8).(); |
| 355 | } |
| 356 | else |
| 357 | e->ignorecxx . . $ QEvent#ignore(49f6e7a06ebc5aa8).(); |
| 358 | } |
| 359 | |
| 360 | void BoardWindowcxx . . $ BoardWindow#::resizeEventcxx . . $ BoardWindow#resizeEvent(eeeec21cf8dc0387).(QResizeEventcxx . . $ QResizeEvent# * e) |
| 361 | { |
| 362 | checkHideToolbarcxx . . $ BoardWindow#checkHideToolbar(d4f767463ce0a6b3).(e->sizecxx . . $ QResizeEvent#size(68bda57ac551785b).().heightcxx . . $ QSize#height(ea6fe5115c70a13f).()); |
| 363 | } |
| 364 | |
| 365 | void BoardWindowcxx . . $ BoardWindow#::checkHideToolbarcxx . . $ BoardWindow#checkHideToolbar(d4f767463ce0a6b3).(int h) |
| 366 | { |
| 367 | uicxx . . $ BoardWindow#ui.->varLabelcxx . . $ Ui_BoardWindow#varLabel.->setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(h > 700); |
| 368 | } |
| 369 | |
| 370 | void BoardWindowcxx . . $ BoardWindow#::gameDataChangedcxx . . $ BoardWindow#gameDataChanged(49f6e7a06ebc5aa8).(void) |
| 371 | { |
| 372 | updateCaptioncxx . . $ BoardWindow#updateCaption(49f6e7a06ebc5aa8).(); |
| 373 | clockDisplaycxx . . $ BoardWindow#clockDisplay.->setTimeSettingscxx . . $ ClockDisplay#setTimeSettings(e8ef19c52b7bfbf3).(gameDatacxx . . $ BoardWindow#gameData.->timeSystemcxx . . $ GameData#timeSystem., gameDatacxx . . $ BoardWindow#gameData.->maintimecxx . . $ GameData#maintime., gameDatacxx . . $ BoardWindow#gameData.->periodtimecxx . . $ GameData#periodtime., gameDatacxx . . $ BoardWindow#gameData.->stones_periodscxx . . $ GameData#stones_periods.); |
| 374 | } |
| 375 | |
| 376 | void BoardWindowcxx . . $ BoardWindow#::swapColorscxx . . $ BoardWindow#swapColors(b45ddcbc8423892c).(bool noswap) |
| 377 | { |
| 378 | if(!noswap) |
| 379 | { |
| 380 | QStringcxx . . $ QString# rankcxx . . $ QString#QString(ced63f7c635d850d)., namecxx . . $ QString#QString(ced63f7c635d850d).; |
| 381 | |
| 382 | name =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). gameDatacxx . . $ BoardWindow#gameData.->black_namecxx . . $ GameData#black_name.; |
| 383 | rank =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). gameDatacxx . . $ BoardWindow#gameData.->black_rankcxx . . $ GameData#black_rank.; |
| 384 | gameDatacxx . . $ BoardWindow#gameData.->black_namecxx . . $ GameData#black_name. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). gameDatacxx . . $ BoardWindow#gameData.->white_namecxx . . $ GameData#white_name.; |
| 385 | gameDatacxx . . $ BoardWindow#gameData.->black_rankcxx . . $ GameData#black_rank. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). gameDatacxx . . $ BoardWindow#gameData.->white_rankcxx . . $ GameData#white_rank.; |
| 386 | gameDatacxx . . $ BoardWindow#gameData.->white_namecxx . . $ GameData#white_name. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). name; |
| 387 | gameDatacxx . . $ BoardWindow#gameData.->white_rankcxx . . $ GameData#white_rank. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). rank; |
| 388 | } |
| 389 | gameDatacxx . . $ BoardWindow#gameData.->nigiriToBeSettledcxx . . $ GameData#nigiriToBeSettled. = false; |
| 390 | |
| 391 | myColorIsBlackcxx . . $ BoardWindow#myColorIsBlack. = (gameDatacxx . . $ BoardWindow#gameData.->black_namecxx . . $ GameData#black_name. ==cxx . . $ `operator==`(5bc2975d2d751687). dispatchcxx . . $ BoardWindow#dispatch.->getUsernamecxx . . $ BoardDispatch#getUsername(4365c3963150523e).()); |
| 392 | myColorIsWhitecxx . . $ BoardWindow#myColorIsWhite. = !myColorIsBlackcxx . . $ BoardWindow#myColorIsBlack.; |
| 393 | |
| 394 | updateCaptioncxx . . $ BoardWindow#updateCaption(49f6e7a06ebc5aa8).(); |
| 395 | updateCursorcxx . . $ BoardWindow#updateCursor(42096433316d3db3).(); |
| 396 | //also need to start any timers if necessary |
| 397 | //also network timers in addition to game timers |
| 398 | } |
| 399 | |
| 400 | void BoardWindowcxx . . $ BoardWindow#::saveRecordToGameDatacxx . . $ BoardWindow#saveRecordToGameData(49f6e7a06ebc5aa8).(void) |
| 401 | { |
| 402 | gameDatacxx . . $ BoardWindow#gameData.->record_sgfcxx . . $ GameData#record_sgf. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). treecxx . . $ BoardWindow#tree.->exportSGFStringcxx . . $ Tree#exportSGFString(9f7deeccc2bc8c97).(gameDatacxx . . $ BoardWindow#gameData.); |
| 403 | } |
| 404 | |
| 405 | /* |
| 406 | * One of the buttons in the 'Edit Tools' frame has been pressed |
| 407 | */ |
| 408 | void BoardWindowcxx . . $ BoardWindow#::slotEditButtonPressedcxx . . $ BoardWindow#slotEditButtonPressed(d4f767463ce0a6b3).( int m ) |
| 409 | { |
| 410 | Movecxx . . $ Move# *current = treecxx . . $ BoardWindow#tree.->getCurrentcxx . . $ Tree#getCurrent(8db4894deadf6b2c).(); |
| 411 | |
| 412 | //we have to emulate exclusive buttons, while raise the button if it was down |
| 413 | if (m >= 0 && m < 7 ) |
| 414 | { |
| 415 | if ( m== editButtonscxx . . $ BoardWindow#editButtons.->checkedIdcxx . . $ QButtonGroup#checkedId(455f465bc33b4cdf).()) |
| 416 | { |
| 417 | // editButtons->button (m)->setChecked( false); |
| 418 | gamePhasecxx . . $ BoardWindow#gamePhase. = phaseOngoingcxx . . $ phaseOngoing.; |
| 419 | updateCursorcxx . . $ BoardWindow#updateCursor(42096433316d3db3).(); |
| 420 | editButtonscxx . . $ BoardWindow#editButtons.->buttoncxx . . $ QButtonGroup#button(afd7295b2ed96dd1). (7)->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).( false); |
| 421 | } |
| 422 | else |
| 423 | { |
| 424 | gamePhasecxx . . $ BoardWindow#gamePhase. = phaseEditcxx . . $ phaseEdit.; |
| 425 | updateCursorcxx . . $ BoardWindow#updateCursor(42096433316d3db3).( ); //this still has turn change FIXME |
| 426 | editButtonscxx . . $ BoardWindow#editButtons.->buttoncxx . . $ QButtonGroup#button(afd7295b2ed96dd1). (7)->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).( true); |
| 427 | |
| 428 | for (int i= 0;i<7;i++) |
| 429 | if (i!=m) |
| 430 | editButtonscxx . . $ BoardWindow#editButtons.->buttoncxx . . $ QButtonGroup#button(afd7295b2ed96dd1). (i)->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).( false); |
| 431 | |
| 432 | } |
| 433 | } |
| 434 | switch(m) |
| 435 | { |
| 436 | case 0: |
| 437 | editMarkcxx . . $ BoardWindow#editMark. = markNonecxx . . $ markNone.; |
| 438 | if(gamePhasecxx . . $ BoardWindow#gamePhase. == phaseEditcxx . . $ phaseEdit.) |
| 439 | current->setGamePhasecxx . . $ Move#setGamePhase(6ad67d8601499648).(phaseEditcxx . . $ phaseEdit.); //permanent on this move, right? |
| 440 | break; |
| 441 | |
| 442 | case 1: |
| 443 | editMarkcxx . . $ BoardWindow#editMark. = markSquarecxx . . $ markSquare.; |
| 444 | break; |
| 445 | |
| 446 | case 2: |
| 447 | editMarkcxx . . $ BoardWindow#editMark. = markCirclecxx . . $ markCircle.; |
| 448 | break; |
| 449 | |
| 450 | case 3: |
| 451 | editMarkcxx . . $ BoardWindow#editMark. = markTrianglecxx . . $ markTriangle.; |
| 452 | break; |
| 453 | |
| 454 | case 4: |
| 455 | editMarkcxx . . $ BoardWindow#editMark. = markCrosscxx . . $ markCross.; |
| 456 | break; |
| 457 | |
| 458 | case 5: |
| 459 | editMarkcxx . . $ BoardWindow#editMark. = markTextcxx . . $ markText.; |
| 460 | break; |
| 461 | |
| 462 | case 6: |
| 463 | editMarkcxx . . $ BoardWindow#editMark. = markNumbercxx . . $ markNumber.; |
| 464 | break; |
| 465 | |
| 466 | case 7: |
| 467 | { |
| 468 | // set next move's color |
| 469 | if (qgoboardcxx . . $ BoardWindow#qgoboard.->getBlackTurncxx . . $ qGoBoard#getBlackTurn(efaadfb7dc14930a).()) |
| 470 | { |
| 471 | current->setPLinfocxx . . $ Move#setPLinfo(42096433316d3db3).(stoneWhitecxx . . $ stoneWhite.); |
| 472 | //#ifndef USE_XPM |
| 473 | // mainWidget->colorButton->setPixmap(QPixmap(ICON_NODE_WHITE)); |
| 474 | //#else |
| 475 | uicxx . . $ BoardWindow#ui.->colorButtoncxx . . $ Ui_BoardWindow#colorButton.->setIconcxx . . $ QAbstractButton#setIcon(71dcdac178620ed6).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/boardicons/resources/pics/stone_white.png"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 476 | updateCursorcxx . . $ BoardWindow#updateCursor(42096433316d3db3).(stoneBlackcxx . . $ stoneBlack.); |
| 477 | //#endif |
| 478 | } |
| 479 | else |
| 480 | { |
| 481 | current->setPLinfocxx . . $ Move#setPLinfo(42096433316d3db3).(stoneBlackcxx . . $ stoneBlack.); |
| 482 | //#ifndef USE_XPM |
| 483 | // mainWidget->colorButton->setPixmap(QPixmap(ICON_NODE_BLACK)); |
| 484 | //#else |
| 485 | uicxx . . $ BoardWindow#ui.->colorButtoncxx . . $ Ui_BoardWindow#colorButton.->setIconcxx . . $ QAbstractButton#setIcon(71dcdac178620ed6).(QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/boardicons/resources/pics/stone_black.png"cxx . . $ QString#QString(85c52e162fed56f9).)); |
| 486 | updateCursorcxx . . $ BoardWindow#updateCursor(42096433316d3db3).(stoneWhitecxx . . $ stoneWhite.); |
| 487 | //#endif |
| 488 | } |
| 489 | // check if set color is natural color: |
| 490 | if ((current->getMoveNumbercxx . . $ Move#getMoveNumber(455f465bc33b4cdf).() == 0 && current->getPLnextMovecxx . . $ Move#getPLnextMove(5202307a42d70465).() == stoneBlackcxx . . $ stoneBlack.) || |
| 491 | (current->getMoveNumbercxx . . $ Move#getMoveNumber(455f465bc33b4cdf).() > 0 && current->getColorcxx . . $ Move#getColor(6680c74b05d375a4).() != current->getPLnextMovecxx . . $ Move#getPLnextMove(5202307a42d70465).())) |
| 492 | current->clearPLinfocxx . . $ Move#clearPLinfo(49f6e7a06ebc5aa8).(); |
| 493 | // board->setCurStoneColor(); |
| 494 | return; |
| 495 | } |
| 496 | |
| 497 | default: |
| 498 | return; |
| 499 | } |
| 500 | |
| 501 | // statusMark->setText(getStatusMarkText(t)); |
| 502 | // board->setMarkType(t); |
| 503 | } |
| 504 | |
| 505 | /* |
| 506 | * button menu 'export to clipboard' activated |
| 507 | */ |
| 508 | void BoardWindowcxx . . $ BoardWindow#::slotExportSGFtoClipBcxx . . $ BoardWindow#slotExportSGFtoClipB(49f6e7a06ebc5aa8).() |
| 509 | { |
| 510 | QStringcxx . . $ QString# str = treecxx . . $ BoardWindow#tree.->exportSGFStringcxx . . $ Tree#exportSGFString(9f7deeccc2bc8c97).(gameDatacxx . . $ BoardWindow#gameData.); |
| 511 | QApplicationcxx . . $ QApplication#::clipboardcxx . . $ QGuiApplication#clipboard(a5a00f8d44f5ac9e).()->setTextcxx . . $ QClipboard#setText(9f492b8a441aa8de).(str); |
| 512 | } |
| 513 | |
| 514 | /* |
| 515 | * button menu 'export picture' activated |
| 516 | */ |
| 517 | void BoardWindowcxx . . $ BoardWindow#::slotExportPiccxx . . $ BoardWindow#slotExportPic(49f6e7a06ebc5aa8).() |
| 518 | { |
| 519 | QStringcxx . . $ QString# *filter = new QStringcxx . . $ QString#QString(ced63f7c635d850d).(); |
| 520 | QStringcxx . . $ QString# fileName = QFileDialogcxx . . $ QFileDialog#::getSaveFileNamecxx . . $ QFileDialog#getSaveFileName(a6b29be4bec65236).(this, |
| 521 | trcxx . . $ BoardWindow#tr(75d9f1c324b4579d).("Export image as"), |
| 522 | QStringcxx . . $ QString#QString(85c52e162fed56f9).(""), |
| 523 | QStringcxx . . $ QString#QString(85c52e162fed56f9).("JPEG (*.jpeg);;PNG (*.png);;BMP (*.bmp);;XPM (*.xpm);;XBM (*.xbm);;PNM (*.pnm);;GIF (*.gif);;MNG (*.mng)"), |
| 524 | filter, QFileDialogcxx . . $ QFlags#QFlags(93d577a3e9528307).::DontUseNativeDialogcxx . . $ QFileDialog#DontUseNativeDialog.); |
| 525 | |
| 526 | |
| 527 | if (fileName.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).()) |
| 528 | return; |
| 529 | |
| 530 | |
| 531 | // Confirm overwriting file. |
| 532 | // if ( QFile::exists( fileName ) ) |
| 533 | // if (QMessageBox::information(this, PACKAGE, |
| 534 | // tr("This file already exists. Do you want to overwrite it?"), |
| 535 | // tr("Yes"), tr("No"), 0, 0, 1) == 1) |
| 536 | // return; |
| 537 | |
| 538 | QStringcxx . . $ QString# ext = "." +cxx . . $ operator+(c75c3ae4eb9af1a8). filter->sectioncxx . . $ QString#section(eae3fc215228815e).(" "cxx . . $ QString#QString(85c52e162fed56f9).,0,0).toLowercxx . . $ QString#toLower(30b3b70527b1c61a).(); |
| 539 | if (!fileName.endsWithcxx . . $ QString#endsWith(8cce4688c16f48f3).(ext)) |
| 540 | fileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(ext); |
| 541 | |
| 542 | uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board.->exportPicturecxx . . $ Board#exportPicture(9753f68407e56b8c).(fileName, new QStringcxx . . $ QString#(filter->sectioncxx . . $ QString#section(eae3fc215228815e).(" "cxx . . $ QString#QString(85c52e162fed56f9).,0,0)), false);//->left(3)); |
| 543 | } |
| 544 | |
| 545 | /* |
| 546 | * button menu 'export picture to clipboard' activated |
| 547 | */ |
| 548 | void BoardWindowcxx . . $ BoardWindow#::slotExportPicClipBcxx . . $ BoardWindow#slotExportPicClipB(49f6e7a06ebc5aa8).() |
| 549 | { |
| 550 | QStringcxx . . $ QString# null = ""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 551 | uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board.->exportPicturecxx . . $ Board#exportPicture(9753f68407e56b8c).(0cxx . . $ QString#QString(85c52e162fed56f9)., 0 , true); |
| 552 | } |
| 553 | |
| 554 | /* |
| 555 | * button 'duplicate board' activated |
| 556 | */ |
| 557 | void BoardWindowcxx . . $ BoardWindow#::slotDuplicatecxx . . $ BoardWindow#slotDuplicate(49f6e7a06ebc5aa8).() |
| 558 | { |
| 559 | saveRecordToGameDatacxx . . $ BoardWindow#saveRecordToGameData(49f6e7a06ebc5aa8).(); |
| 560 | GameDatacxx . . $ GameData# * gd = new GameDatacxx . . $ GameData#(gameDatacxx . . $ BoardWindow#gameData.); |
| 561 | gd->gameModecxx . . $ GameData#gameMode. = modeEditcxx . . $ modeEdit.; |
| 562 | gd->fileNamecxx . . $ GameData#fileName. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 563 | new BoardWindowcxx . . $ BoardWindow#(gd, true, true); |
| 564 | } |
| 565 | |
| 566 | void BoardWindowcxx . . $ BoardWindow#::slotGameInfocxx . . $ BoardWindow#slotGameInfo(b45ddcbc8423892c).(bool /*toggle*/) |
| 567 | { |
| 568 | new GameInfocxx . . $ GameInfo#(this); |
| 569 | } |
| 570 | |
| 571 | /* |
| 572 | * Saves the game tree under file 'filename' |
| 573 | * Note that qt handles overwrite check. */ |
| 574 | bool BoardWindowcxx . . $ BoardWindow#::doSavecxx . . $ BoardWindow#doSave(fb5d32962602ae86).(QStringcxx . . $ QString# fileName, bool force) |
| 575 | { |
| 576 | if (!force) |
| 577 | { |
| 578 | if (fileName ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! || |
| 579 | fileName.isNullcxx . . $ QString#isNull(50ce9a9e25b4a850).() || |
| 580 | fileName.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).() || |
| 581 | QDircxx . . $ QDir#QDir(3520e46b33348bf6).(fileName).existscxx . . $ QDir#exists(50ce9a9e25b4a850).()) |
| 582 | { |
| 583 | QStringcxx . . $ QString# base = getCandidateFileNamecxx . . $ BoardWindow#getCandidateFileName(4365c3963150523e).(); |
| 584 | if (fileName ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! || fileName.isNullcxx . . $ QString#isNull(50ce9a9e25b4a850).() || fileName.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).()) |
| 585 | fileName =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). base; |
| 586 | else |
| 587 | fileName.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(base); |
| 588 | } |
| 589 | fileName =cxx . . $ QString#`operator=`(4f35bf974e7f8568). QFileDialogcxx . . $ QFileDialog#::getSaveFileNamecxx . . $ QFileDialog#getSaveFileName(a6b29be4bec65236).(this,trcxx . . $ BoardWindow#tr(75d9f1c324b4579d).("Save File"), fileName, trcxx . . $ BoardWindow#tr(75d9f1c324b4579d).("SGF Files (*.sgf);;All Files (*)"), new QStringcxx . . $ QString#QString(85c52e162fed56f9).(""), QFileDialogcxx . . $ QFlags#QFlags(93d577a3e9528307).::DontUseNativeDialogcxx . . $ QFileDialog#DontUseNativeDialog. ); |
| 590 | } |
| 591 | |
| 592 | if (fileName.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).()) |
| 593 | return false; |
| 594 | |
| 595 | // if (getFileExtension(fileName, false).isEmpty()) |
| 596 | |
| 597 | if (fileName.rightcxx . . $ QString#right(3f3c3d0e9c0eb37f).(4).toLowercxx . . $ QString#toLower(30b3b70527b1c61a).() !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). ".sgf") |
| 598 | fileName.appendcxx . . $ QString#append(d02845eef0c33901).(".sgf"); |
| 599 | |
| 600 | gameDatacxx . . $ BoardWindow#gameData.->fileNamecxx . . $ GameData#fileName. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). fileName; |
| 601 | |
| 602 | // if (setting->readBoolEntry("REM_DIR")) |
| 603 | // rememberLastDir(fileName); |
| 604 | |
| 605 | QStringcxx . . $ QString# SGF = treecxx . . $ BoardWindow#tree.->exportSGFStringcxx . . $ Tree#exportSGFString(9f7deeccc2bc8c97).(gameDatacxx . . $ BoardWindow#gameData.); |
| 606 | |
| 607 | QFilecxx . . $ QFile# filecxx . . $ QFile#QFile(3520e46b33348bf6).(fileName); |
| 608 | if (!file.opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QFlags#QFlags(93d577a3e9528307).::WriteOnlycxx . . $ QIODevice#WriteOnly.)) |
| 609 | { |
| 610 | QMessageBoxcxx . . $ QMessageBox#::warningcxx . . $ QMessageBox#warning(a9e3742e6f7b4147).(this, PACKAGEcxx . . $ `src/defines.h:32:9`!, QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Could not open file:") +cxx . . $ operator+(3d22f08efddf8107). " " +cxx . . $ operator+(fab9b4f80031f353). fileName); |
| 611 | return false; |
| 612 | } |
| 613 | file.writecxx . . $ QIODevice#write(4ee2750a0be83987).(SGF.toLatin1cxx . . $ QString#toLatin1(ef52b713090bc85a).()); |
| 614 | file.flushcxx . . $ QFileDevice#flush(c9857a73d68e59ba).(); |
| 615 | file.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 616 | |
| 617 | qgoboardcxx . . $ BoardWindow#qgoboard.->setModifiedcxx . . $ qGoBoard#setModified(b45ddcbc8423892c).(false); |
| 618 | return true; |
| 619 | } |
| 620 | |
| 621 | void BoardWindowcxx . . $ BoardWindow#::setGamePhasecxx . . $ BoardWindow#setGamePhase(6ad67d8601499648).(GamePhasecxx . . $ GamePhase# gp) |
| 622 | { |
| 623 | gamePhasecxx . . $ BoardWindow#gamePhase. = gp; |
| 624 | /* FIXME We should set and clear ALL buttons and the like here */ |
| 625 | switch(gp) |
| 626 | { |
| 627 | case phaseInitcxx . . $ phaseInit.: |
| 628 | //more defaults FIXME, and doublecheck |
| 629 | //also consider vanishing buttons instead of making |
| 630 | //them disabled, especially with like computer go, etc. |
| 631 | uicxx . . $ BoardWindow#ui.->adjournButtoncxx . . $ Ui_BoardWindow#adjournButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 632 | uicxx . . $ BoardWindow#ui.->drawButtoncxx . . $ Ui_BoardWindow#drawButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 633 | break; |
| 634 | case phaseEndedcxx . . $ phaseEnded.: |
| 635 | if(uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton.) |
| 636 | uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 637 | if(uicxx . . $ BoardWindow#ui.->resignButtoncxx . . $ Ui_BoardWindow#resignButton.) |
| 638 | uicxx . . $ BoardWindow#ui.->resignButtoncxx . . $ Ui_BoardWindow#resignButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 639 | if(uicxx . . $ BoardWindow#ui.->adjournButtoncxx . . $ Ui_BoardWindow#adjournButton.) |
| 640 | uicxx . . $ BoardWindow#ui.->adjournButtoncxx . . $ Ui_BoardWindow#adjournButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 641 | if(uicxx . . $ BoardWindow#ui.->passButtoncxx . . $ Ui_BoardWindow#passButton.) |
| 642 | uicxx . . $ BoardWindow#ui.->passButtoncxx . . $ Ui_BoardWindow#passButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 643 | if(uicxx . . $ BoardWindow#ui.->countButtoncxx . . $ Ui_BoardWindow#countButton.) |
| 644 | uicxx . . $ BoardWindow#ui.->countButtoncxx . . $ Ui_BoardWindow#countButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 645 | if(uicxx . . $ BoardWindow#ui.->drawButtoncxx . . $ Ui_BoardWindow#drawButton.) |
| 646 | uicxx . . $ BoardWindow#ui.->drawButtoncxx . . $ Ui_BoardWindow#drawButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 647 | /* Done button only for scoring, otherwise close |
| 648 | * window */ |
| 649 | if(uicxx . . $ BoardWindow#ui.->doneButtoncxx . . $ Ui_BoardWindow#doneButton.) |
| 650 | uicxx . . $ BoardWindow#ui.->doneButtoncxx . . $ Ui_BoardWindow#doneButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 651 | break; |
| 652 | case phaseOngoingcxx . . $ phaseOngoing.: |
| 653 | /* among many other things: FIXME, adding as we go, for now, |
| 654 | * sloppy */ |
| 655 | uicxx . . $ BoardWindow#ui.->tabDisplaycxx . . $ Ui_BoardWindow#tabDisplay.->setCurrentIndexcxx . . $ QStackedWidget#setCurrentIndex(d4f767463ce0a6b3).(0); |
| 656 | if(uicxx . . $ BoardWindow#ui.->passButtoncxx . . $ Ui_BoardWindow#passButton.) |
| 657 | uicxx . . $ BoardWindow#ui.->passButtoncxx . . $ Ui_BoardWindow#passButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 658 | if(gameDatacxx . . $ BoardWindow#gameData.->undoAllowedcxx . . $ GameData#undoAllowed. || gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeLocalcxx . . $ modeLocal.) |
| 659 | uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 660 | else |
| 661 | uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 662 | if(gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeMatchcxx . . $ modeMatch.) |
| 663 | { |
| 664 | if(gamePhasecxx . . $ BoardWindow#gamePhase. == phaseScorecxx . . $ phaseScore.) //was phaseScore |
| 665 | uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(trcxx . . $ BoardWindow#tr(75d9f1c324b4579d).("Undo")); |
| 666 | if(dispatchcxx . . $ BoardWindow#dispatch.) |
| 667 | { |
| 668 | uicxx . . $ BoardWindow#ui.->countButtoncxx . . $ Ui_BoardWindow#countButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(dispatchcxx . . $ BoardWindow#dispatch.->supportsRequestCountcxx . . $ BoardDispatch#supportsRequestCount(c9857a73d68e59ba).()); |
| 669 | uicxx . . $ BoardWindow#ui.->drawButtoncxx . . $ Ui_BoardWindow#drawButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(dispatchcxx . . $ BoardWindow#dispatch.->supportsRequestDrawcxx . . $ BoardDispatch#supportsRequestDraw(c9857a73d68e59ba).()); |
| 670 | uicxx . . $ BoardWindow#ui.->adjournButtoncxx . . $ Ui_BoardWindow#adjournButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(dispatchcxx . . $ BoardWindow#dispatch.->supportsRequestAdjourncxx . . $ BoardDispatch#supportsRequestAdjourn(c9857a73d68e59ba).()); |
| 671 | } |
| 672 | } |
| 673 | break; |
| 674 | case phaseScorecxx . . $ phaseScore.: |
| 675 | /* Maybe we should take everything out of |
| 676 | * qgoboard enterScoreMode and put it here */ |
| 677 | /* We might also disable the pass button... except |
| 678 | * really maybe its already disabled from being not |
| 679 | * our turn.. also, should the button's being |
| 680 | * disabled prevent sending the message instead |
| 681 | * of the button checking state? Probably. FIXME */ |
| 682 | if(uicxx . . $ BoardWindow#ui.->countButtoncxx . . $ Ui_BoardWindow#countButton.) |
| 683 | uicxx . . $ BoardWindow#ui.->countButtoncxx . . $ Ui_BoardWindow#countButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 684 | if(uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton. && gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeMatchcxx . . $ modeMatch. && dispatchcxx . . $ BoardWindow#dispatch.) |
| 685 | { |
| 686 | if(dispatchcxx . . $ BoardWindow#dispatch.->supportsRequestMatchModecxx . . $ BoardDispatch#supportsRequestMatchMode(c9857a73d68e59ba).()) |
| 687 | { |
| 688 | uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(trcxx . . $ BoardWindow#tr(75d9f1c324b4579d).("Match Mode")); |
| 689 | uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); //even in rated |
| 690 | } |
| 691 | else if(dispatchcxx . . $ BoardWindow#dispatch.->undoResetsScorecxx . . $ BoardDispatch#undoResetsScore(c9857a73d68e59ba).()) |
| 692 | { |
| 693 | uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); //even in rated |
| 694 | } |
| 695 | } |
| 696 | if(uicxx . . $ BoardWindow#ui.->passButtoncxx . . $ Ui_BoardWindow#passButton.) |
| 697 | uicxx . . $ BoardWindow#ui.->passButtoncxx . . $ Ui_BoardWindow#passButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 698 | //Disable the draw button? |
| 699 | /* FIXME doublecheck, what is doneButton connected to |
| 700 | * in observing a game ?? */ |
| 701 | if(dispatchcxx . . $ BoardWindow#dispatch. && dispatchcxx . . $ BoardWindow#dispatch.->canMarkStonesDeadinScorecxx . . $ BoardDispatch#canMarkStonesDeadinScore(c9857a73d68e59ba).()) //FIXME or maybe as for tygem, it accepts the score as is |
| 702 | uicxx . . $ BoardWindow#ui.->doneButtoncxx . . $ Ui_BoardWindow#doneButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 703 | uicxx . . $ BoardWindow#ui.->tabDisplaycxx . . $ Ui_BoardWindow#tabDisplay.->setCurrentIndexcxx . . $ QStackedWidget#setCurrentIndex(d4f767463ce0a6b3).(1); |
| 704 | |
| 705 | break; |
| 706 | default: |
| 707 | break; |
| 708 | } |
| 709 | updateCursorcxx . . $ BoardWindow#updateCursor(42096433316d3db3).(); |
| 710 | } |
| 711 | |
| 712 | /* |
| 713 | * Generate a candidate for the filename for this game |
| 714 | */ |
| 715 | QStringcxx . . $ QString# BoardWindowcxx . . $ BoardWindow#::getCandidateFileNamecxx . . $ BoardWindow#getCandidateFileName(4365c3963150523e).() |
| 716 | { |
| 717 | |
| 718 | QStringcxx . . $ QString# base = QDatecxx . . $ QDate#::currentDatecxx . . $ QDate#currentDate(f1d16c240bbd73a4).().toStringcxx . . $ QDate#toString(5555d9024dcf93fb).("yyyy-MM-dd"cxx . . $ QString#QString(85c52e162fed56f9).) +cxx . . $ operator+(3d22f08efddf8107). "-" +cxx . . $ operator+(fab9b4f80031f353). gameDatacxx . . $ BoardWindow#gameData.->white_namecxx . . $ GameData#white_name. +cxx . . $ operator+(3d22f08efddf8107). "-" +cxx . . $ operator+(fab9b4f80031f353). gameDatacxx . . $ BoardWindow#gameData.->black_namecxx . . $ GameData#black_name. ; |
| 719 | QStringcxx . . $ QString# result = basecxx . . $ QString#QString(132dd6869045752b). ; |
| 720 | QStringcxx . . $ QString# dir= ""cxx . . $ QString#QString(85c52e162fed56f9). ; |
| 721 | |
| 722 | // if (setting->readBoolEntry("REM_DIR")) |
| 723 | // dir = setting->readEntry("LAST_DIR"); |
| 724 | int i = 1; |
| 725 | while (QFilecxx . . $ QFile#(dir +cxx . . $ operator+(fab9b4f80031f353). result+cxx . . $ operator+(3d22f08efddf8107).".sgf").existscxx . . $ QFile#exists(50ce9a9e25b4a850).()) |
| 726 | { |
| 727 | //number = Q.number(i++); |
| 728 | result =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). base +cxx . . $ operator+(3d22f08efddf8107). "-"+cxx . . $ operator+(fab9b4f80031f353). QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(i++); |
| 729 | //fileName = fileName + ".sgf"; |
| 730 | } |
| 731 | return dir +cxx . . $ operator+(fab9b4f80031f353). result +cxx . . $ operator+(3d22f08efddf8107). ".sgf"; |
| 732 | } |
| 733 | |
| 734 | /* |
| 735 | * The 'save' icon has been pressed |
| 736 | */ |
| 737 | bool BoardWindowcxx . . $ BoardWindow#::slotFileSavecxx . . $ BoardWindow#slotFileSave(c9857a73d68e59ba).() |
| 738 | { |
| 739 | QStringcxx . . $ QString# fileName= gameDatacxx . . $ QString#QString(132dd6869045752b).->fileNamecxx . . $ GameData#fileName.; |
| 740 | if (fileName.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).()) |
| 741 | { |
| 742 | // if (setting->readBoolEntry("REM_DIR")) |
| 743 | // fileName = setting->readEntry("LAST_DIR"); |
| 744 | // else |
| 745 | // fileName = QString::null; |
| 746 | return doSavecxx . . $ BoardWindow#doSave(fb5d32962602ae86).(fileNamecxx . . $ QString#QString(132dd6869045752b)., false); |
| 747 | } |
| 748 | else |
| 749 | return doSavecxx . . $ BoardWindow#doSave(fb5d32962602ae86).(fileNamecxx . . $ QString#QString(132dd6869045752b)., true); |
| 750 | } |
| 751 | |
| 752 | /* |
| 753 | * The 'save as' icon has been pressed |
| 754 | */ |
| 755 | bool BoardWindowcxx . . $ BoardWindow#::slotFileSaveAscxx . . $ BoardWindow#slotFileSaveAs(c9857a73d68e59ba).() |
| 756 | { |
| 757 | return doSavecxx . . $ BoardWindow#doSave(fb5d32962602ae86).(0cxx . . $ QString#QString(85c52e162fed56f9)., false); |
| 758 | } |
| 759 | |
| 760 | /* |
| 761 | * The 'delete node' button has been pressed |
| 762 | */ |
| 763 | void BoardWindowcxx . . $ BoardWindow#::slotEditDeletecxx . . $ BoardWindow#slotEditDelete(49f6e7a06ebc5aa8).() |
| 764 | { |
| 765 | treecxx . . $ BoardWindow#tree.->deleteNodecxx . . $ Tree#deleteNode(49f6e7a06ebc5aa8).(); |
| 766 | } |
| 767 | |
| 768 | void BoardWindowcxx . . $ BoardWindow#::setBoardDispatchcxx . . $ BoardWindow#setBoardDispatch(f9aae4eee533680e).(BoardDispatchcxx . . $ BoardDispatch# * d) |
| 769 | { |
| 770 | dispatchcxx . . $ BoardWindow#dispatch. = d; |
| 771 | } |
| 772 | |
| 773 | //this seems like its more appropriately a qgoboard slot but... |
| 774 | void BoardWindowcxx . . $ BoardWindow#::slot_addtime_menucxx . . $ BoardWindow#slot_addtime_menu(92b1e80c0a7f1406).(QActioncxx . . $ QAction# * a) |
| 775 | { |
| 776 | switch(a->datacxx . . $ QAction#data(23280f95d1ccaa1f).().toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).()) |
| 777 | { |
| 778 | case -1: |
| 779 | break; |
| 780 | case 1: |
| 781 | dispatchcxx . . $ BoardWindow#dispatch.->sendAddTimecxx . . $ BoardDispatch#sendAddTime(d4f767463ce0a6b3).(1); |
| 782 | break; |
| 783 | case 5: |
| 784 | dispatchcxx . . $ BoardWindow#dispatch.->sendAddTimecxx . . $ BoardDispatch#sendAddTime(d4f767463ce0a6b3).(5); |
| 785 | break; |
| 786 | case 10: |
| 787 | dispatchcxx . . $ BoardWindow#dispatch.->sendAddTimecxx . . $ BoardDispatch#sendAddTime(d4f767463ce0a6b3).(10); |
| 788 | break; |
| 789 | case 60: |
| 790 | dispatchcxx . . $ BoardWindow#dispatch.->sendAddTimecxx . . $ BoardDispatch#sendAddTime(d4f767463ce0a6b3).(60); |
| 791 | break; |
| 792 | } |
| 793 | } |
| 794 | |
| 795 | void BoardWindowcxx . . $ BoardWindow#::setComputerBlackcxx . . $ BoardWindow#setComputerBlack(b45ddcbc8423892c).(bool val) |
| 796 | { |
| 797 | myColorIsBlackcxx . . $ BoardWindow#myColorIsBlack. = !val; |
| 798 | |
| 799 | // dynamic_cast downcasts the pointer and returns null if this is not safe |
| 800 | // This requires Run-Time Type Information to be enabled at compile time |
| 801 | qGoBoardLocalInterfacecxx . . $ qGoBoardLocalInterface#* qgoboard_temp = dynamic_cast<qGoBoardLocalInterfacecxx . . $ qGoBoardLocalInterface#*>(qgoboardcxx . . $ BoardWindow#qgoboard.); |
| 802 | if (qgoboard_temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 803 | { |
| 804 | qgoboard_temp->checkComputersTurncxx . . $ qGoBoardLocalInterface#checkComputersTurn(b45ddcbc8423892c).(); |
| 805 | } |
| 806 | } |
| 807 | |
| 808 | void BoardWindowcxx . . $ BoardWindow#::setComputerWhitecxx . . $ BoardWindow#setComputerWhite(b45ddcbc8423892c).(bool val) |
| 809 | { |
| 810 | myColorIsWhitecxx . . $ BoardWindow#myColorIsWhite. = !val; |
| 811 | |
| 812 | // dynamic_cast downcasts the pointer and returns null if this is not safe |
| 813 | // This requires Run-Time Type Information to be enabled at compile time |
| 814 | qGoBoardLocalInterfacecxx . . $ qGoBoardLocalInterface#* qgoboard_temp = dynamic_cast<qGoBoardLocalInterfacecxx . . $ qGoBoardLocalInterface#*>(qgoboardcxx . . $ BoardWindow#qgoboard.); |
| 815 | if (qgoboard_temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 816 | { |
| 817 | qgoboard_temp->checkComputersTurncxx . . $ qGoBoardLocalInterface#checkComputersTurn(b45ddcbc8423892c).(); |
| 818 | } |
| 819 | } |
| 820 | |
| 821 | void BoardWindowcxx . . $ BoardWindow#::requestComputerMovecxx . . $ BoardWindow#requestComputerMove(49f6e7a06ebc5aa8).() |
| 822 | { |
| 823 | // dynamic_cast downcasts the pointer and returns null if this is not safe |
| 824 | // This requires Run-Time Type Information to be enabled at compile time |
| 825 | qGoBoardLocalInterfacecxx . . $ qGoBoardLocalInterface#* qgoboard_temp = dynamic_cast<qGoBoardLocalInterfacecxx . . $ qGoBoardLocalInterface#*>(qgoboardcxx . . $ BoardWindow#qgoboard.); |
| 826 | if (qgoboard_temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 827 | { |
| 828 | qgoboard_temp->checkComputersTurncxx . . $ qGoBoardLocalInterface#checkComputersTurn(b45ddcbc8423892c).(true); |
| 829 | } |
| 830 | } |
| 831 | |
| 832 | void BoardWindowcxx . . $ BoardWindow#::setBlackNamecxx . . $ BoardWindow#setBlackName(7df51288a9ebd664).(QStringcxx . . $ QString# name) |
| 833 | { |
| 834 | gameDatacxx . . $ BoardWindow#gameData.->black_namecxx . . $ GameData#black_name. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). name; |
| 835 | uicxx . . $ BoardWindow#ui.->blackNamecxx . . $ Ui_BoardWindow#blackName.->blockSignalscxx . . $ QObject#blockSignals(4264aff4942d46ac).(true); |
| 836 | uicxx . . $ BoardWindow#ui.->blackNamecxx . . $ Ui_BoardWindow#blackName.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(name); |
| 837 | updateCaptioncxx . . $ BoardWindow#updateCaption(49f6e7a06ebc5aa8).(); |
| 838 | uicxx . . $ BoardWindow#ui.->blackNamecxx . . $ Ui_BoardWindow#blackName.->blockSignalscxx . . $ QObject#blockSignals(4264aff4942d46ac).(false); |
| 839 | } |
| 840 | |
| 841 | void BoardWindowcxx . . $ BoardWindow#::setWhiteNamecxx . . $ BoardWindow#setWhiteName(7df51288a9ebd664).(QStringcxx . . $ QString# name) |
| 842 | { |
| 843 | gameDatacxx . . $ BoardWindow#gameData.->white_namecxx . . $ GameData#white_name. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). name; |
| 844 | uicxx . . $ BoardWindow#ui.->whiteNamecxx . . $ Ui_BoardWindow#whiteName.->blockSignalscxx . . $ QObject#blockSignals(4264aff4942d46ac).(true); |
| 845 | uicxx . . $ BoardWindow#ui.->whiteNamecxx . . $ Ui_BoardWindow#whiteName.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(name); |
| 846 | updateCaptioncxx . . $ BoardWindow#updateCaption(49f6e7a06ebc5aa8).(); |
| 847 | uicxx . . $ BoardWindow#ui.->whiteNamecxx . . $ Ui_BoardWindow#whiteName.->blockSignalscxx . . $ QObject#blockSignals(4264aff4942d46ac).(false); |
| 848 | } |
| 849 | |
| 850 | void BoardWindowcxx . . $ BoardWindow#::switchToEditModecxx . . $ BoardWindow#switchToEditMode(49f6e7a06ebc5aa8).() |
| 851 | { |
| 852 | gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. = modeEditcxx . . $ modeEdit.; |
| 853 | setModecxx . . $ BoardWindow#setMode(2246a2660efa2d0b).(modeEditcxx . . $ modeEdit.); |
| 854 | uicxx . . $ BoardWindow#ui.->computerControlsWidgetcxx . . $ Ui_BoardWindow#computerControlsWidget.->setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeLocalcxx . . $ modeLocal.); |
| 855 | myColorIsBlackcxx . . $ BoardWindow#myColorIsBlack. = true; |
| 856 | myColorIsWhitecxx . . $ BoardWindow#myColorIsWhite. = true; |
| 857 | } |
| 858 | |
| 859 | void BoardWindowcxx . . $ BoardWindow#::switchToLocalModecxx . . $ BoardWindow#switchToLocalMode(49f6e7a06ebc5aa8).() |
| 860 | { |
| 861 | gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. = modeLocalcxx . . $ modeLocal.; |
| 862 | setModecxx . . $ BoardWindow#setMode(2246a2660efa2d0b).(modeLocalcxx . . $ modeLocal.); |
| 863 | uicxx . . $ BoardWindow#ui.->computerControlsWidgetcxx . . $ Ui_BoardWindow#computerControlsWidget.->setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(gameDatacxx . . $ BoardWindow#gameData.->gameModecxx . . $ GameData#gameMode. == modeLocalcxx . . $ modeLocal.); |
| 864 | myColorIsBlackcxx . . $ BoardWindow#myColorIsBlack. = !(uicxx . . $ BoardWindow#ui.->computerBlackcxx . . $ Ui_BoardWindow#computerBlack.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()); |
| 865 | myColorIsWhitecxx . . $ BoardWindow#myColorIsWhite. = !(uicxx . . $ BoardWindow#ui.->computerWhitecxx . . $ Ui_BoardWindow#computerWhite.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()); |
| 866 | |
| 867 | // dynamic_cast downcasts the pointer and returns null if this is not safe |
| 868 | // This requires Run-Time Type Information to be enabled at compile time |
| 869 | qGoBoardLocalInterfacecxx . . $ qGoBoardLocalInterface#* qgoboard_temp = dynamic_cast<qGoBoardLocalInterfacecxx . . $ qGoBoardLocalInterface#*>(qgoboardcxx . . $ BoardWindow#qgoboard.); |
| 870 | if (qgoboard_temp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 871 | { |
| 872 | treecxx . . $ BoardWindow#tree.->setCurrentcxx . . $ Tree#setCurrent(490cd2a4f5caa810).(treecxx . . $ BoardWindow#tree.->findLastMoveInCurrentBranchcxx . . $ Tree#findLastMoveInCurrentBranch(81447a345d48a217).()); |
| 873 | qgoboard_temp->feedPositionThroughGtpcxx . . $ qGoBoardLocalInterface#feedPositionThroughGtp(49f6e7a06ebc5aa8).(); |
| 874 | } |
| 875 | } |
| 876 | |
| 877 | /* |
| 878 | * The text in the comment zone has been changed |
| 879 | */ |
| 880 | void BoardWindowcxx . . $ BoardWindow#::slotUpdateCommentcxx . . $ BoardWindow#slotUpdateComment(49f6e7a06ebc5aa8).() |
| 881 | { |
| 882 | treecxx . . $ BoardWindow#tree.->getCurrentcxx . . $ Tree#getCurrent(8db4894deadf6b2c).()->setCommentcxx . . $ Move#setComment(3520e46b33348bf6).(uicxx . . $ BoardWindow#ui.->commentEditcxx . . $ Ui_BoardWindow#commentEdit.->toPlainTextcxx . . $ QTextEdit#toPlainText(6ef7b6c27b00b43d).()); |
| 883 | } |
| 884 | |
| 885 | void BoardWindowcxx . . $ BoardWindow#::updateButtonscxx . . $ BoardWindow#updateButtons(42096433316d3db3).(StoneColorcxx . . $ StoneColor# lastMoveColor) |
| 886 | { |
| 887 | switch (getGameModecxx . . $ BoardWindow#getGameMode(a60569f3cb1b846).()) |
| 888 | { |
| 889 | case modeMatchcxx . . $ modeMatch.: |
| 890 | case modeLocalcxx . . $ modeLocal.: |
| 891 | if(getGamePhasecxx . . $ BoardWindow#getGamePhase(5e5c74c0ced0b080).() == phaseOngoingcxx . . $ phaseOngoing.) |
| 892 | { |
| 893 | bool onMove = (lastMoveColor == stoneBlackcxx . . $ stoneBlack. && getMyColorIsWhitecxx . . $ BoardWindow#getMyColorIsWhite(c9857a73d68e59ba).()) || |
| 894 | (lastMoveColor == stoneWhitecxx . . $ stoneWhite. && getMyColorIsBlackcxx . . $ BoardWindow#getMyColorIsBlack(c9857a73d68e59ba).()); |
| 895 | uicxx . . $ BoardWindow#ui.->passButtoncxx . . $ Ui_BoardWindow#passButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(onMove); |
| 896 | uicxx . . $ BoardWindow#ui.->resignButtoncxx . . $ Ui_BoardWindow#resignButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(onMove); |
| 897 | } |
| 898 | break; |
| 899 | default: |
| 900 | break; |
| 901 | } |
| 902 | } |
| 903 | |
| 904 | void BoardWindowcxx . . $ BoardWindow#::updateCursorcxx . . $ BoardWindow#updateCursor(42096433316d3db3).(StoneColorcxx . . $ StoneColor# currentMoveColor) |
| 905 | { |
| 906 | CursorTypecxx . . $ CursorType# cur = cursorIdlecxx . . $ cursorIdle.; |
| 907 | |
| 908 | switch (getGameModecxx . . $ BoardWindow#getGameMode(a60569f3cb1b846).()) |
| 909 | { |
| 910 | case modeEditcxx . . $ modeEdit. : |
| 911 | case modeTeachcxx . . $ modeTeach. : |
| 912 | case modeUndefinedcxx . . $ modeUndefined.: |
| 913 | if (getGamePhasecxx . . $ BoardWindow#getGamePhase(5e5c74c0ced0b080).() == phaseScorecxx . . $ phaseScore. || getGamePhasecxx . . $ BoardWindow#getGamePhase(5e5c74c0ced0b080).() == phaseEditcxx . . $ phaseEdit. ) |
| 914 | cur = cursorIdlecxx . . $ cursorIdle.; |
| 915 | else |
| 916 | cur = (currentMoveColor == stoneBlackcxx . . $ stoneBlack. ? cursorGhostWhitecxx . . $ cursorGhostWhite. : cursorGhostBlackcxx . . $ cursorGhostBlack.); |
| 917 | break; |
| 918 | case modeReviewcxx . . $ modeReview.: |
| 919 | break; |
| 920 | case modeObservecxx . . $ modeObserve. : |
| 921 | break; |
| 922 | case modeMatchcxx . . $ modeMatch. : |
| 923 | case modeLocalcxx . . $ modeLocal. : |
| 924 | if(getGamePhasecxx . . $ BoardWindow#getGamePhase(5e5c74c0ced0b080).() == phaseOngoingcxx . . $ phaseOngoing.) |
| 925 | { |
| 926 | if (currentMoveColor == stoneNonecxx . . $ stoneNone. ) |
| 927 | currentMoveColor = qgoboardcxx . . $ BoardWindow#qgoboard.->getBlackTurncxx . . $ qGoBoard#getBlackTurn(efaadfb7dc14930a).() ? stoneWhitecxx . . $ stoneWhite. : stoneBlackcxx . . $ stoneBlack.; |
| 928 | if (currentMoveColor == stoneBlackcxx . . $ stoneBlack. ) |
| 929 | cur = ( getMyColorIsWhitecxx . . $ BoardWindow#getMyColorIsWhite(c9857a73d68e59ba).() ? cursorGhostWhitecxx . . $ cursorGhostWhite. : cursorIdlecxx . . $ cursorIdle. ); |
| 930 | else |
| 931 | cur = ( getMyColorIsBlackcxx . . $ BoardWindow#getMyColorIsBlack(c9857a73d68e59ba).() ? cursorGhostBlackcxx . . $ cursorGhostBlack. : cursorIdlecxx . . $ cursorIdle. ); |
| 932 | if (getGameModecxx . . $ BoardWindow#getGameMode(a60569f3cb1b846).() == modeLocalcxx . . $ modeLocal. && cur == cursorIdlecxx . . $ cursorIdle.) |
| 933 | cur = cursorWaitcxx . . $ cursorWait.; |
| 934 | } |
| 935 | break; |
| 936 | } |
| 937 | |
| 938 | uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board.->setCursorTypecxx . . $ Board#setCursorType(926e1983f0360a22).(cur); |
| 939 | } |
| 940 | |
| 941 | /* |
| 942 | * This deals with updating the 'board' and the 'interface handler' with the data |
| 943 | * stored in the tree at the move place. |
| 944 | * This involves calling and update for the board stones, and |
| 945 | * an update of the interface |
| 946 | */ |
| 947 | void BoardWindowcxx . . $ BoardWindow#::updateMovecxx . . $ BoardWindow#updateMove(490cd2a4f5caa810).(Movecxx . . $ Move# *m) |
| 948 | { |
| 949 | if (m == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 950 | { |
| 951 | m = treecxx . . $ BoardWindow#tree.->getCurrentcxx . . $ Tree#getCurrent(8db4894deadf6b2c).(); |
| 952 | } |
| 953 | |
| 954 | // Update slider branch length |
| 955 | setSliderMaxcxx . . $ BoardWindow#setSliderMax(d4f767463ce0a6b3).(m->getLastMovecxx . . $ Move#getLastMove(64a469cb2ad0f61a).(true)->getMoveNumbercxx . . $ Move#getMoveNumber(455f465bc33b4cdf).()); |
| 956 | setMoveDatacxx . . $ BoardWindow#setMoveData(8aa7e628e2eaae7b).( |
| 957 | m->getMoveNumbercxx . . $ Move#getMoveNumber(455f465bc33b4cdf).(), |
| 958 | (m->getColorcxx . . $ Move#getColor(6680c74b05d375a4).() != stoneBlackcxx . . $ stoneBlack.), |
| 959 | m->getNumBrotherscxx . . $ Move#getNumBrothers(b126dc7c1de90089).(), |
| 960 | m->getNumSonscxx . . $ Move#getNumSons(b126dc7c1de90089).(), |
| 961 | m->hasParentcxx . . $ Move#hasParent(c9857a73d68e59ba).(), |
| 962 | m->hasPrevBrothercxx . . $ Move#hasPrevBrother(c9857a73d68e59ba).(), |
| 963 | m->hasNextBrothercxx . . $ Move#hasNextBrother(c9857a73d68e59ba).(), |
| 964 | m->getXcxx . . $ Move#getX(455f465bc33b4cdf).(), |
| 965 | m->getYcxx . . $ Move#getY(455f465bc33b4cdf).()); |
| 966 | |
| 967 | // Update comment if normal game (if observe or match, the comment zone is kept as is) |
| 968 | if (getGameModecxx . . $ BoardWindow#getGameMode(a60569f3cb1b846).() == modeEditcxx . . $ modeEdit.) |
| 969 | uicxx . . $ BoardWindow#ui.->commentEditcxx . . $ Ui_BoardWindow#commentEdit.->setPlainTextcxx . . $ QTextEdit#setPlainText(3520e46b33348bf6).(m->getCommentcxx . . $ Move#getComment(d436534e89c8f252).()); |
| 970 | |
| 971 | // Isn't updateAll() sufficient? FIXME |
| 972 | uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board.->removeGhostscxx . . $ Board#removeGhosts(49f6e7a06ebc5aa8).(); |
| 973 | uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board.->updateAllcxx . . $ Board#updateAll(2b3560a733ced049).(m); |
| 974 | uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board.->updateLastMovecxx . . $ Board#updateLastMove(490cd2a4f5caa810).(m); |
| 975 | |
| 976 | updateButtonscxx . . $ BoardWindow#updateButtons(42096433316d3db3).(m->getColorcxx . . $ Move#getColor(6680c74b05d375a4).()); |
| 977 | updateCursorcxx . . $ BoardWindow#updateCursor(42096433316d3db3).(m->getColorcxx . . $ Move#getColor(6680c74b05d375a4).()); |
| 978 | |
| 979 | // Update the ghosts indicating variations |
| 980 | if (m->getNumBrotherscxx . . $ Move#getNumBrothers(b126dc7c1de90089).())// && setting->readIntEntry("VAR_GHOSTS")) TODO |
| 981 | uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board.->updateVariationGhostscxx . . $ Board#updateVariationGhosts(490cd2a4f5caa810).(m); |
| 982 | |
| 983 | // Oops, something serious went wrong |
| 984 | if (m->getMatrixcxx . . $ Move#getMatrix(a22259058712982).() == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) |
| 985 | qFatalcxx . . $ `<external>/10450329605257866924/qlogging.h:168:9`!(" *** Move returns NULL pointer for matrix! ***"); |
| 986 | |
| 987 | uicxx . . $ BoardWindow#ui.->capturesBlackcxx . . $ Ui_BoardWindow#capturesBlack.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(m->getCapturesBlackcxx . . $ Move#getCapturesBlack(455f465bc33b4cdf).())); |
| 988 | uicxx . . $ BoardWindow#ui.->capturesWhitecxx . . $ Ui_BoardWindow#capturesWhite.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(m->getCapturesWhitecxx . . $ Move#getCapturesWhite(455f465bc33b4cdf).())); |
| 989 | |
| 990 | // Display times |
| 991 | if(getGameModecxx . . $ BoardWindow#getGameMode(a60569f3cb1b846).() == modeEditcxx . . $ modeEdit.) |
| 992 | { |
| 993 | if(m->getMoveNumbercxx . . $ Move#getMoveNumber(455f465bc33b4cdf).() == 0) |
| 994 | { |
| 995 | if (gameDatacxx . . $ BoardWindow#gameData.->timelimitcxx . . $ GameData#timelimit. == 0) |
| 996 | getClockDisplaycxx . . $ BoardWindow#getClockDisplay(41084e4a97dfeac0).()->setTimeInfocxx . . $ ClockDisplay#setTimeInfo(748afa4755bc9595).(0, -1, 0, -1); |
| 997 | else |
| 998 | getClockDisplaycxx . . $ BoardWindow#getClockDisplay(41084e4a97dfeac0).()->setTimeInfocxx . . $ ClockDisplay#setTimeInfo(748afa4755bc9595).(gameDatacxx . . $ BoardWindow#gameData.->timelimitcxx . . $ GameData#timelimit., -1, gameDatacxx . . $ BoardWindow#gameData.->timelimitcxx . . $ GameData#timelimit., -1); |
| 999 | } |
| 1000 | else if(m->getTimeinfocxx . . $ Move#getTimeinfo(c9857a73d68e59ba).()) |
| 1001 | { |
| 1002 | int other_time, other_stones_periods; |
| 1003 | if(m->parentcxx . . $ Move#parent. && m->parentcxx . . $ Move#parent.->getMoveNumbercxx . . $ Move#getMoveNumber(455f465bc33b4cdf).() != 0 && m->parentcxx . . $ Move#parent.->getTimeinfocxx . . $ Move#getTimeinfo(c9857a73d68e59ba).()) |
| 1004 | { |
| 1005 | other_time = (int)m->parentcxx . . $ Move#parent.->getTimeLeftcxx . . $ Move#getTimeLeft(9b8c9e39889c762c).(); |
| 1006 | other_stones_periods = (m->parentcxx . . $ Move#parent.->getOpenMovescxx . . $ Move#getOpenMoves(b126dc7c1de90089).() == 0 ? -1 : m->parentcxx . . $ Move#parent.->getOpenMovescxx . . $ Move#getOpenMoves(b126dc7c1de90089).()); |
| 1007 | } |
| 1008 | else |
| 1009 | { |
| 1010 | other_time = 0; |
| 1011 | other_stones_periods = -1; |
| 1012 | } |
| 1013 | if(!qgoboardcxx . . $ BoardWindow#qgoboard.->getBlackTurncxx . . $ qGoBoard#getBlackTurn(efaadfb7dc14930a).()) |
| 1014 | getClockDisplaycxx . . $ BoardWindow#getClockDisplay(41084e4a97dfeac0).()->setTimeInfocxx . . $ ClockDisplay#setTimeInfo(748afa4755bc9595).((int)m->getTimeLeftcxx . . $ Move#getTimeLeft(9b8c9e39889c762c).(), m->getOpenMovescxx . . $ Move#getOpenMoves(b126dc7c1de90089).() == 0 ? -1 : m->getOpenMovescxx . . $ Move#getOpenMoves(b126dc7c1de90089).(), other_time, other_stones_periods); |
| 1015 | else |
| 1016 | getClockDisplaycxx . . $ BoardWindow#getClockDisplay(41084e4a97dfeac0).()->setTimeInfocxx . . $ ClockDisplay#setTimeInfo(748afa4755bc9595).(other_time, other_stones_periods, (int)m->getTimeLeftcxx . . $ Move#getTimeLeft(9b8c9e39889c762c).(), m->getOpenMovescxx . . $ Move#getOpenMoves(b126dc7c1de90089).() == 0 ? -1 : m->getOpenMovescxx . . $ Move#getOpenMoves(b126dc7c1de90089).()); |
| 1017 | } |
| 1018 | } |
| 1019 | } |
| 1020 | |
| 1021 | void BoardWindowcxx . . $ BoardWindow#::slotSendCommentcxx . . $ BoardWindow#slotSendComment(49f6e7a06ebc5aa8).() |
| 1022 | { |
| 1023 | QStringcxx . . $ QString# ourcomment = uicxx . . $ BoardWindow#ui.->commentEdit2cxx . . $ Ui_BoardWindow#commentEdit2.->textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).(); |
| 1024 | uicxx . . $ BoardWindow#ui.->commentEdit2cxx . . $ Ui_BoardWindow#commentEdit2.->clearcxx . . $ QLineEdit#clear(49f6e7a06ebc5aa8).(); |
| 1025 | |
| 1026 | if (dispatchcxx . . $ BoardWindow#dispatch.) |
| 1027 | { |
| 1028 | dispatchcxx . . $ BoardWindow#dispatch.->sendKibitzcxx . . $ BoardDispatch#sendKibitz(7df51288a9ebd664).(ourcommentcxx . . $ QString#QString(132dd6869045752b).); |
| 1029 | // User name only prepended for local display |
| 1030 | ourcomment.prependcxx . . $ QString#prepend(6a89d0b7f4d2681c).(dispatchcxx . . $ BoardWindow#dispatch.->getUsernamecxx . . $ BoardDispatch#getUsername(4365c3963150523e).() +cxx . . $ operator+(3d22f08efddf8107). "[" +cxx . . $ operator+(fab9b4f80031f353). dispatchcxx . . $ BoardWindow#dispatch.->getOurRankcxx . . $ BoardDispatch#getOurRank(4365c3963150523e).() +cxx . . $ operator+(3d22f08efddf8107). "]: "); |
| 1031 | } |
| 1032 | ourcomment.prependcxx . . $ QString#prepend(6a89d0b7f4d2681c).( "(" +cxx . . $ operator+(c75c3ae4eb9af1a8). QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(treecxx . . $ BoardWindow#tree.->getCurrentcxx . . $ Tree#getCurrent(8db4894deadf6b2c).()->getMoveNumbercxx . . $ Move#getMoveNumber(455f465bc33b4cdf).()) +cxx . . $ operator+(3d22f08efddf8107). ") "); |
| 1033 | |
| 1034 | displayCommentcxx . . $ BoardWindow#displayComment(7df51288a9ebd664).(ourcommentcxx . . $ QString#QString(132dd6869045752b).); |
| 1035 | } |
| 1036 | |
| 1037 | /* |
| 1038 | * Called when the 'nav to' button is pressed |
| 1039 | */ |
| 1040 | void BoardWindowcxx . . $ BoardWindow#::slotNavIntersectioncxx . . $ BoardWindow#slotNavIntersection(49f6e7a06ebc5aa8).() |
| 1041 | { |
| 1042 | //should not happen |
| 1043 | if (getGameModecxx . . $ BoardWindow#getGameMode(a60569f3cb1b846).() != modeEditcxx . . $ modeEdit. && |
| 1044 | getGameModecxx . . $ BoardWindow#getGameMode(a60569f3cb1b846).() != modeObservecxx . . $ modeObserve.) |
| 1045 | return; |
| 1046 | /* Double check the above, seems like we should be able to use |
| 1047 | * the nav button in any mode except maybe the scorephase of |
| 1048 | * a game.. but I mean why can't we look back over moves whenever? |
| 1049 | * FIXME */ |
| 1050 | |
| 1051 | setGamePhasecxx . . $ BoardWindow#setGamePhase(6ad67d8601499648). ( phaseNavTocxx . . $ phaseNavTo. ); |
| 1052 | uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board.->setCursorTypecxx . . $ Board#setCursorType(926e1983f0360a22).(cursorNavTocxx . . $ cursorNavTo.); |
| 1053 | } |
| 1054 | |
| 1055 | void BoardWindowcxx . . $ BoardWindow#::slotWheelEventcxx . . $ BoardWindow#slotWheelEvent(92d40974398e4832).(QWheelEventcxx . . $ QWheelEvent# *e) |
| 1056 | { |
| 1057 | // leave if not editing |
| 1058 | if (getGameModecxx . . $ BoardWindow#getGameMode(a60569f3cb1b846).() != modeEditcxx . . $ modeEdit. && |
| 1059 | getGameModecxx . . $ BoardWindow#getGameMode(a60569f3cb1b846).() != modeObservecxx . . $ modeObserve.) //or observing |
| 1060 | return; |
| 1061 | |
| 1062 | if (getGamePhasecxx . . $ BoardWindow#getGamePhase(5e5c74c0ced0b080).() != phaseOngoingcxx . . $ phaseOngoing.) |
| 1063 | return; |
| 1064 | |
| 1065 | // Check delay |
| 1066 | if (QTimecxx . . $ QTime#::currentTimecxx . . $ QTime#currentTime(bd2fc2b92108c576).() <cxx . . $ QTime#`operator<`(1610574c25194847). wheelTimecxx . . $ BoardWindow#wheelTime.) |
| 1067 | return; |
| 1068 | |
| 1069 | // Needs an extra check on variable mouseState as state() does not work on Windows. |
| 1070 | if (e->deltacxx . . $ QWheelEvent#delta(455f465bc33b4cdf).() > 0) |
| 1071 | { |
| 1072 | if (e->buttonscxx . . $ QWheelEvent#buttons(4523555da7f36dd2).() == Qtcxx . . $ Qt/::RightButtoncxx . . $ Qt/RightButton. || e-> modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() == Qtcxx . . $ Qt/::ShiftModifiercxx . . $ Qt/ShiftModifier.) |
| 1073 | treecxx . . $ BoardWindow#tree.->slotNavNextVarcxx . . $ Tree#slotNavNextVar(49f6e7a06ebc5aa8).(); |
| 1074 | else |
| 1075 | treecxx . . $ BoardWindow#tree.->slotNavForwardcxx . . $ Tree#slotNavForward(49f6e7a06ebc5aa8).(); |
| 1076 | } |
| 1077 | else |
| 1078 | { |
| 1079 | if (e->buttonscxx . . $ QWheelEvent#buttons(4523555da7f36dd2).() == Qtcxx . . $ Qt/::RightButtoncxx . . $ Qt/RightButton. || e-> modifierscxx . . $ QInputEvent#modifiers(bf228902b3e5e63b).() == Qtcxx . . $ Qt/::ShiftModifiercxx . . $ Qt/ShiftModifier.)//|| mouseState == RightButton) |
| 1080 | treecxx . . $ BoardWindow#tree.->slotNavPrevVarcxx . . $ Tree#slotNavPrevVar(49f6e7a06ebc5aa8).(); |
| 1081 | else |
| 1082 | treecxx . . $ BoardWindow#tree.->slotNavBackwardcxx . . $ Tree#slotNavBackward(49f6e7a06ebc5aa8).(); |
| 1083 | } |
| 1084 | |
| 1085 | // Delay of 100 msecs to avoid too fast scrolling |
| 1086 | wheelTimecxx . . $ BoardWindow#wheelTime. =cxx . . $ QTime#`operator=`(370b645f04941e62). QTimecxx . . $ QTime#::currentTimecxx . . $ QTime#currentTime(bd2fc2b92108c576).(); |
| 1087 | wheelTimecxx . . $ BoardWindow#wheelTime. =cxx . . $ QTime#`operator=`(370b645f04941e62). wheelTimecxx . . $ BoardWindow#wheelTime..addMSecscxx . . $ QTime#addMSecs(902e6118dfa1a226).(50); |
| 1088 | |
| 1089 | e->acceptcxx . . $ QEvent#accept(49f6e7a06ebc5aa8).(); |
| 1090 | } |
| 1091 | |
| 1092 | void BoardWindowcxx . . $ BoardWindow#::slotGetScorecxx . . $ BoardWindow#slotGetScore(4df37d5d0c1dcce).(int terrBlack, int captBlack, int deadWhite, int terrWhite, int captWhite, int deadBlack) |
| 1093 | { |
| 1094 | uicxx . . $ BoardWindow#ui.->komiScorecxx . . $ Ui_BoardWindow#komiScore.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(ac5d358e2e30f7ea).(gameDatacxx . . $ BoardWindow#gameData.->komicxx . . $ GameData#komi.)); |
| 1095 | uicxx . . $ BoardWindow#ui.->terrWhitecxx . . $ Ui_BoardWindow#terrWhite.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(terrWhite)); |
| 1096 | uicxx . . $ BoardWindow#ui.->capturesWhiteScorecxx . . $ Ui_BoardWindow#capturesWhiteScore.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(captWhite+deadBlack)); |
| 1097 | uicxx . . $ BoardWindow#ui.->totalWhitecxx . . $ Ui_BoardWindow#totalWhite.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(ac5d358e2e30f7ea).((float)(terrWhite+captWhite+deadBlack) + gameDatacxx . . $ BoardWindow#gameData.->komicxx . . $ GameData#komi.)); |
| 1098 | uicxx . . $ BoardWindow#ui.->terrBlackcxx . . $ Ui_BoardWindow#terrBlack.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(terrBlack)); |
| 1099 | uicxx . . $ BoardWindow#ui.->capturesBlackScorecxx . . $ Ui_BoardWindow#capturesBlackScore.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(captBlack+deadWhite)); |
| 1100 | uicxx . . $ BoardWindow#ui.->totalBlackcxx . . $ Ui_BoardWindow#totalBlack.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(terrBlack+captBlack+deadWhite)); |
| 1101 | |
| 1102 | gameDatacxx . . $ BoardWindow#gameData.->black_prisonerscxx . . $ GameData#black_prisoners. = captBlack; |
| 1103 | gameDatacxx . . $ BoardWindow#gameData.->white_prisonerscxx . . $ GameData#white_prisoners. = captWhite; |
| 1104 | } |
| 1105 | |
| 1106 | /* |
| 1107 | * displays the informations relative to a game on the board window |
| 1108 | */ |
| 1109 | void BoardWindowcxx . . $ BoardWindow#::updateCaptioncxx . . $ BoardWindow#updateCaption(49f6e7a06ebc5aa8).() |
| 1110 | { |
| 1111 | // Print caption |
| 1112 | // example: qGo 0.0.5 - Zotan 8k vs. tgmouse 10k |
| 1113 | // or if game name is given: qGo 0.0.5 - Kogo's Joseki Dictionary |
| 1114 | setWindowTitlecxx . . $ QWidget#setWindowTitle(3520e46b33348bf6).( /* QString(isModified ? "* " : "") + */ |
| 1115 | ( (gameDatacxx . . $ BoardWindow#gameData.->numbercxx . . $ GameData#number. != 0 && gameDatacxx . . $ BoardWindow#gameData.->numbercxx . . $ GameData#number. < 10000) ? |
| 1116 | "(" +cxx . . $ operator+(c75c3ae4eb9af1a8). QStringcxx . . $ QString#::numbercxx . . $ QString#number(da83c6b4fd8c0e98).(gameDatacxx . . $ BoardWindow#gameData.->numbercxx . . $ GameData#number.) +cxx . . $ operator+(3d22f08efddf8107). ") " : |
| 1117 | QStringcxx . . $ QString#QString(ced63f7c635d850d).()) +cxx . . $ operator+(fab9b4f80031f353). (gameDatacxx . . $ BoardWindow#gameData.->gameNamecxx . . $ GameData#gameName..isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).() ? |
| 1118 | gameDatacxx . . $ BoardWindow#gameData.->white_namecxx . . $ GameData#white_name. |
| 1119 | +cxx . . $ operator+(fab9b4f80031f353). (!gameDatacxx . . $ BoardWindow#gameData.->white_rankcxx . . $ GameData#white_rank..isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).() ? |
| 1120 | " " +cxx . . $ operator+(c75c3ae4eb9af1a8). gameDatacxx . . $ BoardWindow#gameData.->white_rankcxx . . $ GameData#white_rank. : |
| 1121 | QStringcxx . . $ QString#QString(ced63f7c635d850d).()) |
| 1122 | +cxx . . $ operator+(3d22f08efddf8107). " " +cxx . . $ operator+(fab9b4f80031f353). QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("vs.") +cxx . . $ operator+(3d22f08efddf8107). " " +cxx . . $ operator+(fab9b4f80031f353). gameDatacxx . . $ BoardWindow#gameData.->black_namecxx . . $ GameData#black_name. |
| 1123 | +cxx . . $ operator+(fab9b4f80031f353). (!gameDatacxx . . $ BoardWindow#gameData.->black_rankcxx . . $ GameData#black_rank..isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).() ? |
| 1124 | " " +cxx . . $ operator+(c75c3ae4eb9af1a8). gameDatacxx . . $ BoardWindow#gameData.->black_rankcxx . . $ GameData#black_rank. : |
| 1125 | QStringcxx . . $ QString#QString(ced63f7c635d850d).()) : |
| 1126 | gameDatacxx . . $ QString#QString(132dd6869045752b).->gameNamecxx . . $ GameData#gameName.) +cxx . . $ operator+(3d22f08efddf8107). " - " +cxx . . $ operator+(fab9b4f80031f353). QStringcxx . . $ QString#QString(85c52e162fed56f9).(PACKAGEcxx . . $ `src/defines.h:32:9`!)); |
| 1127 | |
| 1128 | |
| 1129 | bool simple = gameDatacxx . . $ BoardWindow#gameData.->white_rankcxx . . $ GameData#white_rank..lengthcxx . . $ QString#length(455f465bc33b4cdf).() == 0 && gameDatacxx . . $ BoardWindow#gameData.->black_rankcxx . . $ GameData#black_rank..lengthcxx . . $ QString#length(455f465bc33b4cdf).() == 0; |
| 1130 | /* This name stuff is super redundant with below FIXME */ |
| 1131 | QStringcxx . . $ QString# player = gameDatacxx . . $ QString#QString(132dd6869045752b).->white_namecxx . . $ GameData#white_name.; |
| 1132 | if (simple && player ==cxx . . $ `operator==`(5bc2975d2d751687). QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("White")) |
| 1133 | { |
| 1134 | uicxx . . $ BoardWindow#ui.->whiteNamecxx . . $ Ui_BoardWindow#whiteName.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("White")); |
| 1135 | uicxx . . $ BoardWindow#ui.->whiteFrame_score_labelcxx . . $ Ui_BoardWindow#whiteFrame_score_label.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("White")); |
| 1136 | } |
| 1137 | else if(!gameDatacxx . . $ BoardWindow#gameData.->nigiriToBeSettledcxx . . $ GameData#nigiriToBeSettled.) |
| 1138 | { |
| 1139 | // truncate to 13 characters max |
| 1140 | player.truncatecxx . . $ QString#truncate(d4f767463ce0a6b3).(13); |
| 1141 | |
| 1142 | if (gameDatacxx . . $ BoardWindow#gameData.->white_rankcxx . . $ GameData#white_rank..lengthcxx . . $ QString#length(455f465bc33b4cdf).() != 0) |
| 1143 | player =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). player +cxx . . $ operator+(3d22f08efddf8107). " " +cxx . . $ operator+(fab9b4f80031f353). gameDatacxx . . $ BoardWindow#gameData.->white_rankcxx . . $ GameData#white_rank.; |
| 1144 | |
| 1145 | uicxx . . $ BoardWindow#ui.->whiteNamecxx . . $ Ui_BoardWindow#whiteName.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(player); |
| 1146 | uicxx . . $ BoardWindow#ui.->whiteFrame_score_labelcxx . . $ Ui_BoardWindow#whiteFrame_score_label.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("W") +cxx . . $ operator+(3d22f08efddf8107). ": " +cxx . . $ operator+(fab9b4f80031f353). player); |
| 1147 | } |
| 1148 | |
| 1149 | player =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). gameDatacxx . . $ BoardWindow#gameData.->black_namecxx . . $ GameData#black_name.; |
| 1150 | if (simple && player ==cxx . . $ `operator==`(5bc2975d2d751687). QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Black")) |
| 1151 | { |
| 1152 | uicxx . . $ BoardWindow#ui.->blackNamecxx . . $ Ui_BoardWindow#blackName.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Black")); |
| 1153 | uicxx . . $ BoardWindow#ui.->blackFrame_score_labelcxx . . $ Ui_BoardWindow#blackFrame_score_label.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Black")); |
| 1154 | } |
| 1155 | else if(!gameDatacxx . . $ BoardWindow#gameData.->nigiriToBeSettledcxx . . $ GameData#nigiriToBeSettled.) |
| 1156 | { |
| 1157 | // truncate to 13 characters max |
| 1158 | player.truncatecxx . . $ QString#truncate(d4f767463ce0a6b3).(13); |
| 1159 | |
| 1160 | if (gameDatacxx . . $ BoardWindow#gameData.->black_rankcxx . . $ GameData#black_rank..lengthcxx . . $ QString#length(455f465bc33b4cdf).() != 0) |
| 1161 | player =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). player +cxx . . $ operator+(3d22f08efddf8107). " " +cxx . . $ operator+(fab9b4f80031f353). gameDatacxx . . $ BoardWindow#gameData.->black_rankcxx . . $ GameData#black_rank.; |
| 1162 | |
| 1163 | uicxx . . $ BoardWindow#ui.->blackNamecxx . . $ Ui_BoardWindow#blackName.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(player); |
| 1164 | uicxx . . $ BoardWindow#ui.->blackFrame_score_labelcxx . . $ Ui_BoardWindow#blackFrame_score_label.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("B") +cxx . . $ operator+(3d22f08efddf8107). ": " +cxx . . $ operator+(fab9b4f80031f353). player); |
| 1165 | } |
| 1166 | |
| 1167 | //TODO set clock |
| 1168 | |
| 1169 | if(gameDatacxx . . $ BoardWindow#gameData.->free_ratedcxx . . $ GameData#free_rated. == RATEDcxx . . $ RATED.) |
| 1170 | freeratedLabelcxx . . $ BoardWindow#freeratedLabel.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("Rated"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 1171 | else if(gameDatacxx . . $ BoardWindow#gameData.->free_ratedcxx . . $ GameData#free_rated. == FREEcxx . . $ FREE.) |
| 1172 | freeratedLabelcxx . . $ BoardWindow#freeratedLabel.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("Free"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 1173 | else if(gameDatacxx . . $ BoardWindow#gameData.->free_ratedcxx . . $ GameData#free_rated. == TEACHINGcxx . . $ TEACHING.) |
| 1174 | freeratedLabelcxx . . $ BoardWindow#freeratedLabel.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("Teaching"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 1175 | |
| 1176 | komiLabelcxx . . $ BoardWindow#komiLabel.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#QString(85c52e162fed56f9).("Komi: ").appendcxx . . $ QString#append(6a89d0b7f4d2681c).(QStringcxx . . $ QString#QString(ced63f7c635d850d).().setNumcxx . . $ QString#setNum(2a15175f7e5f7b33).(gameDatacxx . . $ BoardWindow#gameData.->komicxx . . $ GameData#komi.))); |
| 1177 | handicapLabelcxx . . $ BoardWindow#handicapLabel.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#QString(85c52e162fed56f9).("H: ").appendcxx . . $ QString#append(6a89d0b7f4d2681c).(QStringcxx . . $ QString#QString(ced63f7c635d850d).().setNumcxx . . $ QString#setNum(f2f57eac52a15405).(gameDatacxx . . $ BoardWindow#gameData.->handicapcxx . . $ GameData#handicap.))); |
| 1178 | } |
| 1179 | |
| 1180 | /* |
| 1181 | * This updates the UI with the correct layout depending on the game mode |
| 1182 | */ |
| 1183 | void BoardWindowcxx . . $ BoardWindow#::setModecxx . . $ BoardWindow#setMode(2246a2660efa2d0b).(GameModecxx . . $ GameMode# mode) |
| 1184 | { |
| 1185 | if ((mode == modeEditcxx . . $ modeEdit.) || (mode == modeLocalcxx . . $ modeLocal.)) |
| 1186 | { |
| 1187 | uicxx . . $ BoardWindow#ui.->commentEdit2cxx . . $ Ui_BoardWindow#commentEdit2.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 1188 | } else { |
| 1189 | uicxx . . $ BoardWindow#ui.->buttonModeEditcxx . . $ Ui_BoardWindow#buttonModeEdit.->hidecxx . . $ QWidget#hide(49f6e7a06ebc5aa8).(); |
| 1190 | uicxx . . $ BoardWindow#ui.->buttonModeLocalcxx . . $ Ui_BoardWindow#buttonModeLocal.->hidecxx . . $ QWidget#hide(49f6e7a06ebc5aa8).(); |
| 1191 | } |
| 1192 | |
| 1193 | |
| 1194 | switch (mode) |
| 1195 | { |
| 1196 | |
| 1197 | case modeEditcxx . . $ modeEdit.: |
| 1198 | uicxx . . $ BoardWindow#ui.->actionPlaycxx . . $ Ui_BoardWindow#actionPlay.->setEnabledcxx . . $ QAction#setEnabled(b45ddcbc8423892c).(true); |
| 1199 | uicxx . . $ BoardWindow#ui.->tabToolscxx . . $ Ui_BoardWindow#tabTools.->setCurrentIndexcxx . . $ QStackedWidget#setCurrentIndex(d4f767463ce0a6b3).(0) ;//setVisible(false); |
| 1200 | uicxx . . $ BoardWindow#ui.->scoreButtoncxx . . $ Ui_BoardWindow#scoreButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1201 | uicxx . . $ BoardWindow#ui.->passButton_2cxx . . $ Ui_BoardWindow#passButton_2.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1202 | uicxx . . $ BoardWindow#ui.->commentEditcxx . . $ Ui_BoardWindow#commentEdit.->setReadOnlycxx . . $ QTextEdit#setReadOnly(b45ddcbc8423892c).(false); |
| 1203 | uicxx . . $ BoardWindow#ui.->commentEdit2cxx . . $ Ui_BoardWindow#commentEdit2.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 1204 | return; |
| 1205 | |
| 1206 | case modeObservecxx . . $ modeObserve.: |
| 1207 | uicxx . . $ BoardWindow#ui.->actionPlaycxx . . $ Ui_BoardWindow#actionPlay.->setDisabledcxx . . $ QAction#setDisabled(b45ddcbc8423892c).(true); |
| 1208 | uicxx . . $ BoardWindow#ui.->tabToolscxx . . $ Ui_BoardWindow#tabTools.->setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(false) ; |
| 1209 | uicxx . . $ BoardWindow#ui.->passButton_2cxx . . $ Ui_BoardWindow#passButton_2.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 1210 | uicxx . . $ BoardWindow#ui.->commentEditcxx . . $ Ui_BoardWindow#commentEdit.->setReadOnlycxx . . $ QTextEdit#setReadOnly(b45ddcbc8423892c).(true); |
| 1211 | uicxx . . $ BoardWindow#ui.->commentEdit2cxx . . $ Ui_BoardWindow#commentEdit2.->setReadOnlycxx . . $ QLineEdit#setReadOnly(b45ddcbc8423892c).(false); |
| 1212 | uicxx . . $ BoardWindow#ui.->commentEdit2cxx . . $ Ui_BoardWindow#commentEdit2.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1213 | return ; |
| 1214 | |
| 1215 | case modeMatchcxx . . $ modeMatch. : |
| 1216 | uicxx . . $ BoardWindow#ui.->actionPlaycxx . . $ Ui_BoardWindow#actionPlay.->setDisabledcxx . . $ QAction#setDisabled(b45ddcbc8423892c).(true); |
| 1217 | uicxx . . $ BoardWindow#ui.->tabToolscxx . . $ Ui_BoardWindow#tabTools.->setCurrentIndexcxx . . $ QStackedWidget#setCurrentIndex(d4f767463ce0a6b3).(1) ; |
| 1218 | uicxx . . $ BoardWindow#ui.->scoreButtoncxx . . $ Ui_BoardWindow#scoreButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 1219 | uicxx . . $ BoardWindow#ui.->passButtoncxx . . $ Ui_BoardWindow#passButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1220 | uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1221 | uicxx . . $ BoardWindow#ui.->resignButtoncxx . . $ Ui_BoardWindow#resignButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1222 | uicxx . . $ BoardWindow#ui.->reviewButtoncxx . . $ Ui_BoardWindow#reviewButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 1223 | uicxx . . $ BoardWindow#ui.->reviewButtoncxx . . $ Ui_BoardWindow#reviewButton.->setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(true); |
| 1224 | uicxx . . $ BoardWindow#ui.->adjournButtoncxx . . $ Ui_BoardWindow#adjournButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1225 | /* FIXME we could have the refreshButton refresh the observers on |
| 1226 | * IGS. This requires a "supports" protocol function, etc., to |
| 1227 | * send the refresh. Or we could just periodically refresh the |
| 1228 | * observers. |
| 1229 | * But note that its currently not "connect"ed to anything. */ |
| 1230 | //ui->refreshButton->setEnabled(true); |
| 1231 | uicxx . . $ BoardWindow#ui.->refreshButtoncxx . . $ Ui_BoardWindow#refreshButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 1232 | |
| 1233 | uicxx . . $ BoardWindow#ui.->doneButtoncxx . . $ Ui_BoardWindow#doneButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 1234 | uicxx . . $ BoardWindow#ui.->commentEditcxx . . $ Ui_BoardWindow#commentEdit.->setReadOnlycxx . . $ QTextEdit#setReadOnly(b45ddcbc8423892c).(true); |
| 1235 | uicxx . . $ BoardWindow#ui.->commentEdit2cxx . . $ Ui_BoardWindow#commentEdit2.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1236 | uicxx . . $ BoardWindow#ui.->commentEdit2cxx . . $ Ui_BoardWindow#commentEdit2.->setReadOnlycxx . . $ QLineEdit#setReadOnly(b45ddcbc8423892c).(false); |
| 1237 | return ; |
| 1238 | |
| 1239 | case modeLocalcxx . . $ modeLocal. : |
| 1240 | uicxx . . $ BoardWindow#ui.->actionPlaycxx . . $ Ui_BoardWindow#actionPlay.->setDisabledcxx . . $ QAction#setDisabled(b45ddcbc8423892c).(true); |
| 1241 | uicxx . . $ BoardWindow#ui.->tabToolscxx . . $ Ui_BoardWindow#tabTools.->setCurrentIndexcxx . . $ QStackedWidget#setCurrentIndex(d4f767463ce0a6b3).(1) ; |
| 1242 | uicxx . . $ BoardWindow#ui.->scoreButtoncxx . . $ Ui_BoardWindow#scoreButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 1243 | uicxx . . $ BoardWindow#ui.->passButtoncxx . . $ Ui_BoardWindow#passButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1244 | uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1245 | uicxx . . $ BoardWindow#ui.->resignButtoncxx . . $ Ui_BoardWindow#resignButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1246 | uicxx . . $ BoardWindow#ui.->adjournButtoncxx . . $ Ui_BoardWindow#adjournButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 1247 | uicxx . . $ BoardWindow#ui.->doneButtoncxx . . $ Ui_BoardWindow#doneButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 1248 | uicxx . . $ BoardWindow#ui.->commentEditcxx . . $ Ui_BoardWindow#commentEdit.->setReadOnlycxx . . $ QTextEdit#setReadOnly(b45ddcbc8423892c).(true); |
| 1249 | uicxx . . $ BoardWindow#ui.->commentEdit2cxx . . $ Ui_BoardWindow#commentEdit2.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 1250 | uicxx . . $ BoardWindow#ui.->reviewButtoncxx . . $ Ui_BoardWindow#reviewButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 1251 | return ; |
| 1252 | |
| 1253 | case modeTeachcxx . . $ modeTeach.: |
| 1254 | uicxx . . $ BoardWindow#ui.->actionPlaycxx . . $ Ui_BoardWindow#actionPlay.->setDisabledcxx . . $ QAction#setDisabled(b45ddcbc8423892c).(true); |
| 1255 | uicxx . . $ BoardWindow#ui.->tabToolscxx . . $ Ui_BoardWindow#tabTools.->setCurrentIndexcxx . . $ QStackedWidget#setCurrentIndex(d4f767463ce0a6b3).(1) ; |
| 1256 | uicxx . . $ BoardWindow#ui.->scoreButtoncxx . . $ Ui_BoardWindow#scoreButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 1257 | uicxx . . $ BoardWindow#ui.->passButtoncxx . . $ Ui_BoardWindow#passButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1258 | uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1259 | uicxx . . $ BoardWindow#ui.->resignButtoncxx . . $ Ui_BoardWindow#resignButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1260 | uicxx . . $ BoardWindow#ui.->adjournButtoncxx . . $ Ui_BoardWindow#adjournButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1261 | uicxx . . $ BoardWindow#ui.->doneButtoncxx . . $ Ui_BoardWindow#doneButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 1262 | uicxx . . $ BoardWindow#ui.->commentEditcxx . . $ Ui_BoardWindow#commentEdit.->setReadOnlycxx . . $ QTextEdit#setReadOnly(b45ddcbc8423892c).(true); |
| 1263 | uicxx . . $ BoardWindow#ui.->commentEdit2cxx . . $ Ui_BoardWindow#commentEdit2.->setReadOnlycxx . . $ QLineEdit#setReadOnly(b45ddcbc8423892c).(false); |
| 1264 | uicxx . . $ BoardWindow#ui.->commentEdit2cxx . . $ Ui_BoardWindow#commentEdit2.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1265 | return ; |
| 1266 | |
| 1267 | case modeReviewcxx . . $ modeReview. : |
| 1268 | uicxx . . $ BoardWindow#ui.->actionPlaycxx . . $ Ui_BoardWindow#actionPlay.->setDisabledcxx . . $ QAction#setDisabled(b45ddcbc8423892c).(true); |
| 1269 | uicxx . . $ BoardWindow#ui.->tabToolscxx . . $ Ui_BoardWindow#tabTools.->setCurrentIndexcxx . . $ QStackedWidget#setCurrentIndex(d4f767463ce0a6b3).(1) ; |
| 1270 | uicxx . . $ BoardWindow#ui.->scoreButtoncxx . . $ Ui_BoardWindow#scoreButton.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).(true); |
| 1271 | uicxx . . $ BoardWindow#ui.->passButtoncxx . . $ Ui_BoardWindow#passButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1272 | uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1273 | uicxx . . $ BoardWindow#ui.->resignButtoncxx . . $ Ui_BoardWindow#resignButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1274 | uicxx . . $ BoardWindow#ui.->adjournButtoncxx . . $ Ui_BoardWindow#adjournButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1275 | uicxx . . $ BoardWindow#ui.->doneButtoncxx . . $ Ui_BoardWindow#doneButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 1276 | uicxx . . $ BoardWindow#ui.->commentEditcxx . . $ Ui_BoardWindow#commentEdit.->setReadOnlycxx . . $ QTextEdit#setReadOnly(b45ddcbc8423892c).(true); |
| 1277 | uicxx . . $ BoardWindow#ui.->commentEdit2cxx . . $ Ui_BoardWindow#commentEdit2.->setReadOnlycxx . . $ QLineEdit#setReadOnly(b45ddcbc8423892c).(false); |
| 1278 | uicxx . . $ BoardWindow#ui.->commentEdit2cxx . . $ Ui_BoardWindow#commentEdit2.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1279 | return ; |
| 1280 | case modeUndefinedcxx . . $ modeUndefined.: |
| 1281 | return; |
| 1282 | } |
| 1283 | } |
| 1284 | |
| 1285 | /* |
| 1286 | * Resets all displays on the board window |
| 1287 | */ |
| 1288 | void BoardWindowcxx . . $ BoardWindow#::clearDatacxx . . $ BoardWindow#clearData(49f6e7a06ebc5aa8).() |
| 1289 | { |
| 1290 | uicxx . . $ BoardWindow#ui.->boardcxx . . $ Ui_BoardWindow#board.->clearDatacxx . . $ Board#clearData(49f6e7a06ebc5aa8).(); |
| 1291 | |
| 1292 | uicxx . . $ BoardWindow#ui.->commentEditcxx . . $ Ui_BoardWindow#commentEdit.->clearcxx . . $ QTextEdit#clear(49f6e7a06ebc5aa8).(); |
| 1293 | |
| 1294 | uicxx . . $ BoardWindow#ui.->capturesBlackcxx . . $ Ui_BoardWindow#capturesBlack.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("0"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 1295 | uicxx . . $ BoardWindow#ui.->capturesWhitecxx . . $ Ui_BoardWindow#capturesWhite.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("0"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 1296 | |
| 1297 | uicxx . . $ BoardWindow#ui.->pb_timeBlackcxx . . $ Ui_BoardWindow#pb_timeBlack.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).("00:00"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 1298 | uicxx . . $ BoardWindow#ui.->pb_timeWhitecxx . . $ Ui_BoardWindow#pb_timeWhite.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).("00:00"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 1299 | |
| 1300 | uicxx . . $ BoardWindow#ui.->scoreButtoncxx . . $ Ui_BoardWindow#scoreButton.->setDowncxx . . $ QAbstractButton#setDown(b45ddcbc8423892c).(false); |
| 1301 | |
| 1302 | uicxx . . $ BoardWindow#ui.->slidercxx . . $ Ui_BoardWindow#slider.->setValuecxx . . $ QAbstractSlider#setValue(d4f767463ce0a6b3).(0); |
| 1303 | uicxx . . $ BoardWindow#ui.->slidercxx . . $ Ui_BoardWindow#slider.->setMaximumcxx . . $ QAbstractSlider#setMaximum(d4f767463ce0a6b3).(0); |
| 1304 | } |
| 1305 | |
| 1306 | /* |
| 1307 | * displays the informations relative to a move on the board window |
| 1308 | */ |
| 1309 | void BoardWindowcxx . . $ BoardWindow#::setMoveDatacxx . . $ BoardWindow#setMoveData(8aa7e628e2eaae7b).(int n, bool black, int brothers, int sons, bool hasParent, bool hasPrev, bool hasNext, int lastX, int lastY) |
| 1310 | { |
| 1311 | // move number |
| 1312 | QStringcxx . . $ QString# s(QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Move") +cxx . . $ operator+(3d22f08efddf8107). " "); |
| 1313 | s.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(n)); |
| 1314 | |
| 1315 | // color and coordinates |
| 1316 | if (lastX >= 1 && lastX <= getBoardSizecxx . . $ BoardWindow#getBoardSize(455f465bc33b4cdf).() && lastY >= 1 && lastY <= getBoardSizecxx . . $ BoardWindow#getBoardSize(455f465bc33b4cdf).()) |
| 1317 | { |
| 1318 | s.appendcxx . . $ QString#append(d02845eef0c33901).(" ("); |
| 1319 | s.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(black ? QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("W")+cxx . . $ operator+(3d22f08efddf8107)." " : QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("B")+cxx . . $ operator+(3d22f08efddf8107)." "); |
| 1320 | s.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(QStringcxx . . $ QString#QString(f2c90172ce699d92).(QCharcxx . . $ QChar#(static_cast<const char>('A' + (lastX<9?lastX:lastX+1) - 1))) +cxx . . $ operator+(fab9b4f80031f353). |
| 1321 | QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(getBoardSizecxx . . $ BoardWindow#getBoardSize(455f465bc33b4cdf).()-lastY+1) +cxx . . $ operator+(3d22f08efddf8107). ")"); |
| 1322 | } |
| 1323 | |
| 1324 | //pass move |
| 1325 | else if (lastX == PASS_XYcxx . . $ `src/defines.h:38:9`! && lastY == PASS_XYcxx . . $ `src/defines.h:38:9`!) |
| 1326 | { |
| 1327 | s.appendcxx . . $ QString#append(d02845eef0c33901).(" ("); |
| 1328 | s.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(black ? QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("W")+cxx . . $ operator+(3d22f08efddf8107)." " : QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("B")+cxx . . $ operator+(3d22f08efddf8107)." "); |
| 1329 | s.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Pass") +cxx . . $ operator+(3d22f08efddf8107). ")"); |
| 1330 | } |
| 1331 | |
| 1332 | moveNumLabelcxx . . $ BoardWindow#moveNumLabel.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(s); |
| 1333 | |
| 1334 | // set turn information (and color on the edit button) |
| 1335 | s =cxx . . $ QString#`operator=`(4f35bf974e7f8568). black ? QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Black to play") : QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("White to play"); |
| 1336 | uicxx . . $ BoardWindow#ui.->turnLabelcxx . . $ Ui_BoardWindow#turnLabel.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(s); |
| 1337 | |
| 1338 | uicxx . . $ BoardWindow#ui.->colorButtoncxx . . $ Ui_BoardWindow#colorButton.->setIconcxx . . $ QAbstractButton#setIcon(71dcdac178620ed6).(black ? QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/boardicons/resources/pics/stone_black.png"cxx . . $ QString#QString(85c52e162fed56f9).) : QIconcxx . . $ QIcon#QIcon(3520e46b33348bf6).(":/boardicons/resources/pics/stone_white.png"cxx . . $ QString#QString(85c52e162fed56f9).) ); |
| 1339 | |
| 1340 | // sons and variatons display |
| 1341 | s =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 1342 | s.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(brothers)); |
| 1343 | if (brothers == 1) |
| 1344 | s.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("brother") +cxx . . $ operator+(3d22f08efddf8107). "\n"); |
| 1345 | else |
| 1346 | s.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("brothers") +cxx . . $ operator+(3d22f08efddf8107). "\n"); |
| 1347 | |
| 1348 | s.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(sons)); |
| 1349 | if (sons == 1) |
| 1350 | s.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("son")); |
| 1351 | else |
| 1352 | s.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("sons")); |
| 1353 | uicxx . . $ BoardWindow#ui.->varLabelcxx . . $ Ui_BoardWindow#varLabel.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(s); |
| 1354 | |
| 1355 | if(getGameModecxx . . $ BoardWindow#getGameMode(a60569f3cb1b846).() == modeReviewcxx . . $ modeReview.) |
| 1356 | { |
| 1357 | /* For now, just disable navigation if its in the review mode, they can always duplicate |
| 1358 | * the board and a lot more is necessary for qgo to do reviews. */ |
| 1359 | uicxx . . $ BoardWindow#ui.->toolBar_Navigationcxx . . $ Ui_BoardWindow#toolBar_Navigation.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 1360 | uicxx . . $ BoardWindow#ui.->slidercxx . . $ Ui_BoardWindow#slider.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 1361 | } |
| 1362 | else if (getGameModecxx . . $ BoardWindow#getGameMode(a60569f3cb1b846).() == modeEditcxx . . $ modeEdit. || getGameModecxx . . $ BoardWindow#getGameMode(a60569f3cb1b846).() == modeObservecxx . . $ modeObserve. )//|| board->getGameMode() == modeEdit) |
| 1363 | { |
| 1364 | // Update the toolbar buttons |
| 1365 | uicxx . . $ BoardWindow#ui.->toolBar_Navigationcxx . . $ Ui_BoardWindow#toolBar_Navigation.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1366 | uicxx . . $ BoardWindow#ui.->slidercxx . . $ Ui_BoardWindow#slider.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 1367 | } |
| 1368 | |
| 1369 | // Update slider |
| 1370 | uicxx . . $ BoardWindow#ui.->slidercxx . . $ Ui_BoardWindow#slider.->blockSignalscxx . . $ QObject#blockSignals(4264aff4942d46ac).(true); |
| 1371 | if (uicxx . . $ BoardWindow#ui.->slidercxx . . $ Ui_BoardWindow#slider.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).() < n) |
| 1372 | setSliderMaxcxx . . $ BoardWindow#setSliderMax(d4f767463ce0a6b3).(n); |
| 1373 | uicxx . . $ BoardWindow#ui.->slidercxx . . $ Ui_BoardWindow#slider.->setValuecxx . . $ QAbstractSlider#setValue(d4f767463ce0a6b3).(n); |
| 1374 | uicxx . . $ BoardWindow#ui.->slidercxx . . $ Ui_BoardWindow#slider.->blockSignalscxx . . $ QObject#blockSignals(4264aff4942d46ac).(false); |
| 1375 | } |
| 1376 | |
| 1377 | void BoardWindowcxx . . $ BoardWindow#::setUndoEnabledcxx . . $ BoardWindow#setUndoEnabled(b45ddcbc8423892c).(bool state) |
| 1378 | { |
| 1379 | uicxx . . $ BoardWindow#ui.->undoButtoncxx . . $ Ui_BoardWindow#undoButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(state); |
| 1380 | } |
| 1381 | |
| 1382 | void BoardWindowcxx . . $ BoardWindow#::setDrawEnabledcxx . . $ BoardWindow#setDrawEnabled(b45ddcbc8423892c).(bool state) |
| 1383 | { |
| 1384 | uicxx . . $ BoardWindow#ui.->drawButtoncxx . . $ Ui_BoardWindow#drawButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(state); |
| 1385 | } |
| 1386 | |
| 1387 | void BoardWindowcxx . . $ BoardWindow#::setCountEnabledcxx . . $ BoardWindow#setCountEnabled(b45ddcbc8423892c).(bool state) |
| 1388 | { |
| 1389 | uicxx . . $ BoardWindow#ui.->countButtoncxx . . $ Ui_BoardWindow#countButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(state); |
| 1390 | } |
| 1391 | |
| 1392 | void BoardWindowcxx . . $ BoardWindow#::setDoneEnabledcxx . . $ BoardWindow#setDoneEnabled(b45ddcbc8423892c).(bool state) |
| 1393 | { |
| 1394 | uicxx . . $ BoardWindow#ui.->doneButtoncxx . . $ Ui_BoardWindow#doneButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(state); |
| 1395 | } |
| 1396 | |
| 1397 | void BoardWindowcxx . . $ BoardWindow#::setAdjournEnabledcxx . . $ BoardWindow#setAdjournEnabled(b45ddcbc8423892c).(bool state) |
| 1398 | { |
| 1399 | uicxx . . $ BoardWindow#ui.->adjournButtoncxx . . $ Ui_BoardWindow#adjournButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(state); |
| 1400 | } |
| 1401 | |
| 1402 | void BoardWindowcxx . . $ BoardWindow#::setResignEnabledcxx . . $ BoardWindow#setResignEnabled(b45ddcbc8423892c).(bool state) |
| 1403 | { |
| 1404 | uicxx . . $ BoardWindow#ui.->resignButtoncxx . . $ Ui_BoardWindow#resignButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(state); |
| 1405 | } |
| 1406 | |
| 1407 | void BoardWindowcxx . . $ BoardWindow#::setObserverModelcxx . . $ BoardWindow#setObserverModel(c6e1f1e42522b780).(QAbstractItemModelcxx . . $ QAbstractItemModel# *model) |
| 1408 | { |
| 1409 | uicxx . . $ BoardWindow#ui.->observerViewcxx . . $ Ui_BoardWindow#observerView.->setModelcxx . . $ QTreeView#setModel(c6e1f1e42522b780).(model); |
| 1410 | } |
| 1411 | |
| 1412 | void BoardWindowcxx . . $ BoardWindow#::setTimeBlackcxx . . $ BoardWindow#setTimeBlack(7df51288a9ebd664).(QStringcxx . . $ QString# time) |
| 1413 | { |
| 1414 | uicxx . . $ BoardWindow#ui.->pb_timeBlackcxx . . $ Ui_BoardWindow#pb_timeBlack.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(time); |
| 1415 | } |
| 1416 | |
| 1417 | void BoardWindowcxx . . $ BoardWindow#::setTimeWhitecxx . . $ BoardWindow#setTimeWhite(7df51288a9ebd664).(QStringcxx . . $ QString# time) |
| 1418 | { |
| 1419 | uicxx . . $ BoardWindow#ui.->pb_timeWhitecxx . . $ Ui_BoardWindow#pb_timeWhite.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).(time); |
| 1420 | } |
| 1421 | |
| 1422 | void BoardWindowcxx . . $ BoardWindow#::warnTimeBlackcxx . . $ BoardWindow#warnTimeBlack(b6ded46d2248065c).(TimeWarnStatecxx . . $ TimeWarnState# state) |
| 1423 | { |
| 1424 | switch (state) |
| 1425 | { |
| 1426 | case TimeOKcxx . . $ TimeOK.: |
| 1427 | if(uicxx . . $ BoardWindow#ui.->pb_timeBlackcxx . . $ Ui_BoardWindow#pb_timeBlack.->palettecxx . . $ QWidget#palette(a7bd6a16d2c88209).().colorcxx . . $ QPalette#color(a08a5ea14130e12).(QPalettecxx . . $ QPalette#::Backgroundcxx . . $ QPalette#Background.) !=cxx . . $ QColor#`operator!=`(8df5130dab4f572b). Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::blackcxx . . $ Qt/black.) |
| 1428 | { |
| 1429 | uicxx . . $ BoardWindow#ui.->pb_timeBlackcxx . . $ Ui_BoardWindow#pb_timeBlack.->setPalettecxx . . $ QWidget#setPalette(f826ed73d5553cd5).(QPalettecxx . . $ QPalette#QPalette(cd98eb3c6d110ca7).(Qtcxx . . $ Qt/::blackcxx . . $ Qt/black.)); |
| 1430 | #if defined(Q_OS_WIN) || defined(Q_OS_MAC) |
| 1431 | /* Otherwise windows XP/Mac style makes time buttons ugly white on white. |
| 1432 | * This could interfere with blinking warning. */ |
| 1433 | ui->pb_timeBlack->setStyleSheet("background-color: black; color: white"); |
| 1434 | #endif //Q_OS_WIN |
| 1435 | } |
| 1436 | return; |
| 1437 | case TimeLowcxx . . $ TimeLow.: |
| 1438 | if(uicxx . . $ BoardWindow#ui.->pb_timeBlackcxx . . $ Ui_BoardWindow#pb_timeBlack.->palettecxx . . $ QWidget#palette(a7bd6a16d2c88209).().colorcxx . . $ QPalette#color(a08a5ea14130e12).(QPalettecxx . . $ QPalette#::Backgroundcxx . . $ QPalette#Background.) ==cxx . . $ QColor#`operator==`(8df5130dab4f572b). Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::blackcxx . . $ Qt/black.) |
| 1439 | uicxx . . $ BoardWindow#ui.->pb_timeBlackcxx . . $ Ui_BoardWindow#pb_timeBlack.->setPalettecxx . . $ QWidget#setPalette(f826ed73d5553cd5).(QPalettecxx . . $ QPalette#QPalette(cd98eb3c6d110ca7).(Qtcxx . . $ Qt/::yellowcxx . . $ Qt/yellow.)); |
| 1440 | else |
| 1441 | uicxx . . $ BoardWindow#ui.->pb_timeBlackcxx . . $ Ui_BoardWindow#pb_timeBlack.->setPalettecxx . . $ QWidget#setPalette(f826ed73d5553cd5).(QPalettecxx . . $ QPalette#QPalette(cd98eb3c6d110ca7).(Qtcxx . . $ Qt/::blackcxx . . $ Qt/black.)); |
| 1442 | return; |
| 1443 | case TimeExpiredcxx . . $ TimeExpired.: |
| 1444 | uicxx . . $ BoardWindow#ui.->pb_timeBlackcxx . . $ Ui_BoardWindow#pb_timeBlack.->setPalettecxx . . $ QWidget#setPalette(f826ed73d5553cd5).(QPalettecxx . . $ QPalette#QPalette(cd98eb3c6d110ca7).(Qtcxx . . $ Qt/::redcxx . . $ Qt/red.)); |
| 1445 | } |
| 1446 | } |
| 1447 | |
| 1448 | void BoardWindowcxx . . $ BoardWindow#::warnTimeWhitecxx . . $ BoardWindow#warnTimeWhite(b6ded46d2248065c).(TimeWarnStatecxx . . $ TimeWarnState# state) |
| 1449 | { |
| 1450 | switch (state) |
| 1451 | { |
| 1452 | case TimeOKcxx . . $ TimeOK.: |
| 1453 | if(uicxx . . $ BoardWindow#ui.->pb_timeWhitecxx . . $ Ui_BoardWindow#pb_timeWhite.->palettecxx . . $ QWidget#palette(a7bd6a16d2c88209).().colorcxx . . $ QPalette#color(a08a5ea14130e12).(QPalettecxx . . $ QPalette#::Backgroundcxx . . $ QPalette#Background.) !=cxx . . $ QColor#`operator!=`(8df5130dab4f572b). Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::blackcxx . . $ Qt/black.) |
| 1454 | { |
| 1455 | uicxx . . $ BoardWindow#ui.->pb_timeWhitecxx . . $ Ui_BoardWindow#pb_timeWhite.->setPalettecxx . . $ QWidget#setPalette(f826ed73d5553cd5).(QPalettecxx . . $ QPalette#QPalette(cd98eb3c6d110ca7).(Qtcxx . . $ Qt/::blackcxx . . $ Qt/black.)); |
| 1456 | #if defined(Q_OS_WIN) || defined(Q_OS_MAC) |
| 1457 | /* Otherwise windows XP/Mac style makes time buttons ugly white on white. |
| 1458 | * This could interfere with blinking warning. */ |
| 1459 | ui->pb_timeWhite->setStyleSheet("background-color: black; color: white"); |
| 1460 | #endif //Q_OS_WIN |
| 1461 | } |
| 1462 | return; |
| 1463 | case TimeLowcxx . . $ TimeLow.: |
| 1464 | if(uicxx . . $ BoardWindow#ui.->pb_timeWhitecxx . . $ Ui_BoardWindow#pb_timeWhite.->palettecxx . . $ QWidget#palette(a7bd6a16d2c88209).().colorcxx . . $ QPalette#color(a08a5ea14130e12).(QPalettecxx . . $ QPalette#::Backgroundcxx . . $ QPalette#Background.) ==cxx . . $ QColor#`operator==`(8df5130dab4f572b). Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::blackcxx . . $ Qt/black.) |
| 1465 | uicxx . . $ BoardWindow#ui.->pb_timeWhitecxx . . $ Ui_BoardWindow#pb_timeWhite.->setPalettecxx . . $ QWidget#setPalette(f826ed73d5553cd5).(QPalettecxx . . $ QPalette#QPalette(cd98eb3c6d110ca7).(Qtcxx . . $ Qt/::yellowcxx . . $ Qt/yellow.)); |
| 1466 | else |
| 1467 | uicxx . . $ BoardWindow#ui.->pb_timeWhitecxx . . $ Ui_BoardWindow#pb_timeWhite.->setPalettecxx . . $ QWidget#setPalette(f826ed73d5553cd5).(QPalettecxx . . $ QPalette#QPalette(cd98eb3c6d110ca7).(Qtcxx . . $ Qt/::blackcxx . . $ Qt/black.)); |
| 1468 | return; |
| 1469 | case TimeExpiredcxx . . $ TimeExpired.: |
| 1470 | uicxx . . $ BoardWindow#ui.->pb_timeWhitecxx . . $ Ui_BoardWindow#pb_timeWhite.->setPalettecxx . . $ QWidget#setPalette(f826ed73d5553cd5).(QPalettecxx . . $ QPalette#QPalette(cd98eb3c6d110ca7).(Qtcxx . . $ Qt/::redcxx . . $ Qt/red.)); |
| 1471 | } |
| 1472 | } |
| 1473 | |
| 1474 | void BoardWindowcxx . . $ BoardWindow#::displayCommentcxx . . $ BoardWindow#displayComment(7df51288a9ebd664).(QStringcxx . . $ QString# comment) |
| 1475 | { |
| 1476 | // add comments to SGF/tree FIXME |
| 1477 | QStringcxx . . $ QString# txt = treecxx . . $ QString#QString(132dd6869045752b).->getCurrentcxx . . $ Tree#getCurrent(8db4894deadf6b2c).()->getCommentcxx . . $ Move#getComment(d436534e89c8f252).(); |
| 1478 | if(getGamePhasecxx . . $ BoardWindow#getGamePhase(5e5c74c0ced0b080).() != phaseEndedcxx . . $ phaseEnded.) |
| 1479 | txt.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(comment); |
| 1480 | treecxx . . $ BoardWindow#tree.->getCurrentcxx . . $ Tree#getCurrent(8db4894deadf6b2c).()->setCommentcxx . . $ Move#setComment(3520e46b33348bf6).(txt); |
| 1481 | |
| 1482 | uicxx . . $ BoardWindow#ui.->commentEditcxx . . $ Ui_BoardWindow#commentEdit.->appendcxx . . $ QTextEdit#append(3520e46b33348bf6).(comment); |
| 1483 | /* Should probably update the history in a central location |
| 1484 | * and update display automatically, |
| 1485 | * but this is not implemented yet */ |
| 1486 | } |
| 1487 | |
| 1488 | /* |
| 1489 | * modifies the maximum value of the slider (used when a move is added) |
| 1490 | */ |
| 1491 | void BoardWindowcxx . . $ BoardWindow#::setSliderMaxcxx . . $ BoardWindow#setSliderMax(d4f767463ce0a6b3).(int n) |
| 1492 | { |
| 1493 | if (n < 0) |
| 1494 | n = 0; |
| 1495 | |
| 1496 | if (n == uicxx . . $ BoardWindow#ui.->slidercxx . . $ Ui_BoardWindow#slider.->maximumcxx . . $ QAbstractSlider#maximum(455f465bc33b4cdf).()) |
| 1497 | return; |
| 1498 | |
| 1499 | uicxx . . $ BoardWindow#ui.->slidercxx . . $ Ui_BoardWindow#slider.->blockSignalscxx . . $ QObject#blockSignals(4264aff4942d46ac). (true); |
| 1500 | uicxx . . $ BoardWindow#ui.->slidercxx . . $ Ui_BoardWindow#slider.->setMaximumcxx . . $ QAbstractSlider#setMaximum(d4f767463ce0a6b3).(n); |
| 1501 | uicxx . . $ BoardWindow#ui.->slidercxx . . $ Ui_BoardWindow#slider.->blockSignalscxx . . $ QObject#blockSignals(4264aff4942d46ac). (false); |
| 1502 | uicxx . . $ BoardWindow#ui.->sliderRightLabelcxx . . $ Ui_BoardWindow#sliderRightLabel.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(n)); |
| 1503 | } |