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

Method importToLiveDataSource

src/frontend/datasources/ImportFileDialog.cpp:131–152  ·  view source on GitHub ↗

! triggers data import to the live data source \c source */

Source from the content-addressed store, hash-verified

129 triggers data import to the live data source \c source
130*/
131void ImportFileDialog::importToLiveDataSource(LiveDataSource* source, QStatusBar* statusBar) const {
132 DEBUG(Q_FUNC_INFO);
133 m_importFileWidget->saveSettings(source);
134
135 // show a progress bar in the status bar
136 auto* progressBar = new QProgressBar();
137 progressBar->setRange(0, 100);
138 connect(source->filter(), &AbstractFileFilter::completed, progressBar, &QProgressBar::setValue);
139
140 statusBar->clearMessage();
141 statusBar->addWidget(progressBar, 1);
142 WAIT_CURSOR;
143
144 QElapsedTimer timer;
145 timer.start();
146 DEBUG(" Initial read()");
147 source->read();
148 statusBar->showMessage(i18n("Live data source created in %1 seconds.", (float)timer.elapsed() / 1000));
149
150 RESET_CURSOR;
151 statusBar->removeWidget(progressBar);
152}
153
154#ifdef HAVE_MQTT
155/*!

Callers 1

newLiveDataSourceMethod · 0.80

Calls 7

showMessageMethod · 0.80
removeWidgetMethod · 0.80
saveSettingsMethod · 0.45
setRangeMethod · 0.45
filterMethod · 0.45
startMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected