Reverting changes to AtomTools windows
Signed-off-by: Dayo Lawal <lawalfua@amazon.com>
This commit is contained in:
@@ -116,11 +116,11 @@ namespace MaterialEditor
|
||||
vl->addWidget(m_materialViewport);
|
||||
m_centralWidget->setLayout(vl);
|
||||
setCentralWidget(m_centralWidget);
|
||||
|
||||
|
||||
m_statusBar = new StatusBarWidget(this);
|
||||
m_statusBar->setObjectName("StatusBar");
|
||||
statusBar()->addPermanentWidget(m_statusBar, 1);
|
||||
|
||||
|
||||
SetupMenu();
|
||||
SetupTabs();
|
||||
|
||||
@@ -754,7 +754,6 @@ namespace MaterialEditor
|
||||
m_tabWidget->setCurrentIndex((m_tabWidget->currentIndex() + 1) % m_tabWidget->count());
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace MaterialEditor
|
||||
|
||||
#include <Window/moc_MaterialEditorWindow.cpp>
|
||||
|
||||
@@ -75,13 +75,13 @@ namespace MaterialEditor
|
||||
void OnDocumentSaved(const AZ::Uuid& documentId) override;
|
||||
|
||||
void SetupMenu();
|
||||
void SetupTabs();
|
||||
|
||||
void SetupTabs();
|
||||
void AddTabForDocumentId(const AZ::Uuid& documentId);
|
||||
void RemoveTabForDocumentId(const AZ::Uuid& documentId);
|
||||
void UpdateTabForDocumentId(const AZ::Uuid& documentId);
|
||||
AZ::Uuid GetDocumentIdFromTab(const int tabIndex) const;
|
||||
QString GetDocumentPath(const AZ::Uuid& documentId) const;
|
||||
AZ::Uuid GetDocumentIdFromTab(const int tabIndex) const;
|
||||
|
||||
void OpenTabContextMenu();
|
||||
void SelectPreviousTab();
|
||||
@@ -90,8 +90,8 @@ namespace MaterialEditor
|
||||
void closeEvent(QCloseEvent* closeEvent) override;
|
||||
|
||||
AzQtComponents::FancyDocking* m_advancedDockManager = nullptr;
|
||||
QMenuBar* m_menuBar = nullptr;
|
||||
QWidget* m_centralWidget = nullptr;
|
||||
QMenuBar* m_menuBar = nullptr;
|
||||
AzQtComponents::TabWidget* m_tabWidget = nullptr;
|
||||
MaterialViewportWidget* m_materialViewport = nullptr;
|
||||
MaterialEditorToolBar* m_toolBar = nullptr;
|
||||
|
||||
+23
-26
@@ -39,10 +39,10 @@ namespace ShaderManagementConsole
|
||||
ShaderManagementConsoleWindow::ShaderManagementConsoleWindow(QWidget* parent /* = 0 */)
|
||||
: AzQtComponents::DockMainWindow(parent)
|
||||
{
|
||||
m_advancedDockManager = new AzQtComponents::FancyDocking(this);
|
||||
|
||||
setWindowTitle("Shader Management Console");
|
||||
setObjectName("ShaderManagementConsoleWindow");
|
||||
|
||||
m_advancedDockManager = new AzQtComponents::FancyDocking(this);
|
||||
|
||||
setDockNestingEnabled(true);
|
||||
setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
|
||||
setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
|
||||
@@ -50,16 +50,13 @@ namespace ShaderManagementConsole
|
||||
setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
|
||||
|
||||
m_menuBar = new QMenuBar(this);
|
||||
m_menuBar->setObjectName("MenuBar");
|
||||
setMenuBar(m_menuBar);
|
||||
|
||||
m_toolBar = new ShaderManagementConsoleToolBar(this);
|
||||
m_toolBar->setObjectName("ToolBar");
|
||||
addToolBar(m_toolBar);
|
||||
|
||||
m_centralWidget = new QWidget(this);
|
||||
m_tabWidget = new AzQtComponents::TabWidget(m_centralWidget);
|
||||
m_tabWidget->setObjectName("TabWidget");
|
||||
m_tabWidget->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Preferred);
|
||||
m_tabWidget->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
@@ -146,7 +143,7 @@ namespace ShaderManagementConsole
|
||||
|
||||
m_actionUndo->setEnabled(canUndo);
|
||||
m_actionRedo->setEnabled(canRedo);
|
||||
m_actionSettings->setEnabled(false);
|
||||
m_actionPreferences->setEnabled(false);
|
||||
|
||||
m_actionAssetBrowser->setEnabled(true);
|
||||
m_actionPythonTerminal->setEnabled(true);
|
||||
@@ -266,9 +263,9 @@ namespace ShaderManagementConsole
|
||||
|
||||
m_menuEdit->addSeparator();
|
||||
|
||||
m_actionSettings = m_menuEdit->addAction("&Preferences...", [this]() {
|
||||
m_actionPreferences = m_menuEdit->addAction("&Preferences...", [this]() {
|
||||
}, QKeySequence::Preferences);
|
||||
m_actionSettings->setEnabled(false);
|
||||
m_actionPreferences->setEnabled(false);
|
||||
|
||||
m_menuView = m_menuBar->addMenu("&View");
|
||||
|
||||
@@ -474,6 +471,23 @@ namespace ShaderManagementConsole
|
||||
}
|
||||
}
|
||||
|
||||
void ShaderManagementConsoleWindow::SelectPreviousTab()
|
||||
{
|
||||
if (m_tabWidget->count() > 1)
|
||||
{
|
||||
// Adding count to wrap around when index <= 0
|
||||
m_tabWidget->setCurrentIndex((m_tabWidget->currentIndex() + m_tabWidget->count() - 1) % m_tabWidget->count());
|
||||
}
|
||||
}
|
||||
|
||||
void ShaderManagementConsoleWindow::SelectNextTab()
|
||||
{
|
||||
if (m_tabWidget->count() > 1)
|
||||
{
|
||||
m_tabWidget->setCurrentIndex((m_tabWidget->currentIndex() + 1) % m_tabWidget->count());
|
||||
}
|
||||
}
|
||||
|
||||
void ShaderManagementConsoleWindow::SelectDocumentForTab(const int tabIndex)
|
||||
{
|
||||
const AZ::Uuid documentId = GetDocumentIdFromTab(tabIndex);
|
||||
@@ -554,23 +568,6 @@ namespace ShaderManagementConsole
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ShaderManagementConsoleWindow::SelectPreviousTab()
|
||||
{
|
||||
if (m_tabWidget->count() > 1)
|
||||
{
|
||||
// Adding count to wrap around when index <= 0
|
||||
m_tabWidget->setCurrentIndex((m_tabWidget->currentIndex() + m_tabWidget->count() - 1) % m_tabWidget->count());
|
||||
}
|
||||
}
|
||||
|
||||
void ShaderManagementConsoleWindow::SelectNextTab()
|
||||
{
|
||||
if (m_tabWidget->count() > 1)
|
||||
{
|
||||
m_tabWidget->setCurrentIndex((m_tabWidget->currentIndex() + 1) % m_tabWidget->count());
|
||||
}
|
||||
}
|
||||
} // namespace ShaderManagementConsole
|
||||
|
||||
#include <Source/Window/moc_ShaderManagementConsoleWindow.cpp>
|
||||
|
||||
+2
-2
@@ -60,8 +60,8 @@ namespace ShaderManagementConsole
|
||||
void OnDocumentSaved(const AZ::Uuid& documentId) override;
|
||||
|
||||
void SetupMenu();
|
||||
void SetupTabs();
|
||||
|
||||
void SetupTabs();
|
||||
void AddTabForDocumentId(const AZ::Uuid& documentId);
|
||||
void RemoveTabForDocumentId(const AZ::Uuid& documentId);
|
||||
void UpdateTabForDocumentId(const AZ::Uuid& documentId);
|
||||
@@ -105,7 +105,7 @@ namespace ShaderManagementConsole
|
||||
QMenu* m_menuEdit = {};
|
||||
QAction* m_actionUndo = {};
|
||||
QAction* m_actionRedo = {};
|
||||
QAction* m_actionSettings = {};
|
||||
QAction* m_actionPreferences = {};
|
||||
|
||||
QMenu* m_menuView = {};
|
||||
QAction* m_actionAssetBrowser = {};
|
||||
|
||||
Reference in New Issue
Block a user