From: nri Date: Tue, 21 Oct 2003 15:18:21 +0000 (+0000) Subject: NRI : Remove unused SALOME_ROOT_DIR varaible. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=282cb2ca1c4d5e589f0ec328a2b3bc87506bd9d8;p=modules%2Fkernel.git NRI : Remove unused SALOME_ROOT_DIR varaible. Modify documentation menus. --- diff --git a/src/SALOMEGUI/Makefile.in b/src/SALOMEGUI/Makefile.in index ba4b9ea30..08d0682d3 100644 --- a/src/SALOMEGUI/Makefile.in +++ b/src/SALOMEGUI/Makefile.in @@ -43,7 +43,6 @@ EXPORT_HEADERS = \ QAD_FileDlg.h \ QAD_FileValidator.h \ QAD_Help.h \ - QAD_HelpWindow.h \ QAD_PyInterp.h \ QAD_LeftFrame.h \ QAD_ListMenuIdAction.h \ @@ -124,7 +123,6 @@ LIB_SRC = \ QAD_FileDlg.cxx \ QAD_FileValidator.cxx \ QAD_Help.cxx \ - QAD_HelpWindow.cxx \ PyInterp_base.cxx \ QAD_PyInterp.cxx \ QAD_PyInterp_mono.cxx \ @@ -191,7 +189,6 @@ LIB_MOC = \ QAD_Desktop.h \ QAD_DirListDlg.h \ QAD_FileDlg.h \ - QAD_HelpWindow.h \ QAD_ListView.h \ QAD_ObjectBrowser.h \ QAD_Operation.h \ diff --git a/src/SALOMEGUI/QAD_Application.cxx b/src/SALOMEGUI/QAD_Application.cxx index 935f2c4e7..a0b08aa45 100644 --- a/src/SALOMEGUI/QAD_Application.cxx +++ b/src/SALOMEGUI/QAD_Application.cxx @@ -464,7 +464,7 @@ void QAD_Application::helpAbout() void QAD_Application::helpSearch() { /* just calls QAD_Desktop::helpSearch() but can have own implementation */ - getDesktop()->helpSearch(); + // getDesktop()->helpSearch(); } /*! @@ -473,7 +473,7 @@ void QAD_Application::helpSearch() void QAD_Application::helpContents() { /* just calls QAD_Desktop::helpContents() but can have own implementation */ - getDesktop()->helpContents(); + // getDesktop()->helpContents(); } /*! diff --git a/src/SALOMEGUI/QAD_Desktop.cxx b/src/SALOMEGUI/QAD_Desktop.cxx index 2783c81b3..89a1bf2b8 100644 --- a/src/SALOMEGUI/QAD_Desktop.cxx +++ b/src/SALOMEGUI/QAD_Desktop.cxx @@ -53,7 +53,7 @@ using namespace std; #include "QAD_ObjectBrowser.h" #include "QAD_Resource.h" #include "QAD_FileDlg.h" -#include "QAD_HelpWindow.h" +//NRI#include "QAD_HelpWindow.h" #include "QAD_DirListDlg.h" #include "QAD_WaitCursor.h" #include "SALOMEGUI_OpenWith.h" @@ -179,7 +179,7 @@ myStatusBar(0), myActiveApp(0), myActiveStudy(0), myCntUntitled(0), -myHelpWindow(0), +//NRImyHelpWindow(0), myDefaultTitle( tr("DESK_DEFAULTTITLE") ), myQueryClose( true ) { @@ -347,8 +347,8 @@ QAD_Desktop::~QAD_Desktop () myToolBarAction.clear(); myApps.clear(); delete resourceMgr; - if (myHelpWindow) - myHelpWindow->close(); +//NRI if (myHelpWindow) +// myHelpWindow->close(); resourceMgr = 0; QAD_Application::desktop = 0; } @@ -457,7 +457,7 @@ void QAD_Desktop::createActions() myMainMenu->insertItem ( tr("MEN_DESK_VIEW"), &myViewPopup, 2 ); /* add popup VIEW */ myMainMenu->insertItem ( tr("MEN_DESK_TOOLS"), &myToolsPopup, 5 ); /* add popup TOOLS */ myMainMenu->insertItem ( tr("MEN_DESK_PREF"), &myPrefPopup, 4 ); /* add popup PREF */ - myMainMenu->insertItem ( tr("MEN_DESK_WINDOW"), &myWindowPopup, 6 ); /* add popup WINDOW */ + myMainMenu->insertItem ( tr("MEN_DESK_WINDOW"), &myWindowPopup, 6 );/* add popup WINDOW */ myMainMenu->insertItem ( tr("MEN_DESK_HELP"), &myHelpPopup, 7 ); /* add popup HELP */ /* Applications will insert their items after 'File' 'Edit' and 'View' @@ -895,12 +895,14 @@ void QAD_Desktop::createActions() id = myHelpPopup.insertSeparator(); /* GUI contents */ - QActionP* helpContentsActionGUI = new QActionP( "", tr("MEN_DESK_HELP_GUICONTENTS"), 0, this ); - helpContentsActionGUI->setStatusTip ( tr("PRP_DESK_HELP_GUICONTENTS") ); - QAD_ASSERT(connect( helpContentsActionGUI, SIGNAL(activated()), - this, SLOT( onHelpContentsGUI() ))); - helpContentsActionGUI->addTo( &myHelpPopup ); - myStdActions.insert( HelpContentsId , helpContentsActionGUI ); + // NRI : Temporary commented + +// QActionP* helpContentsActionGUI = new QActionP( "", tr("MEN_DESK_HELP_GUICONTENTS"), 0, this ); +// helpContentsActionGUI->setStatusTip ( tr("PRP_DESK_HELP_GUICONTENTS") ); +// QAD_ASSERT(connect( helpContentsActionGUI, SIGNAL(activated()), +// this, SLOT( onHelpContentsGUI() ))); +// helpContentsActionGUI->addTo( &myHelpPopup ); +// myStdActions.insert( HelpContentsId , helpContentsActionGUI ); /* TUI contents */ QActionP* helpContentsActionTUI = new QActionP( "", tr("MEN_DESK_HELP_TUICONTENTS"), 0, this ); @@ -1220,48 +1222,48 @@ QString QAD_Desktop::getComponentUserName(const char *componentName) return ""; } -/*! - gets application Help Window (and creates if necessary) -*/ -QAD_HelpWindow* QAD_Desktop::getHelpWindow() -{ - if (!myHelpWindow) { - myHelpWindow = new QAD_HelpWindow(); +// /*! +// gets application Help Window (and creates if necessary) +// */ +// QAD_HelpWindow* QAD_Desktop::getHelpWindow() +// { +// if (!myHelpWindow) { +// myHelpWindow = new QAD_HelpWindow(); - QMap::Iterator it; - for( it = mapComponentName.begin(); it != mapComponentName.end(); ++it ) { - QCString dir; - QString root; +// QMap::Iterator it; +// for( it = mapComponentName.begin(); it != mapComponentName.end(); ++it ) { +// QCString dir; +// QString root; - // look for index.html and set homeDir - // 1. $(MODULE_ROOT_DIR)/doc/index.html - // 2. $(MODULE_ROOT_DIR)/doc/html/index.html - // 3. $(MODULE_ROOT_DIR)/doc/html/html/index.html - - if (dir = getenv( QString( it.data() + "_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() ) { - helpContext( root + "index.html", "" ); - } - else { - root = QAD_Tools::addSlash( root + "html" ); - if ( QFileInfo( root + "index.html" ).exists() ) { - helpContext( root + "index.html", "" ); - } - else { - root = QAD_Tools::addSlash( root + "html" ); - if ( QFileInfo( root + "index.html" ).exists() ) { - helpContext( root + "index.html", "" ); - } - } - } - } - } +// // look for index.html and set homeDir +// // 1. $(MODULE_ROOT_DIR)/doc/index.html +// // 2. $(MODULE_ROOT_DIR)/doc/html/index.html +// // 3. $(MODULE_ROOT_DIR)/doc/html/html/index.html + +// if (dir = getenv( QString( it.data() + "_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() ) { +// helpContext( root + "index.html", "" ); +// } +// else { +// root = QAD_Tools::addSlash( root + "html" ); +// if ( QFileInfo( root + "index.html" ).exists() ) { +// helpContext( root + "index.html", "" ); +// } +// else { +// root = QAD_Tools::addSlash( root + "html" ); +// if ( QFileInfo( root + "index.html" ).exists() ) { +// helpContext( root + "index.html", "" ); +// } +// } +// } +// } +// } - connect(myHelpWindow, SIGNAL(helpWindowClosed()), this, SLOT(onHelpWindowClosed())); - } - return myHelpWindow; -} +// connect(myHelpWindow, SIGNAL(helpWindowClosed()), this, SLOT(onHelpWindowClosed())); +// } +// return myHelpWindow; +// } /*! Called when desktop is closing @@ -1846,13 +1848,13 @@ void QAD_Desktop::onCascade() it.current()->resize((int)(0.8*w), (int)(0.8*h)); } -/*! - called when help window closed -*/ -void QAD_Desktop::onHelpWindowClosed() -{ - myHelpWindow = 0; -} +// /*! +// called when help window closed +// */ +// void QAD_Desktop::onHelpWindowClosed() +// { +// myHelpWindow = 0; +// } /*! Called when 'view status bar' option @@ -2070,52 +2072,30 @@ private: Called on 'help\contents' */ void QAD_Desktop::onHelpContents() -{ +{ if (myActiveComp == "") + myActiveComp = getComponentUserName( "KERNEL" ); //NRI "Salome"; - // look for main.html and set homeDir - // 1. $(SALOME_ROOT_DIR)/doc/main.html - // 2. $(SALOME_ROOT_DIR)/doc/html/main.html - // 3. $(SALOME_ROOT_DIR)/doc/html/html/main.html - // 4. /usr/local/doc/html/main.html - QCString dir; QString root; QString homeDir; - - if ( (dir = getenv("SALOME_ROOT_DIR")) ) { - root = QAD_Tools::addSlash( QAD_Tools::addSlash(dir) + "doc" ); - if ( QFileInfo( root + "main.html" ).exists() ) { + if (dir = getenv( getComponentName( myActiveComp ) + "_ROOT_DIR")) { + root = QAD_Tools::addSlash( QAD_Tools::addSlash(dir) + QAD_Tools::addSlash("share") + QAD_Tools::addSlash("salome") + QAD_Tools::addSlash("doc") + "html" ); + if ( QFileInfo( root + "index.html" ).exists() ) { homeDir = root; - } - else { - root = QAD_Tools::addSlash( root + "html" ); - if ( QFileInfo( root + "main.html" ).exists() ) { - homeDir = root; - } - else { - root = QAD_Tools::addSlash( root + "html" ); - if ( QFileInfo( root + "main.html" ).exists() ) { - homeDir = root; - } - } - } - } - if ( root.isEmpty() ) { - if ( QFileInfo( "/usr/local/doc/html/main.html" ).exists() ) { - homeDir = "/usr/local/doc/html/"; + } else { + QMessageBox::warning( this, tr("WRN_WARNING"), + QString( "%1index.html doesn't exist." ).arg(root), tr ("BUT_OK") ); + return; } } - if ( root.isEmpty() ) - root = "./doc/"; - QString helpFile = QFileInfo( homeDir + "main.html" ).absFilePath(); + QString helpFile = QFileInfo( homeDir + "index.html" ).absFilePath(); QString anApp = QAD_CONFIG->getSetting("ExternalBrowser:Application"); QString aParams = QAD_CONFIG->getSetting("ExternalBrowser:Parameters"); RunBrowser* rs = new RunBrowser(anApp, aParams, helpFile); rs->start(); - } /*! @@ -2123,38 +2103,34 @@ void QAD_Desktop::onHelpContents() */ void QAD_Desktop::onHelpContentsGUI() { - - // look for main.html and set homeDir - // 1. $(SALOME_ROOT_DIR)/doc/guihtml/guihtml/salomedoc.html - // 2. /usr/local/doc/guihtml/salomedoc.html - QCString dir; - QString root; - QString homeDir; +// QCString dir; +// QString root; +// QString homeDir; - if ( (dir = getenv("SALOME_ROOT_DIR")) ) { - root = QAD_Tools::addSlash( QAD_Tools::addSlash(dir) + "doc" ); - root = QAD_Tools::addSlash( root + "guihtml" ); - root = QAD_Tools::addSlash( root + "guihtml" ); - if ( QFileInfo( root + "salomedoc.html" ).exists() ) { - homeDir = root; - } - } - if ( root.isEmpty() ) { - if ( QFileInfo( "/usr/local/doc/guihtml/salomedoc.html" ).exists() ) { - homeDir = "/usr/local/doc/guihtml/"; - } - } - if ( root.isEmpty() ) - root = "./doc/"; +// if ( (dir = getenv("KERNEL_ROOT_DIR")) ) { +// root = QAD_Tools::addSlash( QAD_Tools::addSlash(dir) + "doc" ); +// root = QAD_Tools::addSlash( root + "guihtml" ); +// root = QAD_Tools::addSlash( root + "guihtml" ); +// if ( QFileInfo( root + "salomedoc.html" ).exists() ) { +// homeDir = root; +// } +// } +// if ( root.isEmpty() ) { +// if ( QFileInfo( "/usr/local/doc/guihtml/salomedoc.html" ).exists() ) { +// homeDir = "/usr/local/doc/guihtml/"; +// } +// } +// if ( root.isEmpty() ) +// root = "./doc/"; - QString helpFile = QFileInfo( homeDir + "salomedoc.html" ).absFilePath(); +// QString helpFile = QFileInfo( homeDir + "salomedoc.html" ).absFilePath(); - QString anApp = QAD_CONFIG->getSetting("ExternalBrowser:Application"); - QString aParams = QAD_CONFIG->getSetting("ExternalBrowser:Parameters"); +// QString anApp = QAD_CONFIG->getSetting("ExternalBrowser:Application"); +// QString aParams = QAD_CONFIG->getSetting("ExternalBrowser:Parameters"); - RunBrowser* rs = new RunBrowser(anApp, aParams, helpFile); - rs->start(); +// RunBrowser* rs = new RunBrowser(anApp, aParams, helpFile); +// rs->start(); } @@ -2163,30 +2139,22 @@ void QAD_Desktop::onHelpContentsGUI() */ void QAD_Desktop::onHelpContentsTUI() { + if (myActiveComp == "") + myActiveComp = getComponentUserName( "KERNEL" ); //NRI "Salome"; - // look for main.html and set homeDir - // 1. $(SALOME_ROOT_DIR)/doc/html/html/index.html - // 2. /usr/local/doc/html/index.html - QCString dir; QString root; QString homeDir; - - if ( (dir = getenv("SALOME_ROOT_DIR")) ) { - root = QAD_Tools::addSlash( QAD_Tools::addSlash(dir) + "doc" ); - root = QAD_Tools::addSlash( root + "html" ); - root = QAD_Tools::addSlash( root + "html" ); + if (dir = getenv( getComponentName( myActiveComp ) + "_ROOT_DIR")) { + root = QAD_Tools::addSlash( QAD_Tools::addSlash(dir) + QAD_Tools::addSlash("share") + QAD_Tools::addSlash("salome") + QAD_Tools::addSlash("doc") + "html" ); if ( QFileInfo( root + "index.html" ).exists() ) { homeDir = root; + } else { + QMessageBox::warning( this, tr("WRN_WARNING"), + QString( "%1index.html doesn't exist." ).arg(root), tr ("BUT_OK") ); + return; } } - if ( root.isEmpty() ) { - if ( QFileInfo( "/usr/local/doc/html/index.html" ).exists() ) { - homeDir = "/usr/local/doc/html/"; - } - } - if ( root.isEmpty() ) - root = "./doc/"; QString helpFile = QFileInfo( homeDir + "index.html" ).absFilePath(); @@ -2195,19 +2163,18 @@ void QAD_Desktop::onHelpContentsTUI() RunBrowser* rs = new RunBrowser(anApp, aParams, helpFile); rs->start(); - } -/*! - Called on 'help\search' -*/ -void QAD_Desktop::onHelpSearch() -{ - if (myActiveApp) - myActiveApp->helpSearch(); - else - helpSearch(); -} +// /*! +// Called on 'help\search' +// */ +// void QAD_Desktop::onHelpSearch() +// { +// if (myActiveApp) +// myActiveApp->helpSearch(); +// else +// helpSearch(); +// } /*! Called on 'help\about' @@ -2775,45 +2742,6 @@ void QAD_Desktop::onDispatchTools(int id) bool libToolsGUI = true; if( QAD_XmlHandler::_bibmap[ id ].isEmpty() ) { - - if ( dir = getenv("SALOME_SITE_DIR")) { - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; -#ifdef WNT - dir = dir + "libToolsGUI.dll" ; -#else - dir = dir + "libToolsGUI.so" ; -#endif - MESSAGE ( " GUI library = " << dir ); - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ToolsLib = fileInfo.fileName() ; - found = true; - } - } - - if ( (dir = getenv("SALOME_ROOT_DIR")) && !found ) { - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; -#ifdef WNT - dir = dir + "libToolsGUI.dll" ; -#else - dir = dir + "libToolsGUI.so" ; -#endif - MESSAGE ( " GUI library = " << dir ); - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ToolsLib = fileInfo.fileName() ; - found = true; - } - } - if ( (dir = getenv("KERNEL_ROOT_DIR")) && !found ) { dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; @@ -2836,36 +2764,6 @@ void QAD_Desktop::onDispatchTools(int id) else { libToolsGUI = false; SCRUTE( QAD_XmlHandler::_bibmap[ id ] ) ; - if ( dir = getenv("SALOME_SITE_DIR")) { - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + QAD_XmlHandler::_bibmap[ id ].latin1() ; - MESSAGE ( " GUI library = " << dir ); - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ToolsLib = fileInfo.fileName() ; - found = true; - } - } - - if ( (dir = getenv("SALOME_ROOT_DIR")) && !found ) { - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + QAD_XmlHandler::_bibmap[ id ].latin1() ; - MESSAGE ( " GUI library = " << dir ); - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ToolsLib = fileInfo.fileName() ; - found = true; - } - } - if ( (dir = getenv("KERNEL_ROOT_DIR")) && !found ) { dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; @@ -3616,52 +3514,52 @@ void QAD_Desktop::helpAbout() delete About; } -/* Help Search */ -void QAD_Desktop::helpSearch() -{ -} - -/* Help Contents */ -void QAD_Desktop::helpContents() -{ - if (myActiveComp == "") - myActiveComp = getComponentUserName( "KERNEL" ); //NRI "Salome"; - - QCString dir; - QString root; - if (dir = getenv( getComponentName( myActiveComp ) + "_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() ) { - helpContext( root + "index.html", "" ); - } - else { - root = QAD_Tools::addSlash( root + "html" ); - if ( QFileInfo( root + "index.html" ).exists() ) { - helpContext( root + "index.html", "" ); - } - else { - root = QAD_Tools::addSlash( root + "html" ); - if ( QFileInfo( root + "index.html" ).exists() ) { - helpContext( root + "index.html", "" ); - } - } - } - } +// /* Help Search */ +// void QAD_Desktop::helpSearch() +// { +// } + +// /* Help Contents */ +// void QAD_Desktop::helpContents() +// { +// if (myActiveComp == "") +// myActiveComp = getComponentUserName( "KERNEL" ); //NRI "Salome"; + +// QCString dir; +// QString root; +// if (dir = getenv( getComponentName( myActiveComp ) + "_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() ) { +// helpContext( root + "index.html", "" ); +// } +// else { +// root = QAD_Tools::addSlash( root + "html" ); +// if ( QFileInfo( root + "index.html" ).exists() ) { +// helpContext( root + "index.html", "" ); +// } +// else { +// root = QAD_Tools::addSlash( root + "html" ); +// if ( QFileInfo( root + "index.html" ).exists() ) { +// helpContext( root + "index.html", "" ); +// } +// } +// } +// } - //NRI getHelpWindow()->contents(); - getHelpWindow()->show(); - getHelpWindow()->raise(); - getHelpWindow()->setActiveWindow(); -} +// // //NRI getHelpWindow()->contents(); +// // getHelpWindow()->show(); +// // getHelpWindow()->raise(); +// // getHelpWindow()->setActiveWindow(); +// } /* Help Context */ -void QAD_Desktop::helpContext(const QString& source, const QString& context) -{ - getHelpWindow()->context(source, context); - getHelpWindow()->show(); - getHelpWindow()->raise(); - getHelpWindow()->setActiveWindow(); -} +// void QAD_Desktop::helpContext(const QString& source, const QString& context) +// { +// // getHelpWindow()->context(source, context); +// // getHelpWindow()->show(); +// // getHelpWindow()->raise(); +// // getHelpWindow()->setActiveWindow(); +// } /* Preferences/MultiFile Save */ void QAD_Desktop::onMultiFileSave() diff --git a/src/SALOMEGUI/QAD_Desktop.h b/src/SALOMEGUI/QAD_Desktop.h index fe2c3e269..c8743a3c2 100644 --- a/src/SALOMEGUI/QAD_Desktop.h +++ b/src/SALOMEGUI/QAD_Desktop.h @@ -34,7 +34,7 @@ #include "QAD_Application.h" #include "QAD_OperatorMenus.h" #include "QAD_Menus.h" -#include "QAD_HelpWindow.h" +//NRI #include "QAD_HelpWindow.h" #include "QAD_Action.h" #include "SALOME_NamingService.hxx" @@ -147,9 +147,9 @@ public: /* help actions */ virtual void helpAbout(); - virtual void helpSearch(); - virtual void helpContents(); - virtual void helpContext(const QString& path, const QString& dir = QString::null); +/* virtual void helpSearch(); */ +/* virtual void helpContents(); */ +/* virtual void helpContext(const QString& path, const QString& dir = QString::null); */ bool loadComponent(QString); void activateComponent(const QString& theName, bool isLoadData = true); @@ -171,7 +171,7 @@ public: QString getComponentName(const char *componentUserName); QString getComponentUserName(const char *componentName); - QAD_HelpWindow* getHelpWindow(); + //NRI QAD_HelpWindow* getHelpWindow(); void onMouseMove(QMouseEvent*); bool onMousePress(QMouseEvent*); @@ -244,7 +244,7 @@ protected slots: void onHelpContents(); void onHelpContentsGUI(); void onHelpContentsTUI(); - void onHelpSearch(); +/* void onHelpSearch(); */ void onHelpAbout(); void onNewWindow3d(); @@ -260,7 +260,7 @@ protected slots: void onComboActiveComponent( const QString & , bool isLoadData); void onCascade(); - void onHelpWindowClosed(); + //NRI void onHelpWindowClosed(); protected: QMenuBar* myMainMenu; /* the main menu bar */ @@ -308,7 +308,7 @@ protected: QList myMenusList; QAD_Menus* myActiveMenus; - QAD_HelpWindow* myHelpWindow; + //NRI QAD_HelpWindow* myHelpWindow; QList myComponentButton; diff --git a/src/SALOMEGUI/QAD_ObjectBrowser.cxx b/src/SALOMEGUI/QAD_ObjectBrowser.cxx index 35bcde863..7bea424c0 100644 --- a/src/SALOMEGUI/QAD_ObjectBrowser.cxx +++ b/src/SALOMEGUI/QAD_ObjectBrowser.cxx @@ -712,6 +712,9 @@ void QAD_ObjectBrowser::Update( SALOMEDS::SObject_ptr SO, */ void QAD_ObjectBrowser::Update() { + int x = myListView->contentsX(); + int y = myListView->contentsY(); + myListView->clear(); myListViewMap.clear(); @@ -844,6 +847,8 @@ void QAD_ObjectBrowser::Update() } /* Updating UseCase Browser ============================================= */ UpdateUseCaseBrowser(); + + myListView->setContentsPos(x,y); } /*! diff --git a/src/SALOMEGUI/QAD_ResourceMgr.cxx b/src/SALOMEGUI/QAD_ResourceMgr.cxx index bb52c0aee..d116c7b33 100644 --- a/src/SALOMEGUI/QAD_ResourceMgr.cxx +++ b/src/SALOMEGUI/QAD_ResourceMgr.cxx @@ -240,11 +240,10 @@ QString QAD_ResourceMgr::resources( const char* prefix ) const Collects list of directories, separated by ';' where resources for module 'prefix' can be situated The order is following : + - _ROOT_DIR/share/salome/resources directory - CSF_Resources env.var directory ( or directory list ) - - CSF_ResourcesDefaults env.var directory ( or directory list ) - ${HOME}/.salome/resources directory - - ${SALOME_SITE_DIR}/share/salome/resources directory - - ${SALOME_ROOT_DIR}/share/salome/resources directory + - KERNEL_ROOT_DIR/share/salome/resources directory */ QString QAD_ResourceMgr::collectDirs( const QString& prefix ) const { @@ -281,13 +280,6 @@ QString QAD_ResourceMgr::collectDirs( const QString& prefix ) const dirList.append( dirList.isEmpty() ? dir : ( QString( SEPARATOR ) + dir ) ); } } - // Try CSF_ResourcesDefaults env.var directory ( or directory list ) - cenv = getenv( "CSF_ResourcesDefaults" ); - if ( cenv ) { - dir.sprintf( "%s", cenv ); - if ( !dir.isEmpty() ) - dirList.append( dirList.isEmpty() ? dir : ( QString( SEPARATOR ) + dir ) ); - } // Try ${HOME}/.salome/resources directory cenv = getenv( "HOME" ); if ( cenv ) { @@ -301,36 +293,6 @@ QString QAD_ResourceMgr::collectDirs( const QString& prefix ) const dirList.append( dirList.isEmpty() ? dir : ( QString( SEPARATOR ) + dir ) ); } } - // Try ${SALOME_SITE_DIR}/share/salome/resources directory - cenv = getenv( "SALOME_SITE_DIR" ); - if ( cenv ) { - dir.sprintf( "%s", cenv ); - if ( !dir.isEmpty() ) { - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "share" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "resources" ; - dir = QAD_Tools::addSlash(dir) ; - dirList.append( dirList.isEmpty() ? dir : ( QString( SEPARATOR ) + dir ) ); - } - } - // Try ${SALOME_ROOT_DIR}/share/salome/resources directory - cenv = getenv( "SALOME_ROOT_DIR" ); - if ( cenv ) { - dir.sprintf( "%s", cenv ); - if ( !dir.isEmpty() ) { - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "share" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "resources" ; - dir = QAD_Tools::addSlash(dir) ; - dirList.append( dirList.isEmpty() ? dir : ( QString( SEPARATOR ) + dir ) ); - } - } // Try ${KERNEL_ROOT_DIR}/share/salome/resources directory cenv = getenv( "KERNEL_ROOT_DIR" ); diff --git a/src/SALOMEGUI/QAD_RightFrame.cxx b/src/SALOMEGUI/QAD_RightFrame.cxx index 200ecc5cb..806a1503c 100644 --- a/src/SALOMEGUI/QAD_RightFrame.cxx +++ b/src/SALOMEGUI/QAD_RightFrame.cxx @@ -69,49 +69,7 @@ QAD_RightFrame::QAD_RightFrame(QWidget *parent, const char *name, QCString dir; QFileInfo fileInfo ; bool found = false; - if (myViewType == VIEW_OCC) { - if ( dir = getenv("SALOME_SITE_DIR")) { - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; -#ifdef WNT - dir = dir + "libOCCViewer.dll" ; -#else - dir = dir + "libOCCViewer.so" ; -#endif - MESSAGE ( " GUI library = " << dir ) - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ComponentLib = fileInfo.fileName(); - found = true; - MESSAGE (" Found ") - } else - MESSAGE (" Not found ") - } - - if ( (dir = getenv("SALOME_ROOT_DIR")) && !found ) { - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; -#ifdef WNT - dir = dir + "libOCCViewer.dll" ; -#else - dir = dir + "libOCCViewer.so" ; -#endif - MESSAGE ( " GUI library = " << dir ) - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ComponentLib = fileInfo.fileName(); - found = true; - MESSAGE (" Found ") - } else - MESSAGE (" Not found ") - } - + if (myViewType == VIEW_OCC) { if ( (dir = getenv("KERNEL_ROOT_DIR")) && !found ) { dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; @@ -133,49 +91,6 @@ QAD_RightFrame::QAD_RightFrame(QWidget *parent, const char *name, MESSAGE (" Not found ") } } else if (myViewType == VIEW_VTK) { - - if ( dir = getenv("SALOME_SITE_DIR")) { - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; -#ifdef WNT - dir = dir + "libVTKViewer.dll" ; -#else - dir = dir + "libVTKViewer.so" ; -#endif - MESSAGE ( " GUI library = " << dir ); - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ComponentLib = fileInfo.fileName(); - found = true; - MESSAGE (" Found "); - } else - MESSAGE (" Not found "); - } - - if ( (dir = getenv("SALOME_ROOT_DIR")) && !found ) { - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; -#ifdef WNT - dir = dir + "libVTKViewer.dll" ; -#else - dir = dir + "libVTKViewer.so" ; -#endif - MESSAGE ( " GUI library = " << dir ); - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ComponentLib = fileInfo.fileName(); - found = true; - MESSAGE (" Found "); - } else - MESSAGE (" Not found "); - } - if ( (dir = getenv("KERNEL_ROOT_DIR")) && !found ) { dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; @@ -197,48 +112,6 @@ QAD_RightFrame::QAD_RightFrame(QWidget *parent, const char *name, MESSAGE (" Not found "); } } else if (myViewType == VIEW_GRAPHSUPERV) { - if ( dir = getenv("SALOME_SITE_DIR")){ - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; -#ifdef WNT - dir = dir + "libSUPERVGraph.dll" ; -#else - dir = dir + "libSUPERVGraph.so" ; -#endif - MESSAGE ( " GUI library = " << dir ) - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ComponentLib = fileInfo.fileName() ; - found = true; - MESSAGE (" Found ") - } else - MESSAGE (" Not found ") - } - - if ( (dir = getenv("SALOME_ROOT_DIR")) && !found ) { - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; -#ifdef WNT - dir = dir + "libSUPERVGraph.dll" ; -#else - dir = dir + "libSUPERVGraph.so" ; -#endif - MESSAGE ( " GUI library = " << dir ) - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ComponentLib = fileInfo.fileName() ; - found = true; - MESSAGE (" Found ") - } else - MESSAGE (" Not found ") - } - if ( (dir = getenv("KERNEL_ROOT_DIR")) && !found ) { dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; @@ -260,48 +133,6 @@ QAD_RightFrame::QAD_RightFrame(QWidget *parent, const char *name, MESSAGE (" Not found ") } } else if (myViewType == VIEW_PLOT2D) { - if ( dir = getenv("SALOME_SITE_DIR")){ - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; -#ifdef WNT - dir = dir + "libPlot2d.dll" ; -#else - dir = dir + "libPlot2d.so" ; -#endif - MESSAGE ( " GUI library = " << dir ) - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ComponentLib = fileInfo.fileName() ; - found = true; - MESSAGE (" Found ") - } else - MESSAGE (" Not found ") - } - - if ( (dir = getenv("SALOME_ROOT_DIR")) && !found ) { - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; -#ifdef WNT - dir = dir + "libPlot2d.dll" ; -#else - dir = dir + "libPlot2d.so" ; -#endif - MESSAGE ( " GUI library = " << dir ) - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ComponentLib = fileInfo.fileName() ; - found = true; - MESSAGE (" Found ") - } else - MESSAGE (" Not found ") - } - if ( (dir = getenv("KERNEL_ROOT_DIR")) && !found ) { dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; diff --git a/src/SALOMEGUI/QAD_icons.po b/src/SALOMEGUI/QAD_icons.po index 5b1e636f7..f30ce6918 100644 --- a/src/SALOMEGUI/QAD_icons.po +++ b/src/SALOMEGUI/QAD_icons.po @@ -68,15 +68,6 @@ msgstr "close.png" msgid "ICON_HELP" msgstr "help.png" -msgid "QAD_HelpWindow::ICON_APP_HELP_BACK" -msgstr "back.xpm" - -msgid "QAD_HelpWindow::ICON_APP_HELP_FORWARD" -msgstr "forward.xpm" - -msgid "QAD_HelpWindow::ICON_APP_HELP_HOME" -msgstr "home.xpm" - #-------------- # VIEW #-------------- diff --git a/src/SALOMEGUI/QAD_msg_en.po b/src/SALOMEGUI/QAD_msg_en.po index 26df825a8..39dededad 100644 --- a/src/SALOMEGUI/QAD_msg_en.po +++ b/src/SALOMEGUI/QAD_msg_en.po @@ -435,21 +435,6 @@ msgstr "Sketch a rectangular area to fit the view" # TOOL TIP #--------------- -#: QAD_HelpWindow.cxx:57 -msgid "QAD_HelpWindow::TOT_HELPWINDOW_BACKWARD" -msgstr "Backward" - -#: QAD_HelpWindow.cxx:60 -msgid "QAD_HelpWindow::TOT_HELPWINDOW_FORWARD" -msgstr "Forward" - -#: QAD_HelpWindow.cxx:63 -msgid "QAD_HelpWindow::TOT_HELPWINDOW_HOME" -msgstr "Home" - -msgid "QAD_HelpWindow::QAD_HELP_CONTENTS" -msgstr "Contents" - #: QAD_Application.cxx:173 msgid "QAD_Application::TOT_APP_EDIT_REDO" msgstr "Redo last operation" diff --git a/src/SALOMEGUI/QAD_msg_fr.po b/src/SALOMEGUI/QAD_msg_fr.po index 8027e10fc..dec15cf79 100644 --- a/src/SALOMEGUI/QAD_msg_fr.po +++ b/src/SALOMEGUI/QAD_msg_fr.po @@ -398,18 +398,6 @@ msgstr "S # TOOL TIP #--------------- -#: QAD_HelpWindow.cxx:57 -msgid "QAD_HelpWindow::TOT_HELPWINDOW_BACKWARD" -msgstr "Avant" - -#: QAD_HelpWindow.cxx:60 -msgid "QAD_HelpWindow::TOT_HELPWINDOW_FORWARD" -msgstr "Apres" - -#: QAD_HelpWindow.cxx:63 -msgid "QAD_HelpWindow::TOT_HELPWINDOW_HOME" -msgstr "Home" - #: QAD_Application.cxx:173 msgid "QAD_Application::TOT_APP_EDIT_REDO" msgstr "Répéter l'opération" diff --git a/src/SALOMEGUI/SALOMEGUI_Application.cxx b/src/SALOMEGUI/SALOMEGUI_Application.cxx index 61556f22f..d9b5ad9b1 100644 --- a/src/SALOMEGUI/SALOMEGUI_Application.cxx +++ b/src/SALOMEGUI/SALOMEGUI_Application.cxx @@ -458,49 +458,7 @@ void SALOMEGUI_Application::onDisplay(int id) QCString dir; QFileInfo fileInfo ; bool found = false; - if ( getenv("SALOME_SITE_DIR") ) { - dir.fill('\0'); - dir.sprintf("%s",getenv("SALOME_SITE_DIR")); - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; -#ifdef WNT - dir = dir + "lib" + parentComp.latin1() + "GUI.dll" ; -#else - dir = dir + "lib" + parentComp.latin1() + "GUI.so" ; -#endif - MESSAGE ( " GUI library = " << dir ) - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ComponentLib = fileInfo.fileName(); - found = true; - MESSAGE ( " found " ) - } else { - MESSAGE ( " Not found " ) - } - } - if ( !found && getenv("SALOME_ROOT_DIR") ) { - dir.fill('\0'); - dir.sprintf("%s", getenv("SALOME_ROOT_DIR")); - dir = QAD_Tools::addSlash(dir) ; - dir = dir + "lib" ; - dir = QAD_Tools::addSlash(dir) ; -#ifdef WNT - dir = dir + "lib" + parentComp.latin1() + "GUI.dll" ; -#else - dir = dir + "lib" + parentComp.latin1() + "GUI.so" ; -#endif - MESSAGE ( " GUI library = " << dir ) - fileInfo.setFile(dir) ; - if (fileInfo.exists()) { - ComponentLib = fileInfo.fileName() ; - found = true; - MESSAGE ( " found " ) - } else { - MESSAGE ( " Not found " ) - } - } - if ( !found && getenv( QAD_Application::getDesktop()->getComponentName(parentComp) + "_ROOT_DIR") ) { + if ( getenv( QAD_Application::getDesktop()->getComponentName(parentComp) + "_ROOT_DIR") ) { dir.fill('\0'); dir.sprintf("%s", getenv( QAD_Application::getDesktop()->getComponentName(parentComp) + "_ROOT_DIR")); dir = QAD_Tools::addSlash(dir) ;