00001 /*************************************************************************** 00002 * Copyright (c) Juergen Riegel <juergen.riegel@web.de> * 00003 * * 00004 * This file is part of the FreeCAD CAx development system. * 00005 * * 00006 * This library is free software; you can redistribute it and/or * 00007 * modify it under the terms of the GNU Library General Public * 00008 * License as published by the Free Software Foundation; either * 00009 * version 2 of the License, or (at your option) any later version. * 00010 * * 00011 * This library is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU Library General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU Library General Public * 00017 * License along with this library; see the file COPYING.LIB. If not, * 00018 * write to the Free Software Foundation, Inc., 59 Temple Place, * 00019 * Suite 330, Boston, MA 02111-1307, USA * 00020 * * 00021 ***************************************************************************/ 00022 00023 00024 #ifndef POINTS_FEATURE_H 00025 #define POINTS_FEATURE_H 00026 00027 #include <App/GeoFeature.h> 00028 #include <App/FeaturePython.h> 00029 #include <App/PropertyLinks.h> 00030 #include <App/PropertyGeo.h> 00031 #include "Points.h" 00032 #include "PropertyPointKernel.h" 00033 00034 00035 namespace Base{ 00036 class Writer; 00037 } 00038 00039 namespace App{ 00040 class Color; 00041 } 00042 00043 namespace Points 00044 { 00045 class Property; 00046 class PointsFeaturePy; 00047 00051 class PointsExport Feature : public App::GeoFeature 00052 { 00053 PROPERTY_HEADER(Points::Feature); 00054 00055 public: 00057 Feature(void); 00058 virtual ~Feature(void); 00059 00062 void Restore(Base::XMLReader &reader); 00063 void RestoreDocFile(Base::Reader &reader); 00065 virtual App::DocumentObjectExecReturn *execute(void); 00067 virtual const char* getViewProviderName(void) const { 00068 return "PointsGui::ViewProviderPoints"; 00069 } 00070 protected: 00071 void onChanged(const App::Property* prop); 00073 00074 public: 00075 PropertyPointKernel Points; 00076 }; 00077 00082 class Export : public Feature 00083 { 00084 PROPERTY_HEADER(Points::Export); 00085 00086 public: 00087 Export(); 00088 00089 App::PropertyLinkList Sources; 00090 App::PropertyString FileName; 00091 App::PropertyString Format; 00092 00095 00096 virtual App::DocumentObjectExecReturn *execute(void); 00098 }; 00099 00100 typedef App::FeaturePythonT<Feature> FeaturePython; 00101 00102 } //namespace Points 00103 00104 00105 #endif