mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2024-12-25 21:59:30 +01:00
- Updated the INSTALL and NEWS files
- Fixed menu accelerator keys - The board font size should be proportional to the board size
This commit is contained in:
parent
990f4c5212
commit
3837e548d4
8 changed files with 747 additions and 653 deletions
23
INSTALL
23
INSTALL
|
@ -12,7 +12,7 @@ Run ./configure --help to have the list of available options.
|
||||||
Then, as root:
|
Then, as root:
|
||||||
make install
|
make install
|
||||||
|
|
||||||
No graphical interface is built by default, see below for more details.
|
See below for more details on the available interfaces.
|
||||||
|
|
||||||
|
|
||||||
* If you build from a release tarball, run the following commands:
|
* If you build from a release tarball, run the following commands:
|
||||||
|
@ -22,16 +22,17 @@ No graphical interface is built by default, see below for more details.
|
||||||
Then, as root:
|
Then, as root:
|
||||||
make install
|
make install
|
||||||
|
|
||||||
No graphical interface is built by default, see below for more details.
|
See below for more details on the available interfaces.
|
||||||
|
|
||||||
|
|
||||||
There are in fact several interfaces to Eliot:
|
There are in fact several interfaces to Eliot:
|
||||||
- one in text mode: mostly useful to debug Eliot
|
- one in text mode: mostly useful to debug Eliot
|
||||||
- one using the ncursesw library: nice but not really graphical
|
- one using the ncursesw library: nice and complete, but not really graphical
|
||||||
- a wxWidgets interface: complete, but it does not allow multiplayer
|
- a wxWidgets interface: working, but it does not allow multiplayer
|
||||||
modes, only training mode
|
modes, only training mode. This interface will disappear in version 1.8.
|
||||||
- a Qt interface: currently under construction, it will replace the
|
- a Qt interface: the best interface to use, it supports all the features.
|
||||||
wxWidgets interface when finished. It will support all Eliot features.
|
This one is enabled by default if Qt development files are detected, but
|
||||||
|
you can force it with --enable-qt
|
||||||
|
|
||||||
These interfaces can be enabled or disabled at configuration time. Example:
|
These interfaces can be enabled or disabled at configuration time. Example:
|
||||||
./configure --disable-text --enable-ncurses --disable-wxwidgets --enable-qt
|
./configure --disable-text --enable-ncurses --disable-wxwidgets --enable-qt
|
||||||
|
@ -58,8 +59,7 @@ Here are the steps for the cross-compilation:
|
||||||
cd extras/contrib && make all
|
cd extras/contrib && make all
|
||||||
|
|
||||||
Eliot dependencies (libiconv, boost, wxWidgets and Qt) will be downloaded
|
Eliot dependencies (libiconv, boost, wxWidgets and Qt) will be downloaded
|
||||||
and cross-compiled, except Qt, which is only downloaded. Install it with
|
and cross-compiled (except Qt, which is already compiled).
|
||||||
Wine, ignoring the warning that mingw is not found.
|
|
||||||
The dependencies are installed in 'extras/contrib/inst'
|
The dependencies are installed in 'extras/contrib/inst'
|
||||||
|
|
||||||
* build Eliot:
|
* build Eliot:
|
||||||
|
@ -67,7 +67,7 @@ Here are the steps for the cross-compilation:
|
||||||
- if you don't have the 'configure' script, generate it:
|
- if you don't have the 'configure' script, generate it:
|
||||||
./bootstrap
|
./bootstrap
|
||||||
|
|
||||||
- because of a bug in gettext, you need to apply a little patch to the files
|
- because of a bug in gettext, you may need to apply a little patch to the files
|
||||||
installed in the 'intl' directory:
|
installed in the 'intl' directory:
|
||||||
- download the patch here (link in the top-left-hand corner)
|
- download the patch here (link in the top-left-hand corner)
|
||||||
http://www.koders.com/noncode/fid46DF595700FEB564B6EF45BFF55067F95DCF0420.aspx
|
http://www.koders.com/noncode/fid46DF595700FEB564B6EF45BFF55067F95DCF0420.aspx
|
||||||
|
@ -76,6 +76,7 @@ Here are the steps for the cross-compilation:
|
||||||
|
|
||||||
- configure with the following command:
|
- configure with the following command:
|
||||||
export INST=`pwd`/extras/contrib/inst && \
|
export INST=`pwd`/extras/contrib/inst && \
|
||||||
|
PKG_CONFIG_PATH="${INST}/lib/pkgconfig:${PKG_CONFIG_PATH}" \
|
||||||
CPPFLAGS=-I${INST}/include LDFLAGS=-L${INST}/lib \
|
CPPFLAGS=-I${INST}/include LDFLAGS=-L${INST}/lib \
|
||||||
CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++ \
|
CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++ \
|
||||||
./configure --host=i586-mingw32msvc --build=i386-linux \
|
./configure --host=i586-mingw32msvc --build=i386-linux \
|
||||||
|
@ -84,3 +85,5 @@ Here are the steps for the cross-compilation:
|
||||||
|
|
||||||
- to compile, run 'make', possibly followed with 'make install'
|
- to compile, run 'make', possibly followed with 'make install'
|
||||||
|
|
||||||
|
- run 'make package-win32-zip' to get everything packed up in a nice .zip
|
||||||
|
|
||||||
|
|
24
NEWS
24
NEWS
|
@ -1,3 +1,27 @@
|
||||||
|
Changes between 1.6 and 1.7:
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Dictionary:
|
||||||
|
* Fixed regular expressions for non-ASCII languages
|
||||||
|
* Fixed bugs in the dictionary cmopression tool (compdic)
|
||||||
|
* The French translation of dictionary tools is now working on Windows
|
||||||
|
|
||||||
|
New Qt interface:
|
||||||
|
* Allows playing several types of games:
|
||||||
|
- Training game: allows to set the rack and place your solution,
|
||||||
|
like in the previous Eliot versions
|
||||||
|
- Duplicate game: play a duplicate game against human or computer players
|
||||||
|
- Free game: play a free game against human or computer players
|
||||||
|
* All these types of games can be joker games
|
||||||
|
* Computer level can be adjusted to have a challenging opponent
|
||||||
|
|
||||||
|
WxWidgets interface:
|
||||||
|
* This interface is still present (wxeliot binary) but will disappear in the
|
||||||
|
next release. Please indicate missing features in the new interface!
|
||||||
|
|
||||||
|
Build system:
|
||||||
|
* It is now much easier to cross-compile a version for Windows
|
||||||
|
|
||||||
Changes between 1.5 and 1.6:
|
Changes between 1.5 and 1.6:
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
|
513
po/eliot.pot
513
po/eliot.pot
File diff suppressed because it is too large
Load diff
|
@ -75,6 +75,11 @@ void BoardWidget::paintEvent(QPaintEvent *)
|
||||||
int size = std::min(width(), height());
|
int size = std::min(width(), height());
|
||||||
int squareSize = (int)floor((size - 1) / (BOARD_MAX - BOARD_MIN + 2));
|
int squareSize = (int)floor((size - 1) / (BOARD_MAX - BOARD_MIN + 2));
|
||||||
|
|
||||||
|
// The font must grow with the square size
|
||||||
|
QFont f = font();
|
||||||
|
f.setPixelSize(squareSize * 2 / 3);
|
||||||
|
setFont(f);
|
||||||
|
|
||||||
// XXX: Naive implementation: we repaint everything every time
|
// XXX: Naive implementation: we repaint everything every time
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
//painter.setPen(Qt::NoPen);
|
//painter.setPen(Qt::NoPen);
|
||||||
|
|
|
@ -68,6 +68,7 @@ MainWindow::MainWindow(QWidget *iParent)
|
||||||
m_historyWindow(NULL), m_dicToolsWindow(NULL), m_dicNameLabel(NULL)
|
m_historyWindow(NULL), m_dicToolsWindow(NULL), m_dicNameLabel(NULL)
|
||||||
{
|
{
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
|
createMenu();
|
||||||
readSettings();
|
readSettings();
|
||||||
|
|
||||||
// Initialize the random numbers generator
|
// Initialize the random numbers generator
|
||||||
|
@ -197,14 +198,14 @@ void MainWindow::updateForGame(const Game *iGame)
|
||||||
{
|
{
|
||||||
if (iGame == NULL)
|
if (iGame == NULL)
|
||||||
{
|
{
|
||||||
m_ui.action_GameSaveAs->setEnabled(false);
|
m_actionGameSaveAs->setEnabled(false);
|
||||||
m_ui.action_GamePrint->setEnabled(false);
|
m_actionGamePrint->setEnabled(false);
|
||||||
setWindowTitle(_q("No game") + " - Eliot");
|
setWindowTitle(_q("No game") + " - Eliot");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_ui.action_GameSaveAs->setEnabled(true);
|
m_actionGameSaveAs->setEnabled(true);
|
||||||
m_ui.action_GamePrint->setEnabled(true);
|
m_actionGamePrint->setEnabled(true);
|
||||||
if (iGame->getMode() == Game::kTRAINING)
|
if (iGame->getMode() == Game::kTRAINING)
|
||||||
{
|
{
|
||||||
setWindowTitle(_q("Training mode") + " - Eliot");
|
setWindowTitle(_q("Training mode") + " - Eliot");
|
||||||
|
@ -283,7 +284,69 @@ void MainWindow::readSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_action_GameNew_triggered()
|
QAction * MainWindow::addMenuAction(QMenu *menu, QString iText,
|
||||||
|
const QKeySequence &iShortcut,
|
||||||
|
QString iStatusTip, const char *iMember,
|
||||||
|
bool iCheckable)
|
||||||
|
{
|
||||||
|
QAction *action = new QAction(iText, this);
|
||||||
|
action->setShortcut(iShortcut);
|
||||||
|
action->setStatusTip(iStatusTip);
|
||||||
|
action->setCheckable(iCheckable);
|
||||||
|
QObject::connect(action, SIGNAL(triggered()), this, iMember);
|
||||||
|
menu->addAction(action);
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::createMenu()
|
||||||
|
{
|
||||||
|
QMenu *menuFile = new QMenu(m_ui.menubar);
|
||||||
|
m_ui.menubar->addAction(menuFile->menuAction());
|
||||||
|
menuFile->setTitle(_q("&Game"));
|
||||||
|
addMenuAction(menuFile, _q("&New..."), _q("Ctrl+N"),
|
||||||
|
_q("Start a new game"), SLOT(onGameNew()));
|
||||||
|
menuFile->addSeparator();
|
||||||
|
addMenuAction(menuFile, _q("&Load..."), _q("Ctrl+O"),
|
||||||
|
_q("Load an existing game"), SLOT(onGameLoad()));
|
||||||
|
m_actionGameSaveAs = addMenuAction(menuFile, _q("&Save as..."), _q("Ctrl+S"),
|
||||||
|
_q("Save the current game"), SLOT(onGameSaveAs()));
|
||||||
|
menuFile->addSeparator();
|
||||||
|
m_actionGamePrint = addMenuAction(menuFile, _q("&Print..."), _q("Ctrl+P"),
|
||||||
|
_q("Print the current game"), SLOT(onGamePrint()));
|
||||||
|
menuFile->addSeparator();
|
||||||
|
addMenuAction(menuFile, _q("&Quit"), _q("Ctrl+Q"),
|
||||||
|
_q("Quit Eliot"), SLOT(close()));
|
||||||
|
|
||||||
|
QMenu *menuSettings = new QMenu(m_ui.menubar);
|
||||||
|
m_ui.menubar->addAction(menuSettings->menuAction());
|
||||||
|
menuSettings->setTitle(_q("&Settings"));
|
||||||
|
addMenuAction(menuSettings, _q("&Choose dictionary..."), QString(""),
|
||||||
|
_q("Select a new dictionary"), SLOT(onSettingsChooseDic()));
|
||||||
|
addMenuAction(menuSettings, _q("&Preferences..."), _q("Ctrl+F"),
|
||||||
|
_q("Edit the preferences"), SLOT(onSettingsPreferences()));
|
||||||
|
|
||||||
|
QMenu *menuWindows = new QMenu(m_ui.menubar);
|
||||||
|
m_ui.menubar->addAction(menuWindows->menuAction());
|
||||||
|
menuWindows->setTitle(_q("&Windows"));
|
||||||
|
m_actionWindowsBag = addMenuAction(menuWindows, _q("&Bag"), _q("Ctrl+B"),
|
||||||
|
_q("Show/hide the remaining tiles in the bag"), SLOT(onWindowsBag()), true);
|
||||||
|
m_actionWindowsBoard = addMenuAction(menuWindows, _q("&External board"), _q("Ctrl+E"),
|
||||||
|
_q("Show/hide the external board"), SLOT(onWindowsBoard()), true);
|
||||||
|
m_actionWindowsHistory = addMenuAction(menuWindows, _q("&History"), _q("Ctrl+H"),
|
||||||
|
_q("Show/hide the game history"), SLOT(onWindowsHistory()), true);
|
||||||
|
m_actionWindowsDicTools = addMenuAction(menuWindows, _q("&Dictionary tools"), _q("Ctrl+D"),
|
||||||
|
_q("Show/hide the dictionary tools"), SLOT(onWindowsDicTools()), true);
|
||||||
|
|
||||||
|
QMenu *menuHelp = new QMenu(m_ui.menubar);
|
||||||
|
m_ui.menubar->addAction(menuHelp->menuAction());
|
||||||
|
menuHelp->setTitle(_q("&Help"));
|
||||||
|
addMenuAction(menuHelp, _q("&About..."), _q("Ctrl+A"),
|
||||||
|
_q("About Eliot"), SLOT(onHelpAbout()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::onGameNew()
|
||||||
{
|
{
|
||||||
if (m_dic == NULL)
|
if (m_dic == NULL)
|
||||||
{
|
{
|
||||||
|
@ -316,7 +379,7 @@ void MainWindow::on_action_GameNew_triggered()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_action_GameLoad_triggered()
|
void MainWindow::onGameLoad()
|
||||||
{
|
{
|
||||||
if (m_dic == NULL)
|
if (m_dic == NULL)
|
||||||
{
|
{
|
||||||
|
@ -343,7 +406,7 @@ void MainWindow::on_action_GameLoad_triggered()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_action_GameSaveAs_triggered()
|
void MainWindow::onGameSaveAs()
|
||||||
{
|
{
|
||||||
if (m_game == NULL)
|
if (m_game == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -358,7 +421,7 @@ void MainWindow::on_action_GameSaveAs_triggered()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_action_GamePrint_triggered()
|
void MainWindow::onGamePrint()
|
||||||
{
|
{
|
||||||
if (m_game == NULL)
|
if (m_game == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -504,7 +567,7 @@ void MainWindow::on_action_GamePrint_triggered()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_action_SettingsPreferences_triggered()
|
void MainWindow::onSettingsPreferences()
|
||||||
{
|
{
|
||||||
if (m_prefsDialog == NULL)
|
if (m_prefsDialog == NULL)
|
||||||
{
|
{
|
||||||
|
@ -516,7 +579,7 @@ void MainWindow::on_action_SettingsPreferences_triggered()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_action_SettingsChooseDic_triggered()
|
void MainWindow::onSettingsChooseDic()
|
||||||
{
|
{
|
||||||
if (m_game)
|
if (m_game)
|
||||||
{
|
{
|
||||||
|
@ -555,7 +618,7 @@ void MainWindow::on_action_SettingsChooseDic_triggered()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_action_WindowsBag_triggered()
|
void MainWindow::onWindowsBag()
|
||||||
{
|
{
|
||||||
if (m_bagWindow == NULL)
|
if (m_bagWindow == NULL)
|
||||||
{
|
{
|
||||||
|
@ -563,7 +626,7 @@ void MainWindow::on_action_WindowsBag_triggered()
|
||||||
BagWidget *bag = new BagWidget(NULL);
|
BagWidget *bag = new BagWidget(NULL);
|
||||||
bag->setGame(m_game);
|
bag->setGame(m_game);
|
||||||
m_bagWindow = new AuxWindow(*bag, _q("Bag"), "BagWindow",
|
m_bagWindow = new AuxWindow(*bag, _q("Bag"), "BagWindow",
|
||||||
m_ui.action_WindowsBag);
|
m_actionWindowsBag);
|
||||||
QObject::connect(this, SIGNAL(gameChanged(const Game*)),
|
QObject::connect(this, SIGNAL(gameChanged(const Game*)),
|
||||||
bag, SLOT(setGame(const Game*)));
|
bag, SLOT(setGame(const Game*)));
|
||||||
QObject::connect(this, SIGNAL(gameUpdated()),
|
QObject::connect(this, SIGNAL(gameUpdated()),
|
||||||
|
@ -573,7 +636,7 @@ void MainWindow::on_action_WindowsBag_triggered()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_action_WindowsBoard_triggered()
|
void MainWindow::onWindowsBoard()
|
||||||
{
|
{
|
||||||
if (m_boardWindow == NULL)
|
if (m_boardWindow == NULL)
|
||||||
{
|
{
|
||||||
|
@ -581,7 +644,7 @@ void MainWindow::on_action_WindowsBoard_triggered()
|
||||||
BoardWidget *board = new BoardWidget(NULL);
|
BoardWidget *board = new BoardWidget(NULL);
|
||||||
board->setGame(m_game);
|
board->setGame(m_game);
|
||||||
m_boardWindow = new AuxWindow(*board, _q("Board"), "BoardWindow",
|
m_boardWindow = new AuxWindow(*board, _q("Board"), "BoardWindow",
|
||||||
m_ui.action_WindowsBoard);
|
m_actionWindowsBoard);
|
||||||
QObject::connect(this, SIGNAL(gameChanged(const Game*)),
|
QObject::connect(this, SIGNAL(gameChanged(const Game*)),
|
||||||
board, SLOT(setGame(const Game*)));
|
board, SLOT(setGame(const Game*)));
|
||||||
QObject::connect(this, SIGNAL(gameUpdated()),
|
QObject::connect(this, SIGNAL(gameUpdated()),
|
||||||
|
@ -591,7 +654,7 @@ void MainWindow::on_action_WindowsBoard_triggered()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_action_WindowsHistory_triggered()
|
void MainWindow::onWindowsHistory()
|
||||||
{
|
{
|
||||||
if (m_historyWindow == NULL)
|
if (m_historyWindow == NULL)
|
||||||
{
|
{
|
||||||
|
@ -599,7 +662,7 @@ void MainWindow::on_action_WindowsHistory_triggered()
|
||||||
HistoryTabWidget *history = new HistoryTabWidget(NULL);
|
HistoryTabWidget *history = new HistoryTabWidget(NULL);
|
||||||
history->setGame(m_game);
|
history->setGame(m_game);
|
||||||
m_historyWindow = new AuxWindow(*history, _q("History"), "HistoryWindow",
|
m_historyWindow = new AuxWindow(*history, _q("History"), "HistoryWindow",
|
||||||
m_ui.action_WindowsHistory);
|
m_actionWindowsHistory);
|
||||||
QObject::connect(this, SIGNAL(gameChanged(const Game*)),
|
QObject::connect(this, SIGNAL(gameChanged(const Game*)),
|
||||||
history, SLOT(setGame(const Game*)));
|
history, SLOT(setGame(const Game*)));
|
||||||
QObject::connect(this, SIGNAL(gameUpdated()),
|
QObject::connect(this, SIGNAL(gameUpdated()),
|
||||||
|
@ -609,14 +672,14 @@ void MainWindow::on_action_WindowsHistory_triggered()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_action_WindowsDicTools_triggered()
|
void MainWindow::onWindowsDicTools()
|
||||||
{
|
{
|
||||||
if (m_dicToolsWindow == NULL)
|
if (m_dicToolsWindow == NULL)
|
||||||
{
|
{
|
||||||
// Create the window
|
// Create the window
|
||||||
DicToolsWidget *dicTools = new DicToolsWidget(NULL);
|
DicToolsWidget *dicTools = new DicToolsWidget(NULL);
|
||||||
m_dicToolsWindow = new AuxWindow(*dicTools, _q("Dictionary tools"), "DicTools",
|
m_dicToolsWindow = new AuxWindow(*dicTools, _q("Dictionary tools"), "DicTools",
|
||||||
m_ui.action_WindowsDicTools);
|
m_actionWindowsDicTools);
|
||||||
QObject::connect(this, SIGNAL(dicChanged(const Dictionary*)),
|
QObject::connect(this, SIGNAL(dicChanged(const Dictionary*)),
|
||||||
dicTools, SLOT(setDic(const Dictionary*)));
|
dicTools, SLOT(setDic(const Dictionary*)));
|
||||||
// Fake a dictionary selection
|
// Fake a dictionary selection
|
||||||
|
@ -627,7 +690,7 @@ void MainWindow::on_action_WindowsDicTools_triggered()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_action_HelpAbout_triggered()
|
void MainWindow::onHelpAbout()
|
||||||
{
|
{
|
||||||
QString msg;
|
QString msg;
|
||||||
msg.sprintf("Eliot %s\n\n", VERSION);
|
msg.sprintf("Eliot %s\n\n", VERSION);
|
||||||
|
|
|
@ -35,6 +35,7 @@ class NewGame;
|
||||||
class PrefsDialog;
|
class PrefsDialog;
|
||||||
class AuxWindow;
|
class AuxWindow;
|
||||||
class QLabel;
|
class QLabel;
|
||||||
|
class QAction;
|
||||||
|
|
||||||
class MainWindow: public QMainWindow
|
class MainWindow: public QMainWindow
|
||||||
{
|
{
|
||||||
|
@ -60,17 +61,17 @@ protected:
|
||||||
virtual void closeEvent(QCloseEvent * e);
|
virtual void closeEvent(QCloseEvent * e);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_action_GameNew_triggered();
|
void onGameNew();
|
||||||
void on_action_GameLoad_triggered();
|
void onGameLoad();
|
||||||
void on_action_GameSaveAs_triggered();
|
void onGameSaveAs();
|
||||||
void on_action_GamePrint_triggered();
|
void onGamePrint();
|
||||||
void on_action_SettingsChooseDic_triggered();
|
void onSettingsChooseDic();
|
||||||
void on_action_SettingsPreferences_triggered();
|
void onSettingsPreferences();
|
||||||
void on_action_WindowsBag_triggered();
|
void onWindowsBag();
|
||||||
void on_action_WindowsBoard_triggered();
|
void onWindowsBoard();
|
||||||
void on_action_WindowsHistory_triggered();
|
void onWindowsHistory();
|
||||||
void on_action_WindowsDicTools_triggered();
|
void onWindowsDicTools();
|
||||||
void on_action_HelpAbout_triggered();
|
void onHelpAbout();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform several updates when the game changes (title bar, status bar,
|
* Perform several updates when the game changes (title bar, status bar,
|
||||||
|
@ -97,13 +98,21 @@ private:
|
||||||
/// Dialog for the preferences
|
/// Dialog for the preferences
|
||||||
PrefsDialog *m_prefsDialog;
|
PrefsDialog *m_prefsDialog;
|
||||||
|
|
||||||
|
/// Actions enabled or disabled depending on the game state
|
||||||
|
QAction *m_actionGamePrint;
|
||||||
|
QAction *m_actionGameSaveAs;
|
||||||
|
|
||||||
static const char * m_windowName;
|
static const char * m_windowName;
|
||||||
|
|
||||||
/// Auxiliary windows
|
/// Auxiliary windows
|
||||||
//@{
|
//@{
|
||||||
|
QAction *m_actionWindowsBag;
|
||||||
AuxWindow *m_bagWindow;
|
AuxWindow *m_bagWindow;
|
||||||
|
QAction *m_actionWindowsBoard;
|
||||||
AuxWindow *m_boardWindow;
|
AuxWindow *m_boardWindow;
|
||||||
|
QAction *m_actionWindowsHistory;
|
||||||
AuxWindow *m_historyWindow;
|
AuxWindow *m_historyWindow;
|
||||||
|
QAction *m_actionWindowsDicTools;
|
||||||
AuxWindow *m_dicToolsWindow;
|
AuxWindow *m_dicToolsWindow;
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
@ -115,6 +124,15 @@ private:
|
||||||
/// Restore window state
|
/// Restore window state
|
||||||
void readSettings();
|
void readSettings();
|
||||||
|
|
||||||
|
/// Helper function to easemenu creation
|
||||||
|
QAction * addMenuAction(QMenu *menu, QString iText,
|
||||||
|
const QKeySequence &iShortcut,
|
||||||
|
QString iStatusTip, const char *iMember,
|
||||||
|
bool iCheckable = false);
|
||||||
|
|
||||||
|
/// Create the menu bar and the actions
|
||||||
|
void createMenu();
|
||||||
|
|
||||||
/// Destroy the current game (if any) and the associated widgets
|
/// Destroy the current game (if any) and the associated widgets
|
||||||
void destroyCurrentGame();
|
void destroyCurrentGame();
|
||||||
|
|
||||||
|
|
|
@ -75,46 +75,6 @@
|
||||||
<height>26</height>
|
<height>26</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile" >
|
|
||||||
<property name="title" >
|
|
||||||
<string>_("Game")</string>
|
|
||||||
</property>
|
|
||||||
<addaction name="action_GameNew" />
|
|
||||||
<addaction name="separator" />
|
|
||||||
<addaction name="action_GameLoad" />
|
|
||||||
<addaction name="action_GameSaveAs" />
|
|
||||||
<addaction name="separator" />
|
|
||||||
<addaction name="action_GamePrint" />
|
|
||||||
<addaction name="separator" />
|
|
||||||
<addaction name="action_GameQuit" />
|
|
||||||
</widget>
|
|
||||||
<widget class="QMenu" name="menuHelp" >
|
|
||||||
<property name="title" >
|
|
||||||
<string>_("Settings")</string>
|
|
||||||
</property>
|
|
||||||
<addaction name="action_SettingsChooseDic" />
|
|
||||||
<addaction name="action_SettingsPreferences" />
|
|
||||||
</widget>
|
|
||||||
<widget class="QMenu" name="menu_Help" >
|
|
||||||
<property name="title" >
|
|
||||||
<string>_("Help")</string>
|
|
||||||
</property>
|
|
||||||
<addaction name="action_HelpAbout" />
|
|
||||||
<addaction name="separator" />
|
|
||||||
</widget>
|
|
||||||
<widget class="QMenu" name="menu_Windows" >
|
|
||||||
<property name="title" >
|
|
||||||
<string>_("Windows")</string>
|
|
||||||
</property>
|
|
||||||
<addaction name="action_WindowsBag" />
|
|
||||||
<addaction name="action_WindowsBoard" />
|
|
||||||
<addaction name="action_WindowsHistory" />
|
|
||||||
<addaction name="action_WindowsDicTools" />
|
|
||||||
</widget>
|
|
||||||
<addaction name="menuFile" />
|
|
||||||
<addaction name="menuHelp" />
|
|
||||||
<addaction name="menu_Windows" />
|
|
||||||
<addaction name="menu_Help" />
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusbar" >
|
<widget class="QStatusBar" name="statusbar" >
|
||||||
<property name="geometry" >
|
<property name="geometry" >
|
||||||
|
@ -126,41 +86,6 @@
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<action name="action_SettingsChooseDic" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>_("Choose dictionary...")</string>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip" >
|
|
||||||
<string>_("Select a new dictionary")</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_HelpAbout" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>_("About...")</string>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip" >
|
|
||||||
<string>_("About Eliot")</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_GameQuit" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>_("Quit")</string>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip" >
|
|
||||||
<string>_("Quit Eliot")</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_GameNew" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>_("New...")</string>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip" >
|
|
||||||
<string>_("Start a new game")</string>
|
|
||||||
</property>
|
|
||||||
<property name="shortcut" >
|
|
||||||
<string>Ctrl+N</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_WindowsBag" >
|
<action name="action_WindowsBag" >
|
||||||
<property name="checkable" >
|
<property name="checkable" >
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -175,47 +100,6 @@
|
||||||
<string>Ctrl+B</string>
|
<string>Ctrl+B</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="action_SettingsPreferences" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>_("Preferences...")</string>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip" >
|
|
||||||
<string>_("Edit the preferences")</string>
|
|
||||||
</property>
|
|
||||||
<property name="shortcut" >
|
|
||||||
<string>Ctrl+F</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_GameSave" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>_("Save")</string>
|
|
||||||
</property>
|
|
||||||
<property name="shortcut" >
|
|
||||||
<string>Ctrl+S</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_GameLoad" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>_("Load...")</string>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip" >
|
|
||||||
<string>_("Load an existing game")</string>
|
|
||||||
</property>
|
|
||||||
<property name="shortcut" >
|
|
||||||
<string>Ctrl+O</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_GameSaveAs" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>_("Save as...")</string>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip" >
|
|
||||||
<string>_("Save the current game")</string>
|
|
||||||
</property>
|
|
||||||
<property name="shortcut" >
|
|
||||||
<string>Ctrl+S</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_WindowsBoard" >
|
<action name="action_WindowsBoard" >
|
||||||
<property name="checkable" >
|
<property name="checkable" >
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -244,17 +128,6 @@
|
||||||
<string>Ctrl+H</string>
|
<string>Ctrl+H</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="action_GamePrint" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>_("Print...")</string>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip" >
|
|
||||||
<string>_("Print the current game")</string>
|
|
||||||
</property>
|
|
||||||
<property name="shortcut" >
|
|
||||||
<string>Ctrl+P</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="action_WindowsDicTools" >
|
<action name="action_WindowsDicTools" >
|
||||||
<property name="checkable" >
|
<property name="checkable" >
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -273,22 +146,4 @@
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../eliot.qrc" />
|
<include location="../eliot.qrc" />
|
||||||
</resources>
|
</resources>
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>action_GameQuit</sender>
|
|
||||||
<signal>triggered()</signal>
|
|
||||||
<receiver>MainWindow</receiver>
|
|
||||||
<slot>close()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel" >
|
|
||||||
<x>-1</x>
|
|
||||||
<y>-1</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel" >
|
|
||||||
<x>260</x>
|
|
||||||
<y>215</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
</ui>
|
||||||
|
|
Loading…
Reference in a new issue