Pencil2D Animation
Download Community News Docs Contribute
  • Overview
  • Articles
  • Code
  •  
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • File List
Loading...
Searching...
No Matches
  • core_lib
  • src
  • util
cameraeasingtype.cpp
1/*
2
3Pencil2D - Traditional Animation Software
4Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5Copyright (C) 2012-2020 Matthew Chiawen Chang
6
7This program is free software; you can redistribute it and/or
8modify it under the terms of the GNU General Public License
9as published by the Free Software Foundation; version 2 of the License.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16*/
17
18#include <QCoreApplication>
19
20#include "cameraeasingtype.h"
21
22// Array structure must match CameraEasingType
23static const char* interpolationNames[] {
24 QT_TRANSLATE_NOOP("CameraEasingType", "Linear"),
25 QT_TRANSLATE_NOOP("CameraEasingType", "Moderate Ease-in"),
26 QT_TRANSLATE_NOOP("CameraEasingType", "Moderate Ease-out"),
27 QT_TRANSLATE_NOOP("CameraEasingType", "Moderate Ease-in - Ease-out"),
28 QT_TRANSLATE_NOOP("CameraEasingType", "Moderate Ease-out - Ease-in"),
29 QT_TRANSLATE_NOOP("CameraEasingType", "Quick Ease-in"),
30 QT_TRANSLATE_NOOP("CameraEasingType", "Quick Ease-out"),
31 QT_TRANSLATE_NOOP("CameraEasingType", "Quick Ease-in - Ease-out"),
32 QT_TRANSLATE_NOOP("CameraEasingType", "Quick Ease-out - Ease-in"),
33 QT_TRANSLATE_NOOP("CameraEasingType", "Fast Ease-in"),
34 QT_TRANSLATE_NOOP("CameraEasingType", "Fast Ease-out"),
35 QT_TRANSLATE_NOOP("CameraEasingType", "Fast Ease-in - Ease-out"),
36 QT_TRANSLATE_NOOP("CameraEasingType", "Fast Ease-out - Ease-in"),
37 QT_TRANSLATE_NOOP("CameraEasingType", "Faster Ease-in"),
38 QT_TRANSLATE_NOOP("CameraEasingType", "Faster Ease-out"),
39 QT_TRANSLATE_NOOP("CameraEasingType", "Faster Ease-in - Ease-out"),
40 QT_TRANSLATE_NOOP("CameraEasingType", "Faster Ease-out - Ease-in"),
41 QT_TRANSLATE_NOOP("CameraEasingType", "Slow Ease-in"),
42 QT_TRANSLATE_NOOP("CameraEasingType", "Slow Ease-out"),
43 QT_TRANSLATE_NOOP("CameraEasingType", "Slow Ease-in - Ease-out"),
44 QT_TRANSLATE_NOOP("CameraEasingType", "Slow Ease-out - Ease-in"),
45 QT_TRANSLATE_NOOP("CameraEasingType", "Fastest Ease-in"),
46 QT_TRANSLATE_NOOP("CameraEasingType", "Fastest Ease-out"),
47 QT_TRANSLATE_NOOP("CameraEasingType", "Fastest Ease-in - Ease-out"),
48 QT_TRANSLATE_NOOP("CameraEasingType", "Fastest Ease-out - Ease-in"),
49 QT_TRANSLATE_NOOP("CameraEasingType", "Circle-based Ease-in"),
50 QT_TRANSLATE_NOOP("CameraEasingType", "Circle-based Ease-out"),
51 QT_TRANSLATE_NOOP("CameraEasingType", "Circle-based Ease-in - Ease-out"),
52 QT_TRANSLATE_NOOP("CameraEasingType", "Circle-based Ease-out - Ease-in"),
53 QT_TRANSLATE_NOOP("CameraEasingType", "Elastic Ease-in"),
54 QT_TRANSLATE_NOOP("CameraEasingType", "Elastic Ease-out"),
55 QT_TRANSLATE_NOOP("CameraEasingType", "Elastic Ease-in - Ease-out"),
56 QT_TRANSLATE_NOOP("CameraEasingType", "Elastic Ease-out - Ease-in"),
57 QT_TRANSLATE_NOOP("CameraEasingType", "Overshoot Ease-in"),
58 QT_TRANSLATE_NOOP("CameraEasingType", "Overshoot Ease-out"),
59 QT_TRANSLATE_NOOP("CameraEasingType", "Overshoot Ease-in - Ease-out"),
60 QT_TRANSLATE_NOOP("CameraEasingType", "Overshoot Ease-out - Ease-in"),
61 QT_TRANSLATE_NOOP("CameraEasingType", "Bounce Ease-in"),
62 QT_TRANSLATE_NOOP("CameraEasingType", "Bounce Ease-out"),
63 QT_TRANSLATE_NOOP("CameraEasingType", "Bounce Ease-in - Ease-out"),
64 QT_TRANSLATE_NOOP("CameraEasingType", "Bounce Ease-out - Ease-in"),
65};
66
67QString getInterpolationText(CameraEasingType type)
68{
69 return QCoreApplication::translate("CameraEasingType", interpolationNames[static_cast<int>(type)]);
70}
QCoreApplication::translate
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)
QString
Generated on Thu May 8 2025 04:47:53 for Pencil2D by doxygen 1.9.6 based on revision 4513250b1d5b1a3676ec0e67b06b7a885ceaae39