This commit is contained in:
@@ -34,7 +34,7 @@ using namespace std;
|
||||
ConfigFile::ConfigFile()
|
||||
{
|
||||
// !!!! Revisionsnummer der Configdefaults !!!!!
|
||||
configRev = 13;
|
||||
configRev = 15;
|
||||
|
||||
// Pfad und Dateinamen setzen
|
||||
#ifdef _WIN32
|
||||
@@ -136,7 +136,7 @@ void ConfigFile::createDefaultConfig() {
|
||||
|
||||
TiXmlElement * confElement1 = new TiXmlElement( "NumberOfPlayers" );
|
||||
config->LinkEndChild( confElement1 );
|
||||
confElement1->SetAttribute("value", 5);
|
||||
confElement1->SetAttribute("value", 7);
|
||||
TiXmlElement * confElement2 = new TiXmlElement( "StartCash" );
|
||||
config->LinkEndChild( confElement2 );
|
||||
confElement2->SetAttribute("value", 2000);
|
||||
@@ -161,7 +161,7 @@ void ConfigFile::createDefaultConfig() {
|
||||
|
||||
TiXmlElement * confElement23 = new TiXmlElement( "NetNumberOfPlayers" );
|
||||
config->LinkEndChild( confElement23 );
|
||||
confElement23->SetAttribute("value", 5);
|
||||
confElement23->SetAttribute("value", 7);
|
||||
TiXmlElement * confElement24 = new TiXmlElement( "NetStartCash" );
|
||||
config->LinkEndChild( confElement24 );
|
||||
confElement24->SetAttribute("value", 2000);
|
||||
@@ -190,19 +190,46 @@ void ConfigFile::createDefaultConfig() {
|
||||
TiXmlElement * confElement6 = new TiXmlElement( "MyName" );
|
||||
config->LinkEndChild( confElement6 );
|
||||
confElement6->SetAttribute("value", "Human Player");
|
||||
TiXmlElement * confElement34 = new TiXmlElement( "MyAvatar" );
|
||||
config->LinkEndChild( confElement34 );
|
||||
confElement34->SetAttribute("value", "");
|
||||
TiXmlElement * confElement7 = new TiXmlElement( "Opponent1Name" );
|
||||
config->LinkEndChild( confElement7 );
|
||||
confElement7->SetAttribute("value", "Player 1");
|
||||
TiXmlElement * confElement35 = new TiXmlElement( "Opponent1Avatar" );
|
||||
config->LinkEndChild( confElement35 );
|
||||
confElement35->SetAttribute("value", "");
|
||||
TiXmlElement * confElement8 = new TiXmlElement( "Opponent2Name" );
|
||||
config->LinkEndChild( confElement8 );
|
||||
confElement8->SetAttribute("value", "Player 2");
|
||||
TiXmlElement * confElement36 = new TiXmlElement( "Opponent2Avatar" );
|
||||
config->LinkEndChild( confElement36 );
|
||||
confElement36->SetAttribute("value", "");
|
||||
TiXmlElement * confElement9 = new TiXmlElement( "Opponent3Name" );
|
||||
config->LinkEndChild( confElement9 );
|
||||
confElement9->SetAttribute("value", "Player 3");
|
||||
TiXmlElement * confElement37 = new TiXmlElement( "Opponent3Avatar" );
|
||||
config->LinkEndChild( confElement37 );
|
||||
confElement37->SetAttribute("value", "");
|
||||
TiXmlElement * confElement10 = new TiXmlElement( "Opponent4Name" );
|
||||
config->LinkEndChild( confElement10 );
|
||||
confElement10->SetAttribute("value", "Player 4");
|
||||
|
||||
TiXmlElement * confElement38 = new TiXmlElement( "Opponent4Avatar" );
|
||||
config->LinkEndChild( confElement38 );
|
||||
confElement38->SetAttribute("value", "");
|
||||
TiXmlElement * confElement39 = new TiXmlElement( "Opponent5Name" );
|
||||
config->LinkEndChild( confElement39 );
|
||||
confElement39->SetAttribute("value", "Player 5");
|
||||
TiXmlElement * confElement40 = new TiXmlElement( "Opponent5Avatar" );
|
||||
config->LinkEndChild( confElement40 );
|
||||
confElement40->SetAttribute("value", "");
|
||||
TiXmlElement * confElement41 = new TiXmlElement( "Opponent6Name" );
|
||||
config->LinkEndChild( confElement41 );
|
||||
confElement41->SetAttribute("value", "Player 6");
|
||||
TiXmlElement * confElement42 = new TiXmlElement( "Opponent6Avatar" );
|
||||
config->LinkEndChild( confElement42 );
|
||||
confElement42->SetAttribute("value", "");
|
||||
|
||||
TiXmlElement * confElement20 = new TiXmlElement( "LogDir" );
|
||||
config->LinkEndChild( confElement20 );
|
||||
confElement20->SetAttribute("value", logDir);
|
||||
|
||||
@@ -37,7 +37,7 @@ LocalPlayer::LocalPlayer(BoardInterface *b, int id, std::string name, int sC, bo
|
||||
}
|
||||
|
||||
// myAggressive initialisieren
|
||||
for(i=0; i<10; i++) {
|
||||
for(i=0; i<7; i++) {
|
||||
myAggressive[i] = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,14 +89,14 @@ public:
|
||||
|
||||
void setMyAggressive(const bool& theValue) {
|
||||
int i;
|
||||
for(i=0; i<9; i++) {
|
||||
for(i=0; i<6; i++) {
|
||||
myAggressive[i] = myAggressive[i+1];
|
||||
}
|
||||
myAggressive[9] = theValue;
|
||||
myAggressive[6] = theValue;
|
||||
}
|
||||
int getMyAggressive() const {
|
||||
int i, sum = 0;
|
||||
for(i=0; i<10; i++) {
|
||||
for(i=0; i<7; i++) {
|
||||
sum += myAggressive[i];
|
||||
}
|
||||
return sum;
|
||||
@@ -153,7 +153,7 @@ private:
|
||||
int myRoundStartCash;
|
||||
|
||||
int myAverageSets[4];
|
||||
bool myAggressive[10];
|
||||
bool myAggressive[7];
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -144,10 +144,24 @@ void LocalRiver::postRiverRun() {
|
||||
}
|
||||
}
|
||||
|
||||
// Aggresivität des human player ermitteln
|
||||
// Durchschnittsets des human player ermitteln
|
||||
myHand->getPlayerArray()[0]->setMyAverageSets(((myHand->getPlayerArray()[0]->getMyRoundStartCash())-(myHand->getPlayerArray()[0]->getMyCash()))/(myHand->getBettingRoundsPlayed()+1));
|
||||
// cout << myHand->getPlayerArray()[0]->getMyAverageSets() << endl;
|
||||
|
||||
// Aggressivität des human player ermitteln
|
||||
// anzahl der player die möglichkeit haben am pot teilzuhaben
|
||||
int potPlayers = 0;
|
||||
for(i=0; i<myHand->getGuiInterface()->getMaxQuantityPlayers(); i++) {
|
||||
if(myHand->getPlayerArray()[i]->getMyActiveStatus() && myHand->getPlayerArray()[i]->getMyAction() != 1) {
|
||||
potPlayers++;
|
||||
}
|
||||
}
|
||||
|
||||
// prüfen ob nur noch der human player an der verteilung teilnimmt
|
||||
myHand->getPlayerArray()[0]->setMyAggressive(potPlayers == 1 && myHand->getPlayerArray()[0]->getMyActiveStatus() && myHand->getPlayerArray()[0]->getMyAction() != 1);
|
||||
|
||||
cout << "aggressive: " << myHand->getPlayerArray()[0]->getMyAggressive() << endl;
|
||||
|
||||
// Pot-Verteilung
|
||||
distributePot();
|
||||
|
||||
|
||||
@@ -73,6 +73,9 @@ public:
|
||||
|
||||
virtual void setMyAverageSets(const int& theValue) =0;
|
||||
virtual int getMyAverageSets() const =0;
|
||||
|
||||
virtual void setMyAggressive(const bool& theValue) =0;
|
||||
virtual int getMyAggressive() const =0;
|
||||
|
||||
virtual void action() =0;
|
||||
|
||||
|
||||
+58
-58
@@ -2665,19 +2665,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_PlayerName6" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>17</y>
|
||||
<width>118</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="textLabel_Set6" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
@@ -2739,6 +2726,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_PlayerName6" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>85</x>
|
||||
<y>17</y>
|
||||
<width>118</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -3608,38 +3608,6 @@
|
||||
<property name="title" >
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_Cards5" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>85</x>
|
||||
<y>40</y>
|
||||
<width>118</width>
|
||||
<height>111</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QLabel" name="textLabel_Status5" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>9</x>
|
||||
<y>35</y>
|
||||
<width>100</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_12" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
@@ -3810,19 +3778,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_PlayerName5" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>85</x>
|
||||
<y>17</y>
|
||||
<width>118</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="textLabel_Set5" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
@@ -3852,6 +3807,51 @@
|
||||
<pixmap/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_Cards5" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>85</x>
|
||||
<y>40</y>
|
||||
<width>118</width>
|
||||
<height>111</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QLabel" name="textLabel_Status5" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>9</x>
|
||||
<y>35</y>
|
||||
<width>100</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_PlayerName5" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>85</x>
|
||||
<y>17</y>
|
||||
<width>118</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -93,18 +93,6 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
|
||||
|
||||
setupUi(this);
|
||||
|
||||
//Logos
|
||||
label_logoleft = new QLabel;
|
||||
label_logoleft->setPixmap(QPixmap(QString::fromUtf8(":/graphics/resources/graphics/logo-140-100.png")));
|
||||
label_logoleft->hide();
|
||||
vboxLayout->addWidget(label_logoleft);
|
||||
|
||||
label_logoright = new QLabel;
|
||||
label_logoright->setPixmap(QPixmap(QString::fromUtf8(":/graphics/resources/graphics/logo-140-100.png")));
|
||||
label_logoright->setAlignment(Qt::AlignRight);
|
||||
label_logoright->hide();
|
||||
vboxLayout3->addWidget(label_logoright);
|
||||
|
||||
//pixmapCardsLabel erstellen und ins Layout einfügen!
|
||||
pixmapLabel_cardBoard0 = new MyCardsPixmapLabel(frame_Board);
|
||||
pixmapLabel_cardBoard0->setObjectName(QString::fromUtf8("pixmapLabel_BoardCard0"));
|
||||
@@ -555,7 +543,7 @@ void mainWindowImpl::callNewGameDialog() {
|
||||
newGameDialogImpl *v = new newGameDialogImpl(this);
|
||||
v->exec();
|
||||
if (v->result() == QDialog::Accepted ) { startNewLocalGame(v); }
|
||||
else { startNewLocalGame(); }
|
||||
// else { startNewLocalGame(); }
|
||||
}
|
||||
// sonst mit gespeicherten Werten starten
|
||||
else { startNewLocalGame(); }
|
||||
@@ -685,27 +673,15 @@ void mainWindowImpl::callSettingsDialog() {
|
||||
|
||||
settingsDialogImpl *v = new settingsDialogImpl(this);
|
||||
v->exec();
|
||||
|
||||
if (v->getSettingsCorrect()) {
|
||||
|
||||
//Toolbox verstecken?
|
||||
if (myConfig->readConfigInt("ShowLeftToolBox")) {
|
||||
label_logoleft->hide();
|
||||
tabWidget_LeftToolBox->show();
|
||||
}
|
||||
else {
|
||||
tabWidget_LeftToolBox->hide();
|
||||
label_logoleft->show();
|
||||
}
|
||||
|
||||
if (myConfig->readConfigInt("ShowRightToolBox")) {
|
||||
label_logoright->hide();
|
||||
frame_RightToolBox->show();
|
||||
}
|
||||
else {
|
||||
frame_RightToolBox->hide();
|
||||
label_logoright->show();
|
||||
}
|
||||
|
||||
if (v->getSettingsCorrect()) {
|
||||
//Toolbox verstecken?
|
||||
if (myConfig->readConfigInt("ShowLeftToolBox")) { tabWidget_LeftToolBox->show(); }
|
||||
else { tabWidget_LeftToolBox->hide(); }
|
||||
|
||||
if (myConfig->readConfigInt("ShowRightToolBox")) { frame_RightToolBox->show(); }
|
||||
else { frame_RightToolBox->hide(); }
|
||||
|
||||
//Falls Spielernamen geändert wurden --> neu zeichnen --> erst beim nächsten Neustart neu ausgelesen
|
||||
if (v->getPlayerNickIsChanged() && actualGame) {
|
||||
@@ -715,11 +691,13 @@ void mainWindowImpl::callSettingsDialog() {
|
||||
actualHand->getPlayerArray()[2]->setMyName(v->lineEdit_Opponent2Name->text().toStdString());
|
||||
actualHand->getPlayerArray()[3]->setMyName(v->lineEdit_Opponent3Name->text().toStdString());
|
||||
actualHand->getPlayerArray()[4]->setMyName(v->lineEdit_Opponent4Name->text().toStdString());
|
||||
actualHand->getPlayerArray()[5]->setMyName(v->lineEdit_Opponent5Name->text().toStdString());
|
||||
actualHand->getPlayerArray()[6]->setMyName(v->lineEdit_Opponent6Name->text().toStdString());
|
||||
v->setPlayerNickIsChanged(FALSE);
|
||||
|
||||
refreshPlayerName();
|
||||
}
|
||||
|
||||
|
||||
//Flipside refresh
|
||||
if (myConfig->readConfigInt("FlipsideOwn") && myConfig->readConfigString("FlipsideOwnFile") != "") {
|
||||
|
||||
@@ -737,6 +715,9 @@ void mainWindowImpl::callSettingsDialog() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//avatar refresh
|
||||
refreshPlayerAvatar();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -771,7 +752,7 @@ void mainWindowImpl::refreshButton() {
|
||||
if (actualHand->getPlayerArray()[k]->getMyActiveStatus() == 1) activePlayersCounter++;
|
||||
}
|
||||
|
||||
for (i=0; i<actualHand->getStartQuantityPlayers(); i++) {
|
||||
for (i=0; i<maxQuantityPlayers; i++) {
|
||||
if(actualHand->getPlayerArray()[i]->getMyActiveStatus()) {
|
||||
if(activePlayersCounter > 2) {
|
||||
if (actualHand->getPlayerArray()[i]->getMyButton()==1) {
|
||||
@@ -816,7 +797,25 @@ void mainWindowImpl::refreshPlayerAvatar() {
|
||||
|
||||
for (i=0; i<maxQuantityPlayers; i++) {
|
||||
if(actualHand->getPlayerArray()[i]->getMyActiveStatus()) {
|
||||
playerAvatarLabelArray[i]->setPixmap(QPixmap(":/guiv2/resources/guiv2/genereticAvatar.png"));
|
||||
|
||||
if(!i) {
|
||||
if(myConfig->readConfigString("MyAvatar") == "") {
|
||||
playerAvatarLabelArray[0]->setPixmap(QPixmap(":/guiv2/resources/guiv2/genereticAvatar.png"));
|
||||
}
|
||||
else {
|
||||
playerAvatarLabelArray[0]->setPixmap(QPixmap(QString::fromStdString(myConfig->readConfigString("MyAvatar"))));
|
||||
}
|
||||
}
|
||||
else {
|
||||
QString tmp("Opponent"+QString::number(i,10)+"Avatar");
|
||||
|
||||
if(myConfig->readConfigString(tmp.toStdString()) == "") {
|
||||
playerAvatarLabelArray[i]->setPixmap(QPixmap(":/guiv2/resources/guiv2/genereticAvatar.png"));
|
||||
}
|
||||
else {
|
||||
playerAvatarLabelArray[i]->setPixmap(QPixmap(QString::fromStdString(myConfig->readConfigString(tmp.toStdString()))));
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
playerAvatarLabelArray[i]->setPixmap(onePix);
|
||||
@@ -2063,26 +2062,14 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
|
||||
|
||||
void mainWindowImpl::switchLeftToolBox() {
|
||||
|
||||
if (tabWidget_LeftToolBox->isHidden()) {
|
||||
label_logoleft->hide();
|
||||
tabWidget_LeftToolBox->show();
|
||||
}
|
||||
else {
|
||||
tabWidget_LeftToolBox->hide();
|
||||
label_logoleft->show();
|
||||
}
|
||||
if (tabWidget_LeftToolBox->isHidden()) { tabWidget_LeftToolBox->show(); }
|
||||
else { tabWidget_LeftToolBox->hide(); }
|
||||
}
|
||||
|
||||
void mainWindowImpl::switchRightToolBox() {
|
||||
|
||||
if (frame_RightToolBox->isHidden()) {
|
||||
label_logoright->hide();
|
||||
frame_RightToolBox->show();
|
||||
}
|
||||
else {
|
||||
frame_RightToolBox->hide();
|
||||
label_logoright->show();
|
||||
}
|
||||
if (frame_RightToolBox->isHidden()) { frame_RightToolBox->show(); }
|
||||
else { frame_RightToolBox->hide(); }
|
||||
}
|
||||
|
||||
void mainWindowImpl::switchFullscreen() {
|
||||
|
||||
@@ -520,6 +520,7 @@
|
||||
53010|0.816987|0.677700|0.570375|0.484100
|
||||
53011|0.832275|0.707483|0.608725|0.527600
|
||||
53012|0.879188|0.781317|0.704100|0.645950
|
||||
53102|0.646188|0.431000|0.297600|0.212250
|
||||
53103|0.662075|0.451183|0.316450|0.226250
|
||||
53104|0.679488|0.476467|0.338175|0.247350
|
||||
53105|0.685588|0.486467|0.355675|0.262250
|
||||
|
||||
+391
-73
@@ -164,7 +164,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="0" column="0" >
|
||||
<widget class="QRadioButton" name="radioButton_flipsideTux" >
|
||||
<property name="text" >
|
||||
<string>Default (Tux)</string>
|
||||
<string>Default</string>
|
||||
</property>
|
||||
<property name="checked" >
|
||||
<bool>true</bool>
|
||||
@@ -601,23 +601,316 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="lineEdit_humanPlayerName" />
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="label_7" >
|
||||
<property name="font" >
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Player Nicks</string>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QGroupBox" name="groupBox_3" >
|
||||
<property name="title" >
|
||||
<string>Computer Engine</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item row="5" column="3" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent6Avatar" />
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_openAvatarFile6" >
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="3" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent5Avatar" />
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_openAvatarFile5" >
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="3" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent4Avatar" />
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_openAvatarFile4" >
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="3" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent3Avatar" />
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_openAvatarFile3" >
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="3" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent2Avatar" />
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_openAvatarFile2" >
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent1Avatar" />
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_openAvatarFile1" >
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="2" >
|
||||
<widget class="QLabel" name="label_24" >
|
||||
<property name="text" >
|
||||
<string>Avatar:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLabel" name="label_21" >
|
||||
<property name="text" >
|
||||
<string>Avatar:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QLabel" name="label_22" >
|
||||
<property name="text" >
|
||||
<string>Avatar:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" >
|
||||
<widget class="QLabel" name="label_25" >
|
||||
<property name="text" >
|
||||
<string>Avatar:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2" >
|
||||
<widget class="QLabel" name="label_30" >
|
||||
<property name="text" >
|
||||
<string>Avatar:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2" >
|
||||
<widget class="QLabel" name="label_31" >
|
||||
<property name="text" >
|
||||
<string>Avatar:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent4Name" />
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent3Name" />
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent1Name" />
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent2Name" />
|
||||
</item>
|
||||
<item row="5" column="1" >
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent6Name" />
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent5Name" />
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_10" >
|
||||
<property name="text" >
|
||||
<string>Opponent 2:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_11" >
|
||||
<property name="text" >
|
||||
<string>Opponent 3:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="label_12" >
|
||||
<property name="text" >
|
||||
<string>Opponent 4:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_9" >
|
||||
<property name="text" >
|
||||
<string>Opponent 1:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QLabel" name="label_26" >
|
||||
<property name="text" >
|
||||
<string>Opponent 5:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" >
|
||||
<widget class="QLabel" name="label_32" >
|
||||
<property name="text" >
|
||||
<string>Opponent 6:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2" >
|
||||
<item row="4" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
@@ -630,57 +923,82 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="label_8" >
|
||||
<property name="text" >
|
||||
<string>Human Player:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QLabel" name="label_10" >
|
||||
<property name="text" >
|
||||
<string>Opponent 2:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" >
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent4Name" />
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2" >
|
||||
<item row="1" column="0" >
|
||||
<widget class="Line" name="line_4" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" >
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent3Name" />
|
||||
</item>
|
||||
<item row="5" column="0" >
|
||||
<widget class="QLabel" name="label_11" >
|
||||
<property name="text" >
|
||||
<string>Opponent 3:</string>
|
||||
<item row="2" column="0" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent1Name" />
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<widget class="QLineEdit" name="lineEdit_Opponent2Name" />
|
||||
</item>
|
||||
<item row="6" column="0" >
|
||||
<widget class="QLabel" name="label_12" >
|
||||
<property name="text" >
|
||||
<string>Opponent 4:</string>
|
||||
<property name="spacing" >
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8" >
|
||||
<property name="text" >
|
||||
<string>Human Player:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_humanPlayerName" />
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_20" >
|
||||
<property name="text" >
|
||||
<string>Avatar:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_humanPlayerAvatar" />
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_openAvatarFile0" >
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="label_9" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="label_7" >
|
||||
<property name="font" >
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Opponent 1:</string>
|
||||
<string>Player Nicks</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -819,6 +1137,23 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<widget class="QDialogButtonBox" name="buttonBox" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons" >
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2" >
|
||||
<widget class="Line" name="line" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QListWidget" name="listWidget" >
|
||||
<property name="minimumSize" >
|
||||
@@ -860,23 +1195,6 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2" >
|
||||
<widget class="Line" name="line" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<widget class="QDialogButtonBox" name="buttonBox" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons" >
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
|
||||
@@ -35,10 +35,19 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent)
|
||||
|
||||
//Player Nicks
|
||||
lineEdit_humanPlayerName->setText(QString::fromStdString(myConfig.readConfigString("MyName")));
|
||||
lineEdit_humanPlayerAvatar->setText(QString::fromStdString(myConfig.readConfigString("MyAvatar")));
|
||||
lineEdit_Opponent1Name->setText(QString::fromStdString(myConfig.readConfigString("Opponent1Name")));
|
||||
lineEdit_Opponent1Avatar->setText(QString::fromStdString(myConfig.readConfigString("Opponent1Avatar")));
|
||||
lineEdit_Opponent2Name->setText(QString::fromStdString(myConfig.readConfigString("Opponent2Name")));
|
||||
lineEdit_Opponent2Avatar->setText(QString::fromStdString(myConfig.readConfigString("Opponent2Avatar")));
|
||||
lineEdit_Opponent3Name->setText(QString::fromStdString(myConfig.readConfigString("Opponent3Name")));
|
||||
lineEdit_Opponent3Avatar->setText(QString::fromStdString(myConfig.readConfigString("Opponent3Avatar")));
|
||||
lineEdit_Opponent4Name->setText(QString::fromStdString(myConfig.readConfigString("Opponent4Name")));
|
||||
lineEdit_Opponent4Avatar->setText(QString::fromStdString(myConfig.readConfigString("Opponent4Avatar")));
|
||||
lineEdit_Opponent5Name->setText(QString::fromStdString(myConfig.readConfigString("Opponent5Name")));
|
||||
lineEdit_Opponent5Avatar->setText(QString::fromStdString(myConfig.readConfigString("Opponent5Avatar")));
|
||||
lineEdit_Opponent6Name->setText(QString::fromStdString(myConfig.readConfigString("Opponent6Name")));
|
||||
lineEdit_Opponent6Avatar->setText(QString::fromStdString(myConfig.readConfigString("Opponent6Avatar")));
|
||||
|
||||
//Local Game Settings
|
||||
spinBox_quantityPlayers->setValue(myConfig.readConfigInt("NumberOfPlayers"));
|
||||
@@ -88,7 +97,13 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent)
|
||||
connect( lineEdit_Opponent4Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) );
|
||||
connect( pushButton_openFlipsidePicture, SIGNAL( clicked() ), this, SLOT( setFlipsidePicFileName()) );
|
||||
connect( pushButton_openLogDir, SIGNAL( clicked() ), this, SLOT( setLogDir()) );
|
||||
|
||||
connect( pushButton_openAvatarFile0, SIGNAL( clicked() ), this, SLOT( setAvatarFile0()) );
|
||||
connect( pushButton_openAvatarFile1, SIGNAL( clicked() ), this, SLOT( setAvatarFile1()) );
|
||||
connect( pushButton_openAvatarFile2, SIGNAL( clicked() ), this, SLOT( setAvatarFile2()) );
|
||||
connect( pushButton_openAvatarFile3, SIGNAL( clicked() ), this, SLOT( setAvatarFile3()) );
|
||||
connect( pushButton_openAvatarFile4, SIGNAL( clicked() ), this, SLOT( setAvatarFile4()) );
|
||||
connect( pushButton_openAvatarFile5, SIGNAL( clicked() ), this, SLOT( setAvatarFile5()) );
|
||||
connect( pushButton_openAvatarFile6, SIGNAL( clicked() ), this, SLOT( setAvatarFile6()) );
|
||||
|
||||
}
|
||||
|
||||
@@ -102,10 +117,81 @@ void settingsDialogImpl::isAccepted() {
|
||||
|
||||
// Player Nicks
|
||||
myConfig.writeConfigString("MyName", lineEdit_humanPlayerName->text().toUtf8().constData());
|
||||
if(QFile::QFile(lineEdit_humanPlayerAvatar->text()).exists() || lineEdit_humanPlayerAvatar->text() == "") {
|
||||
myConfig.writeConfigString("MyAvatar", lineEdit_humanPlayerAvatar->text().toUtf8().constData());
|
||||
}
|
||||
else { QMessageBox::warning(this, tr("Settings Error"),
|
||||
tr("The entered human player avatar picture doesn't exists.\n"
|
||||
"Please enter an valid picture!"),
|
||||
QMessageBox::Ok);
|
||||
settingsCorrect = FALSE;
|
||||
}
|
||||
|
||||
myConfig.writeConfigString("Opponent1Name", lineEdit_Opponent1Name->text().toUtf8().constData());
|
||||
if(QFile::QFile(lineEdit_Opponent1Avatar->text()).exists() || lineEdit_Opponent1Avatar->text() == "") {
|
||||
myConfig.writeConfigString("Opponent1Avatar", lineEdit_Opponent1Avatar->text().toUtf8().constData());
|
||||
}
|
||||
else { QMessageBox::warning(this, tr("Settings Error"),
|
||||
tr("The entered \"opponent 1\" avatar picture doesn't exists.\n"
|
||||
"Please enter an valid picture!"),
|
||||
QMessageBox::Ok);
|
||||
settingsCorrect = FALSE;
|
||||
}
|
||||
|
||||
myConfig.writeConfigString("Opponent2Name", lineEdit_Opponent2Name->text().toUtf8().constData());
|
||||
if(QFile::QFile(lineEdit_Opponent2Avatar->text()).exists() || lineEdit_Opponent2Avatar->text() == "") {
|
||||
myConfig.writeConfigString("Opponent2Avatar", lineEdit_Opponent2Avatar->text().toUtf8().constData());
|
||||
}
|
||||
else { QMessageBox::warning(this, tr("Settings Error"),
|
||||
tr("The entered \"opponent 2\" avatar picture doesn't exists.\n"
|
||||
"Please enter an valid picture!"),
|
||||
QMessageBox::Ok);
|
||||
settingsCorrect = FALSE;
|
||||
}
|
||||
|
||||
myConfig.writeConfigString("Opponent3Name", lineEdit_Opponent3Name->text().toUtf8().constData());
|
||||
if(QFile::QFile(lineEdit_Opponent3Avatar->text()).exists() || lineEdit_Opponent3Avatar->text() == "") {
|
||||
myConfig.writeConfigString("Opponent3Avatar", lineEdit_Opponent3Avatar->text().toUtf8().constData());
|
||||
}
|
||||
else { QMessageBox::warning(this, tr("Settings Error"),
|
||||
tr("The entered \"opponent 3\" avatar picture doesn't exists.\n"
|
||||
"Please enter an valid picture!"),
|
||||
QMessageBox::Ok);
|
||||
settingsCorrect = FALSE;
|
||||
}
|
||||
|
||||
myConfig.writeConfigString("Opponent4Name", lineEdit_Opponent4Name->text().toUtf8().constData());
|
||||
if(QFile::QFile(lineEdit_Opponent4Avatar->text()).exists() || lineEdit_Opponent4Avatar->text() == "") {
|
||||
myConfig.writeConfigString("Opponent4Avatar", lineEdit_Opponent4Avatar->text().toUtf8().constData());
|
||||
}
|
||||
else { QMessageBox::warning(this, tr("Settings Error"),
|
||||
tr("The entered \"opponent 4\" avatar picture doesn't exists.\n"
|
||||
"Please enter an valid picture!"),
|
||||
QMessageBox::Ok);
|
||||
settingsCorrect = FALSE;
|
||||
}
|
||||
|
||||
myConfig.writeConfigString("Opponent5Name", lineEdit_Opponent5Name->text().toUtf8().constData());
|
||||
if(QFile::QFile(lineEdit_Opponent5Avatar->text()).exists() || lineEdit_Opponent5Avatar->text() == "") {
|
||||
myConfig.writeConfigString("Opponent5Avatar", lineEdit_Opponent5Avatar->text().toUtf8().constData());
|
||||
}
|
||||
else { QMessageBox::warning(this, tr("Settings Error"),
|
||||
tr("The entered \"opponent 5\" avatar picture doesn't exists.\n"
|
||||
"Please enter an valid picture!"),
|
||||
QMessageBox::Ok);
|
||||
settingsCorrect = FALSE;
|
||||
}
|
||||
|
||||
myConfig.writeConfigString("Opponent6Name", lineEdit_Opponent6Name->text().toUtf8().constData());
|
||||
if(QFile::QFile(lineEdit_Opponent6Avatar->text()).exists() || lineEdit_Opponent6Avatar->text() == "") {
|
||||
myConfig.writeConfigString("Opponent6Avatar", lineEdit_Opponent6Avatar->text().toUtf8().constData());
|
||||
}
|
||||
else { QMessageBox::warning(this, tr("Settings Error"),
|
||||
tr("The entered \"opponent 6\" avatar picture doesn't exists.\n"
|
||||
"Please enter an valid picture!"),
|
||||
QMessageBox::Ok);
|
||||
settingsCorrect = FALSE;
|
||||
}
|
||||
|
||||
// Local Game Settings
|
||||
myConfig.writeConfigInt("NumberOfPlayers", spinBox_quantityPlayers->value());
|
||||
@@ -159,7 +245,6 @@ void settingsDialogImpl::isAccepted() {
|
||||
|
||||
myConfig.writeConfigInt("LogStoreDuration", spinBox_logStoreDuration->value());
|
||||
|
||||
|
||||
//Wenn alles richtig eingegeben wurde --> Dialog schließen
|
||||
if(settingsCorrect) { this->hide(); }
|
||||
}
|
||||
@@ -168,12 +253,82 @@ void settingsDialogImpl::setFlipsidePicFileName()
|
||||
{
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select your flipside picture"),
|
||||
QDir::homePath(),
|
||||
tr("Images (*.bmp *.png *.xpm)"));
|
||||
tr("Images (*.png)"));
|
||||
|
||||
if (!fileName.isEmpty())
|
||||
lineEdit_OwnFlipsideFilename->setText(fileName);
|
||||
}
|
||||
|
||||
void settingsDialogImpl::setAvatarFile0() {
|
||||
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select your avatar picture"),
|
||||
QDir::homePath(),
|
||||
tr("Images (*.png)"));
|
||||
|
||||
if (!fileName.isEmpty())
|
||||
lineEdit_humanPlayerAvatar->setText(fileName);
|
||||
}
|
||||
|
||||
void settingsDialogImpl::setAvatarFile1() {
|
||||
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select computer opponents avatar picture"),
|
||||
QDir::homePath(),
|
||||
tr("Images (*.png)"));
|
||||
|
||||
if (!fileName.isEmpty())
|
||||
lineEdit_Opponent1Avatar->setText(fileName);
|
||||
}
|
||||
|
||||
void settingsDialogImpl::setAvatarFile2() {
|
||||
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select computer opponents avatar picture"),
|
||||
QDir::homePath(),
|
||||
tr("Images (*.png)"));
|
||||
|
||||
if (!fileName.isEmpty())
|
||||
lineEdit_Opponent2Avatar->setText(fileName);
|
||||
}
|
||||
|
||||
void settingsDialogImpl::setAvatarFile3() {
|
||||
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select computer opponents avatar picture"),
|
||||
QDir::homePath(),
|
||||
tr("Images (*.png)"));
|
||||
|
||||
if (!fileName.isEmpty())
|
||||
lineEdit_Opponent3Avatar->setText(fileName);
|
||||
}
|
||||
|
||||
void settingsDialogImpl::setAvatarFile4() {
|
||||
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select computer opponents avatar picture"),
|
||||
QDir::homePath(),
|
||||
tr("Images (*.png)"));
|
||||
|
||||
if (!fileName.isEmpty())
|
||||
lineEdit_Opponent4Avatar->setText(fileName);
|
||||
}
|
||||
|
||||
void settingsDialogImpl::setAvatarFile5() {
|
||||
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select computer opponents avatar picture"),
|
||||
QDir::homePath(),
|
||||
tr("Images (*.png)"));
|
||||
|
||||
if (!fileName.isEmpty())
|
||||
lineEdit_Opponent5Avatar->setText(fileName);
|
||||
}
|
||||
|
||||
void settingsDialogImpl::setAvatarFile6() {
|
||||
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select computer opponents avatar picture"),
|
||||
QDir::homePath(),
|
||||
tr("Images (*.png)"));
|
||||
|
||||
if (!fileName.isEmpty())
|
||||
lineEdit_Opponent6Avatar->setText(fileName);
|
||||
}
|
||||
|
||||
void settingsDialogImpl::setLogDir()
|
||||
{
|
||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),
|
||||
|
||||
@@ -42,7 +42,13 @@ public slots:
|
||||
void playerNickChanged() { setPlayerNickIsChanged(TRUE); };
|
||||
void setFlipsidePicFileName();
|
||||
void setLogDir();
|
||||
|
||||
void setAvatarFile0();
|
||||
void setAvatarFile1();
|
||||
void setAvatarFile2();
|
||||
void setAvatarFile3();
|
||||
void setAvatarFile4();
|
||||
void setAvatarFile5();
|
||||
void setAvatarFile6();
|
||||
private:
|
||||
|
||||
bool playerNickIsChanged;
|
||||
|
||||
Reference in New Issue
Block a user