| 1 | /*************************************************************************** |
| 2 | * Copyright (C) 2004-2005 Artur Wiebe * |
| 3 | * [email protected] * |
| 4 | * * |
| 5 | * This program is free software; you can redistribute it and/or modify * |
| 6 | * it under the terms of the GNU General Public License as published by * |
| 7 | * the Free Software Foundation; either version 2 of the License, or * |
| 8 | * (at your option) any later version. * |
| 9 | * * |
| 10 | * This program is distributed in the hope that it will be useful, * |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 13 | * GNU General Public License for more details. * |
| 14 | * * |
| 15 | * You should have received a copy of the GNU General Public License * |
| 16 | * along with this program; if not, write to the * |
| 17 | * Free Software Foundation, Inc., * |
| 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
| 19 | ***************************************************************************/ |
| 20 | #ifndef _HISTORY_H_ |
| 21 | #define _HISTORY_H_cxx . . $ `src/history.h:21:9`! |
| 22 | |
| 23 | |
| 24 | #include <QFrame> |
| 25 | #include <QTreeWidget> |
| 26 | #include <QComboBox> |
| 27 | #include <QToolButton> |
| 28 | #include <QLabel> |
| 29 | |
| 30 | #include "pdn.h"cxx . . $ `<file>/src/pdn.h`/ |
| 31 | |
| 32 | |
| 33 | #define MOVE_SPLITcxx . . $ `src/history.h:33:9`! '#' |
| 34 | |
| 35 | |
| 36 | class myHistorycxx . . $ myHistory# : public QFramecxx . . $ QFrame# |
| 37 | { |
| 38 | Q_OBJECTcxx . . $ myHistory#staticMetaObject. |
| 39 | |
| 40 | public: |
| 41 | myHistorycxx . . $ myHistory#myHistory(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* parent); |
| 42 | ~cxx . . $ myHistory#`~myHistory`(ced63f7c635d850d).myHistorycxx . . $ myHistory#(); |
| 43 | |
| 44 | void newPdncxx . . $ myHistory#newPdn(37c160c81b6367f7).(const QStringcxx . . $ QString#& event, bool freeplace); |
| 45 | bool openPdncxx . . $ myHistory#openPdn(853723320e657e87).(const QStringcxx . . $ QString#& filename, QStringcxx . . $ QString#& log_text); |
| 46 | bool savePdncxx . . $ myHistory#savePdn(e1defb592416720d).(const QStringcxx . . $ QString#& fn); |
| 47 | |
| 48 | void clearcxx . . $ myHistory#clear(49f6e7a06ebc5aa8).(); |
| 49 | |
| 50 | bool isPausedcxx . . $ myHistory#isPaused(50ce9a9e25b4a850).() const { return m_pausedcxx . . $ myHistory#m_paused.; } |
| 51 | bool isFreePlacementcxx . . $ myHistory#isFreePlacement(50ce9a9e25b4a850).() const { return m_freeplacecxx . . $ myHistory#m_freeplace.; } |
| 52 | |
| 53 | void setTagcxx . . $ myHistory#setTag(843cca5850ba8ec7).(PdnGamecxx . . $ PdnGame#::Tagcxx . . $ PdnGame#Tag#, const QStringcxx . . $ QString#& val); |
| 54 | QStringcxx . . $ QString# getTagcxx . . $ myHistory#getTag(d9bcd7291d815d28).(PdnGamecxx . . $ PdnGame#::Tagcxx . . $ PdnGame#Tag#); |
| 55 | |
| 56 | void appendMovecxx . . $ myHistory#appendMove(c1427772cd1877b0).(const QStringcxx . . $ QString#& move, const QStringcxx . . $ QString#& comment); |
| 57 | // FIXME - provide a function that returns who is next, black or white. |
| 58 | int moveCountcxx . . $ myHistory#moveCount(455f465bc33b4cdf).() const { return m_movelistcxx . . $ myHistory#m_movelist.->topLevelItemCountcxx . . $ QTreeWidget#topLevelItemCount(455f465bc33b4cdf).()-1; } |
| 59 | |
| 60 | static QStringcxx . . $ QString# typeToStringcxx . . $ myHistory#typeToString(ce915ed341d4a7f0).(int type); |
| 61 | |
| 62 | void setCurrentcxx . . $ myHistory#setCurrent(3520e46b33348bf6).(const QStringcxx . . $ QString#& t) { m_currentcxx . . $ myHistory#m_current.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).(t); } |
| 63 | |
| 64 | signalscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:89:14`!: |
| 65 | void previewGamecxx . . $ myHistory#previewGame(d4f767463ce0a6b3).(int game_type); |
| 66 | void applyMovescxx . . $ myHistory#applyMoves(3520e46b33348bf6).(const QStringcxx . . $ QString#& moves); |
| 67 | void newModecxx . . $ myHistory#newMode(b0b38cda41d4ede4).(bool paused, bool freeplace); |
| 68 | |
| 69 | public slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 70 | void slotWorkingcxx . . $ myHistory#slotWorking(b45ddcbc8423892c).(bool); |
| 71 | |
| 72 | private slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 73 | void slot_movecxx . . $ myHistory#slot_move(5ef89140c59dd28e).(QTreeWidgetItemcxx . . $ QTreeWidgetItem#*, QTreeWidgetItemcxx . . $ QTreeWidgetItem#*); |
| 74 | void slot_game_selectedcxx . . $ myHistory#slot_game_selected(d4f767463ce0a6b3).(int index); |
| 75 | void slot_modify_tagcxx . . $ myHistory#slot_modify_tag(abbf99ae0f1fc9f0).(QTreeWidgetItemcxx . . $ QTreeWidgetItem#* item, int col); |
| 76 | void slot_modify_commentcxx . . $ myHistory#slot_modify_comment(abbf99ae0f1fc9f0).(QTreeWidgetItemcxx . . $ QTreeWidgetItem#* item, int col); |
| 77 | |
| 78 | void slot_undocxx . . $ myHistory#slot_undo(49f6e7a06ebc5aa8).(); |
| 79 | void slot_redocxx . . $ myHistory#slot_redo(49f6e7a06ebc5aa8).(); |
| 80 | void slot_continuecxx . . $ myHistory#slot_continue(49f6e7a06ebc5aa8).(); |
| 81 | |
| 82 | private: |
| 83 | QStringcxx . . $ QString# tag_to_stringcxx . . $ myHistory#tag_to_string(d9bcd7291d815d28).(PdnGamecxx . . $ PdnGame#::Tagcxx . . $ PdnGame#Tag#); |
| 84 | void set_modecxx . . $ myHistory#set_mode(b45ddcbc8423892c).(bool); |
| 85 | |
| 86 | void do_movescxx . . $ myHistory#do_moves(49f6e7a06ebc5aa8).(); |
| 87 | void history_undocxx . . $ myHistory#history_undo(b45ddcbc8423892c).(bool move_backwards); |
| 88 | void delete_movescxx . . $ myHistory#delete_moves(49f6e7a06ebc5aa8).(); |
| 89 | |
| 90 | |
| 91 | private: |
| 92 | QTreeWidgetcxx . . $ QTreeWidget#* m_taglistcxx . . $ myHistory#m_taglist.; |
| 93 | QTreeWidgetcxx . . $ QTreeWidget#* m_movelistcxx . . $ myHistory#m_movelist.; |
| 94 | QComboBoxcxx . . $ QComboBox#* m_gamelistcxx . . $ myHistory#m_gamelist.; |
| 95 | Pdncxx . . $ Pdn#* m_pdncxx . . $ myHistory#m_pdn.; |
| 96 | PdnGamecxx . . $ PdnGame#* m_gamecxx . . $ myHistory#m_game.; |
| 97 | |
| 98 | bool m_pausedcxx . . $ myHistory#m_paused.; |
| 99 | bool m_freeplacecxx . . $ myHistory#m_freeplace.; |
| 100 | bool m_disable_movescxx . . $ myHistory#m_disable_moves.; |
| 101 | |
| 102 | QToolButtoncxx . . $ QToolButton#* m_undocxx . . $ myHistory#m_undo.; |
| 103 | QToolButtoncxx . . $ QToolButton#* m_redocxx . . $ myHistory#m_redo.; |
| 104 | QToolButtoncxx . . $ QToolButton#* m_contcxx . . $ myHistory#m_cont.; |
| 105 | |
| 106 | QLabelcxx . . $ QLabel#* m_mode_iconcxx . . $ myHistory#m_mode_icon.; |
| 107 | QLabelcxx . . $ QLabel#* m_currentcxx . . $ myHistory#m_current.; |
| 108 | }; |
| 109 | |
| 110 | |
| 111 | #endif |
| 112 |