This commit is contained in:
doitux
2007-02-01 02:18:59 +00:00
parent 1bcfcedd9b
commit 50a6bb8c12
10 changed files with 73 additions and 136 deletions
+2 -2
View File
@@ -19,8 +19,8 @@
***************************************************************************/ ***************************************************************************/
#include "aboutpokerthimpl.h" #include "aboutpokerthimpl.h"
aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, const char *name) aboutPokerthImpl::aboutPokerthImpl(QWidget *parent)
: QDialog(parent, name) : QDialog(parent)
{ {
setupUi(this); setupUi(this);
+1 -1
View File
@@ -26,7 +26,7 @@
class aboutPokerthImpl: public QDialog, public Ui::aboutPokerth { class aboutPokerthImpl: public QDialog, public Ui::aboutPokerth {
Q_OBJECT Q_OBJECT
public: public:
aboutPokerthImpl(QWidget *parent = 0, const char *name = 0); aboutPokerthImpl(QWidget *parent = 0);
}; };
#endif #endif
+3 -9
View File
@@ -47,8 +47,8 @@ const int maxQuantityPlayersConst = 5;
using namespace std; using namespace std;
mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name) mainWindowImpl::mainWindowImpl(QMainWindow *parent)
: QMainWindow(parent, name), actualGame(0), actualHand(0), mySession(0), maxQuantityPlayers(maxQuantityPlayersConst), gameSpeed(0), debugMode(0), breakAfterActualHand(FALSE) : QMainWindow(parent), actualGame(0), actualHand(0), mySession(0), maxQuantityPlayers(maxQuantityPlayersConst), gameSpeed(0), debugMode(0), breakAfterActualHand(FALSE)
{ {
int i; int i;
@@ -57,13 +57,6 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
QFont tmpFont("Nimbus Sans L",9); QFont tmpFont("Nimbus Sans L",9);
QApplication::setFont(tmpFont); QApplication::setFont(tmpFont);
// Programmverzeichnis erstellen
QDir progDir1;
QDir progDir2;
progDir1.setPath(QDir::home().absPath()+"/.pokerth/");
if ( !progDir1.exists() ) { progDir1.mkdir(progDir1.absPath()); }
myConfig = new ConfigFile; myConfig = new ConfigFile;
setupUi(this); setupUi(this);
@@ -177,6 +170,7 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name)
//Toolbox verstecken? //Toolbox verstecken?
if (!myConfig->readConfigInt("ShowToolBox", 1)) { groupBox_tools->hide(); } if (!myConfig->readConfigInt("ShowToolBox", 1)) { groupBox_tools->hide(); }
//Intro abspielen?
if (myConfig->readConfigInt("ShowIntro", 1)) { if (myConfig->readConfigInt("ShowIntro", 1)) {
label_logo->hide(); label_logo->hide();
QTimer::singleShot(100, this, SLOT( paintStartSplash() )); } QTimer::singleShot(100, this, SLOT( paintStartSplash() )); }
+1 -1
View File
@@ -44,7 +44,7 @@ class QColor;
class mainWindowImpl: public QMainWindow, public Ui::mainWindow { class mainWindowImpl: public QMainWindow, public Ui::mainWindow {
Q_OBJECT Q_OBJECT
public: public:
mainWindowImpl(QMainWindow *parent = 0, const char *name = 0 ); mainWindowImpl(QMainWindow *parent = 0 );
void setGame(Game*); void setGame(Game*);
void setHand(HandInterface*); void setHand(HandInterface*);
+59 -117
View File
@@ -5,8 +5,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>277</width> <width>280</width>
<height>243</height> <height>241</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle" >
@@ -39,18 +39,15 @@
<property name="minimum" > <property name="minimum" >
<number>1</number> <number>1</number>
</property> </property>
<property name="singleStep" >
<number>1</number>
</property>
<property name="value" > <property name="value" >
<number>4</number> <number>4</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0" colspan="2" > <item row="4" column="0" >
<widget class="QLabel" name="label_14" > <widget class="QLabel" name="label_5" >
<property name="text" > <property name="text" >
<string>Hands before raise Small Blind</string> <string>Game Speed:</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -64,26 +61,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Game-Speed</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2" >
<widget class="QSpinBox" name="spinBox_quantityPlayers" >
<property name="maximum" >
<number>5</number>
</property>
<property name="minimum" >
<number>2</number>
</property>
<property name="value" >
<number>5</number>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2" > <item row="2" column="1" colspan="2" >
<widget class="QSpinBox" name="spinBox_smallBlind" > <widget class="QSpinBox" name="spinBox_smallBlind" >
<property name="maximum" > <property name="maximum" >
@@ -97,6 +74,40 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" colspan="2" >
<widget class="QSpinBox" name="spinBox_quantityPlayers" >
<property name="maximum" >
<number>5</number>
</property>
<property name="minimum" >
<number>2</number>
</property>
<property name="value" >
<number>5</number>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Number of Players:</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Start Cash:</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Small Blind:</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2" > <item row="1" column="1" colspan="2" >
<widget class="QSpinBox" name="spinBox_startCash" > <widget class="QSpinBox" name="spinBox_startCash" >
<property name="maximum" > <property name="maximum" >
@@ -110,24 +121,10 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0" > <item row="3" column="0" colspan="2" >
<widget class="QLabel" name="label_4" > <widget class="QLabel" name="label_4" >
<property name="text" > <property name="text" >
<string>Number of Players</string> <string>Hands before raise Small Blind:</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Small Blind</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Start Cash</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -135,103 +132,48 @@
</widget> </widget>
</item> </item>
<item row="1" column="0" > <item row="1" column="0" >
<layout class="QHBoxLayout" > <widget class="QDialogButtonBox" name="buttonBox" >
<property name="margin" > <property name="orientation" >
<number>0</number> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="spacing" > <property name="standardButtons" >
<number>6</number> <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
</property> </property>
<item> </widget>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="buttonOk" >
<property name="text" >
<string>O&amp;K</string>
</property>
<property name="shortcut" >
<string>Alt+K</string>
</property>
<property name="autoDefault" >
<bool>true</bool>
</property>
<property name="default" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="buttonCancel" >
<property name="text" >
<string>Cancel</string>
</property>
<property name="shortcut" >
<string/>
</property>
<property name="autoDefault" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
<layoutdefault spacing="6" margin="11" />
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
<tabstops>
<tabstop>spinBox_quantityPlayers</tabstop>
<tabstop>spinBox_startCash</tabstop>
<tabstop>spinBox_smallBlind</tabstop>
<tabstop>spinBox_gameSpeed</tabstop>
<tabstop>buttonOk</tabstop>
<tabstop>buttonCancel</tabstop>
</tabstops>
<resources/> <resources/>
<connections> <connections>
<connection> <connection>
<sender>buttonOk</sender> <sender>buttonBox</sender>
<signal>clicked()</signal> <signal>accepted()</signal>
<receiver>newGameDialog</receiver> <receiver>newGameDialog</receiver>
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel" > <hint type="sourcelabel" >
<x>120</x> <x>248</x>
<y>201</y> <y>254</y>
</hint> </hint>
<hint type="destinationlabel" > <hint type="destinationlabel" >
<x>137</x> <x>157</x>
<y>100</y> <y>274</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
<connection> <connection>
<sender>buttonCancel</sender> <sender>buttonBox</sender>
<signal>clicked()</signal> <signal>rejected()</signal>
<receiver>newGameDialog</receiver> <receiver>newGameDialog</receiver>
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel" > <hint type="sourcelabel" >
<x>201</x> <x>316</x>
<y>201</y> <y>260</y>
</hint> </hint>
<hint type="destinationlabel" > <hint type="destinationlabel" >
<x>137</x> <x>286</x>
<y>100</y> <y>274</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
+2 -2
View File
@@ -20,8 +20,8 @@
#include "newgamedialogimpl.h" #include "newgamedialogimpl.h"
#include "configfile.h" #include "configfile.h"
newGameDialogImpl::newGameDialogImpl(QWidget *parent, const char *name) newGameDialogImpl::newGameDialogImpl(QWidget *parent)
: QDialog(parent, name) : QDialog(parent)
{ {
setupUi(this); setupUi(this);
+1 -1
View File
@@ -30,7 +30,7 @@
class newGameDialogImpl: public QDialog, public Ui::newGameDialog { class newGameDialogImpl: public QDialog, public Ui::newGameDialog {
Q_OBJECT Q_OBJECT
public: public:
newGameDialogImpl(QWidget *parent = 0, const char *name = 0); newGameDialogImpl(QWidget *parent = 0);
public slots: public slots:
+2 -2
View File
@@ -22,8 +22,8 @@
#include <iostream> #include <iostream>
settingsDialogImpl::settingsDialogImpl(QWidget *parent, const char *name) settingsDialogImpl::settingsDialogImpl(QWidget *parent)
: QDialog(parent, name) : QDialog(parent)
{ {
setupUi(this); setupUi(this);
+1 -1
View File
@@ -29,7 +29,7 @@
class settingsDialogImpl: public QDialog, public Ui::settingsDialog { class settingsDialogImpl: public QDialog, public Ui::settingsDialog {
Q_OBJECT Q_OBJECT
public: public:
settingsDialogImpl(QWidget *parent = 0, const char *name = 0); settingsDialogImpl(QWidget *parent = 0);
void setPlayerNickIsChanged(bool theValue){ playerNickIsChanged = theValue;} void setPlayerNickIsChanged(bool theValue){ playerNickIsChanged = theValue;}
bool getPlayerNickIsChanged() const{ return playerNickIsChanged;} bool getPlayerNickIsChanged() const{ return playerNickIsChanged;}
+1
View File
@@ -42,6 +42,7 @@ int main( int argc, char **argv )
/////// can be removed for non-qt-guis //////////// /////// can be removed for non-qt-guis ////////////
QApplication a( argc, argv ); QApplication a( argc, argv );
a.setStyle(new QPlastiqueStyle);
Q_INIT_RESOURCE(deck); Q_INIT_RESOURCE(deck);
/////////////////////////////////////////////////// ///////////////////////////////////////////////////