| 704 | } |
| 705 | |
| 706 | double SamplingBar::hori_knob(int dir) |
| 707 | { |
| 708 | double hori_res = -1; |
| 709 | |
| 710 | if (_session->get_device()->get_work_mode() != DSO){ |
| 711 | assert(false); |
| 712 | } |
| 713 | |
| 714 | disconnect(&_sample_count, SIGNAL(currentIndexChanged(int)), this, SLOT(on_samplecount_sel(int))); |
| 715 | |
| 716 | if (0 == dir) |
| 717 | { |
| 718 | hori_res = commit_hori_res(); |
| 719 | } |
| 720 | else if ((dir > 0) && (_sample_count.currentIndex() > 0)) |
| 721 | { |
| 722 | set_sample_count_index(_sample_count.currentIndex() - 1); |
| 723 | hori_res = commit_hori_res(); |
| 724 | |
| 725 | if (_session->have_view_data() == false){ |
| 726 | _session->apply_samplerate(); |
| 727 | _session->broadcast_msg(DSV_MSG_DEVICE_DURATION_UPDATED); |
| 728 | } |
| 729 | } |
| 730 | else if ((dir < 0) && (_sample_count.currentIndex() < _sample_count.count() - 1)) |
| 731 | { |
| 732 | set_sample_count_index(_sample_count.currentIndex() + 1); |
| 733 | hori_res = commit_hori_res(); |
| 734 | |
| 735 | if (_session->have_view_data() == false){ |
| 736 | _session->apply_samplerate(); |
| 737 | _session->broadcast_msg(DSV_MSG_DEVICE_DURATION_UPDATED); |
| 738 | } |
| 739 | } |
| 740 | |
| 741 | connect(&_sample_count, SIGNAL(currentIndexChanged(int)), |
| 742 | this, SLOT(on_samplecount_sel(int))); |
| 743 | |
| 744 | return hori_res; |
| 745 | } |
| 746 | |
| 747 | double SamplingBar::commit_hori_res() |
| 748 | { |
no test coverage detected