File indexing completed on 2024-11-10 03:44:17
0001 /* 0002 SPDX-FileCopyrightText: 2009 Mathias Kraus <k.hias@gmx.de> 0003 SPDX-FileCopyrightText: 2007-2008 Thomas Gallinari <tg8187@yahoo.fr> 0004 SPDX-FileCopyrightText: 2007-2008 Pierre-BenoƮt Besse <besse.pb@gmail.com> 0005 0006 SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef ARENAITEM_H 0010 #define ARENAITEM_H 0011 0012 #include <KGameRenderedItem> 0013 0014 class KGameRenderer; 0015 0016 /** 0017 * @brief This class is the graphical view of the Arena. 0018 */ 0019 class ArenaItem : public QObject, public KGameRenderedItem 0020 { 0021 0022 Q_OBJECT 0023 0024 public: 0025 0026 /** 0027 * Creates a new ArenaItem instances. 0028 * @param p_x the x-coordinate 0029 * @param p_y the y-coordinate 0030 * @param renderer the KGameRenderer 0031 * @param spriteKey the spriteKey for the ArenaItem 0032 */ 0033 ArenaItem(qreal p_x, qreal p_y, KGameRenderer* renderer, const QString& spriteKey); 0034 0035 /** 0036 * Deletes the ArenaItem instances. 0037 */ 0038 ~ArenaItem() override; 0039 0040 public Q_SLOTS: 0041 0042 /** 0043 * Updates the graphics after a resize 0044 * @param svgScaleFactor the scaling factor between svg and rendered pixmap 0045 */ 0046 virtual void updateGraphics(qreal svgScaleFactor); 0047 }; 0048 0049 #endif 0050