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

Method showPresenter

src/frontend/MainWin.cpp:197–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197void MainWin::showPresenter() {
198 const auto* w = dynamic_cast<Worksheet*>(m_currentAspect);
199 if (w) {
200 auto* view = static_cast<WorksheetView*>(w->view());
201 view->presenterMode();
202 } else {
203 // currently active object is not a worksheet but we're asked to start in the presenter mode
204 // determine the first available worksheet and show it in the presenter mode
205 auto worksheets = m_project->children<Worksheet>();
206 if (worksheets.size() > 0) {
207 auto* view = static_cast<WorksheetView*>(worksheets.constFirst()->view());
208 view->presenterMode();
209 } else
210 QMessageBox::information(this, i18n("Presenter Mode"), i18n("No worksheets are available in the project. The presenter mode will not be started."));
211 }
212}
213
214AspectTreeModel* MainWin::model() const {
215 return m_aspectTreeModel;

Callers 1

mainFunction · 0.80

Calls 3

presenterModeMethod · 0.80
viewMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected