cameraSceneDialog.h 1019 Bytes
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef _SEPARATECAMERADIALOG_H_
#define _SEPARATECAMERADIALOG_H_


#include "ui_cameraSceneDialog.h"

#include <QTreeWidget>
#include <QVariant>

class Scene;
class View;

namespace Qt{
	extern int UserRoleType;
}

namespace myTreeWidget{
	enum type {view, camera};
}

class MyTreeWidget : public QTreeWidget{
	Q_OBJECT
public:
	MyTreeWidget(Scene* originalScene, QWidget* parent=0);
protected:
	virtual bool dropMimeData(QTreeWidgetItem *parent, int index, const QMimeData *data, Qt::DropAction action);
	QStringList mimeTypes() const;
	Qt::DropActions supportedDropActions () const;
	QMimeData* mimeData(const QList<QTreeWidgetItem *> items) const;

	Scene* m_scene;
};

class CameraSceneDialog : public QDialog, Ui::CSDialog{
	Q_OBJECT
public:
	CameraSceneDialog(Scene* scene, QWidget* parent=0);
	~CameraSceneDialog(){}

	MyTreeWidget* treeWidget;
	Scene* m_scene;

protected slots:
	void newDuplicatedView();
	void removeView();
	void currentItemChanged(QTreeWidgetItem* cur, QTreeWidgetItem* prev);

};


#endif