#include "imageviewplugin.h"

#include "image_view.h"

#include <QtCore/QtPlugin>


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


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

	// Add extension registrations, etc. here

	m_initialized = true;
}


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


QWidget * ImageViewPlugin::createWidget(QWidget * parent) {
	return new ImageView(parent);
}


QString ImageViewPlugin::name() const {
	return QLatin1String("ImageView");
}


QString ImageViewPlugin::group() const {
	return QLatin1String("Display Widgets");
}


QIcon ImageViewPlugin::icon() const {
	return QIcon(":/icons/widgets/image-view.png");
}


QString ImageViewPlugin::toolTip() const {
	return QLatin1String("Image viewer");
}


QString ImageViewPlugin::whatsThis() const {
	return QLatin1String("Image viewer");
}


bool ImageViewPlugin::isContainer() const {
	return true;
}


QString ImageViewPlugin::domXml() const {
	return QLatin1String("<widget class=\"ImageView\" name=\"imageView\">\n</widget>\n");
}


QString ImageViewPlugin::includeFile() const {
	return QLatin1String("image_view.h");
}
