Changeset 5052 in ntrip for trunk/GnssCenter


Ignore:
Timestamp:
Mar 28, 2013, 6:43:15 PM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/GnssCenter/main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GnssCenter/main/mainwin.cpp

    r5045 r5052  
    4141    QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
    4242    QObject* object = loader.instance();
    43     qDebug() << fileName << object;
    44 
     43    qDebug() << pluginsDir.absoluteFilePath(fileName) << object;
    4544    if (object) {
    46       t_pluginInterface* plugin = qobject_cast<t_pluginInterface*>(object);
     45      t_pluginFactoryInterface* plugin = qobject_cast<t_pluginFactoryInterface*>(object);
    4746      qDebug() << "Plugin: " << plugin; 
    4847      if (plugin) {
    49         plugin->show();
     48        t_pluginInterface* widget = plugin->create();
     49        widget->show();
    5050      }
    5151    }
  • trunk/GnssCenter/main/plugininterface.h

    r5014 r5052  
    88class t_pluginInterface {
    99 public:
    10   virtual ~t_pluginInterface() {}
    11   virtual bool expectInputFile() const = 0;
    12   virtual void setInputFile(const QString& fileName) = 0;
    1310  virtual void show() = 0;
     11};
     12
     13class t_pluginFactoryInterface {
     14 public:
     15  virtual t_pluginInterface* create() = 0;
    1416};
    1517
    1618} // namespace GnssCenter
    1719
    18 Q_DECLARE_INTERFACE(GnssCenter::t_pluginInterface, "GnssCenter_pluginInterface")
     20Q_DECLARE_INTERFACE(GnssCenter::t_pluginFactoryInterface, "GnssCenter_pluginFactoryInterface")
    1921
    2022#endif
Note: See TracChangeset for help on using the changeset viewer.