[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Eliot-dev] eliot/qt new_game.cpp new_game.h ui/new_game.ui
From: |
Olivier Teulière |
Subject: |
[Eliot-dev] eliot/qt new_game.cpp new_game.h ui/new_game.ui |
Date: |
Thu, 15 Jan 2009 18:33:33 +0000 |
CVSROOT: /cvsroot/eliot
Module name: eliot
Changes by: Olivier Teulière <ipkiss> 09/01/15 18:33:33
Modified files:
qt : new_game.cpp new_game.h
qt/ui : new_game.ui
Log message:
Support explosive games in the Qt interface
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/new_game.cpp?cvsroot=eliot&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/new_game.h?cvsroot=eliot&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/ui/new_game.ui?cvsroot=eliot&r1=1.3&r2=1.4
Patches:
Index: new_game.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/qt/new_game.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- new_game.cpp 30 Nov 2008 20:53:45 -0000 1.6
+++ new_game.cpp 15 Jan 2009 18:33:32 -0000 1.7
@@ -145,6 +145,8 @@
// Joker game?
if (checkBoxJoker->isChecked())
game->setVariant(PublicGame::kJOKER);
+ if (checkBoxExplosive->isChecked())
+ game->setVariant(PublicGame::kEXPLOSIVE);
return game;
}
@@ -216,6 +218,18 @@
m_model->removeRow(indexList.front().row());
}
+void NewGame::on_checkBoxJoker_stateChanged(int newState)
+{
+ if (newState == Qt::Checked)
+ checkBoxExplosive->setChecked(false);
+}
+
+
+void NewGame::on_checkBoxExplosive_stateChanged(int newState)
+{
+ if (newState == Qt::Checked)
+ checkBoxJoker->setChecked(false);
+}
PlayersTypeDelegate::PlayersTypeDelegate(QObject *parent)
Index: new_game.h
===================================================================
RCS file: /cvsroot/eliot/eliot/qt/new_game.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- new_game.h 30 Nov 2008 20:53:45 -0000 1.4
+++ new_game.h 15 Jan 2009 18:33:32 -0000 1.5
@@ -57,6 +57,8 @@
void on_comboBoxMode_activated(int);
void on_pushButtonAdd_clicked();
void on_pushButtonRemove_clicked();
+ void on_checkBoxJoker_stateChanged(int);
+ void on_checkBoxExplosive_stateChanged(int);
private:
/// Model of the players
Index: ui/new_game.ui
===================================================================
RCS file: /cvsroot/eliot/eliot/qt/ui/new_game.ui,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- ui/new_game.ui 3 Sep 2008 17:28:29 -0000 1.3
+++ ui/new_game.ui 15 Jan 2009 18:33:33 -0000 1.4
@@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>470</width>
- <height>390</height>
+ <width>473</width>
+ <height>425</height>
</rect>
</property>
<property name="windowTitle" >
@@ -22,6 +22,12 @@
<string>_("Game type")</string>
</property>
<layout class="QHBoxLayout" >
+ <property name="topMargin" >
+ <number>0</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>4</number>
+ </property>
<item>
<widget class="QLabel" name="label_3" >
<property name="text" >
@@ -62,12 +68,53 @@
</spacer>
</item>
<item>
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>_("Variant:")</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <property name="spacing" >
+ <number>2</number>
+ </property>
+ <property name="topMargin" >
+ <number>0</number>
+ </property>
+ <item>
<widget class="QCheckBox" name="checkBoxJoker" >
+ <property name="toolTip" >
+ <string>_("In a joker game, each rack contains a joker. When a word
containing
+the joker is played on the grid, the joker is then replaced by the
+corresponding letter from the bag, and the joker stays in the rack.
+When the corresponding letter is not present in the bag, the joker is
+placed on the board.
+This variant, particularly interesting in Duplicate mode, is good to train
+using the joker.")</string>
+ </property>
<property name="text" >
<string>_("Joker game")</string>
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="checkBoxExplosive" >
+ <property name="toolTip" >
+ <string>_("An explosive game is a bit like a joker game, except
than when the
+computer chooses the rack (containing a joker), it performs a search and
+finds the best word possible with the rack. Then, if possible, it replaces
+the joker in the rack with the letter allowing to play this best word.
+This variant, unlike the joker game, allows playing with a normal-looking
+rack, but it usually gives much higher scores than in a normal game.")</string>
+ </property>
+ <property name="text" >
+ <string>_("Explosive game")</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
</layout>
</widget>
</item>
@@ -195,6 +242,18 @@
</item>
</layout>
</widget>
+ <tabstops>
+ <tabstop>buttonBox</tabstop>
+ <tabstop>comboBoxMode</tabstop>
+ <tabstop>checkBoxJoker</tabstop>
+ <tabstop>checkBoxExplosive</tabstop>
+ <tabstop>treeViewPlayers</tabstop>
+ <tabstop>lineEditName</tabstop>
+ <tabstop>comboBoxType</tabstop>
+ <tabstop>spinBoxLevel</tabstop>
+ <tabstop>pushButtonAdd</tabstop>
+ <tabstop>pushButtonRemove</tabstop>
+ </tabstops>
<resources/>
<connections>
<connection>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Eliot-dev] eliot/qt new_game.cpp new_game.h ui/new_game.ui,
Olivier Teulière <=