MCPcopy Create free account
hub / github.com/KDE/labplot / newMatrix

Method newMatrix

src/frontend/MainWin.cpp:2000–2013  ·  view source on GitHub ↗

! adds a new Matrix to the project. */

Source from the content-addressed store, hash-verified

1998 adds a new Matrix to the project.
1999*/
2000void MainWin::newMatrix() {
2001 Matrix* matrix = new Matrix(i18n("Matrix"));
2002
2003 // if the current active window is a workbook or one of its children,
2004 // add the new matrix to the workbook
2005 auto* workbook = dynamic_cast<Workbook*>(m_currentAspect);
2006 if (!workbook)
2007 workbook = static_cast<Workbook*>(m_currentAspect->parent(AspectType::Workbook));
2008
2009 if (workbook)
2010 workbook->addChild(matrix);
2011 else
2012 this->addAspectToProject(matrix);
2013}
2014
2015/*!
2016 adds a new Worksheet to the project.

Callers

nothing calls this directly

Calls 3

addAspectToProjectMethod · 0.95
parentMethod · 0.45
addChildMethod · 0.45

Tested by

no test coverage detected