namespace pv {
-class SigSession;
+class Session;
namespace data {
class DecoderStack;
static const QColor OutlineColours[16];
public:
- DecodeTrace(pv::SigSession &session,
+ DecodeTrace(pv::Session &session,
std::shared_ptr<pv::data::DecoderStack> decoder_stack,
int index);
/**
* Paints the background layer of the trace with a QPainter
* @param p the QPainter to paint into.
- * @param left the x-coordinate of the left edge of the signal.
- * @param right the x-coordinate of the right edge of the signal.
+ * @param pp the painting parameters object to paint with..
**/
- void paint_back(QPainter &p, int left, int right);
+ void paint_back(QPainter &p, const RowItemPaintParams &pp);
/**
* Paints the mid-layer of the trace with a QPainter
* @param p the QPainter to paint into.
- * @param left the x-coordinate of the left edge of the signal
- * @param right the x-coordinate of the right edge of the signal
+ * @param pp the painting parameters object to paint with.
**/
- void paint_mid(QPainter &p, int left, int right);
+ void paint_mid(QPainter &p, const RowItemPaintParams &pp);
/**
* Paints the foreground layer of the trace with a QPainter
* @param p the QPainter to paint into.
- * @param left the x-coordinate of the left edge of the signal
- * @param right the x-coordinate of the right edge of the signal
+ * @param pp the painting parameters object to paint with.
**/
- void paint_fore(QPainter &p, int left, int right);
+ void paint_fore(QPainter &p, const RowItemPaintParams &pp);
void populate_popup_form(QWidget *parent, QFormLayout *form);
private:
void draw_annotation(const pv::data::decode::Annotation &a, QPainter &p,
- QColor text_colour, int text_height, int left, int right, int y,
+ QColor text_colour, int text_height, const RowItemPaintParams &pp, int y,
size_t base_colour) const;
void draw_instant(const pv::data::decode::Annotation &a, QPainter &p,
double end, int y) const;
void draw_error(QPainter &p, const QString &message,
- int left, int right);
+ const RowItemPaintParams &pp);
void draw_unresolved_period(QPainter &p, int h, int left,
int right) const;
void on_show_hide_decoder(int index);
private:
- pv::SigSession &session_;
+ pv::Session &session_;
std::shared_ptr<pv::data::DecoderStack> decoder_stack_;
uint64_t decode_start_, decode_end_;