Changeset 5052 in ntrip for trunk/GnssCenter
- Timestamp:
- Mar 28, 2013, 6:43:15 PM (12 years ago)
- Location:
- trunk/GnssCenter/main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GnssCenter/main/mainwin.cpp
r5045 r5052 41 41 QPluginLoader loader(pluginsDir.absoluteFilePath(fileName)); 42 42 QObject* object = loader.instance(); 43 qDebug() << fileName << object; 44 43 qDebug() << pluginsDir.absoluteFilePath(fileName) << object; 45 44 if (object) { 46 t_plugin Interface* plugin = qobject_cast<t_pluginInterface*>(object);45 t_pluginFactoryInterface* plugin = qobject_cast<t_pluginFactoryInterface*>(object); 47 46 qDebug() << "Plugin: " << plugin; 48 47 if (plugin) { 49 plugin->show(); 48 t_pluginInterface* widget = plugin->create(); 49 widget->show(); 50 50 } 51 51 } -
trunk/GnssCenter/main/plugininterface.h
r5014 r5052 8 8 class t_pluginInterface { 9 9 public: 10 virtual ~t_pluginInterface() {}11 virtual bool expectInputFile() const = 0;12 virtual void setInputFile(const QString& fileName) = 0;13 10 virtual void show() = 0; 11 }; 12 13 class t_pluginFactoryInterface { 14 public: 15 virtual t_pluginInterface* create() = 0; 14 16 }; 15 17 16 18 } // namespace GnssCenter 17 19 18 Q_DECLARE_INTERFACE(GnssCenter::t_plugin Interface, "GnssCenter_pluginInterface")20 Q_DECLARE_INTERFACE(GnssCenter::t_pluginFactoryInterface, "GnssCenter_pluginFactoryInterface") 19 21 20 22 #endif
Note:
See TracChangeset
for help on using the changeset viewer.