]> sigrok.org Git - pulseview.git/blobdiff - pv/view/signal.cpp
Added devices::File as a common base of file devices
[pulseview.git] / pv / view / signal.cpp
index ecf74f08c0fc8528c94b099de5e280902891f2b6..bbabcc1b7709d62818a280d76c5f5ee887f95e4f 100644 (file)
@@ -21,7 +21,7 @@
 #include <extdef.h>
 
 #include <assert.h>
-#include <math.h>
+#include <cmath>
 
 #include <QApplication>
 #include <QFormLayout>
@@ -29,7 +29,7 @@
 #include <QLineEdit>
 #include <QMenu>
 
-#include <libsigrok/libsigrok.hpp>
+#include <libsigrokcxx/libsigrokcxx.hpp>
 
 #include "signal.hpp"
 #include "view.hpp"
@@ -47,8 +47,8 @@ const char *const ChannelNames[] = {
        "IN",
        "OUT",
        "RST",
-       "Tx",
-       "Rx",
+       "TX",
+       "RX",
        "EN",
        "SCLK",
        "MOSI",
@@ -60,7 +60,7 @@ const char *const ChannelNames[] = {
 
 Signal::Signal(pv::Session &session,
        std::shared_ptr<sigrok::Channel> channel) :
-       Trace(channel->name().c_str()),
+       Trace(QString::fromUtf8(channel->name().c_str())),
        session_(session),
        channel_(channel),
        name_widget_(NULL),
@@ -78,7 +78,7 @@ void Signal::set_name(QString name)
 
        // Store the channel name in sigrok::Channel so that it
        // will end up in the .sr file upon save.
-       channel_->set_name(name.toStdString());
+       channel_->set_name(name.toUtf8().constData());
 }
 
 bool Signal::enabled() const