#include "graphic.h"
#include "graphicplugin.h"
#include <QtCore/QtPlugin>


GraphicPlugin::GraphicPlugin(QObject * parent): QObject(parent) {
	m_initialized = false;
}


void GraphicPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
	if (m_initialized)
		return;

	// Add extension registrations, etc. here

	m_initialized = true;
}


bool GraphicPlugin::isInitialized() const {
	return m_initialized;
}


QWidget * GraphicPlugin::createWidget(QWidget * parent) {
	return new Graphic(parent);
}


QString GraphicPlugin::name() const {
	return QLatin1String("Graphic");
}


QString GraphicPlugin::group() const {
	return QLatin1String("Display Widgets");
}


QIcon GraphicPlugin::icon() const {
	return QIcon(":/icons/graphic.png");
}


QString GraphicPlugin::toolTip() const {
	return QLatin1String("");//QLatin1String("Widget for display any math graphics with grid and navigation");
}


QString GraphicPlugin::whatsThis() const {
	return QLatin1String("");
}


bool GraphicPlugin::isContainer() const {
	return false;
}


QString GraphicPlugin::domXml() const {
	return QLatin1String("<widget class=\"Graphic\" name=\"graphic\">\n</widget>\n");
}


QString GraphicPlugin::includeFile() const {
	return QLatin1String("graphic.h");
}

