| 1 | // Copyright (C) 2025 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QSVGCSSPROPERTIES_P_H |
| 5 | #define QSVGCSSPROPERTIES_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <QtCore/qxmlstream.h> |
| 19 | #include <QtCore/qstringview.h> |
| 20 | #include <QtCore/qregularexpression.h> |
| 21 | #include <QtCore/qlist.h> |
| 22 | #include <QtCore/qstringview.h> |
| 23 | |
| 24 | QT_BEGIN_NAMESPACE |
| 25 | |
| 26 | // Holds the parsed value for each animation-* |
| 27 | struct QSvgAnimationProperty |
| 28 | { |
| 29 | QStringView name; |
| 30 | int duration = 0; |
| 31 | int delay = 0; |
| 32 | int iteration = 1; |
| 33 | }; |
| 34 | |
| 35 | class QSvgCssAnimationProperties |
| 36 | { |
| 37 | public: |
| 38 | QSvgCssAnimationProperties(const QXmlStreamAttributes &attributes); |
| 39 | QList<QSvgAnimationProperty> parse() const; |
| 40 | |
| 41 | private: |
| 42 | void shortHandtoLonghandForm(QStringView value); |
| 43 | |
| 44 | private: |
| 45 | QList<QStringView> m_names; |
| 46 | QList<QStringView> m_durations; |
| 47 | QList<QStringView> m_delays; |
| 48 | QList<QStringView> m_iterationCounts; |
| 49 | QList<QStringView> m_directions; |
| 50 | QList<QStringView> m_timingFunctions; |
| 51 | QList<QStringView> m_fillModes; |
| 52 | QList<QStringView> m_playStates; |
| 53 | }; |
| 54 | |
| 55 | QT_END_NAMESPACE |
| 56 | |
| 57 | #endif //QSVGCSSPROPERTIES_P_H |
| 58 | |