#include "scrollarea.h"
#include "plugin_scrollarea.h"

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


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

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

	// Add extension registrations, etc. here

	m_initialized = true;
}

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

QWidget * SHSScrollAreaPlugin::createWidget(QWidget * parent) {
	return new SHSScrollArea(parent);
}

QString SHSScrollAreaPlugin::name() const {
	return QLatin1String("SHSScrollArea");
}

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

QIcon SHSScrollAreaPlugin::icon() const {
	return QIcon(":/icons/scrollarea.png");
}

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

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

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

QString SHSScrollAreaPlugin::domXml() const {
	return QLatin1String(
		"<widget class=\"SHSScrollArea\" name=\"scrollArea\">"
		"  <property name=\"widgetResizable\">"
		"    <bool>true</bool>"
		"  </property>"
		"  <widget class=\"QWidget\" name=\"scrollAreaWidgetContents\">"
		"  </widget>"
		"</widget>");
}

QString SHSScrollAreaPlugin::includeFile() const {
	return QLatin1String("scrollarea.h");
}

