system.h 3.59 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
#ifndef _SYSTEM_H_
#define _SYSTEM_H_

#include <QWidget>
#include <QSplashScreen>

#include <unistd.h>
#include <stdarg.h>
#include <iostream>

#include "types.h"

13 14
//#include "ui_questionSessionDialog.h"
//#include "ui_infoDialog.h"
15 16 17 18 19 20 21

class Window;
class SplitArea;

namespace System
{

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
//namespace Dialog
//{
//
//class QuestionSessionDialog : public QDialog, public Ui::QSDialog
//{
//	Q_OBJECT
//
//public:
//	QuestionSessionDialog(QWidget *parent = 0) : QDialog(parent)
//	{
//		this->setupUi(this);
//	}
//};


//class InfoDialog : public QDialog, public Ui::InfoDialog
//{
//	Q_OBJECT
//
//public:
//	InfoDialog(QWidget *parent = 0) : QDialog(parent)
//	{
//		this->setupUi(this);
//	}
//
//	bool setContent(QUrl urlHTMLFile);
//};
//
//} // namespace Dialog
51 52 53 54 55 56 57 58

class Error
{
public:
	virtual ~Error() = 0;

	typedef enum
	{
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
		SUCCESS,
		NO_SCENE,
		SCENE_EXISTS,
		SCENE_DOES_NOT_EXIST,
		VIEW_EXISTS,
		VIEW_DOES_NOT_EXIST,
		CAMERA_EXISTS,
		CAMERA_DOES_NOT_EXIST,
		NO_DOCK,
		NO_PLUGIN_PATH_FILE,
		ERROR_OPEN_PLUGIN_FILE,
		BAD_PLUGIN_PATH_FILE,
		BAD_PLUGIN_PATH_IN_FILE,
		NO_PLUGIN_IN_DIR,
		PLUGIN_EXISTS,
		PLUGIN_DOES_NOT_EXIST,
		ERROR_PLUGIN_LOAD,
		BAD_LINK_PLUGIN_WINDOW,
		UNSATSIFIED_PLUGIN_DEPENDENCIE,
		BAD_ACTION_MENU_PATH,
		MAP_UNREFERENCED,
		MAP_EXISTS,
		MAP_DOES_NOT_EXIST,
		SHADER_EXISTS,
		SHADER_NOT_FOUND,
		VBO_EXISTS,
		VBO_DOES_NOT_EXIST,
		VBO_NOT_FOUND,
		TOPO3RENDER_EXISTS,
		TOPO3RENDER_NOT_FOUND,
		OPEN_FILE_ERROR,
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
		BAD_XML_FILE
	} ERROR_CODE;

	static QString parameter;

	static ERROR_CODE code;

	static ERROR_CODE BAD_PLUGIN_PATH_IN_FILE_f(QString file);
	static ERROR_CODE NO_PLUGIN_IN_DIR_f(QString dir);
	static ERROR_CODE PLUGIN_EXISTS_f(QString plugin);
	static ERROR_CODE ERROR_PLUGIN_LOAD_f(QString plugin);
	static ERROR_CODE BAD_LINK_PLUGIN_WINDOW_f(QString plugin);
	static ERROR_CODE UNSATSIFIED_PLUGIN_DEPENDENCIE_f(QString dependencie, QString from = QString());
	static ERROR_CODE BAD_ACTION_MENU_PATH_f(QString actionPath);
	static ERROR_CODE MAP_UNREFERENCED_f(QString map_name);
	static ERROR_CODE MAP_EXISTS_f(QString map_name);
	static ERROR_CODE SHADER_EXISTS_f(QString shader_name, QString glv_name = QString());
	static ERROR_CODE SHADER_NOT_FOUND_f(QString shader_name, QString glv_name = QString());
	static ERROR_CODE VBO_EXISTS_f(QString vbo_name, QString glv_name = QString());
	static ERROR_CODE VBO_NOT_FOUND_f(QString vbo_name, QString glv_name = QString());
	static ERROR_CODE TOPO3RENDER_EXISTS_f(QString name, QString glv_name = QString());
	static ERROR_CODE TOPO3RENDER_NOT_FOUND_f(QString name, QString glv_name = QString());
	static ERROR_CODE OPEN_FILE_ERROR_f(QString filepath);
	static ERROR_CODE BAD_XML_FILE_f(QString filepath);

	static void showError(QWidget *parent = 0);
};

class Events
{
public:
	virtual ~Events() = 0;

	static bool movieDialogOpened;
};

126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
//class Info
//{
//public:
//	virtual ~Info() = 0;
//
//	static void showPluginInfo(QString pluginAbsolutePath, QWidget *parent = 0);
//	static void showPluginInfo(QString locationPath, QString pluginName, QWidget *parent = 0);
//};

//class StateHandler
//{
//public:
//	virtual ~StateHandler() = 0;
//
//	static bool saveState(Window *window, PluginHash *pluginHash, SceneHash *sceneHash, SplitArea *splitArea);
//	static bool loadState(Window *window, PluginHash *pluginHash, SceneHash *sceneHash, SplitArea *splitArea);
//	static void unsaveState();
//	static bool savePluginsInfo(Window *window, PluginHash *pluginHash, QStringList paths);
//};
145

146 147 148 149 150
//typedef enum
//{
//	GLVIEWER_IN_DOCK,
//	SIMPLE_GLVIEWER
//} QGLV_CREATE_SETTINGS;
151 152 153 154 155

extern QString app_path;

extern QSplashScreen *splash;

Pierre Kraemer's avatar
Pierre Kraemer committed
156
} // namespace System
157 158

#endif