#include "stackedwidget.h"
#include "plugin_stackedwidget.h"

#include <QtCore/QtPlugin>
#include <QDesignerFormEditorInterface>
#include <QDesignerPropertyEditorInterface>


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

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

	// Add extension registrations, etc. here

	m_initialized = true;
}

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

QWidget * SHSStackedWidgetPlugin::createWidget(QWidget * parent) {
	return new SHSStackedWidget(parent);
}

QString SHSStackedWidgetPlugin::name() const {
	return QLatin1String("SHSStackedWidget");
}

QString SHSStackedWidgetPlugin::group() const {
	return QLatin1String("SHS Widgets");
}

QIcon SHSStackedWidgetPlugin::icon() const {
	return QIcon(":/icons/stackedwidget.png");
}

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

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

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

QString SHSStackedWidgetPlugin::domXml() const {
	return QLatin1String(
		"<widget class=\"SHSStackedWidget\" name=\"stackedWidget\">"
		" <widget class=\"QWidget\" name=\"page\">"
		" </widget>"
		" <widget class=\"QWidget\" name=\"page_2\">"
		" </widget>"
		"</widget>");
}

QString SHSStackedWidgetPlugin::includeFile() const {
	return QLatin1String("stackedwidget.h");
}

