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);
186 aggregator_->expectLoaders(1);
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);
211 aggregator_->loaderReady(loader);
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()) ;
394 splash_->showMessage( splashMessage_ , Qt::AlignBottom | Qt::AlignLeft , Qt::white);
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) {
415 splashMessage_ = tr(
"Initializing Plugin %1/%2")
416 .arg(std::distance(loadedPlugins.begin(), it) + 1)
417 .arg(loadedPlugins.size());
418 splash_->showMessage( splashMessage_ , Qt::AlignBottom | Qt::AlignLeft , Qt::white);
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;
561 emit pluginsInitialized();
563 emit log(
LOGOUT,tr(
"Loaded %n Plugin(s)",
"",
int(plugins_.size())) );
570 if ( OpenFlipper::Options::nogui() )
578 if ( OpenFlipper::Options::isWindows() )
579 filter =
"Plugins (*.dll)";
581 filter =
"Plugins (*.so)";
584 QString filename = ACG::getOpenFileName(coreWidget_,tr(
"Load Plugin"),filter,
OpenFlipperSettings().value(
"Core/CurrentDir").toString() );
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 =
"";
636 loadPlugin(filename,
false,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() ){
664 connect(dialog, SIGNAL( loadPlugin() ),
this, SLOT( slotLoadPlugin() ));
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)
687 if (plugins_[i].name == _name)
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)
698 if (plugins_[i].name == _name)
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++)
750 if (plugins_[k].path == _filename)
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() ) {
774 splashMessage_ = splashMessage_ +
" " + basePlugin->
name() ;
775 splash_->showMessage( splashMessage_ , Qt::AlignBottom | Qt::AlignLeft , Qt::white);
779 for (
unsigned int k=0; k < plugins_.size(); k++){
781 QString name_nospace = basePlugin->
name();
782 name_nospace.remove(
" ");
784 if (plugins_[k].name == name_nospace && plugins_[k].path != _filename && plugins_[k].status == PluginInfo::LOADED){
785 if (_silent || OpenFlipper::Options::nogui() ){
786 emit log(
LOGWARN, tr(
"\t\t\t Already loaded from %1").arg( plugins_[k].path) );
787 emit log(
LOGOUT,
"================================================================================");
791 int ret = QMessageBox::question(coreWidget_,
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)
799 emit log(
LOGWARN, tr(
"\t\t\t Already loaded from %1.").arg( plugins_[k].path));
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,
"================================================================================");
841 emit log(
LOGOUT,tr(
"Plugin Desciption :\t %1 ").arg( basePlugin->
description()) );
843 supported =
"BaseInterface ";
846 if ( checkSlot(plugin,
"version()") )
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,
"================================================================================");
869 if ( checkSignal(plugin,
"update_view()") ) {
870 log(
LOGERR,tr(
"Plugin Uses old style update_view! Convert to updateView!"));
871 emit log(
LOGOUT,
"================================================================================");
875 if ( checkSignal(plugin,
"updateView()") )
876 connect(plugin,SIGNAL(updateView()),
this,SLOT(updateView()), Qt::AutoConnection);
878 if ( checkSignal(plugin,
"blockScenegraphUpdates(bool)") )
879 connect(plugin,SIGNAL(blockScenegraphUpdates(
bool)),
this,SLOT(blockScenegraphUpdates(
bool)), Qt::QueuedConnection);
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."));
884 connect(plugin,SIGNAL(updatedObject(
int,
const UpdateType&)),
this,SLOT(slotObjectUpdated(
int,
const UpdateType&)), Qt::AutoConnection);
888 if ( checkSignal(plugin,
"updatedObject(int)") ){
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&)") )
894 connect(plugin,SIGNAL(updatedObject(
int,
const UpdateType&)),
this,SLOT(slotObjectUpdated(
int,
const UpdateType&)), Qt::AutoConnection);
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."));
900 connect(
this,SIGNAL(signalObjectUpdated(
int,
const UpdateType&)),plugin,SLOT(slotObjectUpdated(
int,
const UpdateType&)), Qt::DirectConnection);
904 if ( checkSlot( plugin ,
"slotObjectUpdated(int)" ) ){
905 log(
LOGWARN,tr(
"Plugin uses deprecated slotObjectUpdated."));
906 connect(
this,SIGNAL(signalObjectUpdated(
int)),plugin,SLOT(slotObjectUpdated(
int)), Qt::DirectConnection);
909 if ( checkSlot( plugin ,
"slotObjectUpdated(int,const UpdateType&)" ) )
910 connect(
this,SIGNAL(signalObjectUpdated(
int,
const UpdateType&)),plugin,SLOT(slotObjectUpdated(
int,
const UpdateType&)), Qt::DirectConnection);
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)"))
929 connect(
this,SIGNAL(objectPropertiesChanged(
int)),plugin,SLOT(slotObjectPropertiesChanged(
int)), Qt::DirectConnection);
931 if ( checkSignal(plugin,
"visibilityChanged()" ) )
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)") )
945 connect(
this,SIGNAL(visibilityChanged(
int)),plugin,SLOT(slotVisibilityChanged(
int)), Qt::DirectConnection);
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)" ) )
963 connect(
this,SIGNAL(objectSelectionChanged(
int)),plugin,SLOT(slotObjectSelectionChanged(
int) ), Qt::DirectConnection);
966 if ( checkSlot( plugin ,
"pluginsInitialized()" ) )
967 connect(
this,SIGNAL(pluginsInitialized()),plugin,SLOT(pluginsInitialized()), Qt::DirectConnection);
969 if ( checkSignal(plugin,
"setSlotDescription(QString,QString,QStringList,QStringList)") )
970 connect(plugin, SIGNAL(setSlotDescription(QString,QString,QStringList,QStringList)),
971 this, SLOT(slotSetSlotDescription(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 ";
994 loggers_.push_back(newlog);
995 connect(plugin,SIGNAL(log(
Logtype, QString )),newlog,SLOT(slotLog(
Logtype, QString )),Qt::DirectConnection);
996 connect(plugin,SIGNAL(log(QString )),newlog,SLOT(slotLog(QString )),Qt::DirectConnection);
999 if ( OpenFlipper::Options::gui() )
1000 connect(newlog,SIGNAL(log(
Logtype, QString )),coreWidget_,SLOT(slotLog(
Logtype, QString )),Qt::DirectConnection);
1003 connect(newlog,SIGNAL(log(
Logtype, QString )),
this,SLOT(slotLog(
Logtype, QString )),Qt::DirectConnection);
1006 connect(newlog,SIGNAL(log(
Logtype, QString )),
this,SLOT(slotLogToFile(
Logtype, QString )),Qt::DirectConnection);
1009 if ( checkSlot(plugin,
"logOutput(Logtype,QString)") )
1010 connect(
this,SIGNAL(externalLog(
Logtype,QString)), plugin, SLOT(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)),
1036 coreWidget_ , SLOT(slotAddContextItem(QAction*,
ContextMenuType)),Qt::DirectConnection);
1038 if ( checkSignal(plugin,
"addContextMenuItem(QAction*,DataType,ContextMenuType)") )
1042 if ( checkSignal(plugin,
"hideContextMenu()") )
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) ),
1101 coreWidget_, SLOT( setViewMode(QString,
bool) ),Qt::DirectConnection );
1106 if ( optionsPlugin && OpenFlipper::Options::gui() ) {
1107 supported = supported +
"Options ";
1109 QWidget* widget = 0;
1113 if ( checkSlot(plugin,
"applyOptions()") )
1114 connect(coreWidget_ , SIGNAL( applyOptions() ),
1115 plugin , SLOT( applyOptions() ),Qt::DirectConnection);
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)") )
1152 if ( checkSignal(plugin,
"clearStatusMessage()") )
1153 connect(plugin,SIGNAL(clearStatusMessage()),
1154 coreWidget_,SLOT(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*)" ) )
1180 connect(
this , SIGNAL(PluginMouseEvent(QMouseEvent*)),
1181 plugin , SLOT(slotMouseEvent(QMouseEvent*)));
1183 if ( checkSlot( plugin ,
"slotMouseEventLight(QMouseEvent*)" ) )
1184 connect(
this , SIGNAL(PluginMouseEventLight(QMouseEvent*)),
1185 plugin , SLOT(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& )),
1213 this,SLOT(slotAddHiddenPickMode(
const std::string& )),Qt::DirectConnection);
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)" ) )
1241 connect(
this , SIGNAL(iniLoad(
INIFile&,
int)),
1242 plugin , SLOT( loadIniFile(
INIFile&,
int) ),Qt::DirectConnection);
1244 if ( checkSlot( plugin ,
"saveIniFile(INIFile&,int)" ) )
1245 connect(
this , SIGNAL(iniSave(
INIFile& ,
int )),
1246 plugin , SLOT( saveIniFile(
INIFile& ,
int ) ),Qt::DirectConnection);
1248 if ( checkSlot( plugin ,
"saveIniFileOptions(INIFile&)" ) )
1249 connect(
this , SIGNAL(iniSaveOptions(
INIFile& )),
1250 plugin , SLOT( saveIniFileOptions(
INIFile& ) ),Qt::DirectConnection);
1252 if ( checkSlot( plugin ,
"saveOnExit(INIFile&)" ) )
1253 connect(
this , SIGNAL(saveOnExit(
INIFile& )),
1254 plugin , SLOT( saveOnExit(
INIFile& ) ),Qt::DirectConnection);
1256 if ( checkSlot( plugin ,
"loadIniFileOptions(INIFile&)" ) )
1257 connect(
this , SIGNAL(iniLoadOptions(
INIFile& )),
1258 plugin , SLOT( loadIniFileOptions(
INIFile& ) ),Qt::DirectConnection);
1260 if ( checkSlot( plugin ,
"loadIniFileOptionsLast(INIFile&)" ) )
1261 connect(
this , SIGNAL(iniLoadOptionsLast(
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&)") )
1274 connect(plugin , SIGNAL(addSelectionEnvironment(QString,QString,QString,QString&)),
1275 this , SLOT(slotAddSelectionEnvironment(QString,QString,QString,QString&)),Qt::DirectConnection);
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&)" ) )
1283 connect(
this , SIGNAL(addSelectionEnvironment(QString,QString,QString,QString&)),
1284 plugin , SLOT(slotAddSelectionEnvironment(QString,QString,QString,QString&)),Qt::DirectConnection);
1288 if ( checkSignal(plugin,
"registerType(QString,DataType)") )
1289 connect(plugin , SIGNAL(registerType(QString,
DataType)),
1290 this , SLOT(slotRegisterType(QString,
DataType)),Qt::DirectConnection);
1294 if ( checkSlot( plugin ,
"slotRegisterType(QString,DataType)" ) )
1295 connect(
this , SIGNAL(registerType(QString,
DataType)),
1296 plugin , SLOT(slotRegisterType(QString,
DataType)),Qt::DirectConnection);
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)") )
1331 connect(plugin , SIGNAL(addCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,
DataType)),
1332 this , SLOT(slotAddCustomSelectionMode(QString,QString,QString,QIcon,SelectionInterface::PrimitiveType,QString&,
DataType)),Qt::DirectConnection);
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)" ) )
1349 connect(
this , SIGNAL(addCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&,
DataType)),
1350 plugin , SLOT(slotAddCustomSelectionMode(QString,QString,QString,QString,SelectionInterface::PrimitiveType,QString&,
DataType)),Qt::DirectConnection);
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)") )
1364 connect(plugin , SIGNAL(selectionOperation(QString)),
1365 this , SLOT(slotSelectionOperation(QString)),Qt::DirectConnection);
1367 if ( checkSlot( plugin ,
"slotSelectionOperation(QString)" ) )
1368 connect(
this , SIGNAL(selectionOperation(QString)),
1369 plugin , SLOT(slotSelectionOperation(QString)),Qt::DirectConnection);
1371 if ( checkSignal(plugin,
"showToggleSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1372 connect(plugin , SIGNAL(showToggleSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1373 this , SLOT(slotShowToggleSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1375 if ( checkSlot( plugin ,
"slotShowToggleSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1376 connect(
this , SIGNAL(showToggleSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1377 plugin , SLOT(slotShowToggleSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1379 if ( checkSignal(plugin,
"showLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1380 connect(plugin , SIGNAL(showLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1381 this , SLOT(slotShowLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1383 if ( checkSlot( plugin ,
"slotShowLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1384 connect(
this , SIGNAL(showLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1385 plugin , SLOT(slotShowLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1387 if ( checkSignal(plugin,
"showVolumeLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1388 connect(plugin , SIGNAL(showVolumeLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1389 this , SLOT(slotShowVolumeLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1391 if ( checkSlot( plugin ,
"slotShowVolumeLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1392 connect(
this , SIGNAL(showVolumeLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1393 plugin , SLOT(slotShowVolumeLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1395 if ( checkSignal(plugin,
"showSurfaceLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1396 connect(plugin , SIGNAL(showSurfaceLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1397 this , SLOT(slotShowSurfaceLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1399 if ( checkSlot( plugin ,
"slotShowSurfaceLassoSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1400 connect(
this , SIGNAL(showSurfaceLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1401 plugin , SLOT(slotShowSurfaceLassoSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1403 if ( checkSignal(plugin,
"showSphereSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1404 connect(plugin , SIGNAL(showSphereSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1405 this , SLOT(slotShowSphereSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1407 if ( checkSlot( plugin ,
"slotShowSphereSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1408 connect(
this , SIGNAL(showSphereSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1409 plugin , SLOT(slotShowSphereSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1411 if ( checkSignal(plugin,
"showClosestBoundarySelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1412 connect(plugin , SIGNAL(showClosestBoundarySelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1413 this , SLOT(slotShowClosestBoundarySelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1415 if ( checkSlot( plugin ,
"slotShowClosestBoundarySelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1416 connect(
this , SIGNAL(showClosestBoundarySelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1417 plugin , SLOT(slotShowClosestBoundarySelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1419 if ( checkSignal(plugin,
"showFloodFillSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1420 connect(plugin , SIGNAL(showFloodFillSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1421 this , SLOT(slotShowFloodFillSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1423 if ( checkSlot( plugin ,
"slotShowFloodFillSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1424 connect(
this , SIGNAL(showFloodFillSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1425 plugin , SLOT(slotShowFloodFillSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1427 if ( checkSignal(plugin,
"showComponentsSelectionMode(QString,bool,SelectionInterface::PrimitiveType)") )
1428 connect(plugin , SIGNAL(showComponentsSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1429 this , SLOT(slotShowComponentsSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
1431 if ( checkSlot( plugin ,
"slotShowComponentsSelectionMode(QString,bool,SelectionInterface::PrimitiveType)" ) )
1432 connect(
this , SIGNAL(showComponentsSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),
1433 plugin , SLOT(slotShowComponentsSelectionMode(QString,
bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
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)),
1453 this , SLOT(slotVolumeLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
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)),
1461 this , SLOT(slotSurfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1463 if ( checkSlot( plugin ,
"slotSurfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1464 connect(
this , SIGNAL(surfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1465 plugin , SLOT(slotSurfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
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)") )
1476 connect(plugin , SIGNAL(closestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1477 this , SLOT(slotClosestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
1479 if ( checkSlot( plugin ,
"slotClosestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
1480 connect(
this , SIGNAL(closestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),
1481 plugin , SLOT(slotClosestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,
bool)),Qt::DirectConnection);
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&)") )
1508 connect(plugin , SIGNAL(getActiveDataTypes(SelectionInterface::TypeList&)),
1509 this , SLOT(slotGetActiveDataTypes(SelectionInterface::TypeList&)),Qt::DirectConnection);
1511 if ( checkSlot( plugin ,
"slotGetActiveDataTypes(SelectionInterface::TypeList&)" ) )
1512 connect(
this , SIGNAL(getActiveDataTypes(SelectionInterface::TypeList&)),
1513 plugin , SLOT(slotGetActiveDataTypes(SelectionInterface::TypeList&)),Qt::DirectConnection);
1515 if ( checkSignal(plugin,
"getActivePrimitiveType(SelectionInterface::PrimitiveType&)") )
1516 connect(plugin , SIGNAL(getActivePrimitiveType(SelectionInterface::PrimitiveType&)),
1517 this , SLOT(slotGetActivePrimitiveType(SelectionInterface::PrimitiveType&)),Qt::DirectConnection);
1519 if ( checkSlot( plugin ,
"slotGetActivePrimitiveType(SelectionInterface::PrimitiveType&)" ) )
1520 connect(
this , SIGNAL(getActivePrimitiveType(SelectionInterface::PrimitiveType&)),
1521 plugin , SLOT(slotGetActivePrimitiveType(SelectionInterface::PrimitiveType&)),Qt::DirectConnection);
1523 if ( checkSignal(plugin,
"targetObjectsOnly(bool&)") )
1524 connect(plugin , SIGNAL(targetObjectsOnly(
bool&)),
1525 this , SLOT(slotTargetObjectsOnly(
bool&)),Qt::DirectConnection);
1527 if ( checkSlot( plugin ,
"slotTargetObjectsOnly(bool&)" ) )
1528 connect(
this , SIGNAL(targetObjectsOnly(
bool&)),
1529 plugin , SLOT(slotTargetObjectsOnly(
bool&)),Qt::DirectConnection);
1531 if ( checkSignal(plugin,
"loadSelection(const INIFile&)") )
1532 connect(plugin , SIGNAL(loadSelection(
const INIFile&)),
1533 this , SLOT(slotLoadSelection(
const INIFile&)),Qt::DirectConnection);
1535 if ( checkSlot( plugin ,
"slotLoadSelection(const INIFile&)" ) )
1536 connect(
this , SIGNAL(loadSelection(
const INIFile&)),
1537 plugin , SLOT(slotLoadSelection(
const INIFile&)),Qt::DirectConnection);
1539 if ( checkSignal(plugin,
"saveSelection(INIFile&)") )
1540 connect(plugin , SIGNAL(saveSelection(
INIFile&)),
1541 this , SLOT(slotSaveSelection(
INIFile&)),Qt::DirectConnection);
1543 if ( checkSlot( plugin ,
"slotSaveSelection(INIFile&)" ) )
1544 connect(
this , SIGNAL(saveSelection(
INIFile&)),
1545 plugin , SLOT(slotSaveSelection(
INIFile&)),Qt::DirectConnection);
1547 if ( checkSignal(plugin,
"registerKeyShortcut(int,Qt::KeyboardModifiers)") )
1548 connect(plugin , SIGNAL(registerKeyShortcut(
int,Qt::KeyboardModifiers)),
1549 this , SLOT(slotRegisterKeyShortcut(
int,Qt::KeyboardModifiers)),Qt::DirectConnection);
1551 if ( checkSlot( plugin ,
"slotRegisterKeyShortcut(int,Qt::KeyboardModifiers)" ) )
1552 connect(
this , SIGNAL(registerKeyShortcut(
int,Qt::KeyboardModifiers)),
1553 plugin , SLOT(slotRegisterKeyShortcut(
int,Qt::KeyboardModifiers)),Qt::DirectConnection);
1555 if ( checkSignal(plugin,
"keyShortcutEvent(int,Qt::KeyboardModifiers)") )
1556 connect(plugin , SIGNAL(keyShortcutEvent(
int,Qt::KeyboardModifiers)),
1557 this , SLOT(slotKeyShortcutEvent(
int,Qt::KeyboardModifiers)),Qt::DirectConnection);
1559 if ( checkSlot( plugin ,
"slotKeyShortcutEvent(int,Qt::KeyboardModifiers)" ) )
1560 connect(
this , SIGNAL(keyShortcutEvent(
int,Qt::KeyboardModifiers)),
1561 plugin , SLOT(slotKeyShortcutEvent(
int,Qt::KeyboardModifiers)),Qt::DirectConnection);
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)") )
1586 connect(plugin , SIGNAL(updateTexture( QString ,
int )),
1587 this , SLOT(slotUpdateTexture(QString ,
int)),Qt::AutoConnection);
1589 if ( checkSlot( plugin ,
"slotUpdateTexture(QString,int)" ) )
1590 connect(
this , SIGNAL(updateTexture(QString ,
int)),
1591 plugin , SLOT(slotUpdateTexture(QString,
int )),Qt::DirectConnection);
1593 if ( checkSignal(plugin,
"updateAllTextures()") )
1594 connect(plugin , SIGNAL(updateAllTextures()),
1595 this , SLOT(slotUpdateAllTextures()));
1597 if ( checkSlot( plugin ,
"slotUpdateAllTextures()" ) )
1598 connect(
this , SIGNAL(updateAllTextures()),
1599 plugin , SLOT(slotUpdateAllTextures()));
1601 if ( checkSignal(plugin,
"updatedTextures(QString,int)") )
1602 connect(plugin , SIGNAL(updatedTextures( QString ,
int )),
1603 this , SLOT(slotTextureUpdated( QString,
int ) ),Qt::AutoConnection);
1605 if ( checkSlot( plugin ,
"slotTextureUpdated(QString,int)" ) )
1606 connect(
this , SIGNAL(updatedTextures( QString ,
int )),
1607 plugin , SLOT(slotTextureUpdated( QString,
int ) ),Qt::DirectConnection);
1609 if ( checkSignal(plugin,
"setTextureMode(QString,QString,int)") )
1610 connect(plugin , SIGNAL(setTextureMode(QString, QString,
int )),
1611 this , SLOT(slotSetTextureMode(QString, QString,
int )),Qt::AutoConnection );
1613 if ( checkSlot( plugin ,
"slotSetTextureMode(QString,QString,int)" ) )
1614 connect(
this , SIGNAL(setTextureMode(QString, QString,
int )),
1615 plugin , SLOT(slotSetTextureMode(QString, QString,
int )),Qt::DirectConnection );
1617 if ( checkSignal(plugin,
"setTextureMode(QString,QString)") )
1618 connect(plugin , SIGNAL(setTextureMode(QString ,QString )),
1619 this , SLOT(slotSetTextureMode(QString ,QString )),Qt::AutoConnection );
1621 if ( checkSlot( plugin ,
"slotSetTextureMode(QString,QString)" ) )
1622 connect(
this , SIGNAL(setTextureMode(QString ,QString )),
1623 plugin , SLOT(slotSetTextureMode(QString ,QString )),Qt::DirectConnection );
1625 if ( checkSignal(plugin,
"switchTexture(QString,int)") )
1626 connect(plugin , SIGNAL(switchTexture(QString,
int )),
1627 this , SLOT(slotSwitchTexture(QString,
int )),Qt::AutoConnection);
1629 if ( checkSlot( plugin ,
"slotSwitchTexture(QString,int)" ) )
1630 connect(
this , SIGNAL(switchTexture(QString,
int )),
1631 plugin , SLOT(slotSwitchTexture(QString,
int )),Qt::DirectConnection);
1633 if ( checkSignal(plugin,
"switchTexture(QString)") )
1634 connect(plugin , SIGNAL(switchTexture(QString )),
1635 this , SLOT(slotSwitchTexture(QString )),Qt::AutoConnection);
1637 if ( checkSlot( plugin ,
"slotSwitchTexture(QString)" ) )
1638 connect(
this , SIGNAL(switchTexture(QString )),
1639 plugin , SLOT(slotSwitchTexture(QString )),Qt::DirectConnection);
1643 if ( checkSignal( plugin ,
"textureChangeImage(QString,QImage&,int)" ) )
1644 connect(plugin , SIGNAL(textureChangeImage(QString,QImage&,
int)),
1645 this , SLOT(slotTextureChangeImage(QString,QImage&,
int)),Qt::DirectConnection);
1647 if ( checkSlot( plugin ,
"slotTextureChangeImage(QString,QImage&,int)" ) )
1648 connect(
this , SIGNAL(textureChangeImage(QString,QImage&,
int)),
1649 plugin , SLOT(slotTextureChangeImage(QString,QImage&,
int)),Qt::DirectConnection);
1651 if ( checkSignal( plugin ,
"textureChangeImage(QString,QImage&)" ) )
1652 connect(plugin , SIGNAL(textureChangeImage(QString,QImage&)),
1653 this , SLOT(slotTextureChangeImage(QString,QImage&)),Qt::DirectConnection);
1655 if ( checkSlot( plugin ,
"slotTextureChangeImage(QString,QImage&)" ) )
1656 connect(
this , SIGNAL(textureChangeImage(QString,QImage&)),
1657 plugin , SLOT(slotTextureChangeImage(QString,QImage&)),Qt::DirectConnection);
1659 if ( checkSignal( plugin ,
"addMultiTexture(QString,QString,QString,int,int&)" ) )
1660 connect(plugin , SIGNAL(addMultiTexture(QString,QString,QString,
int,
int&) ),
1661 this , SLOT(slotMultiTextureAdded(QString,QString,QString,
int,
int&) ),Qt::DirectConnection);
1663 if ( checkSlot( plugin ,
"slotMultiTextureAdded( QString,QString,QString,int,int&)" ) )
1664 connect(
this , SIGNAL(addMultiTexture(QString,QString,QString,
int,
int&) ),
1665 plugin , SLOT(slotMultiTextureAdded( QString,QString,QString,
int,
int&) ),Qt::DirectConnection);
1667 if ( checkSignal( plugin ,
"textureGetImage(QString,QImage&,int)" ) )
1668 connect(plugin , SIGNAL(textureGetImage(QString,QImage&,
int)),
1669 this , SLOT(slotTextureGetImage(QString,QImage&,
int)),Qt::DirectConnection);
1671 if ( checkSlot( plugin ,
"slotTextureGetImage(QString,QImage&,int)" ) )
1672 connect(
this , SIGNAL(textureGetImage(QString,QImage&,
int)),
1673 plugin , SLOT(slotTextureGetImage(QString,QImage&,
int)),Qt::DirectConnection);
1675 if ( checkSignal( plugin ,
"textureGetImage(QString,QImage&)" ) )
1676 connect(plugin , SIGNAL(textureGetImage(QString,QImage&)),
1677 this , SLOT(slotTextureGetImage(QString,QImage&)),Qt::DirectConnection);
1679 if ( checkSlot( plugin ,
"slotTextureGetImage(QString,QImage&)" ) )
1680 connect(
this , SIGNAL(textureGetImage(QString,QImage&)),
1681 plugin , SLOT(slotTextureGetImage(QString,QImage&)),Qt::DirectConnection);
1683 if ( checkSignal( plugin ,
"textureIndex(QString,int,int&)" ) )
1684 connect(plugin , SIGNAL(textureIndex(QString,
int,
int&)),
1685 this , SLOT(slotTextureIndex(QString,
int,
int&)),Qt::DirectConnection);
1687 if ( checkSlot( plugin ,
"slotTextureIndex(QString,int,int&)" ) )
1688 connect(
this , SIGNAL(textureIndex(QString,
int,
int&)),
1689 plugin , SLOT(slotTextureIndex(QString,
int,
int&)),Qt::DirectConnection);
1691 if ( checkSignal( plugin ,
"textureIndexPropertyName(int,QString&)" ) )
1692 connect(plugin , SIGNAL(textureIndexPropertyName(
int,QString&)),
1693 this , SLOT(slotTextureIndexPropertyName(
int,QString&)),Qt::DirectConnection);
1695 if ( checkSlot( plugin ,
"slotTextureIndexPropertyName(int,QString&)" ) )
1696 connect(
this , SIGNAL(textureIndexPropertyName(
int,QString&)),
1697 plugin , SLOT(slotTextureIndexPropertyName(
int,QString&)),Qt::DirectConnection);
1699 if ( checkSignal( plugin ,
"textureName(int,int,QString&)" ) )
1700 connect(plugin , SIGNAL(textureName(
int,
int,QString&)),
1701 this , SLOT(slotTextureName(
int,
int,QString&)),Qt::DirectConnection);
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&)" ) )
1708 connect(plugin , SIGNAL(textureFilename(
int,QString,QString&)),
1709 this , SLOT(slotTextureFilename(
int,QString,QString&)),Qt::DirectConnection);
1711 if ( checkSlot( plugin ,
"slotTextureFilename(int,QString,QString&)" ) )
1712 connect(
this , SIGNAL(textureFilename(
int,QString,QString&)),
1713 plugin , SLOT(slotTextureFilename(
int,QString,QString&)),Qt::DirectConnection);
1715 if ( checkSignal( plugin ,
"getCurrentTexture(int,QString&)" ) )
1716 connect(plugin , SIGNAL(getCurrentTexture(
int,QString&)),
1717 this , SLOT(slotGetCurrentTexture(
int,QString&)),Qt::DirectConnection);
1719 if ( checkSlot( plugin ,
"slotGetCurrentTexture(int,QString&)" ) )
1720 connect(
this , SIGNAL(getCurrentTexture(
int,QString&)),
1721 plugin , SLOT(slotGetCurrentTexture(
int,QString&)),Qt::DirectConnection);
1723 if ( checkSignal( plugin ,
"getSubTextures(int,QString,QStringList&)" ) )
1724 connect(plugin , SIGNAL(getSubTextures(
int,QString,QStringList&)),
1725 this , SLOT(slotGetSubTextures(
int,QString,QStringList&)),Qt::DirectConnection);
1727 if ( checkSlot( plugin ,
"slotGetSubTextures(int,QString,QStringList&)" ) )
1728 connect(
this , SIGNAL(getSubTextures(
int,QString,QStringList&)),
1729 plugin , SLOT(slotGetSubTextures(
int,QString,QStringList&)),Qt::DirectConnection);
1734 if ( backupPlugin ) {
1735 supported = supported +
"Backups ";
1738 if ( checkSignal( plugin ,
"createBackup(int,QString,UpdateType)" ) ) {
1739 connect(plugin , SIGNAL(createBackup(
int,QString,
UpdateType)) ,
1740 this , SIGNAL(createBackup(
int,QString,
UpdateType)),Qt::DirectConnection );
1743 if ( checkSlot( plugin ,
"slotCreateBackup(int,QString,UpdateType)" ) ) {
1744 connect(
this , SIGNAL(createBackup(
int,QString,
UpdateType)),
1745 plugin , SLOT( slotCreateBackup(
int,QString,
UpdateType) ),Qt::DirectConnection);
1749 if ( checkSignal( plugin ,
"createBackup(IdList,QString,std::vector<UpdateType>)" ) ) {
1750 connect(plugin , SIGNAL(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>)" ) ) {
1755 connect(
this , SIGNAL(createBackup(
IdList,QString,std::vector<UpdateType>)),
1756 plugin , SLOT( slotCreateBackup(
IdList,QString,std::vector<UpdateType>) ),Qt::DirectConnection);
1761 if ( checkSignal( plugin ,
"undo(int)" ) ) {
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);
1773 if ( checkSignal( plugin ,
"redo(int)" ) ) {
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);
1785 if ( checkSignal( plugin ,
"undo()" ) ) {
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);
1797 if ( checkSignal( plugin ,
"redo()" ) ) {
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)" ) ) {
1814 connect(plugin , SIGNAL( aboutToRestore(
int)) ,
1815 this , SIGNAL( aboutToRestore(
int) ),Qt::DirectConnection);
1819 if ( checkSignal( plugin ,
"restored(int)" ) ) {
1820 connect(plugin , SIGNAL(restored(
int)) ,
1821 this , SIGNAL( restored(
int) ),Qt::DirectConnection);
1829 if ( checkSlot( plugin ,
"slotAboutToRestore(int)" ) ) {
1830 connect(
this , SIGNAL( aboutToRestore(
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)) ,
1843 this , SLOT(slotGenerateBackup(
int,QString,
UpdateType)),Qt::DirectConnection );
1849 if ( LoadSavePlugin ) {
1850 supported = supported +
"Load/Save ";
1851 if ( checkSignal(plugin,
"load( QString,DataType,int& )" ) )
1852 connect(plugin , SIGNAL(load( QString,
DataType,
int& )) ,
1853 this , SLOT(slotLoad( QString,
DataType,
int& )),Qt::DirectConnection );
1854 if ( checkSignal(plugin,
"save(int,QString)" ) )
1855 connect(plugin , SIGNAL( save(
int,QString) ) ,
1856 this , SLOT( saveObject(
int,QString) ), Qt::DirectConnection);
1858 if ( checkSlot( plugin ,
"fileOpened(int)" ) )
1859 connect(
this , SIGNAL( openedFile(
int) ) ,
1860 plugin , SLOT( fileOpened(
int ) ),Qt::DirectConnection);
1862 if ( checkSignal(plugin,
"addEmptyObject(DataType,int&)" ) )
1863 connect(plugin , SIGNAL( addEmptyObject(
DataType,
int& )) ,
1864 this , SLOT( slotAddEmptyObject(
DataType,
int&) ),Qt::DirectConnection);
1866 if ( checkSignal(plugin,
"copyObject(int,int&)" ) )
1867 connect(plugin , SIGNAL( copyObject(
int,
int& )) ,
1868 this , SLOT( slotCopyObject(
int,
int&) ),Qt::DirectConnection);
1871 if ( checkSignal(plugin,
"emptyObjectAdded(int)" ) )
1872 connect(plugin , SIGNAL( emptyObjectAdded(
int ) ) ,
1873 this , SLOT( slotEmptyObjectAdded (
int ) ),Qt::QueuedConnection);
1876 if ( checkSlot(plugin,
"addedEmptyObject(int)" ) )
1877 connect(
this , SIGNAL( emptyObjectAdded(
int ) ) ,
1878 plugin , SLOT( addedEmptyObject(
int ) ),Qt::DirectConnection);
1880 if ( checkSignal(plugin,
"deleteObject(int)" ) )
1881 connect(plugin , SIGNAL( deleteObject(
int ) ) ,
1882 this , SLOT( deleteObject(
int ) ),Qt::AutoConnection);
1884 if ( checkSignal(plugin,
"deleteAllObjects()" ) )
1885 connect(plugin , SIGNAL( deleteAllObjects() ) ,
1886 this , SLOT( slotDeleteAllObjects() ),Qt::DirectConnection);
1888 if ( checkSignal(plugin,
"getAllFileFilters(QStringList&)" ) )
1889 connect(plugin , SIGNAL( getAllFileFilters(QStringList&) ) ,
1890 this , SLOT( slotGetAllFilters(QStringList&) ),Qt::DirectConnection);
1892 if ( checkSlot(plugin,
"objectDeleted(int)" ) )
1893 connect(
this , SIGNAL( 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)),
1927 this , SLOT( slotSetJobState(QString,
int) ), Qt::QueuedConnection );
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)),
1939 this , SLOT( slotSetJobDescription(QString, QString) ), Qt::QueuedConnection );
1941 emit log(
LOGERR,
"Process Interface defined but no setJobDescription signal found!");
1943 if ( checkSignal(plugin,
"cancelJob(QString)" ) )
1944 connect(plugin , SIGNAL(cancelJob(QString)),
1945 this , SLOT( slotCancelJob(QString) ), Qt::QueuedConnection );
1947 if ( checkSignal(plugin,
"finishJob(QString)" ) )
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)" ) )
1954 connect(
this , SIGNAL( jobCanceled( 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&) ),
1967 this , SLOT( slotPluginExists(QString,
bool&) ) ,Qt::DirectConnection );
1968 if ( checkSignal(plugin,
"functionExists(QString,QString,bool&)" ) )
1969 connect(plugin , SIGNAL(functionExists(QString,QString,
bool&)),
1970 this , SLOT( slotFunctionExists(QString,QString,
bool&) ) ,Qt::DirectConnection );
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 );
1974 if ( checkSignal(plugin,
"call(QString,bool&)" ) )
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*) ),
1989 this , SLOT( slotCrossPluginConnect(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 +
" !");
2010 emit log(
LOGERR,openGLCheck);
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 +
" !");
2068 emit log(
LOGERR,openGLCheck);
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() ) )
2136 scriptingFunctions_.push_back( scriptingName +
"." + it.name() );
2142 if ( scriptPlugin ) {
2143 supported = supported +
"Scripting ";
2147 scriptingWrappers_.push_back(newScript);
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) ),
2159 this , SLOT( slotScriptInfo(QString,QString) ));
2163 if ( checkSlot(plugin,
"slotScriptInfo(QString,QString)") ) {
2164 connect(
this , SIGNAL(scriptInfo(QString,QString)),
2165 plugin , SLOT(slotScriptInfo(QString,QString)));
2169 if ( checkSignal(plugin,
"getDescription(QString,QString&,QStringList&,QStringList&)") )
2170 connect(plugin , SIGNAL( getDescription(QString,QString&,QStringList&,QStringList&) ),
2171 this , SLOT( slotGetDescription(QString,QString&,QStringList&,QStringList&) ));
2176 if ( checkSignal(plugin,
"executeScript(QString)") )
2177 connect(plugin , SIGNAL(executeScript(QString)),
2178 this , SLOT(slotExecuteScript(QString)));
2181 if ( checkSignal(plugin,
"executeFileScript(QString)") )
2182 connect(plugin , SIGNAL(executeFileScript(QString)),
2183 this , SLOT(slotExecuteFileScript(QString)));
2186 if ( checkSlot(plugin,
"slotExecuteScript(QString)") )
2187 connect(
this , SIGNAL(executeScript(QString)),
2188 plugin , SLOT(slotExecuteScript(QString)));
2191 if ( checkSlot(plugin,
"slotExecuteFileScript(QString)") )
2192 connect(
this , SIGNAL(executeFileScript(QString)),
2193 plugin , SLOT(slotExecuteFileScript(QString)));
2198 if ( checkSignal(plugin,
"getScriptingEngine(QScriptEngine*&)") )
2199 connect(plugin , SIGNAL(getScriptingEngine(QScriptEngine*&)),
2200 this , SLOT(slotGetScriptingEngine(QScriptEngine*&)));
2203 if ( checkSignal(plugin,
"getAvailableFunctions(QStringList&)") )
2204 connect(plugin , SIGNAL(getAvailableFunctions(QStringList&)),
2205 this , SLOT(slotGetAllAvailableFunctions(QStringList&)));
2212 info.status = PluginInfo::LOADED;
2213 if (alreadyLoadedAt != -1)
2214 plugins_[alreadyLoadedAt] = info;
2216 plugins_.push_back(info);
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);
2260 if ( checkSignal(plugin,
"openedFile(int)" ) )
2261 connect(plugin , SIGNAL( openedFile(
int ) ) ,
2262 this , SLOT( slotFileOpened (
int ) ),Qt::DirectConnection);
2268 supported = supported +
"Type ";
2271 typePlugin->registerType();
2275 dt.name = basePlugin->
name();
2277 dt.plugin = typePlugin;
2280 supportedDataTypes_.push_back(dt);
2283 if ( !LoadSavePlugin && checkSignal(plugin,
"emptyObjectAdded(int)" ) )
2284 connect(plugin , SIGNAL( emptyObjectAdded(
int ) ) ,
2285 this , SLOT( slotEmptyObjectAdded (
int ) ),Qt::DirectConnection);
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,
"================================================================================");
ACG::SceneGraph::DrawModes::DrawMode modes
Supported DrawModes.
Options Dialog interface.
QAction * optionsAction
Possible action to add an options action or menu to the system.
void loadPlugin(const QString &_filename, const bool _silent, QString &_licenseErrors, QObject *_plugin=0)
Function for loading Plugins.
Interface class for creating custom context menus.
Interface class for receiving mouse events.
virtual DataType supportedType()=0
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
QPluginLoader * waitForNextLoader()
virtual QAction * optionsAction()
Return options menu.
QString name
Name of the plugin ( requested from the plugin on load)
Logtype
Log types for Message Window.
DLLEXPORT void registerTypes()
Control OpenFlippers status bar.
Allow to connect slots between plugins.
Keyboard Event Interface.
QString rpcName
Clean rpc name of the plugin.
virtual DataType supportedDataTypes()=0
Get data type for information requests.
QAction * optionsAction
Possible action to add an options action or menu to the system.
Defines the order in which plugins have to be loaded.
Enables implementers to react on deserialization of meta data.
Interface class for type definitions.
RendererInfo * newRenderer(QString _name)
Get a new renderer Instance.
QString description
Description of the plugin ( requested from the plugin on load)
virtual bool initializeOptionsWidget(QWidget *&_widget)=0
Initialize the Options Widget.
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
Interface to add global image post processor functions from within plugins.
Interface for all Plugins which provide scriptable Functions.
Interface class for Plugins which have to store information in ini files.
Interface class from which all plugins have to be created.
Interface class for Thread handling.
QString path
Path to the plugin ( set on load )
bool buildIn
Indicates, if the plugin is a built in Plugin (in Plugin directory)
void slotShowPlugins()
Show Plugins Dialog.
bool checkSignal(QObject *_plugin, const char *_signalSignature)
Check if a plugin has a signal.
Plugins can add its own toolbox to the main widget's toolbox area by using this interface.
Interface for all Plugins which do logging to the logging window of the framework.
Interface to add additional rendering functions from within plugins.
virtual QString getLoadFilters()=0
void setValue(const QString &key, const QVariant &value)
Wrapper function which makes it possible to enable Debugging output with -DOPENFLIPPER_SETTINGS_DEBUG...
void slotLoadPlugin()
Load Plugins from menu.
Interface for all plugins which provide entries to the main menubar.
PostProcessorInfo * newPostProcessor(QString _name)
Get a new post processor Instance.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
QString description
Description of the plugin.
virtual QString name()=0
Return a name for the plugin.
Class for the handling of simple configuration files.
void expectLoaders(int count)
QString name
Name of the plugin ( requested from the plugin on load)
QObject * plugin
Pointer to the loaded plugin (Already casted when loading it)
QString description
Description of the plugin ( requested from the plugin on load)
virtual DataType supportedType()=0
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
Interface class for file handling.
QWidget * optionsWidget
Pointer to plugins options widget (if available)
Interface for all plugins which want to use selection functions.
Provide texture support for a plugin.
std::vector< int > IdList
Standard Type for id Lists used for scripting.
virtual QString getSaveFilters()=0
PostProcessorInterface * plugin
Pointer to the loaded plugin (Already casted when loading it)
virtual QString description()=0
Return a description of what the plugin is doing.
Interface class for adding view modes to the ui.
void slotUnBlockPlugin(const QString &_rpcName)
Function for UnBlocking Plugins. Plugins will not loaded automatically.
applicationStatus
Enum for the statusBar Status Icon.
QString version
Version of the plugin ( requested from the plugin on load)
PreloadThread(PreloadAggregator *aggregator)
Preload thread constructor.
RenderInterface * plugin
Pointer to the loaded plugin (Already casted when loading it)
Interface for all plugins which want to Load or Save files and create Objects.
Interface class for adding copy protection and license management to a plugin.
QStringList rpcFunctions
List of exported rpc slots.
void loaderReady(QPluginLoader *loader)
virtual QString version()
Return a version string for your plugin.
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.
void loadPlugins()
Load all plugins from default plugin directory and from INI-File.
bool checkSlot(QObject *_plugin, const char *_slotSignature)
Check if a plugin has a slot.
Interface to call functions across plugins.
virtual QAction * optionsAction()
Return options menu.
QString version
Version of the plugin.
Interface class for providing information on objects.
Interface class for backup handling.
void run()
preload function
QString name
Name of the plugin ( requested from the plugin on load)
Add a toolbox to OpenFlipper.
Allow access to picking functions.