00001 // $Id: QGo4WidgetPlugin.cpp 478 2009-10-29 12:26:09Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #include "QGo4Widget.h" 00015 #include "QGo4WidgetPlugin.h" 00016 00017 #include <QtPlugin> 00018 00019 00020 00021 QGo4WidgetPlugin::QGo4WidgetPlugin(QObject *parent) 00022 : QObject(parent) 00023 { 00024 initialized = false; 00025 } 00026 00027 void QGo4WidgetPlugin::initialize(QDesignerFormEditorInterface * /* core */) 00028 { 00029 if (initialized) 00030 return; 00031 00032 initialized = true; 00033 } 00034 00035 bool QGo4WidgetPlugin::isInitialized() const 00036 { 00037 return initialized; 00038 } 00039 00040 QWidget *QGo4WidgetPlugin::createWidget(QWidget *parent) 00041 { 00042 return new QGo4Widget(parent); 00043 } 00044 00045 QString QGo4WidgetPlugin::name() const 00046 { 00047 return "QGo4Widget"; 00048 } 00049 00050 QString QGo4WidgetPlugin::group() const 00051 { 00052 return "Go4 Custom Widgets"; 00053 } 00054 00055 QIcon QGo4WidgetPlugin::icon() const 00056 { 00057 return QIcon(":/go4logo2.png"); 00058 } 00059 00060 QString QGo4WidgetPlugin::toolTip() const 00061 { 00062 return "Go4 Editor Widget"; 00063 } 00064 00065 QString QGo4WidgetPlugin::whatsThis() const 00066 { 00067 return "Basic widget to communicate with Go4 GUI enviroment"; 00068 } 00069 00070 bool QGo4WidgetPlugin::isContainer() const 00071 { 00072 return true; 00073 } 00074 00075 QString QGo4WidgetPlugin::domXml() const 00076 { 00077 return "<widget class=\"QGo4Widget\" name=\"Go4Widget\">\n" 00078 " <property name=\"geometry\">\n" 00079 " <rect>\n" 00080 " <x>0</x>\n" 00081 " <y>0</y>\n" 00082 " <width>100</width>\n" 00083 " <height>100</height>\n" 00084 " </rect>\n" 00085 " </property>\n" 00086 "</widget>\n"; 00087 } 00088 00089 QString QGo4WidgetPlugin::includeFile() const 00090 { 00091 return "QGo4Widget.h"; 00092 } 00093 00094 00095