Skip to content

Commit 9cd95d5

Browse files
hoshiryunmellado
authored andcommitted
Fix .h => .hpp ;
Fix attribute initialisation ;
1 parent ccdab6a commit 9cd95d5

15 files changed

Lines changed: 79 additions & 93 deletions

cmake/filelistGuiBase.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ set(guibase_headers
3939
RaGuiBase.hpp
4040
RadiumWindow/SimpleWindow.hpp
4141
RadiumWindow/SimpleWindowFactory.hpp
42-
KeyFrameEditor/KeyFrameEditor.h
43-
KeyFrameEditor/KeyFrameEditorFrame.h
44-
KeyFrameEditor/KeyFrameEditorFrameScale.h
45-
KeyFrameEditor/KeyFrameEditorScrollArea.h
46-
KeyFrameEditor/KeyFrameEditorTimeScale.h
47-
KeyFrameEditor/KeyFrameEditorValueScale.h
42+
KeyFrameEditor/KeyFrameEditor.hpp
43+
KeyFrameEditor/KeyFrameEditorFrame.hpp
44+
KeyFrameEditor/KeyFrameEditorFrameScale.hpp
45+
KeyFrameEditor/KeyFrameEditorScrollArea.hpp
46+
KeyFrameEditor/KeyFrameEditorTimeScale.hpp
47+
KeyFrameEditor/KeyFrameEditorValueScale.hpp
4848
SelectionManager/SelectionManager.hpp
4949
Timeline/HelpDialog.hpp
5050
Timeline/Configurations.hpp

src/GuiBase/KeyFrameEditor/KeyFrameEditor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "ui_KeyFrameEditor.h"
2-
#include <GuiBase/KeyFrameEditor/KeyFrameEditor.h>
3-
#include <GuiBase/KeyFrameEditor/KeyFrameEditorFrame.h>
2+
#include <GuiBase/KeyFrameEditor/KeyFrameEditor.hpp>
3+
#include <GuiBase/KeyFrameEditor/KeyFrameEditorFrame.hpp>
44

55
#include <Core/Animation/KeyFramedValue.hpp>
66

src/GuiBase/KeyFrameEditor/KeyFrameEditor.h renamed to src/GuiBase/KeyFrameEditor/KeyFrameEditor.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef RADIUMENGINE_KEYFRAME_EDITOR_H
2-
#define RADIUMENGINE_KEYFRAME_EDITOR_H
1+
#pragma once
32

43
#include <GuiBase/RaGuiBase.hpp>
54

@@ -67,9 +66,7 @@ class RA_GUIBASE_API KeyFrameEditor : public QDialog
6766
void resizeEvent( QResizeEvent* ev ) override;
6867

6968
private:
70-
Ui::KeyFrameEditor* ui;
69+
Ui::KeyFrameEditor* ui {nullptr};
7170
};
7271

7372
} // namespace Ra::GuiBase
74-
75-
#endif // RADIUMENGINE_KEYFRAME_EDITOR_H

src/GuiBase/KeyFrameEditor/KeyFrameEditor.ui

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,31 +1312,31 @@
13121312
<customwidget>
13131313
<class>Ra::GuiBase::KeyFrameEditorFrame</class>
13141314
<extends>QFrame</extends>
1315-
<header>GuiBase/KeyFrameEditor/KeyFrameEditorFrame.h</header>
1315+
<header>GuiBase/KeyFrameEditor/KeyFrameEditorFrame.hpp</header>
13161316
<container>1</container>
13171317
</customwidget>
13181318
<customwidget>
13191319
<class>Ra::GuiBase::KeyFrameEditorScrollArea</class>
13201320
<extends>QScrollArea</extends>
1321-
<header>GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.h</header>
1321+
<header>GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.hpp</header>
13221322
<container>1</container>
13231323
</customwidget>
13241324
<customwidget>
13251325
<class>Ra::GuiBase::KeyFrameEditorTimeScale</class>
13261326
<extends>QFrame</extends>
1327-
<header>GuiBase/KeyFrameEditor/KeyFrameEditorTimeScale.h</header>
1327+
<header>GuiBase/KeyFrameEditor/KeyFrameEditorTimeScale.hpp</header>
13281328
<container>1</container>
13291329
</customwidget>
13301330
<customwidget>
13311331
<class>Ra::GuiBase::KeyframeEditorValueScale</class>
13321332
<extends>QFrame</extends>
1333-
<header>GuiBase/KeyFrameEditor/KeyFrameEditorValueScale.h</header>
1333+
<header>GuiBase/KeyFrameEditor/KeyFrameEditorValueScale.hpp</header>
13341334
<container>1</container>
13351335
</customwidget>
13361336
<customwidget>
13371337
<class>Ra::GuiBase::KeyFrameEditorFrameScale</class>
13381338
<extends>QFrame</extends>
1339-
<header>GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.h</header>
1339+
<header>GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.hpp</header>
13401340
<container>1</container>
13411341
</customwidget>
13421342
</customwidgets>

