Warning, file /graphics/krita/sdk/tests/testing_timed_default_bounds.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 * SPDX-FileCopyrightText: 2015 Jouni Pentikäinen <joupent@gmail.com> 0003 * SPDX-FileCopyrightText: 2015 Dmitry Kazakov <dimula73@gmail.com> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef __TESTING_TIMED_DEFAULT_BOUNDS_H 0009 #define __TESTING_TIMED_DEFAULT_BOUNDS_H 0010 0011 #include "kis_default_bounds_base.h" 0012 0013 0014 namespace TestUtil { 0015 0016 struct TestingTimedDefaultBounds : public KisDefaultBoundsBase { 0017 TestingTimedDefaultBounds(const QRect &bounds = QRect(0,0,100,100)) 0018 : m_time(0), 0019 m_lod(0), 0020 m_bounds(bounds) 0021 { 0022 } 0023 0024 QRect bounds() const override { 0025 return m_bounds; 0026 } 0027 0028 bool wrapAroundMode() const override { 0029 return false; 0030 } 0031 0032 int currentLevelOfDetail() const override { 0033 return m_lod; 0034 } 0035 0036 int currentTime() const override { 0037 return m_time; 0038 } 0039 0040 bool externalFrameActive() const override { 0041 return false; 0042 } 0043 0044 void testingSetTime(int time) { 0045 m_time = time; 0046 } 0047 0048 void testingSetLod(int lod) { 0049 m_lod = lod; 0050 } 0051 0052 void * sourceCookie() const override { 0053 return 0; 0054 } 0055 0056 private: 0057 int m_time; 0058 int m_lod; 0059 QRect m_bounds; 0060 }; 0061 0062 } 0063 0064 #endif /* __TESTING_TIMED_DEFAULT_BOUNDS_H */