projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pv::prop::String: Do not create a widget if the initial value could not be retrieved
[pulseview.git]
/
pv
/
view
/
logicsignal.cpp
diff --git
a/pv/view/logicsignal.cpp
b/pv/view/logicsignal.cpp
index a9484817eb839da2e98f76b3985d8debce174951..65ecae53724be4394418472ac84dd9c0f7fe567f 100644
(file)
--- a/
pv/view/logicsignal.cpp
+++ b/
pv/view/logicsignal.cpp
@@
-22,6
+22,9
@@
#include <math.h>
#include <math.h>
+#include <QFormLayout>
+#include <QToolBar>
+
#include "logicsignal.h"
#include "view.h"
#include "logicsignal.h"
#include "view.h"
@@
-30,8
+33,12
@@
#include "pv/data/logicsnapshot.h"
#include "pv/view/view.h"
#include "pv/data/logicsnapshot.h"
#include "pv/view/view.h"
-using namespace boost;
-using namespace std;
+using boost::shared_ptr;
+using std::deque;
+using std::max;
+using std::min;
+using std::pair;
+using std::vector;
namespace pv {
namespace view {
namespace pv {
namespace view {
@@
-73,7
+80,12
@@
LogicSignal::~LogicSignal()
{
}
{
}
-boost::shared_ptr<pv::data::Logic> LogicSignal::data() const
+shared_ptr<pv::data::SignalData> LogicSignal::data() const
+{
+ return _data;
+}
+
+shared_ptr<pv::data::Logic> LogicSignal::logic_data() const
{
return _data;
}
{
return _data;
}
@@
-118,7
+130,7
@@
void LogicSignal::paint_mid(QPainter &p, int left, int right)
const shared_ptr<pv::data::LogicSnapshot> &snapshot =
snapshots.front();
const shared_ptr<pv::data::LogicSnapshot> &snapshot =
snapshots.front();
- double samplerate = _data->
get_
samplerate();
+ double samplerate = _data->samplerate();
// Show sample rate as 1Hz when it is unknown
if (samplerate == 0.0)
// Show sample rate as 1Hz when it is unknown
if (samplerate == 0.0)
@@
-155,7
+167,7
@@
void LogicSignal::paint_mid(QPainter &p, int left, int right)
delete[] edge_lines;
// Paint the caps
delete[] edge_lines;
// Paint the caps
- const unsigned int max_cap_line_count =
(edges.size() - 1
);
+ const unsigned int max_cap_line_count =
edges.size(
);
QLineF *const cap_lines = new QLineF[max_cap_line_count];
p.setPen(HighColour);
QLineF *const cap_lines = new QLineF[max_cap_line_count];
p.setPen(HighColour);
@@
-235,8
+247,8
@@
void LogicSignal::populate_popup_form(QWidget *parent, QFormLayout *form)
// Add the trigger actions
const sr_dev_inst *const sdi = _session.get_device();
// Add the trigger actions
const sr_dev_inst *const sdi = _session.get_device();
- if (sr_config_list(sdi->driver, SR_CONF_TRIGGER_TYPE,
- &gvar
, sdi
) == SR_OK)
+ if (sr_config_list(sdi->driver,
sdi, NULL,
SR_CONF_TRIGGER_TYPE,
+ &gvar) == SR_OK)
{
const char *const trig_types =
g_variant_get_string(gvar, NULL);
{
const char *const trig_types =
g_variant_get_string(gvar, NULL);