diff --git a/cmake/filelistGuiBase.cmake b/cmake/filelistGuiBase.cmake index 454cdc265f8..7266d9ffe07 100644 --- a/cmake/filelistGuiBase.cmake +++ b/cmake/filelistGuiBase.cmake @@ -36,12 +36,12 @@ set(guibase_headers BaseApplication.hpp MainWindowInterface.hpp RaGuiBase.hpp - KeyFrameEditor/KeyFrameEditor.h - KeyFrameEditor/KeyFrameEditorFrame.h - KeyFrameEditor/KeyFrameEditorFrameScale.h - KeyFrameEditor/KeyFrameEditorScrollArea.h - KeyFrameEditor/KeyFrameEditorTimeScale.h - KeyFrameEditor/KeyFrameEditorValueScale.h + KeyFrameEditor/KeyFrameEditor.hpp + KeyFrameEditor/KeyFrameEditorFrame.hpp + KeyFrameEditor/KeyFrameEditorFrameScale.hpp + KeyFrameEditor/KeyFrameEditorScrollArea.hpp + KeyFrameEditor/KeyFrameEditorTimeScale.hpp + KeyFrameEditor/KeyFrameEditorValueScale.hpp SelectionManager/SelectionManager.hpp Timeline/HelpDialog.hpp Timeline/Configurations.hpp diff --git a/src/GuiBase/KeyFrameEditor/KeyFrameEditor.cpp b/src/GuiBase/KeyFrameEditor/KeyFrameEditor.cpp index 6bdf0a35573..505d1b2b238 100644 --- a/src/GuiBase/KeyFrameEditor/KeyFrameEditor.cpp +++ b/src/GuiBase/KeyFrameEditor/KeyFrameEditor.cpp @@ -1,6 +1,6 @@ #include "ui_KeyFrameEditor.h" -#include -#include +#include +#include #include diff --git a/src/GuiBase/KeyFrameEditor/KeyFrameEditor.h b/src/GuiBase/KeyFrameEditor/KeyFrameEditor.hpp similarity index 92% rename from src/GuiBase/KeyFrameEditor/KeyFrameEditor.h rename to src/GuiBase/KeyFrameEditor/KeyFrameEditor.hpp index cd2c205bcd6..a4a51f3f5b2 100644 --- a/src/GuiBase/KeyFrameEditor/KeyFrameEditor.h +++ b/src/GuiBase/KeyFrameEditor/KeyFrameEditor.hpp @@ -1,5 +1,4 @@ -#ifndef RADIUMENGINE_KEYFRAME_EDITOR_H -#define RADIUMENGINE_KEYFRAME_EDITOR_H +#pragma once #include @@ -67,9 +66,7 @@ class RA_GUIBASE_API KeyFrameEditor : public QDialog void resizeEvent( QResizeEvent* ev ) override; private: - Ui::KeyFrameEditor* ui; + Ui::KeyFrameEditor* ui {nullptr}; }; } // namespace Ra::GuiBase - -#endif // RADIUMENGINE_KEYFRAME_EDITOR_H diff --git a/src/GuiBase/KeyFrameEditor/KeyFrameEditor.ui b/src/GuiBase/KeyFrameEditor/KeyFrameEditor.ui index b6dd92ca971..1eebde9c245 100644 --- a/src/GuiBase/KeyFrameEditor/KeyFrameEditor.ui +++ b/src/GuiBase/KeyFrameEditor/KeyFrameEditor.ui @@ -1312,31 +1312,31 @@ Ra::GuiBase::KeyFrameEditorFrame QFrame -
GuiBase/KeyFrameEditor/KeyFrameEditorFrame.h
+
GuiBase/KeyFrameEditor/KeyFrameEditorFrame.hpp
1
Ra::GuiBase::KeyFrameEditorScrollArea QScrollArea -
GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.h
+
GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.hpp
1
Ra::GuiBase::KeyFrameEditorTimeScale QFrame -
GuiBase/KeyFrameEditor/KeyFrameEditorTimeScale.h
+
GuiBase/KeyFrameEditor/KeyFrameEditorTimeScale.hpp
1
Ra::GuiBase::KeyframeEditorValueScale QFrame -
GuiBase/KeyFrameEditor/KeyFrameEditorValueScale.h
+
GuiBase/KeyFrameEditor/KeyFrameEditorValueScale.hpp
1
Ra::GuiBase::KeyFrameEditorFrameScale QFrame -
GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.h
+
GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.hpp
1
diff --git a/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrame.cpp b/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrame.cpp index 9169538220c..c9a5778530b 100644 --- a/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrame.cpp +++ b/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrame.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -15,8 +15,8 @@ #include #include -#include -#include +#include +#include #include static constexpr int CTRL_PT_RAD = 5; diff --git a/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrame.h b/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrame.hpp similarity index 93% rename from src/GuiBase/KeyFrameEditor/KeyFrameEditorFrame.h rename to src/GuiBase/KeyFrameEditor/KeyFrameEditorFrame.hpp index d578bbc8a72..a84689566cf 100644 --- a/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrame.h +++ b/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrame.hpp @@ -1,5 +1,4 @@ -#ifndef RADIUMENGINE_KEYFRAME_EDITOR_FRAME_H -#define RADIUMENGINE_KEYFRAME_EDITOR_FRAME_H +#pragma once #include #include @@ -182,17 +181,17 @@ class KeyFrameEditorFrame : public QFrame private: /// The currently edited KeyFramedValue. - KeyFrame* m_value{nullptr}; + KeyFrame* m_value {nullptr}; /// The current time of the Timeline's playzone. - Scalar m_cursor; + Scalar m_cursor {0_ra}; /// The display state of the KeyFramed value channels. - std::array m_displayCurve = - {true, true, true, true, true, true, true, true, true, true}; + std::array + m_displayCurve {true, true, true, true, true, true, true, true, true, true}; /// Whether the user is editing values or not. - bool m_mouseLeftClicked{false}; + bool m_mouseLeftClicked {false}; /// The type for KeyFramedValue edition control points. using CurveControlPoints = std::vector; @@ -201,15 +200,13 @@ class KeyFrameEditorFrame : public QFrame std::array m_curveControlPoints; /// The current control point. - Ra::Core::Vector2i m_currentControlPoint{-1, -1}; + Ra::Core::Vector2i m_currentControlPoint {-1, -1}; /// The QPainter to display all the data. - QPainter* m_painter{nullptr}; + QPainter* m_painter {nullptr}; /// The KeyFrameEditor UI. - Ui::KeyFrameEditor* m_ui{nullptr}; + Ui::KeyFrameEditor* m_ui {nullptr}; }; } // namespace Ra::GuiBase - -#endif // RADIUMENGINE_KEYFRAME_EDITOR_FRAME_H diff --git a/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.cpp b/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.cpp index 419c3063900..954af92c331 100644 --- a/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.cpp +++ b/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.cpp @@ -1,12 +1,12 @@ -#include +#include #include #include -#include +#include -#include -#include +#include +#include namespace Ra::GuiBase { diff --git a/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.h b/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.hpp similarity index 77% rename from src/GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.h rename to src/GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.hpp index fd1c7115278..859ef31c724 100644 --- a/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.h +++ b/src/GuiBase/KeyFrameEditor/KeyFrameEditorFrameScale.hpp @@ -1,5 +1,4 @@ -#ifndef RADIUMENGINE_KEYFRAME_EDITOR_FRAMESCALE_H -#define RADIUMENGINE_KEYFRAME_EDITOR_FRAMESCALE_H +#pragma once #include @@ -31,12 +30,10 @@ class KeyFrameEditorFrameScale : public QFrame private: /// The KeyFrameEditorFrame. - KeyFrameEditorFrame* m_editorFrame{nullptr}; + KeyFrameEditorFrame* m_editorFrame {nullptr}; /// The KeyFrameEditorScrollArea. - KeyFrameEditorScrollArea* m_scrollArea{nullptr}; + KeyFrameEditorScrollArea* m_scrollArea {nullptr}; }; } // namespace Ra::GuiBase - -#endif // RADIUMENGINE_KEYFRAME_EDITOR_FRAMESCALE_H diff --git a/src/GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.cpp b/src/GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.cpp index 111f7f7db22..c58d80f6f2d 100644 --- a/src/GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.cpp +++ b/src/GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.cpp @@ -1,12 +1,12 @@ -#include +#include #include #include #include -#include -#include +#include +#include namespace Ra::GuiBase { diff --git a/src/GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.h b/src/GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.hpp similarity index 62% rename from src/GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.h rename to src/GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.hpp index cfe18c2ecff..b08203cf603 100644 --- a/src/GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.h +++ b/src/GuiBase/KeyFrameEditor/KeyFrameEditorScrollArea.hpp @@ -1,5 +1,4 @@ -#ifndef RADIUMENGINE_KEYFRAME_EDITOR_SCROLLAREARULER_H -#define RADIUMENGINE_KEYFRAME_EDITOR_SCROLLAREARULER_H +#pragma once #include @@ -95,38 +94,36 @@ class KeyFrameEditorScrollArea : public QScrollArea int m_sliderPosX; ///< x coordinate of the slider on mouse middle click. int m_sliderPosY; ///< y coordinate of the slider on mouse middle click. - Scalar m_maxTime{200}; ///< end<\b> of the Timeline's playzone. - Scalar m_stepTime; ///< Step between two time scale graduations. - int m_nbIntervalTime{0}; ///< Number of time scale graduations. - Scalar m_pixPerTime; ///< Number of pixels used to display 1 second on the scale. - Scalar m_zeroTime; ///< Pixel corresponding to time 0. + Scalar m_maxTime {200}; ///< end<\b> of the Timeline's playzone. + Scalar m_stepTime {10}; ///< Step between two time scale graduations. + int m_nbIntervalTime {0}; ///< Number of time scale graduations. + Scalar m_pixPerTime {10}; ///< Number of pixels used to display 1 second on the scale. + Scalar m_zeroTime {10}; ///< Pixel corresponding to time 0. - Scalar m_maxValue{200}; ///< Maximal extent of a KeyFrame value. - Scalar m_stepValue; ///< Step between two value scale graduations. - int m_nbIntervalValue{0}; ///< Number of value scale graduations. - Scalar - m_pixPerValue; ///< Number of pixels used to display a value difference of 1 on the scale. - Scalar m_zeroValue; ///< Pixel corresponding to time 0. + Scalar m_maxValue {200}; ///< Maximal extent of a KeyFrame value. + Scalar m_stepValue {10}; ///< Step between two value scale graduations. + int m_nbIntervalValue {0}; ///< Number of value scale graduations. + Scalar m_pixPerValue { + 10}; ///< Number of pixels used to display a value difference of 1 on the scale. + Scalar m_zeroValue {10}; ///< Pixel corresponding to time 0. /// Number of possible steps. - static constexpr int s_nbSteps = 13; + static constexpr int s_nbSteps {13}; /// Possible steps. - static constexpr Scalar s_steps[s_nbSteps] = {0.01_ra, - 0.02_ra, - 0.05_ra, - 0.1_ra, - 0.2_ra, - 0.5_ra, - 1.0_ra, - 2.0_ra, - 5.0_ra, - 10.0_ra, - 20.0_ra, - 50.0_ra, - 100.0_ra}; + static constexpr Scalar s_steps[s_nbSteps] {0.01_ra, + 0.02_ra, + 0.05_ra, + 0.1_ra, + 0.2_ra, + 0.5_ra, + 1.0_ra, + 2.0_ra, + 5.0_ra, + 10.0_ra, + 20.0_ra, + 50.0_ra, + 100.0_ra}; }; } // namespace Ra::GuiBase - -#endif // RADIUMENGINE_KEYFRAME_EDITOR_SCROLLAREARULER_H diff --git a/src/GuiBase/KeyFrameEditor/KeyFrameEditorTimeScale.cpp b/src/GuiBase/KeyFrameEditor/KeyFrameEditorTimeScale.cpp index aeacbb5572e..7c1d895c0c1 100644 --- a/src/GuiBase/KeyFrameEditor/KeyFrameEditorTimeScale.cpp +++ b/src/GuiBase/KeyFrameEditor/KeyFrameEditorTimeScale.cpp @@ -1,9 +1,9 @@ -#include +#include #include #include -#include +#include namespace Ra::GuiBase { diff --git a/src/GuiBase/KeyFrameEditor/KeyFrameEditorTimeScale.h b/src/GuiBase/KeyFrameEditor/KeyFrameEditorTimeScale.hpp similarity index 77% rename from src/GuiBase/KeyFrameEditor/KeyFrameEditorTimeScale.h rename to src/GuiBase/KeyFrameEditor/KeyFrameEditorTimeScale.hpp index ca500c5e689..75dc27af40b 100644 --- a/src/GuiBase/KeyFrameEditor/KeyFrameEditorTimeScale.h +++ b/src/GuiBase/KeyFrameEditor/KeyFrameEditorTimeScale.hpp @@ -1,5 +1,4 @@ -#ifndef RADIUMENGINE_KEY_FRAME_EDITOR_TIMESCALE_H -#define RADIUMENGINE_KEY_FRAME_EDITOR_TIMESCALE_H +#pragma once #include @@ -27,9 +26,7 @@ class KeyFrameEditorTimeScale : public QFrame private: /// The KeyFrameEditorScrollArea. - KeyFrameEditorScrollArea* m_scrollArea{nullptr}; + KeyFrameEditorScrollArea* m_scrollArea {nullptr}; }; } // namespace Ra::GuiBase - -#endif // RADIUMENGINE_KEY_FRAME_EDITOR_TIMESCALE_H diff --git a/src/GuiBase/KeyFrameEditor/KeyFrameEditorValueScale.cpp b/src/GuiBase/KeyFrameEditor/KeyFrameEditorValueScale.cpp index 57d4178ff4e..1ce23d03e45 100644 --- a/src/GuiBase/KeyFrameEditor/KeyFrameEditorValueScale.cpp +++ b/src/GuiBase/KeyFrameEditor/KeyFrameEditorValueScale.cpp @@ -1,9 +1,9 @@ -#include +#include #include #include -#include +#include namespace Ra::GuiBase { diff --git a/src/GuiBase/KeyFrameEditor/KeyFrameEditorValueScale.h b/src/GuiBase/KeyFrameEditor/KeyFrameEditorValueScale.hpp similarity index 77% rename from src/GuiBase/KeyFrameEditor/KeyFrameEditorValueScale.h rename to src/GuiBase/KeyFrameEditor/KeyFrameEditorValueScale.hpp index 27fa5184ba6..0e79522ef2d 100644 --- a/src/GuiBase/KeyFrameEditor/KeyFrameEditorValueScale.h +++ b/src/GuiBase/KeyFrameEditor/KeyFrameEditorValueScale.hpp @@ -1,5 +1,4 @@ -#ifndef RADIUMENGINE_KEYFRAME_EDITOR_VALUESCALE_H -#define RADIUMENGINE_KEYFRAME_EDITOR_VALUESCALE_H +#pragma once #include @@ -27,9 +26,7 @@ class KeyframeEditorValueScale : public QFrame private: /// The KeyframeEditorScrollArea. - KeyFrameEditorScrollArea* m_scrollArea{nullptr}; + KeyFrameEditorScrollArea* m_scrollArea {nullptr}; }; } // namespace Ra::GuiBase - -#endif // RADIUMENGINE_KEYFRAME_EDITOR_VALUESCALE_H diff --git a/src/GuiBase/Timeline/Timeline.cpp b/src/GuiBase/Timeline/Timeline.cpp index dc86d679bba..e2edff51da5 100644 --- a/src/GuiBase/Timeline/Timeline.cpp +++ b/src/GuiBase/Timeline/Timeline.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include using namespace Ra::Core::Utils; @@ -428,7 +428,8 @@ void Timeline::on_comboBox_attribute_currentIndexChanged( const QString& arg1 ) switch ( names.size() ) { - case 2: { + case 2: + { const std::string entityName = names.at( 0 ).toStdString(); const std::string frameName = names.at( 1 ).toStdString(); auto lambda = [entityName]( const auto& frame ) { @@ -438,7 +439,8 @@ void Timeline::on_comboBox_attribute_currentIndexChanged( const QString& arg1 ) GET_KEYFRAMEDVALUE( list, frameName ); } break; - case 3: { + case 3: + { const std::string compName = names.at( 1 ).toStdString(); const std::string frameName = names.at( 2 ).toStdString(); auto lambda = [compName]( const auto& frame ) { @@ -448,7 +450,8 @@ void Timeline::on_comboBox_attribute_currentIndexChanged( const QString& arg1 ) GET_KEYFRAMEDVALUE( list, frameName ); } break; - case 4: { + case 4: + { const QStringList fullRoName = names.at( 2 ).split( '_' ); bool ok; const auto roIdx = fullRoName.last().toInt( &ok );