26 #include <libsigrokdecode/libsigrokdecode.h> 61 return QString(
"%1: %2")
67 return QString::fromUtf8(
srd_row_->desc);
75 return QString::fromUtf8(
srd_row_->desc);
83 vector<AnnotationClass*> result;
93 for (GSList *l =
srd_row_->ann_classes; l; l = l->next) {
94 size_t class_id = (size_t)l->data;
123 const int h = (base_color.toHsv().hue() + 20 *
index_) % 360;
135 const int h = (ann_color.toHsv().hue() + 55 * ann_class->id) % 360;
138 ann_color.setHsl(h, s, v);
155 }
catch (std::out_of_range &
e) {
157 <<
"(" << ann_class_id <<
")" <<
"not assigned to any annotation row!";
158 return QColor(20, 20, 20);
166 }
catch (std::out_of_range &
e) {
167 return QColor(20, 20, 20);
175 }
catch (std::out_of_range &
e) {
176 return QColor(20, 20, 20);
void set_visible(bool visible)
AnnotationClass * get_ann_class_by_id(size_t id)
bool operator<(const Row &other) const
map< uint32_t, QColor > ann_dark_class_color_
const srd_decoder_annotation_row * srd_row_
bool has_hidden_classes() const
const QColor get_bright_class_color(uint32_t ann_class_id) const
const char * name() const
map< uint32_t, QColor > ann_bright_class_color_
#define DECODE_COLOR_VALUE
const QColor color() const
const srd_decoder_annotation_row * get_srd_row() const
bool operator==(const Row &other) const
const QString description() const
const Decoder * decoder() const
#define DECODE_COLOR_SATURATION
map< uint32_t, QColor > ann_class_color_
const QString title() const
void visibility_changed()
vector< AnnotationClass * > ann_classes() const
const QColor get_dark_class_color(uint32_t ann_class_id) const
const QColor get_class_color(uint32_t ann_class_id) const
void set_base_color(QColor base_color)
bool class_is_visible(uint32_t ann_class_id) const
vector< const AnnotationClass * > ann_classes() const