Styling fixes and AzQtAppWindow changes
Signed-off-by: Dayo Lawal <lawalfua@amazon.com>
This commit is contained in:
+2
-2
@@ -18,7 +18,7 @@
|
||||
|
||||
#include <AzToolsFramework/API/AssetDatabaseBus.h>
|
||||
#include <AzToolsFramework/API/EditorPythonConsoleBus.h>
|
||||
#include <AzToolsFramework/Logger/AzQtTraceLogger.h>
|
||||
#include <AzToolsFramework/Logger/TraceLogger.h>
|
||||
|
||||
#include <Atom/Document/ShaderManagementConsoleDocumentSystemRequestBus.h>
|
||||
#include <Atom/Window/ShaderManagementConsoleWindowNotificationBus.h>
|
||||
@@ -115,7 +115,7 @@ namespace ShaderManagementConsole
|
||||
|
||||
static void PyIdleWaitFrames(uint32_t frames);
|
||||
|
||||
AzToolsFramework::AzQtTraceLogger m_traceLogger;
|
||||
AzToolsFramework::TraceLogger m_traceLogger;
|
||||
|
||||
//! Local user settings are used to store asset browser tree expansion state
|
||||
AZ::UserSettingsProvider m_localUserSettings;
|
||||
|
||||
+31
-1
@@ -37,14 +37,27 @@ AZ_POP_DISABLE_WARNING
|
||||
namespace ShaderManagementConsole
|
||||
{
|
||||
ShaderManagementConsoleWindow::ShaderManagementConsoleWindow(QWidget* parent /* = 0 */)
|
||||
: AzQtComponents::AzQtApplicationWindow(parent, "ShaderManagementConsoleWindow")
|
||||
: AzQtComponents::AzQtApplicationWindow(parent)
|
||||
{
|
||||
setWindowTitle("Shader Management Console");
|
||||
setObjectName("ShaderManagementConsoleWindow");
|
||||
setDockNestingEnabled(true);
|
||||
setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
|
||||
setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
|
||||
setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
|
||||
setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
|
||||
|
||||
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);
|
||||
|
||||
QVBoxLayout* vl = new QVBoxLayout(m_centralWidget);
|
||||
vl->setMargin(0);
|
||||
vl->setContentsMargins(0, 0, 0, 0);
|
||||
vl->addWidget(m_tabWidget);
|
||||
@@ -535,6 +548,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());
|
||||
}
|
||||
}
|
||||
} // namespace ShaderManagementConsole
|
||||
|
||||
#include <Source/Window/moc_ShaderManagementConsoleWindow.cpp>
|
||||
|
||||
+31
@@ -69,6 +69,8 @@ namespace ShaderManagementConsole
|
||||
AZ::Uuid GetDocumentIdFromTab(const int tabIndex) const;
|
||||
|
||||
void OpenTabContextMenu() override;
|
||||
void SelectPreviousTab();
|
||||
void SelectNextTab();
|
||||
|
||||
void SelectDocumentForTab(const int tabIndex);
|
||||
void CloseDocumentForTab(const int tabIndex);
|
||||
@@ -78,11 +80,40 @@ namespace ShaderManagementConsole
|
||||
|
||||
void CreateDocumentContent(const AZ::Uuid& documentId, QStandardItemModel* model);
|
||||
|
||||
QWidget* m_centralWidget = nullptr;
|
||||
AzQtComponents::TabWidget* m_tabWidget = nullptr;
|
||||
ShaderManagementConsoleBrowserWidget* m_assetBrowser = nullptr;
|
||||
ShaderManagementConsoleToolBar* m_toolBar = nullptr;
|
||||
AzToolsFramework::CScriptTermDialog* m_pythonTerminal = nullptr;
|
||||
|
||||
AzQtComponents::StyledDockWidget* m_assetBrowserDockWidget = nullptr;
|
||||
AzQtComponents::StyledDockWidget* m_pythonTerminalDockWidget = nullptr;
|
||||
|
||||
QMenu* m_menuFile = {};
|
||||
QMenu* m_menuNew = {};
|
||||
QAction* m_actionOpen = {};
|
||||
QAction* m_actionOpenRecent = {};
|
||||
QAction* m_actionClose = {};
|
||||
QAction* m_actionCloseAll = {};
|
||||
QAction* m_actionCloseOthers = {};
|
||||
QAction* m_actionSave = {};
|
||||
QAction* m_actionSaveAsCopy = {};
|
||||
QAction* m_actionSaveAll = {};
|
||||
QAction* m_actionExit = {};
|
||||
|
||||
QMenu* m_menuEdit = {};
|
||||
QAction* m_actionUndo = {};
|
||||
QAction* m_actionRedo = {};
|
||||
QAction* m_actionSettings = {};
|
||||
|
||||
QMenu* m_menuView = {};
|
||||
QAction* m_actionAssetBrowser = {};
|
||||
QAction* m_actionPythonTerminal = {};
|
||||
QAction* m_actionNextTab = {};
|
||||
QAction* m_actionPreviousTab = {};
|
||||
|
||||
QMenu* m_menuHelp = {};
|
||||
QAction* m_actionHelp = {};
|
||||
QAction* m_actionAbout = {};
|
||||
};
|
||||
} // namespace ShaderManagementConsole
|
||||
|
||||
Reference in New Issue
Block a user