00001
00002
00003
00004
00005 #include "../pieDisplay.h"
00006 #include "piePlugin.h"
00007
00008 #include <QtPlugin>
00009
00010 piePlugin::piePlugin(QObject *parent)
00011 : QObject(parent)
00012 {
00013 initialized = false;
00014 }
00015
00016 void piePlugin::initialize(QDesignerFormEditorInterface * )
00017 {
00018 if (initialized)
00019 return;
00020
00021 initialized = true;
00022 }
00023
00024 bool piePlugin::isInitialized() const
00025 {
00026 return initialized;
00027 }
00028
00029 QWidget *piePlugin::createWidget(QWidget *parent)
00030 {
00031 return new pieDisplay(parent);
00032 }
00033
00034 QString piePlugin::name() const
00035 {
00036 return "pieDisplay";
00037 }
00038
00039 QString piePlugin::group() const
00040 {
00041 return "Display Widgets";
00042 }
00043
00044 QIcon piePlugin::icon() const
00045 {
00046 return QIcon();
00047 }
00048
00049 QString piePlugin::toolTip() const
00050 {
00051 return "";
00052 }
00053
00054 QString piePlugin::whatsThis() const
00055 {
00056 return "";
00057 }
00058
00059 bool piePlugin::isContainer() const
00060 {
00061 return false;
00062 }
00063
00064 QString piePlugin::domXml() const
00065 {
00066 return "<widget class=\"pieDisplay\" name=\"pieDisplay\">\n"
00067 " <property name=\"geometry\">\n"
00068 " <rect>\n"
00069 " <x>0</x>\n"
00070 " <y>0</y>\n"
00071 " <width>100</width>\n"
00072 " <height>100</height>\n"
00073 " </rect>\n"
00074 " </property>\n"
00075 " <property name=\"toolTip\" >\n"
00076 " <string>The current time</string>\n"
00077 " </property>\n"
00078 " <property name=\"whatsThis\" >\n"
00079 " <string>This widget is an implementation of the 'pie' display' "
00080 "used to indicate obstacles without any knowledge of distance.</string>\n"
00081 " </property>\n"
00082 "</widget>\n";
00083 }
00084
00085 QString piePlugin::includeFile() const
00086 {
00087 return "pieDisplay.h";
00088 }
00089
00090 Q_EXPORT_PLUGIN2(customwidgetplugin, piePlugin)