| 211 | } |
| 212 | |
| 213 | void SamplingBar::reStyle() |
| 214 | { |
| 215 | bool bDev = _device_agent->have_instance(); |
| 216 | |
| 217 | if (bDev) |
| 218 | { |
| 219 | if (_device_agent->is_demo()) |
| 220 | _device_type.setIcon(QIcon(":/icons/demo.svg")); |
| 221 | else if (_device_agent->is_file()) |
| 222 | _device_type.setIcon(QIcon(":/icons/data.svg")); |
| 223 | else |
| 224 | { |
| 225 | int usb_speed = LIBUSB_SPEED_HIGH; |
| 226 | _device_agent->get_config_int32(SR_CONF_USB_SPEED, usb_speed); |
| 227 | |
| 228 | if (usb_speed == LIBUSB_SPEED_SUPER) |
| 229 | _device_type.setIcon(QIcon(":/icons/usb3.svg")); |
| 230 | else |
| 231 | _device_type.setIcon(QIcon(":/icons/usb2.svg")); |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | if (true) |
| 236 | { |
| 237 | QString iconPath = GetIconPath(); |
| 238 | _configure_button.setIcon(QIcon(iconPath + "/params.svg")); |
| 239 | |
| 240 | QString icon2 = _session->is_working() ? "stop.svg" : "start.svg"; |
| 241 | _run_stop_button.setIcon(QIcon(iconPath + "/" + icon2)); |
| 242 | _instant_button.setIcon(QIcon(iconPath + "/single.svg")); |
| 243 | |
| 244 | _action_single->setIcon(QIcon(iconPath + SINGLE_ACTION_ICON)); |
| 245 | _action_repeat->setIcon(QIcon(iconPath + REPEAT_ACTION_ICON)); |
| 246 | _action_loop->setIcon(QIcon(iconPath + LOOP_ACTION_ICON)); |
| 247 | |
| 248 | update_mode_icon(); |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | void SamplingBar::on_configure() |
| 253 | { |
nothing calls this directly
no test coverage detected