#include <QGridLayout>
#include <QLabel>
-#include "channels.h"
+#include "channels.hpp"
-#include <pv/prop/binding/deviceoptions.h>
-#include <pv/sigsession.h>
-#include <pv/view/signal.h>
+#include <pv/binding/device.hpp>
+#include <pv/devices/device.hpp>
+#include <pv/session.hpp>
+#include <pv/view/signal.hpp>
-#include <libsigrok/libsigrok.hpp>
+#include <libsigrokcxx/libsigrokcxx.hpp>
using namespace Qt;
using std::mutex;
using std::set;
using std::shared_ptr;
+using std::unordered_set;
using std::vector;
using sigrok::Channel;
namespace pv {
namespace popups {
-Channels::Channels(SigSession &session, QWidget *parent) :
+Channels::Channels(Session &session, QWidget *parent) :
Popup(parent),
session_(session),
updating_channels_(false),
// Create the layout
setLayout(&layout_);
- shared_ptr<sigrok::Device> device = session_.device();
+ const shared_ptr<sigrok::Device> device = session_.device()->device();
assert(device);
// Collect a set of signals
map<shared_ptr<Channel>, shared_ptr<Signal> > signal_map;
shared_lock<shared_mutex> lock(session_.signals_mutex());
- const vector< shared_ptr<Signal> > &sigs(session_.signals());
+ const unordered_set< shared_ptr<Signal> > &sigs(session_.signals());
for (const shared_ptr<Signal> &sig : sigs)
signal_map[sig->channel()] = sig;
void Channels::populate_group(shared_ptr<ChannelGroup> group,
const vector< shared_ptr<pv::view::Signal> > sigs)
{
- using pv::prop::binding::DeviceOptions;
+ using pv::binding::Device;
// Only bind options if this is a group. We don't do it for general
// options, because these properties are shown in the device config
// popup.
- shared_ptr<DeviceOptions> binding;
+ shared_ptr<Device> binding;
if (group)
- binding = shared_ptr<DeviceOptions>(new DeviceOptions(group));
+ binding = shared_ptr<Device>(new Device(group));
// Create a title if the group is going to have any content
if ((!sigs.empty() || (binding && !binding->properties().empty())) &&