Show templates as separate project explorer tab. (#8902)

Add templates as separate project explorer tab.
Add support for renaming and editing templates
This commit is contained in:
jonjenssen
2022-05-11 19:46:17 +02:00
committed by GitHub
parent daf02571c2
commit 828e8ec440
17 changed files with 310 additions and 21 deletions

View File

@@ -121,6 +121,18 @@ QString RiuPlotMainWindow::mainWindowName()
return "RiuPlotMainWindow";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuPlotMainWindow* RiuPlotMainWindow::instance()
{
if ( RiaGuiApplication::isRunning() )
{
return RiaGuiApplication::instance()->mainPlotWindow();
}
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -460,11 +472,15 @@ void RiuPlotMainWindow::refreshToolbars()
//--------------------------------------------------------------------------------------------------
void RiuPlotMainWindow::createDockPanels()
{
const int nTreeViews = 3;
const std::vector<QString> treeViewTitles = { "Plots", "Data Sources", "Scripts" };
const std::vector<QString> treeViewConfigs = { "PlotWindow.Plots", "PlotWindow.DataSources", "PlotWindow.Scripts" };
const int nTreeViews = 4;
const std::vector<QString> treeViewTitles = { "Plots", "Data Sources", "Templates", "Scripts" };
const std::vector<QString> treeViewConfigs = { "PlotWindow.Plots",
"PlotWindow.DataSources",
"PlotWindow.Templates",
"PlotWindow.Scripts" };
const std::vector<QString> treeViewDockNames = { RiuDockWidgetTools::plotMainWindowPlotsTreeName(),
RiuDockWidgetTools::plotMainWindowDataSourceTreeName(),
RiuDockWidgetTools::plotMainWindowTemplateTreeName(),
RiuDockWidgetTools::plotMainWindowScriptsTreeName() };
createTreeViews( nTreeViews );