granatier
infooverlay.cpp
Go to the documentation of this file.
95 m_continueAfterPauseLabel->setFont(QFont("Helvetica", Granatier::CellSize * 0.35, QFont::Bold, false));
231 m_gameOverLabel->setPos(m_gameScene->sceneRect().x() + (m_gameScene->width() - m_gameOverLabel->boundingRect().width())/2,
337 nLeft = m_gameScene->sceneRect().x() + m_gameScene->width()/2 - (nMaxPlayerNameLength + em.boundingRect().width()/2 + nWinPoints * (Granatier::CellSize * 0.6 + em.boundingRect().width()/5))/2;
338 nTop = m_gameScene->sceneRect().y() + m_gameScene->height()/2 - (playerList.count()+2)/2 * em.boundingRect().height();
366 score->setPos(nLeft + nMaxPlayerNameLength + em.boundingRect().width()/2 + j * (Granatier::CellSize * 0.6 + em.boundingRect().width()/5),
372 m_continueLabel->setPos(m_gameScene->sceneRect().x() + (m_gameScene->width() - m_continueLabel->boundingRect().width())/2,
374 m_newGameLabel->setPos(m_gameScene->sceneRect().x() + (m_gameScene->width() - m_newGameLabel->boundingRect().width())/2,
376 m_gameOverLabel->setPos(m_gameScene->sceneRect().x() + (m_gameScene->width() - m_gameOverLabel->boundingRect().width())/2,
378 m_getReadyLabel->setPos(m_gameScene->sceneRect().x() + (m_gameScene->width() - m_getReadyLabel->boundingRect().width()) / 2,
379 m_gameScene->sceneRect().y() + (m_gameScene->height() - m_getReadyLabel->boundingRect().height() - m_startGameLabel->boundingRect().height()) / 2);
380 m_startGameLabel->setPos(m_gameScene->sceneRect().x() + (m_gameScene->width() - m_startGameLabel->boundingRect().width()) / 2,
381 m_gameScene->sceneRect().y() + (m_gameScene->height() + m_getReadyLabel->boundingRect().height() - m_startGameLabel->boundingRect().height()) / 2);
382 m_pauseLabel->setPos(m_gameScene->sceneRect().x() + (m_gameScene->width() - m_pauseLabel->boundingRect().width()) / 2,
383 m_gameScene->sceneRect().y() + (m_gameScene->height() - m_pauseLabel->boundingRect().height() - m_continueAfterPauseLabel->boundingRect().height()) / 2);
384 m_continueAfterPauseLabel->setPos(m_gameScene->sceneRect().x() + (m_gameScene->width() - m_continueAfterPauseLabel->boundingRect().width()) / 2,
385 m_gameScene->sceneRect().y() + (m_gameScene->height() + m_pauseLabel->boundingRect().height() - m_continueAfterPauseLabel->boundingRect().height()) / 2);
void setFont(const QFont &font)
void setHeight(int height)
int length() const
QList< QGraphicsItem * > items() const
virtual QRectF boundingRect() const
const T & at(int i) const
sceneRect
qreal height() const
void clear()
int x() const
int y() const
void setRect(const QRectF &rectangle)
int count(const T &value) const
void append(const T &value)
void removeItem(QGraphicsItem *item)
void resizeDimmOverlay(qreal x, qreal y, qreal width, qreal height)
Resize dimm overlay.
Definition: infooverlay.cpp:303
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()
iterator begin()
qreal width() const
InfoOverlay(Game *p_game, GameScene *p_scene)
Creates a new InfoOverlay instance.
Definition: infooverlay.cpp:31
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
void setPlainText(const QString &text)
qreal height() const
iterator insert(const Key &key, const T &value)
virtual void updateGraphics(qreal svgScaleFactor)
Updates the graphics after a resize.
Definition: infooverlay.cpp:308
void setBrush(const QBrush &brush)
void setDefaultTextColor(const QColor &col)
void addItem(QGraphicsItem *item)
void setZValue(qreal z)
qreal width() const
const T value(const Key &key) const
Definition: granatierglobals.h:96
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.