Salome HOME
Moved some functionality to VTKViewer_Utilities.h
[modules/kernel.git] / src / SALOMEGUI / QAD_HelpWindow.cxx
index 3f86cf15cb8524c99144e11c8c8c47335d04278b..2453ec7e4b31fee8986f9d63091cea1b8e9981a3 100644 (file)
@@ -1,10 +1,29 @@
-using namespace std;
-//  File      : QAD_HelpWindow.cxx
-//  Created   : Thu Jun 14 16:12:49 2001
-//  Author    : Nicolas REJNERI
-//  Project   : SALOME
-//  Module    : SALOMEGUI
-//  Copyright : Open CASCADE
+//  SALOME SALOMEGUI : implementation of desktop and GUI kernel
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : QAD_HelpWindow.cxx
+//  Author : Nicolas REJNERI
+//  Module : SALOME
 //  $Header$
 
 /*!
@@ -26,6 +45,7 @@ using namespace std;
 #include <qtoolbutton.h>
 #include <qcombobox.h>
 #include <qfileinfo.h>
+using namespace std;
 
 /*!
   Constructor
@@ -91,39 +111,39 @@ QAD_HelpWindow::QAD_HelpWindow()
 
   /*
   // look for index.html and set homeDir
-  // 1. $(SALOME_ROOT_DIR)/doc/index.html
-  // 2. $(SALOME_ROOT_DIR)/doc/html/index.html
-  // 3. $(SALOME_ROOT_DIR)/doc/html/html/index.html
+  // 1. $(KERNEL_ROOT_DIR)/doc/index.html
+  // 2. $(KERNEL_ROOT_DIR)/doc/html/index.html
+  // 3. $(KERNEL_ROOT_DIR)/doc/html/html/index.html
   // 4. /usr/local/doc/html/index.html
 
   QCString dir;
   QString root;
   if ( (dir = getenv("KERNEL_ROOT_DIR")) ) {
-  root = QAD_Tools::addSlash( QAD_Tools::addSlash(dir) + QAD_Tools::addSlash("share")  + QAD_Tools::addSlash("salome")  + "doc" );
-  if ( QFileInfo( root + "index.html" ).exists() ) {
-  homeDir = root;
-  }
-  else {
-  root = QAD_Tools::addSlash( root + "html" );
-  if ( QFileInfo( root + "index.html" ).exists() ) {
-  homeDir = root;
-  }
-  else {
-  root = QAD_Tools::addSlash( root + "html" );
-  if ( QFileInfo( root + "index.html" ).exists() ) {
-  homeDir = root;
-  }
-  }
-  }
+    root = QAD_Tools::addSlash( QAD_Tools::addSlash(dir) + QAD_Tools::addSlash("share")  + QAD_Tools::addSlash("salome")  + "doc" );
+    if ( QFileInfo( root + "index.html" ).exists() ) {
+      homeDir = root;
+    }
+    else {
+      root = QAD_Tools::addSlash( root + "html" );
+      if ( QFileInfo( root + "index.html" ).exists() ) {
+       homeDir = root;
+      }
+      else {
+       root = QAD_Tools::addSlash( root + "html" );
+       if ( QFileInfo( root + "index.html" ).exists() ) {
+         homeDir = root;
+       }
+      }
+    }
   }
   if ( root.isEmpty() ) {
-  if ( QFileInfo( "/usr/local/doc/html/index.html" ).exists() ) {
-  homeDir = "/usr/local/doc/html/";
-  }
+    if ( QFileInfo( "/usr/local/doc/html/index.html" ).exists() ) {
+      homeDir = "/usr/local/doc/html/";
+    }
   }
   if ( root.isEmpty() ) 
-  root = "./doc/";
-  
+    root = "./doc/";
+
   browser->setSource( QFileInfo( homeDir + "index.html" ).absFilePath() );
   */
   browser->setFocus();