fastmap/MainWindow.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of fastmap.
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 : 2008-09-14
00021 **  Authors:
00022 **    Marc Wathelet
00023 **    Marc Wathelet (LGIT, Grenoble, France)
00024 **
00025 ***************************************************************************/
00026 
00027 #ifndef MAINWINDOW_H
00028 #define MAINWINDOW_H
00029 
00030 #include <QGpGuiTools.h>
00031 
00032 class DrawConsole;
00033 class MapView;
00034 class MapProject;
00035 
00036 class MainWindow : public MultiDocumentWindow
00037 {
00038   Q_OBJECT
00039 public:
00040   MainWindow(QWidget * parent=0, Qt::WindowFlags f=0);
00041   ~MainWindow();
00042 
00043   bool addCommand(MapProject * p, const QString& cmd);
00044   void createView(MapProject * p);
00045   void projectClosed(MapProject * p);
00046 
00047   QList<MapProject *> projects() const;
00048 public slots:
00049   virtual void saveDocument();
00050   virtual void saveDocumentAs();
00051   virtual void printDocument();
00052 
00053   void exportImage();
00054   void copyImage();
00055   void selectAll();
00056   void setSnapX();
00057   void setSnapY();
00058   void setSnapNodes();
00059   void setSnapContours();
00060   void setSnapGrid();
00061   void refreshScene();
00062   void newView();
00063   void rotateView();
00064   void setMoveMode();
00065   void setLineMode();
00066   void setRectMode();
00067   void setEllipseMode();
00068   void setTextMode();
00069   void setDimensionMode();
00070 
00071   void setActiveProject(MultiDocumentSubWindow * w);
00072 private:
00073   void addActions();
00074   void addFileActions();
00075   void addEditActions();
00076   void addViewActions();
00077   void addToolsActions();
00078 
00079   QAction * _editSnapXAction;
00080   QAction * _editSnapYAction;
00081   QAction * _editSnapNodesAction;
00082   QAction * _editSnapContoursAction;
00083   QAction * _editSnapGridAction;
00084 
00085   DrawConsole * _console;
00086   MapView * _currentView;
00087 };
00088 
00089 #endif // MAINWINDOW_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines