Warning, file /graphics/glaxnimate/src/core/model/stretchable_time.hpp 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: 2019-2023 Mattia Basaglia <dev@dragon.best>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 
0007 #pragma once
0008 
0009 #include "model/object.hpp"
0010 #include "model/property/property.hpp"
0011 
0012 namespace glaxnimate::model {
0013 
0014 
0015 class StretchableTime : public Object
0016 {
0017     GLAXNIMATE_OBJECT(StretchableTime)
0018     GLAXNIMATE_PROPERTY(float, start_time, 0, &StretchableTime::timing_changed, {}, PropertyTraits::Visual)
0019     GLAXNIMATE_PROPERTY(float, stretch, 1,    &StretchableTime::timing_changed, {}, PropertyTraits::Visual|PropertyTraits::Percent)
0020 
0021 public:
0022     using Object::Object;
0023 
0024     float time_to_local(float global) const;
0025     float time_from_local(float local) const;
0026 
0027     QString type_name_human() const override;
0028 
0029 private:
0030     bool validate_stretch(float stretch);
0031 
0032 Q_SIGNALS:
0033     void timing_changed();
0034 };
0035 
0036 
0037 } // model