src/GuiBase/KeyFrameEditor/KeyFrameEditorFrame.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
#include <GuiBase/KeyFrameEditor/KeyFrameEditorFrame.h>
1+
#include <GuiBase/KeyFrameEditor/KeyFrameEditorFrame.hpp>
22

33
#include <QCheckBox>
44
#include <QPainter>
55
#include <QScrollBar>
66
#include <QTimer>
77
#include <QWheelEvent>
88
#include <QtGlobal>
9+
#include <QPainterPath>
910

1011
#include <iostream>
1112

@@ -15,8 +16,8 @@
1516
#include <Core/Utils/Color.hpp>
1617
#include <Core/Utils/Log.hpp>
1718

18-
#include <GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.h>
19-
#include <GuiBase/Timeline/Configurations.h>
19+
#include <GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.hpp>
20+
#include <GuiBase/Timeline/Configurations.hpp>
2021
#include <ui_KeyFrameEditor.h>
2122

2223
static constexpr int CTRL_PT_RAD = 5;

src/GuiBase/KeyFrameEditor/KeyFrameEditorFrame.h renamed to src/GuiBase/KeyFrameEditor/KeyFrameEditorFrame.hpp

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef RADIUMENGINE_KEYFRAME_EDITOR_FRAME_H
2-
#define RADIUMENGINE_KEYFRAME_EDITOR_FRAME_H
1+
#pragma once
32

43
#include <QDoubleSpinBox>
54
#include <QFrame>
@@ -182,17 +181,17 @@ class KeyFrameEditorFrame : public QFrame
182181

183182
private:
184183
/// The currently edited KeyFramedValue.
185-
KeyFrame* m_value{nullptr};
184+
KeyFrame* m_value {nullptr};
186185

187186
/// The current time of the Timeline's playzone.
188-
Scalar m_cursor;
187+
Scalar m_cursor {0_ra};
189188

190189
/// The display state of the KeyFramed value channels.
191-
std::array<bool, 10> m_displayCurve =
192-
{true, true, true, true, true, true, true, true, true, true};
190+
std::array<bool, 10>
191+
m_displayCurve {true, true, true, true, true, true, true, true, true, true};
193192

194193
/// Whether the user is editing values or not.
195-
bool m_mouseLeftClicked{false};
194+
bool m_mouseLeftClicked {false};
196195

197196
/// The type for KeyFramedValue edition control points.
198197
using CurveControlPoints = std::vector<Ra::Core::Vector2>;
@@ -201,15 +200,13 @@ class KeyFrameEditorFrame : public QFrame
201200
std::array<CurveControlPoints, 10> m_curveControlPoints;
202201

203202
/// The current control point.
204-
Ra::Core::Vector2i m_currentControlPoint{-1, -1};
203+
Ra::Core::Vector2i m_currentControlPoint {-1, -1};
205204

206205
/// The QPainter to display all the data.
207-
QPainter* m_painter{nullptr};
206+
QPainter* m_painter {nullptr};
208207

209208
/// The KeyFrameEditor UI.
210-
Ui::KeyFrameEditor* m_ui{nullptr};
209+
Ui::KeyFrameEditor* m_ui {nullptr};
211210
};
212211

213212
} // namespace Ra::GuiBase
214-
215-
#endif // RADIUMENGINE_KEYFRAME_EDITOR_FRAME_H

src/GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#include <GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.h>
1+
#include <GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.hpp>
22

33
#include <QPainter>
44
#include <QScrollBar>
55

6-
#include <GuiBase/Timeline/Configurations.h>
6+
#include <GuiBase/Timeline/Configurations.hpp>
77

8-
#include <GuiBase/KeyFrameEditor/KeyFrameEditorFrame.h>
9-
#include <GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.h>
8+
#include <GuiBase/KeyFrameEditor/KeyFrameEditorFrame.hpp>
9+
#include <GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.hpp>
1010

1111
namespace Ra::GuiBase {
1212

src/GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.h renamed to src/GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.hpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef RADIUMENGINE_KEYFRAME_EDITOR_FRAMESCALE_H
2-
#define RADIUMENGINE_KEYFRAME_EDITOR_FRAMESCALE_H
1+
#pragma once
32

43
#include <QFrame>
54

@@ -31,12 +30,10 @@ class KeyFrameEditorFrameScale : public QFrame
3130

3231
private:
3332
/// The KeyFrameEditorFrame.
34-
KeyFrameEditorFrame* m_editorFrame{nullptr};
33+
KeyFrameEditorFrame* m_editorFrame {nullptr};
3534

3635
/// The KeyFrameEditorScrollArea.
37-
KeyFrameEditorScrollArea* m_scrollArea{nullptr};
36+
KeyFrameEditorScrollArea* m_scrollArea {nullptr};
3837
};
3938

