Move UIRecordView::set_sampling_rate to .cpp.

This commit is contained in:
Jared Boone 2016-06-21 11:33:23 -07:00
parent 59aa99c8ff
commit 19e5e111a9
2 changed files with 14 additions and 12 deletions

View File

@ -195,6 +195,19 @@ void RecordView::focus() {
button_record.focus();
}
void RecordView::set_sampling_rate(const size_t new_sampling_rate) {
if( new_sampling_rate != sampling_rate ) {
stop();
sampling_rate = new_sampling_rate;
button_record.hidden(sampling_rate == 0);
text_record_filename.hidden(sampling_rate == 0);
text_record_dropped.hidden(sampling_rate == 0);
text_time_available.hidden(sampling_rate == 0);
rect_background.hidden(sampling_rate != 0);
}
}
bool RecordView::is_active() const {
return (bool)capture_thread;
}

View File

@ -55,18 +55,7 @@ public:
void focus() override;
void set_sampling_rate(const size_t new_sampling_rate) {
if( new_sampling_rate != sampling_rate ) {
stop();
sampling_rate = new_sampling_rate;
button_record.hidden(sampling_rate == 0);
text_record_filename.hidden(sampling_rate == 0);
text_record_dropped.hidden(sampling_rate == 0);
text_time_available.hidden(sampling_rate == 0);
rect_background.hidden(sampling_rate != 0);
}
}
void set_sampling_rate(const size_t new_sampling_rate);
void start();
void stop();