8
#include "preferences.h"
10
#include "mainwidget.h"
13
#include <qmainwindow.h>
16
#include <qlistview.h>
19
class InterfaceHandler;
24
class QNewGameDlg; //SL added eb 12
28
class MainWindow : public QMainWindow, public Misc<QString>
33
MainWindow(QWidget* parent = 0, const char* name = 0, WFlags f = WType_TopLevel);
35
InterfaceHandler* getInterfaceHandler() const { return interfaceHandler; }
36
Board* getBoard() const { return board; }
37
void setApplicationStyle();
38
bool preferencesAccept();
39
void doOpen(const QString &fileName, const QString &filter=0, bool storedir=true);
40
bool startComputerPlay(QNewGameDlg * dlg,const QString &fileName, const QString &filter, const QString &computer_path);
41
int checkModified(bool interactive=true);
43
static QString getFileExtension(const QString &fileName, bool defaultExt=true);
44
void doScore(bool toggle) { mainWidget->doScore(toggle); }
45
void doRealScore(bool toggle) { mainWidget->doRealScore(toggle); }
46
MainWidget *getMainWidget() { return mainWidget; }
47
bool reStoreWindowSize(QString, bool);
48
bool preferencesSave(PreferencesDialog*);
50
void addObserver(const QString &name);
51
void clearObserver() { ListView_observers->clear(); }
52
QListView *getListView_observers() { return ListView_observers; }
53
void updateObserverCnt();
54
void setParent(qGoIF *w) { parent_ = w; }
55
qGoIF *getParent() { return parent_; }
56
void dlgSetPreferences(int tab=-1);
57
QAction *get_fileQuit() { return fileQuit; }
58
QAction *get_fileClose() { return fileClose; }
59
int blackPlayerType, whitePlayerType ;
66
void keyPressEvent(QKeyEvent *e);
67
void closeEvent(QCloseEvent *e);
68
bool doSave(QString fileName, bool force=false);
69
void rememberLastDir(const QString &file);
70
// bool eventFilter( QObject *obj, QEvent *ev ); //SL added eb 11
73
void signal_closeevent();
76
void slotFileNewBoard();
77
void slotFileNewGame();
81
bool slotFileSaveAs();
82
void slotFileImportASCII();
83
void slotFileImportASCIIClipB();
84
void slotFileExportASCII();
85
void slotFileImportSgfClipB();
86
void slotFileExportSgfClipB();
87
void slotFileExportPic();
88
void slotFileExportPicClipB();
91
void slotEditPasteBrother();
92
void slotEditDelete();
93
void slotEditNumberMoves();
94
void slotEditMarkBrothers();
95
void slotEditMarkSons();
96
void slotNavBackward();
97
void slotNavForward();
100
void slotNavLastByTime();
101
void slotNavNextVar();
102
void slotNavPrevVar();
103
void slotNavNextComment(); //added
104
void slotNavPrevComment(); //end add
105
void slotNavIntersection(); //SL added eb 11
106
void slotNavMainBranch();
107
void slotNavStartVar();
108
void slotNavNextBranch();
109
void slotNavNthMove();
110
void slotNavAutoplay(bool toggle);
111
void slotNavEmptyBranch();
112
void slotNavCloneNode();
113
void slotNavSwapVariations();
114
void slotSetPreferences();
115
void slotSetGameInfo();
116
void slotViewFileBar(bool toggle);
117
void slotViewToolBar(bool toggle);
118
void slotViewEditBar(bool toggle);
119
void slotViewMenuBar(bool toggle);
120
void slotViewStatusBar(bool toggle);
121
void slotViewCoords(bool toggle);
122
void slotViewSlider(bool toggle);
123
void slotViewLeftSidebar();
124
void slotViewSidebar(bool toggle);
125
void slotViewComment(bool toggle);
126
void slotViewVertComment(bool toggle);
127
void slotViewPinComment(bool toggle);
128
void slotViewIncreaseSize();
129
void slotViewDecreaseSize();
130
void slotViewSaveSize();
131
void slotViewFullscreen(bool toggle);
132
void slotHelpManual();
133
void slotHelpSoundInfo();
134
void slotHelpAbout();
135
void slotHelpAboutQt();
136
void slotToggleMarks();
137
void slotTimerForward();
138
void slot_editBoardInNewWindow();
139
void slot_animateClick();
144
InterfaceHandler *interfaceHandler;
145
MainWidget *mainWidget;
148
// HelpViewer *helpViewer;
149
StatusTip *statusTip;
150
QLabel *statusMode, *statusTurn, *statusMark, *statusNav;
152
QSplitter *splitter, *splitter_comment;
153
// QMultiLineEdit *commentEdit;
154
QTextEdit *commentEdit;
155
QLineEdit *commentEdit2;
156
QListView *ListView_observers;
158
QToolBar *fileBar, *toolBar, *editBar;
160
QPopupMenu *fileMenu, *importExportMenu, *editMenu, *navMenu, *settingsMenu, *viewMenu, *helpMenu;
162
QAction *escapeFocus, *toggleEdit, *toggleMarks;
163
QAction *fileNewBoard,*fileNew, *fileOpen, *fileSave, *fileSaveAs, *fileClose,
164
*fileImportASCII, *fileImportASCIIClipB,*fileExportASCII,
165
*fileImportSgfClipB, *fileExportSgfClipB,
166
*fileExportPic, *fileExportPicClipB,
168
QAction *editCut, *editPaste, *editPasteBrother, *editDelete, *editNumberMoves, *editMarkBrothers,
170
QAction *navBackward, *navForward, *navFirst, *navLast, *navNextVar, *navPrevVar,
171
*navMainBranch, *navStartVar, *navNextBranch, *navNthMove, *navAutoplay, *navEmptyBranch,
172
*navCloneNode, *navSwapVariations, *navNextComment, *navPrevComment, *navIntersection ; //SL added eb 11 // added eb the 2 last
173
QAction *setPreferences, *setGameInfo;
174
QAction *viewFileBar, *viewToolBar, *viewEditBar, *viewMenuBar, *viewStatusBar, *viewCoords,
175
*viewSlider, *viewSidebar, *viewComment, *viewVertComment, *viewPinComment, *viewIncreaseSize,
176
*viewDecreaseSize, *viewSaveSize, *viewFullscreen;
177
QAction *helpManual, *helpSoundInfo, *helpAboutApp, *helpAboutQt;
180
float timerIntervals[6];
183
QGridLayout *mainWidgetGuiLayout;