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

omgterralib.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           omgterralib.cpp  -  description
00003                              -------------------
00004     begin                : Sept 2006
00005     copyright            : (C) 2006 by Tim Sutton
00006     email                : tim@linfiniti.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #include "omgterralib.h"
00019 
00020 OmgTerralib::OmgTerralib()
00021 {
00022   TeDatabaseFactoryParams dbf_params;
00023 
00024   dbf_params.database_ = "terralib";
00025   dbf_params.dbms_name_ = "PostgreSQL";
00026 
00027   dbf_params.host_ = "localhost"; 
00028   // change empty host to localhost for MySQL
00029   if( dbf_params.dbms_name_ == "MySQL" && dbf_params.host_.empty() )
00030     dbf_params.host_ = "localhost";
00031 
00032   dbf_params.password_ = "";
00033   dbf_params.port_ = 5432;
00034   dbf_params.user_ = "testuser";
00035 
00036   db_.reset(TeDatabaseFactory::make( dbf_params ));
00037 
00038   if( ! db_->isConnected() )
00039   {
00040     //QMessageBox::critical( this, "TerraView", 
00041     //    tr( "Unable to connect to database" ) );    
00042   } 
00043 
00044 }
00045 OmgTerralib::~OmgTerralib()
00046 {
00047 }
00048 
00049 

Generated on Mon Apr 28 15:09:13 2008 for openModellerDesktop by  doxygen 1.4.1-20050210