avatargallery ...
This commit is contained in:
@@ -130,6 +130,7 @@ HEADERS += src/game.h \
|
|||||||
src/gui/qt/newlocalgamedialog/newgamedialogimpl.h \
|
src/gui/qt/newlocalgamedialog/newgamedialogimpl.h \
|
||||||
src/gui/qt/settingsdialog/settingsdialogimpl.h \
|
src/gui/qt/settingsdialog/settingsdialogimpl.h \
|
||||||
src/gui/qt/settingsdialog/selectavatardialog/selectavatardialogimpl.h \
|
src/gui/qt/settingsdialog/selectavatardialog/selectavatardialogimpl.h \
|
||||||
|
src/gui/qt/settingsdialog/selectavatardialog/myavatarlistitem.h \
|
||||||
src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.h \
|
src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.h \
|
||||||
src/gui/qt/waitforservertostartgamedialog/waitforservertostartgamedialogimpl.h \
|
src/gui/qt/waitforservertostartgamedialog/waitforservertostartgamedialogimpl.h \
|
||||||
src/gui/qt/changehumanplayernamedialog/changehumanplayernamedialogimpl.h \
|
src/gui/qt/changehumanplayernamedialog/changehumanplayernamedialogimpl.h \
|
||||||
@@ -223,6 +224,7 @@ SOURCES += src/game.cpp \
|
|||||||
src/gui/qt/newlocalgamedialog/newgamedialogimpl.cpp \
|
src/gui/qt/newlocalgamedialog/newgamedialogimpl.cpp \
|
||||||
src/gui/qt/settingsdialog/settingsdialogimpl.cpp \
|
src/gui/qt/settingsdialog/settingsdialogimpl.cpp \
|
||||||
src/gui/qt/settingsdialog/selectavatardialog/selectavatardialogimpl.cpp \
|
src/gui/qt/settingsdialog/selectavatardialog/selectavatardialogimpl.cpp \
|
||||||
|
src/gui/qt/settingsdialog/selectavatardialog/myavatarlistitem.cpp \
|
||||||
src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.cpp \
|
src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.cpp \
|
||||||
src/gui/qt/waitforservertostartgamedialog/waitforservertostartgamedialogimpl.cpp \
|
src/gui/qt/waitforservertostartgamedialog/waitforservertostartgamedialogimpl.cpp \
|
||||||
src/gui/qt/changehumanplayernamedialog/changehumanplayernamedialogimpl.cpp \
|
src/gui/qt/changehumanplayernamedialog/changehumanplayernamedialogimpl.cpp \
|
||||||
|
|||||||
@@ -1924,7 +1924,7 @@ void mainWindowImpl::postRiverRunAnimation3() {
|
|||||||
// groupBoxArray[i]->setPalette(tempPalette);
|
// groupBoxArray[i]->setPalette(tempPalette);
|
||||||
actionLabelArray[i]->setPixmap(QPixmap(":/actions/resources/graphics/actions/action_winner.png"));
|
actionLabelArray[i]->setPixmap(QPixmap(":/actions/resources/graphics/actions/action_winner.png"));
|
||||||
|
|
||||||
//nicht gewonnene Karten ausblenden
|
//show winnercards if more than one player is active
|
||||||
if ( currentHand->getActivePlayersCounter() != 1 && myConfig->readConfigInt("ShowFadeOutCardsAnimation")) {
|
if ( currentHand->getActivePlayersCounter() != 1 && myConfig->readConfigInt("ShowFadeOutCardsAnimation")) {
|
||||||
|
|
||||||
int j;
|
int j;
|
||||||
|
|||||||
@@ -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 "myavatarlistitem.h"
|
||||||
|
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
MyAvatarListItem::MyAvatarListItem(QListWidget* parent)
|
||||||
|
: QListWidgetItem(parent, QListWidgetItem::UserType)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
MyAvatarListItem::~MyAvatarListItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
@@ -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 MYAVATARLISTITEM_H
|
||||||
|
#define MYAVATARLISTITEM_H
|
||||||
|
|
||||||
|
#include <QtGui>
|
||||||
|
#include <QtCore>
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
class MyAvatarListItem : public QListWidgetItem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MyAvatarListItem(QListWidget*);
|
||||||
|
|
||||||
|
~MyAvatarListItem();
|
||||||
|
|
||||||
|
void setMyLink(QString theValue){ myLink = theValue;}
|
||||||
|
QString getMyLink() const{ return myLink;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
QString myLink;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#include "selectavatardialogimpl.h"
|
#include "selectavatardialogimpl.h"
|
||||||
|
#include "myavatarlistitem.h"
|
||||||
#include "configfile.h"
|
#include "configfile.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@@ -40,13 +41,7 @@ selectAvatarDialogImpl::selectAvatarDialogImpl(QWidget *parent, ConfigFile *c)
|
|||||||
listWidget->setDragEnabled(FALSE);
|
listWidget->setDragEnabled(FALSE);
|
||||||
listWidget->setResizeMode(QListView::Adjust);
|
listWidget->setResizeMode(QListView::Adjust);
|
||||||
|
|
||||||
int i;
|
|
||||||
for (i=0; i<30; i++) {
|
|
||||||
QListWidgetItem *myItem = new QListWidgetItem;
|
|
||||||
myItem->setIcon(QIcon(QPixmap(":/guiv2/resources/guiv2/genereticAvatar.png")));
|
|
||||||
listWidget->addItem(myItem);
|
|
||||||
};
|
|
||||||
|
|
||||||
QObject::connect(groupBox, SIGNAL(toggled(bool)), this, SLOT(toggleGroupBox1(bool)));
|
QObject::connect(groupBox, SIGNAL(toggled(bool)), this, SLOT(toggleGroupBox1(bool)));
|
||||||
QObject::connect(groupBox_2, SIGNAL(toggled(bool)), this, SLOT(toggleGroupBox2(bool)));
|
QObject::connect(groupBox_2, SIGNAL(toggled(bool)), this, SLOT(toggleGroupBox2(bool)));
|
||||||
|
|
||||||
@@ -54,6 +49,18 @@ selectAvatarDialogImpl::selectAvatarDialogImpl(QWidget *parent, ConfigFile *c)
|
|||||||
|
|
||||||
void selectAvatarDialogImpl::exec() {
|
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("");
|
||||||
|
|
||||||
QDialog::exec();
|
QDialog::exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,3 +68,8 @@ void selectAvatarDialogImpl::toggleGroupBox1(bool toogleState) { if(groupBox->is
|
|||||||
|
|
||||||
void selectAvatarDialogImpl::toggleGroupBox2(bool toogleState) { if(groupBox_2->isChecked()) groupBox->setChecked(FALSE); }
|
void selectAvatarDialogImpl::toggleGroupBox2(bool toogleState) { if(groupBox_2->isChecked()) groupBox->setChecked(FALSE); }
|
||||||
|
|
||||||
|
QString selectAvatarDialogImpl::getAvatarLink() {
|
||||||
|
|
||||||
|
if(groupBox->isChecked()) return static_cast<MyAvatarListItem*>(listWidget->currentItem())->getMyLink();
|
||||||
|
else return lineEdit->text();
|
||||||
|
}
|
||||||
|
|||||||
@@ -39,13 +39,13 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
void toggleGroupBox1(bool);
|
void toggleGroupBox1(bool);
|
||||||
void toggleGroupBox2(bool);
|
void toggleGroupBox2(bool);
|
||||||
|
|
||||||
|
QString getAvatarLink();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
ConfigFile* myConfig;
|
ConfigFile* myConfig;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#include "settingsdialogimpl.h"
|
#include "settingsdialogimpl.h"
|
||||||
|
#include "myavatarlistitem.h"
|
||||||
|
|
||||||
#include "configfile.h"
|
#include "configfile.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -289,12 +290,18 @@ void settingsDialogImpl::setFlipsidePicFileName()
|
|||||||
|
|
||||||
void settingsDialogImpl::setAvatarFile0() {
|
void settingsDialogImpl::setAvatarFile0() {
|
||||||
|
|
||||||
|
callSelectAvatarDialog();
|
||||||
|
if(mySelectAvatarDialogImpl->result() == QDialog::Accepted ) {
|
||||||
|
|
||||||
|
lineEdit_humanPlayerAvatar->setText(mySelectAvatarDialogImpl->getAvatarLink());
|
||||||
|
}
|
||||||
|
/*
|
||||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select your avatar picture"),
|
QString fileName = QFileDialog::getOpenFileName(this, tr("Select your avatar picture"),
|
||||||
QDir::homePath(),
|
QDir::homePath(),
|
||||||
tr("Images (*.png)"));
|
tr("Images (*.png)"));
|
||||||
|
|
||||||
if (!fileName.isEmpty())
|
if (!fileName.isEmpty())
|
||||||
lineEdit_humanPlayerAvatar->setText(fileName);
|
lineEdit_humanPlayerAvatar->setText(fileName);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void settingsDialogImpl::setAvatarFile1() {
|
void settingsDialogImpl::setAvatarFile1() {
|
||||||
|
|||||||
Reference in New Issue
Block a user