pv/data/signaldata.cpp
pv/data/snapshot.cpp
pv/dialogs/about.cpp
+ pv/dialogs/hwcap.cpp
pv/prop/binding/hwcap.cpp
pv/view/analogsignal.cpp
pv/view/cursor.cpp
--- /dev/null
+/*
+ * This file is part of the PulseView project.
+ *
+ * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "hwcap.h"
+
+namespace pv {
+namespace dialogs {
+
+HwCap::HwCap(QWidget *parent, struct sr_dev_inst *sdi) :
+ QDialog(parent),
+ _hw_cap_binding(sdi)
+{
+}
+
+} // namespace dialogs
+} // namespace pv
--- /dev/null
+/*
+ * This file is part of the PulseView project.
+ *
+ * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef PULSEVIEW_PV_HWCAP_H
+#define PULSEVIEW_PV_HWCAP_H
+
+#include <QDialog>
+
+#include <pv/prop/binding/hwcap.h>
+
+namespace pv {
+namespace dialogs {
+
+class HwCap : public QDialog
+{
+public:
+ HwCap(QWidget *parent, struct sr_dev_inst *sdi);
+
+private:
+ pv::prop::binding::HwCap _hw_cap_binding;
+};
+
+} // namespace dialogs
+} // namespace pv
+
+#endif // PULSEVIEW_PV_HWCAP_H
#include "samplingbar.h"
+#include <pv/dialogs/hwcap.h>
+
namespace pv {
const uint64_t SamplingBar::RecordLengths[11] = {
SamplingBar::SamplingBar(QWidget *parent) :
QToolBar("Sampling Bar", parent),
_device_selector(this),
+ _configure_button(this),
_record_length_selector(this),
_sample_rate_list(this),
_run_stop_button(this)
{
- connect(&_run_stop_button, SIGNAL(clicked()), this, SIGNAL(run_stop()));
+ connect(&_run_stop_button, SIGNAL(clicked()),
+ this, SIGNAL(run_stop()));
connect(&_device_selector, SIGNAL(currentIndexChanged (int)),
this, SLOT(on_device_selected()));
+ connect(&_configure_button, SIGNAL(clicked()),
+ this, SLOT(configure()));
_sample_rate_value.setDecimals(0);
_sample_rate_value.setSuffix("Hz");
set_sampling(false);
+ _configure_button.setIcon(QIcon::fromTheme("configure"));
+
addWidget(&_device_selector);
+ addWidget(&_configure_button);
addWidget(&_record_length_selector);
_sample_rate_list_action = addWidget(&_sample_rate_list);
_sample_rate_value_action = addWidget(&_sample_rate_value);
update_sample_rate_selector();
}
+void SamplingBar::configure()
+{
+ sr_dev_inst *const sdi = get_selected_device();
+ assert(sdi);
+
+ pv::dialogs::HwCap dlg(this, sdi);
+ dlg.exec();
+}
+
} // namespace pv
private slots:
void on_device_selected();
+ void configure();
private:
QComboBox _device_selector;
+ QToolButton _configure_button;
QComboBox _record_length_selector;