4039
} // namespace Ra::GuiBase
41-
42-
#endif // RADIUMENGINE_KEYFRAME_EDITOR_FRAMESCALE_H

src/GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#include <GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.h>
1+
#include <GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.hpp>
22

33
#include <cmath>
44

55
#include <QScrollBar>
66
#include <QWheelEvent>
77

8-
#include <GuiBase/Timeline/Timeline.h>
9-
#include <GuiBase/Timeline/TimelineFrameSelector.h>
8+
#include <GuiBase/Timeline/Timeline.hpp>
9+
#include <GuiBase/Timeline/TimelineFrameSelector.hpp>
1010

1111
namespace Ra::GuiBase {
1212

src/GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.h renamed to src/GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.hpp

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef RADIUMENGINE_KEYFRAME_EDITOR_SCROLLAREARULER_H
2-
#define RADIUMENGINE_KEYFRAME_EDITOR_SCROLLAREARULER_H
1+
#pragma once
32

43
#include <QScrollArea>
54

@@ -95,38 +94,36 @@ class KeyFrameEditorScrollArea : public QScrollArea
9594
int m_sliderPosX; ///< x coordinate of the slider on mouse middle click.
9695
int m_sliderPosY; ///< y coordinate of the slider on mouse middle click.
9796

98-
Scalar m_maxTime{200}; ///< <b>end<\b> of the Timeline's playzone.
99-
Scalar m_stepTime; ///< Step between two time scale graduations.
100-
int m_nbIntervalTime{0}; ///< Number of time scale graduations.
101-
Scalar m_pixPerTime; ///< Number of pixels used to display 1 second on the scale.
102-
Scalar m_zeroTime; ///< Pixel corresponding to time 0.
97+
Scalar m_maxTime {200}; ///< <b>end<\b> of the Timeline's playzone.
98+
Scalar m_stepTime {10}; ///< Step between two time scale graduations.
99+
int m_nbIntervalTime {0}; ///< Number of time scale graduations.
100+
Scalar m_pixPerTime {10}; ///< Number of pixels used to display 1 second on the scale.
101+
Scalar m_zeroTime {10}; ///< Pixel corresponding to time 0.
103102

104-
Scalar m_maxValue{200}; ///< Maximal extent of a KeyFrame value.
105-
Scalar m_stepValue; ///< Step between two value scale graduations.
106-
int m_nbIntervalValue{0}; ///< Number of value scale graduations.
107-
Scalar
108-
m_pixPerValue; ///< Number of pixels used to display a value difference of 1 on the scale.
109-
Scalar m_zeroValue; ///< Pixel corresponding to time 0.
103+
Scalar m_maxValue {200}; ///< Maximal extent of a KeyFrame value.
104+
Scalar m_stepValue {10}; ///< Step between two value scale graduations.
105+
int m_nbIntervalValue {0}; ///< Number of value scale graduations.
106+
Scalar m_pixPerValue {
107+
10}; ///< Number of pixels used to display a value difference of 1 on the scale.
108+
Scalar m_zeroValue {10}; ///< Pixel corresponding to time 0.
110109

111110
/// Number of possible steps.
112-
static constexpr int s_nbSteps = 13;
111+
static constexpr int s_nbSteps {13};
113112

114113
/// Possible steps.
115-
static constexpr Scalar s_steps[s_nbSteps] = {0.01_ra,
116-
0.02_ra,
117-
0.05_ra,
118-
0.1_ra,
119-
0.2_ra,
120-
0.5_ra,
121-
1.0_ra,
122-
2.0_ra,
123-
5.0_ra,
124-
10.0_ra,
125-
20.0_ra,
126-
50.0_ra,
127-
100.0_ra};
114+
static constexpr Scalar s_steps[s_nbSteps] {0.01_ra,
115+
0.02_ra,
116+
0.05_ra,
117+
0.1_ra,
118+
0.2_ra,
119+
0.5_ra,
120+
1.0_ra,
121+
2.0_ra,
122+
5.0_ra,
123+
10.0_ra,
124+
20.0_ra,
125+
50.0_ra,
126+
100.0_ra};
128127
};
129128

130129
} // namespace Ra::GuiBase
131-
132-
#endif // RADIUMENGINE_KEYFRAME_EDITOR_SCROLLAREARULER_H

0 commit comments

Comments
 (0)