avatargallery ...
This commit is contained in:
@@ -1924,7 +1924,7 @@ void mainWindowImpl::postRiverRunAnimation3() {
|
||||
// groupBoxArray[i]->setPalette(tempPalette);
|
||||
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")) {
|
||||
|
||||
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. *
|
||||
***************************************************************************/
|
||||
#include "selectavatardialogimpl.h"
|
||||
#include "myavatarlistitem.h"
|
||||
#include "configfile.h"
|
||||
#include <iostream>
|
||||
|
||||
@@ -40,13 +41,7 @@ selectAvatarDialogImpl::selectAvatarDialogImpl(QWidget *parent, ConfigFile *c)
|
||||
listWidget->setDragEnabled(FALSE);
|
||||
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_2, SIGNAL(toggled(bool)), this, SLOT(toggleGroupBox2(bool)));
|
||||
|
||||
@@ -54,6 +49,18 @@ selectAvatarDialogImpl::selectAvatarDialogImpl(QWidget *parent, ConfigFile *c)
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -61,3 +68,8 @@ void selectAvatarDialogImpl::toggleGroupBox1(bool toogleState) { if(groupBox->is
|
||||
|
||||
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:
|
||||
void toggleGroupBox1(bool);
|
||||
void toggleGroupBox2(bool);
|
||||
|
||||
|
||||
QString getAvatarLink();
|
||||
|
||||
private:
|
||||
|
||||
ConfigFile* myConfig;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#include "settingsdialogimpl.h"
|
||||
#include "myavatarlistitem.h"
|
||||
|
||||
#include "configfile.h"
|
||||
#include <iostream>
|
||||
@@ -289,12 +290,18 @@ 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);
|
||||
lineEdit_humanPlayerAvatar->setText(fileName);*/
|
||||
}
|
||||
|
||||
void settingsDialogImpl::setAvatarFile1() {
|
||||
|
||||
Reference in New Issue
Block a user