00001 #include "glexampleplugin.h" 00002 00003 BBoB_Channel* GlExamplePlugin::ChannelPointer(const QString mod, const QString input) const 00004 { 00005 if (Modules.contains(mod)) 00006 if (Modules[mod]->Channels.contains(input)) 00007 return Modules[mod]->Channels[input]; 00008 00009 return 0; 00010 } 00011 00012 00013 void GlExamplePlugin::saveChannels() 00014 { 00015 // Save module connections 00016 QList<QString> mod = Modules.keys(); 00017 for (int i = 0; i < mod.size(); ++i) 00018 Modules[mod.at(i)]->saveChannels(bcore->settings); 00019 } 00020 00021 QMap<QString, QString> GlExamplePlugin::ModuleParams(const QString name) const 00022 { 00023 QMap<QString, QString> map; 00024 00025 if (Modules.contains(name)) 00026 map = Modules[name]->Params; 00027 00028 return map; 00029 } 00030 00031 QMap<QString, QString> GlExamplePlugin::ModuleInputs(const QString name) const 00032 { 00033 QMap<QString, QString> list; 00034 00035 foreach(BBoB_Channel* chan, Modules[name]->Channels) 00036 if (chan->dir & Channel_Dir_In) 00037 list[chan->name] = chan->getMimetype(); 00038 00039 return list; 00040 00041 } 00042 00043 QMap<QString, QString> GlExamplePlugin::ModuleOutputs(const QString name) const 00044 { 00045 QMap<QString, QString> list; 00046 00047 foreach(BBoB_Channel* chan, Modules[name]->Channels) 00048 if (chan->dir & Channel_Dir_Out) 00049 list[chan->name] = chan->getMimetype(); 00050 00051 return list; 00052 } 00053 00054 QStringList GlExamplePlugin::ModuleList() const 00055 { 00056 return Modules.keys(); 00057 } 00058 00059 BBoB_Module* GlExamplePlugin::ModulePointer(const QString mod) const 00060 { 00061 if (Modules.contains(mod)) 00062 return Modules.value(mod); 00063 00064 return 0; 00065 } 00066 00067