diff --git a/libs/ui/tool/kis_stabilized_events_sampler.h b/libs/ui/tool/kis_stabilized_events_sampler.h index 20a7280e95..8331665258 100644 --- a/libs/ui/tool/kis_stabilized_events_sampler.h +++ b/libs/ui/tool/kis_stabilized_events_sampler.h @@ -1,87 +1,87 @@ /* * Copyright (c) 2016 Dmitry Kazakov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __KIS_STABILIZED_EVENTS_SAMPLER_H #define __KIS_STABILIZED_EVENTS_SAMPLER_H #include #include #include "kritaui_export.h" class KisPaintInformation; #include class KRITAUI_EXPORT KisStabilizedEventsSampler { public: KisStabilizedEventsSampler(int sampleTime = 1); ~KisStabilizedEventsSampler(); void clear(); void addEvent(const KisPaintInformation &pi); void addFinishingEvent(int numSamples); public: - class iterator : + class KRITAUI_EXPORT iterator : public boost::iterator_facade { public: iterator() : m_sampler(0), m_index(0), m_alpha(0) {} iterator(const KisStabilizedEventsSampler* sampler, int index, qreal alpha) : m_sampler(sampler), m_index(index), m_alpha(alpha) {} private: friend class boost::iterator_core_access; void increment() { m_index++; } bool equal(iterator const& other) const { return m_index == other.m_index && m_sampler == other.m_sampler; } const KisPaintInformation& dereference() const; private: const KisStabilizedEventsSampler* m_sampler; int m_index; qreal m_alpha; }; std::pair range() const; private: struct Private; const QScopedPointer m_d; }; #endif /* __KIS_STABILIZED_EVENTS_SAMPLER_H */