summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/MainFrm.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2018-04-23 10:38:39 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2018-04-23 10:39:33 +0300
commit058efbafa3e342e9a18c1897a85688c9644a7247 (patch)
treee813edb51a90ed3527683558e3c9195d5cb37640 /src/Authoring/Studio/MainFrm.cpp
parentca2c4d1993bf94b2707eb5ed1c3846737c2bbdd2 (diff)
parent9d3f193509bf2c11273b264535e8dbcd22e92306 (diff)
Merge remote-tracking branch 'origin/master' into wip/timeline
Diffstat (limited to 'src/Authoring/Studio/MainFrm.cpp')
-rw-r--r--src/Authoring/Studio/MainFrm.cpp221
1 files changed, 113 insertions, 108 deletions
diff --git a/src/Authoring/Studio/MainFrm.cpp b/src/Authoring/Studio/MainFrm.cpp
index cfa8136c..75226438 100644
--- a/src/Authoring/Studio/MainFrm.cpp
+++ b/src/Authoring/Studio/MainFrm.cpp
@@ -79,6 +79,13 @@ const long PLAYBACK_TIMER_TIMEOUT = 10; // 10 milliseconds
*/
CMainFrame::CMainFrame()
: m_ui(new Ui::MainFrame)
+ , m_remoteDeploymentSender(new RemoteDeploymentSender(this))
+ , m_sceneView(nullptr)
+ , m_recentItems(nullptr)
+ , m_paletteManager(nullptr)
+ , m_updateUITimer(new QTimer)
+ , m_playbackTimer(new QTimer)
+ , m_propSheet(nullptr)
{
m_ui->setupUi(this);
@@ -87,9 +94,7 @@ CMainFrame::CMainFrame()
g_StudioApp.GetCore()->GetDispatch()->AddPresentationChangeListener(this);
g_StudioApp.GetCore()->GetDispatch()->AddFileOpenListener(this);
g_StudioApp.GetCore()->GetDispatch()->AddClientPlayChangeListener(this);
- g_StudioApp.SetupTimer(WM_STUDIO_TIMER, this);
-
- m_remoteDeploymentSender = new RemoteDeploymentSender(this);
+ g_StudioApp.setupTimer(WM_STUDIO_TIMER, this);
// File Menu
connect(m_ui->action_New, &QAction::triggered, this, &CMainFrame::OnFileNew);
@@ -104,8 +109,8 @@ CMainFrame::CMainFrame()
connect(m_ui->actionData_Inputs, &QAction::triggered, this, &CMainFrame::OnFileDataInputs);
connect(m_ui->action_Connect_to_Device, &QAction::triggered, this,
&CMainFrame::OnFileConnectToDevice);
- m_RecentItems = new CRecentItems(m_ui->menuRecent_Projects, 0);
- connect(m_RecentItems, &CRecentItems::openRecent, this, &CMainFrame::OnFileOpenRecent);
+ m_recentItems.reset(new CRecentItems(m_ui->menuRecent_Projects, 0));
+ connect(m_recentItems.data(), &CRecentItems::openRecent, this, &CMainFrame::OnFileOpenRecent);
connect(m_ui->action_Exit, &QAction::triggered, this, &CMainFrame::close);
// Edit Menu
@@ -165,14 +170,14 @@ CMainFrame::CMainFrame()
connect(m_ui->action_Reference_Manual, &QAction::triggered, this, &CMainFrame::OnHelpIndex);
connect(m_ui->action_Visit_Qt_Web_Site, &QAction::triggered, this, &CMainFrame::OnHelpVisitQt);
connect(m_ui->action_About_Qt_3D_Studio, &QAction::triggered,
- []() { g_StudioApp.OnAppAbout(); });
+ []() { g_StudioApp.onAppAbout(); });
connect(m_ui->action_Open_Tutorial, &QAction::triggered, this, &CMainFrame::OnHelpOpenTutorial);
-
+ // Selection toolbar
connect(m_ui->actionItem_Select_Tool, &QAction::triggered,
- m_SceneView, &CSceneView::OnToolItemSelection);
+ m_sceneView.data(), &CSceneView::onToolItemSelection);
connect(m_ui->actionGroup_Select_Tool, &QAction::triggered,
- m_SceneView, &CSceneView::OnToolGroupSelection);
+ m_sceneView.data(), &CSceneView::onToolGroupSelection);
// Playback toolbar
connect(m_ui->actionPreview, &QAction::triggered,
@@ -207,13 +212,12 @@ CMainFrame::CMainFrame()
connect(m_ui->actionLock_Guides, &QAction::triggered, this, &CMainFrame::OnLockGuides);
// Others
- connect(m_remoteDeploymentSender, &RemoteDeploymentSender::connectionChanged,
+ connect(m_remoteDeploymentSender.data(), &RemoteDeploymentSender::connectionChanged,
this, &CMainFrame::OnConnectionChanged);
// TODO: better solution?
- QTimer* updateUITimer = new QTimer;
- updateUITimer->start(500);
- connect(updateUITimer, &QTimer::timeout, [&]() {
+ m_updateUITimer->start(500);
+ connect(m_updateUITimer.data(), &QTimer::timeout, [&]() {
if (QApplication::activeWindow() != this)
return;
@@ -259,8 +263,8 @@ CMainFrame::CMainFrame()
OnUpdateLockGuides();
});
- m_playbackTimer.setInterval(PLAYBACK_TIMER_TIMEOUT);
- connect(&m_playbackTimer, &QTimer::timeout, this, &CMainFrame::onPlaybackTimeout);
+ m_playbackTimer->setInterval(PLAYBACK_TIMER_TIMEOUT);
+ connect(m_playbackTimer.data(), &QTimer::timeout, this, &CMainFrame::onPlaybackTimeout);
qApp->installEventFilter(this);
}
@@ -270,6 +274,9 @@ CMainFrame::CMainFrame()
*/
CMainFrame::~CMainFrame()
{
+ qApp->removeEventFilter(this);
+ m_playbackTimer->stop();
+ m_updateUITimer->stop();
}
//==============================================================================
@@ -303,13 +310,13 @@ void CMainFrame::hideEvent(QHideEvent *event)
*/
void CMainFrame::OnCreate()
{
- m_SceneView = new CSceneView(&g_StudioApp, this);
- connect(m_SceneView, &CSceneView::toolChanged, this, &CMainFrame::OnUpdateToolChange);
+ m_sceneView.reset(new CSceneView(this));
+ connect(m_sceneView.data(), &CSceneView::toolChanged, this, &CMainFrame::OnUpdateToolChange);
- m_SceneView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_sceneView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
// tell the edit camera bar about this scene view
- m_ui->m_EditCamerasBar->SetSceneView(m_SceneView);
+ m_ui->m_EditCamerasBar->SetSceneView(m_sceneView.data());
// Newly launched, the file dialog for open and import should default to more recent
// opened/imported
@@ -317,8 +324,8 @@ void CMainFrame::OnCreate()
// this must NOT be in 'command line' mode
if (theDialogs) {
Q3DStudio::CString theMostRecentOpen;
- if (m_RecentItems && m_RecentItems->GetItemCount() > 0)
- theMostRecentOpen = m_RecentItems->GetItem(0).GetPath();
+ if (m_recentItems && m_recentItems->GetItemCount() > 0)
+ theMostRecentOpen = m_recentItems->GetItem(0).GetPath();
if (theMostRecentOpen.IsEmpty()) // default to exe
theMostRecentOpen = Qt3DSFile::GetApplicationDirectory().GetPath();
@@ -326,7 +333,7 @@ void CMainFrame::OnCreate()
}
// Create the view manager
- m_PaletteManager = new CPaletteManager(this);
+ m_paletteManager.reset(new CPaletteManager(this));
// Remove basic toolbar (open, save, undo/redo, etc.)
// Kept in ui form in case it is going to be added back later on.
@@ -352,7 +359,7 @@ void CMainFrame::OnCreate()
m_ui->actionZoom_Tool->setVisible(false);
#endif
- setCentralWidget(m_SceneView);
+ setCentralWidget(m_sceneView.data());
}
//==============================================================================
@@ -366,7 +373,7 @@ void CMainFrame::OnNewPresentation()
// Associate the scene object with the scene view
m_ui->m_EditCamerasBar->SetupCameras();
// Enable dockables, toolbars, and menus
- m_PaletteManager->EnablePalettes();
+ m_paletteManager->EnablePalettes();
m_ui->m_ClientToolsBar->setEnabled(true);
m_ui->m_EditCamerasBar->setEnabled(true);
m_ui->m_PlaybackToolbar->setEnabled(true);
@@ -571,7 +578,7 @@ void CMainFrame::OnUpdateToolChange()
m_ui->actionPosition_Tool->setChecked(theToolMode == STUDIO_TOOLMODE_MOVE);
m_ui->actionRotation_Tool->setChecked(theToolMode == STUDIO_TOOLMODE_ROTATE);
m_ui->actionScale_Tool->setChecked(theToolMode == STUDIO_TOOLMODE_SCALE);
- m_ui->actionLocal_Global_Manipulators->setChecked(g_StudioApp.GetMinpulationMode()
+ m_ui->actionLocal_Global_Manipulators->setChecked(g_StudioApp.GetManipulationMode()
== StudioManipulationModes::Global);
#if 0 // TODO: Disabled until UX decision is made if these buttons are needed at all or not
@@ -799,7 +806,7 @@ void CMainFrame::closeEvent(QCloseEvent *event)
}
// Tell the app to shutdown, do it here so it does not rely on static destructor.
- g_StudioApp.PerformShutdown();
+ g_StudioApp.performShutdown();
}
//==============================================================================
@@ -861,12 +868,12 @@ void CMainFrame::OnFileDataInputs()
void CMainFrame::EditPreferences(short inPageIndex)
{
// Set the active page based on the inPageIndex
- CStudioPreferencesPropSheet thePropSheet(tr("Studio Preferences"), this, inPageIndex);
+ m_propSheet.reset(new CStudioPreferencesPropSheet(tr("Studio Preferences"), this, inPageIndex));
// Display the CStudioPreferencesPropSheet
- int thePrefsReturn = thePropSheet.exec();
+ int thePrefsReturn = m_propSheet->exec();
- m_SceneView->OnEditCameraChanged();
+ m_sceneView->onEditCameraChanged();
if (thePrefsReturn == PREFS_RESET_DEFAULTS) {
// Restore default values
@@ -901,6 +908,8 @@ void CMainFrame::EditPreferences(short inPageIndex)
(float)CStudioPreferences::DEFAULT_SELECTOR_LENGTH);
RecheckSizingMode();
+ } else if (thePrefsReturn == PREFS_RESET_LAYOUT) {
+ onViewResetLayout();
}
}
@@ -941,12 +950,9 @@ void CMainFrame::OnPlayStart()
// Update the play button since this doesn't always happen automatically
Q_EMIT playStateChanged(true);
- if (m_PlaybackFlag == false) {
- m_PlaybackFlag = true;
-
- // g_StudioApp.GetCore()->GetDoc()->SetPlayMode( PLAYMODE_PLAY );
-
- m_playbackTimer.start();
+ if (m_playbackFlag == false) {
+ m_playbackFlag = true;
+ m_playbackTimer->start();
}
}
@@ -960,10 +966,9 @@ void CMainFrame::OnPlayStop()
// Update the play button since this doesn't always happen automatically
Q_EMIT playStateChanged(false);
- if (m_PlaybackFlag == true) {
- m_PlaybackFlag = false;
- m_playbackTimer.stop();
- // g_StudioApp.GetCore()->GetDoc()->SetPlayMode( PLAYMODE_STOP );
+ if (m_playbackFlag == true) {
+ m_playbackFlag = false;
+ m_playbackTimer->stop();
}
}
@@ -974,8 +979,8 @@ void CMainFrame::OnPlayStop()
*/
void CMainFrame::OnTimeChanged(long inTime)
{
- if (m_PaletteManager)
- m_PaletteManager->onTimeChanged(inTime);
+ if (m_paletteManager)
+ m_paletteManager->onTimeChanged(inTime);
}
//==============================================================================
@@ -1176,7 +1181,7 @@ void CMainFrame::OnUpdateToolScale()
*/
void CMainFrame::OnUpdateToolGlobalManipulators()
{
- StudioManipulationModes::Enum theMode = g_StudioApp.GetMinpulationMode();
+ StudioManipulationModes::Enum theMode = g_StudioApp.GetManipulationMode();
// If the current tool mode matches this button
// If the button is currently enabled
@@ -1193,7 +1198,7 @@ void CMainFrame::OnUpdateToolGlobalManipulators()
void CMainFrame::OnToolMove()
{
g_StudioApp.SetToolMode(STUDIO_TOOLMODE_MOVE);
- m_SceneView->SetToolMode(STUDIO_TOOLMODE_MOVE);
+ m_sceneView->setToolMode(STUDIO_TOOLMODE_MOVE);
}
//==============================================================================
@@ -1204,7 +1209,7 @@ void CMainFrame::OnToolMove()
void CMainFrame::OnToolRotate()
{
g_StudioApp.SetToolMode(STUDIO_TOOLMODE_ROTATE);
- m_SceneView->SetToolMode(STUDIO_TOOLMODE_ROTATE);
+ m_sceneView->setToolMode(STUDIO_TOOLMODE_ROTATE);
}
//==============================================================================
@@ -1215,17 +1220,17 @@ void CMainFrame::OnToolRotate()
void CMainFrame::OnToolScale()
{
g_StudioApp.SetToolMode(STUDIO_TOOLMODE_SCALE);
- m_SceneView->SetToolMode(STUDIO_TOOLMODE_SCALE);
+ m_sceneView->setToolMode(STUDIO_TOOLMODE_SCALE);
}
void CMainFrame::OnToolGlobalManipulators()
{
if (m_ui->actionLocal_Global_Manipulators->isChecked())
- g_StudioApp.SetMinpulationMode(StudioManipulationModes::Global);
+ g_StudioApp.SetManipulationMode(StudioManipulationModes::Global);
else
- g_StudioApp.SetMinpulationMode(StudioManipulationModes::Local);
+ g_StudioApp.SetManipulationMode(StudioManipulationModes::Local);
- g_StudioApp.GetRenderer().RequestRender();
+ g_StudioApp.getRenderer().RequestRender();
}
//==============================================================================
@@ -1273,8 +1278,8 @@ void CMainFrame::OnUpdateToolItemSelection()
*/
void CMainFrame::OnEditCameraZoomExtent()
{
- if (g_StudioApp.GetRenderer().GetEditCamera() >= 0)
- g_StudioApp.GetRenderer().EditCameraZoomToFit();
+ if (g_StudioApp.getRenderer().GetEditCamera() >= 0)
+ g_StudioApp.getRenderer().EditCameraZoomToFit();
else
g_StudioApp.SetAuthorZoom(!g_StudioApp.IsAuthorZoom());
}
@@ -1298,7 +1303,7 @@ void CMainFrame::HandleEditCameraZoomExtent()
void CMainFrame::OnEditCameraPan()
{
g_StudioApp.SetToolMode(STUDIO_TOOLMODE_CAMERA_PAN);
- m_SceneView->SetViewCursor(); // Just set cursor, we don't want to update previous tool
+ m_sceneView->setViewCursor(); // Just set cursor, we don't want to update previous tool
}
//==============================================================================
@@ -1309,7 +1314,7 @@ void CMainFrame::OnEditCameraPan()
void CMainFrame::OnEditCameraRotate()
{
g_StudioApp.SetToolMode(STUDIO_TOOLMODE_CAMERA_ROTATE);
- m_SceneView->SetViewCursor(); // Just set cursor, we don't want to update previous tool
+ m_sceneView->setViewCursor(); // Just set cursor, we don't want to update previous tool
}
//==============================================================================
@@ -1320,7 +1325,7 @@ void CMainFrame::OnEditCameraRotate()
void CMainFrame::OnEditCameraZoom()
{
g_StudioApp.SetToolMode(STUDIO_TOOLMODE_CAMERA_ZOOM);
- m_SceneView->SetViewCursor(); // Just set cursor, we don't want to update previous tool
+ m_sceneView->setViewCursor(); // Just set cursor, we don't want to update previous tool
}
//==============================================================================
@@ -1335,7 +1340,7 @@ void CMainFrame::OnEditCameraZoom()
//==============================================================================
void CMainFrame::OnUpdateCameraZoomExtentAndAuthorZoom()
{
- if (m_SceneView == GetActiveView() && !m_SceneView->IsDeploymentView())
+ if (m_sceneView.data() == GetActiveView() && !m_sceneView->isDeploymentView())
m_ui->actionFit_Selected->setChecked(false);
else
m_ui->actionFit_Selected->setChecked(g_StudioApp.IsAuthorZoom());
@@ -1353,7 +1358,7 @@ void CMainFrame::OnUpdateCameraZoomExtentAndAuthorZoom()
//==============================================================================
void CMainFrame::OnUpdateEditCameraPan()
{
- if (m_SceneView == GetActiveView() && !m_SceneView->IsDeploymentView()) {
+ if (m_sceneView.data() == GetActiveView() && !m_sceneView->isDeploymentView()) {
m_ui->actionPan_Tool->setEnabled(true);
long theCurrentToolSettings = g_StudioApp.GetToolMode();
@@ -1403,7 +1408,7 @@ void CMainFrame::OnUpdateEditCameraRotate()
//==============================================================================
void CMainFrame::OnUpdateEditCameraZoom()
{
- if (m_SceneView == GetActiveView() && !m_SceneView->IsDeploymentView()) {
+ if (m_sceneView.data() == GetActiveView() && !m_sceneView->isDeploymentView()) {
m_ui->actionZoom_Tool->setEnabled(true);
long theCurrentToolSettings = g_StudioApp.GetToolMode();
@@ -1422,9 +1427,9 @@ void CMainFrame::OnUpdateEditCameraZoom()
//==============================================================================
void CMainFrame::HandleEditViewFillModeKey()
{
- if (m_SceneView == GetActiveView() && !m_SceneView->IsDeploymentView()) {
+ if (m_sceneView.data() == GetActiveView() && !m_sceneView->isDeploymentView()) {
OnEditViewFillMode();
- bool theEditViewFillMode = g_StudioApp.GetRenderer().IsEditLightEnabled();
+ bool theEditViewFillMode = g_StudioApp.getRenderer().IsEditLightEnabled();
m_ui->actionShading_Mode->setChecked(theEditViewFillMode);
}
}
@@ -1437,8 +1442,8 @@ void CMainFrame::HandleEditViewFillModeKey()
//==============================================================================
void CMainFrame::OnEditViewFillMode()
{
- bool theEditViewFillMode = !g_StudioApp.GetRenderer().IsEditLightEnabled();
- g_StudioApp.GetRenderer().SetEnableEditLight(theEditViewFillMode);
+ bool theEditViewFillMode = !g_StudioApp.getRenderer().IsEditLightEnabled();
+ g_StudioApp.getRenderer().SetEnableEditLight(theEditViewFillMode);
}
//==============================================================================
@@ -1453,9 +1458,9 @@ void CMainFrame::OnEditViewFillMode()
//==============================================================================
void CMainFrame::OnUpdateEditViewFillMode()
{
- if (m_SceneView == GetActiveView() && !m_SceneView->IsDeploymentView()) {
+ if (m_sceneView.data() == GetActiveView() && !m_sceneView->isDeploymentView()) {
m_ui->actionShading_Mode->setEnabled(true);
- m_ui->actionShading_Mode->setChecked(g_StudioApp.GetRenderer().IsEditLightEnabled());
+ m_ui->actionShading_Mode->setChecked(g_StudioApp.getRenderer().IsEditLightEnabled());
} else {
m_ui->actionShading_Mode->setEnabled(false);
m_ui->actionShading_Mode->setChecked(false);
@@ -1464,47 +1469,47 @@ void CMainFrame::OnUpdateEditViewFillMode()
void CMainFrame::OnViewGuidesRulers()
{
- g_StudioApp.GetRenderer().SetGuidesEnabled(!g_StudioApp.GetRenderer().AreGuidesEnabled());
+ g_StudioApp.getRenderer().SetGuidesEnabled(!g_StudioApp.getRenderer().AreGuidesEnabled());
g_StudioApp.GetCore()->GetDispatch()->FireAuthorZoomChanged();
- m_SceneView->OnRulerGuideToggled();
+ m_sceneView->onRulerGuideToggled();
}
void CMainFrame::OnUpdateViewGuidesRulers()
{
- m_ui->actionRulers_Guides->setEnabled(m_SceneView->IsDeploymentView());
- m_ui->actionRulers_Guides->setChecked(g_StudioApp.GetRenderer().AreGuidesEnabled());
+ m_ui->actionRulers_Guides->setEnabled(m_sceneView->isDeploymentView());
+ m_ui->actionRulers_Guides->setChecked(g_StudioApp.getRenderer().AreGuidesEnabled());
}
void CMainFrame::OnClearGuides()
{
- g_StudioApp.ClearGuides();
+ g_StudioApp.clearGuides();
}
void CMainFrame::OnUpdateClearGuides()
{
- bool enable = g_StudioApp.GetRenderer().AreGuidesEnabled()
- && g_StudioApp.GetRenderer().AreGuidesEditable() && m_SceneView->IsDeploymentView();
+ bool enable = g_StudioApp.getRenderer().AreGuidesEnabled()
+ && g_StudioApp.getRenderer().AreGuidesEditable() && m_sceneView->isDeploymentView();
m_ui->actionClear_Guides->setEnabled(enable);
}
void CMainFrame::OnLockGuides()
{
- g_StudioApp.GetRenderer().SetGuidesEditable(!g_StudioApp.GetRenderer().AreGuidesEditable());
+ g_StudioApp.getRenderer().SetGuidesEditable(!g_StudioApp.getRenderer().AreGuidesEditable());
}
void CMainFrame::OnUpdateLockGuides()
{
- bool enable = g_StudioApp.GetRenderer().AreGuidesEnabled() && m_SceneView->IsDeploymentView();
+ bool enable = g_StudioApp.getRenderer().AreGuidesEnabled() && m_sceneView->isDeploymentView();
m_ui->actionLock_Guides->setEnabled(enable);
// Set to the inverse of guides editable.
- m_ui->actionLock_Guides->setChecked(!g_StudioApp.GetRenderer().AreGuidesEditable());
+ m_ui->actionLock_Guides->setChecked(!g_StudioApp.getRenderer().AreGuidesEditable());
}
void CMainFrame::timerEvent(QTimerEvent *event)
{
if (event->timerId() == WM_STUDIO_TIMER)
- g_StudioApp.GetTickTock().ProcessMessages();
+ g_StudioApp.getTickTock().ProcessMessages();
QMainWindow::timerEvent(event);
}
@@ -1514,7 +1519,7 @@ void CMainFrame::onViewResetLayout()
int theChoice = QMessageBox::question(this,
tr("Restart Needed"),
tr("Are you sure that you want to restore Qt 3D Studio "
- "layout? \nYour current layout will be lost, and"
+ "layout? \nYour current layout will be lost, and "
"Studio will exit."));
// If "Yes" is clicked, delete window geometry and window state keys from QSettings
@@ -1532,57 +1537,57 @@ void CMainFrame::onViewResetLayout()
void CMainFrame::OnViewAction()
{
- m_PaletteManager->ToggleControl(CPaletteManager::CONTROLTYPE_ACTION);
+ m_paletteManager->ToggleControl(CPaletteManager::CONTROLTYPE_ACTION);
}
void CMainFrame::OnUpdateViewAction()
{
m_ui->actionAction->setChecked(
- m_PaletteManager->IsControlVisible(CPaletteManager::CONTROLTYPE_ACTION));
+ m_paletteManager->IsControlVisible(CPaletteManager::CONTROLTYPE_ACTION));
}
void CMainFrame::OnViewBasicObjects()
{
- m_PaletteManager->ToggleControl(CPaletteManager::CONTROLTYPE_BASICOBJECTS);
+ m_paletteManager->ToggleControl(CPaletteManager::CONTROLTYPE_BASICOBJECTS);
}
void CMainFrame::OnUpdateViewBasicObjects()
{
- m_ui->actionBasic_Objects->setChecked(m_PaletteManager->IsControlVisible(
+ m_ui->actionBasic_Objects->setChecked(m_paletteManager->IsControlVisible(
CPaletteManager::CONTROLTYPE_BASICOBJECTS));
}
void CMainFrame::OnViewInspector()
{
- m_PaletteManager->ToggleControl(CPaletteManager::CONTROLTYPE_INSPECTOR);
+ m_paletteManager->ToggleControl(CPaletteManager::CONTROLTYPE_INSPECTOR);
}
void CMainFrame::OnUpdateViewInspector()
{
m_ui->actionInspector->setChecked(
- m_PaletteManager->IsControlVisible(CPaletteManager::CONTROLTYPE_INSPECTOR));
+ m_paletteManager->IsControlVisible(CPaletteManager::CONTROLTYPE_INSPECTOR));
}
void CMainFrame::OnViewProject()
{
- m_PaletteManager->ToggleControl(CPaletteManager::CONTROLTYPE_PROJECT);
+ m_paletteManager->ToggleControl(CPaletteManager::CONTROLTYPE_PROJECT);
}
void CMainFrame::OnUpdateViewProject()
{
m_ui->actionProject->setChecked(
- m_PaletteManager->IsControlVisible(CPaletteManager::CONTROLTYPE_PROJECT));
+ m_paletteManager->IsControlVisible(CPaletteManager::CONTROLTYPE_PROJECT));
}
void CMainFrame::OnViewSlide()
{
- m_PaletteManager->ToggleControl(CPaletteManager::CONTROLTYPE_SLIDE);
+ m_paletteManager->ToggleControl(CPaletteManager::CONTROLTYPE_SLIDE);
}
void CMainFrame::OnUpdateViewSlide()
{
m_ui->actionSlide->setChecked(
- m_PaletteManager->IsControlVisible(CPaletteManager::CONTROLTYPE_SLIDE)
+ m_paletteManager->IsControlVisible(CPaletteManager::CONTROLTYPE_SLIDE)
? TRUE : FALSE);
}
@@ -1592,7 +1597,7 @@ void CMainFrame::OnUpdateViewSlide()
*/
void CMainFrame::OnViewTimeline()
{
- m_PaletteManager->ToggleControl(CPaletteManager::CONTROLTYPE_TIMELINE);
+ m_paletteManager->ToggleControl(CPaletteManager::CONTROLTYPE_TIMELINE);
}
//==============================================================================
@@ -1603,7 +1608,7 @@ void CMainFrame::OnViewTimeline()
void CMainFrame::OnUpdateViewTimeline()
{
m_ui->actionTimeline->setChecked(
- m_PaletteManager->IsControlVisible(CPaletteManager::CONTROLTYPE_TIMELINE));
+ m_paletteManager->IsControlVisible(CPaletteManager::CONTROLTYPE_TIMELINE));
}
//==============================================================================
@@ -1613,7 +1618,7 @@ void CMainFrame::OnUpdateViewTimeline()
void CMainFrame::OnViewBoundingBoxes()
{
CStudioPreferences::SetBoundingBoxesOn(!CStudioPreferences::IsBoundingBoxesOn());
- g_StudioApp.GetRenderer().RequestRender();
+ g_StudioApp.getRenderer().RequestRender();
}
//==============================================================================
@@ -1633,7 +1638,7 @@ void CMainFrame::OnUpdateViewBoundingBoxes()
void CMainFrame::OnViewPivotPoint()
{
CStudioPreferences::SetDisplayPivotPoint(!CStudioPreferences::ShouldDisplayPivotPoint());
- g_StudioApp.GetRenderer().RequestRender();
+ g_StudioApp.getRenderer().RequestRender();
}
//==============================================================================
@@ -1657,7 +1662,7 @@ void CMainFrame::OnViewWireframe()
// Don't wait for regular update cycle to update the corresponding toolbar/menu checked status
m_ui->actionWireframe->setChecked(CStudioPreferences::IsWireframeModeOn());
- g_StudioApp.GetRenderer().RequestRender();
+ g_StudioApp.getRenderer().RequestRender();
}
//==============================================================================
@@ -1744,7 +1749,7 @@ void CMainFrame::OnFileRevert()
void CMainFrame::OnFileImportAssets()
{
- m_PaletteManager->projectView()->assetImportAction(0);
+ m_paletteManager->projectView()->assetImportAction(0);
}
void CMainFrame::OnFileConnectToDevice()
@@ -1773,7 +1778,7 @@ void CMainFrame::OnFileConnectToDevice()
*/
void CMainFrame::OnFileOpenRecent(int nID)
{
- g_StudioApp.OnFileOpenRecent(m_RecentItems->GetItem(nID));
+ g_StudioApp.OnFileOpenRecent(m_recentItems->GetItem(nID));
}
//==============================================================================
@@ -1782,7 +1787,7 @@ void CMainFrame::OnFileOpenRecent(int nID)
*/
void CMainFrame::RecheckSizingMode()
{
- m_SceneView->RecheckSizingMode();
+ m_sceneView->recheckSizingMode();
}
//==============================================================================
@@ -1792,9 +1797,9 @@ void CMainFrame::RecheckSizingMode()
void CMainFrame::OnOpenDocument(const Qt3DSFile &inFilename, bool inSucceeded)
{
if (inSucceeded)
- m_RecentItems->AddRecentItem(inFilename);
+ m_recentItems->AddRecentItem(inFilename);
else
- m_RecentItems->RemoveRecentItem(inFilename);
+ m_recentItems->RemoveRecentItem(inFilename);
}
//==============================================================================
@@ -1823,37 +1828,37 @@ void CMainFrame::OnDocumentPathChanged(const Qt3DSFile &inNewPath)
setWindowTitle(theTitle);
if (inNewPath.Exists())
- m_RecentItems->AddRecentItem(inNewPath);
+ m_recentItems->AddRecentItem(inNewPath);
}
void CMainFrame::OnShowSlide()
{
- m_PaletteManager->ShowControl(CPaletteManager::CONTROLTYPE_SLIDE);
+ m_paletteManager->ShowControl(CPaletteManager::CONTROLTYPE_SLIDE);
}
void CMainFrame::OnShowTimeline()
{
- m_PaletteManager->ShowControl(CPaletteManager::CONTROLTYPE_TIMELINE);
+ m_paletteManager->ShowControl(CPaletteManager::CONTROLTYPE_TIMELINE);
}
void CMainFrame::OnShowBasic()
{
- m_PaletteManager->ShowControl(CPaletteManager::CONTROLTYPE_BASICOBJECTS);
+ m_paletteManager->ShowControl(CPaletteManager::CONTROLTYPE_BASICOBJECTS);
}
void CMainFrame::OnShowProject()
{
- m_PaletteManager->ShowControl(CPaletteManager::CONTROLTYPE_PROJECT);
+ m_paletteManager->ShowControl(CPaletteManager::CONTROLTYPE_PROJECT);
}
void CMainFrame::OnShowAction()
{
- m_PaletteManager->ShowControl(CPaletteManager::CONTROLTYPE_ACTION);
+ m_paletteManager->ShowControl(CPaletteManager::CONTROLTYPE_ACTION);
}
void CMainFrame::OnShowInspector()
{
- m_PaletteManager->ShowControl(CPaletteManager::CONTROLTYPE_INSPECTOR);
+ m_paletteManager->ShowControl(CPaletteManager::CONTROLTYPE_INSPECTOR);
}
void CMainFrame::OnConnectionChanged(bool connected)
@@ -1865,7 +1870,7 @@ void CMainFrame::OnConnectionChanged(bool connected)
TimelineWidget *CMainFrame::getTimelineWidget()
{
- return static_cast<TimelineWidget *>(m_PaletteManager->GetControl(
+ return static_cast<TimelineWidget *>(m_paletteManager->GetControl(
CPaletteManager::CONTROLTYPE_TIMELINE)->widget());
}
@@ -1882,7 +1887,7 @@ ITimelineTimebar *CMainFrame::GetSelectedTimelineTimebar()
CRecentItems *CMainFrame::GetRecentItems()
{
- return m_RecentItems;
+ return m_recentItems.data();
}
QWidget *CMainFrame::GetActiveView()
@@ -1892,7 +1897,7 @@ QWidget *CMainFrame::GetActiveView()
CPlayerWnd *CMainFrame::GetPlayerWnd() const
{
- return m_SceneView->GetPlayerWnd();
+ return m_sceneView->getPlayerWnd();
}
bool CMainFrame::eventFilter(QObject *obj, QEvent *event)
@@ -1908,10 +1913,10 @@ bool CMainFrame::eventFilter(QObject *obj, QEvent *event)
case QEvent::KeyPress: {
QKeyEvent *ke = static_cast<QKeyEvent *>(event);
if (ke->key() == Qt::Key_Tab) {
- if (m_PaletteManager->tabNavigateFocusedWidget(true))
+ if (m_paletteManager->tabNavigateFocusedWidget(true))
return true;
} else if (ke->key() == Qt::Key_Backtab) {
- if (m_PaletteManager->tabNavigateFocusedWidget(false))
+ if (m_paletteManager->tabNavigateFocusedWidget(false))
return true;
}
break;
@@ -1955,9 +1960,9 @@ void CMainFrame::initializeGeometryAndState()
void CMainFrame::toggleSelectMode()
{
if (m_ui->actionItem_Select_Tool->isChecked())
- m_SceneView->OnToolGroupSelection();
+ m_sceneView->onToolGroupSelection();
else
- m_SceneView->OnToolItemSelection();
+ m_sceneView->onToolItemSelection();
}
void CMainFrame::actionActive(bool active)