MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / update_view_status

Method update_view_status

DSView/pv/toolbars/samplingbar.cpp:1169–1248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1167 }
1168
1169 void SamplingBar::update_view_status()
1170 {
1171 int bEnable = _session->is_working() == false;
1172 int mode = _session->get_device()->get_work_mode();
1173
1174 _device_type.setEnabled(bEnable);
1175 _mode_button.setEnabled(bEnable);
1176 _configure_button.setEnabled(bEnable);
1177 _device_selector.setEnabled(bEnable);
1178 _action_loop->setVisible(false);
1179
1180 if (_session->get_device()->is_file()){
1181 _sample_rate.setEnabled(false);
1182 _sample_count.setEnabled(false);
1183 }
1184 else if (mode == DSO){
1185 _sample_rate.setEnabled(false);
1186 _sample_count.setEnabled(bEnable);
1187
1188 if (_session->is_working() && _session->is_instant() == false)
1189 {
1190 _sample_count.setEnabled(true);
1191 }
1192 }
1193 else{
1194 _sample_rate.setEnabled(bEnable);
1195 _sample_count.setEnabled(bEnable);
1196
1197 if (mode == LOGIC && _session->get_device()->is_hardware())
1198 {
1199 int mode_val = 0;
1200 if (_session->get_device()->get_config_int16(SR_CONF_OPERATION_MODE, mode_val)){
1201 if (mode_val == LO_OP_INTEST){
1202 _sample_rate.setEnabled(false);
1203 _sample_count.setEnabled(false);
1204 }
1205 }
1206 }
1207
1208 if (mode == LOGIC && _device_agent->is_file() == false){
1209 if (_device_agent->is_stream_mode() || _device_agent->is_demo())
1210 _action_loop->setVisible(true);
1211 }
1212 }
1213
1214 if (_session->is_working()){
1215 if (_is_run_as_instant)
1216 _run_stop_button.setEnabled(false);
1217 else
1218 _instant_button.setEnabled(false);
1219 } else {
1220 _run_stop_button.setEnabled(true);
1221 _instant_button.setEnabled(true);
1222 }
1223
1224 QString iconPath = GetIconPath();
1225
1226 if (_is_run_as_instant)

Callers

nothing calls this directly

Calls 11

GetIconPathFunction · 0.85
is_workingMethod · 0.80
get_work_modeMethod · 0.80
get_deviceMethod · 0.80
is_instantMethod · 0.80
is_hardwareMethod · 0.80
get_config_int16Method · 0.80
is_stream_modeMethod · 0.80
is_demoMethod · 0.80
is_fileMethod · 0.45

Tested by

no test coverage detected