tcasplugin/tcasDispPlugin.cpp

00001 /****************************************************************************
00002         tcasDisplay widget plugin for QT Designer
00003     ****************************************************************************/
00004 
00005 #include "../tcasdisplay.h"
00006 #include "tcasDispPlugin.h"
00007 
00008 #include <QtPlugin>
00009 
00010  tcasDispPlugin::tcasDispPlugin(QObject *parent)
00011         : QObject(parent)
00012 {
00013         initialized = false;
00014 }
00015 
00016 void tcasDispPlugin::initialize(QDesignerFormEditorInterface * /* core */)
00017 {
00018         if (initialized)
00019             return;
00020 
00021         initialized = true;
00022 }
00023 
00024 bool tcasDispPlugin::isInitialized() const
00025     {
00026         return initialized;
00027     }
00028 
00029 QWidget *tcasDispPlugin::createWidget(QWidget *parent)
00030     {
00031         return new tcasDisplay(parent);
00032     }
00033 
00034 QString tcasDispPlugin::name() const
00035     {
00036         return "tcasDisplay";
00037     }
00038 
00039 QString tcasDispPlugin::group() const
00040     {
00041         return "Display Widgets";
00042     }
00043 
00044     QIcon tcasDispPlugin::icon() const
00045     {
00046         return QIcon();
00047     }
00048 
00049     QString tcasDispPlugin::toolTip() const
00050     {
00051         return "";
00052     }
00053 
00054     QString tcasDispPlugin::whatsThis() const
00055     {
00056         return "";
00057     }
00058 
00059     bool tcasDispPlugin::isContainer() const
00060     {
00061         return false;
00062     }
00063 
00064     QString tcasDispPlugin::domXml() const
00065     {
00066         return "<widget class=\"tcasDisplay\" name=\"tcasDisplay\">\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 a simple TCAS "
00080                "display implementation.</string>\n"
00081                " </property>\n"
00082                "</widget>\n";
00083     }
00084 
00085     QString tcasDispPlugin::includeFile() const
00086     {
00087         return "tcasdisplay.h";
00088     }
00089 
00090     Q_EXPORT_PLUGIN2(customwidgetplugin, tcasDispPlugin)

Generated on Thu Aug 17 12:14:56 2006 for VisualODF by  doxygen 1.4.7