]>
Commit | Line | Data |
---|---|---|
d7bed479 | 1 | /* |
b3f22de0 | 2 | * This file is part of the PulseView project. |
d7bed479 JH |
3 | * |
4 | * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk> | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation; either version 2 of the License, or | |
9 | * (at your option) any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write to the Free Software | |
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
19 | */ | |
20 | ||
269528f5 | 21 | #ifdef ENABLE_DECODE |
aaabd61b | 22 | #include <libsigrokdecode/libsigrokdecode.h> |
269528f5 | 23 | #endif |
30236a54 | 24 | |
f2edb557 | 25 | #include <boost/bind.hpp> |
107ca6d3 | 26 | #include <boost/foreach.hpp> |
f2edb557 | 27 | |
85843b14 JH |
28 | #include <algorithm> |
29 | #include <iterator> | |
30 | ||
7d5425ef JH |
31 | #include <QAction> |
32 | #include <QApplication> | |
33 | #include <QButtonGroup> | |
2953961c | 34 | #include <QFileDialog> |
f2edb557 | 35 | #include <QMessageBox> |
7d5425ef JH |
36 | #include <QMenu> |
37 | #include <QMenuBar> | |
38 | #include <QStatusBar> | |
39 | #include <QVBoxLayout> | |
40 | #include <QWidget> | |
2953961c | 41 | |
d7bed479 | 42 | #include "mainwindow.h" |
107ca6d3 JH |
43 | |
44 | #include "devicemanager.h" | |
85843b14 | 45 | #include "device/device.h" |
acda14b8 | 46 | #include "dialogs/about.h" |
9663c82b | 47 | #include "dialogs/connect.h" |
0fbda3c2 | 48 | #include "dialogs/storeprogress.h" |
f4c92e1c | 49 | #include "toolbars/samplingbar.h" |
3045c869 | 50 | #include "view/logicsignal.h" |
4104d7f3 | 51 | #include "view/view.h" |
269528f5 | 52 | #ifdef ENABLE_DECODE |
f0d37dab | 53 | #include "widgets/decodermenu.h" |
269528f5 | 54 | #endif |
d7bed479 | 55 | |
30236a54 JH |
56 | /* __STDC_FORMAT_MACROS is required for PRIu64 and friends (in C++). */ |
57 | #define __STDC_FORMAT_MACROS | |
58 | #include <inttypes.h> | |
59 | #include <stdint.h> | |
60 | #include <stdarg.h> | |
61 | #include <glib.h> | |
62 | #include <libsigrok/libsigrok.h> | |
e82fd481 | 63 | |
19adbc2c | 64 | using boost::shared_ptr; |
819f4c25 | 65 | using std::list; |
30236a54 | 66 | |
51e77110 JH |
67 | namespace pv { |
68 | ||
b1264f56 JH |
69 | namespace view { |
70 | class SelectableItem; | |
71 | } | |
72 | ||
107ca6d3 JH |
73 | MainWindow::MainWindow(DeviceManager &device_manager, |
74 | const char *open_file_name, | |
1d478458 | 75 | QWidget *parent) : |
107ca6d3 | 76 | QMainWindow(parent), |
dc0867ff | 77 | _device_manager(device_manager), |
f0d37dab | 78 | _session(device_manager) |
d7bed479 | 79 | { |
7d5425ef | 80 | setup_ui(); |
1d478458 JH |
81 | if (open_file_name) { |
82 | const QString s(QString::fromUtf8(open_file_name)); | |
83 | QMetaObject::invokeMethod(this, "load_file", | |
84 | Qt::QueuedConnection, | |
85 | Q_ARG(QString, s)); | |
86 | } | |
7d5425ef JH |
87 | } |
88 | ||
89 | void MainWindow::setup_ui() | |
90 | { | |
91 | setObjectName(QString::fromUtf8("MainWindow")); | |
92 | ||
93 | resize(1024, 768); | |
94 | ||
95 | // Set the window icon | |
96 | QIcon icon; | |
97 | icon.addFile(QString::fromUtf8(":/icons/sigrok-logo-notext.png"), | |
98 | QSize(), QIcon::Normal, QIcon::Off); | |
99 | setWindowIcon(icon); | |
100 | ||
e072efc8 JH |
101 | // Setup the central widget |
102 | _central_widget = new QWidget(this); | |
103 | _vertical_layout = new QVBoxLayout(_central_widget); | |
104 | _vertical_layout->setSpacing(6); | |
105 | _vertical_layout->setContentsMargins(0, 0, 0, 0); | |
106 | setCentralWidget(_central_widget); | |
107 | ||
108 | _view = new pv::view::View(_session, this); | |
b1264f56 | 109 | |
e072efc8 JH |
110 | _vertical_layout->addWidget(_view); |
111 | ||
ab1d13ee | 112 | // Setup the menu bar |
ced1cc13 JH |
113 | QMenuBar *const menu_bar = new QMenuBar(this); |
114 | menu_bar->setGeometry(QRect(0, 0, 400, 25)); | |
a429590b | 115 | |
ab1d13ee | 116 | // File Menu |
ced1cc13 JH |
117 | QMenu *const menu_file = new QMenu; |
118 | menu_file->setTitle(QApplication::translate( | |
ab1d13ee | 119 | "MainWindow", "&File", 0, QApplication::UnicodeUTF8)); |
e072efc8 | 120 | |
ced1cc13 JH |
121 | QAction *const action_open = new QAction(this); |
122 | action_open->setText(QApplication::translate( | |
ab1d13ee | 123 | "MainWindow", "&Open...", 0, QApplication::UnicodeUTF8)); |
ced1cc13 | 124 | action_open->setIcon(QIcon::fromTheme("document-open", |
362eea96 | 125 | QIcon(":/icons/document-open.png"))); |
5117748b | 126 | action_open->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_O)); |
ced1cc13 JH |
127 | action_open->setObjectName(QString::fromUtf8("actionOpen")); |
128 | menu_file->addAction(action_open); | |
009e1503 | 129 | |
0fbda3c2 JH |
130 | QAction *const action_save_as = new QAction(this); |
131 | action_save_as->setText(QApplication::translate( | |
132 | "MainWindow", "&Save As...", 0, QApplication::UnicodeUTF8)); | |
133 | action_save_as->setIcon(QIcon::fromTheme("document-save-as", | |
134 | QIcon(":/icons/document-save-as.png"))); | |
5117748b | 135 | action_save_as->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_S)); |
0fbda3c2 JH |
136 | action_save_as->setObjectName(QString::fromUtf8("actionSaveAs")); |
137 | menu_file->addAction(action_save_as); | |
138 | ||
ced1cc13 | 139 | menu_file->addSeparator(); |
2a032dcb | 140 | |
ced1cc13 JH |
141 | QAction *const action_connect = new QAction(this); |
142 | action_connect->setText(QApplication::translate( | |
9663c82b JH |
143 | "MainWindow", "&Connect to Device...", 0, |
144 | QApplication::UnicodeUTF8)); | |
ced1cc13 JH |
145 | action_connect->setObjectName(QString::fromUtf8("actionConnect")); |
146 | menu_file->addAction(action_connect); | |
9663c82b | 147 | |
ced1cc13 | 148 | menu_file->addSeparator(); |
9663c82b | 149 | |
ced1cc13 JH |
150 | QAction *action_quit = new QAction(this); |
151 | action_quit->setText(QApplication::translate( | |
2a032dcb | 152 | "MainWindow", "&Quit", 0, QApplication::UnicodeUTF8)); |
ced1cc13 | 153 | action_quit->setIcon(QIcon::fromTheme("application-exit", |
2a032dcb | 154 | QIcon(":/icons/application-exit.png"))); |
ced1cc13 JH |
155 | action_quit->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); |
156 | action_quit->setObjectName(QString::fromUtf8("actionQuit")); | |
157 | menu_file->addAction(action_quit); | |
2a032dcb | 158 | |
ab1d13ee | 159 | // View Menu |
ced1cc13 JH |
160 | QMenu *menu_view = new QMenu; |
161 | menu_view->setTitle(QApplication::translate( | |
ab1d13ee JH |
162 | "MainWindow", "&View", 0, QApplication::UnicodeUTF8)); |
163 | ||
ced1cc13 JH |
164 | QAction *const action_view_zoom_in = new QAction(this); |
165 | action_view_zoom_in->setText(QApplication::translate( | |
ab1d13ee | 166 | "MainWindow", "Zoom &In", 0, QApplication::UnicodeUTF8)); |
ced1cc13 | 167 | action_view_zoom_in->setIcon(QIcon::fromTheme("zoom-in", |
ab1d13ee | 168 | QIcon(":/icons/zoom-in.png"))); |
d2899ad5 | 169 | // simply using Qt::Key_Plus shows no + in the menu |
170 | action_view_zoom_in->setShortcut(QKeySequence::ZoomIn); | |
ced1cc13 | 171 | action_view_zoom_in->setObjectName( |
ab1d13ee | 172 | QString::fromUtf8("actionViewZoomIn")); |
ced1cc13 | 173 | menu_view->addAction(action_view_zoom_in); |
ab1d13ee | 174 | |
ced1cc13 JH |
175 | QAction *const action_view_zoom_out = new QAction(this); |
176 | action_view_zoom_out->setText(QApplication::translate( | |
ab1d13ee | 177 | "MainWindow", "Zoom &Out", 0, QApplication::UnicodeUTF8)); |
ced1cc13 | 178 | action_view_zoom_out->setIcon(QIcon::fromTheme("zoom-out", |
ab1d13ee | 179 | QIcon(":/icons/zoom-out.png"))); |
d2899ad5 | 180 | action_view_zoom_out->setShortcut(QKeySequence::ZoomOut); |
ced1cc13 | 181 | action_view_zoom_out->setObjectName( |
ab1d13ee | 182 | QString::fromUtf8("actionViewZoomOut")); |
ced1cc13 | 183 | menu_view->addAction(action_view_zoom_out); |
ab1d13ee | 184 | |
ca46b534 JH |
185 | QAction *const action_view_zoom_fit = new QAction(this); |
186 | action_view_zoom_fit->setText(QApplication::translate( | |
187 | "MainWindow", "Zoom to &Fit", 0, QApplication::UnicodeUTF8)); | |
188 | action_view_zoom_fit->setIcon(QIcon::fromTheme("zoom-fit", | |
189 | QIcon(":/icons/zoom-fit.png"))); | |
190 | action_view_zoom_fit->setShortcut(QKeySequence(Qt::Key_F)); | |
191 | action_view_zoom_fit->setObjectName( | |
192 | QString::fromUtf8("actionViewZoomFit")); | |
193 | menu_view->addAction(action_view_zoom_fit); | |
194 | ||
d1e7d82c JH |
195 | QAction *const action_view_zoom_one_to_one = new QAction(this); |
196 | action_view_zoom_one_to_one->setText(QApplication::translate( | |
197 | "MainWindow", "Zoom to &One-to-One", 0, | |
198 | QApplication::UnicodeUTF8)); | |
199 | action_view_zoom_one_to_one->setIcon(QIcon::fromTheme("zoom-original", | |
200 | QIcon(":/icons/zoom-original.png"))); | |
201 | action_view_zoom_one_to_one->setShortcut(QKeySequence(Qt::Key_O)); | |
202 | action_view_zoom_one_to_one->setObjectName( | |
203 | QString::fromUtf8("actionViewZoomOneToOne")); | |
204 | menu_view->addAction(action_view_zoom_one_to_one); | |
205 | ||
ced1cc13 | 206 | menu_view->addSeparator(); |
ab1d13ee | 207 | |
ced1cc13 JH |
208 | QAction *action_view_show_cursors = new QAction(this); |
209 | action_view_show_cursors->setCheckable(true); | |
210 | action_view_show_cursors->setChecked(_view->cursors_shown()); | |
211 | action_view_show_cursors->setShortcut(QKeySequence(Qt::Key_C)); | |
212 | action_view_show_cursors->setObjectName( | |
ab1d13ee | 213 | QString::fromUtf8("actionViewShowCursors")); |
ced1cc13 | 214 | action_view_show_cursors->setText(QApplication::translate( |
ab1d13ee | 215 | "MainWindow", "Show &Cursors", 0, QApplication::UnicodeUTF8)); |
ced1cc13 | 216 | menu_view->addAction(action_view_show_cursors); |
a429590b | 217 | |
7dd093df | 218 | // Decoders Menu |
269528f5 | 219 | #ifdef ENABLE_DECODE |
ced1cc13 JH |
220 | QMenu *const menu_decoders = new QMenu; |
221 | menu_decoders->setTitle(QApplication::translate( | |
7dd093df JH |
222 | "MainWindow", "&Decoders", 0, QApplication::UnicodeUTF8)); |
223 | ||
ced1cc13 | 224 | pv::widgets::DecoderMenu *const menu_decoders_add = |
f69ec72d | 225 | new pv::widgets::DecoderMenu(menu_decoders, true); |
ced1cc13 | 226 | menu_decoders_add->setTitle(QApplication::translate( |
7dd093df | 227 | "MainWindow", "&Add", 0, QApplication::UnicodeUTF8)); |
ced1cc13 | 228 | connect(menu_decoders_add, SIGNAL(decoder_selected(srd_decoder*)), |
f0d37dab | 229 | this, SLOT(add_decoder(srd_decoder*))); |
7dd093df | 230 | |
ced1cc13 | 231 | menu_decoders->addMenu(menu_decoders_add); |
269528f5 | 232 | #endif |
7dd093df | 233 | |
ab1d13ee | 234 | // Help Menu |
ced1cc13 JH |
235 | QMenu *const menu_help = new QMenu; |
236 | menu_help->setTitle(QApplication::translate( | |
ab1d13ee JH |
237 | "MainWindow", "&Help", 0, QApplication::UnicodeUTF8)); |
238 | ||
ced1cc13 JH |
239 | QAction *const action_about = new QAction(this); |
240 | action_about->setObjectName(QString::fromUtf8("actionAbout")); | |
241 | action_about->setText(QApplication::translate( | |
ab1d13ee | 242 | "MainWindow", "&About...", 0, QApplication::UnicodeUTF8)); |
ced1cc13 | 243 | menu_help->addAction(action_about); |
7d5425ef | 244 | |
ced1cc13 JH |
245 | menu_bar->addAction(menu_file->menuAction()); |
246 | menu_bar->addAction(menu_view->menuAction()); | |
269528f5 | 247 | #ifdef ENABLE_DECODE |
ced1cc13 | 248 | menu_bar->addAction(menu_decoders->menuAction()); |
269528f5 | 249 | #endif |
ced1cc13 | 250 | menu_bar->addAction(menu_help->menuAction()); |
7d5425ef | 251 | |
ced1cc13 | 252 | setMenuBar(menu_bar); |
7d5425ef JH |
253 | QMetaObject::connectSlotsByName(this); |
254 | ||
5ac961e3 | 255 | // Setup the toolbar |
ced1cc13 JH |
256 | QToolBar *const toolbar = new QToolBar(tr("Main Toolbar"), this); |
257 | toolbar->addAction(action_open); | |
f45512cb | 258 | toolbar->addAction(action_save_as); |
ced1cc13 JH |
259 | toolbar->addSeparator(); |
260 | toolbar->addAction(action_view_zoom_in); | |
261 | toolbar->addAction(action_view_zoom_out); | |
ca46b534 | 262 | toolbar->addAction(action_view_zoom_fit); |
f45512cb | 263 | toolbar->addAction(action_view_zoom_one_to_one); |
ced1cc13 | 264 | addToolBar(toolbar); |
0a4db787 | 265 | |
5ac961e3 | 266 | // Setup the sampling bar |
aca00b1e | 267 | _sampling_bar = new toolbars::SamplingBar(_session, this); |
5ac961e3 JH |
268 | |
269 | // Populate the device list and select the initially selected device | |
107ca6d3 | 270 | update_device_list(); |
5ac961e3 | 271 | |
274d4f13 JH |
272 | connect(_sampling_bar, SIGNAL(run_stop()), this, |
273 | SLOT(run_stop())); | |
d4984fe7 JH |
274 | addToolBar(_sampling_bar); |
275 | ||
5ac961e3 | 276 | // Set the title |
a8d3fb2d JH |
277 | setWindowTitle(QApplication::translate("MainWindow", "PulseView", 0, |
278 | QApplication::UnicodeUTF8)); | |
279 | ||
6ac96c2e JH |
280 | // Setup _session events |
281 | connect(&_session, SIGNAL(capture_state_changed(int)), this, | |
282 | SLOT(capture_state_changed(int))); | |
283 | ||
d7bed479 | 284 | } |
30236a54 | 285 | |
f2edb557 JH |
286 | void MainWindow::session_error( |
287 | const QString text, const QString info_text) | |
288 | { | |
289 | QMetaObject::invokeMethod(this, "show_session_error", | |
290 | Qt::QueuedConnection, Q_ARG(QString, text), | |
291 | Q_ARG(QString, info_text)); | |
292 | } | |
293 | ||
d873f4d6 | 294 | void MainWindow::update_device_list() |
107ca6d3 JH |
295 | { |
296 | assert(_sampling_bar); | |
297 | ||
d873f4d6 | 298 | shared_ptr<pv::device::DevInst> selected_device = _session.get_device(); |
85843b14 JH |
299 | list< shared_ptr<device::DevInst> > devices; |
300 | std::copy(_device_manager.devices().begin(), | |
301 | _device_manager.devices().end(), std::back_inserter(devices)); | |
302 | ||
a5ea63c2 JH |
303 | if (std::find(devices.begin(), devices.end(), selected_device) == |
304 | devices.end()) | |
305 | devices.push_back(selected_device); | |
e95e8563 | 306 | assert(selected_device); |
a5ea63c2 | 307 | |
e95e8563 | 308 | _sampling_bar->set_device_list(devices, selected_device); |
107ca6d3 JH |
309 | } |
310 | ||
1d478458 JH |
311 | void MainWindow::load_file(QString file_name) |
312 | { | |
f2edb557 JH |
313 | const QString errorMessage( |
314 | QString("Failed to load file %1").arg(file_name)); | |
315 | const QString infoMessage; | |
ae2d1bc5 JH |
316 | |
317 | try { | |
318 | _session.set_file(file_name.toStdString()); | |
319 | } catch(QString e) { | |
320 | show_session_error(tr("Failed to load ") + file_name, e); | |
6fd0b639 JH |
321 | _session.set_default_device(); |
322 | update_device_list(); | |
323 | return; | |
ae2d1bc5 JH |
324 | } |
325 | ||
a5ea63c2 JH |
326 | update_device_list(); |
327 | ||
ae2d1bc5 JH |
328 | _session.start_capture(boost::bind(&MainWindow::session_error, this, |
329 | errorMessage, infoMessage)); | |
f2edb557 JH |
330 | } |
331 | ||
332 | void MainWindow::show_session_error( | |
333 | const QString text, const QString info_text) | |
334 | { | |
335 | QMessageBox msg(this); | |
336 | msg.setText(text); | |
337 | msg.setInformativeText(info_text); | |
338 | msg.setStandardButtons(QMessageBox::Ok); | |
339 | msg.setIcon(QMessageBox::Warning); | |
340 | msg.exec(); | |
1d478458 JH |
341 | } |
342 | ||
2953961c JH |
343 | void MainWindow::on_actionOpen_triggered() |
344 | { | |
1d43d767 | 345 | // Show the dialog |
1d478458 | 346 | const QString file_name = QFileDialog::getOpenFileName( |
6866d5de JH |
347 | this, tr("Open File"), "", tr( |
348 | "Sigrok Sessions (*.sr);;" | |
349 | "All Files (*.*)")); | |
92b139d0 JH |
350 | if (!file_name.isEmpty()) |
351 | load_file(file_name); | |
2953961c JH |
352 | } |
353 | ||
0fbda3c2 JH |
354 | void MainWindow::on_actionSaveAs_triggered() |
355 | { | |
356 | using pv::dialogs::StoreProgress; | |
357 | ||
358 | // Stop any currently running capture session | |
359 | _session.stop_capture(); | |
360 | ||
361 | // Show the dialog | |
362 | const QString file_name = QFileDialog::getSaveFileName( | |
363 | this, tr("Save File"), "", tr("Sigrok Sessions (*.sr)")); | |
364 | ||
365 | if (file_name.isEmpty()) | |
366 | return; | |
367 | ||
368 | StoreProgress *dlg = new StoreProgress(file_name, _session, this); | |
369 | dlg->run(); | |
370 | } | |
371 | ||
9663c82b JH |
372 | void MainWindow::on_actionConnect_triggered() |
373 | { | |
b99cfc42 JH |
374 | // Stop any currently running capture session |
375 | _session.stop_capture(); | |
376 | ||
107ca6d3 | 377 | dialogs::Connect dlg(this, _device_manager); |
5eb0fa13 | 378 | |
dc0867ff JH |
379 | // If the user selected a device, select it in the device list. Select the |
380 | // current device otherwise. | |
d873f4d6 JH |
381 | if (dlg.exec()) |
382 | _session.set_device(dlg.get_selected_device()); | |
dc0867ff | 383 | |
d873f4d6 | 384 | update_device_list(); |
9663c82b JH |
385 | } |
386 | ||
2a032dcb JH |
387 | void MainWindow::on_actionQuit_triggered() |
388 | { | |
389 | close(); | |
390 | } | |
391 | ||
a429590b JH |
392 | void MainWindow::on_actionViewZoomIn_triggered() |
393 | { | |
394 | _view->zoom(1); | |
395 | } | |
396 | ||
397 | void MainWindow::on_actionViewZoomOut_triggered() | |
398 | { | |
399 | _view->zoom(-1); | |
400 | } | |
401 | ||
ca46b534 JH |
402 | void MainWindow::on_actionViewZoomFit_triggered() |
403 | { | |
404 | _view->zoom_fit(); | |
405 | } | |
406 | ||
d1e7d82c JH |
407 | void MainWindow::on_actionViewZoomOneToOne_triggered() |
408 | { | |
409 | _view->zoom_one_to_one(); | |
410 | } | |
411 | ||
e072efc8 JH |
412 | void MainWindow::on_actionViewShowCursors_triggered() |
413 | { | |
414 | assert(_view); | |
b4d91e56 JH |
415 | |
416 | const bool show = !_view->cursors_shown(); | |
417 | if(show) | |
418 | _view->centre_cursors(); | |
419 | ||
420 | _view->show_cursors(show); | |
e072efc8 JH |
421 | } |
422 | ||
30236a54 JH |
423 | void MainWindow::on_actionAbout_triggered() |
424 | { | |
acda14b8 | 425 | dialogs::About dlg(this); |
40eb2ff4 | 426 | dlg.exec(); |
30236a54 | 427 | } |
274d4f13 | 428 | |
f0d37dab | 429 | void MainWindow::add_decoder(srd_decoder *decoder) |
7dd093df | 430 | { |
269528f5 | 431 | #ifdef ENABLE_DECODE |
f0d37dab JH |
432 | assert(decoder); |
433 | _session.add_decoder(decoder); | |
269528f5 JH |
434 | #else |
435 | (void)decoder; | |
436 | #endif | |
7dd093df JH |
437 | } |
438 | ||
274d4f13 JH |
439 | void MainWindow::run_stop() |
440 | { | |
5b7cf66c JH |
441 | switch(_session.get_capture_state()) { |
442 | case SigSession::Stopped: | |
d99dc9f2 ML |
443 | _session.start_capture( |
444 | boost::bind(&MainWindow::session_error, this, | |
f2edb557 | 445 | QString("Capture failed"), _1)); |
5b7cf66c JH |
446 | break; |
447 | ||
2b49eeb0 | 448 | case SigSession::AwaitingTrigger: |
5b7cf66c JH |
449 | case SigSession::Running: |
450 | _session.stop_capture(); | |
451 | break; | |
452 | } | |
274d4f13 | 453 | } |
51e77110 | 454 | |
6ac96c2e JH |
455 | void MainWindow::capture_state_changed(int state) |
456 | { | |
2b49eeb0 | 457 | _sampling_bar->set_capture_state((pv::SigSession::capture_state)state); |
6ac96c2e JH |
458 | } |
459 | ||
51e77110 | 460 | } // namespace pv |