]> git.cworth.org Git - apitrace/blobdiff - gui/vertexdatainterpreter.h
Add code to interpret and display binary vertex data.
[apitrace] / gui / vertexdatainterpreter.h
diff --git a/gui/vertexdatainterpreter.h b/gui/vertexdatainterpreter.h
new file mode 100644 (file)
index 0000000..8492593
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef VERTEXDATAINTERPRETER_H
+#define VERTEXDATAINTERPRETER_H
+
+#include <QObject>
+
+class QListWidget;
+
+class VertexDataInterpreter : public QObject
+{
+    Q_OBJECT
+public:
+    VertexDataInterpreter(QObject *parent=0);
+
+    QByteArray data() const;
+
+    int type() const;
+    int stride() const;
+    int components() const;
+
+    void setListWidget(QListWidget *listWidget);
+
+public slots:
+    void interpretData();
+
+    void setData(const QByteArray &data);
+    void setTypeFromString(const QString &str);
+    void setStride(int stride);
+    void setComponents(int num);
+    void setType(int type);
+
+private:
+    QListWidget *m_listWidget;
+    QByteArray m_data;
+    int m_type;
+    int m_stride;
+    int m_components;
+};
+
+#endif