#include "sql_record_plugin.h"

#include "sql_record_widget.h"

#include <QtCore/QtPlugin>


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


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

	// Add extension registrations, etc. here

	m_initialized = true;
}


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


QWidget * SQLRecordPlugin::createWidget(QWidget * parent) {
	return new SQLRecordWidget(parent);
}


QString SQLRecordPlugin::name() const {
	return QLatin1String("SQLRecordWidget");
}


QString SQLRecordPlugin::group() const {
	return QLatin1String("Editor Widgets");
}


QIcon SQLRecordPlugin::icon() const {
	return QIcon(":/icons/widgets/sql-table.png");
}


QString SQLRecordPlugin::toolTip() const {
	return QLatin1String("");
}


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


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


QString SQLRecordPlugin::domXml() const {
	return QLatin1String("<widget class=\"SQLRecordWidget\" name=\"recordSQL\">\n</widget>\n");
}


QString SQLRecordPlugin::includeFile() const {
	return QLatin1String("sql_record_widget.h");
}
