#include "colorbuttonplugin.h"

#include "colorbutton.h"

#include <QtCore/QtPlugin>


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


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

	// Add extension registrations, etc. here

	m_initialized = true;
}


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


QWidget * ColorButtonPlugin::createWidget(QWidget * parent) {
	return new ColorButton(parent);
}


QString ColorButtonPlugin::name() const {
	return QLatin1String("ColorButton");
}


QString ColorButtonPlugin::group() const {
	return QLatin1String("Buttons");
}


QIcon ColorButtonPlugin::icon() const {
	return QIcon(":/icons/widgets/colorbutton.png");
}


QString ColorButtonPlugin::toolTip() const {
	return QLatin1String("Color Button");
}


QString ColorButtonPlugin::whatsThis() const {
	return QLatin1String("Color Button");
}


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


QString ColorButtonPlugin::domXml() const {
	return QLatin1String("<widget class=\"ColorButton\" name=\"colorButton\">\n</widget>\n");
}


QString ColorButtonPlugin::includeFile() const {
	return QLatin1String("colorbutton.h");
}
