projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use <cmath> in favor of <math.h> everywhere.
[pulseview.git]
/
pv
/
view
/
signal.cpp
diff --git
a/pv/view/signal.cpp
b/pv/view/signal.cpp
index 916801c97eceb17c67ec8c54c423065b0f73ab42..7348d25b2d44bea1d974d05bda84d181102dfdbf 100644
(file)
--- a/
pv/view/signal.cpp
+++ b/
pv/view/signal.cpp
@@
-21,7
+21,7
@@
#include <extdef.h>
#include <assert.h>
#include <extdef.h>
#include <assert.h>
-#include <
math.
h>
+#include <
cmat
h>
#include <QApplication>
#include <QFormLayout>
#include <QApplication>
#include <QFormLayout>
@@
-31,8
+31,8
@@
#include <libsigrok/libsigrok.hpp>
#include <libsigrok/libsigrok.hpp>
-#include "signal.h"
-#include "view.h"
+#include "signal.h
pp
"
+#include "view.h
pp
"
using std::shared_ptr;
using std::shared_ptr;
@@
-47,8
+47,8
@@
const char *const ChannelNames[] = {
"IN",
"OUT",
"RST",
"IN",
"OUT",
"RST",
- "T
x
",
- "R
x
",
+ "T
X
",
+ "R
X
",
"EN",
"SCLK",
"MOSI",
"EN",
"SCLK",
"MOSI",
@@
-58,9
+58,9
@@
const char *const ChannelNames[] = {
"SCL"
};
"SCL"
};
-Signal::Signal(pv::S
igS
ession &session,
+Signal::Signal(pv::Session &session,
std::shared_ptr<sigrok::Channel> channel) :
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),
session_(session),
channel_(channel),
name_widget_(NULL),
@@
-75,6
+75,10
@@
void Signal::set_name(QString name)
updating_name_widget_ = true;
name_widget_->setEditText(name);
updating_name_widget_ = false;
updating_name_widget_ = true;
name_widget_->setEditText(name);
updating_name_widget_ = false;
+
+ // Store the channel name in sigrok::Channel so that it
+ // will end up in the .sr file upon save.
+ channel_->set_name(name.toUtf8().constData());
}
bool Signal::enabled() const
}
bool Signal::enabled() const