@@ -59,6 +59,8 @@ MainWindow::MainWindow( HantekDsoControl *dsoControl, DsoSettings *settings, Exp
59
59
shortcuts << QKeySequence ( Qt::Key::Key_S ); // else put this shortcut at the end of the list
60
60
#endif
61
61
ui->actionSampling ->setShortcuts ( shortcuts );
62
+ ui->actionRefresh ->setIcon ( QIcon ( iconPath + " refresh.svg" ) );
63
+ ui->actionRefresh ->setShortcut ( Qt::Key::Key_R );
62
64
ui->actionPhosphor ->setIcon ( QIcon ( iconPath + " phosphor.svg" ) );
63
65
ui->actionPhosphor ->setShortcut ( Qt::Key::Key_P );
64
66
ui->actionHistogram ->setIcon ( QIcon ( iconPath + " histogram.svg" ) );
@@ -86,16 +88,6 @@ MainWindow::MainWindow( HantekDsoControl *dsoControl, DsoSettings *settings, Exp
86
88
setDockOptions ( dockOptions () | QMainWindow::GroupedDragging );
87
89
#endif
88
90
QAction *action;
89
- for ( auto *exporter : *exporterRegistry ) {
90
- action = new QAction ( iconFont->icon ( exporter->faIcon (), colorMap ), exporter->name (), this );
91
- action->setCheckable ( exporter->type () == ExporterInterface::Type::ContinousExport );
92
- connect ( action, &QAction::triggered, [exporter, exporterRegistry]( bool checked ) {
93
- exporterRegistry->setExporterEnabled ( exporter,
94
- exporter->type () == ExporterInterface::Type::ContinousExport ? checked : true );
95
- } );
96
- ui->menuExport ->addAction ( action );
97
- }
98
-
99
91
action = new QAction ( iconFont->icon ( fa::camera, colorMap ), tr ( " Screenshot .." ), this );
100
92
action->setToolTip ( " Make a screenshot of the program window" );
101
93
connect ( action, &QAction::triggered, [this ]() { screenShot ( SCREENSHOT ); } );
@@ -117,6 +109,18 @@ MainWindow::MainWindow( HantekDsoControl *dsoControl, DsoSettings *settings, Exp
117
109
} );
118
110
ui->menuExport ->addAction ( action );
119
111
112
+ ui->menuExport ->addSeparator ();
113
+
114
+ for ( auto *exporter : *exporterRegistry ) {
115
+ action = new QAction ( iconFont->icon ( exporter->faIcon (), colorMap ), exporter->name (), this );
116
+ action->setCheckable ( exporter->type () == ExporterInterface::Type::ContinousExport );
117
+ connect ( action, &QAction::triggered, [exporter, exporterRegistry]( bool checked ) {
118
+ exporterRegistry->setExporterEnabled ( exporter,
119
+ exporter->type () == ExporterInterface::Type::ContinousExport ? checked : true );
120
+ } );
121
+ ui->menuExport ->addAction ( action );
122
+ }
123
+
120
124
DsoSettingsScope *scope = &( dsoSettings->scope );
121
125
const Dso::ControlSpecification *spec = dsoControl->getModel ()->spec ();
122
126
@@ -189,6 +193,8 @@ MainWindow::MainWindow( HantekDsoControl *dsoControl, DsoSettings *settings, Exp
189
193
190
194
connect ( triggerDock, &TriggerDock::modeChanged, dsoControl, &HantekDsoControl::setTriggerMode );
191
195
connect ( triggerDock, &TriggerDock::modeChanged, dsoWidget, &DsoWidget::updateTriggerMode );
196
+ connect ( triggerDock, &TriggerDock::modeChanged,
197
+ [this ]( Dso::TriggerMode mode ) { ui->actionRefresh ->setEnabled ( Dso::TriggerMode::ROLL == mode ); } );
192
198
connect ( triggerDock, &TriggerDock::sourceChanged, dsoControl, &HantekDsoControl::setTriggerSource );
193
199
connect ( triggerDock, &TriggerDock::sourceChanged, dsoWidget, &DsoWidget::updateTriggerSource );
194
200
connect ( triggerDock, &TriggerDock::slopeChanged, dsoControl, &HantekDsoControl::setTriggerSlope );
@@ -258,6 +264,8 @@ MainWindow::MainWindow( HantekDsoControl *dsoControl, DsoSettings *settings, Exp
258
264
connect ( this ->ui ->actionSampling , &QAction::triggered, dsoControl, &HantekDsoControl::enableSampling );
259
265
this ->ui ->actionSampling ->setChecked ( dsoControl->isSampling () );
260
266
267
+ connect ( this ->ui ->actionRefresh , &QAction::triggered, dsoControl, &HantekDsoControl::restartSampling );
268
+
261
269
connect ( dsoControl, &HantekDsoControl::samplerateLimitsChanged, horizontalDock, &HorizontalDock::setSamplerateLimits );
262
270
connect ( dsoControl, &HantekDsoControl::samplerateSet, horizontalDock, &HorizontalDock::setSamplerateSteps );
263
271
0 commit comments