]> git.cworth.org Git - apitrace/blob - gui/vertexdatainterpreter.h
Add code to interpret and display binary vertex data.
[apitrace] / gui / vertexdatainterpreter.h
1 #ifndef VERTEXDATAINTERPRETER_H
2 #define VERTEXDATAINTERPRETER_H
3
4 #include <QObject>
5
6 class QListWidget;
7
8 class VertexDataInterpreter : public QObject
9 {
10     Q_OBJECT
11 public:
12     VertexDataInterpreter(QObject *parent=0);
13
14     QByteArray data() const;
15
16     int type() const;
17     int stride() const;
18     int components() const;
19
20     void setListWidget(QListWidget *listWidget);
21
22 public slots:
23     void interpretData();
24
25     void setData(const QByteArray &data);
26     void setTypeFromString(const QString &str);
27     void setStride(int stride);
28     void setComponents(int num);
29     void setType(int type);
30
31 private:
32     QListWidget *m_listWidget;
33     QByteArray m_data;
34     int m_type;
35     int m_stride;
36     int m_components;
37 };
38
39 #endif