28 #include "../terralib/Defines.h" 
   42 #include <QApplication> 
   45 #include <QLibraryInfo> 
   47 #include <QMessageBox> 
   48 #include <QSplashScreen> 
   50 #include <QTranslator> 
   53 #if TE_PLATFORM == TE_PLATFORMCODE_APPLE 
   54 #include <CoreFoundation/CoreFoundation.h> 
   58 int main(
int argc, 
char** argv)
 
   60   QApplication app(argc, argv);
 
   62   QDir dir(QLibraryInfo::location(QLibraryInfo::TranslationsPath));
 
   65   filters <<
"*" + QLocale::system().name().toLower() + 
".qm";
 
   67   QFileInfoList lst = dir.entryInfoList(filters, QDir::Files);
 
   69   for(
int i=0; i<lst.size(); ++i)
 
   71     QTranslator* trans = 
new QTranslator;
 
   72     bool ls = trans->load(lst.at(i).baseName(), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
 
   73     app.installTranslator(trans);
 
   76   setlocale(LC_ALL,
"C"); 
 
   78 #if QT_VERSION >= 0x050000 
   79   QTextCodec::setCodecForLocale(QTextCodec::codecForLocale());
 
   81   QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale());
 
   84   int waitVal = EXIT_FAILURE;
 
   86   const int RESTART_CODE = 1000;
 
   94       QPixmap pixmap(splash_pix.c_str());
 
   96       QSplashScreen* splash(
new QSplashScreen(pixmap));
 
   98       splash->setAttribute(Qt::WA_DeleteOnClose, 
true);
 
  100       splash->setStyleSheet(
"QWidget { font-size: 12px; font-weight: bold }");
 
  110 #if TE_PLATFORM == TE_PLATFORMCODE_APPLE 
  111       CFBundleRef mainBundle = CFBundleGetMainBundle();
 
  112       CFURLRef execPath = CFBundleCopyBundleURL(mainBundle);
 
  116       if (!CFURLGetFileSystemRepresentation(execPath, TRUE, (UInt8 *)path, PATH_MAX))
 
  123       dPath.cd(
"Contents");
 
  125       chdir(dPath.path().toStdString().c_str());
 
  130       splash->finish(&tview);
 
  132       tview.showMaximized();
 
  136       waitVal = app.exec();
 
  140     } 
while(waitVal == RESTART_CODE);
 
  142   catch(
const std::exception& )
 
void resetTerraLib(const bool &status)
 
The main class of TerraView. 
 
TECOMMONEXPORT std::string FindInTerraLibPath(const std::string &p)
Returns the path relative to a directory or file in the context of TerraLib. 
 
A singleton for holding he application splash screen. 
 
static SplashScreenManager & getInstance()
It returns a reference to the singleton instance. 
 
int main(int argc, char *argv[])
 
Proxy configuration file for TerraView (see terraview_config.h). 
 
The main class of TerraView. 
 
Utility routines for the TerraLib Application Framework module. 
 
virtual void resetState()