// $Id: GeoRefCoordEditorDlg.cpp,v 1.11 2010/02/02 02:20:15 philw Exp $ // Dialog for editing Simulation Object Georeference Coordinate Data // // class GeoRefCoordEditorPanel : public QFrame // class GeoRefCoordEditorPanel::TreeWidget : public QTreeWidget // class GeoRefCoordEditorPanel::TreeItem : public QTreeWidgetItem // class GeoRefCoordEditorDlg : public QMainWindow ... ... ... ... ... ... //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // private slot void GeoRefCoordEditorDlg::exportCoords_triggered() { SimWorkspace* ws = rwSystem->getSimWorkspace(); if (ws == NULL) return; //------------------->> RwPointCoordFile coordFile; const cwDlist& objList (ws->objectListRef()); cwIterator objIter; for (objIter = objList.first(); objIter; objIter = objList.next (objIter)) { SimObj* obj = objList.elem (objIter); if (obj) { const QString objName = obj->getCompleteName().data(); const QString objType = obj->getType().data(); const double xCoord = obj->getX (CanvasDefs::Geom_GEOSPATIAL); const double yCoord = obj->getY (CanvasDefs::Geom_GEOSPATIAL); const RwPointCoordFile::Rec rec (objName, objType, xCoord, yCoord); coordFile .addObjRec (rec); } } const QString filePath ("TestShapeFile"); coordFile.writeShapeFile (filePath); } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // private slot void GeoRefCoordEditorDlg::importCoords_triggered() { } //--- (end GeoRefCoordEditorDlg.cpp) ---