65 #if QT_VERSION >= 0x050000
76 #include "OpenFlipper/BasePlugin/TextureInterface.hh"
80 #include "OpenFlipper/BasePlugin/INIInterface.hh"
88 #include <ACG/QtWidgets/QtFileDialog.hh>
89 #include "OpenFlipper/widgets/PluginDialog/PluginDialog.hh"
95 static const int PRELOAD_THREADS_COUNT = (QThread::idealThreadCount() != -1) ? QThread::idealThreadCount() : 8;
97 namespace cmake {
extern const char *static_plugins; };
113 QMutexLocker loadersLock(&loadersMutex_);
114 expectedLoaders_ += count;
124 QMutexLocker loadersLock(&loadersMutex_);
125 loaders_.push_back(loader);
127 pluginAvailable_.wakeOne();
142 QMutexLocker loadersLock(&loadersMutex_);
143 if (loaders_.empty()) {
144 if (expectedLoaders_ > 0) {
145 pluginAvailable_.wait(&loadersMutex_);
155 QPluginLoader *result = loaders_.front();
156 loaders_.pop_front();
161 std::deque<QPluginLoader *> loaders_;
162 QWaitCondition pluginAvailable_;
163 QMutex loadersMutex_;
165 int expectedLoaders_;
183 void addFilename(
const QString &filename) {
184 QMutexLocker filenamesLock(&filenamesMutex_);
185 filenames_.push_back(filename);
202 QMutexLocker filenamesLock(&filenamesMutex_);
203 if (filenames_.empty())
break;
204 fileName = filenames_.front();
205 filenames_.pop_front();
208 QPluginLoader *loader =
new QPluginLoader;
209 loader->setFileName(fileName);
216 std::deque<QString> filenames_;
217 QMutex filenamesMutex_;
231 size_t getTypeOrdinal(
const QString &name)
const {
232 const QString basename = QFileInfo(name).baseName();
233 if (basename.contains(
"Plugin-Type"))
235 else if (basename.contains(
"Plugin-File"))
237 else if (basename.contains(
"TextureControl"))
243 bool operator() (
const QString &a,
const QString &b)
const {
244 const size_t typeA = getTypeOrdinal(a);
245 const size_t typeB = getTypeOrdinal(b);
246 if (typeA != typeB) {
return typeA < typeB; }
250 bool operator() (
const QPluginLoader *a,
const QPluginLoader *b)
const {
251 return operator() (a->fileName(), b->fileName());
259 const QMetaObject* meta = _plugin->metaObject();
260 int id = meta->indexOfSlot( QMetaObject::normalizedSignature( _slotSignature ) );
265 const QMetaObject* meta = _plugin->metaObject();
266 int id = meta->indexOfSignal( QMetaObject::normalizedSignature( _signalSignature ) );
278 QString licenseTexts =
"";
281 QDir tempDir = QDir(OpenFlipper::Options::pluginDir());
288 if ( OpenFlipper::Options::isWindows() )
294 QStringList pluginlist = tempDir.entryList(filter,QDir::Files);
297 for (
int i=0; i < pluginlist.size(); i++) {
298 pluginlist[i] = tempDir.absoluteFilePath(pluginlist[i]);
302 QStringList dontLoadPlugins =
OpenFlipperSettings().
value(
"PluginControl/DontLoadNames", QStringList()).toStringList();
305 for (
int i = 0 ; i < dontLoadPlugins.size(); ++i)
306 emit
log(
LOGOUT,tr(
"dontLoadPlugins Plugin from ini file: %1").arg( dontLoadPlugins[i] ) );
309 QStringList additionalPlugins =
OpenFlipperSettings().
value(
"PluginControl/AdditionalPlugins", QStringList()).toStringList();
312 for (
int i = 0 ; i < additionalPlugins.size(); ++i) {
313 emit
log(
LOGOUT,tr(
"Additional Plugin from file: %1").arg( additionalPlugins[i] ) );
317 pluginlist = additionalPlugins << pluginlist;
319 #if QT_VERSION >= 0x050000
324 QSet<QString> staticPlugins = QSet<QString>::fromList(
325 QString::fromUtf8(cmake::static_plugins).split(
"\n"));
326 for (
int i = 0; i < pluginlist.size(); ) {
327 const QString bn = QFileInfo(pluginlist[i]).fileName();
328 if (staticPlugins.contains(bn)) {
329 emit
log(
LOGOUT, trUtf8(
"Not loading dynamic %1 as it is statically "
330 "linked against OpenFlipper.").arg(bn));
331 pluginlist.removeAt(i);
345 for (
int i = 0 ; i < dontLoadPlugins.size(); ++i )
346 emit
log(
LOGWARN,tr(
"Skipping Plugins :\t %1").arg( dontLoadPlugins[i] ) );
348 emit
log(
LOGOUT,
"================================================================================");
355 std::vector< PreloadThread* > loaderThreads(PRELOAD_THREADS_COUNT);
360 for (std::vector< PreloadThread* >::iterator it = loaderThreads.begin();
361 it != loaderThreads.end(); ++it) {
369 for (
int i = 0 ; i < pluginlist.size() ; ++i) {
370 loaderThreads[i % loaderThreads.size()]->addFilename(pluginlist[i]);
376 for (std::vector< PreloadThread* >::iterator it = loaderThreads.begin();
377 it != loaderThreads.end(); ++it) {
384 std::vector<QPluginLoader*> loadedPlugins;
385 loadedPlugins.reserve(pluginlist.size());
390 loadedPlugins.push_back(loader);
392 if ( OpenFlipper::Options::gui() &&
OpenFlipperSettings().value(
"Core/Gui/splash",
true).toBool() ) {
393 splashMessage_ = tr(
"Loading Plugin %1/%2").arg(loadedPlugins.size()).arg(pluginlist.size()) ;
401 for (std::vector< PreloadThread* >::iterator it = loaderThreads.begin();
402 it != loaderThreads.end(); ++it) {
411 for (std::vector<QPluginLoader*>::iterator it = loadedPlugins.begin();
412 it != loadedPlugins.end(); ++it) {
416 .arg(std::distance(loadedPlugins.begin(), it) + 1)
417 .arg(loadedPlugins.size());
421 if ((*it)->instance() != 0 ) {
422 QString pluginLicenseText =
"";
423 loadPlugin((*it)->fileName(),
true,pluginLicenseText, (*it)->instance());
424 licenseTexts += pluginLicenseText;
426 emit
log(
LOGERR,tr(
"Unable to load Plugin :\t %1").arg( (*it)->fileName() ) );
427 emit
log(
LOGERR,tr(
"Error was : ") + (*it)->errorString() );
428 emit
log(
LOGOUT,
"================================================================================");
433 #if QT_VERSION >= 0x050000
437 QVector<QStaticPlugin> staticPlugins = QPluginLoader::staticPlugins();
438 for (QVector<QStaticPlugin>::iterator it = staticPlugins.begin();
439 it != staticPlugins.end(); ++it) {
440 QObject *instance = it->instance();
443 QString fakeName = QString::fromUtf8(
"<Statically Linked>::/%1.%2")
444 .arg(basePlugin->
name())
445 .arg(OpenFlipper::Options::isWindows() ?
"dll" :
"so");
446 QString pluginLicenseText =
"";
447 loadPlugin(fakeName,
true, pluginLicenseText, instance);
448 licenseTexts += pluginLicenseText;
453 emit
log(
LOGINFO, tr(
"Total time needed to load plugins was %1 ms.").arg(time.elapsed()));
457 if ( licenseTexts !=
"" ) {
458 if ( OpenFlipper::Options::gui() ) {
461 QStringList licenseBlocks = licenseTexts.split(
"==");
464 for ( QStringList::iterator it = licenseBlocks.begin(); it != licenseBlocks.end() ; ++it )
465 if ( ! it->contains(
"PluginName") ) {
466 licenseBlocks.erase(it);
467 it = licenseBlocks.begin();
471 QMap< QString , QString > contacts;
473 for ( QStringList::iterator it = licenseBlocks.begin(); it != licenseBlocks.end() ; ++it ) {
474 QStringList lines = it->split(
"\n");
476 lines = lines.filter (
"Contact mail", Qt::CaseInsensitive );
479 if (lines.size() == 1) {
480 QString mail = lines[0].section(
":",-1).simplified();
481 QString list = contacts.take(mail);
483 contacts.insert(mail,list);
485 emit
log(
LOGWARN,tr(
"Can't extract mail contact from license request"));
490 for ( QMap<QString , QString>::iterator it = contacts.begin() ; it != contacts.end() ; ++it ) {
492 QStringList request = it.value().split(
"\n");
495 for ( QStringList::iterator lit = request.begin(); lit != request.end() ; ++lit ) {
497 if ( lit->contains(
"Message:") ) {
498 *lit = lit->section(
":",-1).simplified();
501 if ( lit->contains(
"Contact mail:") ) {
502 *lit = lit->section(
":",-1).simplified();
509 QTextEdit *edit =
new QTextEdit(&licenseBox);
510 edit->setText(request.join(
"\n"));
512 QLabel* mailLabel =
new QLabel(&licenseBox);
513 mailLabel->setText(tr(
"The text has been copied to your clipboard. Open in Mail program?"));
515 QPushButton* noButton =
new QPushButton(&licenseBox);
516 noButton->setText(tr(
"No"));
517 connect( noButton, SIGNAL(clicked ()), &licenseBox, SLOT(reject()) );
519 QPushButton* yesButton =
new QPushButton(&licenseBox);
520 yesButton->setText(tr(
"Yes"));
521 connect( yesButton, SIGNAL(clicked ()), &licenseBox, SLOT(accept()) );
523 QGridLayout *layout =
new QGridLayout;
524 layout->addWidget(edit,0,0,1,2);
525 layout->addWidget(mailLabel,1,0,1,2);
526 layout->addWidget(noButton,2,0);
527 layout->addWidget(yesButton,2,1);
528 licenseBox.setLayout(layout);
530 licenseBox.resize(500,500);
531 licenseBox.setModal(
true);
532 licenseBox.setWindowTitle(tr(
"Plugin License check failed, issuer is: %1").arg( it.key() ));
533 int userAnswer =licenseBox.exec();
536 QClipboard *cb = QApplication::clipboard();
537 cb->setText(request.join(
"\n"));
539 if ( userAnswer == 1 ) {
540 QString url =
"mailto:" + it.key();
541 url +=
"?subject=License Request&body=";
543 url += request.join(
";;");
545 url += request.join(
"\n");
548 QUrl encodedURL(url, QUrl::TolerantMode);
549 QDesktopServices::openUrl(encodedURL);
556 emit
log(
LOGWARN,tr(
"Plugin License check failed: "));
557 std::cerr << licenseTexts.toStdString() << std::endl;
570 if ( OpenFlipper::Options::nogui() )
578 if ( OpenFlipper::Options::isWindows() )
579 filter =
"Plugins (*.dll)";
581 filter =
"Plugins (*.so)";
586 if (filename.isEmpty())
591 QPluginLoader loader( filename );
592 QObject *plugin = loader.instance();
600 name = basePlugin->
name();
607 QStringList dontLoadPlugins =
OpenFlipperSettings().
value(
"PluginControl/DontLoadNames", QStringList()).toStringList();
608 if (dontLoadPlugins.contains(name)){
609 int ret = QMessageBox::question(0, tr(
"Plugin Loading Prevention"),
610 tr(
"OpenFlipper is currently configured to prevent loading this plugin.\n"
611 "Do you want to enable this plugin permanently?"),
612 QMessageBox::Yes | QMessageBox::No,
614 if (ret == QMessageBox::Yes) {
615 dontLoadPlugins.removeAll(name);
622 QStringList additionalPlugins =
OpenFlipperSettings().
value(
"PluginControl/AdditionalPlugins", QStringList()).toStringList();
623 if (!additionalPlugins.contains(name)){
624 int ret = QMessageBox::question(0, tr(
"Plugin Loading ..."),
625 tr(
"Should OpenFlipper load this plugin on next startup?"),
626 QMessageBox::Yes | QMessageBox::No,
628 if (ret == QMessageBox::Yes) {
629 additionalPlugins << filename;
630 std::cerr <<
"Added: " << filename.toStdString() << std::endl;
635 QString licenseText =
"";
638 if ( licenseText !=
"" ) {
639 if ( OpenFlipper::Options::gui() ) {
640 QMessageBox::warning ( 0, tr(
"Plugin License check failed"), licenseText );
642 std::cerr <<
"OpenURL: " << std::endl;
643 QDesktopServices::openUrl(QUrl(tr(
"mailto:contact@openflipper.com?subject=License Request&body=%1").arg(licenseText), QUrl::TolerantMode));
645 std::cerr <<
"Plugin License check failed" << std::endl;
646 std::cerr << licenseText.toStdString() << std::endl;
655 if ( OpenFlipper::Options::gui() ){
665 connect(dialog, SIGNAL(blockPlugin(
const QString&)),
this, SLOT(
slotBlockPlugin(
const QString&)));
666 connect(dialog, SIGNAL(unBlockPlugin(
const QString&)),
this, SLOT(
slotUnBlockPlugin(
const QString&)));
667 connect(dialog, SIGNAL(
loadPlugin(
const QString& ,
const bool , QString& , QObject* )),
668 this,SLOT(
loadPlugin(
const QString& ,
const bool , QString& , QObject* )));
671 ret = dialog->exec();
680 QStringList dontLoadPlugins =
OpenFlipperSettings().
value(
"PluginControl/DontLoadNames",QStringList()).toStringList();
681 if ( !dontLoadPlugins.contains(_name) ){
682 dontLoadPlugins << _name;
686 for (
size_t i = 0; i <
plugins_.size();++i)
688 plugins_[i].status = PluginInfo::BLOCKED;
693 QStringList dontLoadPlugins =
OpenFlipperSettings().
value(
"PluginControl/DontLoadNames",QStringList()).toStringList();
694 dontLoadPlugins.removeAll(_name);
697 for (
size_t i = 0; i <
plugins_.size();++i)
699 plugins_[i].status = PluginInfo::UNLOADED;
708 void Core::loadPlugin(
const QString& _filename,
const bool _silent, QString& _licenseErrors, QObject* _plugin){
713 if ( OpenFlipper::Options::isWindows() ) {
714 QString dllname = _filename;
715 if ( ! dllname.endsWith(
".dll" ) )
719 if ( OpenFlipper::Options::isLinux() ) {
720 QString soname = _filename;
721 if ( ! soname.endsWith(
".so" ) )
730 if ( _plugin == 0 ) {
731 QPluginLoader loader( _filename );
732 plugin = loader.instance();
735 emit
log(
LOGERR,tr(
"Unable to load Plugin :\t %1").arg( _filename ) );
736 emit
log(
LOGERR,tr(
"Error was : ") + loader.errorString() );
737 emit
log(
LOGOUT,
"================================================================================");
739 emit
log (
LOGOUT,tr(
"Plugin loaded: \t %1").arg(_filename));
747 int alreadyLoadedAt = -1;
748 for (
unsigned int k=0; k <
plugins_.size(); k++)
751 alreadyLoadedAt =
static_cast<int>(k);
753 info.status = PluginInfo::FAILED;
754 info.
path = _filename;
757 emit
log(
LOGOUT,tr(
"Location : \t %1").arg( _filename) );
768 QStringList additionalPlugins =
OpenFlipperSettings().
value(
"PluginControl/AdditionalPlugins", QStringList()).toStringList();
769 info.
buildIn = !additionalPlugins.contains(info.
path);
771 emit
log(
LOGOUT,tr(
"Found Plugin : \t %1").arg(basePlugin->
name()) );
773 if ( OpenFlipper::Options::gui() &&
OpenFlipperSettings().value(
"Core/Gui/splash",
true).toBool() ) {
779 for (
unsigned int k=0; k <
plugins_.size(); k++){
781 QString name_nospace = basePlugin->
name();
782 name_nospace.remove(
" ");
785 if (_silent || OpenFlipper::Options::nogui() ){
787 emit
log(
LOGOUT,
"================================================================================");
792 tr(
"Plugin already loaded"),
793 tr(
"A Plugin with the same name was already loaded from %1.\n"
794 "You can only load the new plugin if you unload the existing one first.\n\n"
795 "Do you want to unload the existing plugin first?").arg(
plugins_[k].path),
796 QMessageBox::Yes|QMessageBox::No, QMessageBox::No);
797 if (ret == QMessageBox::No)
800 emit
log(
LOGOUT,
"================================================================================");
808 QStringList dontLoadPlugins =
OpenFlipperSettings().
value(
"PluginControl/DontLoadNames",QStringList()).toStringList();
810 if ( dontLoadPlugins.contains(basePlugin->
name(), Qt::CaseInsensitive) ) {
811 emit
log(
LOGWARN,tr(
"OpenFlipper.ini prevented Plugin %1 from being loaded! ").arg( basePlugin->
name() ));
812 emit
log(
LOGOUT,
"================================================================================");
813 info.status = PluginInfo::BLOCKED;
819 if ( securePlugin ) {
820 emit
log(
LOGINFO,tr(
"Plugin uses security interface. Trying to authenticate against plugin ..."));
822 bool success =
false;
823 QMetaObject::invokeMethod(plugin,
"authenticate", Q_RETURN_ARG(
bool , success ) ) ;
825 QString message =
"";
826 QMetaObject::invokeMethod(plugin,
"licenseError", Q_RETURN_ARG( QString , message ) ) ;
827 _licenseErrors = message;
830 emit
log(
LOGINFO,tr(
"... ok. Loading plugin "));
832 emit
log(
LOGERR,tr(
"... failed. Plugin access denied."));
833 emit
log(
LOGOUT,
"================================================================================");
843 supported =
"BaseInterface ";
849 info.
version = QString::number(-1);
851 if ( OpenFlipper::Options::nogui() ) {
853 if ( !
checkSlot( plugin ,
"noguiSupported()" ) ) {
854 emit
log(
LOGWARN,tr(
"Running in nogui mode which is unsupported by this plugin, skipping") );
855 emit
log(
LOGOUT,
"================================================================================");
863 if (
checkSignal(plugin,
"updated_objects(int)") ) {
864 log(
LOGERR,tr(
"Plugin Uses old style updated_objects! Convert to updatedObject!"));
865 emit
log(
LOGOUT,
"================================================================================");
870 log(
LOGERR,tr(
"Plugin Uses old style update_view! Convert to updateView!"));
871 emit
log(
LOGOUT,
"================================================================================");
878 if (
checkSignal(plugin,
"blockScenegraphUpdates(bool)") )
881 if (
checkSignal(plugin,
"updatedObject(int)") &&
checkSignal(plugin,
"updatedObject(int,const UpdateType&)") ){
883 log(
LOGERR,tr(
"Plugin uses deprecated and(!) new updatedObject. Only new updatedObject will be active."));
889 log(
LOGWARN,tr(
"Plugin uses deprecated updatedObject."));
890 connect(plugin,SIGNAL(updatedObject(
int)),
this,SLOT(
slotObjectUpdated(
int)), Qt::AutoConnection);
893 if (
checkSignal(plugin,
"updatedObject(int,const UpdateType&)") )
897 if (
checkSlot( plugin ,
"slotObjectUpdated(int)" ) &&
checkSlot( plugin ,
"slotObjectUpdated(int,const UpdateType&)" ) ){
899 log(
LOGERR,tr(
"Plugin uses deprecated and(!) new slotObjectUpdated. Only new slotObjectUpdated will be active."));
904 if (
checkSlot( plugin ,
"slotObjectUpdated(int)" ) ){
905 log(
LOGWARN,tr(
"Plugin uses deprecated slotObjectUpdated."));
909 if (
checkSlot( plugin ,
"slotObjectUpdated(int,const UpdateType&)" ) )
913 if (
checkSignal(plugin,
"objectPropertiesChanged(int)")) {
914 emit
log (
LOGERR,tr(
"Signal objectPropertiesChanged(int) is deprecated. " ));
915 emit
log (
LOGERR,tr(
"The signal will be automatically emitted by the object that has been changed and the core will deliver it to the plugins!. "));
916 emit
log (
LOGERR,tr(
"Please remove this signal from your plugins!. "));
919 if (
checkSlot( plugin ,
"slotViewChanged()" ) )
920 connect(
this,SIGNAL(
pluginViewChanged()),plugin,SLOT(slotViewChanged()), Qt::DirectConnection);
922 if (
checkSlot( plugin ,
"slotSceneDrawn()" ) )
923 connect(
this,SIGNAL(
pluginSceneDrawn()),plugin,SLOT(slotSceneDrawn()), Qt::DirectConnection);
925 if (
checkSlot( plugin ,
"slotDrawModeChanged(int)" ) )
926 connect(
coreWidget_,SIGNAL(drawModeChanged(
int)),plugin,SLOT(slotDrawModeChanged(
int)), Qt::DirectConnection);
928 if (
checkSlot(plugin,
"slotObjectPropertiesChanged(int)"))
932 emit
log (
LOGERR,tr(
"Signal visibilityChanged() now requires objectid or -1 as argument " ));
934 if (
checkSignal(plugin,
"visibilityChanged(int)") ) {
935 emit
log (
LOGERR,tr(
"Signal visibilityChanged(int) is deprecated! " ));
936 emit
log (
LOGERR,tr(
"If an object changes its visibility, it will call the required functions automatically." ));
937 emit
log (
LOGERR,tr(
"If you change a scenegraph node, call nodeVisibilityChanged(int). See docu of this function for details." ));
940 if (
checkSignal(plugin,
"nodeVisibilityChanged(int)") )
941 connect(plugin,SIGNAL(nodeVisibilityChanged(
int)),
this,SLOT(
slotVisibilityChanged(
int)), Qt::DirectConnection);
944 if (
checkSlot(plugin,
"slotVisibilityChanged(int)") )
947 if (
checkSignal(plugin,
"activeObjectChanged()" ) )
948 emit
log (
LOGERR,tr(
"Signal activeObjectChanged() is now objectSelectionChanged( int _objectId ) ") );
950 if (
checkSlot(plugin,
"slotActiveObjectChanged()" ) )
951 emit
log (
LOGERR,tr(
"Slot slotActiveObjectChanged() is now slotObjectSelectionChanged( int _objectId ) ") );
953 if (
checkSlot(plugin,
"slotAllCleared()") )
954 connect(
this,SIGNAL(
allCleared()),plugin,SLOT(slotAllCleared()));
957 if (
checkSignal(plugin,
"objectSelectionChanged(int)") ) {
958 emit
log (
LOGERR,tr(
"Signal objectSelectionChanged(in) is deprecated!") );
959 emit
log (
LOGERR,tr(
"If the selection for an object is changed, the core will emit the required signals itself!") );
962 if (
checkSlot( plugin ,
"slotObjectSelectionChanged(int)" ) )
966 if (
checkSlot( plugin ,
"pluginsInitialized()" ) )
969 if (
checkSignal(plugin,
"setSlotDescription(QString,QString,QStringList,QStringList)") )
976 if (
checkSignal(plugin,
"setRenderer(unsigned int,QString)" ) ) {
977 connect(plugin,SIGNAL(setRenderer(
unsigned int,QString)),
this,SLOT(
slotSetRenderer(
unsigned int,QString)));
980 if (
checkSignal(plugin,
"getCurrentRenderer(unsigned int,QString&)" ) ) {
981 connect(plugin,SIGNAL(getCurrentRenderer(
unsigned int,QString&)),
this,SLOT(
slotGetCurrentRenderer(
unsigned int,QString&)), Qt::DirectConnection);
990 supported = supported +
"Logging ";
996 connect(plugin,SIGNAL(
log(QString )),newlog,SLOT(
slotLog(QString )),Qt::DirectConnection);
999 if ( OpenFlipper::Options::gui() )
1009 if (
checkSlot(plugin,
"logOutput(Logtype,QString)") )
1015 if ( menubarPlugin && OpenFlipper::Options::gui() ) {
1016 supported = supported +
"Menubar ";
1018 if (
checkSignal(plugin,
"addMenubarAction(QAction*,QString)") )
1019 connect(plugin , SIGNAL(addMenubarAction(QAction*,QString)),
1020 coreWidget_ , SLOT(slotAddMenubarAction(QAction*,QString)),Qt::DirectConnection);
1021 if (
checkSignal(plugin,
"addMenubarActions(std::vector<QAction*>, QString)") )
1022 connect(plugin , SIGNAL(addMenubarActions(std::vector<QAction*>,QString)),
1023 coreWidget_ , SLOT(slotAddMenubarActions(std::vector<QAction*>,QString)),Qt::DirectConnection);
1024 if (
checkSignal(plugin,
"getMenubarMenu (QString,QMenu*&,bool)") )
1025 connect(plugin , SIGNAL(getMenubarMenu (QString,QMenu*&,
bool)),
1026 coreWidget_ , SLOT(slotGetMenubarMenu (QString,QMenu*&,
bool)),Qt::DirectConnection);
1031 if ( contextMenuPlugin && OpenFlipper::Options::gui() ) {
1032 supported = supported +
"ContextMenu ";
1034 if (
checkSignal(plugin,
"addContextMenuItem(QAction*,ContextMenuType)") )
1035 connect(plugin , SIGNAL(addContextMenuItem(QAction*,
ContextMenuType)),
1038 if (
checkSignal(plugin,
"addContextMenuItem(QAction*,DataType,ContextMenuType)") )
1043 connect(plugin , SIGNAL(hideContextMenu()),
1044 coreWidget_ , SLOT(slotHideContextMenu()),Qt::DirectConnection);
1046 if (
checkSlot(plugin,
"slotUpdateContextMenu(int)") )
1047 connect(
coreWidget_ , SIGNAL(updateContextMenu(
int)),
1048 plugin , SLOT(slotUpdateContextMenu(
int)),Qt::DirectConnection);
1050 if (
checkSlot(plugin,
"slotUpdateContextMenuNode(int)") )
1051 connect(
coreWidget_ , SIGNAL(updateContextMenuNode(
int)),
1052 plugin , SLOT(slotUpdateContextMenuNode(
int)),Qt::DirectConnection);
1054 if (
checkSlot(plugin,
"slotUpdateContextMenuBackground()") )
1055 connect(
coreWidget_ , SIGNAL(updateContextMenuBackground()),
1056 plugin , SLOT(slotUpdateContextMenuBackground()),Qt::DirectConnection);
1061 if ( toolboxPlugin && OpenFlipper::Options::gui() ) {
1062 supported = supported +
"Toolbox ";
1065 if (
checkSignal(plugin,
"addToolbox(QString,QWidget*)"))
1066 connect(plugin, SIGNAL(
addToolbox(QString,QWidget*) ),
1067 this, SLOT(
addToolbox(QString,QWidget*) ),Qt::DirectConnection );
1069 if (
checkSignal(plugin,
"addToolbox(QString,QWidget*,QIcon*)"))
1070 connect(plugin, SIGNAL(
addToolbox(QString,QWidget*,QIcon*) ),
1071 this, SLOT(
addToolbox(QString,QWidget*,QIcon*) ),Qt::DirectConnection );
1073 if (
checkSignal(plugin,
"addToolbox(QString,QWidget*,QIcon*,QWidget*)"))
1074 connect(plugin, SIGNAL(
addToolbox(QString,QWidget*,QIcon*,QWidget*) ),
1075 this, SLOT(
addToolbox(QString,QWidget*,QIcon*,QWidget*) ),Qt::DirectConnection );
1080 if ( viewModePlugin && OpenFlipper::Options::gui() ) {
1081 supported = supported +
"ViewMode ";
1083 if (
checkSignal(plugin,
"defineViewModeToolboxes(QString,QStringList)"))
1084 connect(plugin, SIGNAL( defineViewModeToolboxes(QString, QStringList) ),
1085 coreWidget_, SLOT( slotAddViewModeToolboxes(QString, QStringList) ),Qt::DirectConnection );
1087 if (
checkSignal(plugin,
"defineViewModeToolbars(QString,QStringList)"))
1088 connect(plugin, SIGNAL( defineViewModeToolbars(QString, QStringList) ),
1089 coreWidget_, SLOT( slotAddViewModeToolbars(QString, QStringList) ),Qt::DirectConnection );
1091 if (
checkSignal(plugin,
"defineViewModeContextMenus(QString,QStringList)"))
1092 connect(plugin, SIGNAL( defineViewModeContextMenus(QString, QStringList) ),
1093 coreWidget_, SLOT( slotAddViewModeContextMenus(QString, QStringList) ),Qt::DirectConnection );
1095 if (
checkSignal(plugin,
"defineViewModeIcon(QString,QString)"))
1096 connect(plugin, SIGNAL( defineViewModeIcon(QString, QString) ),
1097 coreWidget_, SLOT( slotSetViewModeIcon(QString, QString) ),Qt::DirectConnection );
1099 if (
checkSignal(plugin,
"setViewMode(QString,bool)"))
1100 connect(plugin, SIGNAL(
setViewMode(QString,
bool) ),
1106 if ( optionsPlugin && OpenFlipper::Options::gui() ) {
1107 supported = supported +
"Options ";
1109 QWidget* widget = 0;
1113 if (
checkSlot(plugin,
"applyOptions()") )
1121 if ( toolbarPlugin && OpenFlipper::Options::gui() ) {
1122 supported = supported +
"Toolbars ";
1124 if (
checkSignal(plugin,
"addToolbar(QToolBar*)") )
1125 connect(plugin,SIGNAL(addToolbar(QToolBar*)),
1126 coreWidget_,SLOT(slotAddToolbar(QToolBar*)),Qt::DirectConnection);
1128 if (
checkSignal(plugin,
"removeToolbar(QToolBar*)") )
1129 connect(plugin,SIGNAL(removeToolbar(QToolBar*)),
1130 coreWidget_,SLOT(slotRemoveToolbar(QToolBar*)),Qt::DirectConnection);
1132 if (
checkSignal(plugin,
"getToolBar(QString,QToolBar*&)") )
1133 connect(plugin,SIGNAL(getToolBar(QString,QToolBar*&)),
1134 coreWidget_,SLOT(getToolBar(QString,QToolBar*&)),Qt::DirectConnection);
1140 if ( statusbarPlugin && OpenFlipper::Options::gui() ) {
1141 supported = supported +
"StatusBar ";
1143 if (
checkSignal(plugin,
"showStatusMessage(QString,int)") )
1144 connect(plugin,SIGNAL(showStatusMessage(QString,
int)),
1145 coreWidget_,SLOT(statusMessage(QString,
int)),Qt::DirectConnection);
1148 if (
checkSignal(plugin,
"setStatus(ApplicationStatus::applicationStatus)") )
1153 connect(plugin,SIGNAL(clearStatusMessage()),
1156 if (
checkSignal(plugin,
"addWidgetToStatusbar(QWidget*)") )
1157 connect(plugin,SIGNAL(addWidgetToStatusbar(QWidget*)),
coreWidget_,SLOT(addWidgetToStatusbar(QWidget*)));
1162 if ( keyPlugin && OpenFlipper::Options::gui() ) {
1163 supported = supported +
"KeyboardEvents ";
1165 if (
checkSignal(plugin,
"registerKey(int,Qt::KeyboardModifiers,QString,bool)") )
1166 connect(plugin,SIGNAL( registerKey(
int, Qt::KeyboardModifiers, QString,
bool) ),
1167 coreWidget_,SLOT(slotRegisterKey(
int, Qt::KeyboardModifiers, QString,
bool)) );
1172 if ( mousePlugin && OpenFlipper::Options::gui() ) {
1173 supported = supported +
"MouseEvents ";
1175 if (
checkSlot( plugin ,
"slotMouseWheelEvent(QWheelEvent*,const std::string&)" ) )
1176 connect(
this , SIGNAL(
PluginWheelEvent(QWheelEvent * ,
const std::string & )),
1177 plugin , SLOT(slotMouseWheelEvent(QWheelEvent* ,
const std::string & )));
1179 if (
checkSlot( plugin ,
"slotMouseEvent(QMouseEvent*)" ) )
1183 if (
checkSlot( plugin ,
"slotMouseEventLight(QMouseEvent*)" ) )
1191 if ( infoPlugin && OpenFlipper::Options::gui() ) {
1192 supported = supported +
"TypeInformation ";
1195 supportedInfoTypes().insert(std::pair<InformationInterface*,DataType>(infoPlugin,dtype));
1200 if ( pickPlugin && OpenFlipper::Options::gui() ) {
1201 supported = supported +
"Picking ";
1203 if (
checkSlot( plugin ,
"slotPickModeChanged(const std::string&)" ) )
1204 connect(
coreWidget_,SIGNAL(signalPickModeChanged (
const std::string &)),
1205 plugin,SLOT(slotPickModeChanged(
const std::string &)));
1207 if (
checkSignal(plugin,
"addPickMode(const std::string&)") )
1208 connect(plugin,SIGNAL(addPickMode(
const std::string& )),
1209 this,SLOT(
slotAddPickMode(
const std::string& )),Qt::DirectConnection);
1211 if (
checkSignal(plugin,
"addHiddenPickMode(const std::string&)") )
1212 connect(plugin,SIGNAL(addHiddenPickMode(
const std::string& )),
1215 if (
checkSignal(plugin,
"setPickModeCursor(const std::string&,QCursor)") )
1216 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
1217 connect(plugin,SIGNAL(setPickModeCursor(
const std::string& ,QCursor)),
1218 coreWidget_,SLOT(setPickModeCursor(
const std::string& ,QCursor)),Qt::DirectConnection);
1220 if (
checkSignal(plugin,
"setPickModeMouseTracking(const std::string&,bool)") )
1221 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
1222 connect(plugin,SIGNAL(setPickModeMouseTracking(
const std::string& ,
bool)),
1223 coreWidget_,SLOT(setPickModeMouseTracking(
const std::string& ,
bool)),Qt::DirectConnection);
1225 if (
checkSignal(plugin,
"setPickModeToolbar(const std::string&,QToolBar*)") )
1226 connect(plugin,SIGNAL(setPickModeToolbar (
const std::string&, QToolBar*)),
1227 coreWidget_,SLOT(setPickModeToolbar (
const std::string&, QToolBar*)),Qt::DirectConnection);
1229 if (
checkSignal(plugin,
"removePickModeToolbar(const std::string&)") )
1230 connect(plugin,SIGNAL(removePickModeToolbar(
const std::string&)),
1231 coreWidget_,SLOT(removePickModeToolbar(
const std::string&)),Qt::DirectConnection);
1238 supported = supported +
"INIFile ";
1240 if (
checkSlot( plugin ,
"loadIniFile(INIFile&,int)" ) )
1242 plugin , SLOT( loadIniFile(
INIFile&,
int) ),Qt::DirectConnection);
1244 if (
checkSlot( plugin ,
"saveIniFile(INIFile&,int)" ) )
1246 plugin , SLOT( saveIniFile(
INIFile& ,
int ) ),Qt::DirectConnection);
1248 if (
checkSlot( plugin ,
"saveIniFileOptions(INIFile&)" ) )
1250 plugin , SLOT( saveIniFileOptions(
INIFile& ) ),Qt::DirectConnection);
1252 if (
checkSlot( plugin ,
"saveOnExit(INIFile&)" ) )
1256 if (
checkSlot( plugin ,
"loadIniFileOptions(INIFile&)" ) )
1258 plugin , SLOT( loadIniFileOptions(
INIFile& ) ),Qt::DirectConnection);
1260 if (
checkSlot( plugin ,
"loadIniFileOptionsLast(INIFile&)" ) )
1262 plugin , SLOT( loadIniFileOptionsLast(
INIFile& ) ),Qt::DirectConnection);
1267 if ( selectionPlugin && OpenFlipper::Options::gui() ) {
1268 supported = supported +
"SelectionBase ";
1270 if (
checkSignal(plugin,
"addSelectionEnvironment(QString,QString,QIcon,QString&)") )
1271 log(
LOGERR,tr(
"Plugin uses deprecated addSelectionEnvironment(QString,QString,QIcon,QString&) , Replace the qicon by the path to the icon!"));
1273 if (
checkSignal(plugin,
"addSelectionEnvironment(QString,QString,QString,QString&)") )
1279 if (
checkSlot(plugin,
"slotAddSelectionEnvironment(QString,QString,QIcon,QString&)") )
1280 log(
LOGERR,tr(
"Plugin uses deprecated slotAddSelectionEnvironment(QString,QString,QIcon,QString&) , Replace the qicon by the path to the icon!"));
1282 if (
checkSlot( plugin ,
"slotAddSelectionEnvironment(QString,QString,QString,QString&)" ) )
1288 if (
checkSignal(plugin,
"registerType(QString,DataType)") )
1294 if (
checkSlot( plugin ,
"slotRegisterType(QString,DataType)" ) )
1300 if (
checkSignal(plugin,
"addPrimitiveType(QString,QString,QIcon,SelectionInterface::PrimitiveType&)") )
1301 log(
LOGERR,tr(
"Plugin uses deprecated addPrimitiveType(QString,QString,QIcon,SelectionInterface::PrimitiveType&) , Replace the qicon by the path to the icon!"));
1303 if (
checkSignal(plugin,
"addPrimitiveType(QString,QString,QString,SelectionInterface::PrimitiveType&)") )
1304 connect(plugin , SIGNAL(
addPrimitiveType(QString,QString,QString,SelectionInterface::PrimitiveType&)),
1305 this , SLOT(
slotAddPrimitiveType(QString,QString,QString,SelectionInterface::PrimitiveType&)),Qt::DirectConnection);
1309 if (
checkSlot(plugin,
"slotAddPrimitiveType(QString,QString,QIcon,SelectionInterface::PrimitiveType&)") )
1310 log(
LOGERR,tr(
"Plugin uses deprecated slotAddPrimitiveType(QString,QString,QIcon,SelectionInterface::PrimitiveType&) , Replace the qicon by the path to the icon!"));
1312 if (
checkSlot( plugin ,
"slotAddPrimitiveType(QString,QString,QString,SelectionInterface::PrimitiveType&)" ) )
1313 connect(
this , SIGNAL(
addPrimitiveType(QString,QString,QString,SelectionInterface::PrimitiveType&)),
1314 plugin , SLOT(
slotAddPrimitiveType(QString,QString,QString,SelectionInterface::PrimitiveType&)),Qt::DirectConnection);
1318 if (
checkSignal(plugin,
"addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&)") )
1319 log(
LOGERR,tr(
"Plugin uses deprecated addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&) , Replace the qicon by the path to the icon!"));
1321 if (
checkSignal(plugin,
"addCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&)") )
1322 connect(plugin , SIGNAL(
addCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&)),
1323 this , SLOT(
slotAddCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&)),Qt::DirectConnection);
1327 if (
checkSignal(plugin,
"addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType)") )
1328 log(
LOGERR,tr(
"Plugin uses deprecated addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType) , Replace the qicon by the path to the icon!"));
1330 if (
checkSignal(plugin,
"addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType)") )
1336 if (
checkSlot(plugin,
"slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&)") )
1337 log(
LOGERR,tr(
"Plugin uses deprecated slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&) , Replace the qicon by the path to the icon!"));
1339 if (
checkSlot( plugin ,
"slotAddCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&)" ) )
1340 connect(
this , SIGNAL(
addCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&)),
1341 plugin , SLOT(
slotAddCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&)),Qt::DirectConnection);
1345 if (
checkSlot(plugin,
"slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType)") )
1346 log(
LOGERR,tr(
"Plugin uses deprecated slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType) , Replace the qicon by the path to the icon!"));
1348 if (
checkSlot( plugin ,
"slotAddCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&,DataType)" ) )
1355 if (
checkSignal(plugin,
"addSelectionOperations(QString,QStringList,QString,SelectionInterface::PrimitiveType)") )
1356 connect(plugin , SIGNAL(
addSelectionOperations(QString,QStringList,QString,SelectionInterface::PrimitiveType)),
1357 this , SLOT(
slotAddSelectionOperations(QString,QStringList,QString,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1359 if (
checkSlot( plugin ,
"slotAddSelectionOperations(QString,QStringList,QString,SelectionInterface::PrimitiveType)" ) )
1360 connect(
this , SIGNAL(
addSelectionOperations(QString,QStringList,QString,SelectionInterface::PrimitiveType)),
1361 plugin , SLOT(
slotAddSelectionOperations(QString,QStringList,QString,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1363 if (
checkSignal(plugin,
"selectionOperation(QString)") )
1367 if (
checkSlot( plugin ,
"slotSelectionOperation(QString)" ) )
1371 if (
checkSignal(plugin,
"showToggleSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1375 if (
checkSlot( plugin ,
"slotShowToggleSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1379 if (
checkSignal(plugin,
"showLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1383 if (
checkSlot( plugin ,
"slotShowLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1387 if (
checkSignal(plugin,
"showVolumeLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1391 if (
checkSlot( plugin ,
"slotShowVolumeLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1395 if (
checkSignal(plugin,
"showSurfaceLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1399 if (
checkSlot( plugin ,
"slotShowSurfaceLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1403 if (
checkSignal(plugin,
"showSphereSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1407 if (
checkSlot( plugin ,
"slotShowSphereSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1411 if (
checkSignal(plugin,
"showClosestBoundarySelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1415 if (
checkSlot( plugin ,
"slotShowClosestBoundarySelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1419 if (
checkSignal(plugin,
"showFloodFillSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1423 if (
checkSlot( plugin ,
"slotShowFloodFillSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1427 if (
checkSignal(plugin,
"showComponentsSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1431 if (
checkSlot( plugin ,
"slotShowComponentsSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1435 if (
checkSignal(plugin,
"toggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
1436 connect(plugin , SIGNAL(
toggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1437 this , SLOT(
slotToggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1439 if (
checkSlot( plugin ,
"slotToggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1440 connect(
this , SIGNAL(
toggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1441 plugin , SLOT(
slotToggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1443 if (
checkSignal(plugin,
"lassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
1444 connect(plugin , SIGNAL(
lassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1445 this , SLOT(
slotLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1447 if (
checkSlot( plugin ,
"slotLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1448 connect(
this , SIGNAL(
lassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1449 plugin , SLOT(
slotLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1451 if (
checkSignal(plugin,
"volumeLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
1452 connect(plugin , SIGNAL(
volumeLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1455 if (
checkSlot( plugin ,
"slotVolumeLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1456 connect(
this , SIGNAL(
volumeLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1457 plugin , SLOT(
slotVolumeLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1459 if (
checkSignal(plugin,
"surfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
1460 connect(plugin , SIGNAL(
surfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1463 if (
checkSlot( plugin ,
"slotSurfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1467 if (
checkSignal(plugin,
"sphereSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)") )
1468 connect(plugin , SIGNAL(
sphereSelection(QMouseEvent*,
double,SelectionInterface::PrimitiveType,
bool)),
1469 this , SLOT(
slotSphereSelection(QMouseEvent*,
double,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1471 if (
checkSlot( plugin ,
"slotSphereSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)" ) )
1472 connect(
this , SIGNAL(
sphereSelection(QMouseEvent*,
double,SelectionInterface::PrimitiveType,
bool)),
1473 plugin , SLOT(
slotSphereSelection(QMouseEvent*,
double,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1475 if (
checkSignal(plugin,
"closestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
1479 if (
checkSlot( plugin ,
"slotClosestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1483 if (
checkSignal(plugin,
"floodFillSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)") )
1484 connect(plugin , SIGNAL(
floodFillSelection(QMouseEvent*,
double,SelectionInterface::PrimitiveType,
bool)),
1485 this , SLOT(
slotFloodFillSelection(QMouseEvent*,
double,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1487 if (
checkSlot( plugin ,
"slotFloodFillSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)" ) )
1488 connect(
this , SIGNAL(
floodFillSelection(QMouseEvent*,
double,SelectionInterface::PrimitiveType,
bool)),
1489 plugin , SLOT(
slotFloodFillSelection(QMouseEvent*,
double,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1491 if (
checkSignal(plugin,
"componentsSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
1492 connect(plugin , SIGNAL(
componentsSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1493 this , SLOT(
slotComponentsSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1495 if (
checkSlot( plugin ,
"slotComponentsSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1496 connect(
this , SIGNAL(
componentsSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1497 plugin , SLOT(
slotComponentsSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1499 if (
checkSignal(plugin,
"customSelection(QMouseEvent*,SelectionInterface::PrimitiveType,QString,bool)") )
1500 connect(plugin , SIGNAL(
customSelection(QMouseEvent*,SelectionInterface::PrimitiveType,QString,
bool)),
1501 this , SLOT(
slotCustomSelection(QMouseEvent*,SelectionInterface::PrimitiveType,QString,
bool)),Qt::DirectConnection);
1503 if (
checkSlot( plugin ,
"slotCustomSelection(QMouseEvent*,SelectionInterface::PrimitiveType,QString,bool)" ) )
1504 connect(
this , SIGNAL(
customSelection(QMouseEvent*,SelectionInterface::PrimitiveType,QString,
bool)),
1505 plugin , SLOT(
slotCustomSelection(QMouseEvent*,SelectionInterface::PrimitiveType,QString,
bool)),Qt::DirectConnection);
1507 if (
checkSignal(plugin,
"getActiveDataTypes(SelectionInterface::TypeList&)") )
1511 if (
checkSlot( plugin ,
"slotGetActiveDataTypes(SelectionInterface::TypeList&)" ) )
1515 if (
checkSignal(plugin,
"getActivePrimitiveType(SelectionInterface::PrimitiveType&)") )
1519 if (
checkSlot( plugin ,
"slotGetActivePrimitiveType(SelectionInterface::PrimitiveType&)" ) )
1523 if (
checkSignal(plugin,
"targetObjectsOnly(bool&)") )
1527 if (
checkSlot( plugin ,
"slotTargetObjectsOnly(bool&)" ) )
1531 if (
checkSignal(plugin,
"loadSelection(const INIFile&)") )
1535 if (
checkSlot( plugin ,
"slotLoadSelection(const INIFile&)" ) )
1539 if (
checkSignal(plugin,
"saveSelection(INIFile&)") )
1543 if (
checkSlot( plugin ,
"slotSaveSelection(INIFile&)" ) )
1547 if (
checkSignal(plugin,
"registerKeyShortcut(int,Qt::KeyboardModifiers)") )
1551 if (
checkSlot( plugin ,
"slotRegisterKeyShortcut(int,Qt::KeyboardModifiers)" ) )
1555 if (
checkSignal(plugin,
"keyShortcutEvent(int,Qt::KeyboardModifiers)") )
1559 if (
checkSlot( plugin ,
"slotKeyShortcutEvent(int,Qt::KeyboardModifiers)" ) )
1566 if ( texturePlugin && OpenFlipper::Options::gui() ) {
1567 supported = supported +
"Textures ";
1569 if (
checkSignal(plugin,
"addTexture(QString,QString,uint,int)") )
1570 connect(plugin , SIGNAL(
addTexture( QString , QString , uint ,
int )),
1571 this , SLOT(
slotAddTexture(QString, QString, uint,
int)),Qt::DirectConnection);
1573 if (
checkSlot( plugin ,
"slotTextureAdded(QString,QString,uint,int)" ) )
1574 connect(
this , SIGNAL(
addTexture(QString,QString, uint,
int)),
1575 plugin , SLOT(slotTextureAdded(QString,QString, uint,
int)),Qt::DirectConnection);
1577 if (
checkSignal(plugin,
"addTexture(QString,QString,uint)") )
1578 connect(plugin , SIGNAL(
addTexture( QString , QString , uint )),
1579 this , SLOT(
slotAddTexture(QString, QString, uint)),Qt::AutoConnection);
1581 if (
checkSlot( plugin ,
"slotTextureAdded(QString,QString,uint)" ) )
1582 connect(
this , SIGNAL(
addTexture(QString,QString, uint)),
1583 plugin , SLOT(slotTextureAdded(QString,QString, uint)),Qt::DirectConnection);
1585 if (
checkSignal(plugin,
"updateTexture(QString,int)") )
1589 if (
checkSlot( plugin ,
"slotUpdateTexture(QString,int)" ) )
1597 if (
checkSlot( plugin ,
"slotUpdateAllTextures()" ) )
1601 if (
checkSignal(plugin,
"updatedTextures(QString,int)") )
1605 if (
checkSlot( plugin ,
"slotTextureUpdated(QString,int)" ) )
1609 if (
checkSignal(plugin,
"setTextureMode(QString,QString,int)") )
1613 if (
checkSlot( plugin ,
"slotSetTextureMode(QString,QString,int)" ) )
1617 if (
checkSignal(plugin,
"setTextureMode(QString,QString)") )
1621 if (
checkSlot( plugin ,
"slotSetTextureMode(QString,QString)" ) )
1625 if (
checkSignal(plugin,
"switchTexture(QString,int)") )
1629 if (
checkSlot( plugin ,
"slotSwitchTexture(QString,int)" ) )
1633 if (
checkSignal(plugin,
"switchTexture(QString)") )
1637 if (
checkSlot( plugin ,
"slotSwitchTexture(QString)" ) )
1643 if (
checkSignal( plugin ,
"textureChangeImage(QString,QImage&,int)" ) )
1647 if (
checkSlot( plugin ,
"slotTextureChangeImage(QString,QImage&,int)" ) )
1651 if (
checkSignal( plugin ,
"textureChangeImage(QString,QImage&)" ) )
1655 if (
checkSlot( plugin ,
"slotTextureChangeImage(QString,QImage&)" ) )
1659 if (
checkSignal( plugin ,
"addMultiTexture(QString,QString,QString,int,int&)" ) )
1660 connect(plugin , SIGNAL(
addMultiTexture(QString,QString,QString,
int,
int&) ),
1663 if (
checkSlot( plugin ,
"slotMultiTextureAdded( QString,QString,QString,int,int&)" ) )
1664 connect(
this , SIGNAL(
addMultiTexture(QString,QString,QString,
int,
int&) ),
1667 if (
checkSignal( plugin ,
"textureGetImage(QString,QImage&,int)" ) )
1671 if (
checkSlot( plugin ,
"slotTextureGetImage(QString,QImage&,int)" ) )
1675 if (
checkSignal( plugin ,
"textureGetImage(QString,QImage&)" ) )
1679 if (
checkSlot( plugin ,
"slotTextureGetImage(QString,QImage&)" ) )
1683 if (
checkSignal( plugin ,
"textureIndex(QString,int,int&)" ) )
1684 connect(plugin , SIGNAL(
textureIndex(QString,
int,
int&)),
1687 if (
checkSlot( plugin ,
"slotTextureIndex(QString,int,int&)" ) )
1691 if (
checkSignal( plugin ,
"textureIndexPropertyName(int,QString&)" ) )
1695 if (
checkSlot( plugin ,
"slotTextureIndexPropertyName(int,QString&)" ) )
1699 if (
checkSignal( plugin ,
"textureName(int,int,QString&)" ) )
1700 connect(plugin , SIGNAL(
textureName(
int,
int,QString&)),
1703 if (
checkSlot( plugin ,
"slotTextureName(int,int,QString&)" ) )
1704 connect(
this , SIGNAL(
textureName(
int,
int,QString&)),
1705 plugin , SLOT(
slotTextureName(
int,
int,QString&)),Qt::DirectConnection);
1707 if (
checkSignal( plugin ,
"textureFilename(int,QString,QString&)" ) )
1711 if (
checkSlot( plugin ,
"slotTextureFilename(int,QString,QString&)" ) )
1715 if (
checkSignal( plugin ,
"getCurrentTexture(int,QString&)" ) )
1719 if (
checkSlot( plugin ,
"slotGetCurrentTexture(int,QString&)" ) )
1723 if (
checkSignal( plugin ,
"getSubTextures(int,QString,QStringList&)" ) )
1724 connect(plugin , SIGNAL(
getSubTextures(
int,QString,QStringList&)),
1727 if (
checkSlot( plugin ,
"slotGetSubTextures(int,QString,QStringList&)" ) )
1734 if ( backupPlugin ) {
1735 supported = supported +
"Backups ";
1738 if (
checkSignal( plugin ,
"createBackup(int,QString,UpdateType)" ) ) {
1743 if (
checkSlot( plugin ,
"slotCreateBackup(int,QString,UpdateType)" ) ) {
1745 plugin , SLOT( slotCreateBackup(
int,QString,
UpdateType) ),Qt::DirectConnection);
1749 if (
checkSignal( plugin ,
"createBackup(IdList,QString,std::vector<UpdateType>)" ) ) {
1751 this , SIGNAL(
createBackup(
IdList,QString,std::vector<UpdateType>)),Qt::DirectConnection );
1754 if (
checkSlot( plugin ,
"slotCreateBackup(IdList,QString,std::vector<UpdateType>)" ) ) {
1756 plugin , SLOT( slotCreateBackup(
IdList,QString,std::vector<UpdateType>) ),Qt::DirectConnection);
1762 connect(plugin , SIGNAL(
undo(
int)) ,
1763 this , SIGNAL(
undo(
int)),Qt::DirectConnection );
1767 if (
checkSlot( plugin ,
"slotUndo(int)" ) ) {
1768 connect(
this , SIGNAL(
undo(
int)),
1769 plugin , SLOT( slotUndo(
int) ),Qt::DirectConnection);
1774 connect(plugin , SIGNAL(
redo(
int)) ,
1775 this , SIGNAL(
redo(
int)),Qt::DirectConnection );
1779 if (
checkSlot( plugin ,
"slotRedo(int)" ) ) {
1780 connect(
this , SIGNAL(
redo(
int)),
1781 plugin , SLOT( slotRedo(
int) ),Qt::DirectConnection);
1786 connect(plugin , SIGNAL(
undo()) ,
1787 this , SIGNAL(
undo()),Qt::DirectConnection );
1791 if (
checkSlot( plugin ,
"slotUndo()" ) ) {
1792 connect(
this , SIGNAL(
undo()),
1793 plugin , SLOT( slotUndo() ),Qt::DirectConnection);
1798 connect(plugin , SIGNAL(
redo()) ,
1799 this , SIGNAL(
redo()),Qt::DirectConnection );
1803 if (
checkSlot( plugin ,
"slotRedo()" ) ) {
1804 connect(
this , SIGNAL(
redo()),
1805 plugin , SLOT( slotRedo() ),Qt::DirectConnection);
1813 if (
checkSignal( plugin ,
"aboutToRestore(int)" ) ) {
1820 connect(plugin , SIGNAL(
restored(
int)) ,
1821 this , SIGNAL(
restored(
int) ),Qt::DirectConnection);
1829 if (
checkSlot( plugin ,
"slotAboutToRestore(int)" ) ) {
1831 plugin , SLOT( slotAboutToRestore(
int) ),Qt::DirectConnection);
1835 if (
checkSlot( plugin ,
"slotRestored(int)" ) ) {
1836 connect(
this , SIGNAL(
restored(
int)) ,
1837 plugin , SLOT( slotRestored(
int) ),Qt::DirectConnection);
1841 if (
checkSignal( plugin ,
"generateBackup(int,QString,UpdateType)" ) ) {
1842 connect(plugin , SIGNAL(generateBackup(
int,QString,
UpdateType)) ,
1849 if ( LoadSavePlugin ) {
1850 supported = supported +
"Load/Save ";
1851 if (
checkSignal(plugin,
"load( QString,DataType,int& )" ) )
1852 connect(plugin , SIGNAL(load( QString,
DataType,
int& )) ,
1855 connect(plugin , SIGNAL( save(
int,QString) ) ,
1856 this , SLOT(
saveObject(
int,QString) ), Qt::DirectConnection);
1858 if (
checkSlot( plugin ,
"fileOpened(int)" ) )
1860 plugin , SLOT( fileOpened(
int ) ),Qt::DirectConnection);
1862 if (
checkSignal(plugin,
"addEmptyObject(DataType,int&)" ) )
1866 if (
checkSignal(plugin,
"copyObject(int,int&)" ) )
1867 connect(plugin , SIGNAL( copyObject(
int,
int& )) ,
1871 if (
checkSignal(plugin,
"emptyObjectAdded(int)" ) )
1876 if (
checkSlot(plugin,
"addedEmptyObject(int)" ) )
1878 plugin , SLOT( addedEmptyObject(
int ) ),Qt::DirectConnection);
1882 this , SLOT(
deleteObject(
int ) ),Qt::AutoConnection);
1885 connect(plugin , SIGNAL( deleteAllObjects() ) ,
1888 if (
checkSignal(plugin,
"getAllFileFilters(QStringList&)" ) )
1889 connect(plugin , SIGNAL( getAllFileFilters(QStringList&) ) ,
1892 if (
checkSlot(plugin,
"objectDeleted(int)" ) )
1894 plugin , SLOT(
objectDeleted(
int ) ),Qt::DirectConnection);
1900 if ( viewPlugin && OpenFlipper::Options::gui() ) {
1901 supported = supported +
"View ";
1903 if (
checkSignal(plugin,
"getStackWidget(QString,QWidget*&)" ) )
1904 connect(plugin , SIGNAL(getStackWidget( QString , QWidget*&)),
1905 coreWidget_ , SLOT( slotGetStackWidget( QString , QWidget*& ) ) ,Qt::DirectConnection );
1906 if (
checkSignal(plugin,
"addStackWidget(QString,QWidget*)" ) )
1907 connect(plugin , SIGNAL(addStackWidget( QString , QWidget*)),
1908 coreWidget_ , SLOT( slotAddStackWidget( QString , QWidget* ) ) ,Qt::DirectConnection );
1909 if (
checkSignal(plugin,
"updateStackWidget(QString,QWidget*)" ) )
1910 connect(plugin , SIGNAL(updateStackWidget( QString , QWidget*)),
1911 coreWidget_ , SLOT( slotUpdateStackWidget( QString , QWidget* ) ) ,Qt::DirectConnection );
1916 if ( processPlugin ) {
1917 supported = supported +
"Process ";
1919 if (
checkSignal(plugin,
"startJob(QString,QString,int,int,bool)" ) )
1920 connect(plugin , SIGNAL(startJob(QString, QString,
int,
int,
bool)),
1921 this , SLOT(
slotStartJob(QString, QString,
int,
int,
bool) ), Qt::DirectConnection );
1923 emit
log(
LOGERR,
"Process Interface defined but no startJob signal found!");
1925 if (
checkSignal(plugin,
"setJobState(QString,int)" ) )
1926 connect(plugin , SIGNAL(setJobState(QString,
int)),
1929 emit
log(
LOGERR,
"Process Interface defined but no setJobState signal found!");
1931 if (
checkSignal(plugin,
"setJobName(QString,QString)" ) )
1932 connect(plugin , SIGNAL(setJobName(QString, QString)),
1933 this , SLOT(
slotSetJobName(QString, QString) ), Qt::QueuedConnection );
1935 emit
log(
LOGERR,
"Process Interface defined but no setJobName signal found!");
1937 if (
checkSignal(plugin,
"setJobDescription(QString,QString)" ) )
1938 connect(plugin , SIGNAL(setJobDescription(QString, QString)),
1941 emit
log(
LOGERR,
"Process Interface defined but no setJobDescription signal found!");
1944 connect(plugin , SIGNAL(cancelJob(QString)),
1945 this , SLOT(
slotCancelJob(QString) ), Qt::QueuedConnection );
1948 connect(plugin , SIGNAL(finishJob(QString)),
1949 this , SLOT(
slotFinishJob(QString) ), Qt::QueuedConnection );
1951 emit
log(
LOGERR,
"Process Interface defined but no finishJob signal found!");
1953 if (
checkSlot(plugin,
"canceledJob(QString)" ) )
1955 plugin , SLOT( canceledJob(QString) ),Qt::QueuedConnection);
1957 emit
log(
LOGERR,
"Process Interface defined but no cancel canceledJob slot found!");
1963 supported = supported +
"RPC ";
1965 if (
checkSignal(plugin,
"pluginExists(QString,bool&)" ) )
1966 connect(plugin , SIGNAL( pluginExists(QString,
bool&) ),
1968 if (
checkSignal(plugin,
"functionExists(QString,QString,bool&)" ) )
1969 connect(plugin , SIGNAL(functionExists(QString,QString,
bool&)),
1971 if (
checkSignal(plugin,
"call(QString,QString,bool&)" ) )
1972 connect(plugin , SIGNAL(call(QString,QString,
bool&)),
1973 this , SLOT(
slotCall(QString,QString,
bool&)) ,Qt::DirectConnection );
1975 connect(plugin , SIGNAL(call(QString,
bool&)),
1976 this , SLOT(
slotCall(QString,
bool&)) ,Qt::DirectConnection );
1977 if (
checkSignal(plugin,
"getValue(QString,QVariant&)" ) )
1978 connect(plugin , SIGNAL(getValue(QString,QVariant&)),
1979 this , SLOT(
slotGetValue(QString,QVariant&)) ,Qt::DirectConnection );
1984 if ( interconnectionPlugin ) {
1985 supported = supported +
"Plugin Interconnection ";
1987 if (
checkSignal(plugin,
"crossPluginConnect(QString,const char*,QString,const char*)" ) ) {
1988 connect(plugin , SIGNAL( crossPluginConnect(QString,
const char*,QString,
const char*) ),
1995 if ( renderPlugin ) {
1996 supported = supported +
"Rendering ";
1998 if (
checkSlot( plugin ,
"rendererName()" ) ) {
1999 QString rendererNameString =
"";
2002 QMetaObject::invokeMethod(plugin,
"rendererName", Qt::DirectConnection, Q_RETURN_ARG(QString,rendererNameString) ) ;
2005 QString openGLCheck =
"";
2006 QMetaObject::invokeMethod(plugin,
"checkOpenGL", Qt::DirectConnection, Q_RETURN_ARG(QString,openGLCheck) ) ;
2008 if ( openGLCheck !=
"" ) {
2009 emit
log(
LOGERR,tr(
"Error: Insufficient OpenGL capabilities in Renderer Plugin ") + rendererNameString +
" !");
2016 if ( ! renderManager().rendererExists(rendererNameString) ) {
2017 rendererInfo = renderManager().
newRenderer(rendererNameString);
2019 emit
log(
LOGERR,tr(
"Error: Renderer Plugin %1 already exists").arg(rendererNameString));
2023 if ( rendererInfo != 0) {
2024 rendererInfo->
plugin = renderPlugin;
2025 rendererInfo->
name = basePlugin->
name();
2034 rendererInfo->
modes = supportedModes;
2036 if (
checkSlot( plugin ,
"optionsAction()" ) ) {
2046 emit
log(
LOGERR,tr(
"Error: Renderer Plugin without rendererName Function?!"));
2053 if ( postProcessorPlugin ) {
2054 supported = supported +
"PostProcessor ";
2056 if (
checkSlot( plugin ,
"postProcessorName()" ) ) {
2057 QString postProcessorNameString =
"";
2060 QMetaObject::invokeMethod(plugin,
"postProcessorName", Qt::DirectConnection, Q_RETURN_ARG(QString,postProcessorNameString) ) ;
2063 QString openGLCheck =
"";
2064 QMetaObject::invokeMethod(plugin,
"checkOpenGL", Qt::DirectConnection, Q_RETURN_ARG(QString,openGLCheck) ) ;
2066 if ( openGLCheck !=
"" ) {
2067 emit
log(
LOGERR,tr(
"Error: Insufficient OpenGL capabilities in post processor Plugin ") + postProcessorNameString +
" !");
2074 if ( ! postProcessorManager().postProcessorExists(postProcessorNameString) ) {
2075 postProcessorInfo = postProcessorManager().
newPostProcessor(postProcessorNameString);
2077 emit
log(
LOGERR,tr(
"Error: PostProcessor Plugin %1 already exists").arg(postProcessorNameString));
2081 if ( postProcessorInfo != 0) {
2082 postProcessorInfo->
plugin = postProcessorPlugin;
2083 postProcessorInfo->
name = basePlugin->
name();
2087 if (
checkSlot( plugin ,
"optionsAction()" ) ) {
2097 emit
log(
LOGERR,tr(
"Error: PostProcessor Plugin without postProcessorName Function?!"));
2103 if ( aboutInfoPlugin && OpenFlipper::Options::gui() ) {
2104 supported = supported +
"AboutInfo ";
2106 if (
checkSignal(plugin,
"addAboutInfo(QString,QString)") )
2107 connect(plugin , SIGNAL(addAboutInfo(QString,QString)),
2108 coreWidget_ , SLOT(addAboutInfo(QString,QString)),Qt::DirectConnection);
2114 QScriptValue scriptInstance =
scriptEngine_.newQObject(plugin,
2115 QScriptEngine::QtOwnership,
2116 QScriptEngine::ExcludeChildObjects |
2117 QScriptEngine::ExcludeSuperClassMethods |
2118 QScriptEngine::ExcludeSuperClassProperties
2122 QString scriptingName = info.
rpcName;
2124 scriptEngine_.globalObject().setProperty(scriptingName, scriptInstance);
2126 QScriptValueIterator it(scriptInstance);
2127 while (it.hasNext()) {
2131 if (
checkSignal( plugin, it.name().toLatin1() ) )
2142 if ( scriptPlugin ) {
2143 supported = supported +
"Scripting ";
2151 if (
checkSignal(plugin,
"scriptInfo(QString)" ) ) {
2154 connect(plugin , SIGNAL(
scriptInfo(QString) ),
2155 newScript , SLOT(
slotScriptInfo(QString) ) ,Qt::DirectConnection );
2158 connect(newScript , SIGNAL(
scriptInfo(QString,QString) ),
2163 if (
checkSlot(plugin,
"slotScriptInfo(QString,QString)") ) {
2164 connect(
this , SIGNAL(
scriptInfo(QString,QString)),
2169 if (
checkSignal(plugin,
"getDescription(QString,QString&,QStringList&,QStringList&)") )
2170 connect(plugin , SIGNAL( getDescription(QString,QString&,QStringList&,QStringList&) ),
2176 if (
checkSignal(plugin,
"executeScript(QString)") )
2181 if (
checkSignal(plugin,
"executeFileScript(QString)") )
2186 if (
checkSlot(plugin,
"slotExecuteScript(QString)") )
2191 if (
checkSlot(plugin,
"slotExecuteFileScript(QString)") )
2198 if (
checkSignal(plugin,
"getScriptingEngine(QScriptEngine*&)") )
2199 connect(plugin , SIGNAL(getScriptingEngine(QScriptEngine*&)),
2203 if (
checkSignal(plugin,
"getAvailableFunctions(QStringList&)") )
2204 connect(plugin , SIGNAL(getAvailableFunctions(QStringList&)),
2212 info.status = PluginInfo::LOADED;
2213 if (alreadyLoadedAt != -1)
2220 if (
checkSlot(plugin,
"initializePlugin()") )
2221 QMetaObject::invokeMethod(plugin,
"initializePlugin", Qt::DirectConnection);
2228 supported = supported +
"File ";
2230 QStringList loadFilters = filePlugin->
getLoadFilters().split(
";;");
2231 QStringList saveFilters = filePlugin->
getSaveFilters().split(
";;");
2234 for (
int i = 0; i < loadFilters.size(); ++i) {
2236 ft.name = basePlugin->
name();
2238 ft.loadFilters = loadFilters[i];
2239 ft.saveFilters =
"";
2240 ft.plugin = filePlugin;
2242 ft.saveMultipleObjects =
checkSlot(plugin,
"saveObjects(IdList,QString)");
2244 supportedTypes().push_back(ft);
2246 for (
int i = 0; i < saveFilters.size(); ++i) {
2248 ft.name = basePlugin->
name();
2250 ft.loadFilters =
"";
2251 ft.saveFilters = saveFilters[i];
2252 ft.plugin = filePlugin;
2254 ft.saveMultipleObjects =
checkSlot(plugin,
"saveObjects(IdList,QString)");
2256 supportedTypes().push_back(ft);
2261 connect(plugin , SIGNAL(
openedFile(
int ) ) ,
2268 supported = supported +
"Type ";
2271 typePlugin->registerType();
2275 dt.name = basePlugin->
name();
2277 dt.plugin = typePlugin;
2283 if ( !LoadSavePlugin &&
checkSignal(plugin,
"emptyObjectAdded(int)" ) )
2289 if ( metadataPlugin ) {
2290 if (
checkSlot(plugin,
"slotGenericMetadataDeserialized(QString,QString)")) {
2291 connect(
this, SIGNAL(genericMetadataDeserialized(QString, QString)),
2292 plugin, SLOT(slotGenericMetadataDeserialized(QString, QString)));
2294 if (
checkSlot(plugin,
"slotObjectMetadataDeserialized(QString,QString)")) {
2295 connect(
this, SIGNAL(objectMetadataDeserialized(QString, QString)),
2296 plugin, SLOT(slotObjectMetadataDeserialized(QString, QString)));
2298 #if QT_VERSION >= 0x050000
2299 if (
checkSlot(plugin,
"slotObjectMetadataDeserializedJson(QString,QJsonDocument)")) {
2300 connect(
this, SIGNAL(objectMetadataDeserializedJson(QString, QJsonDocument)),
2301 plugin, SLOT(slotObjectMetadataDeserializedJson(QString, QJsonDocument)));
2304 if (
checkSignal(plugin,
"metadataDeserialized(QVector<QPair<QString,QString> >)")) {
2305 connect(plugin, SIGNAL(metadataDeserialized(QVector<QPair<QString, QString> >)),
2306 this, SLOT(slotMetadataDeserialized(QVector<QPair<QString, QString> >)));
2310 emit
log(
LOGOUT,
"================================================================================");
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
Defines the order in which plugins have to be loaded.
void jobCanceled(QString _jobId)
A job has been started by a plugin.
void iniLoadOptionsLast(INIFile &_ini)
This signal is used to tell the plugins to load their new status after objects are loaded...
bool saveObject(int _id, QString _filename)
Save an object.
void slotMultiTextureAdded(QString _textureGroup, QString _name, QString _filename, int _id, int &_textureId)
Called by a plugin if it creates a multitexture.
QString description
Description of the plugin ( requested from the plugin on load)
void slotShowLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide lasso selection operation for specific selection mode.
void slotLog(Logtype _type, QString _message)
Console logger.
Interface class from which all plugins have to be created.
void slotShowPlugins()
Show Plugins Dialog.
void slotScriptInfo(QString _pluginName, QString _functionName)
Core scripting engine.
QString name
Name of the plugin ( requested from the plugin on load)
void PluginMouseEventLight(QMouseEvent *)
Emitted when an light event occurs.
void addCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon, SelectionInterface::PrimitiveType _associatedTypes, QString &_customIdentifier)
SelectionInterface: This signal is emitted when a custom selection mode is added. ...
void showLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard lasso selection is required.
QString splashMessage_
Last Splash message;.
void slotCancelJob(QString _jobId)
A job state has been canceled by a plugin.
void slotCrossPluginConnect(QString _pluginName1, const char *_signal, QString _pluginName2, const char *_slot)
Called to create inter plugin connections.
void getActiveDataTypes(SelectionInterface::TypeList &_types)
SelectionInterface: This signal is emitted when the active (selected) data types should be fetched...
void signalObjectUpdated(int)
When this Signal is emitted all Plugins are informed that the object list changed.
void showVolumeLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard volume lasso selection is required...
void targetObjectsOnly(bool &_targetsOnly)
SelectionInterface: This signal is emitted if the current target restriction state is requested...
Allow to connect slots between plugins.
virtual QAction * optionsAction()
Return options menu.
void slotClosestBoundarySelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when closest boundary selection operation has been performed.
Keyboard Event Interface.
void slotCopyObject(int _oldId, int &_newId)
Slot copying an object.
Interface class for Plugins which have to store information in ini files.
void showToggleSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard toggle selection is required.
void slotAddCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon, SelectionInterface::PrimitiveType _associatedTypes, QString &_customIdentifier)
SelectionInterface: Add new selection mode for specified type.
void slotUpdateTexture(QString _name, int _identifier)
Tell the plugins to update the given texture.
void allCleared()
Signal send to plugins when whole scene is cleared.
void slotSelectionOperation(QString _operation)
SelectionInterface: Called when a non-interactive operation has been performed.
void setTextureMode(QString _textureName, QString _mode, int _id)
A texture mode should be changed.
void switchTexture(QString, int)
Switch Texture Plugins to a given Mode.
void slotFileOpened(int _id)
Called when a file has been opened.
void slotAddEmptyObject(DataType _type, int &_id)
Slot adding empty object of a given type.
void addMultiTexture(QString _textureGroup, QString _name, QString _filename, int _id, int &_textureId)
The texture with the given name and filename has been added.
void blockScenegraphUpdates(bool _block)
Called when a plugin wants to lock or unlock scenegraph updates.
Logtype
Log types for Message Window.
Interface to add additional rendering functions from within plugins.
void slotSaveSelection(INIFile &_file)
SelectionInterface: Called when a selection should be stored into a file.
void showSurfaceLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard surface lasso selection is required...
Enables implementers to react on deserialization of meta data.
QStringList rpcFunctions
List of exported rpc slots.
void slotObjectUpdated(int _identifier, const UpdateType &_type=UPDATE_ALL)
Called by the plugins if they changed something in the object list (deleted, added, or other property changes)
int addEmptyObject(DataType _type)
void slotAddPickMode(const std::string &_mode)
Add a new picking mode to the examiner_widget_.
QString description
Description of the plugin ( requested from the plugin on load)
applicationStatus
Enum for the statusBar Status Icon.
void iniSave(INIFile &_ini, int _id)
This signal is used to tell the plugins to save the data of _id to the given file.
PostProcessorInfo * newPostProcessor(QString _name)
Get a new post processor Instance.
void addSelectionEnvironment(QString _modeName, QString _description, QString _icon, QString &_handleName)
SelectionInterface: This signal is emitted when a new toolbutton should be added. ...
void slotGetSubTextures(int _id, QString _multiTextureName, QStringList &_subTextures)
Called by plugins if a multi-texture's sub textures should be fetched.
void deleteObject(int _id)
Called to delete an object.
PostProcessorInterface * plugin
Pointer to the loaded plugin (Already casted when loading it)
void iniLoadOptions(INIFile &_ini)
This signal is used to tell the plugins to load their new status.
void sphereSelection(QMouseEvent *_event, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard sphere selection has been performed...
void slotGetAllAvailableFunctions(QStringList &_functions)
Core scripting engine.
void slotShowSphereSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide sphere selection operation for specific selection mode.
void setSlotDescription(QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
Core scripting engine.
Interface class for providing information on objects.
Interface for all plugins which want to use selection functions.
void toggleSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard toggle selection has been performed...
void slotDeleteAllObjects()
Called when a plugin wants to delete all objects.
void slotFinishJob(QString _jobId)
A job state has been finished by a plugin.
void selectionOperation(QString _operation)
SelectionInterface: This signal is emitted when a non-interactive operation has been performed...
QStringList scriptingFunctions_
List of all registered scripting functions.
void slotGetActivePrimitiveType(SelectionInterface::PrimitiveType &_type)
SelectionInterface: Called when active primitive type should be fetched.
void slotSphereSelection(QMouseEvent *_event, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when sphere selection operation has been performed.
void componentsSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard connected components selection has been perf...
QString description
Description of the plugin.
PreloadThread(PreloadAggregator *aggregator)
Preload thread constructor.
void showComponentsSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard connected components selection is required...
void addToolbox(QString _name, QWidget *_widget)
Add a Toolbox from a plugin or from scripting.
void slotGetValue(QString _expression, QVariant &_result)
Interface for all Plugins which do logging to the logging window of the framework.
QScriptEngine scriptEngine_
Core scripting engine.
void slotGetDescription(QString _function, QString &_fnDescription, QStringList &_parameters, QStringList &_descriptions)
get available descriptions for a given public slot
void slotShowVolumeLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide volume lasso selection operation for specific selection mode...
QObject * plugin
Pointer to the loaded plugin (Already casted when loading it)
Options Dialog interface.
Interface class for file handling.
void textureIndexPropertyName(int _id, QString &_propertyName)
get the texture index property name
Interface to call functions across plugins.
void updateAllTextures()
Update all textures in the plugins.
void surfaceLassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard surface lasso selection has been performed...
void slotGetCurrentRenderer(unsigned int _viewer, QString &_rendererName)
called to get the currently active renderer renderer for a specific viewer
void visibilityChanged(int _id)
Tell plugins that the visibility of an object has changed.
void slotTargetObjectsOnly(bool &_targetsOnly)
SelectionInterface: Called when target restriction state should be fetched.
void setViewMode(QString _viewMode)
Set the active ViewMode.
void pluginSceneDrawn()
This signal is emitted after the scene has been drawn.
void pluginsInitialized()
Called after all plugins are loaded.
void slotGenerateBackup(int _id, QString _name, UpdateType _type)
Slot for generating type specific backups.
void slotAddSelectionEnvironment(QString _modeName, QString _description, QString _icon, QString &_handleName)
SelectionInterface: Called when a new selection type button should be added to the toolbar...
QAction * optionsAction
Possible action to add an options action or menu to the system.
void slotTextureChangeImage(QString _textureName, QImage &_image)
Called by plugins if texture image should be changed.
void lassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard lasso selection has been performed...
void objectSelectionChanged(int)
This signal is emitted if the object has been changed (source/target)
virtual DataType supportedDataTypes()=0
Get data type for information requests.
void getCurrentTexture(int _id, QString &_textureName)
get current texture
void slotFunctionExists(QString _pluginName, QString _functionName, bool &_exists)
Check if a function exists.
void slotShowSurfaceLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide surface lasso selection operation for specific selection mode...
void restored(int _objectId)
Backup Plugin tells other Plugins that a restore has happened.
void pluginViewChanged()
This signal is emitted if one of the viewers updated its view.
void slotAddHiddenPickMode(const std::string &_mode)
Add a new and invisible picking mode to the examiner_widget_.
std::vector< ScriptingWrapper * > scriptingWrappers_
Wrappers for plugin scripting.
virtual DataType supportedType()=0
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
void customSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, QString _customIdentifier, bool _deselect)
SelectionInterface: This signal is emitted when a custom selection operation has been performed...
void slotUpdateAllTextures()
Update all textures in the plugins.
Class for the handling of simple configuration files.
void saveSelection(INIFile &_file)
SelectionInterface: This signal is emitted when a selection should be written into a file...
void updatedTextures(QString, int)
This Signal is send to the plugins if a texture has been updated.
bool buildIn
Indicates, if the plugin is a built in Plugin (in Plugin directory)
void aboutToRestore(int _objectId)
Backup Plugin tells other Plugins that a restore will happen.
void executeScript(QString _script)
Core scripting engine.
void registerType(QString _handleName, DataType _type)
SelectionInterface: This signal is emitted when a data type should be registered for a selection mode...
void showSphereSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard sphere selection is required.
std::vector< PluginInfo > plugins_
List of all loaded plugins_.
void slotGetAllFilters(QStringList &_list)
Called when a plugin requests a list of file-filters.
void slotTextureIndex(QString _textureName, int _id, int &_index)
Called by plugins if texture index should be fetched.
std::vector< int > IdList
Standard Type for id Lists used for scripting.
void slotKeyShortcutEvent(int _key, Qt::KeyboardModifiers _modifiers)
SelectionInterface: Called when a key event occurred.
void textureIndex(QString _textureName, int _id, int &_index)
get the texture index
void slotStartJob(QString _jobId, QString _description, int _min, int _max, bool _blocking)
A job has been started by a plugin.
void log(Logtype _type, QString _message)
Logg with OUT,WARN or ERR as type.
void addSelectionOperations(QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type)
SelectionInterface: This signal is used to add non-interactive operations for a specific primitive ty...
void loaderReady(QPluginLoader *loader)
void slotComponentsSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when connected components selection operation has been performed...
virtual QString name()=0
Return a name for the plugin.
void saveOnExit(INIFile &_ini)
This signal is emitted before the core deletes its data and exits.
void slotSurfaceLassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when surface lasso selection operation has been performed.
QPluginLoader * waitForNextLoader()
void slotCustomSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, QString _customIdentifier, bool _deselect)
SelectionInterface: Called when custom selection operation has been performed.
void openedFile(int _id)
Tell the plugins that a file has been opened ( -> Database)
void volumeLassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard volume lasso selection has been performed...
void loadPlugins()
Load all plugins from default plugin directory and from INI-File.
void slotRegisterType(QString _handleName, DataType _type)
SelectionInterface: Called when a data type is added for a specific selection type.
RendererInfo * newRenderer(QString _name)
Get a new renderer Instance.
Interface for all Plugins which provide scriptable Functions.
Add a toolbox to OpenFlipper.
void slotShowFloodFillSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide flood fill selection operation for specific selection mode...
void slotSetTextureMode(QString _textureName, QString _mode, int _id)
A texture mode should be changed.
virtual QString getLoadFilters()=0
void loadSelection(const INIFile &_file)
SelectionInterface: This signal is emitted when a selection should be loaded from a file...
void slotUnBlockPlugin(const QString &_rpcName)
Function for UnBlocking Plugins. Plugins will not loaded automatically.
QWidget * optionsWidget
Pointer to plugins options widget (if available)
void PluginMouseEvent(QMouseEvent *)
When this Signal is emitted when a Mouse Event occures.
QString version
Version of the plugin.
void registerKeyShortcut(int _key, Qt::KeyboardModifiers _modifiers)
SelectionInterface: This signal is emitted when a type selection plugin wants to listen to a key even...
QString name
Name of the plugin ( requested from the plugin on load)
void run()
preload function
void closestBoundarySelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard closest boundary selection has been performe...
virtual QAction * optionsAction()
Return options menu.
Interface for all plugins which want to Load or Save files and create Objects.
void slotAddPrimitiveType(QString _handleName, QString _name, QString _icon, SelectionInterface::PrimitiveType &_typeHandle)
SelectionInterface: Called when a new, non-standard primitive type should be handled.
void showFloodFillSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard flood fill selection is required.
bool checkSignal(QObject *_plugin, const char *_signalSignature)
Check if a plugin has a signal.
virtual QString version()
Return a version string for your plugin.
void addPrimitiveType(QString _handleName, QString _name, QString _icon, SelectionInterface::PrimitiveType &_typeHandle)
SelectionInterface: This signal is emitted when a selection plugin should handle a new primitive type...
void slotBlockPlugin(const QString &_rpcName)
Function for Blocking Plugins. Blocked plugins will unloaded and not loaded wthin the next starts...
void textureFilename(int _id, QString _textureName, QString &_textureFilename)
get the texture's filename
Interface class for Thread handling.
void externalLog(Logtype _type, QString _message)
This signal is emitted to send log data to a plugin.
void slotSetJobDescription(QString _jobId, QString _text)
A job's widget's status text has been updated by a plugin.
void executeFileScript(QString _filename)
Core scripting engine.
ACG::SceneGraph::DrawModes::DrawMode modes
Supported DrawModes.
DLLEXPORT void registerTypes()
Interface to add global image post processor functions from within plugins.
void slotVisibilityChanged(int _id)
Called when a plugin changes the visibility of an object.
void iniSaveOptions(INIFile &_ini)
This signal is used to tell the plugins to save their current status.
QString name
Name of the plugin ( requested from the plugin on load)
void showClosestBoundarySelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: This signal is emitted when standard closest boundary selection is required...
void slotSwitchTexture(QString _textureName, int _id)
Tells Plugins to switch to the given Texture.
void slotExecuteScript(QString _script)
void objectPropertiesChanged(int _id)
Tell plugins that object properties such as object names have been changed.
void applyOptions()
after ini-files have been loaded and core is up or if options have been changed -> apply Options ...
void slotToggleSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when toggle selection operation has been performed.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
QString rpcName
Clean rpc name of the plugin.
void slotAddSelectionOperations(QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type)
SelectionInterface: Called in order to add non-interactive operations for a specific primitive type...
virtual QString getSaveFilters()=0
void slotRegisterKeyShortcut(int _key, Qt::KeyboardModifiers _modifiers)
SelectionInterface: Called when a key shortcut is to be registered.
QSplashScreen * splash_
SplashScreen, only used in gui mode.
void emptyObjectAdded(int _id)
Tell the plugins that an empty object has been added.
void objectDeleted(int)
Called after an object has been deleted.
void slotTextureUpdated(QString _textureName, int _identifier)
A Texture has been updated.
CoreWidget * coreWidget_
The main applications widget ( only created in gui mode )
void expectLoaders(int count)
void floodFillSelection(QMouseEvent *_event, double _maxAngle, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: This signal is emitted when standard flood fill selection has been performed...
Allow access to picking functions.
void slotLoadPlugin()
Load Plugins from menu.
void slotShowToggleSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide toggle selection operation for specific selection mode.
Control OpenFlippers status bar.
void slotObjectPropertiesChanged(int _id)
Called by plugins if object properties like names have changed.
void slotAddTexture(QString _textureName, QString _filename, uint _dimension, int _id)
Called by a plugin if it creates a texture.
Interface class for backup handling.
void slotSetSlotDescription(QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
set a description for one of the plugin's public slots
QString version
Version of the plugin.
void slotShowComponentsSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide connected components selection operation for specific selection mode...
std::vector< PluginLogger * > loggers_
Logger interfaces between plugins and core logger.
Interface class for creating custom context menus.
void slotTextureFilename(int _id, QString _textureName, QString &_textureFilename)
Called by plugins if texture name should be fetched.
Interface class for receiving mouse events.
void slotShowClosestBoundarySelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
SelectionInterface: Provide closest boundary selection operation for specific selection mode...
void slotLassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when lasso selection operation has been performed.
std::vector< dataTypes > supportedDataTypes_
Type-Plugins.
void loadPlugin(const QString &_filename, const bool _silent, QString &_licenseErrors, QObject *_plugin=0)
Function for loading Plugins.
void slotLogToFile(Logtype _type, QString _message)
log to file
virtual DataType supportedType()=0
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
Plugins can add its own toolbox to the main widget's toolbox area by using this interface.
Interface class for adding copy protection and license management to a plugin.
QAction * optionsAction
Possible action to add an options action or menu to the system.
void undo()
Signal send to plugins when whole scene is cleared.
void setValue(const QString &key, const QVariant &value)
Wrapper function which makes it possible to enable Debugging output with -DOPENFLIPPER_SETTINGS_DEBUG...
Provide texture support for a plugin.
void textureName(int _id, int _textureIndex, QString &_textureName)
get the texture name
void slotSetJobState(QString _jobId, int _value)
A job state has been updated by a plugin.
virtual bool initializeOptionsWidget(QWidget *&_widget)=0
Initialize the Options Widget.
void slotVolumeLassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when volume lasso selection operation has been performed.
void slotTextureGetImage(QString _textureName, QImage &_image)
Called by plugins if texture image should be fetched.
void slotMouseEventLight(QMouseEvent *_event)
Handle Mouse events when in Light mode.
void slotLoadSelection(const INIFile &_file)
SelectionInterface: Called when a selection should be loaded from a file.
void slotObjectSelectionChanged(int _id)
Called by Plugins if they changed the active object.
Interface class for type definitions.
void slotLoad(QString _filename, DataType _type, int &_id)
A plugin wants to load a given file.
void slotTextureIndexPropertyName(int _id, QString &_propertyName)
Called by plugins if texture index property name should be fetched.
bool checkSlot(QObject *_plugin, const char *_slotSignature)
Check if a plugin has a slot.
void keyShortcutEvent(int _key, Qt::KeyboardModifiers _modifiers=Qt::NoModifier)
SelectionInterface: This signal is emitted when a key shortcut has been pressed.
void slotSetJobName(QString _jobId, QString _name)
A job's widget caption has been updated by a plugin.
void scriptInfo(QString _pluginName, QString _functionName)
Core scripting engine.
void getSubTextures(int _id, QString _multiTextureName, QStringList &_subTextures)
get a multi-texture's sub textures
void slotGetScriptingEngine(QScriptEngine *&_engine)
Core scripting engine.
Interface class for adding view modes to the ui.
Interface for all plugins which provide entries to the main menubar.
void slotMouseEvent(QMouseEvent *_event)
Gets called by examiner widget when mouse is moved in picking mode.
void textureGetImage(QString _textureName, QImage &_image)
fetch texture image
void updateView()
Called when a plugin requests an update in the viewer.
void addTexture(QString, QString, uint, int)
The texture with the given name and filename has been added.
void iniLoad(INIFile &, int)
If an ini File is opened, this signal is send to Plugins capable of handling ini files.
void PluginWheelEvent(QWheelEvent *, const std::string &)
When this Signal is emitted when a Wheel Event occures.
void slotPluginExists(QString _pluginName, bool &_exists)
Check if a plugin exists.
void getActivePrimitiveType(SelectionInterface::PrimitiveType &_type)
SelectionInterface: This signal is emitted when the active (selected) primitive type should be fetche...
void slotTextureName(int _id, int _textureIndex, QString &_textureName)
Called by plugins if texture name should be fetched.
void slotSetRenderer(unsigned int _viewer, QString _rendererName)
called to switch the renderer for a specific viewer
void slotExecuteFileScript(QString _filename)
void createBackup(int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
Tell backup-plugin to create a backup.
void slotEmptyObjectAdded(int _id)
Called when an empty object has been Added.
void slotGetCurrentTexture(int _id, QString &_textureName)
Called by plugins if current texture should be retrieved.
QString version
Version of the plugin ( requested from the plugin on load)
virtual QString description()=0
Return a description of what the plugin is doing.
void slotFloodFillSelection(QMouseEvent *_event, double _maxAngle, SelectionInterface::PrimitiveType _currentType, bool _deselect)
SelectionInterface: Called when flood fill selection operation has been performed.
QString path
Path to the plugin ( set on load )
void updateTexture(QString, int)
Tell the plugins to update the given texture.
void redo()
Signal send to plugins when whole scene is cleared.
RenderInterface * plugin
Pointer to the loaded plugin (Already casted when loading it)
void slotCall(QString _pluginName, QString _functionName, bool &_success)
void textureChangeImage(QString _textureName, QImage &_image)
Change the image for a given texture.
void slotGetActiveDataTypes(SelectionInterface::TypeList &_types)
SelectionInterface: Called when active (selected) data types should be fetched.