00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "TGo4QtDesignerPlugin.h"
00017
00018 #include "QGo4Widget.h"
00019 #include "QGo4LineEdit.h"
00020 #include "QGo4Table.h"
00021 #include "QGo4BrowserListView.h"
00022
00023 #include "QFitWidget.h"
00024 #include "QFitNamedWidget.h"
00025 #include "QFitModelWidget.h"
00026 #include "QGo4CommandsHistory.h"
00027
00028 static const char *go4logo2[] = {
00029
00030 " 38 37 35 1",
00031
00032 ". c #ffffff",
00033 "# c #006600",
00034 "a c #009900",
00035 "b c #3333cc",
00036 "c c #339933",
00037 "d c #33cc33",
00038 "e c #6666cc",
00039 "f c #66cc66",
00040 "g c #66ff33",
00041 "h c #9999cc",
00042 "i c #99cc99",
00043 "j c #99cccc",
00044 "k c #99ff66",
00045 "l c #99ff99",
00046 "m c #cc0000",
00047 "n c #cc3333",
00048 "o c #cc6666",
00049 "p c #cc9900",
00050 "q c #cc9966",
00051 "r c #cc9999",
00052 "s c #cccccc",
00053 "t c #ccccff",
00054 "u c #ccff33",
00055 "v c #ccff66",
00056 "w c #ccff99",
00057 "x c #ccffcc",
00058 "y c #ff9999",
00059 "z c #ffcc00",
00060 "A c #ffcc66",
00061 "B c #ffcc99",
00062 "C c #ffcccc",
00063 "D c #ffccff",
00064 "E c #ffff99",
00065 "F c #ffffcc",
00066 "G c #ffffff",
00067
00068 "......................................",
00069 "......................................",
00070 "......................................",
00071 "..........................ymmmmmy.....",
00072 "..........zzzzzzF........mmmmmmmmm....",
00073 "........FzzzzzzzzB......mmmnC.Commo...",
00074 ".......GzzzF..Fzzz.....Cmmr.....rmm...",
00075 ".......zzz......zzE....mmm.......mm...",
00076 "......FzzG......zzz...Gmm........mm...",
00077 "......zzz.......zzz...rmm........mm...",
00078 "......zzF.......zzz...mmm.......Cmm...",
00079 "......zz........zzExglmmm.......mmm...",
00080 "......zz.......Fzzvgggpmm......CmmC...",
00081 "......zzB......zzzgggggmmm....Cmmm....",
00082 "......AzzF....Azzugk...qmmmmmmmmm.....",
00083 ".......zzzzzzzzzzgg.....Cmmmmmmm......",
00084 "........zzzzzzzAggG.......CnmnC.......",
00085 ".........GBzzE.ggg....................",
00086 "...............ggx.wgggggg............",
00087 "...............gg.kggggggk............",
00088 "...............gg..G...ggjbbbbbh......",
00089 "........aaaaa#xggx....gggbbbbbbbb.....",
00090 "......s########dggggggggbbeG.Ghbbh....",
00091 ".....Gaaas..saaagggggggbbs.....hbb....",
00092 ".....aaa......aaixggwGbbb.......bb....",
00093 "....xaaG......###....Dbb........bb....",
00094 "....###.......###....hbb........bb....",
00095 "....##x.......###....bbb.......tbb....",
00096 "....aa........aai....bbb.......bbb....",
00097 "....aa.......GaaG....tbb......tbbt....",
00098 "....aai......###......bbb....Gbbb.....",
00099 "....faas....c##D......tbbbbbbbbb......",
00100 ".....aa##aaaaai........tbbbbbbb.......",
00101 "......aaaaaaai...........tebet........",
00102 ".......xiaai..........................",
00103 "......................................",
00104 "......................................"
00105 };
00106
00107 TGo4QtDesignerPlugin::TGo4QtDesignerPlugin()
00108 {
00109 }
00110
00111 QStringList TGo4QtDesignerPlugin::keys() const
00112 {
00113 QStringList list;
00114 list << "QGo4Widget";
00115 list << "QGo4LineEdit";
00116 list << "QGo4Table";
00117 list << "QGo4BrowserListView";
00118
00119 list << "QFitWidget";
00120 list << "QFitNamedWidget";
00121 list << "QFitModelWidget";
00122 list << "QGo4CommandsHistory";
00123 return list;
00124 }
00125
00126 QWidget* TGo4QtDesignerPlugin::create( const QString &classname, QWidget* parent, const char* name)
00127 {
00128 if ( classname == "QGo4Widget" )
00129 return new QGo4Widget( parent, name );
00130 if (classname == "QGo4LineEdit")
00131 return new QGo4LineEdit(parent, name);
00132 if (classname == "QGo4Table")
00133 return new QGo4Table(parent, name);
00134 if (classname == "QGo4BrowserListView")
00135 return new QGo4BrowserListView(parent, name);
00136
00137
00138 if (classname == "QFitWidget")
00139 return new QFitWidget(parent, name);
00140 if (classname == "QFitNamedWidget")
00141 return new QFitNamedWidget(parent, name);
00142 if (classname == "QFitModelWidget")
00143 return new QFitModelWidget(parent, name);
00144 if (classname == "QGo4CommandsHistory")
00145 return new QGo4CommandsHistory(parent, name);
00146 return 0;
00147 }
00148
00149 QString TGo4QtDesignerPlugin::group(const QString& classname) const
00150 {
00151 return "Go4 widgets";
00152 if ( classname == "QGo4Widget" )
00153 return "Containers";
00154 if ( classname == "QGo4LineEdit" )
00155 return "Input";
00156 if (classname == "QGo4BrowserListView")
00157 return "Views";
00158 if (classname == "QGo4RootCanvas")
00159 return "Views";
00160 if ( classname == "QFitWidget" )
00161 return "Containers";
00162 if ( classname == "QFitNamedWidget" )
00163 return "Containers";
00164 if ( classname == "QFitModelWidget" )
00165 return "Containers";
00166 if ( classname == "QGo4CommandsHistory" )
00167 return "Input";
00168
00169 return QString::null;
00170 }
00171
00172 QIconSet TGo4QtDesignerPlugin::iconSet( const QString& ) const
00173 {
00174
00175
00176 return QIconSet(QPixmap(go4logo2));
00177 }
00178
00179 QString TGo4QtDesignerPlugin::includeFile(const QString& classname) const
00180 {
00181 if ( classname == "QGo4Widget" )
00182 return "QGo4Widget.h";
00183 if ( classname == "QGo4LineEdit" )
00184 return "QGo4LineEdit.h";
00185 if ( classname == "QGo4Table" )
00186 return "QGo4Table.h";
00187 if (classname == "QGo4BrowserListView")
00188 return "QGo4BrowserListView.h";
00189 if (classname == "QGo4RootCanvas")
00190 return "QGo4RootCanvas.h";
00191 if (classname == "QFitWidget")
00192 return "QFitWidget.h";
00193 if (classname == "QFitNamedWidget")
00194 return "QFitNamedWidget.h";
00195 if (classname == "QFitModelWidget")
00196 return "QFitModelWidget.h";
00197 if (classname == "QGo4CommandsHistory")
00198 return "QGo4CommandsHistory.h";
00199 return QString::null;
00200 }
00201
00202 QString TGo4QtDesignerPlugin::toolTip(const QString& classname) const
00203 {
00204 if ( classname == "QGo4Widget" )
00205 return "Go4 Editor Widget";
00206 if ( classname == "QGo4LineEdit" )
00207 return "Go4 QLineEdit";
00208 if ( classname == "QGo4Table" )
00209 return "Go4 QTable";
00210 if (classname == "QGo4BrowserListView")
00211 return "Go4browser list view";
00212 if (classname == "QGo4RootCanvas")
00213 return "Go4 QtROOT canvas";
00214 if (classname == "QFitWidget")
00215 return "Basic widget in Go4 Fit gui";
00216 if (classname == "QFitNamedWidget")
00217 return "Widget for named items in Go4 Fit gui";
00218 if (classname == "QFitModelWidget")
00219 return "Widget for model items in Go4 Fit gui";
00220 if (classname == "QGo4CommandsHistory")
00221 return "Command line combo box with history";
00222 return QString::null;
00223 }
00224
00225 QString TGo4QtDesignerPlugin::whatsThis(const QString& classname) const
00226 {
00227 if ( classname == "QGo4Widget" )
00228 return "Basic widget to communicate with Go4 GUI enviroment";
00229 if ( classname == "QGo4LineEdit" )
00230 return "Standard QLineEdit with additional drag & drop capabilities";
00231 if ( classname == "QGo4Table" )
00232 return "Standard QTable with modified sorting behaviour";
00233 if (classname == "QGo4BrowserListView")
00234 return "List view, used in browser to handle start drag event of its items";
00235 if (classname == "QGo4RootCanvas")
00236 return "Go4 extension of standard QtROOT canvas";
00237 if (classname == "QFitWidget")
00238 return "Fit Widget, connected with items in expert mode";
00239 if (classname == "QFitNamedWidget")
00240 return "Widget, connected with named items in expert mode";
00241 if (classname == "QFitModelWidget")
00242 return "Widget, connected with model items in expert mode";
00243 if (classname == "QGo4CommandsHistory")
00244 return "ComboBox with command line functionality: enter key will execute command, history of commands is available";
00245 return QString::null;
00246 }
00247
00248 bool TGo4QtDesignerPlugin::isContainer(const QString& classname) const
00249 {
00250 if ( classname == "QGo4Widget" )
00251 return TRUE;
00252 if ( classname == "QGo4LineEdit" )
00253 return FALSE;
00254 if ( classname == "QGo4Table" )
00255 return FALSE;
00256 if (classname == "QGo4BrowserListView")
00257 return FALSE;
00258 if (classname == "QGo4RootCanvas")
00259 return FALSE;
00260 if (classname == "QFitWidget")
00261 return TRUE;
00262 if (classname == "QFitNamedWidget")
00263 return TRUE;
00264 if (classname == "QFitModelWidget")
00265 return TRUE;
00266 if ( classname == "QGo4CommandsHistory" )
00267 return FALSE;
00268 return FALSE;
00269 }
00270
00271 Q_EXPORT_PLUGIN( TGo4QtDesignerPlugin )
00272
00273