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