00001 // $Id: QGo4CommandsHistoryPlugin.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 "QGo4CommandsHistory.h" 00015 #include "QGo4CommandsHistoryPlugin.h" 00016 #include <QtPlugin> 00017 00018 00019 QGo4CommandsHistoryPlugin::QGo4CommandsHistoryPlugin(QObject *parent) 00020 : QObject(parent) 00021 { 00022 initialized = false; 00023 } 00024 00025 void QGo4CommandsHistoryPlugin::initialize(QDesignerFormEditorInterface * /* core */) 00026 { 00027 if (initialized) 00028 return; 00029 00030 initialized = true; 00031 } 00032 00033 bool QGo4CommandsHistoryPlugin::isInitialized() const 00034 { 00035 return initialized; 00036 } 00037 00038 QWidget *QGo4CommandsHistoryPlugin::createWidget(QWidget *parent) 00039 { 00040 return new QGo4CommandsHistory(parent); 00041 } 00042 00043 QString QGo4CommandsHistoryPlugin::name() const 00044 { 00045 return "QGo4CommandsHistory"; 00046 } 00047 00048 QString QGo4CommandsHistoryPlugin::group() const 00049 { 00050 return "Go4 Custom Widgets"; 00051 } 00052 00053 QIcon QGo4CommandsHistoryPlugin::icon() const 00054 { 00055 return QIcon(":/go4logo2.png"); 00056 } 00057 00058 QString QGo4CommandsHistoryPlugin::toolTip() const 00059 { 00060 return "Command line combo box with history"; 00061 } 00062 00063 QString QGo4CommandsHistoryPlugin::whatsThis() const 00064 { 00065 return "ComboBox with command line functionality: enter key will execute command, history of commands is available";; 00066 } 00067 00068 bool QGo4CommandsHistoryPlugin::isContainer() const 00069 { 00070 return false; 00071 } 00072 00073 QString QGo4CommandsHistoryPlugin::domXml() const 00074 { 00075 return "<widget class=\"QGo4CommandsHistory\" name=\"QGo4CommandsHistory\">\n" 00076 " <property name=\"geometry\">\n" 00077 " <rect>\n" 00078 " <x>0</x>\n" 00079 " <y>0</y>\n" 00080 " <width>100</width>\n" 00081 " <height>100</height>\n" 00082 " </rect>\n" 00083 " </property>\n" 00084 "</widget>\n"; 00085 } 00086 00087 QString QGo4CommandsHistoryPlugin::includeFile() const 00088 { 00089 return "QGo4CommandsHistory.h"; 00090 } 00091 00092