https://github.com/ialhashim/topo-blend
Revision 39b13612ebd645a65eda854771b517371f2f858a authored by ennetws on 13 March 2015, 18:17:18 UTC, committed by ennetws on 13 March 2015, 18:17:18 UTC
1 parent c702819
Raw File
Tip revision: 39b13612ebd645a65eda854771b517371f2f858a authored by ennetws on 13 March 2015, 18:17:18 UTC
Create README.md
Tip revision: 39b1361
BlendPathRenderer.h
#pragma once

#include <qglviewer/camera.h>
Q_DECLARE_METATYPE(qglviewer::Camera*)

#include <QObject>
#include <QGLWidget>
#include <QGraphicsItem>

// Forward declare
class Blender; class BlendRenderItem;
namespace Structure { struct Graph; }

class BlendPathRenderer : public QGLWidget
{
    Q_OBJECT
public:
    explicit BlendPathRenderer(Blender * blender, int itemHeight, bool isViewer = false, QWidget *parent = 0);
    
	friend class BlendPathSubButton;
	friend class Blender;

	QImage quickRender( Structure::Graph* graph, QColor color );

protected:
	void initializeGL(); 
	void paintGL();
	
	void mouseMoveEvent(QMouseEvent *event);
	void mousePressEvent(QMouseEvent *event);

private:
	Blender * blender;
	Structure::Graph * activeGraph;
	BlendRenderItem * genItem( Structure::Graph* newGraph, int pathID, int blendIDX );

	bool isViewerMode;

signals:
    void itemReady(QGraphicsItem *);

public slots:
    void generateItem(Structure::Graph*, int pathID, int blendIDX);
};
back to top