Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

qgisappinterface.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           qgisappinterface.cpp
00003                           Interface class for accessing exposed functions
00004                           in QgisApp
00005                              -------------------
00006     copyright            : (C) 2002 by Gary E.Sherman
00007     email                : sherman at mrcc dot com
00008  ***************************************************************************/
00009 
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 /* $Id: qgisappinterface.cpp 7114 2007-07-30 07:58:57Z mhugent $ */
00019 
00020 #include <iostream>
00021 #include <QString>
00022 #include <QMenu>
00023 
00024 #include "qgisappinterface.h"
00025 #include "omgmainwindow.h"
00026 #include "qgsmaplayer.h"
00027 #include "qgsmaplayerregistry.h"
00028 #include "qgsmapcanvas.h"
00029 //#include "qgslegend.h"
00030 
00031 QgisAppInterface::QgisAppInterface ( OmgMainWindow * thepOmgMainWindow )
00032     : mpOmgMainWindow ( thepOmgMainWindow )
00033 {
00034   // connect signals
00035   //connect ( mpOmgMainWindow->legend(), SIGNAL(currentLayerChanged(QgsMapLayer *)),
00036   //           this, SIGNAL(currentLayerChanged(QgsMapLayer *)) );
00037 
00038 }
00039 
00040 QgisAppInterface::~QgisAppInterface()
00041 {
00042 }
00043 
00044 void QgisAppInterface::zoomFull()
00045 {
00046   //mpOmgMainWindow->zoomFull();
00047 }
00048 
00049 void QgisAppInterface::zoomPrevious()
00050 {
00051   //mpOmgMainWindow->zoomPrevious();
00052 }
00053 
00054 void QgisAppInterface::zoomActiveLayer()
00055 {
00056   //mpOmgMainWindow->zoomToLayerExtent();
00057 }
00058 
00059 QgsVectorLayer * QgisAppInterface::addVectorLayer ( QString vectorLayerPath, QString baseName, QString providerKey )
00060 {
00061   //mpOmgMainWindow->addVectorLayer(vectorLayerPath, baseName, providerKey);
00062   //TODO fix this so it returns something meaningfull
00063   return 0;
00064 }
00065 
00066 QgsRasterLayer *  QgisAppInterface::addRasterLayer ( QString rasterLayerPath, QString baseName )
00067 {
00068   return 0;//mpOmgMainWindow->addRasterLayer( QStringList(rasterLayerPath) );
00069 }
00070 
00071 QgsRasterLayer * QgisAppInterface::addRasterLayer ( QgsRasterLayer * theRasterLayer, bool theForceRenderFlag )
00072 {
00073   return 0;//mpOmgMainWindow->addRasterLayer(theRasterLayer, theForceRenderFlag);
00074 }
00075 
00076 bool QgisAppInterface::addProject ( QString theProjectName )
00077 {
00078   return false;//mpOmgMainWindow->addProject(theProjectName);
00079 }
00080 
00081 void QgisAppInterface::newProject ( bool thePromptToSaveFlag )
00082 {
00083   //mpOmgMainWindow->fileNew(thePromptToSaveFlag);
00084 }
00085 
00086 QgsMapLayer *QgisAppInterface::activeLayer()
00087 {
00088   return NULL;//mpOmgMainWindow->activeLayer();
00089 }
00090 
00091 void QgisAppInterface::addPluginMenu ( QString name, QAction* action )
00092 {
00093   //mpOmgMainWindow->addPluginMenu(name, action);
00094 }
00095 
00096 void QgisAppInterface::removePluginMenu ( QString name, QAction* action )
00097 {
00098   //mpOmgMainWindow->removePluginMenu(name, action);
00099 }
00100 
00101 int QgisAppInterface::addToolBarIcon ( QAction * qAction )
00102 {
00103   // add the menu to the master Plugins menu
00104   return 0;//mpOmgMainWindow->addPluginToolBarIcon(qAction);
00105 }
00106 void QgisAppInterface::removeToolBarIcon ( QAction *qAction )
00107 {
00108   //mpOmgMainWindow->removePluginToolBarIcon(qAction);
00109 }
00110 QToolBar* QgisAppInterface::addToolBar ( QString name )
00111 {
00112   return NULL; //mpOmgMainWindow->addToolBar(name);
00113 }
00114 void QgisAppInterface::openURL ( QString url, bool useQgisDocDirectory )
00115 {
00116   //mpOmgMainWindow->openURL(url, useQgisDocDirectory);
00117 }
00118 
00119 std::map<QString, int> QgisAppInterface::menuMapByName()
00120 {
00121 
00122   std::map<QString, int> myMap;
00123   return myMap; //mpOmgMainWindow->menuMapByName();
00124 }
00125 
00126 std::map<int, QString> QgisAppInterface::menuMapById()
00127 {
00128   std::map<int, QString> myMap;
00129   return myMap;//mpOmgMainWindow->menuMapById();
00130 }
00131 
00132 QgsMapCanvas * QgisAppInterface::getMapCanvas()
00133 {
00134   return mpOmgMainWindow->mpMapCanvas;
00135 }
00136 
00137 QWidget * QgisAppInterface::getMainWindow()
00138 {
00139   return mpOmgMainWindow;
00140 }
00141 
00142 QToolBox* QgisAppInterface::getToolBox()
00143 {
00144   return NULL;//mpOmgMainWindow->toolBox;
00145 }

Generated on Mon Apr 28 15:07:47 2008 for openModellerDesktop by  doxygen 1.4.1-20050210