#include "sql_table_plugin.h"

#include "sql_table_widget.h"

#include <QtCore/QtPlugin>


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


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

	// Add extension registrations, etc. here

	m_initialized = true;
}


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


QWidget * SQLTablePlugin::createWidget(QWidget * parent) {
	return new SQLTableWidget(parent);
}


QString SQLTablePlugin::name() const {
	return QLatin1String("SQLTableWidget");
}


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


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


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


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


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


QString SQLTablePlugin::domXml() const {
	return QLatin1String("<widget class=\"SQLTableWidget\" name=\"tableSQL\">\n</widget>\n");
}


QString SQLTablePlugin::includeFile() const {
	return QLatin1String("sql_table_widget.h");
}
