module.h
00001 #ifndef NETCONF_MODULE_H 00002 #define NETCONF_MODULE_H 00003 00004 #include <qobject.h> 00005 #if QT_VERSION < 300 00006 #include <qlist.h> 00007 #else 00008 #include <qptrlist.h> 00009 #endif 00010 #include <qmap.h> 00011 #include "interface.h" 00012 00013 class QWidget; 00014 class QTabWidget; 00015 00016 00048 class Module : QObject{ 00049 00050 signals: 00057 void updateInterface(Interface *i); 00058 00059 00060 public: 00061 Module(){}; 00062 00067 virtual const QString type() = 0; 00068 00076 virtual void setProfile(const QString &newProfile) = 0; 00077 00083 virtual QString getPixmapName(Interface *) = 0; 00084 00100 virtual bool isOwner(Interface *){ return false; }; 00101 00109 virtual QWidget *configure(Interface *){ return NULL; } ; 00110 00122 virtual QWidget *information(Interface *){ return NULL; }; 00123 00134 virtual QList<Interface> getInterfaces() = 0; 00135 00149 virtual void possibleNewInterfaces(QMap<QString, QString> &list) = 0; 00150 00159 virtual Interface *addNewInterface(const QString &name) = 0; 00160 00165 virtual bool remove(Interface* i) = 0; 00166 00170 virtual void receive(const QCString &msg, const QByteArray &arg) = 0; 00171 00172 QStringList handledInterfaceNames()const { return m_inter; } 00173 protected: 00179 void setHandledInterfaceNames( const QStringList& in) { m_inter = in; } 00180 00181 private: 00182 QStringList m_inter; 00183 }; 00184 00185 #endif 00186 00187 // module.h 00188
