00001 #ifndef PLUGIN_HOWTO_H 00002 #define PLUGIN_HOWTO_H 00003 00004 #include "interfaces/ialgorithm.h" 00005 #include <QObject> 00006 00007 class PluginHowtoAlgorithm : public IAlgorithm 00008 { 00009 public: 00010 bool requireCreator() const { return true; } 00011 void setAutomataCreator(const QSharedPointer<IAutomataCreator> &creator); 00012 00013 bool hasSettingsDialog() const { return false; } 00014 void runSettingsDialog(QWidget *) {} 00015 00016 QString getName() const { return "Demo algorithm"; } 00017 int getInputCount() const { return 0; } 00018 00019 bool run(const IAutomaton::TAutomataList &input, 00020 QSharedPointer<IAutomaton> &result, 00021 QString *report) const; 00022 00023 private: 00024 QSharedPointer<IAutomataCreator> m_creator; 00025 }; 00026 00027 class PluginHowtoHolder : public QObject, public IAlgorithmHolder 00028 { 00029 Q_OBJECT 00030 Q_INTERFACES(IAlgorithmHolder) 00031 public: 00032 PluginHowtoHolder(); 00033 ~PluginHowtoHolder(); 00034 00035 IAlgorithm::TAlgorithmList getAlgorithms() const; 00036 00037 QString getVersion() const { return "2.0"; } 00038 00039 QString getPluginName() const { return "Plugin howto"; } 00040 }; 00041 00042 #endif // PLUGIN_HOWTO_H