File indexing completed on 2023-10-03 03:28:36
0001 /*************************************************************************** 0002 cmapfilefilterbase.h 0003 ------------------- 0004 begin : Mon May 27 2002 0005 copyright : (C) 2002 by Kmud Developer Team 0006 email : kmud-devel@kmud.de 0007 ***************************************************************************/ 0008 0009 /*************************************************************************** 0010 * * 0011 * This program is free software; you can redistribute it and/or modify * 0012 * it under the terms of the GNU General Public License as published by * 0013 * the Free Software Foundation; either version 2 of the License, or * 0014 * (at your option) any later version. * 0015 * * 0016 ***************************************************************************/ 0017 0018 #ifndef CMAPFILEFILTERBASE_H 0019 #define CMAPFILEFILTERBASE_H 0020 0021 0022 #include <qfile.h> 0023 0024 #include <kurl.h> 0025 0026 class CMapManager; 0027 0028 /**This class is used as a base calls for all save/load filters 0029 *@author Kmud Developer Team 0030 */ 0031 0032 class CMapFileFilterBase 0033 { 0034 public: 0035 CMapFileFilterBase(CMapManager *manager); 0036 virtual ~CMapFileFilterBase(); 0037 0038 /** This returns name of the import/export filter. This should be kept small 0039 * @return The Name of the filter */ 0040 virtual QString getName(void)=0; 0041 /** This returns a discription of the import/export filter 0042 * @return The discription */ 0043 virtual QString getDescription(void)=0; 0044 /** This returns the extension of the filename that will be loaded,created 0045 * @return The exstension */ 0046 virtual QString getExtension(void)=0; 0047 /** This returns the pattern extension of the filename that will be loaded,created 0048 * @return The exstension */ 0049 virtual QString getPatternExtension(void)=0; 0050 0051 /** This method will return true or false depending on if it's a export filter 0052 * @return True if this is a export filter, otherwise false */ 0053 virtual bool supportSave(void)=0; 0054 /** This method will return true or false depending on if it's a import filter 0055 * @return True if this is a import filter, otherwise false */ 0056 virtual bool supportLoad(void)=0; 0057 /** Is this the native format? */ 0058 virtual bool isNative() = 0; 0059 0060 /** This method is called by the map manager to save map data. 0061 */ 0062 virtual int saveData(const QString &) { return 0; } 0063 /** This method is called by the map manager to load map data. 0064 */ 0065 virtual int loadData(const QString &) { return 0; } 0066 0067 protected: 0068 /** A pointer to the map manager */ 0069 CMapManager *m_mapManager; 0070 }; 0071 0072 #endif