X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=pv%2Fdata%2Fdecode%2Frow.hpp;h=000bdf9e6b935c8ee838367c7a5c8460badfcca9;hb=ae30ff422a495a6b1a4ad2893566628863ea222b;hp=9c81b8715a44c8844047e3e4bb3631bcfc37ffd5;hpb=4c60462b00cc329e61daedd1c2e66724077bd412;p=pulseview.git
diff --git a/pv/data/decode/row.hpp b/pv/data/decode/row.hpp
index 9c81b871..000bdf9e 100644
--- a/pv/data/decode/row.hpp
+++ b/pv/data/decode/row.hpp
@@ -14,8 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see .
*/
#ifndef PULSEVIEW_PV_DATA_DECODE_ROW_HPP
@@ -23,7 +22,10 @@
#include
-#include "annotation.hpp"
+#include
+
+#include
+#include
struct srd_decoder;
struct srd_decoder_annotation_row;
@@ -32,28 +34,56 @@ namespace pv {
namespace data {
namespace decode {
+#define DECODE_COLOR_SATURATION (180) /* 0-255 */
+#define DECODE_COLOR_VALUE (170) /* 0-255 */
+
+struct AnnotationClass;
+class Decoder;
+
class Row
{
public:
Row();
- Row(const srd_decoder *decoder,
- const srd_decoder_annotation_row *row = nullptr);
+ Row(uint32_t index, Decoder* decoder,
+ const srd_decoder_annotation_row* srd_row = nullptr);
- const srd_decoder* decoder() const;
- const srd_decoder_annotation_row* row() const;
+ const Decoder* decoder() const;
+ const srd_decoder_annotation_row* get_srd_row() const;
const QString title() const;
+ const QString description() const;
+ vector ann_classes() const;
+ uint32_t index() const;
+
+ bool visible() const;
+ void set_visible(bool visible);
- bool operator<(const Row &other) const;
+ void set_base_color(QColor base_color);
+ const QColor color() const;
+ const QColor get_class_color(uint32_t ann_class_id) const;
+ const QColor get_bright_class_color(uint32_t ann_class_id) const;
+ const QColor get_dark_class_color(uint32_t ann_class_id) const;
+
+ bool has_hidden_classes() const;
+
+ bool operator<(const Row& other) const;
+ bool operator==(const Row& other) const;
private:
- const srd_decoder *decoder_;
- const srd_decoder_annotation_row *row_;
+ uint32_t index_;
+ Decoder* decoder_;
+ const srd_decoder_annotation_row* srd_row_;
+ bool visible_;
+
+ QColor color_;
+ map ann_class_color_;
+ map ann_bright_class_color_;
+ map ann_dark_class_color_;
};
-} // decode
-} // data
-} // pv
+} // namespace decode
+} // namespace data
+} // namespace pv
#endif // PULSEVIEW_PV_DATA_DECODE_ROW_HPP