-const uint64_t SamplingBar::RecordLengths[20] = {
- 1000,
- 2500,
- 5000,
- 10000,
- 25000,
- 50000,
- 100000,
- 250000,
- 500000,
- 1000000,
- 2000000,
- 5000000,
- 10000000,
- 25000000,
- 50000000,
- 100000000,
- 250000000,
- 500000000,
- 1000000000,
- 10000000000ULL,
-};
-
-const uint64_t SamplingBar::DefaultRecordLength = 1000000;
-
-SamplingBar::SamplingBar(QWidget *parent) :
- QToolBar("Sampling Bar", parent),
- _device_selector(this),
- _configure_button(this),
- _record_length_selector(this),
- _sample_rate_list(this),
- _icon_red(":/icons/status-red.svg"),
- _icon_green(":/icons/status-green.svg"),
- _icon_grey(":/icons/status-grey.svg"),
- _run_stop_button(this)
+const uint64_t SamplingBar::MinSampleCount = 100ULL;
+const uint64_t SamplingBar::MaxSampleCount = 1000000000000ULL;
+const uint64_t SamplingBar::DefaultSampleCount = 1000000;
+
+SamplingBar::SamplingBar(Session &session, MainWindow &main_window) :
+ QToolBar("Sampling Bar", &main_window),
+ session_(session),
+ main_window_(main_window),
+ device_selector_(this),
+ updating_device_selector_(false),
+ configure_button_(this),
+ configure_button_action_(NULL),
+ channels_button_(this),
+ sample_count_(" samples", this),
+ sample_rate_("Hz", this),
+ updating_sample_rate_(false),
+ updating_sample_count_(false),
+ sample_count_supported_(false),
+ icon_red_(":/icons/status-red.svg"),
+ icon_green_(":/icons/status-green.svg"),
+ icon_grey_(":/icons/status-grey.svg"),
+ run_stop_button_(this)