granatier
infosidebar.cpp
Go to the documentation of this file.
68 nTop = m_gameScene->sceneRect().y() + m_gameScene->height()/2 - playerList.count()/2 * (nHeight + 4);
125 playerInfo->bonusShieldDimm->setPos(playerInfo->bonusShield->pos().x()-0.5, playerInfo->bonusShield->pos().y()-0.5);
131 playerInfo->bonusThrow->setPos(nLeft + Granatier::CellSize / 2 + 4, nTop + Granatier::CellSize / 2 + 1 + i * (nHeight + 4));
138 playerInfo->bonusThrowDimm->setPos(playerInfo->bonusThrow->pos().x()-0.5, playerInfo->bonusThrow->pos().y()-0.5);
144 playerInfo->bonusKick->setPos(nLeft + 2 * (Granatier::CellSize / 2 + 4), nTop + Granatier::CellSize / 2 + 1 + i * (nHeight + 4));
151 playerInfo->bonusKickDimm->setPos(playerInfo->bonusKick->pos().x()-0.5, playerInfo->bonusKick->pos().y()-0.5);
157 playerInfo->badBonus->setPos(nLeft + 3 * (Granatier::CellSize / 2 + 4), nTop + Granatier::CellSize / 2 + 1 + i * (nHeight + 4));
164 playerInfo->badBonusDimm->setPos(playerInfo->badBonus->pos().x()-0.5, playerInfo->badBonus->pos().y()-0.5);
171 connect(playerList[i], SIGNAL(bonusUpdated(Player*,Granatier::Bonus::Type,int)), this, SLOT(bonusInfoChanged(Player*,Granatier::Bonus::Type,int)));
177 m_background->setRect(nLeft - 10 , nTop - 10, nWidth + 16, playerList.count() * (nHeight + 4) + 16);
346 void InfoSidebar::bonusInfoChanged(Player* player, Granatier::Bonus::Type bonusType, int percentageElapsed)
void setFont(const QFont &font)
void setHeight(int height)
iterator erase(iterator pos)
int width() const
Definition: granatierglobals.h:111
Definition: granatierglobals.h:109
QList< QGraphicsItem * > items() const
Definition: granatierglobals.h:93
virtual QRectF boundingRect() const
sceneRect
InfoSidebar(Game *p_game, GameScene *p_scene)
Creates a new InfoSidebar instance.
Definition: infosidebar.cpp:32
Definition: granatierglobals.h:95
Definition: infosidebar.h:36
qreal height() const
int x() const
int y() const
void setRect(const QRectF &rectangle)
void setHeight(qreal height)
Definition: granatierglobals.h:115
int count(const T &value) const
void removeItem(QGraphicsItem *item)
void setPos(const QPointF &pos)
QList< QGraphicsView * > views() const
void setWidth(int width)
This class manages the game main loop : it regularly checks the key press events, computes the charac...
Definition: game.h:43
iterator end()
void setColor(const QColor &color)
iterator begin()
Definition: granatierglobals.h:110
Definition: granatierglobals.h:114
Definition: granatierglobals.h:116
virtual void updateGraphics(qreal svgScaleFactor)
Updates the graphics after a resize.
Definition: infosidebar.cpp:434
qreal width() const
void setWidth(int width)
void setPen(const QPen &pen)
void setWidth(qreal width)
KGameRenderer * renderer(Granatier::Element::Type type, Player *player=NULL)
Returns the renderer for the requestet Element Type.
Definition: gamescene.cpp:638
This class contains all the Game elements to be drawn on the screen by the GameView instance...
Definition: gamescene.h:50
int height() const
void setX(int x)
void setY(int y)
qreal height() const
iterator insert(const Key &key, const T &value)
void setBrush(const QBrush &brush)
void setDefaultTextColor(const QColor &col)
void addItem(QGraphicsItem *item)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setZValue(qreal z)
Definition: granatierglobals.h:112
QRectF rect() const
const T value(const Key &key) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.