IResourceInspector *CaptureContext::GetResourceInspector() { if(m_ResourceInspector) return m_ResourceInspector; m_ResourceInspector = new ResourceInspector(*this, m_MainWindow); m_ResourceInspector->setObjectName(lit("resourceInspector")); setupDockWindow(m_ResourceInspector); return m_ResourceInspector; }
ITimelineBar *CaptureContext::GetTimelineBar() { if(m_TimelineBar) return m_TimelineBar; m_TimelineBar = new TimelineBar(*this, m_MainWindow); m_TimelineBar->setObjectName(lit("timelineBar")); setupDockWindow(m_TimelineBar); return m_TimelineBar; }
IPythonShell *CaptureContext::GetPythonShell() { if(m_PythonShell) return m_PythonShell; m_PythonShell = new PythonShell(*this, m_MainWindow); m_PythonShell->setObjectName(lit("pythonShell")); setupDockWindow(m_PythonShell); return m_PythonShell; }
IPerformanceCounterViewer *CaptureContext::GetPerformanceCounterViewer() { if(m_PerformanceCounterViewer) return m_PerformanceCounterViewer; m_PerformanceCounterViewer = new PerformanceCounterViewer(*this, m_MainWindow); m_PerformanceCounterViewer->setObjectName(lit("performanceCounterViewer")); setupDockWindow(m_PerformanceCounterViewer); return m_PerformanceCounterViewer; }
IStatisticsViewer *CaptureContext::GetStatisticsViewer() { if(m_StatisticsViewer) return m_StatisticsViewer; m_StatisticsViewer = new StatisticsViewer(*this, m_MainWindow); m_StatisticsViewer->setObjectName(lit("statisticsViewer")); setupDockWindow(m_StatisticsViewer); return m_StatisticsViewer; }
IDebugMessageView *CaptureContext::GetDebugMessageView() { if(m_DebugMessageView) return m_DebugMessageView; m_DebugMessageView = new DebugMessageView(*this, m_MainWindow); m_DebugMessageView->setObjectName(lit("debugMessageView")); setupDockWindow(m_DebugMessageView); return m_DebugMessageView; }
ICommentView *CaptureContext::GetCommentView() { if(m_CommentView) return m_CommentView; m_CommentView = new CommentView(*this, m_MainWindow); m_CommentView->setObjectName(lit("commentView")); setupDockWindow(m_CommentView); return m_CommentView; }
IPipelineStateViewer *CaptureContext::GetPipelineViewer() { if(m_PipelineViewer) return m_PipelineViewer; m_PipelineViewer = new PipelineStateViewer(*this, m_MainWindow); m_PipelineViewer->setObjectName(lit("pipelineViewer")); setupDockWindow(m_PipelineViewer); return m_PipelineViewer; }
IBufferViewer *CaptureContext::GetMeshPreview() { if(m_MeshPreview) return m_MeshPreview; m_MeshPreview = new BufferViewer(*this, true, m_MainWindow); m_MeshPreview->setObjectName(lit("meshPreview")); setupDockWindow(m_MeshPreview); return m_MeshPreview; }
ITextureViewer *CaptureContext::GetTextureViewer() { if(m_TextureViewer) return m_TextureViewer; m_TextureViewer = new TextureViewer(*this, m_MainWindow); m_TextureViewer->setObjectName(lit("textureViewer")); setupDockWindow(m_TextureViewer); return m_TextureViewer; }
IAPIInspector *CaptureContext::GetAPIInspector() { if(m_APIInspector) return m_APIInspector; m_APIInspector = new APIInspector(*this, m_MainWindow); m_APIInspector->setObjectName(lit("apiInspector")); setupDockWindow(m_APIInspector); return m_APIInspector; }
IEventBrowser *CaptureContext::GetEventBrowser() { if(m_EventBrowser) return m_EventBrowser; m_EventBrowser = new EventBrowser(*this, m_MainWindow); m_EventBrowser->setObjectName(lit("eventBrowser")); setupDockWindow(m_EventBrowser); return m_EventBrowser; }
void CaptureContext::AddDockWindow(QWidget *newWindow, DockReference ref, QWidget *refWindow, float percentage) { if(!newWindow) { qCritical() << "Unexpected NULL newWindow in AddDockWindow"; return; } setupDockWindow(newWindow); if(ref == DockReference::MainToolArea) { m_MainWindow->mainToolManager()->addToolWindow(newWindow, m_MainWindow->mainToolArea()); return; } if(ref == DockReference::LeftToolArea) { m_MainWindow->mainToolManager()->addToolWindow(newWindow, m_MainWindow->leftToolArea()); return; } if(!refWindow) { qCritical() << "Unexpected NULL refWindow in AddDockWindow"; return; } if(ref == DockReference::ConstantBufferArea) { if(ConstantBufferPreviewer::getOne()) { ToolWindowManager *manager = ToolWindowManager::managerOf(refWindow); manager->addToolWindow(newWindow, ToolWindowManager::AreaReference( ToolWindowManager::AddTo, manager->areaOf(ConstantBufferPreviewer::getOne()))); return; } ref = DockReference::RightOf; } ToolWindowManager *manager = ToolWindowManager::managerOf(refWindow); ToolWindowManager::AreaReference areaRef((ToolWindowManager::AreaReferenceType)ref, manager->areaOf(refWindow), percentage); manager->addToolWindow(newWindow, areaRef); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { setWindowTitle("Dock Widgets"); setupDockWindow(); setupContents(); setupMenus(); textBrowser = new QTextBrowser(this); connect(headingList, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(updateText(QListWidgetItem*))); updateText(headingList->item(0)); headingList->setCurrentRow(0); setCentralWidget(textBrowser); }