00001 /*************************************************************************** 00002 ** 00003 ** This file is part of DinverCore. 00004 ** 00005 ** This file may be distributed and/or modified under the terms of the 00006 ** GNU General Public License version 2 or 3 as published by the Free 00007 ** Software Foundation and appearing in the file LICENSE.GPL included 00008 ** in the packaging of this file. 00009 ** 00010 ** This file is distributed in the hope that it will be useful, but WITHOUT 00011 ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 ** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00013 ** more details. 00014 ** 00015 ** You should have received a copy of the GNU General Public License 00016 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 ** 00018 ** See http://www.geopsy.org for more information. 00019 ** 00020 ** Created : 2005-11-05 00021 ** Authors: 00022 ** Marc Wathelet 00023 ** Marc Wathelet (LGIT, Grenoble, France) 00024 ** 00025 ***************************************************************************/ 00026 00027 #ifndef DINVERINTERFACE_H 00028 #define DINVERINTERFACE_H 00029 00030 #include <QGpCoreTools.h> 00031 #include "DinverCoreDLLExport.h" 00032 #include "DinverCoreVersion.h" 00033 00034 class QMenu; 00035 00036 namespace DinverCore { 00037 00038 class AbstractForward; 00039 00040 class DINVERCORE_EXPORT DinverInterface : public QObject 00041 { 00042 Q_OBJECT 00043 public: 00044 virtual ~DinverInterface() {} 00045 00046 virtual QString tag() const=0 ; 00047 virtual QString title() const=0 ; 00048 virtual QString version() const=0 ; 00049 virtual QString description() const; 00050 00051 virtual QWidget * createTargetWidget(); 00052 virtual QWidget * createParamWidget(); 00053 00054 virtual void addFileMenu(QMenu * m); 00055 virtual void addViewMenu(QMenu * m); 00056 virtual void clear(); 00057 00058 virtual bool setArguments(int& /* argc */, char ** /* argv */) {return true;} 00059 virtual bool xmlSupport() const {return false;} 00060 virtual void xml_writeChildren(XML_WRITECHILDREN_ARGS) const; 00061 virtual XMLMember xml_member(XML_MEMBER_ARGS); 00062 virtual bool xml_polishChild(XML_POLISHCHILD_ARGS); 00063 00064 virtual AbstractForward * createForward()=0; 00065 virtual bool initForward(AbstractForward * /*forward*/) {return true;} 00066 virtual void setCurrentForward(AbstractForward * /*forwards*/, const QString& /*caption*/ ) {} 00067 00068 bool isValid() const; 00069 virtual const char * interfaceVersion() const=0 ; 00070 }; 00071 00072 } // namespace DinverCore 00073 00074 Q_DECLARE_INTERFACE(DinverCore::DinverInterface, "org.geopsy.dinverInterface/1.0" ); 00075 00076 #endif // DINVERINTERFACE_H