File indexing completed on 2024-05-19 04:07:54
0001 /* 0002 SPDX-FileCopyrightText: 2015 Jakob Gruber <jakob.gruber@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef RELOADABLEITEM_H 0008 #define RELOADABLEITEM_H 0009 0010 #include <QSize> 0011 0012 #include "src/gui/renderer.h" 0013 0014 class ReloadableItem 0015 { 0016 public: 0017 /* constructs item with field coordinates (x,y) */ 0018 ReloadableItem(int x, int y); 0019 0020 virtual ~ReloadableItem() { } 0021 0022 /* Called with view dimensions when window has been resized and 0023 item needs to reload and reposition itself correctly. */ 0024 virtual void reload(const QSize &size) = 0; 0025 protected: 0026 const int m_x, m_y; 0027 }; 0028 0029 #endif // RELOADABLEITEM_H