kapman
gamescene.cpp
Go to the documentation of this file.
34 // Connection between Game and GameScene for the display of won points when a bonus or a ghost is eaten
35 connect(p_game, SIGNAL(pointsToDisplay(long,qreal,qreal)), this, SLOT(displayPoints(long,qreal,qreal)));
82 element->update(m_game->getMaze()->getCell(i, j).getElement()->getX(), m_game->getMaze()->getCell(i, j).getElement()->getY());
172 // Update the theme config: if the default theme is selected, no theme entry is written -> the theme selector does not select the theme
199 element->update(m_game->getMaze()->getCell(i, j).getElement()->getX(), m_game->getMaze()->getCell(i, j).getElement()->getY());
231 m_newLevelLabel->setPlainText(i18nc("The number of the game level", "Level %1", m_game->getLevel()));
234 m_newLevelLabel->setPos((width() - m_newLevelLabel->boundingRect().width()) / 2, (height() - m_newLevelLabel->boundingRect().height()) / 2);
240 (height() - m_introLabel2->boundingRect().height() + m_newLevelLabel->boundingRect().height()) / 2);
246 m_introLabel->setPos((width() - m_introLabel->boundingRect().width()) / 2, (height() - m_introLabel->boundingRect().height()) / 2);
251 (height() - m_introLabel2->boundingRect().height() + m_introLabel->boundingRect().height()) / 2);
282 m_pauseLabel->setPos((width() - m_pauseLabel->boundingRect().width()) / 2, (height() - m_pauseLabel->boundingRect().height()) / 2);
301 if (items().contains(m_elementItems[(int)((p_y - (Cell::SIZE * 0.5)) / Cell::SIZE)][(int)((p_x - (Cell::SIZE * 0.5)) / Cell::SIZE)])) {
302 removeItem(m_elementItems[(int)((p_y - (Cell::SIZE * 0.5)) / Cell::SIZE)][(int)((p_x - (Cell::SIZE * 0.5)) / Cell::SIZE)]);
357 tempRef->setPos(p_xPos-(tempRef->boundingRect().width() / 2), p_yPos-(tempRef->boundingRect().height() / 2));
void setFont(const QFont &font)
Cell getCell(const int p_row, const int p_column) const
Gets the Cell at the given coordinates.
Definition: maze.cpp:180
virtual void update(qreal p_x, qreal p_y)
Updates the ElementItem coordinates.
Definition: elementitem.cpp:45
QList< QGraphicsItem * > items() const
virtual QRectF boundingRect() const
qreal height() const
int size() const
void setRotationFlag(bool rotate)
Set if the KapmanItem should be rotated (set by theme flag RotateKapman).
Definition: kapmanitem.h:121
QString number(int n, int base)
void append(const T &value)
bool load(const QString &filename)
void removeItem(QGraphicsItem *item)
void setPos(const QPointF &pos)
This class manages the game main loop : it regularly checks the key press events, computes the charac...
Definition: game.h:35
This class is the graphical representation of a game Element.
Definition: elementitem.h:28
T & first()
T takeLast()
qreal width() const
void setElementId(const QString &id)
T & last()
void update(qreal x, qreal y, qreal w, qreal h)
void setPlainText(const QString &text)
qreal height() const
void prepend(const T &value)
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)
qreal width() const
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:15 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:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.