65 #include "OpenFlipper/BasePlugin/TextureInterface.hh" 69 #include "OpenFlipper/BasePlugin/INIInterface.hh" 76 #include "OpenFlipper/BasePlugin/PluginFunctionsCore.hh" 79 #include <ACG/QtWidgets/QtFileDialog.hh> 80 #include "OpenFlipper/widgets/PluginDialog/PluginDialog.hh" 85 #include <OpenFlipper/BasePlugin/PythonFunctionsCore.hh> 91 static const int PRELOAD_THREADS_COUNT = (QThread::idealThreadCount() != -1) ? QThread::idealThreadCount() : 8;
93 namespace cmake {
extern const char *static_plugins; };
109 QMutexLocker loadersLock(&loadersMutex_);
110 expectedLoaders_ += count;
120 QMutexLocker loadersLock(&loadersMutex_);
121 loaders_.push_back(loader);
123 pluginAvailable_.wakeOne();
138 QMutexLocker loadersLock(&loadersMutex_);
139 if (loaders_.empty()) {
140 if (expectedLoaders_ > 0) {
141 pluginAvailable_.wait(&loadersMutex_);
151 QPluginLoader *result = loaders_.front();
152 loaders_.pop_front();
157 std::deque<QPluginLoader *> loaders_;
158 QWaitCondition pluginAvailable_;
159 QMutex loadersMutex_;
161 int expectedLoaders_;
179 void addFilename(
const QString &filename) {
180 QMutexLocker filenamesLock(&filenamesMutex_);
181 filenames_.push_back(filename);
182 aggregator_->expectLoaders(1);
198 QMutexLocker filenamesLock(&filenamesMutex_);
199 if (filenames_.empty())
break;
200 fileName = filenames_.front();
201 filenames_.pop_front();
204 QPluginLoader *loader =
new QPluginLoader;
205 loader->setFileName(fileName);
207 aggregator_->loaderReady(loader);
212 std::deque<QString> filenames_;
213 QMutex filenamesMutex_;
227 size_t getTypeOrdinal(
const QString &name)
const {
228 const QString basename = QFileInfo(name).baseName();
229 if (basename.contains(
"Plugin-Type"))
231 else if (basename.contains(
"Plugin-File"))
233 else if (basename.contains(
"TextureControl"))
239 bool operator() (
const QString &a,
const QString &b)
const {
240 const size_t typeA = getTypeOrdinal(a);
241 const size_t typeB = getTypeOrdinal(b);
242 if (typeA != typeB) {
return typeA < typeB; }
246 bool operator() (
const QPluginLoader *a,
const QPluginLoader *b)
const {
247 return operator() (a->fileName(), b->fileName());
255 const QMetaObject* meta = _plugin->metaObject();
256 int id = meta->indexOfSlot( QMetaObject::normalizedSignature( _slotSignature ) );
261 const QMetaObject* meta = _plugin->metaObject();
262 int id = meta->indexOfSignal( QMetaObject::normalizedSignature( _signalSignature ) );
274 QString licenseTexts =
"";
277 QDir tempDir = QDir(OpenFlipper::Options::pluginDir());
284 if ( OpenFlipper::Options::isWindows() )
290 QStringList pluginlist = tempDir.entryList(filter,QDir::Files);
293 for (
int i=0; i < pluginlist.size(); i++) {
294 pluginlist[i] = tempDir.absoluteFilePath(pluginlist[i]);
298 QStringList dontLoadPlugins =
OpenFlipperSettings().
value(
"PluginControl/DontLoadNames", QStringList()).toStringList();
301 for (
int i = 0 ; i < dontLoadPlugins.size(); ++i)
302 emit log(
LOGOUT,tr(
"dontLoadPlugins Plugin from ini file: %1").arg( dontLoadPlugins[i] ) );
305 QStringList additionalPlugins =
OpenFlipperSettings().
value(
"PluginControl/AdditionalPlugins", QStringList()).toStringList();
308 for (
int i = 0 ; i < additionalPlugins.size(); ++i) {
309 emit log(
LOGOUT,tr(
"Additional Plugin from file: %1").arg( additionalPlugins[i] ) );
313 pluginlist = additionalPlugins << pluginlist;
319 QStringList list = QString::fromUtf8(cmake::static_plugins).split(
"\n");
320 #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) 321 QSet<QString> staticPlugins = QSet<QString>(list.begin(),list.end());
323 QSet<QString> staticPlugins = QSet<QString>::fromList(list);
325 for (
int i = 0; i < pluginlist.size(); ) {
326 const QString bn = QFileInfo(pluginlist[i]).baseName().remove(
"lib");
327 if (staticPlugins.contains(bn)) {
328 emit log(
LOGWARN, tr(
"Not loading dynamic %1 as it is statically " 329 "linked against OpenFlipper.").arg(bn));
330 pluginlist.removeAt(i);
343 for (
int i = 0 ; i < dontLoadPlugins.size(); ++i )
344 emit log(
LOGWARN,tr(
"Skipping Plugins :\t %1").arg( dontLoadPlugins[i] ) );
346 emit log(
LOGOUT,
"================================================================================");
353 std::vector< PreloadThread* > loaderThreads(PRELOAD_THREADS_COUNT);
358 for (std::vector< PreloadThread* >::iterator it = loaderThreads.begin();
359 it != loaderThreads.end(); ++it) {
367 for (
int i = 0 ; i < pluginlist.size() ; ++i) {
368 loaderThreads[i % loaderThreads.size()]->addFilename(pluginlist[i]);
374 for (std::vector< PreloadThread* >::iterator it = loaderThreads.begin();
375 it != loaderThreads.end(); ++it) {
382 std::vector<QPluginLoader*> loadedPlugins;
383 loadedPlugins.reserve(pluginlist.size());
388 loadedPlugins.push_back(loader);
391 splashMessage_ = tr(
"Loading Plugin %1/%2").arg(loadedPlugins.size()).arg(pluginlist.size()) ;
392 splash_->showMessage( splashMessage_ , Qt::AlignBottom | Qt::AlignLeft , Qt::white);
399 for (std::vector< PreloadThread* >::iterator it = loaderThreads.begin();
400 it != loaderThreads.end(); ++it) {
409 for (std::vector<QPluginLoader*>::iterator it = loadedPlugins.begin();
410 it != loadedPlugins.end(); ++it) {
413 splashMessage_ = tr(
"Initializing Plugin %1/%2")
414 .arg(std::distance(loadedPlugins.begin(), it) + 1)
415 .arg(loadedPlugins.size());
416 splash_->showMessage( splashMessage_ , Qt::AlignBottom | Qt::AlignLeft , Qt::white);
419 if ((*it)->instance() != 0 ) {
420 QString pluginLicenseText =
"";
421 loadPlugin((*it)->fileName(),
true,pluginLicenseText, (*it)->instance());
422 licenseTexts += pluginLicenseText;
424 emit log(
LOGERR,tr(
"Unable to load Plugin :\t %1").arg( (*it)->fileName() ) );
425 emit log(
LOGERR,tr(
"Error was : ") + (*it)->errorString() );
426 emit log(
LOGOUT,
"================================================================================");
434 QVector<QStaticPlugin> staticPlugins = QPluginLoader::staticPlugins();
435 for (QVector<QStaticPlugin>::iterator it = staticPlugins.begin();
436 it != staticPlugins.end(); ++it) {
437 QObject *instance = it->instance();
440 QString fakeName = QString::fromUtf8(
"<Statically Linked>::/%1.%2")
441 .arg(basePlugin->
name())
442 .arg(OpenFlipper::Options::isWindows() ?
"dll" :
"so");
443 QString pluginLicenseText =
"";
444 loadPlugin(fakeName,
true, pluginLicenseText, instance);
445 licenseTexts += pluginLicenseText;
449 emit log(
LOGINFO, tr(
"Total time needed to load plugins was %1 ms.").arg(time.elapsed()));
453 if ( licenseTexts !=
"" ) {
454 if ( OpenFlipper::Options::gui() ) {
457 QStringList licenseBlocks = licenseTexts.split(
"==");
460 for ( QStringList::iterator it = licenseBlocks.begin(); it != licenseBlocks.end() ; ++it )
461 if ( ! it->contains(
"PluginName") ) {
462 licenseBlocks.erase(it);
463 it = licenseBlocks.begin();
467 QMap< QString , QString > contacts;
469 for ( QStringList::iterator it = licenseBlocks.begin(); it != licenseBlocks.end() ; ++it ) {
470 QStringList lines = it->split(
"\n");
472 lines = lines.filter (
"Contact mail", Qt::CaseInsensitive );
475 if (lines.size() == 1) {
476 QString mail = lines[0].section(
":",-1).simplified();
477 QString list = contacts.take(mail);
479 contacts.insert(mail,list);
481 emit log(
LOGWARN,tr(
"Can't extract mail contact from license request"));
486 for ( QMap<QString , QString>::iterator it = contacts.begin() ; it != contacts.end() ; ++it ) {
488 QStringList request = it.value().split(
"\n");
491 for ( QStringList::iterator lit = request.begin(); lit != request.end() ; ++lit ) {
493 if ( lit->contains(
"Message:") ) {
494 *lit = lit->section(
":",-1).simplified();
497 if ( lit->contains(
"Contact mail:") ) {
498 *lit = lit->section(
":",-1).simplified();
505 QTextEdit *edit =
new QTextEdit(&licenseBox);
506 edit->setText(request.join(
"\n"));
508 QLabel* mailLabel =
new QLabel(&licenseBox);
509 mailLabel->setText(tr(
"The text has been copied to your clipboard. Open in Mail program?"));
511 QPushButton* noButton =
new QPushButton(&licenseBox);
512 noButton->setText(tr(
"No"));
513 connect( noButton, SIGNAL(clicked ()), &licenseBox, SLOT(reject()) );
515 QPushButton* yesButton =
new QPushButton(&licenseBox);
516 yesButton->setText(tr(
"Yes"));
517 connect( yesButton, SIGNAL(clicked ()), &licenseBox, SLOT(accept()) );
519 QGridLayout *layout =
new QGridLayout;
520 layout->addWidget(edit,0,0,1,2);
521 layout->addWidget(mailLabel,1,0,1,2);
522 layout->addWidget(noButton,2,0);
523 layout->addWidget(yesButton,2,1);
524 licenseBox.setLayout(layout);
526 licenseBox.resize(500,500);
527 licenseBox.setModal(
true);
528 licenseBox.setWindowTitle(tr(
"Plugin License check failed, issuer is: %1").arg( it.key() ));
529 int userAnswer =licenseBox.exec();
532 QClipboard *cb = QApplication::clipboard();
533 cb->setText(request.join(
"\n"));
535 if ( userAnswer == 1 ) {
536 QString url =
"mailto:" + it.key();
537 url +=
"?subject=License Request&body=";
539 url += request.join(
";;");
541 url += request.join(
"\n");
544 QUrl encodedURL(url, QUrl::TolerantMode);
545 QDesktopServices::openUrl(encodedURL);
553 emit log(
LOGWARN,tr(
"Plugin License check failed: "));
554 std::cerr << licenseTexts.toStdString() << std::endl;
558 emit pluginsInitialized();
562 emit log(
LOGOUT,tr(
"Loaded %n Plugin(s)",
"",
int(plugins().size())) );
569 if ( OpenFlipper::Options::nogui() )
577 if ( OpenFlipper::Options::isWindows() )
578 filter =
"Plugins (*.dll)";
580 filter =
"Plugins (*.so)";
583 QString filename = ACG::getOpenFileName(coreWidget_,tr(
"Load Plugin"),filter,
OpenFlipperSettings().value(
"Core/CurrentDir").toString() );
585 if (filename.isEmpty())
590 QPluginLoader loader( filename );
591 QObject *plugin = loader.instance();
599 name = basePlugin->
name();
606 QStringList dontLoadPlugins =
OpenFlipperSettings().
value(
"PluginControl/DontLoadNames", QStringList()).toStringList();
607 if (dontLoadPlugins.contains(name)){
608 int ret = QMessageBox::question(0, tr(
"Plugin Loading Prevention"),
609 tr(
"OpenFlipper is currently configured to prevent loading this plugin.\n" 610 "Do you want to enable this plugin permanently?"),
611 QMessageBox::Yes | QMessageBox::No,
613 if (ret == QMessageBox::Yes) {
614 dontLoadPlugins.removeAll(name);
621 QStringList additionalPlugins =
OpenFlipperSettings().
value(
"PluginControl/AdditionalPlugins", QStringList()).toStringList();
622 if (!additionalPlugins.contains(name)){
623 int ret = QMessageBox::question(0, tr(
"Plugin Loading ..."),
624 tr(
"Should OpenFlipper load this plugin on next startup?"),
625 QMessageBox::Yes | QMessageBox::No,
627 if (ret == QMessageBox::Yes) {
628 additionalPlugins << filename;
629 std::cerr <<
"Added: " << filename.toStdString() << std::endl;
634 QString licenseText =
"";
635 loadPlugin(filename,
false,licenseText);
637 if ( licenseText !=
"" ) {
638 if ( OpenFlipper::Options::gui() ) {
639 QMessageBox::warning ( 0, tr(
"Plugin License check failed"), licenseText );
641 std::cerr <<
"OpenURL: " << std::endl;
642 QDesktopServices::openUrl(QUrl(tr(
"mailto:contact@openflipper.com?subject=License Request&body=%1").arg(licenseText), QUrl::TolerantMode));
644 std::cerr <<
"Plugin License check failed" << std::endl;
645 std::cerr << licenseText.toStdString() << std::endl;
654 if ( OpenFlipper::Options::gui() ){
663 connect(dialog, SIGNAL( loadPlugin() ),
this, SLOT( slotLoadPlugin() ));
664 connect(dialog, SIGNAL(blockPlugin(
const QString&)),
this, SLOT(slotBlockPlugin(
const QString&)));
665 connect(dialog, SIGNAL(unBlockPlugin(
const QString&)),
this, SLOT(slotUnBlockPlugin(
const QString&)));
666 connect(dialog, SIGNAL(loadPlugin(
const QString& ,
const bool , QString& , QObject* )),
667 this,SLOT(loadPlugin(
const QString& ,
const bool , QString& , QObject* )));
670 ret = dialog->exec();
679 QStringList dontLoadPlugins =
OpenFlipperSettings().
value(
"PluginControl/DontLoadNames",QStringList()).toStringList();
680 if ( !dontLoadPlugins.contains(_name) ){
681 dontLoadPlugins << _name;
685 for (
size_t i = 0; i < plugins().size();++i)
686 if (plugins()[i].name == _name)
687 plugins()[i].status = PluginInfo::BLOCKED;
692 QStringList dontLoadPlugins =
OpenFlipperSettings().
value(
"PluginControl/DontLoadNames",QStringList()).toStringList();
693 dontLoadPlugins.removeAll(_name);
696 for (
size_t i = 0; i < plugins().size();++i)
697 if (plugins()[i].name == _name)
698 plugins()[i].status = PluginInfo::UNLOADED;
703 emit log(
LOGERR ,errors );
705 emit log(
LOGOUT,
"================================================================================");
714 void Core::loadPlugin(
const QString& _filename,
const bool _silent, QString& _licenseErrors, QObject* _plugin){
719 if ( OpenFlipper::Options::isWindows() ) {
720 QString dllname = _filename;
721 if ( ! dllname.endsWith(
".dll" ) )
725 if ( OpenFlipper::Options::isLinux() ) {
726 QString soname = _filename;
727 if ( ! soname.endsWith(
".so" ) )
735 QString errors, warnings;
740 if ( _plugin == 0 ) {
741 QPluginLoader loader( _filename );
742 plugin = loader.instance();
746 errors += tr(
"Error: Unable to load Plugin :\t %1").arg( _filename ) +
"\n";
747 errors += tr(
"Error: Error was : ") + loader.errorString() +
"\n";
751 emit log(
LOGOUT,
"================================================================================");
753 emit log (
LOGOUT,tr(
"Plugin loaded: \t %1").arg(_filename));
762 int alreadyLoadedAt = -1;
763 for (
unsigned int k=0; k < plugins().size(); k++)
765 if (plugins()[k].path == _filename)
766 alreadyLoadedAt = static_cast<int>(k);
768 info.status = PluginInfo::FAILED;
769 info.
path = _filename;
772 emit log(
LOGOUT,tr(
"Location : \t %1").arg( _filename) );
784 QStringList additionalPlugins =
OpenFlipperSettings().
value(
"PluginControl/AdditionalPlugins", QStringList()).toStringList();
785 info.
buildIn = !additionalPlugins.contains(info.
path);
787 emit log(
LOGOUT,tr(
"Found Plugin : \t %1").arg(basePlugin->
name()) );
790 splashMessage_ = splashMessage_ +
" " + basePlugin->
name() ;
791 splash_->showMessage( splashMessage_ , Qt::AlignBottom | Qt::AlignLeft , Qt::white);
795 for (
unsigned int k=0; k < plugins().size(); k++){
797 QString name_nospace = basePlugin->
name();
798 name_nospace.remove(
" ");
800 if (plugins()[k].name == name_nospace && plugins()[k].path != _filename && plugins()[k].status == PluginInfo::LOADED){
801 if (_silent || OpenFlipper::Options::nogui() ){
803 warnings += tr(
"Warning: Already loaded from %1").arg( plugins()[k].path) +
"\n";
805 printPluginLoadLog(errors, warnings);
812 PluginStorage::pluginsFailed().push_back(info);
816 int ret = QMessageBox::question(coreWidget_,
817 tr(
"Plugin already loaded"),
818 tr(
"A Plugin with the same name was already loaded from %1.\n" 819 "You can only load the new plugin if you unload the existing one first.\n\n" 820 "Do you want to unload the existing plugin first?").arg( plugins()[k].path),
821 QMessageBox::Yes|QMessageBox::No, QMessageBox::No);
822 if (ret == QMessageBox::No)
824 warnings += tr(
"Warning: Already loaded from %1.").arg( plugins()[k].path) +
"\n";
826 printPluginLoadLog(errors, warnings);
833 PluginStorage::pluginsFailed().push_back(info);
840 QStringList dontLoadPlugins =
OpenFlipperSettings().
value(
"PluginControl/DontLoadNames",QStringList()).toStringList();
842 if ( dontLoadPlugins.contains(basePlugin->
name(), Qt::CaseInsensitive) ) {
844 warnings += tr(
"Warning: OpenFlipper.ini prevented Plugin %1 from being loaded! ").arg( basePlugin->
name() ) +
"\n";
846 printPluginLoadLog(errors, warnings);
848 info.status = PluginInfo::BLOCKED;
853 PluginStorage::pluginsFailed().push_back(info);
860 if ( securePlugin ) {
861 emit log(
LOGINFO,tr(
"Plugin uses security interface. Trying to authenticate against plugin ..."));
863 bool success =
false;
864 QMetaObject::invokeMethod(plugin,
"authenticate", Q_RETURN_ARG(
bool , success ) ) ;
866 QString message =
"";
867 QMetaObject::invokeMethod(plugin,
"licenseError", Q_RETURN_ARG( QString , message ) ) ;
868 _licenseErrors = message;
871 emit log(
LOGINFO,tr(
"... ok. Loading plugin "));
874 errors += tr(
"Error: Failed to load plugin. Plugin access denied by license management.");
876 printPluginLoadLog(errors, warnings);
884 PluginStorage::pluginsFailed().push_back(info);
890 emit log(
LOGOUT,tr(
"Plugin Description :\t %1 ").arg( basePlugin->
description()) );
892 supported =
"BaseInterface ";
895 if ( checkSlot(plugin,
"version()") )
898 info.
version = QString::number(-1);
900 if ( OpenFlipper::Options::nogui() ) {
902 if ( ! checkSlot( plugin ,
"noguiSupported()" ) ) {
903 warnings += tr(
"Warning: Running in nogui mode which is unsupported by this plugin, skipping");
905 printPluginLoadLog(errors, warnings);
910 PluginStorage::pluginsFailed().push_back(info);
919 if ( checkSignal(plugin,
"updated_objects(int)") ) {
921 errors += tr(
"Error: Plugin Uses old style updated_objects! Convert to updatedObject!") +
"\n";
923 printPluginLoadLog(errors, warnings);
928 PluginStorage::pluginsFailed().push_back(info);
933 if ( checkSignal(plugin,
"update_view()") ) {
934 errors += tr(
"Error: Plugin Uses old style update_view! Convert to updateView!") +
"\n";
936 printPluginLoadLog(errors, warnings);
941 PluginStorage::pluginsFailed().push_back(info);
946 if ( checkSignal(plugin,
"updateView()") )
947 connect(plugin,SIGNAL(updateView()),
this,SLOT(updateView()), Qt::AutoConnection);
949 if ( checkSignal(plugin,
"blockScenegraphUpdates(bool)") )
950 connect(plugin,SIGNAL(blockScenegraphUpdates(
bool)),
this,SLOT(blockScenegraphUpdates(
bool)), Qt::QueuedConnection);
952 if ( checkSignal(plugin,
"updatedObject(int)") && checkSignal(plugin,
"updatedObject(int,const UpdateType&)") ){
954 errors += tr(
"Error: Plugin uses deprecated and(!) new updatedObject. Only new updatedObject will be active.") +
"\n";
956 log(
LOGERR,tr(
"Plugin uses deprecated and(!) new updatedObject. Only new updatedObject will be active."));
957 connect(plugin,SIGNAL(updatedObject(
int,
const UpdateType&)),
this,SLOT(slotObjectUpdated(
int,
const UpdateType&)), Qt::AutoConnection);
961 if ( checkSignal(plugin,
"updatedObject(int)") ){
962 warnings += tr(
"Warning: Plugin uses deprecated updatedObject.") +
"\n";
964 log(
LOGWARN,tr(
"Plugin uses deprecated updatedObject."));
965 connect(plugin,SIGNAL(updatedObject(
int)),
this,SLOT(slotObjectUpdated(
int)), Qt::AutoConnection);
968 if ( checkSignal(plugin,
"updatedObject(int,const UpdateType&)") )
969 connect(plugin,SIGNAL(updatedObject(
int,
const UpdateType&)),
this,SLOT(slotObjectUpdated(
int,
const UpdateType&)), Qt::AutoConnection);
972 if ( checkSlot( plugin ,
"slotObjectUpdated(int)" ) && checkSlot( plugin ,
"slotObjectUpdated(int,const UpdateType&)" ) ){
973 errors += tr(
"Error: Plugin uses deprecated and(!) new slotObjectUpdated. Only new slotObjectUpdated will be active.") +
"\n";
975 log(
LOGERR,tr(
"Plugin uses deprecated and(!) new slotObjectUpdated. Only new slotObjectUpdated will be active."));
976 connect(
this,SIGNAL(signalObjectUpdated(
int,
const UpdateType&)),plugin,SLOT(slotObjectUpdated(
int,
const UpdateType&)), Qt::DirectConnection);
980 if ( checkSlot( plugin ,
"slotObjectUpdated(int)" ) ){
981 warnings += tr(
"Warning: Plugin uses deprecated slotObjectUpdated.") +
"\n";
982 log(
LOGWARN,tr(
"Plugin uses deprecated slotObjectUpdated."));
983 connect(
this,SIGNAL(signalObjectUpdated(
int)),plugin,SLOT(slotObjectUpdated(
int)), Qt::DirectConnection);
986 if ( checkSlot( plugin ,
"slotObjectUpdated(int,const UpdateType&)" ) )
987 connect(
this,SIGNAL(signalObjectUpdated(
int,
const UpdateType&)),plugin,SLOT(slotObjectUpdated(
int,
const UpdateType&)), Qt::DirectConnection);
990 if ( checkSignal(plugin,
"objectPropertiesChanged(int)")) {
991 errors += tr(
"Error: Signal objectPropertiesChanged(int) is deprecated.") +
"\n";
992 errors += tr(
"Error: The signal will be automatically emitted by the object that has been changed and the core will deliver it to the plugins!.") +
"\n";
993 errors += tr(
"Error: Please remove this signal from your plugins!.") +
"\n";
996 if ( checkSlot( plugin ,
"slotViewChanged()" ) )
997 connect(
this,SIGNAL(pluginViewChanged()),plugin,SLOT(slotViewChanged()), Qt::DirectConnection);
999 if ( checkSlot( plugin ,
"slotSceneDrawn()" ) )
1000 connect(
this,SIGNAL(pluginSceneDrawn()),plugin,SLOT(slotSceneDrawn()), Qt::DirectConnection);
1002 if ( checkSlot( plugin ,
"slotDrawModeChanged(int)" ) )
1003 connect(coreWidget_,SIGNAL(drawModeChanged(
int)),plugin,SLOT(slotDrawModeChanged(
int)), Qt::DirectConnection);
1005 if ( checkSlot(plugin,
"slotObjectPropertiesChanged(int)"))
1006 connect(
this,SIGNAL(objectPropertiesChanged(
int)),plugin,SLOT(slotObjectPropertiesChanged(
int)), Qt::DirectConnection);
1008 if ( checkSignal(plugin,
"visibilityChanged()" ) ) {
1009 errors += tr(
"Error: Signal visibilityChanged() now requires objectid or -1 as argument.") +
"\n";
1012 if ( checkSignal(plugin,
"visibilityChanged(int)") ) {
1013 errors += tr(
"Error: Signal visibilityChanged(int) is deprecated!") +
"\n";
1014 errors += tr(
"Error: If an object changes its visibility, it will call the required functions automatically.") +
"\n";
1015 errors += tr(
"Error: If you change a scenegraph node, call nodeVisibilityChanged(int). See docu of this function for details.") +
"\n";
1018 if ( checkSignal(plugin,
"nodeVisibilityChanged(int)") )
1019 connect(plugin,SIGNAL(nodeVisibilityChanged(
int)),
this,SLOT(slotVisibilityChanged(
int)), Qt::DirectConnection);
1022 if ( checkSlot(plugin,
"slotVisibilityChanged(int)") )
1023 connect(
this,SIGNAL(visibilityChanged(
int)),plugin,SLOT(slotVisibilityChanged(
int)), Qt::DirectConnection);
1025 if ( checkSignal(plugin,
"activeObjectChanged()" ) ) {
1026 errors += tr(
"Error: Signal activeObjectChanged() is now objectSelectionChanged( int _objectId )") +
"\n";
1029 if ( checkSlot(plugin,
"slotActiveObjectChanged()" ) ) {
1030 errors += tr(
"Error: Slot slotActiveObjectChanged() is now slotObjectSelectionChanged( int _objectId ) ") +
"\n";
1033 if ( checkSlot(plugin,
"slotAllCleared()") )
1034 connect(
this,SIGNAL(allCleared()),plugin,SLOT(slotAllCleared()));
1037 if ( checkSignal(plugin,
"objectSelectionChanged(int)") ) {
1038 errors += tr(
"Error: Signal objectSelectionChanged(in) is deprecated!") +
"\n";
1039 errors += tr(
"Error: If the selection for an object is changed, the core will emit the required signals itself!") +
"\n";
1042 if ( checkSlot( plugin ,
"slotObjectSelectionChanged(int)" ) )
1043 connect(
this,SIGNAL(objectSelectionChanged(
int)),plugin,SLOT(slotObjectSelectionChanged(
int) ), Qt::DirectConnection);
1046 if ( checkSlot( plugin ,
"pluginsInitialized()" ) )
1047 connect(
this,SIGNAL(pluginsInitialized()),plugin,SLOT(pluginsInitialized()), Qt::DirectConnection);
1049 if ( checkSlot( plugin ,
"pluginsInitialized(QVector<QPair<QString,QString>>const&)" ) )
1050 connect(
this,SIGNAL(pluginsInitialized(QVector<QPair<QString,QString>>
const&)),plugin,SLOT(pluginsInitialized(QVector<QPair<QString,QString>>
const&)), Qt::DirectConnection);
1052 if ( checkSignal(plugin,
"setSlotDescription(QString,QString,QStringList,QStringList)") )
1053 connect(plugin, SIGNAL(setSlotDescription(QString,QString,QStringList,QStringList)),
1054 this, SLOT(slotSetSlotDescription(QString,QString,QStringList,QStringList)) );
1059 if ( checkSignal(plugin,
"setRenderer(unsigned int,QString)" ) ) {
1060 connect(plugin,SIGNAL(setRenderer(
unsigned int,QString)),
this,SLOT(slotSetRenderer(
unsigned int,QString)));
1063 if ( checkSignal(plugin,
"getCurrentRenderer(unsigned int,QString&)" ) ) {
1064 connect(plugin,SIGNAL(getCurrentRenderer(
unsigned int,QString&)),
this,SLOT(slotGetCurrentRenderer(
unsigned int,QString&)), Qt::DirectConnection);
1073 supported = supported +
"Logging ";
1077 loggers_.push_back(newlog);
1078 connect(plugin,SIGNAL(log(
Logtype, QString )),newlog,SLOT(slotLog(
Logtype, QString )),Qt::DirectConnection);
1079 connect(plugin,SIGNAL(log(QString )),newlog,SLOT(slotLog(QString )),Qt::DirectConnection);
1082 if ( OpenFlipper::Options::gui() )
1083 connect(newlog,SIGNAL(log(
Logtype, QString )),coreWidget_,SLOT(slotLog(
Logtype, QString )),Qt::DirectConnection);
1086 connect(newlog,SIGNAL(log(
Logtype, QString )),
this,SLOT(slotLog(
Logtype, QString )),Qt::DirectConnection);
1089 connect(newlog,SIGNAL(log(
Logtype, QString )),
this,SLOT(slotLogToFile(
Logtype, QString )),Qt::DirectConnection);
1092 if ( checkSlot(plugin,
"logOutput(Logtype,QString)") )
1093 connect(
this,SIGNAL(externalLog(
Logtype,QString)), plugin, SLOT(logOutput(
Logtype,QString)) ) ;
1098 if ( menubarPlugin && OpenFlipper::Options::gui() ) {
1099 supported = supported +
"Menubar ";
1101 if ( checkSignal(plugin,
"addMenubarAction(QAction*,QString)") )
1102 connect(plugin , SIGNAL(addMenubarAction(QAction*,QString)),
1103 coreWidget_ , SLOT(slotAddMenubarAction(QAction*,QString)),Qt::DirectConnection);
1104 if ( checkSignal(plugin,
"addMenubarActions(std::vector<QAction*>, QString)") )
1105 connect(plugin , SIGNAL(addMenubarActions(std::vector<QAction*>,QString)),
1106 coreWidget_ , SLOT(slotAddMenubarActions(std::vector<QAction*>,QString)),Qt::DirectConnection);
1107 if ( checkSignal(plugin,
"getMenubarMenu (QString,QMenu*&,bool)") )
1108 connect(plugin , SIGNAL(getMenubarMenu (QString,QMenu*&,
bool)),
1109 coreWidget_ , SLOT(slotGetMenubarMenu (QString,QMenu*&,
bool)),Qt::DirectConnection);
1114 if ( contextMenuPlugin && OpenFlipper::Options::gui() ) {
1115 supported = supported +
"ContextMenu ";
1117 if ( checkSignal(plugin,
"addContextMenuItem(QAction*,ContextMenuType)") )
1118 connect(plugin , SIGNAL(addContextMenuItem(QAction*,
ContextMenuType)),
1119 coreWidget_ , SLOT(slotAddContextItem(QAction*,
ContextMenuType)),Qt::DirectConnection);
1121 if ( checkSignal(plugin,
"addContextMenuItem(QAction*,DataType,ContextMenuType)") )
1125 if ( checkSignal(plugin,
"hideContextMenu()") )
1126 connect(plugin , SIGNAL(hideContextMenu()),
1127 coreWidget_ , SLOT(slotHideContextMenu()),Qt::DirectConnection);
1129 if ( checkSlot(plugin,
"slotUpdateContextMenu(int)") )
1130 connect(coreWidget_ , SIGNAL(updateContextMenu(
int)),
1131 plugin , SLOT(slotUpdateContextMenu(
int)),Qt::DirectConnection);
1133 if ( checkSlot(plugin,
"slotUpdateContextMenuNode(int)") )
1134 connect(coreWidget_ , SIGNAL(updateContextMenuNode(
int)),
1135 plugin , SLOT(slotUpdateContextMenuNode(
int)),Qt::DirectConnection);
1137 if ( checkSlot(plugin,
"slotUpdateContextMenuBackground()") )
1138 connect(coreWidget_ , SIGNAL(updateContextMenuBackground()),
1139 plugin , SLOT(slotUpdateContextMenuBackground()),Qt::DirectConnection);
1144 if ( toolboxPlugin && OpenFlipper::Options::gui() ) {
1145 supported = supported +
"Toolbox ";
1148 if ( checkSignal(plugin,
"addToolbox(QString,QWidget*)"))
1149 connect(plugin, SIGNAL( addToolbox(QString,QWidget*) ),
1150 this, SLOT( addToolbox(QString,QWidget*) ),Qt::DirectConnection );
1152 if ( checkSignal(plugin,
"addToolbox(QString,QWidget*,QIcon*)"))
1153 connect(plugin, SIGNAL( addToolbox(QString,QWidget*,QIcon*) ),
1154 this, SLOT( addToolbox(QString,QWidget*,QIcon*) ),Qt::DirectConnection );
1156 if ( checkSignal(plugin,
"addToolbox(QString,QWidget*,QIcon*,QWidget*)"))
1157 connect(plugin, SIGNAL( addToolbox(QString,QWidget*,QIcon*,QWidget*) ),
1158 this, SLOT( addToolbox(QString,QWidget*,QIcon*,QWidget*) ),Qt::DirectConnection );
1163 if ( viewModePlugin && OpenFlipper::Options::gui() ) {
1164 supported = supported +
"ViewMode ";
1166 if ( checkSignal(plugin,
"defineViewModeToolboxes(QString,QStringList)"))
1167 connect(plugin, SIGNAL( defineViewModeToolboxes(QString, QStringList) ),
1168 coreWidget_, SLOT( slotAddViewModeToolboxes(QString, QStringList) ),Qt::DirectConnection );
1170 if ( checkSignal(plugin,
"defineViewModeToolbars(QString,QStringList)"))
1171 connect(plugin, SIGNAL( defineViewModeToolbars(QString, QStringList) ),
1172 coreWidget_, SLOT( slotAddViewModeToolbars(QString, QStringList) ),Qt::DirectConnection );
1174 if ( checkSignal(plugin,
"defineViewModeContextMenus(QString,QStringList)"))
1175 connect(plugin, SIGNAL( defineViewModeContextMenus(QString, QStringList) ),
1176 coreWidget_, SLOT( slotAddViewModeContextMenus(QString, QStringList) ),Qt::DirectConnection );
1178 if ( checkSignal(plugin,
"defineViewModeIcon(QString,QString)"))
1179 connect(plugin, SIGNAL( defineViewModeIcon(QString, QString) ),
1180 coreWidget_, SLOT( slotSetViewModeIcon(QString, QString) ),Qt::DirectConnection );
1182 if ( checkSignal(plugin,
"setViewMode(QString,bool)"))
1183 connect(plugin, SIGNAL( setViewMode(QString,
bool) ),
1184 coreWidget_, SLOT( setViewMode(QString,
bool) ),Qt::DirectConnection );
1189 if ( optionsPlugin && OpenFlipper::Options::gui() ) {
1190 supported = supported +
"Options ";
1192 QWidget* widget = 0;
1196 if ( checkSlot(plugin,
"applyOptions()") )
1197 connect(coreWidget_ , SIGNAL( applyOptions() ),
1198 plugin , SLOT( applyOptions() ),Qt::DirectConnection);
1204 if ( toolbarPlugin && OpenFlipper::Options::gui() ) {
1205 supported = supported +
"Toolbars ";
1207 if ( checkSignal(plugin,
"addToolbar(QToolBar*)") )
1208 connect(plugin,SIGNAL(addToolbar(QToolBar*)),
1209 coreWidget_,SLOT(slotAddToolbar(QToolBar*)),Qt::DirectConnection);
1211 if ( checkSignal(plugin,
"removeToolbar(QToolBar*)") )
1212 connect(plugin,SIGNAL(removeToolbar(QToolBar*)),
1213 coreWidget_,SLOT(slotRemoveToolbar(QToolBar*)),Qt::DirectConnection);
1215 if ( checkSignal(plugin,
"getToolBar(QString,QToolBar*&)") )
1216 connect(plugin,SIGNAL(getToolBar(QString,QToolBar*&)),
1217 coreWidget_,SLOT(getToolBar(QString,QToolBar*&)),Qt::DirectConnection);
1223 if ( statusbarPlugin && OpenFlipper::Options::gui() ) {
1224 supported = supported +
"StatusBar ";
1226 if ( checkSignal(plugin,
"showStatusMessage(QString,int)") )
1227 connect(plugin,SIGNAL(showStatusMessage(QString,
int)),
1228 coreWidget_,SLOT(statusMessage(QString,
int)),Qt::DirectConnection);
1231 if ( checkSignal(plugin,
"setStatus(ApplicationStatus::applicationStatus)") )
1235 if ( checkSignal(plugin,
"clearStatusMessage()") )
1236 connect(plugin,SIGNAL(clearStatusMessage()),
1237 coreWidget_,SLOT(clearStatusMessage()));
1239 if ( checkSignal(plugin,
"addWidgetToStatusbar(QWidget*)") )
1240 connect(plugin,SIGNAL(addWidgetToStatusbar(QWidget*)), coreWidget_,SLOT(addWidgetToStatusbar(QWidget*)));
1245 if ( keyPlugin && OpenFlipper::Options::gui() ) {
1246 supported = supported +
"KeyboardEvents ";
1248 if ( checkSignal(plugin,
"registerKey(int,Qt::KeyboardModifiers,QString,bool)") )
1249 connect(plugin,SIGNAL( registerKey(
int, Qt::KeyboardModifiers, QString,
bool) ),
1250 coreWidget_,SLOT(slotRegisterKey(
int, Qt::KeyboardModifiers, QString,
bool)) );
1255 if ( mousePlugin && OpenFlipper::Options::gui() ) {
1256 supported = supported +
"MouseEvents ";
1258 if ( checkSlot( plugin ,
"slotMouseWheelEvent(QWheelEvent*,const std::string&)" ) )
1259 connect(
this , SIGNAL(PluginWheelEvent(QWheelEvent * ,
const std::string & )),
1260 plugin , SLOT(slotMouseWheelEvent(QWheelEvent* ,
const std::string & )));
1262 if ( checkSlot( plugin ,
"slotMouseEvent(QMouseEvent*)" ) )
1263 connect(
this , SIGNAL(PluginMouseEvent(QMouseEvent*)),
1264 plugin , SLOT(slotMouseEvent(QMouseEvent*)));
1266 if ( checkSlot( plugin ,
"slotMouseEventLight(QMouseEvent*)" ) )
1267 connect(
this , SIGNAL(PluginMouseEventLight(QMouseEvent*)),
1268 plugin , SLOT(slotMouseEventLight(QMouseEvent*)));
1274 if ( infoPlugin && OpenFlipper::Options::gui() ) {
1275 supported = supported +
"TypeInformation ";
1278 supportedInfoTypes().insert(std::pair<InformationInterface*,DataType>(infoPlugin,dtype));
1283 if ( pickPlugin && OpenFlipper::Options::gui() ) {
1284 supported = supported +
"Picking ";
1286 if ( checkSlot( plugin ,
"slotPickModeChanged(const std::string&)" ) )
1287 connect(coreWidget_,SIGNAL(signalPickModeChanged (
const std::string &)),
1288 plugin,SLOT(slotPickModeChanged(
const std::string &)));
1290 if ( checkSignal(plugin,
"addPickMode(const std::string&)") )
1291 connect(plugin,SIGNAL(addPickMode(
const std::string& )),
1292 this,SLOT(slotAddPickMode(
const std::string& )),Qt::DirectConnection);
1294 if ( checkSignal(plugin,
"addHiddenPickMode(const std::string&)") )
1295 connect(plugin,SIGNAL(addHiddenPickMode(
const std::string& )),
1296 this,SLOT(slotAddHiddenPickMode(
const std::string& )),Qt::DirectConnection);
1298 if ( checkSignal(plugin,
"setPickModeCursor(const std::string&,QCursor)") )
1299 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
1300 connect(plugin,SIGNAL(setPickModeCursor(
const std::string& ,QCursor)),
1301 coreWidget_,SLOT(setPickModeCursor(
const std::string& ,QCursor)),Qt::DirectConnection);
1303 if ( checkSignal(plugin,
"setPickModeMouseTracking(const std::string&,bool)") )
1304 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
1305 connect(plugin,SIGNAL(setPickModeMouseTracking(
const std::string& ,
bool)),
1306 coreWidget_,SLOT(setPickModeMouseTracking(
const std::string& ,
bool)),Qt::DirectConnection);
1308 if ( checkSignal(plugin,
"setPickModeToolbar(const std::string&,QToolBar*)") )
1309 connect(plugin,SIGNAL(setPickModeToolbar (
const std::string&, QToolBar*)),
1310 coreWidget_,SLOT(setPickModeToolbar (
const std::string&, QToolBar*)),Qt::DirectConnection);
1312 if ( checkSignal(plugin,
"removePickModeToolbar(const std::string&)") )
1313 connect(plugin,SIGNAL(removePickModeToolbar(
const std::string&)),
1314 coreWidget_,SLOT(removePickModeToolbar(
const std::string&)),Qt::DirectConnection);
1321 supported = supported +
"INIFile ";
1323 if ( checkSlot( plugin ,
"loadIniFile(INIFile&,int)" ) )
1324 connect(
this , SIGNAL(iniLoad(
INIFile&,
int)),
1325 plugin , SLOT( loadIniFile(
INIFile&,
int) ),Qt::DirectConnection);
1327 if ( checkSlot( plugin ,
"saveIniFile(INIFile&,int)" ) )
1328 connect(
this , SIGNAL(iniSave(
INIFile& ,
int )),
1329 plugin , SLOT( saveIniFile(
INIFile& ,
int ) ),Qt::DirectConnection);
1331 if ( checkSlot( plugin ,
"saveIniFileOptions(INIFile&)" ) )
1332 connect(
this , SIGNAL(iniSaveOptions(
INIFile& )),
1333 plugin , SLOT( saveIniFileOptions(
INIFile& ) ),Qt::DirectConnection);
1335 if ( checkSlot( plugin ,
"saveOnExit(INIFile&)" ) )
1336 connect(
this , SIGNAL(saveOnExit(
INIFile& )),
1337 plugin , SLOT( saveOnExit(
INIFile& ) ),Qt::DirectConnection);
1339 if ( checkSlot( plugin ,
"loadIniFileOptions(INIFile&)" ) )
1340 connect(
this , SIGNAL(iniLoadOptions(
INIFile& )),
1341 plugin , SLOT( loadIniFileOptions(
INIFile& ) ),Qt::DirectConnection);
1343 if ( checkSlot( plugin ,
"loadIniFileOptionsLast(INIFile&)" ) )
1344 connect(
this , SIGNAL(iniLoadOptionsLast(
INIFile& )),
1345 plugin , SLOT( loadIniFileOptionsLast(
INIFile& ) ),Qt::DirectConnection);
1348 #ifdef PYTHON_ENABLED 1353 if ( pythonPlugin ) {
1354 supported = supported +
"PythonInterface ";
1356 QObject* currentPluginPointer = qobject_cast< QObject * >(plugin);
1358 setPluginPointer(basePlugin->
name() , currentPluginPointer);
1366 if ( selectionPlugin && OpenFlipper::Options::gui() ) {
1367 supported = supported +
"SelectionBase ";
1369 if ( checkSignal(plugin,
"addSelectionEnvironment(QString,QString,QIcon,QString&)") ) {
1370 errors += tr(
"Error: Plugin uses deprecated addSelectionEnvironment(QString,QString,QIcon,QString&) , Replace the qicon by the path to the icon!") +
"\n";
1371 log(
LOGERR,tr(
"Plugin uses deprecated addSelectionEnvironment(QString,QString,QIcon,QString&) , Replace the qicon by the path to the icon!"));
1374 if ( checkSignal(plugin,
"addSelectionEnvironment(QString,QString,QString,QString&)") )
1375 connect(plugin , SIGNAL(addSelectionEnvironment(QString,QString,QString,QString&)),
1376 this , SLOT(slotAddSelectionEnvironment(QString,QString,QString,QString&)),Qt::DirectConnection);
1380 if ( checkSlot(plugin,
"slotAddSelectionEnvironment(QString,QString,QIcon,QString&)") ) {
1381 errors += tr(
"Error: Plugin uses deprecated slotAddSelectionEnvironment(QString,QString,QIcon,QString&) , Replace the qicon by the path to the icon!") +
"\n";
1384 if ( checkSlot( plugin ,
"slotAddSelectionEnvironment(QString,QString,QString,QString&)" ) )
1385 connect(
this , SIGNAL(addSelectionEnvironment(QString,QString,QString,QString&)),
1386 plugin , SLOT(slotAddSelectionEnvironment(QString,QString,QString,QString&)),Qt::DirectConnection);
1390 if ( checkSignal(plugin,
"registerType(QString,DataType)") )
1391 connect(plugin , SIGNAL(registerType(QString,
DataType)),
1392 this , SLOT(slotRegisterType(QString,
DataType)),Qt::DirectConnection);
1396 if ( checkSlot( plugin ,
"slotRegisterType(QString,DataType)" ) )
1397 connect(
this , SIGNAL(registerType(QString,
DataType)),
1398 plugin , SLOT(slotRegisterType(QString,
DataType)),Qt::DirectConnection);
1402 if ( checkSignal(plugin,
"addPrimitiveType(QString,QString,QIcon,SelectionInterface::PrimitiveType&)") ) {
1403 errors += tr(
"Error: Plugin uses deprecated addPrimitiveType(QString,QString,QIcon,SelectionInterface::PrimitiveType&) , Replace the qicon by the path to the icon!") +
"\n";
1406 if ( checkSignal(plugin,
"addPrimitiveType(QString,QString,QString,SelectionInterface::PrimitiveType&)") )
1407 connect(plugin , SIGNAL(addPrimitiveType(QString,QString,QString,SelectionInterface::PrimitiveType&)),
1408 this , SLOT(slotAddPrimitiveType(QString,QString,QString,SelectionInterface::PrimitiveType&)),Qt::DirectConnection);
1412 if ( checkSlot(plugin,
"slotAddPrimitiveType(QString,QString,QIcon,SelectionInterface::PrimitiveType&)") )
1413 log(
LOGERR,tr(
"Plugin uses deprecated slotAddPrimitiveType(QString,QString,QIcon,SelectionInterface::PrimitiveType&) , Replace the qicon by the path to the icon!"));
1415 if ( checkSlot( plugin ,
"slotAddPrimitiveType(QString,QString,QString,SelectionInterface::PrimitiveType&)" ) )
1416 connect(
this , SIGNAL(addPrimitiveType(QString,QString,QString,SelectionInterface::PrimitiveType&)),
1417 plugin , SLOT(slotAddPrimitiveType(QString,QString,QString,SelectionInterface::PrimitiveType&)),Qt::DirectConnection);
1421 if ( checkSignal(plugin,
"addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&)") ) {
1422 errors += tr(
"Error: Plugin uses deprecated addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&) , Replace the qicon by the path to the icon!") +
"\n";
1424 log(
LOGERR,tr(
"Plugin uses deprecated addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&) , Replace the qicon by the path to the icon!"));
1427 if ( checkSignal(plugin,
"addCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&)") )
1428 connect(plugin , SIGNAL(addCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&)),
1429 this , SLOT(slotAddCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&)),Qt::DirectConnection);
1433 if ( checkSignal(plugin,
"addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType)") ) {
1434 errors += tr(
"Error: Plugin uses deprecated addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType) , Replace the qicon by the path to the icon!") +
"\n";
1435 log(
LOGERR,tr(
"Plugin uses deprecated addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType) , Replace the qicon by the path to the icon!"));
1438 if ( checkSignal(plugin,
"addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType)") )
1439 connect(plugin , SIGNAL(addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,
DataType)),
1440 this , SLOT(slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,
DataType)),Qt::DirectConnection);
1444 if ( checkSlot(plugin,
"slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&)") ) {
1445 errors += tr(
"Error: Plugin uses deprecated slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&) , Replace the qicon by the path to the icon!") +
"\n";
1446 log(
LOGERR,tr(
"Plugin uses deprecated slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&) , Replace the qicon by the path to the icon!"));
1449 if ( checkSlot( plugin ,
"slotAddCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&)" ) )
1450 connect(
this , SIGNAL(addCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&)),
1451 plugin , SLOT(slotAddCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&)),Qt::DirectConnection);
1455 if ( checkSlot(plugin,
"slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType)") ) {
1456 errors += tr(
"Error: Plugin uses deprecated slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType) , Replace the qicon by the path to the icon!") +
"\n";
1457 log(
LOGERR,tr(
"Plugin uses deprecated slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,DataType) , Replace the qicon by the path to the icon!"));
1460 if ( checkSlot( plugin ,
"slotAddCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&,DataType)" ) )
1461 connect(
this , SIGNAL(addCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&,
DataType)),
1462 plugin , SLOT(slotAddCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&,
DataType)),Qt::DirectConnection);
1467 if ( checkSignal(plugin,
"addSelectionOperations(QString,QStringList,QString,SelectionInterface::PrimitiveType)") )
1468 connect(plugin , SIGNAL(addSelectionOperations(QString,QStringList,QString,SelectionInterface::PrimitiveType)),
1469 this , SLOT(slotAddSelectionOperations(QString,QStringList,QString,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1471 if ( checkSlot( plugin ,
"slotAddSelectionOperations(QString,QStringList,QString,SelectionInterface::PrimitiveType)" ) )
1472 connect(
this , SIGNAL(addSelectionOperations(QString,QStringList,QString,SelectionInterface::PrimitiveType)),
1473 plugin , SLOT(slotAddSelectionOperations(QString,QStringList,QString,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1475 if ( checkSignal(plugin,
"addSelectionParameters(QString,QWidget*,QString,SelectionInterface::PrimitiveType)") )
1476 connect(plugin , SIGNAL(addSelectionParameters(QString,QWidget*,QString,SelectionInterface::PrimitiveType)),
1477 this , SLOT(slotAddSelectionParameters(QString,QWidget*,QString,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1479 if ( checkSlot( plugin ,
"slotAddSelectionParameters(QString,QWidget*,QString,SelectionInterface::PrimitiveType)" ) )
1480 connect(
this , SIGNAL(addSelectionParameters(QString,QWidget*,QString,SelectionInterface::PrimitiveType)),
1481 plugin , SLOT(slotAddSelectionParameters(QString,QWidget*,QString,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1484 if ( checkSignal(plugin,
"selectionOperation(QString)") )
1485 connect(plugin , SIGNAL(selectionOperation(QString)),
1486 this , SLOT(slotSelectionOperation(QString)),Qt::DirectConnection);
1488 if ( checkSlot( plugin ,
"slotSelectionOperation(QString)" ) )
1489 connect(
this , SIGNAL(selectionOperation(QString)),
1490 plugin , SLOT(slotSelectionOperation(QString)),Qt::DirectConnection);
1492 if ( checkSignal(plugin,
"showToggleSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1493 connect(plugin , SIGNAL(showToggleSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1494 this , SLOT(slotShowToggleSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1496 if ( checkSlot( plugin ,
"slotShowToggleSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1497 connect(
this , SIGNAL(showToggleSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1498 plugin , SLOT(slotShowToggleSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1500 if ( checkSignal(plugin,
"showLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1501 connect(plugin , SIGNAL(showLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1502 this , SLOT(slotShowLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1504 if ( checkSlot( plugin ,
"slotShowLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1505 connect(
this , SIGNAL(showLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1506 plugin , SLOT(slotShowLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1508 if ( checkSignal(plugin,
"showVolumeLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1509 connect(plugin , SIGNAL(showVolumeLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1510 this , SLOT(slotShowVolumeLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1512 if ( checkSlot( plugin ,
"slotShowVolumeLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1513 connect(
this , SIGNAL(showVolumeLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1514 plugin , SLOT(slotShowVolumeLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1516 if ( checkSignal(plugin,
"showSurfaceLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1517 connect(plugin , SIGNAL(showSurfaceLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1518 this , SLOT(slotShowSurfaceLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1520 if ( checkSlot( plugin ,
"slotShowSurfaceLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1521 connect(
this , SIGNAL(showSurfaceLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1522 plugin , SLOT(slotShowSurfaceLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1524 if ( checkSignal(plugin,
"showSphereSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1525 connect(plugin , SIGNAL(showSphereSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1526 this , SLOT(slotShowSphereSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1528 if ( checkSlot( plugin ,
"slotShowSphereSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1529 connect(
this , SIGNAL(showSphereSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1530 plugin , SLOT(slotShowSphereSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1532 if ( checkSignal(plugin,
"showClosestBoundarySelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1533 connect(plugin , SIGNAL(showClosestBoundarySelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1534 this , SLOT(slotShowClosestBoundarySelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1536 if ( checkSlot( plugin ,
"slotShowClosestBoundarySelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1537 connect(
this , SIGNAL(showClosestBoundarySelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1538 plugin , SLOT(slotShowClosestBoundarySelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1540 if ( checkSignal(plugin,
"showFloodFillSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1541 connect(plugin , SIGNAL(showFloodFillSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1542 this , SLOT(slotShowFloodFillSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1544 if ( checkSlot( plugin ,
"slotShowFloodFillSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1545 connect(
this , SIGNAL(showFloodFillSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1546 plugin , SLOT(slotShowFloodFillSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1548 if ( checkSignal(plugin,
"showComponentsSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1549 connect(plugin , SIGNAL(showComponentsSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1550 this , SLOT(slotShowComponentsSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1552 if ( checkSlot( plugin ,
"slotShowComponentsSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1553 connect(
this , SIGNAL(showComponentsSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1554 plugin , SLOT(slotShowComponentsSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1556 if ( checkSignal(plugin,
"toggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
1557 connect(plugin , SIGNAL(toggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1558 this , SLOT(slotToggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1560 if ( checkSlot( plugin ,
"slotToggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1561 connect(
this , SIGNAL(toggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1562 plugin , SLOT(slotToggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1564 if ( checkSignal(plugin,
"lassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
1565 connect(plugin , SIGNAL(lassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1566 this , SLOT(slotLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1568 if ( checkSlot( plugin ,
"slotLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1569 connect(
this , SIGNAL(lassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1570 plugin , SLOT(slotLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1572 if ( checkSignal(plugin,
"volumeLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
1573 connect(plugin , SIGNAL(volumeLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1574 this , SLOT(slotVolumeLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1576 if ( checkSlot( plugin ,
"slotVolumeLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1577 connect(
this , SIGNAL(volumeLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1578 plugin , SLOT(slotVolumeLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1580 if ( checkSignal(plugin,
"surfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
1581 connect(plugin , SIGNAL(surfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1582 this , SLOT(slotSurfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1584 if ( checkSlot( plugin ,
"slotSurfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1585 connect(
this , SIGNAL(surfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1586 plugin , SLOT(slotSurfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1588 if ( checkSignal(plugin,
"sphereSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)") )
1589 connect(plugin , SIGNAL(sphereSelection(QMouseEvent*,
double,SelectionInterface::PrimitiveType,
bool)),
1590 this , SLOT(slotSphereSelection(QMouseEvent*,
double,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1592 if ( checkSlot( plugin ,
"slotSphereSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)" ) )
1593 connect(
this , SIGNAL(sphereSelection(QMouseEvent*,
double,SelectionInterface::PrimitiveType,
bool)),
1594 plugin , SLOT(slotSphereSelection(QMouseEvent*,
double,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1596 if ( checkSignal(plugin,
"closestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
1597 connect(plugin , SIGNAL(closestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1598 this , SLOT(slotClosestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1600 if ( checkSlot( plugin ,
"slotClosestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1601 connect(
this , SIGNAL(closestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1602 plugin , SLOT(slotClosestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1604 if ( checkSignal(plugin,
"floodFillSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
1605 connect(plugin , SIGNAL(floodFillSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1606 this , SLOT(slotFloodFillSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1608 if ( checkSlot( plugin ,
"slotFloodFillSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1609 connect(
this , SIGNAL(floodFillSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1610 plugin , SLOT(slotFloodFillSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1612 if ( checkSignal(plugin,
"componentsSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
1613 connect(plugin , SIGNAL(componentsSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1614 this , SLOT(slotComponentsSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1616 if ( checkSlot( plugin ,
"slotComponentsSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1617 connect(
this , SIGNAL(componentsSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1618 plugin , SLOT(slotComponentsSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1620 if ( checkSignal(plugin,
"customSelection(QMouseEvent*,SelectionInterface::PrimitiveType,QString,bool)") )
1621 connect(plugin , SIGNAL(customSelection(QMouseEvent*,SelectionInterface::PrimitiveType,QString,
bool)),
1622 this , SLOT(slotCustomSelection(QMouseEvent*,SelectionInterface::PrimitiveType,QString,
bool)),Qt::DirectConnection);
1624 if ( checkSlot( plugin ,
"slotCustomSelection(QMouseEvent*,SelectionInterface::PrimitiveType,QString,bool)" ) )
1625 connect(
this , SIGNAL(customSelection(QMouseEvent*,SelectionInterface::PrimitiveType,QString,
bool)),
1626 plugin , SLOT(slotCustomSelection(QMouseEvent*,SelectionInterface::PrimitiveType,QString,
bool)),Qt::DirectConnection);
1628 if ( checkSignal(plugin,
"getActiveDataTypes(SelectionInterface::TypeList&)") )
1629 connect(plugin , SIGNAL(getActiveDataTypes(SelectionInterface::TypeList&)),
1630 this , SLOT(slotGetActiveDataTypes(SelectionInterface::TypeList&)),Qt::DirectConnection);
1632 if ( checkSlot( plugin ,
"slotGetActiveDataTypes(SelectionInterface::TypeList&)" ) )
1633 connect(
this , SIGNAL(getActiveDataTypes(SelectionInterface::TypeList&)),
1634 plugin , SLOT(slotGetActiveDataTypes(SelectionInterface::TypeList&)),Qt::DirectConnection);
1636 if ( checkSignal(plugin,
"getActivePrimitiveType(SelectionInterface::PrimitiveType&)") )
1637 connect(plugin , SIGNAL(getActivePrimitiveType(SelectionInterface::PrimitiveType&)),
1638 this , SLOT(slotGetActivePrimitiveType(SelectionInterface::PrimitiveType&)),Qt::DirectConnection);
1640 if ( checkSlot( plugin ,
"slotGetActivePrimitiveType(SelectionInterface::PrimitiveType&)" ) )
1641 connect(
this , SIGNAL(getActivePrimitiveType(SelectionInterface::PrimitiveType&)),
1642 plugin , SLOT(slotGetActivePrimitiveType(SelectionInterface::PrimitiveType&)),Qt::DirectConnection);
1644 if ( checkSignal(plugin,
"targetObjectsOnly(bool&)") )
1645 connect(plugin , SIGNAL(targetObjectsOnly(
bool&)),
1646 this , SLOT(slotTargetObjectsOnly(
bool&)),Qt::DirectConnection);
1648 if ( checkSlot( plugin ,
"slotTargetObjectsOnly(bool&)" ) )
1649 connect(
this , SIGNAL(targetObjectsOnly(
bool&)),
1650 plugin , SLOT(slotTargetObjectsOnly(
bool&)),Qt::DirectConnection);
1652 if ( checkSignal(plugin,
"loadSelection(const INIFile&)") )
1653 connect(plugin , SIGNAL(loadSelection(
const INIFile&)),
1654 this , SLOT(slotLoadSelection(
const INIFile&)),Qt::DirectConnection);
1656 if ( checkSlot( plugin ,
"slotLoadSelection(const INIFile&)" ) )
1657 connect(
this , SIGNAL(loadSelection(
const INIFile&)),
1658 plugin , SLOT(slotLoadSelection(
const INIFile&)),Qt::DirectConnection);
1660 if ( checkSignal(plugin,
"saveSelection(INIFile&)") )
1661 connect(plugin , SIGNAL(saveSelection(
INIFile&)),
1662 this , SLOT(slotSaveSelection(
INIFile&)),Qt::DirectConnection);
1664 if ( checkSlot( plugin ,
"slotSaveSelection(INIFile&)" ) )
1665 connect(
this , SIGNAL(saveSelection(
INIFile&)),
1666 plugin , SLOT(slotSaveSelection(
INIFile&)),Qt::DirectConnection);
1668 if ( checkSignal(plugin,
"registerKeyShortcut(int,Qt::KeyboardModifiers)") )
1669 connect(plugin , SIGNAL(registerKeyShortcut(
int,Qt::KeyboardModifiers)),
1670 this , SLOT(slotRegisterKeyShortcut(
int,Qt::KeyboardModifiers)),Qt::DirectConnection);
1672 if ( checkSlot( plugin ,
"slotRegisterKeyShortcut(int,Qt::KeyboardModifiers)" ) )
1673 connect(
this , SIGNAL(registerKeyShortcut(
int,Qt::KeyboardModifiers)),
1674 plugin , SLOT(slotRegisterKeyShortcut(
int,Qt::KeyboardModifiers)),Qt::DirectConnection);
1676 if ( checkSignal(plugin,
"keyShortcutEvent(int,Qt::KeyboardModifiers)") )
1677 connect(plugin , SIGNAL(keyShortcutEvent(
int,Qt::KeyboardModifiers)),
1678 this , SLOT(slotKeyShortcutEvent(
int,Qt::KeyboardModifiers)),Qt::DirectConnection);
1680 if ( checkSlot( plugin ,
"slotKeyShortcutEvent(int,Qt::KeyboardModifiers)" ) )
1681 connect(
this , SIGNAL(keyShortcutEvent(
int,Qt::KeyboardModifiers)),
1682 plugin , SLOT(slotKeyShortcutEvent(
int,Qt::KeyboardModifiers)),Qt::DirectConnection);
1687 if ( texturePlugin && OpenFlipper::Options::gui() ) {
1688 supported = supported +
"Textures ";
1690 if ( checkSignal(plugin,
"addTexture(QString,QString,uint,int)") )
1691 connect(plugin , SIGNAL(addTexture( QString , QString , uint ,
int )),
1692 this , SLOT(slotAddTexture(QString, QString, uint,
int)),Qt::DirectConnection);
1694 if ( checkSignal(plugin,
"addTexture(QString,QImage,uint,int)") )
1695 connect(plugin , SIGNAL(addTexture( QString , QImage , uint ,
int )),
1696 this , SLOT(slotAddTexture(QString, QImage, uint,
int)),Qt::DirectConnection);
1698 if ( checkSlot( plugin ,
"slotTextureAdded(QString,QString,uint,int)" ) )
1699 connect(
this , SIGNAL(addTexture(QString,QString, uint,
int)),
1700 plugin , SLOT(slotTextureAdded(QString,QString, uint,
int)),Qt::DirectConnection);
1702 if ( checkSlot( plugin ,
"slotTextureAdded(QString,QImage,uint,int)" ) )
1703 connect(
this , SIGNAL(addTexture(QString,QImage, uint,
int)),
1704 plugin , SLOT(slotTextureAdded(QString,QImage, uint,
int)),Qt::DirectConnection);
1706 if ( checkSignal(plugin,
"addTexture(QString,QString,uint)") )
1707 connect(plugin , SIGNAL(addTexture( QString , QString , uint )),
1708 this , SLOT(slotAddTexture(QString, QString, uint)),Qt::AutoConnection);
1710 if ( checkSignal(plugin,
"addTexture(QString,QImage,uint)") )
1711 connect(plugin , SIGNAL(addTexture( QString , QImage , uint )),
1712 this , SLOT(slotAddTexture(QString, QImage, uint)),Qt::AutoConnection);
1714 if ( checkSlot( plugin ,
"slotTextureAdded(QString,QString,uint)" ) )
1715 connect(
this , SIGNAL(addTexture(QString,QString, uint)),
1716 plugin , SLOT(slotTextureAdded(QString,QString, uint)),Qt::DirectConnection);
1718 if ( checkSlot( plugin ,
"slotTextureAdded(QString,QImage,uint)" ) )
1719 connect(
this , SIGNAL(addTexture(QString,QImage, uint)),
1720 plugin , SLOT(slotTextureAdded(QString,QImage, uint)),Qt::DirectConnection);
1722 if ( checkSignal(plugin,
"updateTexture(QString,int)") )
1723 connect(plugin , SIGNAL(updateTexture( QString ,
int )),
1724 this , SLOT(slotUpdateTexture(QString ,
int)),Qt::AutoConnection);
1726 if ( checkSlot( plugin ,
"slotUpdateTexture(QString,int)" ) )
1727 connect(
this , SIGNAL(updateTexture(QString ,
int)),
1728 plugin , SLOT(slotUpdateTexture(QString,
int )),Qt::DirectConnection);
1730 if ( checkSignal(plugin,
"updateAllTextures()") )
1731 connect(plugin , SIGNAL(updateAllTextures()),
1732 this , SLOT(slotUpdateAllTextures()));
1734 if ( checkSlot( plugin ,
"slotUpdateAllTextures()" ) )
1735 connect(
this , SIGNAL(updateAllTextures()),
1736 plugin , SLOT(slotUpdateAllTextures()));
1738 if ( checkSignal(plugin,
"updatedTextures(QString,int)") )
1739 connect(plugin , SIGNAL(updatedTextures( QString ,
int )),
1740 this , SLOT(slotTextureUpdated( QString,
int ) ),Qt::AutoConnection);
1742 if ( checkSlot( plugin ,
"slotTextureUpdated(QString,int)" ) )
1743 connect(
this , SIGNAL(updatedTextures( QString ,
int )),
1744 plugin , SLOT(slotTextureUpdated( QString,
int ) ),Qt::DirectConnection);
1746 if ( checkSignal(plugin,
"setTextureMode(QString,QString,int)") )
1747 connect(plugin , SIGNAL(setTextureMode(QString, QString,
int )),
1748 this , SLOT(slotSetTextureMode(QString, QString,
int )),Qt::AutoConnection );
1750 if ( checkSlot( plugin ,
"slotSetTextureMode(QString,QString,int)" ) )
1751 connect(
this , SIGNAL(setTextureMode(QString, QString,
int )),
1752 plugin , SLOT(slotSetTextureMode(QString, QString,
int )),Qt::DirectConnection );
1754 if ( checkSignal(plugin,
"setTextureMode(QString,QString)") )
1755 connect(plugin , SIGNAL(setTextureMode(QString ,QString )),
1756 this , SLOT(slotSetTextureMode(QString ,QString )),Qt::AutoConnection );
1758 if ( checkSlot( plugin ,
"slotSetTextureMode(QString,QString)" ) )
1759 connect(
this , SIGNAL(setTextureMode(QString ,QString )),
1760 plugin , SLOT(slotSetTextureMode(QString ,QString )),Qt::DirectConnection );
1762 if ( checkSignal(plugin,
"switchTexture(QString,int)") )
1763 connect(plugin , SIGNAL(switchTexture(QString,
int )),
1764 this , SLOT(slotSwitchTexture(QString,
int )),Qt::QueuedConnection);
1766 if ( checkSlot( plugin ,
"slotSwitchTexture(QString,int)" ) )
1767 connect(
this , SIGNAL(switchTexture(QString,
int )),
1768 plugin , SLOT(slotSwitchTexture(QString,
int )),Qt::QueuedConnection);
1770 if ( checkSignal(plugin,
"switchTexture(QString)") )
1771 connect(plugin , SIGNAL(switchTexture(QString )),
1772 this , SLOT(slotSwitchTexture(QString )),Qt::QueuedConnection);
1774 if ( checkSlot( plugin ,
"slotSwitchTexture(QString)" ) )
1775 connect(
this , SIGNAL(switchTexture(QString )),
1776 plugin , SLOT(slotSwitchTexture(QString )),Qt::QueuedConnection);
1780 if ( checkSignal( plugin ,
"textureChangeImage(QString,QImage&,int)" ) )
1781 connect(plugin , SIGNAL(textureChangeImage(QString,QImage&,
int)),
1782 this , SLOT(slotTextureChangeImage(QString,QImage&,
int)),Qt::DirectConnection);
1784 if ( checkSlot( plugin ,
"slotTextureChangeImage(QString,QImage&,int)" ) )
1785 connect(
this , SIGNAL(textureChangeImage(QString,QImage&,
int)),
1786 plugin , SLOT(slotTextureChangeImage(QString,QImage&,
int)),Qt::DirectConnection);
1788 if ( checkSignal( plugin ,
"textureChangeImage(QString,QImage&)" ) )
1789 connect(plugin , SIGNAL(textureChangeImage(QString,QImage&)),
1790 this , SLOT(slotTextureChangeImage(QString,QImage&)),Qt::DirectConnection);
1792 if ( checkSlot( plugin ,
"slotTextureChangeImage(QString,QImage&)" ) )
1793 connect(
this , SIGNAL(textureChangeImage(QString,QImage&)),
1794 plugin , SLOT(slotTextureChangeImage(QString,QImage&)),Qt::DirectConnection);
1796 if ( checkSignal( plugin ,
"addMultiTexture(QString,QString,QString,int,int&)" ) )
1797 connect(plugin , SIGNAL(addMultiTexture(QString,QString,QString,
int,
int&) ),
1798 this , SLOT(slotMultiTextureAdded(QString,QString,QString,
int,
int&) ),Qt::DirectConnection);
1800 if ( checkSignal( plugin ,
"addMultiTexture(QString,QString,QImage,int,int&)" ) )
1801 connect(plugin , SIGNAL(addMultiTexture(QString,QString,QImage,
int,
int&) ),
1802 this , SLOT(slotMultiTextureAdded(QString,QString,QImage,
int,
int&) ),Qt::DirectConnection);
1804 if ( checkSlot( plugin ,
"slotMultiTextureAdded( QString,QString,QString,int,int&)" ) )
1805 connect(
this , SIGNAL(addMultiTexture(QString,QString,QString,
int,
int&) ),
1806 plugin , SLOT(slotMultiTextureAdded( QString,QString,QString,
int,
int&) ),Qt::DirectConnection);
1808 if ( checkSlot( plugin ,
"slotMultiTextureAdded( QString,QString,QImage,int,int&)" ) )
1809 connect(
this , SIGNAL(addMultiTexture(QString,QString,QImage,
int,
int&) ),
1810 plugin , SLOT(slotMultiTextureAdded( QString,QString,QImage,
int,
int&) ),Qt::DirectConnection);
1812 if ( checkSignal( plugin ,
"textureGetImage(QString,QImage&,int)" ) )
1813 connect(plugin , SIGNAL(textureGetImage(QString,QImage&,
int)),
1814 this , SLOT(slotTextureGetImage(QString,QImage&,
int)),Qt::DirectConnection);
1816 if ( checkSlot( plugin ,
"slotTextureGetImage(QString,QImage&,int)" ) )
1817 connect(
this , SIGNAL(textureGetImage(QString,QImage&,
int)),
1818 plugin , SLOT(slotTextureGetImage(QString,QImage&,
int)),Qt::DirectConnection);
1820 if ( checkSignal( plugin ,
"textureGetImage(QString,QImage&)" ) )
1821 connect(plugin , SIGNAL(textureGetImage(QString,QImage&)),
1822 this , SLOT(slotTextureGetImage(QString,QImage&)),Qt::DirectConnection);
1824 if ( checkSlot( plugin ,
"slotTextureGetImage(QString,QImage&)" ) )
1825 connect(
this , SIGNAL(textureGetImage(QString,QImage&)),
1826 plugin , SLOT(slotTextureGetImage(QString,QImage&)),Qt::DirectConnection);
1828 if ( checkSignal( plugin ,
"textureIndex(QString,int,int&)" ) )
1829 connect(plugin , SIGNAL(textureIndex(QString,
int,
int&)),
1830 this , SLOT(slotTextureIndex(QString,
int,
int&)),Qt::DirectConnection);
1832 if ( checkSlot( plugin ,
"slotTextureIndex(QString,int,int&)" ) )
1833 connect(
this , SIGNAL(textureIndex(QString,
int,
int&)),
1834 plugin , SLOT(slotTextureIndex(QString,
int,
int&)),Qt::DirectConnection);
1836 if ( checkSignal( plugin ,
"textureIndexPropertyName(int,QString&)" ) )
1837 connect(plugin , SIGNAL(textureIndexPropertyName(
int,QString&)),
1838 this , SLOT(slotTextureIndexPropertyName(
int,QString&)),Qt::DirectConnection);
1840 if ( checkSlot( plugin ,
"slotTextureIndexPropertyName(int,QString&)" ) )
1841 connect(
this , SIGNAL(textureIndexPropertyName(
int,QString&)),
1842 plugin , SLOT(slotTextureIndexPropertyName(
int,QString&)),Qt::DirectConnection);
1844 if ( checkSignal( plugin ,
"textureName(int,int,QString&)" ) )
1845 connect(plugin , SIGNAL(textureName(
int,
int,QString&)),
1846 this , SLOT(slotTextureName(
int,
int,QString&)),Qt::DirectConnection);
1848 if ( checkSlot( plugin ,
"slotTextureName(int,int,QString&)" ) )
1849 connect(
this , SIGNAL(textureName(
int,
int,QString&)),
1850 plugin , SLOT(slotTextureName(
int,
int,QString&)),Qt::DirectConnection);
1852 if ( checkSignal( plugin ,
"textureFilename(int,QString,QString&)" ) )
1853 connect(plugin , SIGNAL(textureFilename(
int,QString,QString&)),
1854 this , SLOT(slotTextureFilename(
int,QString,QString&)),Qt::DirectConnection);
1856 if ( checkSlot( plugin ,
"slotTextureFilename(int,QString,QString&)" ) )
1857 connect(
this , SIGNAL(textureFilename(
int,QString,QString&)),
1858 plugin , SLOT(slotTextureFilename(
int,QString,QString&)),Qt::DirectConnection);
1860 if ( checkSignal( plugin ,
"getCurrentTexture(int,QString&)" ) )
1861 connect(plugin , SIGNAL(getCurrentTexture(
int,QString&)),
1862 this , SLOT(slotGetCurrentTexture(
int,QString&)),Qt::DirectConnection);
1864 if ( checkSlot( plugin ,
"slotGetCurrentTexture(int,QString&)" ) )
1865 connect(
this , SIGNAL(getCurrentTexture(
int,QString&)),
1866 plugin , SLOT(slotGetCurrentTexture(
int,QString&)),Qt::DirectConnection);
1868 if ( checkSignal( plugin ,
"getSubTextures(int,QString,QStringList&)" ) )
1869 connect(plugin , SIGNAL(getSubTextures(
int,QString,QStringList&)),
1870 this , SLOT(slotGetSubTextures(
int,QString,QStringList&)),Qt::DirectConnection);
1872 if ( checkSlot( plugin ,
"slotGetSubTextures(int,QString,QStringList&)" ) )
1873 connect(
this , SIGNAL(getSubTextures(
int,QString,QStringList&)),
1874 plugin , SLOT(slotGetSubTextures(
int,QString,QStringList&)),Qt::DirectConnection);
1879 if ( backupPlugin ) {
1880 supported = supported +
"Backups ";
1883 if ( checkSignal( plugin ,
"createBackup(int,QString,UpdateType)" ) ) {
1884 connect(plugin , SIGNAL(createBackup(
int,QString,
UpdateType)) ,
1885 this , SIGNAL(createBackup(
int,QString,
UpdateType)),Qt::DirectConnection );
1888 if ( checkSlot( plugin ,
"slotCreateBackup(int,QString,UpdateType)" ) ) {
1889 connect(
this , SIGNAL(createBackup(
int,QString,
UpdateType)),
1890 plugin , SLOT( slotCreateBackup(
int,QString,
UpdateType) ),Qt::DirectConnection);
1894 if ( checkSignal( plugin ,
"createBackup(IdList,QString,std::vector<UpdateType>)" ) ) {
1895 connect(plugin , SIGNAL(createBackup(
IdList,QString,std::vector<UpdateType>)) ,
1896 this , SIGNAL(createBackup(
IdList,QString,std::vector<UpdateType>)),Qt::DirectConnection );
1899 if ( checkSlot( plugin ,
"slotCreateBackup(IdList,QString,std::vector<UpdateType>)" ) ) {
1900 connect(
this , SIGNAL(createBackup(
IdList,QString,std::vector<UpdateType>)),
1901 plugin , SLOT( slotCreateBackup(
IdList,QString,std::vector<UpdateType>) ),Qt::DirectConnection);
1906 if ( checkSignal( plugin ,
"undo(int)" ) ) {
1907 connect(plugin , SIGNAL(undo(
int)) ,
1908 this , SIGNAL(undo(
int)),Qt::DirectConnection );
1912 if ( checkSlot( plugin ,
"slotUndo(int)" ) ) {
1913 connect(
this , SIGNAL(undo(
int)),
1914 plugin , SLOT( slotUndo(
int) ),Qt::DirectConnection);
1918 if ( checkSignal( plugin ,
"redo(int)" ) ) {
1919 connect(plugin , SIGNAL(redo(
int)) ,
1920 this , SIGNAL(redo(
int)),Qt::DirectConnection );
1924 if ( checkSlot( plugin ,
"slotRedo(int)" ) ) {
1925 connect(
this , SIGNAL(redo(
int)),
1926 plugin , SLOT( slotRedo(
int) ),Qt::DirectConnection);
1930 if ( checkSignal( plugin ,
"undo()" ) ) {
1931 connect(plugin , SIGNAL(undo()) ,
1932 this , SIGNAL(undo()),Qt::DirectConnection );
1936 if ( checkSlot( plugin ,
"slotUndo()" ) ) {
1937 connect(
this , SIGNAL(undo()),
1938 plugin , SLOT( slotUndo() ),Qt::DirectConnection);
1942 if ( checkSignal( plugin ,
"redo()" ) ) {
1943 connect(plugin , SIGNAL(redo()) ,
1944 this , SIGNAL(redo()),Qt::DirectConnection );
1948 if ( checkSlot( plugin ,
"slotRedo()" ) ) {
1949 connect(
this , SIGNAL(redo()),
1950 plugin , SLOT( slotRedo() ),Qt::DirectConnection);
1958 if ( checkSignal( plugin ,
"aboutToRestore(int)" ) ) {
1959 connect(plugin , SIGNAL( aboutToRestore(
int)) ,
1960 this , SIGNAL( aboutToRestore(
int) ),Qt::DirectConnection);
1964 if ( checkSignal( plugin ,
"restored(int)" ) ) {
1965 connect(plugin , SIGNAL(restored(
int)) ,
1966 this , SIGNAL( restored(
int) ),Qt::DirectConnection);
1974 if ( checkSlot( plugin ,
"slotAboutToRestore(int)" ) ) {
1975 connect(
this , SIGNAL( aboutToRestore(
int)) ,
1976 plugin , SLOT( slotAboutToRestore(
int) ),Qt::DirectConnection);
1980 if ( checkSlot( plugin ,
"slotRestored(int)" ) ) {
1981 connect(
this , SIGNAL( restored(
int)) ,
1982 plugin , SLOT( slotRestored(
int) ),Qt::DirectConnection);
1986 if ( checkSignal( plugin ,
"generateBackup(int,QString,UpdateType)" ) ) {
1987 connect(plugin , SIGNAL(generateBackup(
int,QString,
UpdateType)) ,
1988 this , SLOT(slotGenerateBackup(
int,QString,
UpdateType)),Qt::DirectConnection );
1994 if ( LoadSavePlugin ) {
1995 supported = supported +
"Load/Save ";
1996 if ( checkSignal(plugin,
"load( QString,DataType,int& )" ) )
1997 connect(plugin , SIGNAL(load( QString,
DataType,
int& )) ,
1998 this , SLOT(slotLoad( QString,
DataType,
int& )),Qt::DirectConnection );
1999 if ( checkSignal(plugin,
"save(int,QString)" ) )
2000 connect(plugin , SIGNAL( save(
int,QString) ) ,
2001 this , SLOT( saveObject(
int,QString) ), Qt::DirectConnection);
2003 if ( checkSlot( plugin ,
"fileOpened(int)" ) )
2004 connect(
this , SIGNAL( openedFile(
int) ) ,
2005 plugin , SLOT( fileOpened(
int ) ),Qt::DirectConnection);
2007 if ( checkSignal(plugin,
"addEmptyObject(DataType,int&)" ) )
2008 connect(plugin , SIGNAL( addEmptyObject(
DataType,
int& )) ,
2009 this , SLOT( slotAddEmptyObject(
DataType,
int&) ),Qt::DirectConnection);
2011 if ( checkSignal(plugin,
"copyObject(int,int&)" ) )
2012 connect(plugin , SIGNAL( copyObject(
int,
int& )) ,
2013 this , SLOT( slotCopyObject(
int,
int&) ),Qt::DirectConnection);
2016 if ( checkSignal(plugin,
"emptyObjectAdded(int)" ) )
2017 connect(plugin , SIGNAL( emptyObjectAdded(
int ) ) ,
2018 this , SLOT( slotEmptyObjectAdded (
int ) ),Qt::QueuedConnection);
2021 if ( checkSlot(plugin,
"addedEmptyObject(int)" ) )
2022 connect(
this , SIGNAL( emptyObjectAdded(
int ) ) ,
2023 plugin , SLOT( addedEmptyObject(
int ) ),Qt::DirectConnection);
2025 if ( checkSignal(plugin,
"deleteObject(int)" ) )
2026 connect(plugin , SIGNAL( deleteObject(
int ) ) ,
2027 this , SLOT( deleteObject(
int ) ),Qt::AutoConnection);
2029 if ( checkSignal(plugin,
"deleteAllObjects()" ) )
2030 connect(plugin , SIGNAL( deleteAllObjects() ) ,
2031 this , SLOT( slotDeleteAllObjects() ),Qt::DirectConnection);
2033 if ( checkSignal(plugin,
"getAllFileFilters(QStringList&)" ) )
2034 connect(plugin , SIGNAL( getAllFileFilters(QStringList&) ) ,
2035 this , SLOT( slotGetAllFilters(QStringList&) ),Qt::DirectConnection);
2037 if ( checkSlot(plugin,
"objectDeleted(int)" ) )
2038 connect(
this , SIGNAL( objectDeleted(
int ) ) ,
2039 plugin , SLOT( objectDeleted(
int ) ),Qt::DirectConnection);
2045 if ( viewPlugin && OpenFlipper::Options::gui() ) {
2046 supported = supported +
"View ";
2048 if ( checkSignal(plugin,
"getStackWidget(QString,QWidget*&)" ) )
2049 connect(plugin , SIGNAL(getStackWidget( QString , QWidget*&)),
2050 coreWidget_ , SLOT( slotGetStackWidget( QString , QWidget*& ) ) ,Qt::DirectConnection );
2051 if ( checkSignal(plugin,
"addStackWidget(QString,QWidget*)" ) )
2052 connect(plugin , SIGNAL(addStackWidget( QString , QWidget*)),
2053 coreWidget_ , SLOT( slotAddStackWidget( QString , QWidget* ) ) ,Qt::DirectConnection );
2054 if ( checkSignal(plugin,
"updateStackWidget(QString,QWidget*)" ) )
2055 connect(plugin , SIGNAL(updateStackWidget( QString , QWidget*)),
2056 coreWidget_ , SLOT( slotUpdateStackWidget( QString , QWidget* ) ) ,Qt::DirectConnection );
2061 if ( processPlugin ) {
2062 supported = supported +
"Process ";
2064 if ( checkSignal(plugin,
"startJob(QString,QString,int,int,bool)" ) )
2065 connect(plugin , SIGNAL(startJob(QString, QString,
int,
int,
bool)),
2066 this , SLOT( slotStartJob(QString, QString,
int,
int,
bool) ), Qt::DirectConnection );
2068 errors += tr(
"Error: Process Interface defined but no startJob signal found!") +
"\n";
2071 if ( checkSignal(plugin,
"setJobState(QString,int)" ) )
2072 connect(plugin , SIGNAL(setJobState(QString,
int)),
2073 this , SLOT( slotSetJobState(QString,
int) ), Qt::QueuedConnection );
2075 errors += tr(
"Error: Process Interface defined but no setJobState signal found!") +
"\n";
2078 if ( checkSignal(plugin,
"setJobName(QString,QString)" ) )
2079 connect(plugin , SIGNAL(setJobName(QString, QString)),
2080 this , SLOT( slotSetJobName(QString, QString) ), Qt::QueuedConnection );
2082 errors += tr(
"Error: Process Interface defined but no setJobName signal found!") +
"\n";
2085 if ( checkSignal(plugin,
"setJobDescription(QString,QString)" ) )
2086 connect(plugin , SIGNAL(setJobDescription(QString, QString)),
2087 this , SLOT( slotSetJobDescription(QString, QString) ), Qt::QueuedConnection );
2089 errors += tr(
"Error: Process Interface defined but no setJobDescription signal found!") +
"\n";
2092 if ( checkSignal(plugin,
"cancelJob(QString)" ) )
2093 connect(plugin , SIGNAL(cancelJob(QString)),
2094 this , SLOT( slotCancelJob(QString) ), Qt::QueuedConnection );
2096 if ( checkSignal(plugin,
"finishJob(QString)" ) )
2097 connect(plugin , SIGNAL(finishJob(QString)),
2098 this , SLOT( slotFinishJob(QString) ), Qt::QueuedConnection );
2100 errors += tr(
"Error: Process Interface defined but no finishJob signal found!") +
"\n";
2103 if ( checkSlot(plugin,
"canceledJob(QString)" ) )
2104 connect(
this , SIGNAL( jobCanceled( QString ) ) ,
2105 plugin , SLOT( canceledJob(QString) ),Qt::QueuedConnection);
2107 errors += tr(
"Error: Process Interface defined but no cancel canceledJob slot found!") +
"\n";
2114 supported = supported +
"RPC ";
2116 if ( checkSignal(plugin,
"pluginExists(QString,bool&)" ) )
2117 connect(plugin , SIGNAL( pluginExists(QString,
bool&) ),
2118 this , SLOT( slotPluginExists(QString,
bool&) ) ,Qt::DirectConnection );
2119 if ( checkSignal(plugin,
"functionExists(QString,QString,bool&)" ) )
2120 connect(plugin , SIGNAL(functionExists(QString,QString,
bool&)),
2121 this , SLOT( slotFunctionExists(QString,QString,
bool&) ) ,Qt::DirectConnection );
2122 if ( checkSignal(plugin,
"call(QString,QString,bool&)" ) )
2123 connect(plugin , SIGNAL(call(QString,QString,
bool&)),
2124 this , SLOT(slotCall(QString,QString,
bool&)) ,Qt::DirectConnection );
2125 if ( checkSignal(plugin,
"call(QString,bool&)" ) )
2126 connect(plugin , SIGNAL(call(QString,
bool&)),
2127 this , SLOT(slotCall(QString,
bool&)) ,Qt::DirectConnection );
2128 if ( checkSignal(plugin,
"getValue(QString,QVariant&)" ) )
2129 connect(plugin , SIGNAL(getValue(QString,QVariant&)),
2130 this , SLOT(slotGetValue(QString,QVariant&)) ,Qt::DirectConnection );
2135 if ( interconnectionPlugin ) {
2136 supported = supported +
"Plugin Interconnection ";
2138 if ( checkSignal(plugin,
"crossPluginConnect(QString,const char*,QString,const char*)" ) ) {
2139 connect(plugin , SIGNAL( crossPluginConnect(QString,
const char*,QString,
const char*) ),
2140 this , SLOT( slotCrossPluginConnect(QString,
const char*,QString,
const char*) ));
2143 if ( checkSignal(plugin,
"crossPluginConnectQueued(QString,const char*,QString,const char*)" ) ) {
2144 connect(plugin , SIGNAL( crossPluginConnectQueued(QString,
const char*,QString,
const char*) ),
2145 this , SLOT( slotCrossPluginConnectQueued(QString,
const char*,QString,
const char*) ));
2151 if ( renderPlugin ) {
2152 supported = supported +
"Rendering ";
2154 if ( checkSlot( plugin ,
"rendererName()" ) ) {
2155 QString rendererNameString =
"";
2158 QMetaObject::invokeMethod(plugin,
"rendererName", Qt::DirectConnection, Q_RETURN_ARG(QString,rendererNameString) ) ;
2161 QString openGLCheck =
"";
2162 QMetaObject::invokeMethod(plugin,
"checkOpenGL", Qt::DirectConnection, Q_RETURN_ARG(QString,openGLCheck) ) ;
2164 if ( openGLCheck !=
"" ) {
2165 errors += tr(
"Error: Insufficient OpenGL capabilities in Renderer Plugin ") + rendererNameString +
" !" +
"\n";
2166 errors += openGLCheck +
"\n";
2168 printPluginLoadLog(errors, warnings);
2173 PluginStorage::pluginsFailed().push_back(info);
2180 if ( ! renderManager().rendererExists(rendererNameString) ) {
2181 rendererInfo = renderManager().
newRenderer(rendererNameString);
2183 errors += tr(
"Error: Renderer Plugin %1 already exists") +
"\n";
2187 if ( rendererInfo != 0) {
2188 rendererInfo->
plugin = renderPlugin;
2189 rendererInfo->
name = basePlugin->
name();
2198 rendererInfo->
modes = supportedModes;
2200 if ( checkSlot( plugin ,
"optionsAction()" ) ) {
2210 errors += tr(
"Error: Renderer Plugin without rendererName Function?!") +
"\n";
2217 if ( postProcessorPlugin ) {
2218 supported = supported +
"PostProcessor ";
2220 if ( checkSlot( plugin ,
"postProcessorName()" ) ) {
2221 QString postProcessorNameString =
"";
2224 QMetaObject::invokeMethod(plugin,
"postProcessorName", Qt::DirectConnection, Q_RETURN_ARG(QString,postProcessorNameString) ) ;
2227 QString openGLCheck =
"";
2228 QMetaObject::invokeMethod(plugin,
"checkOpenGL", Qt::DirectConnection, Q_RETURN_ARG(QString,openGLCheck) ) ;
2230 if ( openGLCheck !=
"" ) {
2231 errors += tr(
"Error: Insufficient OpenGL capabilities in post processor Plugin ") + postProcessorNameString +
" !" +
"\n";
2232 errors += openGLCheck +
"\n";
2237 PluginStorage::pluginsFailed().push_back(info);
2244 if ( ! postProcessorManager().postProcessorExists(postProcessorNameString) ) {
2245 postProcessorInfo = postProcessorManager().
newPostProcessor(postProcessorNameString);
2247 errors += tr(
"Error: PostProcessor Plugin %1 already exists").arg(postProcessorNameString) +
"\n";
2251 if ( postProcessorInfo != 0) {
2252 postProcessorInfo->
plugin = postProcessorPlugin;
2253 postProcessorInfo->
name = basePlugin->
name();
2257 if ( checkSlot( plugin ,
"optionsAction()" ) ) {
2267 errors += tr(
"Error: PostProcessor Plugin without postProcessorName Function?!") +
"\n";
2273 if ( aboutInfoPlugin && OpenFlipper::Options::gui() ) {
2274 supported = supported +
"AboutInfo ";
2276 if ( checkSignal(plugin,
"addAboutInfo(QString,QString)") )
2277 connect(plugin , SIGNAL(addAboutInfo(QString,QString)),
2278 coreWidget_ , SLOT(addAboutInfo(QString,QString)),Qt::DirectConnection);
2284 QScriptValue scriptInstance = scriptEngine_.newQObject(plugin,
2285 QScriptEngine::QtOwnership,
2286 QScriptEngine::ExcludeChildObjects |
2287 QScriptEngine::ExcludeSuperClassMethods |
2288 QScriptEngine::ExcludeSuperClassProperties
2292 QString scriptingName = info.
rpcName;
2294 scriptEngine_.globalObject().setProperty(scriptingName, scriptInstance);
2296 QScriptValueIterator it(scriptInstance);
2297 while (it.hasNext()) {
2301 if ( checkSignal( plugin, it.name().toLatin1() ) )
2306 scriptingFunctions_.push_back( scriptingName +
"." + it.name() );
2312 if ( scriptPlugin ) {
2313 supported = supported +
"Scripting ";
2317 scriptingWrappers_.push_back(newScript);
2321 if ( checkSignal(plugin,
"scriptInfo(QString)" ) ) {
2324 connect(plugin , SIGNAL( scriptInfo(QString) ),
2325 newScript , SLOT( slotScriptInfo(QString) ) ,Qt::DirectConnection );
2328 connect(newScript , SIGNAL( scriptInfo(QString,QString) ),
2329 this , SLOT( slotScriptInfo(QString,QString) ));
2333 if ( checkSlot(plugin,
"slotScriptInfo(QString,QString)") ) {
2334 connect(
this , SIGNAL(scriptInfo(QString,QString)),
2335 plugin , SLOT(slotScriptInfo(QString,QString)));
2339 if ( checkSignal(plugin,
"getDescription(QString,QString&,QStringList&,QStringList&)") )
2340 connect(plugin , SIGNAL( getDescription(QString,QString&,QStringList&,QStringList&) ),
2341 this , SLOT( slotGetDescription(QString,QString&,QStringList&,QStringList&) ));
2346 if ( checkSignal(plugin,
"executeScript(QString)") )
2347 connect(plugin , SIGNAL(executeScript(QString)),
2348 this , SLOT(slotExecuteScript(QString)));
2351 if ( checkSignal(plugin,
"executeFileScript(QString)") )
2352 connect(plugin , SIGNAL(executeFileScript(QString)),
2353 this , SLOT(slotExecuteFileScript(QString)));
2356 if ( checkSlot(plugin,
"slotExecuteScript(QString)") )
2357 connect(
this , SIGNAL(executeScript(QString)),
2358 plugin , SLOT(slotExecuteScript(QString)));
2361 if ( checkSlot(plugin,
"slotExecuteFileScript(QString)") )
2362 connect(
this , SIGNAL(executeFileScript(QString)),
2363 plugin , SLOT(slotExecuteFileScript(QString)));
2368 if ( checkSignal(plugin,
"getScriptingEngine(QScriptEngine*&)") )
2369 connect(plugin , SIGNAL(getScriptingEngine(QScriptEngine*&)),
2370 this , SLOT(slotGetScriptingEngine(QScriptEngine*&)));
2373 if ( checkSignal(plugin,
"getAvailableFunctions(QStringList&)") )
2374 connect(plugin , SIGNAL(getAvailableFunctions(QStringList&)),
2375 this , SLOT(slotGetAllAvailableFunctions(QStringList&)));
2381 info.status = PluginInfo::LOADED;
2385 if (alreadyLoadedAt != -1) {
2386 plugins()[alreadyLoadedAt] = info;
2389 plugins().push_back(info);
2391 printPluginLoadLog(errors, warnings);
2396 if ( checkSlot(plugin,
"initializePlugin()") )
2397 QMetaObject::invokeMethod(plugin,
"initializePlugin", Qt::DirectConnection);
2404 supported = supported +
"File ";
2406 QStringList loadFilters = filePlugin->
getLoadFilters().split(
";;");
2407 QStringList saveFilters = filePlugin->
getSaveFilters().split(
";;");
2410 for (
int i = 0; i < loadFilters.size(); ++i) {
2412 ft.name = basePlugin->
name();
2414 ft.loadFilters = loadFilters[i];
2415 ft.saveFilters =
"";
2416 ft.plugin = filePlugin;
2418 ft.saveMultipleObjects = checkSlot(plugin,
"saveObjects(IdList,QString)");
2420 supportedTypes().push_back(ft);
2422 for (
int i = 0; i < saveFilters.size(); ++i) {
2424 ft.name = basePlugin->
name();
2426 ft.loadFilters =
"";
2427 ft.saveFilters = saveFilters[i];
2428 ft.plugin = filePlugin;
2430 ft.saveMultipleObjects = checkSlot(plugin,
"saveObjects(IdList,QString)");
2432 supportedTypes().push_back(ft);
2436 if ( checkSignal(plugin,
"openedFile(int)" ) )
2437 connect(plugin , SIGNAL( openedFile(
int ) ) ,
2438 this , SLOT( slotFileOpened (
int ) ),Qt::DirectConnection);
2444 supported = supported +
"Type ";
2447 typePlugin->registerType();
2451 dt.name = basePlugin->
name();
2453 dt.plugin = typePlugin;
2456 supportedDataTypes_.push_back(dt);
2459 if ( !LoadSavePlugin && checkSignal(plugin,
"emptyObjectAdded(int)" ) )
2460 connect(plugin , SIGNAL( emptyObjectAdded(
int ) ) ,
2461 this , SLOT( slotEmptyObjectAdded (
int ) ),Qt::DirectConnection);
2465 if ( metadataPlugin ) {
2466 if (checkSlot(plugin,
"slotGenericMetadataDeserialized(QString,QString)")) {
2467 connect(
this, SIGNAL(genericMetadataDeserialized(QString, QString)),
2468 plugin, SLOT(slotGenericMetadataDeserialized(QString, QString)));
2470 if (checkSlot(plugin,
"slotObjectMetadataDeserialized(QString,QString)")) {
2471 connect(
this, SIGNAL(objectMetadataDeserialized(QString, QString)),
2472 plugin, SLOT(slotObjectMetadataDeserialized(QString, QString)));
2474 if (checkSlot(plugin,
"slotObjectMetadataDeserializedJson(QString,QJsonDocument)")) {
2475 connect(
this, SIGNAL(objectMetadataDeserializedJson(QString, QJsonDocument)),
2476 plugin, SLOT(slotObjectMetadataDeserializedJson(QString, QJsonDocument)));
2478 if (checkSignal(plugin,
"metadataDeserialized(QVector<QPair<QString,QString> >)")) {
2479 connect(plugin, SIGNAL(metadataDeserialized(QVector<QPair<QString, QString> >)),
2480 this, SLOT(slotMetadataDeserialized(QVector<QPair<QString, QString> >)));
const QVector< QPair< QString, QString > > & pluginCommandLineOptions()
Get command line plugin settings as key-value pairs.
virtual QAction * optionsAction()
Return options menu.
Interface class for type definitions.
void loadPlugin(const QString &_filename, const bool _silent, QString &_licenseErrors, QObject *_plugin=0)
Function for loading Plugins.
QString description
Description of the plugin.
void loaderReady(QPluginLoader *loader)
Interface class for exporting functions to python.
Options Dialog interface.
void slotBlockPlugin(const QString &_rpcName)
Function for Blocking Plugins. Blocked plugins will unloaded and not loaded wthin the next starts...
QString version
Version of the plugin.
Interface class for receiving mouse events.
QString name
Name of the plugin ( requested from the plugin on load)
bool checkSignal(QObject *_plugin, const char *_signalSignature)
Check if a plugin has a signal.
virtual QString getLoadFilters()=0
void loadPlugins()
Load all plugins from default plugin directory and from INI-File.
QString warnings
Store warnings encountered during plugin loading.
Logtype
Log types for Message Window.
RenderInterface * plugin
Pointer to the loaded plugin (Already casted when loading it)
QString description
Description of the plugin ( requested from the plugin on load)
virtual bool initializeOptionsWidget(QWidget *&_widget)=0
Initialize the Options Widget.
Defines the order in which plugins have to be loaded.
QString description
Description of the plugin ( requested from the plugin on load)
QString name
Name of the plugin ( requested from the plugin on load)
ACG::SceneGraph::DrawModes::DrawMode modes
Supported DrawModes.
Interface for all Plugins which do logging to the logging window of the framework.
void slotShowPlugins()
Show Plugins Dialog.
bool buildIn
Indicates, if the plugin is a built in Plugin (in Plugin directory)
QStringList rpcFunctions
List of exported rpc slots.
applicationStatus
Enum for the statusBar Status Icon.
Interface class for adding view modes to the ui.
QString name
Name of the plugin ( requested from the plugin on load)
PostProcessorInfo * newPostProcessor(QString _name)
Get a new post processor Instance.
virtual QAction * optionsAction()
Return options menu.
std::vector< int > IdList
Standard Type for id Lists used for scripting.
virtual QString name()=0
Return a name for the plugin.
virtual QString version()
Return a version string for your plugin.
DLLEXPORT void registerTypes()
PreloadThread(PreloadAggregator *aggregator)
Preload thread constructor.
void printPluginLoadLog(const QString &errors, const QString &warnings)
Print all info collected about plugin during loading.
void slotUnBlockPlugin(const QString &_rpcName)
Function for UnBlocking Plugins. Plugins will not loaded automatically.
QWidget * optionsWidget
Pointer to plugins options widget (if available)
QString version
Version of the plugin.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
void expectLoaders(int count)
Interface to add global image post processor functions from within plugins.
Interface to call functions across plugins.
RendererInfo * newRenderer(QString _name)
Get a new renderer Instance.
virtual QString description()=0
Return a description of what the plugin is doing.
Interface class for adding copy protection and license management to a plugin.
Interface for all plugins which want to use selection functions.
Control OpenFlippers status bar.
void slotLoadPlugin()
Load Plugins from menu.
QString version
Version of the plugin ( requested from the plugin on load)
virtual DataType supportedType()=0
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
virtual DataType supportedType()=0
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
QPluginLoader * waitForNextLoader()
Keyboard Event Interface.
Interface class for Plugins which have to store information in ini files.
Class for the handling of simple configuration files.
bool checkSlot(QObject *_plugin, const char *_slotSignature)
Check if a plugin has a slot.
QString errors
Store errors encountered during plugin loading.
QString path
Path to the plugin ( set on load )
Interface for all Plugins which provide scriptable Functions.
void run()
preload function
QObject * plugin
Pointer to the loaded plugin (Already casted when loading it)
void setValue(const QString &key, const QVariant &value)
Wrapper function which makes it possible to enable Debugging output with -DOPENFLIPPER_SETTINGS_DEBUG...
Interface to add additional rendering functions from within plugins.
Allow to connect slots between plugins.
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
Provide texture support for a plugin.
QAction * optionsAction
Possible action to add an options action or menu to the system.
Interface class for Thread handling.
virtual QString getSaveFilters()=0
PostProcessorInterface * plugin
Pointer to the loaded plugin (Already casted when loading it)
QAction * optionsAction
Possible action to add an options action or menu to the system.
Interface class from which all plugins have to be created.
Allow access to picking functions.
Interface class for backup handling.
Interface class for file handling.
QString rpcName
Clean rpc name of the plugin.
Interface for all plugins which want to Load or Save files and create Objects.