This commit is contained in:
doitux
2007-06-03 21:27:02 +00:00
parent f932e39983
commit 00e0bfb5cf
12 changed files with 1375 additions and 512 deletions
@@ -0,0 +1,27 @@
//
// C++ Implementation: mycardspixmaplabel
//
// Description:
//
//
// Author: FThauer FHammer <f.thauer@web.de>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "myavatarbutton.h"
using namespace std;
MyAvatarButton::MyAvatarButton(QGroupBox* parent)
: QPushButton(parent)
{
}
MyAvatarButton::~MyAvatarButton()
{
}
@@ -0,0 +1,37 @@
//
// C++ Interface: mycardspixmaplabel
//
// Description:
//
//
// Author: FThauer FHammer <f.thauer@web.de>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef MYAVATARBUTTON_H
#define MYAVATARBUTTON_H
#include <QtGui>
#include <QtCore>
#include <iostream>
class MyAvatarButton : public QPushButton
{
public:
MyAvatarButton(QGroupBox*);
~MyAvatarButton();
void setMyLink(QString theValue){ myLink = theValue;}
QString getMyLink() const{ return myLink;}
private:
QString myLink;
};
#endif
@@ -0,0 +1,26 @@
//
// C++ Implementation: mycardspixmaplabel
//
// Description:
//
//
// Author: FThauer FHammer <f.thauer@web.de>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "myhpavatarbutton.h"
using namespace std;
MyHPAvatarButton::MyHPAvatarButton(QWidget* parent)
: QPushButton(parent)
{
}
MyHPAvatarButton::~MyHPAvatarButton()
{
}
@@ -0,0 +1,37 @@
//
// C++ Interface: mycardspixmaplabel
//
// Description:
//
//
// Author: FThauer FHammer <f.thauer@web.de>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef MYHPAVATARBUTTON_H
#define MYHPAVATARBUTTON_H
#include <QtGui>
#include <QtCore>
#include <iostream>
class MyHPAvatarButton : public QPushButton
{
public:
MyHPAvatarButton(QWidget*);
~MyHPAvatarButton();
void setMyLink(QString theValue){ myLink = theValue;}
QString getMyLink() const{ return myLink;}
private:
QString myLink;
};
#endif
@@ -24,7 +24,7 @@
selectAvatarDialogImpl::selectAvatarDialogImpl(QWidget *parent, ConfigFile *c)
: QDialog(parent), myConfig(c)
: QDialog(parent), myConfig(c), settingsCorrect(TRUE)
{
setupUi(this);
@@ -41,23 +41,56 @@ selectAvatarDialogImpl::selectAvatarDialogImpl(QWidget *parent, ConfigFile *c)
listWidget->setDragEnabled(FALSE);
listWidget->setResizeMode(QListView::Adjust);
// int i;
// for (i=0; i<30; i++) {
// MyAvatarListItem *myItem = new MyAvatarListItem(listWidget);
// // myItem->setIcon(QIcon(QPixmap(":/guiv2/resources/guiv2/genereticAvatar.png").scaled(50,50,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)));
// myItem->setMyLink(":/guiv2/resources/guiv2/genereticAvatar.png");
// myItem->setText("PokerTH");
// listWidget->addItem(myItem);
// };
MyAvatarListItem *myItem = new MyAvatarListItem(listWidget);
myItem->setIcon(QIcon(QPixmap(":/guiv2/resources/guiv2/genereticAvatar.png").scaled(50,50,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)));
myItem->setMyLink(":/guiv2/resources/guiv2/genereticAvatar.png");
myItem->setText("Avatar 1");
listWidget->addItem(myItem);
MyAvatarListItem *myItem1 = new MyAvatarListItem(listWidget);
myItem1->setIcon(QIcon(QPixmap(":/guiv2/resources/guiv2/dealerPuck.png").scaled(50,50,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)));
myItem1->setMyLink(":/guiv2/resources/guiv2/dealerPuck.png");
myItem1->setText("Avatar 2");
listWidget->addItem(myItem1);
MyAvatarListItem *myItem2 = new MyAvatarListItem(listWidget);
myItem2->setIcon(QIcon(QPixmap(":/guiv2/resources/guiv2/playeraction_03.png").scaled(50,50,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)));
myItem2->setMyLink(":/guiv2/resources/guiv2/playeraction_03.png");
myItem2->setText("Avatar 3");
listWidget->addItem(myItem2);
QObject::connect(groupBox, SIGNAL(toggled(bool)), this, SLOT(toggleGroupBox1(bool)));
QObject::connect(groupBox_2, SIGNAL(toggled(bool)), this, SLOT(toggleGroupBox2(bool)));
MyAvatarListItem *myItem3 = new MyAvatarListItem(listWidget);
myItem3->setIcon(QIcon(QPixmap(":/guiv2/resources/guiv2/playeraction_05.png").scaled(50,50,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)));
myItem3->setMyLink(":/guiv2/resources/guiv2/playeraction_05.png");
myItem3->setText("Avatar 4");
listWidget->addItem(myItem3);
MyAvatarListItem *myItem4 = new MyAvatarListItem(listWidget);
myItem4->setIcon(QIcon(QPixmap(":/guiv2/resources/guiv2/playeraction_07.png").scaled(50,50,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)));
myItem4->setMyLink(":/guiv2/resources/guiv2/playeraction_07.png");
myItem4->setText("Avatar 5");
listWidget->addItem(myItem4);
connect(groupBox, SIGNAL(toggled(bool)), this, SLOT(toggleGroupBox1(bool)));
connect(groupBox_2, SIGNAL(toggled(bool)), this, SLOT(toggleGroupBox2(bool)));
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( isAccepted() ) );
connect( buttonBox, SIGNAL( rejected() ), this, SLOT( isRejected() ) );
connect( pushButton_OpenAvatarFile, SIGNAL( clicked() ), this, SLOT( setExternalAvatar() ) );
}
void selectAvatarDialogImpl::exec() {
int i;
for (i=0; i<30; i++) {
MyAvatarListItem *myItem = new MyAvatarListItem(listWidget);
myItem->setIcon(QIcon(QPixmap(":/guiv2/resources/guiv2/genereticAvatar.png")));
myItem->setMyLink(":/guiv2/resources/guiv2/genereticAvatar.png");
myItem->setText("PokerTH");
listWidget->addItem(myItem);
};
//clear
lineEdit->setText("");
@@ -70,6 +103,59 @@ void selectAvatarDialogImpl::toggleGroupBox2(bool toogleState) { if(groupBox_2->
QString selectAvatarDialogImpl::getAvatarLink() {
if(groupBox->isChecked()) return static_cast<MyAvatarListItem*>(listWidget->currentItem())->getMyLink();
else return lineEdit->text();
QList<QListWidgetItem *> myItemList = listWidget->selectedItems();
if(groupBox->isChecked()) {
if(myItemList.size() == 1) {
return static_cast<MyAvatarListItem*>(listWidget->currentItem())->getMyLink();
}
else return QString("");
}
if(groupBox_2->isChecked() && QFile::QFile(lineEdit->text()).exists() ) return externalAvatar;
else return QString("");
}
void selectAvatarDialogImpl::isAccepted() {
QList<QListWidgetItem *> myItemList = listWidget->selectedItems();
if(groupBox->isChecked()) {
if(myItemList.size() == 0) {
QMessageBox::warning(this, tr("Avatar File Error"),
tr("Please select an avatar from the list!"),
QMessageBox::Ok);
settingsCorrect = FALSE;
}
else settingsCorrect = TRUE;;
}
if(groupBox_2->isChecked()) {
if(QFile::QFile(lineEdit->text()).exists()) {
externalAvatar = lineEdit->text();
settingsCorrect = TRUE;
}
else { QMessageBox::warning(this, tr("Avatar File Error"),
tr("The entered avatar picture doesn't exists.\n"
"Please enter an valid picture!"),
QMessageBox::Ok);
settingsCorrect = FALSE;
externalAvatar = "";
}
}
//Wenn alles richtig eingegeben wurde --> Dialog schließen
if(settingsCorrect) { this->hide(); }
}
void selectAvatarDialogImpl::isRejected() { settingsCorrect = FALSE; }
void selectAvatarDialogImpl::setExternalAvatar() {
QString fileName = QFileDialog::getOpenFileName(this, tr("Select external avatar picture"), QDir::homePath(), tr("Images (*.png)"));
if (!fileName.isEmpty())
lineEdit->setText(fileName);
}
@@ -39,12 +39,20 @@ public:
public slots:
void toggleGroupBox1(bool);
void toggleGroupBox2(bool);
void isAccepted();
void isRejected();
QString getAvatarLink();
void setExternalAvatar();
bool getSettingsCorrect() const { return settingsCorrect;}
private:
ConfigFile* myConfig;
bool settingsCorrect;
QString externalAvatar;
};
+71 -130
View File
@@ -33,7 +33,7 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, ConfigFile *c, selectAva
if (myConfig->readConfigInt("CLA_NoWriteAccess")) { groupBox_logOnOff->setDisabled(TRUE); }
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( isAccepted() ) );
connect( lineEdit_humanPlayerName, SIGNAL( textChanged( const QString &) ), this, SLOT( playerNickChanged() ) );
connect( lineEdit_HumanPlayerName, SIGNAL( textChanged( const QString &) ), this, SLOT( playerNickChanged() ) );
connect( lineEdit_Opponent1Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) );
connect( lineEdit_Opponent2Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) );
connect( lineEdit_Opponent3Name, SIGNAL( textChanged(const QString &) ), this, SLOT( playerNickChanged() ) );
@@ -42,13 +42,13 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, ConfigFile *c, selectAva
connect( lineEdit_Opponent6Name, 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()) );
connect( pushButton_HumanPlayerAvatar, SIGNAL( clicked() ), this, SLOT( setAvatarFile0()) );
connect( pushButton_Opponent1Avatar, SIGNAL( clicked() ), this, SLOT( setAvatarFile1()) );
connect( pushButton_Opponent2Avatar, SIGNAL( clicked() ), this, SLOT( setAvatarFile2()) );
connect( pushButton_Opponent3Avatar, SIGNAL( clicked() ), this, SLOT( setAvatarFile3()) );
connect( pushButton_Opponent4Avatar, SIGNAL( clicked() ), this, SLOT( setAvatarFile4()) );
connect( pushButton_Opponent5Avatar, SIGNAL( clicked() ), this, SLOT( setAvatarFile5()) );
connect( pushButton_Opponent6Avatar, SIGNAL( clicked() ), this, SLOT( setAvatarFile6()) );
connect( checkBox_showIntro, SIGNAL( clicked() ), this, SLOT( callSelectAvatarDialog()) );
@@ -64,20 +64,29 @@ void settingsDialogImpl::exec() {
playerNickIsChanged = FALSE;
//Player Nicks
lineEdit_humanPlayerName->setText(QString::fromUtf8(myConfig->readConfigString("MyName").c_str()));
lineEdit_humanPlayerAvatar->setText(QString::fromUtf8(myConfig->readConfigString("MyAvatar").c_str()));
lineEdit_HumanPlayerName->setText(QString::fromUtf8(myConfig->readConfigString("MyName").c_str()));
pushButton_HumanPlayerAvatar->setMyLink(QString::fromUtf8(myConfig->readConfigString("MyAvatar").c_str()));
lineEdit_Opponent1Name->setText(QString::fromUtf8(myConfig->readConfigString("Opponent1Name").c_str()));
lineEdit_Opponent1Avatar->setText(QString::fromUtf8(myConfig->readConfigString("Opponent1Avatar").c_str()));
pushButton_Opponent1Avatar->setMyLink(QString::fromUtf8(myConfig->readConfigString("Opponent1Avatar").c_str()));
lineEdit_Opponent2Name->setText(QString::fromUtf8(myConfig->readConfigString("Opponent2Name").c_str()));
lineEdit_Opponent2Avatar->setText(QString::fromUtf8(myConfig->readConfigString("Opponent2Avatar").c_str()));
pushButton_Opponent2Avatar->setMyLink(QString::fromUtf8(myConfig->readConfigString("Opponent2Avatar").c_str()));
lineEdit_Opponent3Name->setText(QString::fromUtf8(myConfig->readConfigString("Opponent3Name").c_str()));
lineEdit_Opponent3Avatar->setText(QString::fromUtf8(myConfig->readConfigString("Opponent3Avatar").c_str()));
pushButton_Opponent3Avatar->setMyLink(QString::fromUtf8(myConfig->readConfigString("Opponent3Avatar").c_str()));
lineEdit_Opponent4Name->setText(QString::fromUtf8(myConfig->readConfigString("Opponent4Name").c_str()));
lineEdit_Opponent4Avatar->setText(QString::fromUtf8(myConfig->readConfigString("Opponent4Avatar").c_str()));
pushButton_Opponent4Avatar->setMyLink(QString::fromUtf8(myConfig->readConfigString("Opponent4Avatar").c_str()));
lineEdit_Opponent5Name->setText(QString::fromUtf8(myConfig->readConfigString("Opponent5Name").c_str()));
lineEdit_Opponent5Avatar->setText(QString::fromUtf8(myConfig->readConfigString("Opponent5Avatar").c_str()));
pushButton_Opponent5Avatar->setMyLink(QString::fromUtf8(myConfig->readConfigString("Opponent5Avatar").c_str()));
lineEdit_Opponent6Name->setText(QString::fromUtf8(myConfig->readConfigString("Opponent6Name").c_str()));
lineEdit_Opponent6Avatar->setText(QString::fromUtf8(myConfig->readConfigString("Opponent6Avatar").c_str()));
pushButton_Opponent6Avatar->setMyLink(QString::fromUtf8(myConfig->readConfigString("Opponent6Avatar").c_str()));
//refresh AvatarIcons
pushButton_HumanPlayerAvatar->setIcon(QIcon(pushButton_HumanPlayerAvatar->getMyLink()));
pushButton_Opponent1Avatar->setIcon(QIcon(pushButton_Opponent1Avatar->getMyLink()));
pushButton_Opponent2Avatar->setIcon(QIcon(pushButton_Opponent2Avatar->getMyLink()));
pushButton_Opponent3Avatar->setIcon(QIcon(pushButton_Opponent3Avatar->getMyLink()));
pushButton_Opponent4Avatar->setIcon(QIcon(pushButton_Opponent4Avatar->getMyLink()));
pushButton_Opponent5Avatar->setIcon(QIcon(pushButton_Opponent5Avatar->getMyLink()));
pushButton_Opponent6Avatar->setIcon(QIcon(pushButton_Opponent6Avatar->getMyLink()));
//Local Game Settings
spinBox_quantityPlayers->setValue(myConfig->readConfigInt("NumberOfPlayers"));
@@ -136,82 +145,26 @@ void settingsDialogImpl::isAccepted() {
settingsCorrect = TRUE;
// 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("MyName", lineEdit_HumanPlayerName->text().toUtf8().constData());
myConfig->writeConfigString("MyAvatar", pushButton_HumanPlayerAvatar->getMyLink().toUtf8().constData());
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("Opponent1Avatar", pushButton_Opponent1Avatar->getMyLink().toUtf8().constData());
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("Opponent2Avatar", pushButton_Opponent2Avatar->getMyLink().toUtf8().constData());
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("Opponent3Avatar", pushButton_Opponent3Avatar->getMyLink().toUtf8().constData());
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("Opponent4Avatar", pushButton_Opponent4Avatar->getMyLink().toUtf8().constData());
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("Opponent5Avatar", pushButton_Opponent5Avatar->getMyLink().toUtf8().constData());
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;
}
myConfig->writeConfigString("Opponent6Avatar", pushButton_Opponent6Avatar->getMyLink().toUtf8().constData());
// Local Game Settings
myConfig->writeConfigInt("NumberOfPlayers", spinBox_quantityPlayers->value());
@@ -291,77 +244,65 @@ void settingsDialogImpl::setFlipsidePicFileName()
void settingsDialogImpl::setAvatarFile0() {
callSelectAvatarDialog();
if(mySelectAvatarDialogImpl->result() == QDialog::Accepted ) {
lineEdit_humanPlayerAvatar->setText(mySelectAvatarDialogImpl->getAvatarLink());
}
/*
QString fileName = QFileDialog::getOpenFileName(this, tr("Select your avatar picture"),
QDir::homePath(),
tr("Images (*.png)"));
if (!fileName.isEmpty())
lineEdit_humanPlayerAvatar->setText(fileName);*/
pushButton_HumanPlayerAvatar->setMyLink(mySelectAvatarDialogImpl->getAvatarLink());
pushButton_HumanPlayerAvatar->setIcon(QIcon(pushButton_HumanPlayerAvatar->getMyLink()));
}
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);
callSelectAvatarDialog();
if(mySelectAvatarDialogImpl->getSettingsCorrect()) {
pushButton_Opponent1Avatar->setMyLink(mySelectAvatarDialogImpl->getAvatarLink());
pushButton_Opponent1Avatar->setIcon(QIcon(pushButton_Opponent1Avatar->getMyLink()));
}
}
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);
callSelectAvatarDialog();
if(mySelectAvatarDialogImpl->getSettingsCorrect()) {
pushButton_Opponent2Avatar->setMyLink(mySelectAvatarDialogImpl->getAvatarLink());
pushButton_Opponent2Avatar->setIcon(QIcon(pushButton_Opponent2Avatar->getMyLink()));
}
}
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);
callSelectAvatarDialog();
if(mySelectAvatarDialogImpl->getSettingsCorrect()) {
pushButton_Opponent3Avatar->setMyLink(mySelectAvatarDialogImpl->getAvatarLink());
pushButton_Opponent3Avatar->setIcon(QIcon(pushButton_Opponent3Avatar->getMyLink()));
}
}
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);
callSelectAvatarDialog();
if(mySelectAvatarDialogImpl->getSettingsCorrect()) {
pushButton_Opponent4Avatar->setMyLink(mySelectAvatarDialogImpl->getAvatarLink());
pushButton_Opponent4Avatar->setIcon(QIcon(pushButton_Opponent4Avatar->getMyLink()));
}
}
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);
callSelectAvatarDialog();
if(mySelectAvatarDialogImpl->getSettingsCorrect()) {
pushButton_Opponent5Avatar->setMyLink(mySelectAvatarDialogImpl->getAvatarLink());
pushButton_Opponent5Avatar->setIcon(QIcon(pushButton_Opponent5Avatar->getMyLink()));
}
}
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);
callSelectAvatarDialog();
if(mySelectAvatarDialogImpl->getSettingsCorrect()) {
pushButton_Opponent6Avatar->setMyLink(mySelectAvatarDialogImpl->getAvatarLink());
pushButton_Opponent6Avatar->setIcon(QIcon(pushButton_Opponent6Avatar->getMyLink()));
}
}
void settingsDialogImpl::setLogDir()