![]() |
TerraLib 4.1
|
00001 /************************************************************************************ 00002 TerraView - visualization and exploration of geographical databases 00003 using TerraLib. 00004 Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio. 00005 This file is part of TerraView. TerraView is free software; you can redistribute it 00006 and/or modify it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 You should have received a copy of the GNU General Public License 00011 along with TerraView. 00012 The authors reassure the license terms regarding the warranties. 00013 They specifically disclaim any warranties, including, but not limited to, 00014 the implied warranties of merchantability and fitness for a particular purpose. 00015 The software provided hereunder is on an "as is" basis, and the authors have no 00016 obligation to provide maintenance, support, updates, enhancements, or modifications. 00017 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct, 00018 indirect, special, incidental, or consequential damages arising out of the use of 00019 this program and its documentation. 00020 *************************************************************************************/ 00021 00022 #ifndef PLUGINPARAMETERS_H 00023 #define PLUGINPARAMETERS_H 00024 00025 #define PLUGINPARAMETERS_VERSION "PLUGINPARAMETERS_VERSION_201010210938" \ 00026 "_TERRALIB_VERSION_" TERRALIB_VERSION 00027 // "_QT_VERSION_" QT_VERSION_STR 00028 00029 // #include <TeQtDatabasesListView.h> 00030 // #include <TeQtViewsListView.h> 00031 // #include <TeQtGrid.h> 00032 // #include <TeQtCanvas.h> 00033 // 00034 // #include <TeDatabase.h> 00035 // #include <TeLayer.h> 00036 // #include <TeView.h> 00037 // #include <TeAppTheme.h> 00038 // #include <TeProgress.h> 00039 // #include <TeDatabaseFactory.h> 00040 // #include <TeVersion.h> 00041 // #include "PluginsSignal.h" 00042 // #include <PluginMetadata.h> 00043 // 00044 // #include <qmainwindow.h> 00045 #include "../../kernel/TeCommunicator.h" 00046 #include "../../kernel/TeVersion.h" 00047 #include "TeSPLDefines.h" 00048 00049 //Qt include files 00050 //#include <qglobal.h> 00051 00052 //STL include files 00053 #include <string> 00054 00055 //Forward declarations 00056 class TeQtDatabasesListView; 00057 class TeQtViewsListView; 00058 class TeQtGrid; 00059 class TeQtCanvas; 00060 class TeDatabase; 00061 class TeLayer; 00062 class TeView; 00063 class TeAppTheme; 00064 class TeProgressBase; 00065 class TeDatabaseFactory; 00066 class TeVersion; 00067 class PluginsSignal; 00068 class PluginMetadata; 00069 class QMainWindow; 00070 00075 class TLSPL_DLL PluginParameters 00076 { 00077 public : 00078 00079 /* DO NOT MOVE THIS FUNCTION FROM THE CLASS BEGINNING -------------- */ 00080 00087 static std::string getVersion() 00088 { 00089 return PLUGINPARAMETERS_VERSION; 00090 }; 00091 00092 /* DO NOT MOVE THIS FUNCTION FROM THE CLASS BEGINNING -------------- */ 00093 00105 typedef std::string (*getCurrentUserPtrFPT)( 00106 const PluginParameters& ); 00107 00112 typedef TeDatabase* (*getCurrentDatabasePtrFPT)( 00113 const PluginParameters& ); 00114 00119 typedef TeLayer* (*getCurrentLayerPtrFPT)( 00120 const PluginParameters& ); 00121 00126 typedef TeView* (*getCurrentViewPtrFPT)( 00127 const PluginParameters& ); 00128 00133 typedef TeAppTheme* (*getCurrentThemeAppPtrFPT)( 00134 const PluginParameters& ); 00135 00140 typedef void (*setCurrentThemeAppPtrFPT)( 00141 TeAppTheme*, const PluginParameters& ); 00142 00147 typedef void (*updateTVInterfaceFPT)( 00148 const PluginParameters& ); 00149 00154 typedef void (*plotTVDataFPT)( 00155 const PluginParameters& ); 00156 00161 typedef void (*setPluginMetadataFPT)( 00162 const PluginParameters&, const PluginMetadata& ); 00163 00168 typedef bool (*loadTranslationFileFPT)( 00169 const PluginParameters&, const std::string& ); 00170 00177 typedef void (*updatePluginParametersFPT)( PluginParameters& ); 00178 00191 QMainWindow* qtmain_widget_ptr_; 00192 00197 TeProgressBase* teprogressbase_ptr_; 00198 00202 TeQtDatabasesListView* teqtdatabaseslistview_ptr_; 00203 00207 TeQtViewsListView* teqtviewslistview_ptr_; 00208 00212 TeQtGrid* teqtgrid_ptr_; 00213 00218 TeQtCanvas* teqtcanvas_ptr_; 00219 00229 TeDatabase* current_database_ptr_; 00230 00240 TeLayer* current_layer_ptr_; 00241 00251 TeView* current_view_ptr_; 00252 00259 TeAppTheme* current_theme_ptr_; 00260 00265 TeCommunicator<PluginsSignal>* signal_emitter_; 00266 00271 bool use_collection_; 00272 00276 std::string currentPluginName_; 00277 00281 std::string currentUser_; 00282 00292 PluginParameters(); 00293 00332 PluginParameters( 00333 QMainWindow* qtmain_widget_ptr, 00334 TeProgressBase* teprogressbase_ptr, 00335 TeQtDatabasesListView* teqtdatabaseslistview_ptr, 00336 TeQtViewsListView* teqtviewslistview_ptr, 00337 TeQtGrid* teqtgrid_ptr, 00338 TeQtCanvas* teqtcanvas_ptr, 00339 TeDatabase* current_database_ptr, 00340 TeLayer* current_layer_ptr, 00341 TeView* current_view_ptr, 00342 TeAppTheme* current_theme_ptr, 00343 TeCommunicator<PluginsSignal>* signal_emitter, 00344 bool use_collection, 00345 std::string currentPluginName, 00346 std::string currentUser, 00347 getCurrentDatabasePtrFPT getCurrentDatabasePtrFP, 00348 getCurrentLayerPtrFPT getCurrentLayerPtrFP, 00349 getCurrentViewPtrFPT getCurrentViewPtrFP, 00350 getCurrentThemeAppPtrFPT getCurrentThemeAppPtrFP, 00351 setCurrentThemeAppPtrFPT setCurrentThemeAppPtrFP, 00352 updateTVInterfaceFPT updateTVInterfaceFP, 00353 loadTranslationFileFPT loadTranslationFileFP, 00354 updatePluginParametersFPT updatePluginParametersFP, 00355 plotTVDataFPT plotTVDataFP, 00356 setPluginMetadataFPT setPluginMetadataFP, 00357 getCurrentUserPtrFPT getCurrentUserPtrFP 00358 ); 00359 00363 ~PluginParameters(); 00364 00376 std::string getCurrentUserPtr() const; 00377 00383 TeDatabase* getCurrentDatabasePtr() const; 00384 00390 TeLayer* getCurrentLayerPtr() const; 00391 00397 TeView* getCurrentViewPtr() const; 00398 00404 TeAppTheme* getCurrentThemeAppPtr() const; 00405 00411 void setCurrentThemeAppPtr(TeAppTheme*); 00412 00420 void updateTVInterface( const PluginParameters& pp ) const; 00421 00427 void updateTVInterface() const; 00428 00434 void plotTVData() const; 00435 00440 void setPluginMetadata(const PluginMetadata& pluginMetadata) const; 00441 00451 bool loadTranslationFile( const PluginParameters& pp, 00452 const std::string& filename ) const; 00453 00460 bool loadTranslationFile( const std::string& filename ) const; 00461 00468 void updatePluginParameters( PluginParameters& pp ) const; 00469 00474 bool useCollection() const; 00475 00476 protected : 00477 00487 getCurrentUserPtrFPT getCurrentUserPtrFP_; 00488 00493 getCurrentDatabasePtrFPT getCurrentDatabasePtrFP_; 00494 00499 getCurrentLayerPtrFPT getCurrentLayerPtrFP_; 00500 00505 getCurrentViewPtrFPT getCurrentViewPtrFP_; 00506 00511 getCurrentThemeAppPtrFPT getCurrentThemeAppPtrFP_; 00512 00517 setCurrentThemeAppPtrFPT setCurrentThemeAppPtrFP_; 00518 00523 updateTVInterfaceFPT updateTVInterfaceFP_; 00524 00529 loadTranslationFileFPT loadTranslationFileFP_; 00530 00535 updatePluginParametersFPT updatePluginParametersFP_; 00536 00541 plotTVDataFPT plotTVDataFP_; 00542 00546 setPluginMetadataFPT setPluginMetadataFP_; 00547 00551 void init(); 00552 00553 }; 00554 00555 #endif