pluginsDialog.h 1.01 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1 2
#ifndef _PLUGINSDIALOG_H_
#define _PLUGINSDIALOG_H_
3

Pierre Kraemer's avatar
Pierre Kraemer committed
4
#include "ui_pluginsDialog.h"
5 6 7

#include "types.h"

Pierre Kraemer's avatar
Pierre Kraemer committed
8 9 10 11 12 13 14 15
namespace CGoGN
{

namespace SCHNApps
{

class Window;

Pierre Kraemer's avatar
Pierre Kraemer committed
16 17 18 19 20 21 22 23 24 25 26 27 28
struct PluginInfo
{
	PluginInfo(const QString& path, const QString& name) :
		pluginPath(path),
		pluginName(name)
	{}

	PluginInfo() {}

	QString pluginPath;
	QString pluginName;
};

Pierre Kraemer's avatar
Pierre Kraemer committed
29
class PluginsDialog : public QDialog, public Ui::PluginsDialog
Pierre Kraemer's avatar
Pierre Kraemer committed
30
{
31
	Q_OBJECT
Pierre Kraemer's avatar
Pierre Kraemer committed
32

33
public:
Pierre Kraemer's avatar
Pierre Kraemer committed
34 35
	PluginsDialog(Window* window);
	~PluginsDialog();
36 37

protected:
38
	Window* m_window;
Pierre Kraemer's avatar
Pierre Kraemer committed
39
	QHash<QTreeWidgetItem*, PluginInfo> m_listedPlugins;
40

Pierre Kraemer's avatar
Pierre Kraemer committed
41
//	bool restoreState();
42

43 44
	void addPluginsDirectory(const QString& dir);

45 46 47
private:
	bool init;

Pierre Kraemer's avatar
Pierre Kraemer committed
48 49 50 51 52 53
	enum EntryType
	{
		DIR = 1,
		FILE,
		FILE_DIR
	};
54 55 56 57

protected slots:
	void cb_addPlugins();
	void cb_removePlugins();
Pierre Kraemer's avatar
Pierre Kraemer committed
58
	void cb_addPluginsDirectory();
59

Pierre Kraemer's avatar
Pierre Kraemer committed
60
	void cb_togglePlugin(QTreeWidgetItem* item, int column);
61

Pierre Kraemer's avatar
Pierre Kraemer committed
62
//	void customContextMenu(const QPoint & pos);
63

Pierre Kraemer's avatar
Pierre Kraemer committed
64
//	void cb_acceptDialog();
Pierre Kraemer's avatar
Pierre Kraemer committed
65

66
//	void showPluginInfo();
67 68
};

Pierre Kraemer's avatar
Pierre Kraemer committed
69 70 71 72
} // namespace SCHNApps

} // namespace CGoGN

73
#endif