Merge branch 'master' into Refactor-settings

Conflicts:
	oracle/CMakeLists.txt
This commit is contained in:
marco 2015-09-01 21:28:53 +02:00
commit baa61d0571
330 changed files with 37514 additions and 13448 deletions

View file

@ -15,6 +15,7 @@
#include "tab_game.h"
#include "gamescene.h"
#include "settingscache.h"
#include "thememanager.h"
#include "dlg_create_token.h"
#include "carddatabase.h"
#include "color.h"
@ -68,25 +69,18 @@ PlayerArea::PlayerArea(QGraphicsItem *parentItem)
: QObject(), QGraphicsItem(parentItem)
{
setCacheMode(DeviceCoordinateCache);
connect(settingsCache, SIGNAL(playerBgPathChanged()), this, SLOT(updateBgPixmap()));
updateBgPixmap();
connect(themeManager, SIGNAL(themeChanged()), this, SLOT(updateBg()));
updateBg();
}
void PlayerArea::updateBgPixmap()
void PlayerArea::updateBg()
{
QString bgPath = settingsCache->getPlayerBgPath();
if (bgPath.isEmpty())
bgPixmapBrush = QBrush(QColor(200, 200, 200));
else {
qDebug() << "loading" << bgPath;
bgPixmapBrush = QBrush(QPixmap(bgPath));
}
update();
}
void PlayerArea::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/)
{
painter->fillRect(bRect, bgPixmapBrush);
painter->fillRect(bRect, themeManager->getPlayerBgBrush());
}
void PlayerArea::setSize(qreal width, qreal height)