projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug #235. Add shortcut keys for View/Zoom In (Ctrl++) and View/Zoom Out (Ctrl+-)
[pulseview.git]
/
pv
/
data
/
decode
/
annotation.cpp
diff --git
a/pv/data/decode/annotation.cpp
b/pv/data/decode/annotation.cpp
index 6a30921e71deec541a7e8e929bcdf13e8ead1fa4..4a6890b5a4e519a5aac786d408d97953985a4836 100644
(file)
--- a/
pv/data/decode/annotation.cpp
+++ b/
pv/data/decode/annotation.cpp
@@
-22,9
+22,9
@@
extern "C" {
#include <libsigrokdecode/libsigrokdecode.h>
}
#include <libsigrokdecode/libsigrokdecode.h>
}
-#include
"annotation.h"
+#include
<vector>
-using namespace std;
+#include "annotation.h"
namespace pv {
namespace data {
namespace pv {
namespace data {
@@
-40,10
+40,11
@@
Annotation::Annotation(const srd_proto_data *const pdata) :
assert(pda);
_format = pda->ann_format;
assert(pda);
_format = pda->ann_format;
+ _row = 0;
const char *const *annotations = (char**)pda->ann_text;
while(*annotations) {
const char *const *annotations = (char**)pda->ann_text;
while(*annotations) {
- _annotations.push_back(QString(*annotations));
+ _annotations.push_back(QString
::fromUtf8
(*annotations));
annotations++;
}
}
annotations++;
}
}
@@
-63,11
+64,31
@@
int Annotation::format() const
return _format;
}
return _format;
}
+int Annotation::row() const
+{
+ return _row;
+}
+
+int Annotation::pd_index() const
+{
+ return _pd_index;
+}
+
const std::vector<QString>& Annotation::annotations() const
{
return _annotations;
}
const std::vector<QString>& Annotation::annotations() const
{
return _annotations;
}
+void Annotation::set_row(int row)
+{
+ _row = row;
+}
+
+void Annotation::set_pd_index(int pd_index)
+{
+ _pd_index = pd_index;
+}
+
} // namespace decode
} // namespace data
} // namespace pv
} // namespace decode
} // namespace data
} // namespace pv