Salome HOME
Merge relevant changes from V8_0_0_BR branch
authorrnv <rnv@opencascade.com>
Tue, 2 Feb 2016 11:11:25 +0000 (14:11 +0300)
committervsr <vsr@opencascade.com>
Mon, 15 Feb 2016 14:23:48 +0000 (17:23 +0300)
119 files changed:
CMakeLists.txt
SalomeGUIConfig.cmake.in
adm_local/cmake_files/FindSalomeParaView.cmake
adm_local/cmake_files/FindSalomeQt4.cmake
adm_local/cmake_files/UseQt4Ext.cmake
src/CAF/CAF_Study.cxx
src/Event/CMakeLists.txt
src/GLViewer/GLViewer_BaseObjects.cxx
src/GLViewer/GLViewer_Context.cxx
src/GLViewer/GLViewer_Context.h
src/GLViewer/GLViewer_Grid.cxx
src/GLViewer/GLViewer_ToolTip.cxx
src/GLViewer/GLViewer_ViewFrame.cxx
src/GLViewer/GLViewer_ViewPort2d.cxx
src/GLViewer/GLViewer_Viewer2d.cxx
src/GLViewer/GLViewer_Widget.cxx
src/GraphicsView/GraphicsView_Object.cxx
src/GuiHelpers/CMakeLists.txt
src/HelpBrowser/CMakeLists.txt
src/HelpBrowser/qtlocalpeer.cpp
src/HelpBrowser/qtlockedfile_win.cpp
src/ImageComposer/CMakeLists.txt
src/LightApp/LightApp_Application.cxx
src/LightApp/LightApp_Dialog.cxx
src/LightApp/LightApp_Driver.cxx
src/LightApp/LightApp_ModuleAction.cxx
src/LightApp/LightApp_NameDlg.cxx
src/LightApp/LightApp_Operation.cxx
src/OBJECT/CMakeLists.txt
src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx
src/OCCViewer/OCCViewer_ClippingDlg.cxx
src/OCCViewer/OCCViewer_CreateRestoreViewDlg.cxx
src/OCCViewer/OCCViewer_SetRotationPointDlg.cxx
src/OCCViewer/OCCViewer_SetRotationPointDlg.h
src/OCCViewer/OCCViewer_Utilities.cxx
src/OCCViewer/OCCViewer_ViewModel.cxx
src/OCCViewer/OCCViewer_ViewPort.cxx
src/OCCViewer/OCCViewer_ViewPort.h
src/Plot2d/Plot2d_FitDataDlg.cxx
src/Plot2d/Plot2d_PlotItems.cxx
src/Plot2d/Plot2d_SetupViewDlg.cxx
src/Plot2d/Plot2d_ViewFrame.cxx
src/PyConsole/PyConsole_EnhEditor.cxx
src/PyConsole/PyConsole_EnhEditor.h
src/PyEditor/PyEditor_SettingsDlg.cxx
src/PyViewer/PyViewer_ViewWindow.cxx
src/QDS/QDS_Datum.cxx
src/Qtx/Qtx.cxx
src/Qtx/QtxActionToolMgr.cxx
src/Qtx/QtxColorButton.cxx
src/Qtx/QtxDialog.cxx
src/Qtx/QtxDockAction.cxx
src/Qtx/QtxFontEdit.cxx
src/Qtx/QtxMainWindow.cxx
src/Qtx/QtxPathDialog.cxx
src/Qtx/QtxPathEdit.cxx
src/Qtx/QtxPreferenceMgr.cxx
src/Qtx/QtxResourceMgr.cxx
src/Qtx/QtxSearchTool.cxx
src/Qtx/QtxTreeView.cxx
src/Qtx/QtxWebBrowser.cxx
src/Qtx/QtxWorkspace.cxx
src/Qtx/QtxWorkspace.h
src/Qtx/QtxWorkspaceAction.cxx
src/Qtx/QtxWorkstack.cxx
src/Qtx/QtxWorkstackAction.cxx
src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt
src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt
src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_GUILight.sip
src/SALOME_PYQT/SalomePyQt/CMakeLists.txt
src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx
src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip
src/STD/STD_Application.cxx
src/STD/STD_MDIDesktop.cxx
src/SUIT/SUIT_ActionOperation.cxx
src/SUIT/SUIT_Application.cxx
src/SUIT/SUIT_Application.h
src/SUIT/SUIT_DataObjectKey.cxx
src/SUIT/SUIT_Desktop.cxx
src/SUIT/SUIT_FileDlg.cxx
src/SUIT/SUIT_Operation.cxx
src/SUIT/SUIT_ResourceMgr.cxx
src/SUIT/SUIT_Study.cxx
src/SUIT/SUIT_ViewManager.cxx
src/SUIT/SUIT_ViewWindow.cxx
src/SVTK/SVTK_ComboAction.cxx
src/SVTK/SVTK_GenericRenderWindowInteractor.cxx
src/SVTK/SVTK_NonIsometricDlg.cxx
src/SVTK/SVTK_SetRotationPointDlg.cxx
src/SVTK/SVTK_UpdateRateDlg.cxx
src/SVTK/SVTK_ViewModel.cxx
src/SVTK/SVTK_ViewParameterDlg.cxx
src/SVTK/SVTK_ViewWindow.cxx
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_Engine_i.cxx
src/SalomeApp/SalomeApp_StudyPropertiesDlg.cxx
src/SalomeApp/pluginsdemo/CMakeLists.txt
src/SalomeApp/pluginsdemo/minmax_dialog.py [deleted file]
src/SalomeApp/pluginsdemo/minmax_plugin.py
src/Session/SALOME_Session_Server.cxx
src/Session/Session_ServerCheck.cxx
src/Session/Session_Session_i.cxx
src/Style/Style_Salome.cxx
src/TreeData/Test/mainwindow.cxx
src/TreeData/TreeModel.cxx
src/VTKViewer/VTKViewer_Filter.cxx
src/VTKViewer/VTKViewer_InteractorStyle.cxx
src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx
src/VTKViewer/VTKViewer_ViewWindow.cxx
src/ViewerTools/ViewerTools_DialogBase.h
tools/dlgfactory/CMakeLists.txt
tools/dlgfactory/GenericDialog.cxx
tools/dlgfactory/GenericDialog.h
tools/dlgfactory/__GDIALOG__.cxx
tools/dlgfactory/__GDIALOG__.h
tools/dlgfactory/__QDIALOG__.cxx
tools/dlgfactory/__QDIALOG__.h
tools/dlgfactory/gtester.cxx
tools/dlgfactory/qtester.cxx

index 317a1b3ce009524bca93f4a1807d3c0210c2aa30..347ee31e5e5a562ea988e53468693ebc77ca836b 100755 (executable)
@@ -149,18 +149,31 @@ ENDIF()
 
 # Qt4
 FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml QtWebKit QtOpenGL QtNetwork)
-INCLUDE(${QT_USE_FILE})
 
 # PyQt4
 FIND_PACKAGE(SalomePyQt4 REQUIRED)
 
-# Optional prerequisites for GUI
+# Optional packages for GUI and their pre-requisites
+
+# - GL viewer: no prereqs
 IF(NOT SALOME_USE_GLVIEWER)
   ADD_DEFINITIONS("-DDISABLE_GLVIEWER")
 ENDIF()
+
+# - OCC viewer: no prereqs
 IF(NOT SALOME_USE_OCCVIEWER)
   ADD_DEFINITIONS("-DDISABLE_OCCVIEWER")
 ENDIF()
+
+# - PV viewer: ParaView
+IF (SALOME_USE_PVVIEWER)
+  FIND_PACKAGE(SalomeParaView)
+  SALOME_LOG_OPTIONAL_PACKAGE(ParaView SALOME_USE_PVVIEWER)
+ELSE()
+  ADD_DEFINITIONS("-DDISABLE_PVVIEWER")
+ENDIF()
+
+# - VTK viewer: VTK
 IF(SALOME_USE_VTKVIEWER)
   # Required components are listed in the FindSalomeVTK.cmake file: 
   FIND_PACKAGE(SalomeVTK) 
@@ -168,33 +181,39 @@ IF(SALOME_USE_VTKVIEWER)
 ELSE()
   ADD_DEFINITIONS("-DDISABLE_VTKVIEWER")
 ENDIF()
+
+# - Plot2d viewer: Qwt
 IF(SALOME_USE_PLOT2DVIEWER)
   FIND_PACKAGE(SalomeQwt)  
   SALOME_LOG_OPTIONAL_PACKAGE(Qwt SALOME_USE_PLOT2DVIEWER)
 ELSE()
   ADD_DEFINITIONS("-DDISABLE_PLOT2DVIEWER")
 ENDIF()
-IF (SALOME_USE_PVVIEWER)
-  FIND_PACKAGE(SalomeParaView)
-  SALOME_LOG_OPTIONAL_PACKAGE(ParaView SALOME_USE_PVVIEWER)
-ELSE()
-  ADD_DEFINITIONS("-DDISABLE_PVVIEWER")
-ENDIF()
+
+# - Graphics viewer: no prereqs
 IF (NOT SALOME_USE_GRAPHICSVIEW)
   ADD_DEFINITIONS("-DDISABLE_GRAPHICSVIEW")
 ENDIF()
+
+# - Python editor: no prereqs
 IF (NOT SALOME_USE_PYVIEWER)
   ADD_DEFINITIONS("-DDISABLE_PYVIEWER")
 ENDIF()
+
+# - Python console: no prereqs
 IF(SALOME_USE_PYCONSOLE)
   # Build with obsolete Python module's methods
   ADD_DEFINITIONS(-DCALL_OLD_METHODS)
 ELSE()
   ADD_DEFINITIONS("-DDISABLE_PYCONSOLE")
 ENDIF()
+
+# - Qx viewer: no prereqs
 IF(NOT SALOME_USE_QXGRAPHVIEWER)
   ADD_DEFINITIONS("-DDISABLE_QXGRAPHVIEWER")
 ENDIF()
+
+# - SALOME object: no prereqs
 IF(NOT SALOME_USE_SALOMEOBJECT)
   ADD_DEFINITIONS("-DDISABLE_SALOMEOBJECT")
 ENDIF()
@@ -383,7 +402,7 @@ EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
 # Create the configuration files:
 #   - in the build tree:
 
-#      Ensure the variables are always defined for the configure:
+# Ensure the variables are always defined for the configure:
 SET(KERNEL_ROOT_DIR "${KERNEL_ROOT_DIR}")
 SET(SIP_ROOT_DIR "${SIP_ROOT_DIR}")
 SET(QT4_ROOT_DIR "${QT4_ROOT_DIR}")
index 5010a661f8dabaf157ca49a0c27cbd82d1be5dad..9b5b44472a8da92e8fcbbc22bbfe3a2481038941 100644 (file)
@@ -124,32 +124,34 @@ IF(SALOME_USE_PLOT2DVIEWER)
   SET_AND_CHECK(QWT_ROOT_DIR_EXP "@PACKAGE_QWT_ROOT_DIR@")
 ENDIF()
 
-# For all prerequisites, load the corresponding targets if the package was used 
+# For all prerequisites, load the corresponding targets if the package was used
 # in CONFIG mode. This ensures dependent projects link correctly
 # without having to set LD_LIBRARY_PATH:
-SET(_PREREQ @_PREREQ_LIST@)
-SET(_PREREQ_CONFIG_DIR @_PREREQ_DIR_LIST@)
-SET(_PREREQ_COMPONENTS "@_PREREQ_COMPO_LIST@")
-LIST(LENGTH _PREREQ_CONFIG_DIR _list_len)
-IF(NOT _list_len EQUAL 0)
+SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@)
+SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@)
+SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@")
+LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@)
+IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0)
   # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
-  MATH(EXPR _range "${_list_len}-1")
-  FOREACH(_p RANGE ${_range})  
-    LIST(GET _PREREQ            ${_p} _pkg    )
-    LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir)
-    LIST(GET _PREREQ_COMPONENTS ${_p} _pkg_compo)
-    MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...")
-    IF(NOT _pkg_compo)
-      FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE 
-          PATHS "${_pkg_dir}" 
-          NO_DEFAULT_PATH)
-    ELSE()
-      STRING(REPLACE "," ";" _compo_lst "${_pkg_compo}")
-      MESSAGE(STATUS "===> (components: ${_pkg_compo})")
-      FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE
-          COMPONENTS ${_compo_lst} 
-          PATHS "${_pkg_dir}"
-          NO_DEFAULT_PATH)
+  MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1")
+  FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@})
+    LIST(GET _PREREQ_@PROJECT_NAME@            ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@    )
+    LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@)
+    LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@)
+    IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@})
+      MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...")
+      IF(NOT _pkg_compo_@PROJECT_NAME@)
+        FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
+            PATHS "${_pkg_dir_@PROJECT_NAME@}"
+            NO_DEFAULT_PATH)
+      ELSE()
+        STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}")
+        MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})")
+        FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE
+            COMPONENTS ${_compo_lst_@PROJECT_NAME@}
+            PATHS "${_pkg_dir_@PROJECT_NAME@}"
+            NO_DEFAULT_PATH)
+      ENDIF()
     ENDIF()
   ENDFOREACH()
 ENDIF()
index 4363516baadca4e751d2f483b8e86c93bd6517c4..1af97129981ed1db3c57f036e2bd9bc01b497058 100644 (file)
 # Author: Adrien Bruneton
 #
 
-# Graphviz detection for salome
+# ParaView detection for salome
 #
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
 
+IF(NOT QT_VERSION)
+  MESSAGE(FATAL_ERROR "Detection of ParaView requires Qt to be detected first!")
+ENDIF()
+
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(ParaView PARAVIEW_USE_FILE 4)
-#MARK_AS_ADVANCED()
 
 INCLUDE(${PARAVIEW_USE_FILE})
index a89fc81a80216f985bd78f093bdca1fac13c3507..86faa8232d1e9aa42601cb74cc1168f298b30b8b 100644 (file)
 #
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
+
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt4 QT_INCLUDES 2)
 MARK_AS_ADVANCED(QT_QMAKE_EXECUTABLE)
 
+# This is only needed to correctly detect Qt help generator tool, to workaround an error 
+# coming from ParaView detection procedure
+FIND_PROGRAM(QT_HELP_GENERATOR qhelpgenerator
+    PATHS "${QT_BINARY_DIR}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
+    DOC "qhelpgenerator used to compile Qt help project files"
+    )
+MARK_AS_ADVANCED(QT_HELP_GENERATOR)
+
 IF(QT4_FOUND) 
   SALOME_ACCUMULATE_HEADERS(QT_INCLUDES)
   SALOME_ACCUMULATE_ENVIRONMENT(PATH ${QT_QMAKE_EXECUTABLE})
   SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${QT_QTCORE_LIBRARY})
+  SET(QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}")
+  MESSAGE(STATUS "Qt version is ${QT_VERSION}")
 ENDIF()
index 32e776c626e4995ecb3591cec0500dbcca245987..e57f46f0bc3e1a861ce0b6e876be8a351f8bdf2a 100644 (file)
@@ -17,6 +17,8 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
+INCLUDE(${QT_USE_FILE})
+
 INSTALL(CODE "MACRO(QT4_COMPILE_TS_ON_INSTALL MYLRELEASE MYTSFILE MYFULLDIR MYOUTQMFILE)
   FILE(MAKE_DIRECTORY \${MYFULLDIR})
   MESSAGE(STATUS \"Compiling \${MYTSFILE}\")
index 054e71d58bdd7670ea03a12ead80c37b4064577c..d60fd3516d8f3162425481c47d80b5457b98b013 100755 (executable)
@@ -168,8 +168,8 @@ bool CAF_Study::saveDocumentAs( const QString& fname )
   bool save = false;
   if ( !stdDoc().IsNull() && stdDoc()->IsSaved() )
   {
-    QString path = QDir::convertSeparators( CAF_Tools::toQString( stdDoc()->GetPath() ) );
-    save = path == QDir::convertSeparators( fname );
+    QString path = QDir::toNativeSeparators( CAF_Tools::toQString( stdDoc()->GetPath() ) );
+    save = path == QDir::toNativeSeparators( fname );
   }
 
   bool status = false;
index 9da4673397a269cc4004ec2119d370c99fa9474b..8f753936ed56ec7ea072b16d65a0f0add7af7703 100755 (executable)
@@ -19,6 +19,9 @@
 
 # --- options ---
 
+# additional include directories
+INCLUDE_DIRECTORIES(${QT_INCLUDES})
+
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(${QT_DEFINITIONS})
 
index 3773bb8734959d56c9581042f5c1e6f1563bfd55..ae9caefd9028d6eb01105ac24db67be0524e7683 100644 (file)
@@ -212,7 +212,7 @@ bool GLViewer_MarkerSet::translateToPS( QFile& hFile, GLViewer_CoordSystem* aVie
     }
     aBuffer+="closepath\nstroke\n";
 
-    hFile.write( aBuffer.toAscii() );
+    hFile.write( aBuffer.toLatin1() );
 
     return true;
 }
@@ -250,7 +250,7 @@ bool GLViewer_MarkerSet::translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aV
         }
         aBuffer+="PU;\n";
 
-        hFile.write( aBuffer.toAscii() );
+        hFile.write( aBuffer.toLatin1() );
     }
 
     return true;
@@ -370,12 +370,12 @@ GLboolean GLViewer_MarkerSet::highlight( GLfloat x, GLfloat y, GLfloat tol, GLbo
     if ( ( isCircle && ( xdist * xdist + ydist * ydist <= myMarkerSize * myMarkerSize ) ) ||
          ( !isCircle && ( fabs( xdist ) <= radius && fabs( ydist ) <= radius ) ) )
     {
-      isFound = FALSE;
+      isFound = false;
       count++;
       for ( it = myCurSelNumbers.begin(); it != myCurSelNumbers.end(); ++it )
         if( i == *it )
         {
-          isFound = TRUE;
+          isFound = true;
           curHNumbers.append( i );
         }
       
@@ -462,13 +462,13 @@ GLboolean GLViewer_MarkerSet::select( GLfloat x, GLfloat y, GLfloat tol, GLViewe
       count++;
       if ( isShift )
       {
-        bool isFound = FALSE;
+        bool isFound = false;
           for( it = mySelNumbers.begin(); it != mySelNumbers.end(); ++it )
             if ( *it == i )
             {
               myUSelNumbers.append( *it );
             remIt = it;
-              isFound = TRUE;
+              isFound = true;
               break;
             }
 
@@ -651,7 +651,7 @@ void GLViewer_MarkerSet::exportNumbers( QList<int>& highlight,
 bool GLViewer_MarkerSet::addOrRemoveSelected( int index )
 {
   if( index < 0 || index > myNumber )
-    return FALSE;
+    return false;
 
   int n = mySelNumbers.indexOf( index );
   if( n == -1 )
@@ -661,7 +661,7 @@ bool GLViewer_MarkerSet::addOrRemoveSelected( int index )
     mySelNumbers.removeAt(n);
     myUSelNumbers.append( index );
   }
-  return TRUE;
+  return true;
 }
 
 /*!
@@ -869,7 +869,7 @@ bool GLViewer_Polyline::translateToPS( QFile& hFile, GLViewer_CoordSystem* aView
 
     aBuffer+="closepath\nstroke\n";
     
-    hFile.write( aBuffer.toAscii() );
+    hFile.write( aBuffer.toLatin1() );
 
     return true;
 }
@@ -895,7 +895,7 @@ bool GLViewer_Polyline::translateToHPGL( QFile& hFile, GLViewer_CoordSystem* aVi
 
     aBuffer+="PU;\n";
     
-    hFile.write( aBuffer.toAscii() );
+    hFile.write( aBuffer.toLatin1() );
 
     return true;
 }
@@ -1394,7 +1394,7 @@ bool GLViewer_TextObject::translateToPS( QFile& hFile, GLViewer_CoordSystem* aVi
     AddCoordsToPS( aBuffer, "moveto", aViewerCS, aPSCS, double(xPos), double(yPos) );
     aBuffer += "(" + aText + ") show\n";
 
-    hFile.write( aBuffer.toAscii() );
+    hFile.write( aBuffer.toLatin1() );
 
     return true;
 }
@@ -1416,7 +1416,7 @@ bool GLViewer_TextObject::translateToHPGL( QFile& hFile, GLViewer_CoordSystem* a
     
     aBuffer = "LB" + aText + "#;";
     
-    hFile.write( aBuffer.toAscii() );
+    hFile.write( aBuffer.toLatin1() );
 
     return true;
 }
@@ -1438,16 +1438,16 @@ bool GLViewer_TextObject::translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerC
            y = double( yPos );
 
     aViewerCS->transform( *aEMFCS, x, y );
-    const char* str = aText.toAscii();
+    const char* str = aText.toLatin1();
 
     int nHeight = 35*14;       // height of font
     int nWidth = 35*12;        // average character width
     int nEscapement = 0;       // angle of escapement
     int nOrientation = 0;      // base-line orientation angle
     int fnWeight = FW_NORMAL;  // font weight
-    DWORD fdwItalic = FALSE;    // italic attribute option
-    DWORD fdwUnderline = FALSE; // underline attribute option
-    DWORD fdwStrikeOut = FALSE; // strikeout attribute option
+    DWORD fdwItalic = false;    // italic attribute option
+    DWORD fdwUnderline = false; // underline attribute option
+    DWORD fdwStrikeOut = false; // strikeout attribute option
     DWORD fdwCharSet = ANSI_CHARSET; // character set identifier
     DWORD fdwOutputPrecision = OUT_DEFAULT_PRECIS;  // output precision
     DWORD fdwClipPrecision = CLIP_DEFAULT_PRECIS;    // clipping precision
@@ -1573,9 +1573,9 @@ GLboolean GLViewer_TextObject::highlight( GLfloat theX, GLfloat theY, GLfloat th
     QRegion circle( (int)(theX - theTol), (int)(theY - theTol),
                       (int)(2 * theTol), (int)(2 * theTol), QRegion::Ellipse );
     if( isCircle )
-        intersection = obj.intersect( circle );
+        intersection = obj.intersected( circle );
     else
-        intersection = obj.intersect( region );
+        intersection = obj.intersected( region );
     
     if( intersection.isEmpty() )
         myIsHigh = false;
@@ -1631,9 +1631,9 @@ GLboolean GLViewer_TextObject::select( GLfloat theX, GLfloat theY, GLfloat theTo
     QRegion circle( (int)(theX - theTol), (int)(theY - theTol),
                       (int)(2 * theTol), (int)(2 * theTol), QRegion::Ellipse );
     if( isCircle )
-        intersection = obj.intersect( circle );
+        intersection = obj.intersected( circle );
     else
-        intersection = obj.intersect( region );
+        intersection = obj.intersected( region );
     
     if( intersection.isEmpty() )
         myIsSel = false;
index 3196622396dc500a40a8a97b625dec4ac42b804e..60df04be0195b60d039d62e2f7a94942e2f7d7d0 100644 (file)
@@ -182,7 +182,7 @@ int GLViewer_Context::MoveTo( int xi, int yi, bool byCircle )
     if( myLastPickedChanged || myUpdateAll )
         myGLViewer2d->updateAll();
     else
-        myGLViewer2d->activateDrawers( anUpdatedObjects, TRUE, TRUE );
+        myGLViewer2d->activateDrawers( anUpdatedObjects, true, true );
 
     return 0;
 }
@@ -220,7 +220,7 @@ int GLViewer_Context::Select( bool Append, bool byCircle )
             if( updateAll || myUpdateAll )
                 myGLViewer2d->updateAll();
             else
-                myGLViewer2d->activateDrawers( aList, TRUE, TRUE );
+                myGLViewer2d->activateDrawers( aList, true, true );
 
             if( mySelectedObjects.count() != 0 && status == SS_Invalid )
                 status = SS_GlobalChanged;
@@ -242,7 +242,7 @@ int GLViewer_Context::Select( bool Append, bool byCircle )
              && mySelectedObjects.indexOf( myLastPicked ) == -1 )
         {
             mySelectedObjects.append( myLastPicked );
-            myGLViewer2d->activateDrawer( myLastPicked, TRUE, TRUE );
+            myGLViewer2d->activateDrawer( myLastPicked, true, true );
 
             if( status == SS_Invalid )
                 status = SS_GlobalChanged;
@@ -267,7 +267,7 @@ int GLViewer_Context::Select( bool Append, bool byCircle )
             if( updateAll || myUpdateAll )
                 myGLViewer2d->updateAll();
             else
-                myGLViewer2d->activateDrawers( aList, TRUE, TRUE );
+                myGLViewer2d->activateDrawers( aList, true, true );
 
             if( mySelectedObjects.count() != 0 )
                 status = SS_GlobalChanged;
@@ -297,7 +297,7 @@ int GLViewer_Context::Select( bool Append, bool byCircle )
             if( updateAll || myUpdateAll )
                 myGLViewer2d->updateAll();
             else
-                myGLViewer2d->activateDrawers( aList, TRUE, TRUE );
+                myGLViewer2d->activateDrawers( aList, true, true );
 
             if( mySelectedObjects.count() != 0 )
                 status = SS_GlobalChanged;
@@ -319,7 +319,7 @@ int GLViewer_Context::Select( bool Append, bool byCircle )
             {
                 myLastPicked = *oit;
                 mySelectedObjects.append( myLastPicked );
-                myGLViewer2d->activateDrawer( myLastPicked, TRUE, TRUE );
+                myGLViewer2d->activateDrawer( myLastPicked, true, true );
                 status = SS_GlobalChanged;
                 return status;
             }
@@ -387,7 +387,7 @@ int GLViewer_Context::SelectByRect( const QRect& theRect, bool Append )
     if( updateAll || myUpdateAll )
         myGLViewer2d->updateAll();
     else
-        myGLViewer2d->activateDrawers( aList, TRUE, TRUE );
+        myGLViewer2d->activateDrawers( aList, true, true );
 
     return status;
 }
@@ -470,10 +470,10 @@ bool GLViewer_Context::NextSelected()
   if ( mySelCurIndex >= 0 && mySelCurIndex < NbSelected() )
   {
     mySelCurIndex++;
-    return TRUE;
+    return true;
   }
 
-  return FALSE;
+  return false;
 }
 
 /*!
@@ -512,7 +512,7 @@ int GLViewer_Context::insertObject( GLViewer_Object* object, bool display, bool
         {
             //QRect* rect = object->getRect()->toQRect();
             //myGLViewer2d->updateBorders( *rect );
-            myGLViewer2d->activateDrawer( object, FALSE );
+            myGLViewer2d->activateDrawer( object, false );
         }
     }
     else
@@ -600,7 +600,7 @@ void GLViewer_Context::clearSelected( bool updateViewer )
   }          
         
   if( updateViewer )
-    myGLViewer2d->activateDrawers( aList, TRUE );
+    myGLViewer2d->activateDrawers( aList, true );
   mySelectedObjects.clear();    
 }
 
@@ -615,12 +615,12 @@ void GLViewer_Context::setSelected( GLViewer_Object* object, bool updateViewer )
 
   if( myActiveObjects.contains( object ) && !mySelectedObjects.contains( object ) )
   {
-    object->setSelected( TRUE );
+    object->setSelected( true );
     mySelectedObjects.append( object );
   }
      
   if( updateViewer )
-    myGLViewer2d->activateDrawer( object, TRUE, TRUE );
+    myGLViewer2d->activateDrawer( object, true, true );
 }
 
 /*!
@@ -636,7 +636,7 @@ void GLViewer_Context::remSelected( GLViewer_Object* object, bool updateViewer )
   object->unselect();
   
   if( updateViewer )
-    myGLViewer2d->activateDrawer( object, TRUE, TRUE );
+    myGLViewer2d->activateDrawer( object, true, true );
 }
 
 /*!
index e3af9817eb83173a327ee971c853486d14ab3861..df27941f4ddb7c53e05c88dd5756ba2c3754dec2 100644 (file)
@@ -70,18 +70,18 @@ public:
   *\paran byCircle - true if needs round sensitive area around mouse cursor, else rectangle
   *function search object rectangle which intersect with sensitive area and call object highlight method
   */
-  int                   MoveTo( int x, int y, bool byCircle = FALSE );
+  int                   MoveTo( int x, int y, bool byCircle = false );
   /*! A function selecting already highlighting object by calling object method select
   *\param Append - true if new selection will be append to existing selection, false - another
   *\param byCircle - true if needs round selection area in complex object
   */
-  int                   Select( bool Append = FALSE, bool byCircle = FALSE );
+  int                   Select( bool Append = false, bool byCircle = false );
   /*! A function selecting objects on scene by rectangle
   *\param theRect - rectangle of selection
   *\param Append - true if new selection will be append to existing selection, false - another
   *function search object rectangle which intersect with theRect and call object select method
   */
-  int                   SelectByRect( const QRect& theRect, bool Append = FALSE );
+  int                   SelectByRect( const QRect& theRect, bool Append = false );
 
   //! A function installing highlight color for all presentation (does not work)
   void                  SetHighlightColor( Quantity_NameOfColor aCol );
index a0745880b48b3a4beae945426bf635132475762f..49eb22ec19ad674e5073971fce4e3a1486af63c1 100644 (file)
@@ -297,7 +297,7 @@ label:
     { 
       glDeleteLists( myGridList, 1 ); 
       if ( glGetError() != GL_NO_ERROR ) 
-    return FALSE;
+    return false;
     } 
          
     float xLoc = (int)(myXPan / myXSize) * myXSize; 
@@ -348,5 +348,5 @@ label:
 
     glEndList();
   }
-  return TRUE;
+  return true;
 }
index 632062d00ba19bd068f5795319cb766071a1a995..3d5653cb2b7cbc60246c03749bd2c4426e72a21d 100644 (file)
@@ -52,7 +52,7 @@ GLViewer_ObjectTip::GLViewer_ObjectTip( GLViewer_ViewPort2d* theParent )
                          Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::Tool | Qt::X11BypassWindowManagerHint );
   mypLabel->setObjectName("ObjectTipText");
   mypLabel->setMargin( 1 );
-  //mypLabel->setAutoMask( FALSE );
+  //mypLabel->setAutoMask( false );
   mypLabel->setFrameStyle( QFrame::Plain | QFrame::Box );
   mypLabel->setLineWidth( 1 );
   mypLabel->setAlignment( Qt::AlignAbsolute | Qt::AlignTop );
index 8fb684394c067232d8ec239dcb220f6af98c92ba..fc19461e0bde79d147310205a2f5f616c767b72b 100644 (file)
@@ -91,55 +91,55 @@ void GLViewer_ViewFrame::createActions()
   aAction = new QtxAction(tr("MNU_DUMP_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_DUMP" ) ),
                           tr( "MNU_DUMP_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_DUMP_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onDumpView()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onDumpView()));
   toolMgr()->registerAction( aAction, DumpId );
 
   // FitAll
   aAction = new QtxAction(tr("MNU_FITALL"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITALL" ) ),
                           tr( "MNU_FITALL" ), 0, this);
   aAction->setStatusTip(tr("DSC_FITALL"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitAll()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onViewFitAll()));
   toolMgr()->registerAction( aAction, FitAllId );
 
   // FitRect
   aAction = new QtxAction(tr("MNU_FITRECT"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITAREA" ) ),
                           tr( "MNU_FITRECT" ), 0, this);
   aAction->setStatusTip(tr("DSC_FITRECT"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitArea()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onViewFitArea()));
   toolMgr()->registerAction( aAction, FitRectId );
 
   // FitSelect
   aAction = new QtxAction(tr("MNU_FITSELECT"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITSELECT" ) ),
                           tr( "MNU_FITSELECT" ), 0, this);
   aAction->setStatusTip(tr("DSC_FITSELECT"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitSelect()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onViewFitSelect()));
   toolMgr()->registerAction( aAction, FitSelectId );
 
   // Zoom
   aAction = new QtxAction(tr("MNU_ZOOM_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_ZOOM" ) ),
                           tr( "MNU_ZOOM_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_ZOOM_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onViewZoom()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onViewZoom()));
   toolMgr()->registerAction( aAction, ZoomId );
 
   // Panning
   aAction = new QtxAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_PAN" ) ),
                           tr( "MNU_PAN_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_PAN_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onViewPan()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onViewPan()));
   toolMgr()->registerAction( aAction, PanId );
 
   // Global Panning
   aAction = new QtxAction(tr("MNU_GLOBALPAN_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_GLOBALPAN" ) ),
                           tr( "MNU_GLOBALPAN_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onViewGlobalPan()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onViewGlobalPan()));
   toolMgr()->registerAction( aAction, GlobalPanId );
 
   aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_RESET" ) ),
                           tr( "MNU_RESET_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_RESET_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onViewReset()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onViewReset()));
   toolMgr()->registerAction( aAction, ResetId );
 }
 
index d9df43cc1a21d16e8da8519260d2ff671fa69745..641760fa7b196accb24665ffbec91844ea0adb66 100644 (file)
@@ -95,7 +95,7 @@ GLViewer_ViewPort2d::GLViewer_ViewPort2d( QWidget* parent, GLViewer_ViewFrame* t
   myGLWidget = new GLViewer_Widget( this, 0 ) ;
   qbl->addWidget( myGLWidget );
   myGLWidget->setFocusProxy( this );
-  setMouseTracking( TRUE );
+  setMouseTracking( true );
 
   myIsDragProcess = noDrag;
   //myCurDragMousePos = QPoint();
@@ -530,7 +530,7 @@ void GLViewer_ViewPort2d::initResize( int x, int y )
     GLfloat zoom, xzoom, yzoom;
     GLfloat w = x;
     GLfloat h = y;
-    bool max = FALSE;
+    bool max = false;
 
     xzoom = (GLfloat)x / myWidth;
     yzoom = (GLfloat)y / myHeight;
@@ -541,7 +541,7 @@ void GLViewer_ViewPort2d::initResize( int x, int y )
         zoom = yzoom;
     else
     {
-        max = TRUE;
+        max = true;
         zoom = xzoom > yzoom ? xzoom : yzoom;
     }
 
index 2c995852099d53861967034b0be16d0c04c50798..46d52c0401ab002ee4a080d75d3bdb854cd2d99f 100644 (file)
@@ -137,7 +137,7 @@ void GLViewer_Viewer2d::updateColors( QColor colorH, QColor colorS )
     */
 
 
-  activateAllDrawers( TRUE );
+  activateAllDrawers( true );
 }
 
 /*!
@@ -668,7 +668,7 @@ void GLViewer_Viewer2d::insertHeader( VectorFileType aType, QFile& hFile )
         header += "%%Pages: 1\n";
         header += "%%Page: 1\n\n";
         
-        hFile.write( header.toAscii() );
+        hFile.write( header.toLatin1() );
     }
     else if( aType == HPGL )
     {
@@ -682,7 +682,7 @@ void GLViewer_Viewer2d::insertHeader( VectorFileType aType, QFile& hFile )
         header += "LT;\n";
         header += "VS36;\n";
         
-        hFile.write( header.toAscii() );
+        hFile.write( header.toLatin1() );
     }
 }
 
@@ -696,12 +696,12 @@ void GLViewer_Viewer2d::insertEnding( VectorFileType aType, QFile& hFile )
     if( aType == POST_SCRIPT )
     {
         QString ending = "showpage\n\n%%EOF";
-        hFile.write( ending.toAscii() );
+        hFile.write( ending.toLatin1() );
     }
     else if( aType == HPGL )
     {
         QString ending = "PU;PA0,0;SP;EC;PG1;EC1;OE\n"; 
-        hFile.write( ending.toAscii() );
+        hFile.write( ending.toLatin1() );
     }
 }
 
@@ -731,7 +731,7 @@ bool GLViewer_Viewer2d::translateTo( VectorFileType aType, QString FileName, Pap
     if ( !getActiveView() )
       return false;
 
-        QFile hFile( FileName.toAscii() );
+        QFile hFile( FileName.toLatin1() );
 
 #ifdef WIN32
     HDC hMetaFileDC;
@@ -793,7 +793,7 @@ bool GLViewer_Viewer2d::translateTo( VectorFileType aType, QString FileName, Pap
         HDC screen_dc = GetDC( 0 ); //The screen device context
         HDC bitDC = CreateCompatibleDC ( screen_dc ); //The context compatible with screen
 
-        hMetaFileDC = CreateEnhMetaFile( bitDC, FileName.toAscii(), &r, "" );
+        hMetaFileDC = CreateEnhMetaFile( bitDC, FileName.toLatin1(), &r, "" );
         SetMapMode( hMetaFileDC, MM_HIMETRIC );
         SetWindowOrgEx( hMetaFileDC, 0, r.bottom, NULL );
         HRGN ClipRgn = CreateRectRgn( 0, 0, AW, AH );
@@ -819,7 +819,7 @@ bool GLViewer_Viewer2d::translateTo( VectorFileType aType, QString FileName, Pap
                                arg( AW-mmLeft-mmRight ).arg( AH-mmBottom-mmTop );
         //It is set clipping path
 
-        hFile.write( aBuffer.toAscii() );
+        hFile.write( aBuffer.toLatin1() );
 
         aCurVP->getGLWidget()->translateBackgroundToPS( hFile, &aViewerCS, &aPaperCS );
     }
index ac60a1f8d2f05ba161db20b654da06ffa8b502de..cec19f953d7df275a938ad7d44fe884b347f5836 100644 (file)
@@ -495,7 +495,7 @@ void AddImagePart( QFile& hFile, QImage& image, int w1, int w2, int h1, int h2,
     
     aBuffer += "> false 3 colorimage\n\n";
 
-    hFile.write( aBuffer.toAscii() );
+    hFile.write( aBuffer.toLatin1() );
   }
 }
 
index 5bdaa0a12d36c3c4261758dfc0983dc6a2be9501..a3d1b87a3f7feeb708a6753df529cc3d452d9699 100644 (file)
@@ -43,7 +43,7 @@ GraphicsView_Object::GraphicsView_Object( QGraphicsItem* theParent )
 //=======================================================================
 GraphicsView_Object::~GraphicsView_Object()
 {
-  QListIterator<QGraphicsItem*> aChildIter( children() );
+  QListIterator<QGraphicsItem*> aChildIter( childItems() );
   while( aChildIter.hasNext() )
   {
     if( QGraphicsItem* aChild = aChildIter.next() )
index 65db77ba3fa99a29bb9305d0d797d838fae66dd7..1d739b7879d1caac336905a81aadf523c862d83d 100755 (executable)
@@ -17,6 +17,8 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
+INCLUDE(UseQt4Ext)
+
 # additional include directories
 INCLUDE_DIRECTORIES(
   ${CAS_INCLUDE_DIRS}
index 6de2ec6c3ab5830455fdddc17319e1e5a5318b7f..59e7d4c5b27a3b8a180239a9a084d52ff9a01ccb 100644 (file)
@@ -17,6 +17,8 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
+INCLUDE(UseQt4Ext)
+
 # --- options ---
 
 # additional include directories
index 332b0643f14f762595a5937298ff5b2e0ca5b317..19914f458936237dbc27b12d2a4dc8a42a2e78f4 100644 (file)
@@ -42,6 +42,7 @@
 #include "qtlocalpeer.h"
 #include <QCoreApplication>
 #include <QTime>
+#include <QDataStream>
 
 #if defined(Q_OS_WIN)
 #include <QLibrary>
index 049acaffe42c53b82c830a3f5fb68ee90985aee5..a86bf3d515a63da0d08dfea8c358113e19eb3626 100644 (file)
@@ -63,16 +63,16 @@ Qt::HANDLE QtLockedFile::getMutexHandle(int idx, bool doCreate)
 
     Qt::HANDLE mutex;
     if (doCreate) {
-        QT_WA( { mutex = CreateMutexW(NULL, FALSE, (LPCWSTR)mname.utf16()); },
-               { mutex = CreateMutexA(NULL, FALSE, mname.toLocal8Bit().constData()); } );
+        QT_WA( { mutex = CreateMutexW(NULL, false, (LPCWSTR)mname.utf16()); },
+               { mutex = CreateMutexA(NULL, false, mname.toLocal8Bit().constData()); } );
         if (!mutex) {
             qErrnoWarning("QtLockedFile::lock(): CreateMutex failed");
             return 0;
         }
     }
     else {
-        QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (LPCWSTR)mname.utf16()); },
-               { mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, mname.toLocal8Bit().constData()); } );
+        QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, false, (LPCWSTR)mname.utf16()); },
+               { mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, false, mname.toLocal8Bit().constData()); } );
         if (!mutex) {
             if (GetLastError() != ERROR_FILE_NOT_FOUND)
                 qErrnoWarning("QtLockedFile::lock(): OpenMutex failed");
@@ -159,7 +159,7 @@ bool QtLockedFile::lock(LockMode mode, bool block)
         }
         if (rmutexes.size()) {
             DWORD res = WaitForMultipleObjects(rmutexes.size(), rmutexes.constData(),
-                                               TRUE, block ? INFINITE : 0);
+                                               true, block ? INFINITE : 0);
             if (res != WAIT_OBJECT_0 && res != WAIT_ABANDONED) {
                 if (res != WAIT_TIMEOUT)
                     qErrnoWarning("QtLockedFile::lock(): WaitForMultipleObjects failed");
index 587eef55fe7ef9d968f26264ed67dc7aff924caf..534f6c2501c9a13807007e9ca430910e50005456 100755 (executable)
@@ -17,8 +17,6 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(UseQt4Ext)
-
 # additional include directories
 INCLUDE_DIRECTORIES(
   ${QT_INCLUDES}
index dd1d585e02ea2bf4b80660065ad8cc5a03ddb8a2..c0b35e46742714e5caa2636fcb3882c50792cc42 100644 (file)
@@ -4013,7 +4013,7 @@ void LightApp_Application::loadDockWindowsState()
   }
 
   if(dwMap) {
-    QList<QDockWidget*> dwList = qFindChildren<QDockWidget*>( desktop() );
+    QList<QDockWidget*> dwList = desktop()->findChildren<QDockWidget*>();
     for ( QList<QDockWidget*>::iterator dit = dwList.begin(); dit != dwList.end(); ++dit )
       {
        QDockWidget* dw = *dit;
@@ -4066,14 +4066,14 @@ void LightApp_Application::saveDockWindowsState()
   QMap<QString, bool> tbMap, dwMap;
   dockWindowsState( visArr, tbMap, dwMap );
 
-  QList<QToolBar*> tbList = qFindChildren<QToolBar*>( desktop() );
+  QList<QToolBar*> tbList = desktop()->findChildren<QToolBar*>();
   for ( QList<QToolBar*>::iterator it = tbList.begin(); it != tbList.end(); ++it )
   {
     QToolBar* tb = *it;
     tbMap.insert( tb->objectName(), tb->toggleViewAction()->isChecked() );
   }
 
-  QList<QDockWidget*> dwList = qFindChildren<QDockWidget*>( desktop() );
+  QList<QDockWidget*> dwList = desktop()->findChildren<QDockWidget*>();
   for ( QList<QDockWidget*>::iterator it = dwList.begin(); it != dwList.end(); ++it )
   {
     QDockWidget* wid = *it;
@@ -4860,7 +4860,7 @@ void LightApp_Application::onDesktopMessage( const QString& message )
 QList<QToolBar*> LightApp_Application::findToolBars( const QStringList& names )
 {
   QList<QToolBar*> aResult;
-  QList<QToolBar*> tbList = qFindChildren<QToolBar*>( desktop() );
+  QList<QToolBar*> tbList = desktop()->findChildren<QToolBar*>();
   for ( QList<QToolBar*>::iterator tit = tbList.begin(); tit != tbList.end(); ++tit ) {
     QToolBar* tb = *tit;    
     QObject* po = Qtx::findParent( tb, "QMainWindow" );
index 6e7e6f99048af76fe9e20ea5fe01e6e1a3847909..1cb736412e31e770924fced387549152ab63d529 100644 (file)
@@ -133,9 +133,9 @@ void LightApp_Dialog::setObjectShown( const int id, const bool shown )
   if( myObjects.contains( id ) && isObjectShown( id )!=shown )
   {
     Object& obj = myObjects[ id ];
-    obj.myEdit->setShown( shown );
-    obj.myBtn->setShown( shown );
-    obj.myLabel->setShown( shown );
+    obj.myEdit->setVisible( shown );
+    obj.myBtn->setVisible( shown );
+    obj.myLabel->setVisible( shown );
     if( !shown )
       ( ( QToolButton* )obj.myBtn )->setChecked( false );
   }
index 87e2bf4290691c1ffd1a9203f390cd2cbfe1ead8..59b1af283df2aab55742108da838bdefcd66dfde 100644 (file)
@@ -83,7 +83,7 @@ bool LightApp_Driver::SaveDatasInFile( const char* theFileName, bool isMultiFile
   if(aFileBuffer == NULL)
     return false;
 
-  myTmpDir = QDir::convertSeparators( QFileInfo( theFileName ).absolutePath() + "/" ).toLatin1().constData() ;
+  myTmpDir = QDir::toNativeSeparators( QFileInfo( theFileName ).absolutePath() + "/" ).toLatin1().constData() ;
 
   int aCurrentPos = 0;
 
@@ -142,7 +142,7 @@ bool LightApp_Driver::ReadDatasFromFile( const char* theFileName, bool isMultiFi
   ifstream aFile(theFileName);
 #endif  
 
-  myTmpDir = QDir::convertSeparators( QFileInfo( theFileName ).absolutePath() + "/" ).toLatin1().constData() ;
+  myTmpDir = QDir::toNativeSeparators( QFileInfo( theFileName ).absolutePath() + "/" ).toLatin1().constData() ;
 
   aFile.seekg(0, ios::end);
   int aFileBufferSize = aFile.tellg();
index d0df209ece5d1dc1790e87f7840e91b26f5aca27..346d271e9133c0a11a843e7014566358f52acf0f 100755 (executable)
@@ -146,7 +146,7 @@ QList<QtxComboBox*> LightApp_ModuleAction::ComboAction::widgets() const
 
   QList<QWidget*> wlist = createdWidgets();
   for ( QList<QWidget*>::const_iterator wit = wlist.begin(); wit != wlist.end(); ++wit )
-    lst += qFindChildren<QtxComboBox *>(*wit);
+    lst += (*wit)->findChildren<QtxComboBox*>();
 
   return lst;
 }
index ca50011cb4f6cb654797bbf95e828be51fad7a70..baec0535361c6f5e2a8a366ad6141e02b0856a65 100644 (file)
@@ -44,7 +44,7 @@ Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
   setModal( true );
 
   setWindowTitle( tr("TLT_RENAME") );
-  setSizeGripEnabled( TRUE );
+  setSizeGripEnabled( true );
 
   QVBoxLayout* topLayout = new QVBoxLayout( this );
   topLayout->setMargin( 11 ); topLayout->setSpacing( 6 );
@@ -76,7 +76,7 @@ Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
   myButtonOk = new QPushButton( GroupButtons );
   myButtonOk->setObjectName( "buttonOk" );
   myButtonOk->setText( tr( "BUT_OK"  ) );
-  myButtonOk->setAutoDefault( TRUE ); myButtonOk->setDefault( TRUE );
+  myButtonOk->setAutoDefault( true ); myButtonOk->setDefault( true );
   GroupButtonsLayout->addWidget( myButtonOk );
 
   GroupButtonsLayout->addStretch();
@@ -84,7 +84,7 @@ Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
   myButtonCancel = new QPushButton( GroupButtons );
   myButtonCancel->setObjectName( "buttonCancel" );
   myButtonCancel->setText( tr( "BUT_CANCEL"  ) );
-  myButtonCancel->setAutoDefault( TRUE );
+  myButtonCancel->setAutoDefault( true );
   GroupButtonsLayout->addWidget( myButtonCancel );
   /***************************************************************/
   
index 3bdd29f7cd4fb58719864231358e8c16b2f2c175..697cb14b5639f3138fe937aa7e3acf0a181b3735 100755 (executable)
@@ -36,7 +36,7 @@
 /*!
  * \brief Constructor
 *
-* Constructor sets myModule in NULL and myIsAutoResumed in TRUE
+* Constructor sets myModule in NULL and myIsAutoResumed in \c true
 */
 LightApp_Operation::LightApp_Operation()
 : SUIT_Operation( 0 ),
@@ -278,7 +278,7 @@ void LightApp_Operation::setDialogActive( const bool active )
 * Autoresume property is used during automatic resuming operation. If operation is
 * suspended and cursor is moved above dialog of the operation then operation is resumed
 * automatically (if possible). It can be resumed only program call otherwise (see
-* LightApp_SwitchOp for more description). This property is TRUE by default and may be
+* LightApp_SwitchOp for more description). This property is \c true by default and may be
 * changed with setAutoResumed() method call.
 */
 bool LightApp_Operation::isAutoResumed() const
index e594ba3e1e6690b1815bd07e3080d062daef70d2..b9ec2c5afb9eedb26b075594db23c9588d202688 100755 (executable)
@@ -26,10 +26,10 @@ INCLUDE_DIRECTORIES(
 )
 
 # additional preprocessor / compiler flags
-ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS})
+ADD_DEFINITIONS(${CAS_DEFINITIONS})
 
 # libraries to link to
-SET(_link_LIBRARIES ${QT_LIBRARIES} ${CAS_LDPATH} ${CAS_KERNEL} ${CAS_TKV3d} ViewerData)
+SET(_link_LIBRARIES ${CAS_LDPATH} ${CAS_KERNEL} ${CAS_TKV3d} ViewerData)
 
 # --- headers ---
 
index b4ffbd215de3571bab70a5534a3bbedebbfc7cac..c11065772b2d6a2a7d36f3581fa6d701614a40e6 100644 (file)
@@ -110,7 +110,7 @@ void OCCViewer_ClipPlaneInteractor::setEnabled( const bool theIsEnabled )
 
 /*!
   \brief Checks whether the interactive operation is in progress.
-  \return TRUE if the interaction is performed on IO object meaning
+  \return \c true if the interaction is performed on IO object meaning
           that no other operations in viewer should be processed.
 */
 bool OCCViewer_ClipPlaneInteractor::isPerforming() const
@@ -120,7 +120,7 @@ bool OCCViewer_ClipPlaneInteractor::isPerforming() const
 
 /*!
   \brief Checks whether the interactive plane can be clicked.
-  \return TRUE if the click interaction is supported for the plane.
+  \return \c true if the click interaction is supported for the plane.
 */
 bool OCCViewer_ClipPlaneInteractor::isClickable( const Handle(AIS_Plane)& thePlane )
 {
@@ -151,7 +151,7 @@ bool OCCViewer_ClipPlaneInteractor::isClickable( const Handle(AIS_Plane)& thePla
 
 /*!
   \brief Checks whether the interactive plane can be dragged.
-  \return TRUE if the dragging interaction is supported for the plane.
+  \return \c true if the dragging interaction is supported for the plane.
 */
 bool OCCViewer_ClipPlaneInteractor::isDraggable( const Handle(AIS_Plane)& thePlane )
 {
index 37fc6c6d0e613be8d21e96390d1c6efe88444387..983b360c90fc94b4d6d303932d2c319a9d5d3a30 100644 (file)
@@ -570,15 +570,15 @@ OCCViewer_ClippingDlg::OCCViewer_ClippingDlg(OCCViewer_ViewWindow* parent , OCCV
   buttonOk = new QPushButton( GroupButtons );
   buttonOk->setObjectName( "buttonOk" );
   buttonOk->setText( tr( "BUT_APPLY_AND_CLOSE"  ) );
-  buttonOk->setAutoDefault( TRUE );
-  buttonOk->setDefault( TRUE );
+  buttonOk->setAutoDefault( true );
+  buttonOk->setDefault( true );
   GroupButtonsLayout->addWidget( buttonOk );
 
   buttonApply = new QPushButton( GroupButtons );
   buttonApply->setObjectName( "buttonApply" );
   buttonApply->setText( tr( "BUT_APPLY"  ) );
-  buttonApply->setAutoDefault( TRUE );
-  buttonApply->setDefault( TRUE );
+  buttonApply->setAutoDefault( true );
+  buttonApply->setDefault( true );
   GroupButtonsLayout->addWidget( buttonApply );
 
   GroupButtonsLayout->addStretch();
@@ -586,11 +586,11 @@ OCCViewer_ClippingDlg::OCCViewer_ClippingDlg(OCCViewer_ViewWindow* parent , OCCV
   buttonClose = new QPushButton( GroupButtons );
   buttonClose->setObjectName( "buttonClose" );
   buttonClose->setText( tr( "BUT_CLOSE"  ) );
-  buttonClose->setAutoDefault( TRUE );
+  buttonClose->setAutoDefault( true );
   GroupButtonsLayout->addWidget( buttonClose );
 
   QPushButton* buttonHelp = new QPushButton( tr( "HELP" ), GroupButtons );
-  buttonHelp->setAutoDefault( TRUE );
+  buttonHelp->setAutoDefault( true );
   GroupButtonsLayout->addWidget( buttonHelp );
 
   /***************************************************************/
index fd110bd3843bd722302016266fd5beb8eee09704..4e700069647201a405bf00dc11b320a8056d31d3 100755 (executable)
@@ -144,11 +144,11 @@ void OCCViewer_CreateRestoreViewDlg::changeImage( QListWidgetItem* curItem )
             highLevel = index;
           }
           for( int j = lowLevel; j <= highLevel; j++ )
-            myListBox->item( j )->setSelected( TRUE );
+            myListBox->item( j )->setSelected( true );
           break;
         }
         if( myListBox->item( i )->isSelected() && i == index )
-          myListBox->item( i )->setSelected( TRUE );
+          myListBox->item( i )->setSelected( true );
       }
     }
     
index 591f5de82ffb4934e92621a79e3b090ac858fbe5..f34af8b9e38cd6c91e198d7192ef1b08d59bbc7a 100644 (file)
@@ -52,7 +52,7 @@ OCCViewer_SetRotationPointDlg::OCCViewer_SetRotationPointDlg( OCCViewer_ViewWind
   setModal( modal );
 
   setWindowTitle(tr("CAPTION"));
-  setSizeGripEnabled(TRUE);
+  setSizeGripEnabled(true);
 
   // Create layout for this dialog
   QGridLayout* layoutDlg = new QGridLayout (this);
@@ -145,7 +145,7 @@ OCCViewer_SetRotationPointDlg::OCCViewer_SetRotationPointDlg( OCCViewer_ViewWind
 
   QPushButton* m_bClose = new QPushButton(tr("&Close"), aGroupBox );
   m_bClose->setObjectName("m_bClose");
-  m_bClose->setAutoDefault(TRUE);
+  m_bClose->setAutoDefault(true);
   m_bClose->setFixedSize(m_bClose->sizeHint());
   connect(m_bClose, SIGNAL(clicked()), this, SLOT(onClickClose()));
 
index 242e9c878c87384f6aa3a6ba42fae6e0d636a767..5b1490b48e391b9032cfff26e1205c673f588ef9 100644 (file)
@@ -46,7 +46,7 @@ class OCCVIEWER_EXPORT OCCViewer_SetRotationPointDlg : public QDialog
 
 public:
   OCCViewer_SetRotationPointDlg(OCCViewer_ViewWindow* , 
-                                const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
+                                const char* name = 0, bool modal = false, Qt::WindowFlags fl = 0);
   ~OCCViewer_SetRotationPointDlg();
 
   void SetAction( QtxAction* theAction ) { myAction = theAction; }
index 18e9096bc70809adffcabdb08f136ca2d6f5e2c7..baa9cbaa6006913b8a8d89908d016154ec91e68a 100755 (executable)
@@ -141,7 +141,7 @@ bool OCCViewer_Utilities::isDialogOpened( OCCViewer_ViewWindow* theView, const Q
 {
   bool isFound = false;
   OCCViewer_ViewFrame* aViewFrame = dynamic_cast<OCCViewer_ViewFrame*>( theView->parent()->parent() );
-  QList<QDialog*> allDialogs = qFindChildren<QDialog*>( aViewFrame );
+  QList<QDialog*> allDialogs = aViewFrame->findChildren<QDialog*>();
   foreach ( QDialog* d, allDialogs )
     if ( d->objectName() == theName )
       isFound = true;
index fe2546853b34f478998ed0d9bc92dc90c2f2e64d..9e16a39238432254c753913d3f81a0a685fb1362 100755 (executable)
@@ -995,7 +995,7 @@ void OCCViewer_Viewer::contextMenuPopup(QMenu* thePopup)
   OCCViewer_ViewWindow* aView = (OCCViewer_ViewWindow*)(myViewManager->getActiveView());
 
   //Support of several toolbars in the popup menu
-  QList<QToolBar*> lst = qFindChildren<QToolBar*>( aView );
+  QList<QToolBar*> lst = aView->findChildren<QToolBar*>();
   QList<QToolBar*>::const_iterator it = lst.begin(), last = lst.end();
   for ( ; it!=last; it++ ) {
     if ( (*it)->parentWidget()->isVisible() )
index ceb5d22ee00ca9545ad90190e5ba7c4573966872..36fd5e7d173877653fe596bd5986c5f97f2ea186 100755 (executable)
@@ -459,36 +459,6 @@ QPaintEngine* OCCViewer_ViewPort::paintEngine() const
   return 0;
 }
 
-/*!
-    Creates the popup. [ virtual protected ]
-*/
-/*void OCCViewer_ViewPort::onCreatePopup( QPopupMenu* popup )
-{
-  if ( popup )
-  {
-    QtxAction* a = new QtxAction( "", tr( "MEN_VP_CHANGEBGR" ), 0, this );
-    a->setStatusTip( tr( "PRP_VP_CHANGEBGR" ) );
-    connect( a, SIGNAL( activated() ), SLOT( onChangeBgColor()));
-    myPopupActions.append( a );
-    a->addTo( popup );
-  }
-}*/
-
-/*!
-    Destroys the popup. [ virtual protected ]
-*/
-/*void OCCViewer_ViewPort::onDestroyPopup( QPopupMenu* popup )
-{
-  if ( popup )
-  {
-    for ( QtxAction* a = myPopupActions.first(); a; a = myPopupActions.next() )
-      a->removeFrom( popup );
-    //while (!myPopupActions.isEmpty())
-    //  delete myPopupActions.takeFirst();
-    myPopupActions.clear();
-  }
-}*/
-
 /*!
   Performs synchronization of view parameters with the specified view.
   Returns \c true if synchronization is done successfully or \c false otherwise.
index f1e1412c377012ac0cc9f84a676a2d26e1ca07f9..ae7b9e6505aabc32a163e50f65cd81e0c1dfc7b0 100755 (executable)
@@ -91,10 +91,6 @@ protected:
   virtual void                   zoom( int, int, int, int ) = 0;
   virtual void                   fitAll( bool keepScale = false, bool withZ = true, bool upd = true ) = 0;
 
-// POPUP
-//  void                             onCreatePopup( QPopupMenu* );
-//  void                             onDestroyPopup( QPopupMenu* );
-
 public slots:
   virtual bool                   synchronize( OCCViewer_ViewPort* );
 
index 7d33637b0a282dc76ad3f1d154f110a996318713..bced039fc87970ecdd9ff6aca1de7f46232cde7c 100755 (executable)
@@ -48,7 +48,7 @@ Plot2d_FitDataDlg::Plot2d_FitDataDlg( QWidget* parent, bool secondAxisY )
   setObjectName( "Plot2d_FitDataDlg" );
   setModal( true );
   setWindowTitle( tr( "FIT_DATA_TLT" ) );
-  setSizeGripEnabled( TRUE );
+  setSizeGripEnabled( true );
   QGridLayout* topLayout = new QGridLayout( this ); 
   topLayout->setSpacing( SPACING_SIZE );
   topLayout->setMargin( MARGIN_SIZE );
@@ -154,11 +154,11 @@ Plot2d_FitDataDlg::Plot2d_FitDataDlg( QWidget* parent, bool secondAxisY )
   // OK/Cancel buttons
   myOkBtn = new QPushButton( tr( "BUT_OK" ), this );
   myOkBtn->setObjectName( "buttonOk" );
-  myOkBtn->setAutoDefault( TRUE );
-  myOkBtn->setDefault( TRUE );
+  myOkBtn->setAutoDefault( true );
+  myOkBtn->setDefault( true );
   myCancelBtn = new QPushButton(  tr( "BUT_CANCEL" ), this );
   myCancelBtn->setObjectName( "buttonCancel" );
-  myCancelBtn->setAutoDefault( TRUE );
+  myCancelBtn->setAutoDefault( true );
 
   topLayout->addWidget( myRangeGrp, 0, 0, 1, 3 );
   topLayout->addWidget( myOkBtn, 1, 0 );
index 2bd9903640136c2dcae48741eacd035400733531..2d585c08cc34bc7c0654c8f34a3f38d74e584ced 100644 (file)
@@ -33,6 +33,8 @@
 #include <QVariant>
 #include <QStyleOption>
 #include <QPaintEvent>
+#include <QTileRules>
+
 #include <qwt_plot.h>
 #include <qwt_painter.h>
 #include <qwt_scale_map.h>
@@ -88,8 +90,8 @@ Plot2d_QwtLegendLabel::Plot2d_QwtLegendLabel( QWidget* parent ) :
   mySymbolType(0),
   myPen( QPen() )
 {
-  myYAxisLeftIcon = yAxisLeft;
-  myYAxisRightIcon = yAxisRight;
+  myYAxisLeftIcon = QPixmap(yAxisLeft);
+  myYAxisRightIcon = QPixmap(yAxisRight);
   int anIconWidth = qMax( myYAxisLeftIcon.width(), myYAxisRightIcon.width() );
   setSpacing( SPACING );
 
@@ -402,7 +404,7 @@ void Plot2d_QwtPlotCurve::drawSeries( QPainter *painter,
   if(hasDeviationData()) {
     painter->save();
     int lineW = deviationMarkerLineWidth();
-    int tickSz = deviationMarkerTickSize() + qRound(lineW/2);
+    int tickSz = deviationMarkerTickSize() + qRound(double(lineW)/2);
     double min, max, xi, yi;
     int xp, ytop, ybtm, tickl, tickr;
     QColor c = isSelected() ? Plot2d_Object::selectionColor() : deviationMarkerColor();
index a6bfb87083fa6663d0c3a501a0bb91a24d792892..4ef7b9364336ec21280209342b88f249e4d6879d 100755 (executable)
@@ -68,7 +68,7 @@ Plot2d_SetupViewDlg::Plot2d_SetupViewDlg( QWidget* parent,
 {
   setModal( true );
   setWindowTitle( tr("TLT_SETUP_PLOT2D_VIEW") );
-  setSizeGripEnabled( TRUE );
+  setSizeGripEnabled( true );
 
   QGridLayout* topLayout = new QGridLayout( this );
   topLayout->setSpacing( SPACING_SIZE );
@@ -411,12 +411,12 @@ Plot2d_SetupViewDlg::Plot2d_SetupViewDlg( QWidget* parent,
 
   /* OK/Cancel buttons */
   myOkBtn = new QPushButton( tr( "BUT_OK" ), this );
-  myOkBtn->setAutoDefault( TRUE );
-  myOkBtn->setDefault( TRUE );
+  myOkBtn->setAutoDefault( true );
+  myOkBtn->setDefault( true );
   myCancelBtn = new QPushButton( tr( "BUT_CANCEL" ), this );
-  myCancelBtn->setAutoDefault( TRUE );
+  myCancelBtn->setAutoDefault( true );
   myHelpBtn = new QPushButton( tr( "BUT_HELP" ), this );
-  myHelpBtn->setAutoDefault( TRUE );
+  myHelpBtn->setAutoDefault( true );
   QHBoxLayout* btnLayout = new QHBoxLayout;
   btnLayout->addWidget( myOkBtn );
   btnLayout->addStretch();
index db3e2acc5836b7967508e09f22a65125044a0dae..efa7311c794bbde3b024a69a06055a3401118872 100755 (executable)
 #include <qwt_plot_zoomer.h>
 #include <qwt_curve_fitter.h>
 #include <qwt_plot_renderer.h>
+#include <qwt_legend.h>
+#include <qwt_scale_widget.h>
 
 #include <stdlib.h>
 #include <limits>
-#include <qprinter.h>
-
-#include <qwt_legend.h>
-#include <qwt_scale_widget.h>
 
 #define DEFAULT_LINE_WIDTH     0     // (default) line width
 #define DEFAULT_MARKER_SIZE    9     // default marker size
@@ -1642,10 +1640,10 @@ void Plot2d_ViewFrame::getFitRangeByMarkers(double& xMin,  double& xMax,
 */
 int Plot2d_ViewFrame::testOperation( const QMouseEvent& me )
 {
-  int btn = me.button() | me.modifiers();
-  const int zoomBtn = Qt::ControlModifier | Qt::LeftButton;
-  const int panBtn  = Qt::ControlModifier | Qt::MidButton;
-  const int fitBtn  = Qt::ControlModifier | Qt::RightButton;
+  int btn = (int)me.button() | (int)me.modifiers();
+  const int zoomBtn = (int)Qt::ControlModifier | (int)Qt::LeftButton;
+  const int panBtn  = (int)Qt::ControlModifier | (int)Qt::MidButton;
+  const int fitBtn  = (int)Qt::ControlModifier | (int)Qt::RightButton;
 
   int op = NoOpId;
   if ( btn == zoomBtn ) {
@@ -2683,7 +2681,7 @@ void Plot2d_ViewFrame::plotMousePressed( const QMouseEvent& me )
     }
   }
   else {
-    int btn = me.button() | me.modifiers();
+    int btn = (int)me.button() | (int)me.modifiers();
     if (btn == Qt::RightButton) {
       QMouseEvent* aEvent = new QMouseEvent(QEvent::MouseButtonPress,
                                             me.pos(), me.button(), me.buttons(), me.modifiers() );
index 38cb6936594be342274ab775d4f7be8221e9521a..d4cf274a222026cdc66ea393d2d9c784ab95f88b 100644 (file)
@@ -27,6 +27,7 @@
 #include <QTextCursor>
 #include <QTextCharFormat>
 #include <QRegExp>
+#include <QMimeData>
 
 #include "PyConsole_EnhEditor.h"
 #include "PyConsole_EnhInterp.h"
@@ -417,7 +418,7 @@ QString PyConsole_EnhEditor::formatDocHTML(const QString & doc) const
  * If the pasted text doesn't contain a line return, no special treatment is done.
  * @param source
  */
-void PyConsole_EnhEditor::insertFromMimeData(const QMimeData * source)
+void PyConsole_EnhEditor::insertFromMimeData(const QMimeData* source)
 {
   if (_multi_line_paste)
     return;
index 8f8fc9cb9e878fc541555a946b76e800fff64353..f505066d32aa1f94a792fa773f7f2974868a38b7 100644 (file)
@@ -75,7 +75,7 @@ protected:
   virtual void   keyPressEvent ( QKeyEvent* event);
   virtual void   customEvent( QEvent* event);
   virtual void   mousePressEvent( QMouseEvent* event );
-  virtual void   insertFromMimeData(const QMimeData * source);
+  virtual void   insertFromMimeData(const QMimeData* source);
 
   virtual PyInterp_Request* createTabRequest( const QString& input );
   virtual void handleTab();
index 83f0e381e8c4f5d26ca84657ec2934d8f0194c3b..247c02e7ce40d5c0d77d81bc60b74324664f0021 100644 (file)
@@ -123,12 +123,12 @@ PyEditor_SettingsDlg::PyEditor_SettingsDlg( PyEditor_Editor* theEditor, QWidget*
   aMainLayout->addStretch( 1 );
   
   myOkBtn = new QPushButton( tr( "BUT_OK" ), this );
-  myOkBtn->setAutoDefault( TRUE );
-  myOkBtn->setDefault( TRUE );
+  myOkBtn->setAutoDefault( true );
+  myOkBtn->setDefault( true );
   myCancelBtn = new QPushButton( tr( "BUT_CANCEL" ), this );
-  myCancelBtn->setAutoDefault( TRUE );
+  myCancelBtn->setAutoDefault( true );
   myHelpBtn = new QPushButton( tr( "BUT_HELP" ), this );
-  myHelpBtn->setAutoDefault( TRUE );
+  myHelpBtn->setAutoDefault( true );
   QHBoxLayout* aButtonLayout = new QHBoxLayout;
   aButtonLayout->addWidget( myOkBtn );
   aButtonLayout->addStretch();
index 3fcdb0f63e476e293e0631155b345f653939f538..ea300e42ca5a0d5ff6fc6567968d45c0009ca679 100644 (file)
 #include <QtxActionToolMgr.h>
 #include <QtxMultiAction.h>
 
-#include <QtGui>
 #include <QLocale>
+#include <QFileDialog>
+#include <QMessageBox>
+#include <QApplication>
+#include <QProcess>
+#include <QStatusBar>
+#include <QTextStream>
 
 /*!
   \class PyViewer_ViewWindow
index d8eadcad7315d67cba636c83175e2300a705319d..0b74d0d4bcdc9e1ccb242ffd59a35cf074b4a1ba 100644 (file)
@@ -902,7 +902,7 @@ void QDS_Datum::setShown( const bool visible, const int flags )
   while ( flag )
   {
     if ( flags & flag && widget( flag ) )
-      widget( flag )->setShown( visible );
+      widget( flag )->setVisible( visible );
     flag = flag >> 1;
   }
 }
index 1a85d98533447cbf24e699be371e26636783f3d8..f43ec8504d21a651c65f86fe7cd7feb71cb34ad6 100755 (executable)
@@ -673,7 +673,7 @@ QString Qtx::findEnvVar( const QString& str, int& start, int& len )
   if ( pos != -1 )
   {
     int i = 1;
-    while ( i <= rx.numCaptures() && varName.isEmpty() )
+    while ( i <= rx.captureCount() && varName.isEmpty() )
     {
       QString capStr = rx.cap( i );
       if ( !capStr.contains( "%" ) && !capStr.contains( "$" ) )
@@ -688,7 +688,7 @@ QString Qtx::findEnvVar( const QString& str, int& start, int& len )
       int end = start + varName.length();
       if ( capIdx > 1 && rx.cap( capIdx - 1 ).contains( QRegExp( "\\$|%" ) ) )
         start = rx.pos( capIdx - 1 ) + rx.cap( capIdx - 1 ).indexOf( QRegExp( "\\$|%" ) );
-      if ( capIdx < rx.numCaptures() && !rx.cap( capIdx - 1 ).isEmpty() )
+      if ( capIdx < rx.captureCount() && !rx.cap( capIdx - 1 ).isEmpty() )
         end++;
       len = end - start;
     }
@@ -863,7 +863,7 @@ QImage Qtx::grayscale( const QImage& img )
 {
   QImage res = img;
 
-  int colNum = res.numColors();
+  int colNum = res.colorCount();
   if ( colNum )
   {
     for ( int i = 0; i < colNum; i++ )
index c47ba73f8671f50cee7958d9f80f6ea996e4f48a..4c368f609f2aff42c2368117349029fcf2f14e63 100644 (file)
@@ -229,7 +229,7 @@ QToolBar* QtxActionToolMgr::find( const QString& title, QMainWindow* mw ) const
   QString pattern = title.toLower();
 
   QToolBar* res = 0;
-  QList<QToolBar*> toolbars = qFindChildren<QToolBar*>( mw );
+  QList<QToolBar*> toolbars = mw->findChildren<QToolBar*>();
   for ( QList<QToolBar*>::iterator it = toolbars.begin(); it != toolbars.end() && !res; ++it )
   {
     if ( (*it)->windowTitle().toLower() == pattern )
index 8bb4769ad3f9ef02771a7f873be1b9fd1d758905..de2fe97da063d957f3df621b047d77f0362be044 100644 (file)
@@ -325,7 +325,7 @@ void QtxColorButton::paintEvent( QPaintEvent* e )
 */
 void QtxColorButton::updateState()
 {
-  QList<QToolButton*> bList = qFindChildren<QToolButton*>( menu() );
+  QList<QToolButton*> bList = menu()->findChildren<QToolButton*>();
   for ( QList<QToolButton*>::iterator cit = bList.begin(); cit != bList.end(); ++cit )
     updateButton( *cit );
 }
index 37574e2d7f05de8dd6ab9f155f4e21368169a7cc..a757120fc1a7e3a40fadcea3fda3f8e9ad62cf53 100755 (executable)
@@ -1327,7 +1327,7 @@ void QtxDialog::keyPressEvent( QKeyEvent* e )
 
   if ( e->key() == Qt::Key_Tab && e->modifiers() & Qt::ControlModifier )
   {
-    QObject* tab = qFindChild<QTabWidget*>( this );
+    QObject* tab = this->findChild<QTabWidget*>();
     if ( tab && !property( "in_tab_event" ).toBool() ) {
       setProperty( "in_tab_event", true );
       QApplication::sendEvent( tab, e );
index c4e827f3b9343d248667421ae7f7eef24f2c89c5..946279d9e766596d166c31c2ad4f46475769924a 100755 (executable)
@@ -152,7 +152,7 @@ void QtxDockAction::toolBars( QList<QToolBar*>& lst ) const
   if ( !mw )
     return;
 
-  QList<QToolBar*> toolbars = qFindChildren<QToolBar*>( mw );
+  QList<QToolBar*> toolbars = mw->findChildren<QToolBar*>();
   for ( QList<QToolBar*>::iterator it = toolbars.begin(); it != toolbars.end(); ++it )
   {
     QToolBar* tb = *it;
@@ -173,7 +173,7 @@ void QtxDockAction::dockWidgets( QList<QDockWidget*>& lst ) const
   if ( !mw )
     return;
 
-  QList<QDockWidget*> dockwidgets = qFindChildren<QDockWidget*>( mw );
+  QList<QDockWidget*> dockwidgets = mw->findChildren<QDockWidget*>();
   for ( QList<QDockWidget*>::iterator it = dockwidgets.begin(); it != dockwidgets.end(); ++it )
   {
     QDockWidget* dw = *it;
index 2e23aec543a459057069d96cf1b05f711155100b..bc50f29941bfecbaffeef31634b1537a92879120 100644 (file)
@@ -376,8 +376,8 @@ void QtxFontEdit::setMode( const int mode )
 
   myMode = mode;
 
-  myFamily->setShown( myMode == Native );
-  myCustomFams->setShown( myMode == Custom );
+  myFamily->setVisible( myMode == Native );
+  myCustomFams->setVisible( myMode == Custom );
 
   updateGeometry();
 }
index f7af18db8eae3f8b3127a5ee9e06b68cce7bf5ce..1e1bf66417f17c60bc5ce5779867d430bdd4f954 100644 (file)
@@ -215,7 +215,7 @@ void QtxMainWindow::Resizer::setFilters( bool on )
       myMain->layout()->removeEventFilter( this );
   }
 
-  QTimer* t = qFindChild<QTimer*>( myMain->layout() );
+  QTimer* t = myMain->layout()->findChild<QTimer*>();
   if ( t ) {
     if ( on )
       t->installEventFilter( this );
index 0fefcd6bbfd6baab5375460c1018049c495867a3..da7d3c29ff2e41ce06956347c2812fc646ecac89 100755 (executable)
@@ -241,7 +241,7 @@ void QtxPathDialog::onBrowse()
   {
     QStringList fList = prepareFilters( entry.filter );
     if ( !fList.isEmpty() )
-      entry.dlg->setFilters( fList );
+      entry.dlg->setNameFilters( fList );
   }
   entry.dlg->selectFile( fileName( id ) );
 
@@ -255,10 +255,10 @@ void QtxPathDialog::onBrowse()
     return;
   
   if ( Qtx::extension( fName ).isEmpty() && !isDir )
-    fName = autoExtension( fName, entry.dlg->selectedFilter() );
+    fName = autoExtension( fName, entry.dlg->selectedNameFilter() );
 
-  fName = QDir::convertSeparators( fName );
-  QString prev = QDir::convertSeparators( fileName( id ) );
+  fName = QDir::toNativeSeparators( fName );
+  QString prev = QDir::toNativeSeparators( fileName( id ) );
   if ( isDir )
   {
     while ( prev.length() && prev.at( prev.length() - 1 ) == QDir::separator() )
@@ -701,7 +701,7 @@ QString QtxPathDialog::autoExtension( const QString& theFileName, const QString&
       ext = ext.mid( ext.indexOf( "." ) + 1 );
     
     if ( !ext.isEmpty() && !ext.contains( "*" ) )
-      fName = QDir::convertSeparators( fName ) + QString( "." ) + ext;
+      fName = QDir::toNativeSeparators( fName ) + QString( "." ) + ext;
   }
   
   return fName;
index 67b5dfa45ddcfdb9c7b6295345d13a9f17c72e68..acc0120b86033e4e4bacec65638a10e7ef54c448 100644 (file)
@@ -211,7 +211,7 @@ void QtxPathEdit::onBrowse( bool /*on*/ )
   }
 
   if ( !path.isEmpty() )
-    myPath->setText( QDir::convertSeparators( path ) ); 
+    myPath->setText( QDir::toNativeSeparators( path ) ); 
 
   myPath->setFocus();
 
index db5c0f9aa3af3f65e110f35694a577d60cb8a064..bfdcc1d66f5756e44224455828fd1d183e69d177 100644 (file)
@@ -391,7 +391,7 @@ void QtxPreferenceItem::resource( QString& sec, QString& param ) const
 */
 void QtxPreferenceItem::setIcon( const QIcon& ico )
 {
-  if ( myIcon.serialNumber() == ico.serialNumber() )
+  if ( myIcon.cacheKey() == ico.cacheKey() )
     return;
 
   myIcon = ico;
index 35f052e03e54bd7c24cf8173e672cb319f3542e1..fbc7e44ab4f1453f02770907f9083c44e34c73d2 100644 (file)
@@ -377,7 +377,7 @@ QString QtxResourceMgr::Resources::fileName( const QString& sect, const QString&
   }
   if( !path.isEmpty() )
   {
-    QString fname = QDir::convertSeparators( path );
+    QString fname = QDir::toNativeSeparators( path );
     QFileInfo inf( fname );
     fname = inf.absoluteFilePath();
     return fname;
@@ -423,7 +423,7 @@ QPixmap QtxResourceMgr::Resources::loadPixmap( const QString& sect, const QStrin
 QTranslator* QtxResourceMgr::Resources::loadTranslator( const QString& sect, const QString& prefix, const QString& name ) const
 {
   QTranslator* trans = new QtxTranslator( 0 );
-  QString fname = QDir::convertSeparators( fileName( sect, prefix, name ) );
+  QString fname = QDir::toNativeSeparators( fileName( sect, prefix, name ) );
   if ( !trans->load( Qtx::file( fname, false ), Qtx::dir( fname ) ) )
   {
     delete trans;
@@ -610,7 +610,7 @@ bool QtxResourceMgr::IniFormat::load( const QString& fname, QMap<QString, Sectio
     }
     else if ( section == "import" )
     {
-      QString impFile = QDir::convertSeparators( Qtx::makeEnvVarSubst( data, Qtx::Always ) );
+      QString impFile = QDir::toNativeSeparators( Qtx::makeEnvVarSubst( data, Qtx::Always ) );
       QFileInfo impFInfo( impFile );
       if ( impFInfo.isRelative() )
              impFInfo.setFile( aFinfo.absoluteDir(), impFile );
@@ -848,7 +848,7 @@ bool QtxResourceMgr::XmlFormat::load( const QString& fname, QMap<QString, Sectio
       }
       else if ( sectElem.tagName() == importTag() && sectElem.hasAttribute( nameAttribute() ) )
       {
-         QString impFile = QDir::convertSeparators( Qtx::makeEnvVarSubst( sectElem.attribute( nameAttribute() ), Qtx::Always ) );
+         QString impFile = QDir::toNativeSeparators( Qtx::makeEnvVarSubst( sectElem.attribute( nameAttribute() ), Qtx::Always ) );
              QFileInfo impFInfo( impFile );
              if ( impFInfo.isRelative() )
                 impFInfo.setFile( aFinfo.absoluteDir(), impFile );
index c2c3f6febaefbb9d9bb4ed300f39ffb3235f7021..df9760bb4d8055b12c6f6c6222c336e986c8b4a4 100644 (file)
@@ -886,7 +886,7 @@ void QtxSearchTool::init( Qt::Orientation orientation )
   myModWidget_layout->setMargin( 0 );
 
   myClose = new QToolButton( myBtnWidget );
-  myClose->setIcon( QIcon( close_xpm ) );
+  myClose->setIcon( QPixmap( close_xpm ) );
   myClose->setAutoRaise( true );
   myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myClose ) );
   connect( myClose, SIGNAL( clicked() ), this, SLOT( hide() ) );
@@ -899,28 +899,28 @@ void QtxSearchTool::init( Qt::Orientation orientation )
   myData->installEventFilter( this );
 
   myToFirst = new QToolButton( myBtnWidget );
-  myToFirst->setIcon( QIcon( first_xpm ) );
+  myToFirst->setIcon( QPixmap( first_xpm ) );
   myToFirst->setAutoRaise( true );
   myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myToFirst ), 0 );
   connect( myToFirst, SIGNAL( clicked() ), this, SLOT( findFirst() ) );
   myToFirst->installEventFilter( this );
 
   myPrev = new QToolButton( myBtnWidget );
-  myPrev->setIcon( QIcon( prev_xpm ) );
+  myPrev->setIcon( QPixmap( prev_xpm ) );
   myPrev->setAutoRaise( true );
   myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myPrev ), 0 );
   connect( myPrev, SIGNAL( clicked() ), this, SLOT( findPrevious() ) );
   myPrev->installEventFilter( this );
 
   myNext = new QToolButton( myBtnWidget );
-  myNext->setIcon( QIcon( next_xpm ) );
+  myNext->setIcon( QPixmap( next_xpm ) );
   myNext->setAutoRaise( true );
   myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myNext ), 0 );
   connect( myNext, SIGNAL( clicked() ), this, SLOT( findNext() ) );
   myNext->installEventFilter( this );
 
   myToLast = new QToolButton( myBtnWidget );
-  myToLast->setIcon( QIcon( last_xpm ) );
+  myToLast->setIcon( QPixmap( last_xpm ) );
   myToLast->setAutoRaise( true );
   myBtnWidget_layout->addWidget( wrapWidget( myBtnWidget, myToLast ), 0 );
   connect( myToLast, SIGNAL( clicked() ), this, SLOT( findLast() ) );
index 291292357186f3288b7ae73cd06070245bbb85eb..a171f535f239a657e2ac90cc65e847c4342c73a1 100644 (file)
@@ -107,10 +107,10 @@ void QtxTreeView::Header::contextMenuEvent( QContextMenuEvent* e )
     QVariant appropriate = model()->headerData( i, orientation(), Qtx::AppropriateRole );
     QIcon icon;
     if ( iconData.isValid() ) {
-      if ( qVariantCanConvert<QIcon>( iconData ) )
-        icon = qVariantValue<QIcon>( iconData );
-      else if ( qVariantCanConvert<QPixmap>( iconData ) )
-        icon = qVariantValue<QPixmap>( iconData );
+      if ( iconData.canConvert( QVariant::Icon ) )
+        icon = iconData.value<QIcon>();
+      else if ( iconData.canConvert( QVariant::Pixmap ) )
+        icon = iconData.value<QPixmap>();
     }
     if( ( !lab.isEmpty() || !icon.isNull() ) && 
             appropriate.isValid() ? appropriate.toInt()==Qtx::Toggled : true )
index 146029464458f8dec7c2fedb373e334d365a5f1b..304ce6145c5d28d63b6eea47c92c60be9c082039 100644 (file)
@@ -394,10 +394,10 @@ QtxWebBrowser::QtxWebBrowser( ) : QMainWindow( 0 )
   connect( myWebView, SIGNAL( linkClicked( QUrl ) ),     SLOT( linkClicked( QUrl ) ) ); 
   connect( myWebView->page(), SIGNAL( linkHovered( QString, QString, QString ) ), 
           SLOT( linkHovered( QString, QString, QString ) ) ); 
-  connect( myWebView->pageAction( QWebPage::DownloadLinkToDisk ), SIGNAL( activated() ),
+  connect( myWebView->pageAction( QWebPage::DownloadLinkToDisk ), SIGNAL( triggered() ),
           SLOT( linkAction() ) );
   disconnect( myWebView->pageAction( QWebPage::OpenLink ), 0, 0, 0 );
-  connect( myWebView->pageAction( QWebPage::OpenLink ), SIGNAL( activated() ),
+  connect( myWebView->pageAction( QWebPage::OpenLink ), SIGNAL( triggered() ),
           SLOT( linkAction() ) );
   
   setCentralWidget( frame );
@@ -621,11 +621,15 @@ void QtxWebBrowser::openLink( const QString& fileName, bool force )
   \brief Load URL
   \param url path to the file to be opened in the browser
 */
-void QtxWebBrowser::load( const QString& url )
+void QtxWebBrowser::load( const QString& link )
 {
-  QString u = url;
-  if ( !u.isEmpty() )
-    myWebView->load( QUrl( u.replace('\\', '/') ) );
+  QString linkPath = link;
+  linkPath.replace('\\', '/');
+  QUrl url = linkPath;
+  if ( !url.isEmpty() ) {
+    if ( url.scheme().isEmpty() ) url.setScheme( "file" );
+    myWebView->load( url );
+  }
 }
 
 /*!
index c7af11e52fb39e671dd7f4ff24d9a9c0f125feb3..b8ad4fc058fa63437d5e92432199c17ade033dc8 100644 (file)
@@ -22,7 +22,7 @@
 //
 #include "QtxWorkspace.h"
 
-#include <QWidgetList>
+#include <QMdiSubWindow>
 
 /*!
   \class QtxWorkspace
@@ -38,7 +38,7 @@
   \param parent parent widget
 */
 QtxWorkspace::QtxWorkspace( QWidget* parent )
-: QWorkspace( parent )
+: QMdiArea( parent )
 {
 }
 
@@ -54,24 +54,24 @@ QtxWorkspace::~QtxWorkspace()
 */
 void QtxWorkspace::tileVertical()
 {
-  QWidgetList winList = windowList();
+  QList<QMdiSubWindow *> winList = subWindowList();
   if ( winList.isEmpty() )
     return;
   
   int count = 0;
-  for ( QWidgetList::const_iterator itr = winList.begin(); itr != winList.end(); ++itr )
+  for ( QList<QMdiSubWindow *>::const_iterator itr = winList.begin(); itr != winList.end(); ++itr )
     if ( !( (*itr)->windowState() & Qt::WindowMinimized ) )
       count++;
 
   if ( !count )
     return;
 
-  if ( activeWindow() && ( activeWindow()->windowState() & Qt::WindowMaximized ) )
-    activeWindow()->showNormal();
+  if ( activeSubWindow() && ( activeSubWindow()->windowState() & Qt::WindowMaximized ) )
+    activeSubWindow()->showNormal();
 
   int y = 0;
   int heightForEach = height() / count;
-  for ( QWidgetList::iterator it = winList.begin(); it != winList.end(); ++it )
+  for ( QList<QMdiSubWindow *>::iterator it = winList.begin(); it != winList.end(); ++it )
   {
     QWidget* win = *it;
     if ( win->windowState() & Qt::WindowMinimized )
@@ -98,24 +98,24 @@ void QtxWorkspace::tileVertical()
 */
 void QtxWorkspace::tileHorizontal()
 {
-  QWidgetList winList = windowList();
+  QList<QMdiSubWindow *> winList = subWindowList();
   if ( winList.isEmpty() )
     return;
 
   int count = 0;
-  for ( QWidgetList::const_iterator itr = winList.begin(); itr != winList.end(); ++itr )
+  for ( QList<QMdiSubWindow *>::const_iterator itr = winList.begin(); itr != winList.end(); ++itr )
     if ( !( (*itr)->windowState() & Qt::WindowMinimized ) )
       count++;
 
   if ( !count )
     return;
 
-  if ( activeWindow() && activeWindow()->windowState() & Qt::WindowMaximized )
-    activeWindow()->showNormal();
+  if ( activeSubWindow() && activeSubWindow()->windowState() & Qt::WindowMaximized )
+    activeSubWindow()->showNormal();
   
   int x = 0;
   int widthForEach = width() / count;
-  for ( QWidgetList::iterator it = winList.begin(); it != winList.end(); ++it )
+  for ( QList<QMdiSubWindow *>::iterator it = winList.begin(); it != winList.end(); ++it )
   {
     QWidget* win = *it;
     if ( win->windowState() & Qt::WindowMinimized )
@@ -136,3 +136,11 @@ void QtxWorkspace::tileHorizontal()
     x += actualW;
   }
 }
+
+void QtxWorkspace::onSubWindowActivated( QMdiSubWindow* subWindow )
+{
+  QWidget* w = 0;
+  if ( subWindow )
+    w = subWindow->widget();
+  emit windowActivated( w );
+}
index 87c3b8ed8341f36b45a8f06020a063895f53d1db..fe7559498b4fabbdc4e5a546e391f8e41ef8a8e9 100644 (file)
 
 #include "Qtx.h"
 
-#include <QWorkspace>
+#include <QMdiArea>
 
 #ifdef WIN32
 #pragma warning( disable:4251 )
 #endif
 
-class QTX_EXPORT QtxWorkspace : public QWorkspace
+class QTX_EXPORT QtxWorkspace : public QMdiArea
 {
   Q_OBJECT
 
@@ -39,9 +39,15 @@ public:
   QtxWorkspace( QWidget* = 0 );
   virtual ~QtxWorkspace();
 
+signals:
+  void        windowActivated( QWidget* );
+
 public slots:
   void        tileVertical();
   void        tileHorizontal();
+
+private slots:
+  void        onSubWindowActivated( QMdiSubWindow* );
 };
 
 #ifdef WIN32
index 5bac837df3e87f8504936e52d15af368f7535ebb..c5c9391842719f1829148dd699f321fe27d325b2 100644 (file)
@@ -28,7 +28,7 @@
 #include "QtxWorkspace.h"
 
 #include <QMenu>
-#include <QWidgetList>
+#include <QMdiSubWindow>
 
 /*!
   \class QtxWorkspaceAction
@@ -238,7 +238,7 @@ void QtxWorkspaceAction::tile()
 {
   QtxWorkspace* ws = workspace();
   if ( ws )
-    ws->tile();
+    ws->tileSubWindows();
 }
 
 /*!
@@ -250,13 +250,13 @@ void QtxWorkspaceAction::cascade()
   if ( !ws )
     return;
 
-  ws->cascade();
+  ws->cascadeSubWindows();
 
         int w = ws->width();
         int h = ws->height();
 
-        QWidgetList winList = ws->windowList();
-  for ( QWidgetList::iterator it = winList.begin(); it != winList.end(); ++it )
+        QList<QMdiSubWindow *> winList = ws->subWindowList();
+  for ( QList<QMdiSubWindow *>::iterator it = winList.begin(); it != winList.end(); ++it )
                 (*it)->resize( int( w * 0.8 ), int( h * 0.8 ) );
 }
 
@@ -311,11 +311,11 @@ void QtxWorkspaceAction::removedFrom( QWidget* w )
 */
 void QtxWorkspaceAction::updateContent()
 {
-  bool count = workspace() ? workspace()->windowList().count() : 0;
-  action( Cascade )->setEnabled( count );
-  action( Tile )->setEnabled( count );
-  action( HTile )->setEnabled( count );
-  action( VTile )->setEnabled( count );
+  bool hasWindows = workspace() && workspace()->subWindowList().count() > 0;
+  action( Cascade )->setEnabled( hasWindows );
+  action( Tile )->setEnabled( hasWindows );
+  action( HTile )->setEnabled( hasWindows );
+  action( VTile )->setEnabled( hasWindows );
 
   updateWindows();
 }
@@ -345,12 +345,12 @@ void QtxWorkspaceAction::updateWindows()
   if ( menuActions() & Windows )
   {
     int index = 1;
-    QWidgetList wList = ws->windowList();
-    for ( QWidgetList::iterator it = wList.begin(); it != wList.end(); ++it, index++ )
+    QList<QMdiSubWindow *> wList = ws->subWindowList();
+    for ( QList<QMdiSubWindow *>::iterator it = wList.begin(); it != wList.end(); ++it, index++ )
     {
       QWidget* wid = *it;
       QAction* a = new QtxAction( wid->windowTitle(), wid->windowTitle(), 0, this, true );
-      a->setChecked( wid == ws->activeWindow() );
+      a->setChecked( wid == ws->activeSubWindow() );
       items.append( a );
       map.insert( a, Windows + index );
     }
@@ -396,7 +396,7 @@ void QtxWorkspaceAction::activateItem( const int idx )
   if ( !ws )
     return;
 
-  QWidgetList wList = ws->windowList();
+  QList<QMdiSubWindow *> wList = ws->subWindowList();
   if ( idx >= 0 && idx < (int)wList.count() )
     wList.at( idx )->setFocus();
 }
index 6721d6d8a65ac8116cecf7dfa9fcbd684e727623..684f1cb8e9e0ac6495fbc597f27cae54f4d1d246 100644 (file)
@@ -2651,7 +2651,7 @@ void QtxWorkstack::insertWidget( QWidget* wid, QWidget* pWid, QWidget* after )
   for ( QWidgetList::iterator itr = moveList.begin(); itr != moveList.end(); ++itr )
   {
     (*itr)->setParent( pWid );
-    (*itr)->setShown( map.contains( *itr ) ? map[*itr] : false );
+    (*itr)->setVisible( map.contains( *itr ) ? map[*itr] : false );
   }
 }
 
@@ -3309,7 +3309,7 @@ QtxWorkstackArea* QtxWorkstack::wgArea( QWidget* wid ) const
   \param wid_to widget specified the destination area
   \param before specifies whether the first widget has to be moved before or after
          the second widget
-  \return TRUE if operation is completed successfully, FALSE otherwise
+  \return \c true if operation is completed successfully, \c false otherwise
 */
 bool QtxWorkstack::move( QWidget* wid, QWidget* wid_to, const bool before )
 {
@@ -3345,7 +3345,7 @@ bool QtxWorkstack::move( QWidget* wid, QWidget* wid_to, const bool before )
 
 /*!
   \brief Group all windows in one area
-  \return TRUE if operation is completed successfully, FALSE otherwise
+  \return \c true if operation is completed successfully, \c false otherwise
 */
 void QtxWorkstack::stack()
 {
index 09bf5eeb16f291b8ac2239a4d59efd50df3149e0..c8ada53829c3b8cb60dd36ccbb8227e53fdb3252 100644 (file)
@@ -524,12 +524,12 @@ QtxSplitDlg::QtxSplitDlg( QWidget* parent, QtxWorkstack* workstack, QtxSplitDlgM
 
   // Buttons for possibility of switching the variants of split
   myButtonPrevious = new QPushButton( this );
-  myButtonPrevious->setIcon( QIcon( prev_xpm ) );
+  myButtonPrevious->setIcon( QPixmap( prev_xpm ) );
   myButtonPrevious->setAutoDefault(true);
   myButtonPrevious->setEnabled( false );
 
   myButtonNext = new QPushButton( this );
-  myButtonNext->setIcon( QIcon( next_xpm ) );
+  myButtonNext->setIcon( QPixmap( next_xpm ) );
   myButtonNext->setAutoDefault(true);
   myButtonNext->setEnabled( false );
 
index ca6a5017316b9c2eecba98a5d6cd549802fe5f03..c7b6303903fef53e35493c1c5ffa8fe2da3e4824 100755 (executable)
@@ -17,6 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
+INCLUDE(UseQt4Ext)
 IF(SALOME_USE_VTKVIEWER)
   INCLUDE(${VTK_USE_FILE})
 ENDIF()
index 705323f503abc8dc278136d4e742414e486626b6..7bd2c7799ba0d0a6dc589cd73b2af7989e8f42e6 100755 (executable)
@@ -17,6 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
+INCLUDE(UseQt4Ext)
 INCLUDE(UsePyQt4)
 IF(SALOME_USE_VTKVIEWER)
   INCLUDE(${VTK_USE_FILE})
index 10de9c3ed247dbc3265b1b17274cfdc25608a097..887c6ceab2f77c60f4ceb723e3638e777ee82219 100644 (file)
@@ -22,5 +22,6 @@
 
 %Module SalomePyQtGUILight
 
+%Import QtCore/QtCoremod.sip
 %Import QtGui/QtGuimod.sip
 %Import QtXml/QtXmlmod.sip
index e77ddf6ae1bc239530fee1bbd4b728f0e2d92ee5..6fcaba594db7885434d56dd20ed98c2176844653 100755 (executable)
@@ -17,6 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
+INCLUDE(UseQt4Ext)
 INCLUDE(UsePyQt4)
 IF(SALOME_USE_VTKVIEWER)
   INCLUDE(${VTK_USE_FILE})
index f130b4e32565c776625c9413d0e52bb8b20b3429..389409921f543aa777a474b319c99e54c2b26f54 100644 (file)
@@ -120,7 +120,7 @@ namespace
   PyModuleHelper* getPythonHelper()
   {
     LightApp_Module* module = getActiveModule();
-    PyModuleHelper* helper = module ? qFindChild<PyModuleHelper*>( module, "python_module_helper" ) : 0;
+    PyModuleHelper* helper = module ? module->findChild<PyModuleHelper*>( "python_module_helper" ) : 0;
     return helper;
   }
   
@@ -1940,7 +1940,7 @@ public:
        myResult = (QAction*)module->createAction( myId, myTipText, icon, myMenuText, myStatusText, myKey, module, myToggle );
       }
       // for Python module, automatically connect action to callback slot
-      PyModuleHelper* helper = qFindChild<PyModuleHelper*>( module, "python_module_helper" );
+      PyModuleHelper* helper = module->findChild<PyModuleHelper*>( "python_module_helper" );
       if ( helper ) helper->connectAction( myResult );
     }
   }
@@ -2561,7 +2561,7 @@ public:
           // specific processing for ParaView viewer:
           // hierarchy of ParaView viewer is much complex than for usual view;
           // we look for sub-widget named "Viewport"
-          QList<QWidget*> lst = qFindChildren<QWidget*>( wnd, "Viewport" );
+          QList<QWidget*> lst = wnd->findChildren<QWidget*>( "Viewport" );
           if ( !lst.isEmpty() ) {
             lst[0]->resize( myWndWidth, myWndHeight );
             myResult = true;
@@ -2714,7 +2714,7 @@ public:
         QWidget* wnd = viewMgr->getActiveView();
         myResult = viewMgr->getActiveView()->getId();
         if ( wnd ) {
-          wnd->setShown(myVisible);
+          wnd->setVisible(myVisible);
           if ( !myVisible && myWidth == 0 && myHeight == 0 ) {
             myWidth = 1024;
             myHeight = 768;
index aa1a95104a419ef31730e6c7f7320c6a564b508b..7db98bcf9b403a6725d74c08526407258ce16b41 100644 (file)
@@ -28,6 +28,7 @@
 %Feature ENABLE_CORBA
 %Feature ENABLE_PLOT2D
 
+%Import QtCore/QtCoremod.sip
 %Import QtGui/QtGuimod.sip
 %Import QtXml/QtXmlmod.sip
 
@@ -39,6 +40,7 @@
 #include <QtxAction.h>
 #include <QtxActionSet.h>
 #include <QtxActionGroup.h>
+#include <QtxTreeView.h>
 #include <SalomePyQt.h>
 %End
 
@@ -206,6 +208,32 @@ private:
   QtxActionGroup( const QtxActionGroup& );
 };
 
+class QtxTreeView : public QTreeView
+{
+%TypeHeaderCode
+#include <QtxTreeView.h>
+%End
+
+%ConvertToSubClassCode
+    if ( qobject_cast<QtxTreeView*>( sipCpp ) )
+      sipClass = sipClass_QtxTreeView;
+    else
+      sipClass = NULL;
+%End
+
+public:
+  explicit QtxTreeView( QWidget* /TransferThis/ = 0 );
+  QtxTreeView( const bool, QWidget* /TransferThis/ = 0  );
+  virtual ~QtxTreeView();
+
+signals:
+  void     sortingEnabled( bool );
+  void     selectionChanged();
+
+private:
+  QtxTreeView( const QtxTreeView& );
+};
+
 enum VisibilityState 
 {
   ShownState,
index 3ec5a29d6b2f886c86fb97448803250404797786..f2815832e61709114a97affd67717d04a5bca48f 100755 (executable)
@@ -321,7 +321,7 @@ void STD_Application::onOpenDoc()
   onOpenDoc( aName );
 }
 
-/*! \retval true, if document was opened successful, else false.*/
+/*! \retval \c true, if document was opened successful, else \c false.*/
 bool STD_Application::onOpenDoc( const QString& aName )
 {
   if ( !abortAllOperations() )
@@ -457,7 +457,7 @@ bool STD_Application::closeActiveDoc( bool permanently )
 }
 
 /*!Check the application on closing.
- * \retval true if possible, else false
+ * \retval \c true if possible, else \c false
  */
 bool STD_Application::isPossibleToClose( bool& closePermanently )
 {
@@ -598,7 +598,7 @@ void STD_Application::onSaveDoc()
     onSaveAsDoc();
 }
 
-/*! \retval TRUE, if doument saved successful, else FALSE.*/
+/*! \retval \c true, if document saved successfully, else \c false.*/
 bool STD_Application::onSaveAsDoc()
 {
   SUIT_Study* study = activeStudy();
@@ -669,7 +669,7 @@ void STD_Application::setEditEnabled( bool theEnable )
   }
 }
 
-/*!\retval true, if document opened successful, else false.*/
+/*!\retval \c true, if document opened successfully, else \c false.*/
 bool STD_Application::useFile(const QString& theFileName)
 {
   bool res = SUIT_Application::useFile( theFileName );
@@ -819,7 +819,7 @@ void STD_Application::clearViewManagers()
   }
 }
 
-/*!\retval TRUE, if view manager \a vm, already in view manager list (\a myViewMgrs).*/
+/*!\retval \c true, if view manager \a vm, already in view manager list (\a myViewMgrs).*/
 bool STD_Application::containsViewManager( SUIT_ViewManager* vm ) const
 {
   return myViewMgrs.contains( vm );
@@ -831,7 +831,7 @@ void STD_Application::onViewManagerActivated( SUIT_ViewManager* vm )
   setActiveViewManager( vm );
 }
 
-/*!Sets status bar show, if \on = true, else status bar hide.*/
+/*!Shows status bar, if on is \c true, else hides status bar.*/
 void STD_Application::onViewStatusBar( bool on )
 {
   if ( on )
index 9ec6f70ca71a1134b2da6ef88e38a5645a52702b..3feae064172d780b86e093e2120c065f9e0fb195 100755 (executable)
@@ -32,6 +32,7 @@
 
 #include <QFrame>
 #include <QVBoxLayout>
+#include <QMdiSubWindow>
 
 #include <stdarg.h>
 
@@ -71,13 +72,7 @@ STD_MDIDesktop::~STD_MDIDesktop()
 */
 SUIT_ViewWindow* STD_MDIDesktop::activeWindow() const
 {
-  SUIT_ViewWindow* wnd = 0;
-
-  QWidget* wid = myWorkspace->activeWindow();
-  if ( wid && wid->inherits( "SUIT_ViewWindow" ) )
-    wnd = (SUIT_ViewWindow*)wid;
-
-  return wnd;
+  return qobject_cast<SUIT_ViewWindow*>( myWorkspace->activeSubWindow()->widget() );
 }
 
 /*!
@@ -87,10 +82,10 @@ QList<SUIT_ViewWindow*> STD_MDIDesktop::windows() const
 {
   QList<SUIT_ViewWindow*> winList;
 
-  QWidgetList children = myWorkspace->windowList();
-  for ( QWidgetList::iterator it = children.begin(); it != children.end(); ++it )
+  QList<QMdiSubWindow *> children = myWorkspace->subWindowList();
+  for ( QList<QMdiSubWindow *>::iterator it = children.begin(); it != children.end(); ++it )
   {
-    SUIT_ViewWindow* vw = ::qobject_cast<SUIT_ViewWindow*>( *it );
+    SUIT_ViewWindow* vw = ::qobject_cast<SUIT_ViewWindow*>( (*it)->widget() );
     if ( vw )
       winList.append( vw );
   }
@@ -106,7 +101,7 @@ void STD_MDIDesktop::addWindow( QWidget* w )
   if ( !w || !workspace() )
     return;
 
-  workspace()->addWindow( w );
+  workspace()->addSubWindow( w );
 }
 
 /*!Call method perform for operation \a type.*/
index 62c565315f97c018149522fe7a7bdb52abbe7dae..473b97554e09a9b414d69f1f0b1c4bd0273f5fa9 100644 (file)
@@ -84,7 +84,7 @@ void SUIT_ActionOperation::setAction( QtxAction* a )
 }
 
 /*! Add action to widget \a wid.
- *\retval TRUE - successful, FALSE - not successful.
+ *\retval true - successful, false - not successful.
  */
 bool SUIT_ActionOperation::addTo( QWidget* wid )
 {
index 811be3e9a838949bf08e2b9e97d7e4a1baab0b53..cf33187fb809e4940d850641155c543f2ee2b1a0 100755 (executable)
@@ -85,8 +85,8 @@ SUIT_Desktop* SUIT_Application::desktop()
 }
 
 /*!
-   \return FALSE if application can not be closed (because of non saved data for example).
-   This method called by SUIT_Session whin closing of application was requested.
+   \return \c false if application can not be closed (because of non saved data for example).
+   This method called by SUIT_Session when closing of application was requested.
 */
 bool SUIT_Application::isPossibleToClose( bool& )
 {
@@ -506,7 +506,7 @@ int SUIT_Application::createMenu( const int id, const QString& menu, const int g
 /*!
   Show/hide menu item corresponding to action
   \param a - action
-  \param on - if it is true, the item will be shown, otherwise it will be hidden
+  \param on - if it is \c true, the item will be shown, otherwise it will be hidden
 */
 void SUIT_Application::setMenuShown( QAction* a, const bool on )
 {
@@ -521,7 +521,7 @@ void SUIT_Application::setMenuShown( QAction* a, const bool on )
 /*!
   Show/hide menu item corresponding to action
   \param id - identificator of action in menu manager
-  \param on - if it is true, the item will be shown, otherwise it will be hidden
+  \param on - if it is \c true, the item will be shown, otherwise it will be hidden
 */
 void SUIT_Application::setMenuShown( const int id, const bool on )
 {
@@ -531,7 +531,7 @@ void SUIT_Application::setMenuShown( const int id, const bool on )
 /*!
   Show/hide tool button corresponding to action
   \param a - action
-  \param on - if it is true, the button will be shown, otherwise it will be hidden
+  \param on - if it is \c true, the button will be shown, otherwise it will be hidden
 */
 void SUIT_Application::setToolShown( QAction* a, const bool on )
 {
@@ -546,7 +546,7 @@ void SUIT_Application::setToolShown( QAction* a, const bool on )
 /*!
   Show/hide menu item corresponding to action
   \param id - identificator of action in tool manager
-  \param on - if it is true, the button will be shown, otherwise it will be hidden
+  \param on - if it is \c true, the button will be shown, otherwise it will be hidden
 */
 void SUIT_Application::setToolShown( const int id, const bool on )
 {
@@ -556,7 +556,7 @@ void SUIT_Application::setToolShown( const int id, const bool on )
 /*!
   Show/hide both menu item and tool button corresponding to action
   \param a - action
-  \param on - if it is true, the item will be shown, otherwise it will be hidden
+  \param on - if it is \c true, the item will be shown, otherwise it will be hidden
 */
 void SUIT_Application::setActionShown( QAction* a, const bool on )
 {
@@ -567,7 +567,7 @@ void SUIT_Application::setActionShown( QAction* a, const bool on )
 /*!
   Show/hide both menu item and tool button corresponding to action
   \param id - identificator in both menu manager and tool manager
-  \param on - if it is true, the item will be shown, otherwise it will be hidden
+  \param on - if it is \c true, the item will be shown, otherwise it will be hidden
 */
 void SUIT_Application::setActionShown( const int id, const bool on )
 {
@@ -622,7 +622,7 @@ QList<int> SUIT_Application::actionIds() const
   \param tip - tool tip
   \param key - shortcut
   \param parent - parent object
-  \param toggle - if it is TRUE the action will be a toggle action, otherwise it will be a command action
+  \param toggle - if it is \c true the action will be a toggle action, otherwise it will be a command action
   \param reciever - object that contains slot
   \param member - slot to be called when action is activated
 */
index 542b160bb3ea05dd37575dd3c43c4fb0f312dc2c..ae64e8eb5768b45b097d9e7be680affc514884e1 100755 (executable)
@@ -67,7 +67,7 @@ public:
   //! Returns main widget (Desktop) of the application (if it exists)
   virtual SUIT_Desktop* desktop();
 
-  /*! Returns FALSE if application can not be closed (because of non saved data for example). 
+  /*! Returns \c false if application can not be closed (because of non saved data for example). 
       This method called by SUIT_Session whin closing of application was requested. */
   virtual bool          isPossibleToClose( bool& );
 
index cabf0085e30d32cf7fa23ffc0981064d54d0d2e1..29c799efdfa6ca9bfd2a09d8c959333f682e1949 100755 (executable)
@@ -93,7 +93,7 @@ SUIT_DataObjectKeyHandle::~SUIT_DataObjectKeyHandle()
 
 /*!
  * Checks: Is key null?
- *\retval TRUE - if null, esle false.
+ *\retval \c true - if null, esle \c false.
 */
 bool SUIT_DataObjectKeyHandle::isNull() const
 {
@@ -110,7 +110,7 @@ void SUIT_DataObjectKeyHandle::nullify()
 
 /*!
  *  Operator less.
- *\retval boolean. TRUE - If current key less than \a kw.
+ *\retval boolean. \c true - If current key less than \a kw.
  */
 bool SUIT_DataObjectKeyHandle::operator<( const SUIT_DataObjectKeyHandle& kw ) const
 {
@@ -134,7 +134,7 @@ bool SUIT_DataObjectKeyHandle::operator<( const SUIT_DataObjectKeyHandle& kw ) c
 
 /*!
  * Operator is equal.
- *\retval boolean. TRUE - If current key equal \a kw.
+ *\retval boolean. \c true - If current key equal \a kw.
  */
 bool SUIT_DataObjectKeyHandle::operator==( const SUIT_DataObjectKeyHandle& kw ) const
 {
index 96bc10f3dbd6b3ed71324b679710474d20850fc2..f3cf4039dd5d0b22d3aa34b513bc063f0613c210 100755 (executable)
@@ -127,7 +127,7 @@ void SUIT_Desktop::customEvent( QEvent* e )
                  wid->testAttribute( Qt::WA_WState_Hidden );
 
     addWindow( wid );
-    wid->setShown( !invis );
+    wid->setVisible( !invis );
   }
 }
 
index 20a4ac4938870ecd609ffe7d2c08730f92223485..a390792c89808df08c16617a59c69f0056344ae8 100755 (executable)
@@ -124,7 +124,7 @@ SUIT_FileDlg::SUIT_FileDlg( QWidget* parent, bool open, bool showQuickDir, bool
   myCheckPermissions( true )
 {
   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-  
+  setOption(QFileDialog::DontUseNativeDialog, true);
   setModal( modal );
   setSizeGripEnabled( true );
   if ( parent )
@@ -518,7 +518,7 @@ QString SUIT_FileDlg::addExtension( const QString& fileName ) const
     return fileName;
 
   QRegExp r( QString::fromLatin1("\\(?[a-zA-Z0-9.*? +;#|]*\\)?$") );
-  int index = r.indexIn( selectedFilter().trimmed() );
+  int index = r.indexIn( selectedNameFilter().trimmed() );
 
   if ( QFileInfo( fileName ).exists() )
     return fileName; // if file exists return as is
@@ -529,7 +529,7 @@ QString SUIT_FileDlg::addExtension( const QString& fileName ) const
     // Due to transformations from the filter list (*.txt *.*xx *.c++ SUIT*.* ) we 
     // will have the pattern (\.txt|\..*xx|\.c\+\+|\..*) (as we validate extension only, 
     // we remove everything except extension mask from the pattern
-    QString wildcard = selectedFilter().mid( index, r.matchedLength() ).trimmed();
+    QString wildcard = selectedNameFilter().mid( index, r.matchedLength() ).trimmed();
     // replace '|' and ';' separators by space symbol and also brackets if there are some
     wildcard.replace( QRegExp( "[\\|;|(|)]" )," " ); 
 
@@ -599,12 +599,12 @@ bool SUIT_FileDlg::processPath( const QString& path )
 */
 void SUIT_FileDlg::addFilter( const QString& filter )
 {
-  QStringList flist = filters();
+  QStringList flist = nameFilters();
   if ( !flist.contains( filter ) ) {
     flist << filter;
-    setFilters( flist );
+    setNameFilters( flist );
   }
-  selectFilter( filter );
+  selectNameFilter( filter );
 }
 
 /*!
@@ -768,9 +768,9 @@ QString SUIT_FileDlg::getFileName( QWidget* parent, const QString& initial,
   tmpfilename = tmpfilename.replace(QRegExp("\\*"), "" ).replace(QRegExp("\\?"), "" );
 
   if ( filters.isEmpty() )
-    fd.setFilter( tr( "ALL_FILES_FILTER" ) ); // All files (*)
+    fd.setNameFilter( tr( "ALL_FILES_FILTER" ) ); // All files (*)
   else
-    fd.setFilters( filters );
+    fd.setNameFilters( filters );
 
   if ( !caption.isEmpty() )
     fd.setWindowTitle( caption );
@@ -875,9 +875,9 @@ QStringList SUIT_FileDlg::getOpenFileNames( QWidget* parent, const QString& init
   fd.setFileMode( ExistingFiles );
 
   if ( filters.isEmpty() )
-    fd.setFilter( tr( "ALL_FILES_FILTER" ) ); // All files (*)
+    fd.setNameFilter( tr( "ALL_FILES_FILTER" ) ); // All files (*)
   else
-    fd.setFilters( filters );
+    fd.setNameFilters( filters );
 
   if ( !caption.isEmpty() )
     fd.setWindowTitle( caption );
index 41749ff44cc342d8907288838ce33a6948364087..48f92b96a599e5152e964e245057035938eb7342 100755 (executable)
@@ -142,7 +142,7 @@ void SUIT_Operation::clearFlags( const int f )
  * \brief Test the flags of operation
   * \param f - flags of operation to be tested
 *
-*  Returns TRUE if the specified flags setted in the operation (see Flags enumeration)
+*  Returns \c true if the specified flags setted in the operation (see Flags enumeration)
 */
 bool SUIT_Operation::testFlags( const int f ) const
 {
@@ -262,9 +262,9 @@ void SUIT_Operation::suspend()
 
 /*!
  * \brief Verifies whether operator is ready to start.
- * \return TRUE if operation is ready to start
+ * \return \c true if operation is ready to start
 *
-* Default implementation returns TRUE. Redefine this method to add own verifications
+* Default implementation returns \c true. Redefine this method to add own verifications
 */
 bool SUIT_Operation::isReadyToStart() const
 {
@@ -329,14 +329,14 @@ void SUIT_Operation::commitOperation()
 
 /*!
  * \brief Sets slot which is called when operation is started
 * \param theReceiver - object containing slot
 * \param theSlot - slot of theReceiver object
 * \return TR if slot was connected successfully, FALSE otherwise
-*
-* Sets slot which is called when operation is started. There is no point in
-* using this method. It would be better to inherit own operator from base
-* one and redefine startOperation method
-*/
+ * \param theReceiver - object containing slot
+ * \param theSlot - slot of theReceiver object
* \return \c true if slot was connected successfully, \c false otherwise
+ *
+ * Sets slot which is called when operation is started. There is no point in
+ * using this method. It would be better to inherit own operator from base
+ * one and redefine startOperation method
+ */
 bool SUIT_Operation::setSlot( const QObject* theReceiver, const char* theSlot )
 {
   return connect( this, SIGNAL( callSlot() ), theReceiver, theSlot );
@@ -345,7 +345,7 @@ bool SUIT_Operation::setSlot( const QObject* theReceiver, const char* theSlot )
 /*!
  * \brief Verifies whether given operator is valid for this one
   * \param theOtherOp - other operation
-  * \return Returns TRUE if the given operator is valid for this one
+  * \return Returns \c true if the given operator is valid for this one
 *
 * Verifies whether given operator is valid for this one (i.e. can be started "above"
 * this operator)
@@ -357,10 +357,10 @@ bool SUIT_Operation::isValid( SUIT_Operation* ) const
 
 /*!
  * \brief Verifies whether this operator can be always started above any already runnig one
-  * \return Returns TRUE if current operation must not be checked for ActiveOperation->IsValid( this )
+  * \return Returns \c true if current operation must not be checked for ActiveOperation->IsValid( this )
 *
 * This method must be redefined in derived operation if operation of derived class
-* must be always can start above any launched one. Default implementation returns FALSE,
+* must be always can start above any launched one. Default implementation returns \c false,
 * so it is being checked for IsValid, but some operations may overload IsGranted()
 * In this case they will always start, no matter what operation is running.
 */
@@ -371,9 +371,9 @@ bool SUIT_Operation::isGranted() const
 
 /*!
  * \brief Verifies whether operation is an runned one (state()==Running)
-  * \return TRUE if operation is active, FALSE otherwise
+  * \return \c true if operation is active, \c false otherwise
 *
-* Verifies whether operation is an running. Returns TRUE if state of operator
+* Verifies whether operation is an running. Returns \c true if state of operator
 * is Running
 */
 bool SUIT_Operation::isRunning() const
@@ -383,9 +383,9 @@ bool SUIT_Operation::isRunning() const
 
 /*!
  * \brief Verifies whether operation is an active for study.
-  * \return TRUE if operation is active, FALSE otherwise
+  * \return \c true if operation is active, \c false otherwise
 *
-* Verifies whether operation is an active on. Returns TRUE if this operator
+* Verifies whether operation is an active on. Returns \c true if this operator
 * is active for study
 */
 bool SUIT_Operation::isActive() const
@@ -470,7 +470,7 @@ bool SUIT_Operation::commitTransaction( const QString& name )
 }
 
 /*!
- * \brief Returns TRUE if transaction is opened.
+ * \brief Returns \c true if transaction is opened.
 */
 bool SUIT_Operation::hasTransaction() const
 {
index 88942671e2487654cb91ad6ea20358fe49e94162..86dbf2959b2d90b10af24801463d440f47cfe553 100755 (executable)
@@ -87,7 +87,7 @@ QString SUIT_ResourceMgr::userFileName( const QString& appName, const bool for_l
   // Try config file, given in arguments
   for (int i = 1; i < arguments.count(); i++) {
     QRegExp rx ("--resources=(.+)");
-    if ( rx.indexIn( arguments[i] ) >= 0 && rx.numCaptures() > 0 ) {
+    if ( rx.indexIn( arguments[i] ) >= 0 && rx.captureCount() > 0 ) {
       QString file = rx.cap(1);
       QFileInfo fi (file);
       pathName = fi.absoluteFilePath();
index 2d5c95514c679b57edaf7aa1c9fe559a89fab4f7..3fe6234ccef59f884347f4f0bfb1e07e5bd83d2b 100755 (executable)
@@ -96,7 +96,7 @@ SUIT_Operation* SUIT_Study::activeOperation() const
 }
 
 /*!
- *\retval TRUE - if study saved, else FALSE.
+ *\retval \c true - if study saved, else \c false.
  */
 bool SUIT_Study::isSaved() const
 {
@@ -104,7 +104,7 @@ bool SUIT_Study::isSaved() const
 }
 
 /*!
- *\retval TRUE - if study modified, else FALSE.
+ *\retval \c true - if study modified, else \c false.
  */
 bool SUIT_Study::isModified() const
 {
@@ -128,7 +128,7 @@ bool SUIT_Study::createDocument( const QString& )
 }
 
 /*!
- * Open document. Sets file name. return true.
+ * Open document. Sets file name. return \c true.
  */
 bool SUIT_Study::openDocument( const QString& fileName )
 {
@@ -152,7 +152,7 @@ bool SUIT_Study::saveDocumentAs( const QString& fileName )
 }
 
 /*!
- *\retval TRUE - if document saved successful, else FALSE.
+ *\retval \c true - if document saved successful, else \c false.
  */
 bool SUIT_Study::saveDocument()
 {
@@ -266,13 +266,13 @@ SUIT_Operation* SUIT_Study::blockingOperation( SUIT_Operation* theOp ) const
 /*!
  * \brief Starts operation
   * \param theOp - operation to be started
-  * \param toCheck - if parameters is equal TRUE then checking performed whether
+  * \param toCheck - if parameters is equal \c true then checking performed whether
   * all already started operations allow to start this operation above them (default
-  * value is TRUE
-  * \return TRUE if operation is started, FALSE otherwise
+  * value is \c true
+  * \return \c true if operation is started, \c false otherwise
 *
 * Verifies whether theOp operation can be started above already started ones (if toCheck
-* parameter is equal TRUE) and starts it
+* parameter is equal \c true) and starts it
 */
 bool SUIT_Study::start( SUIT_Operation* theOp, const bool toCheck )
 {
@@ -320,7 +320,7 @@ bool SUIT_Study::start( SUIT_Operation* theOp, const bool toCheck )
 /*!
  * \brief Aborts operation
   * \param theOp - operation to be aborted
-  * \return TRUE if operation is aborted successfully
+  * \return \c true if operation is aborted successfully
 *
 * Verifies whether operation already started and aborts it in this case (sets execution
 * status to Rejected and stops operation)
@@ -344,7 +344,7 @@ bool SUIT_Study::abort( SUIT_Operation* theOp )
 /*!
  * \brief Commits operation
   * \param theOp - operation to be committed
-  * \return TRUE if operation is committed successfully
+  * \return \c true if operation is committed successfully
 *
 * Verifies whether operation already started and commits it in this case (sets execution
 * status to Accepted and stops operation)
@@ -370,7 +370,7 @@ bool SUIT_Study::commit( SUIT_Operation* theOp )
 /*!
  * \brief Commits operation
   * \param theOp - operation to be committed
-  * \return TRUE if operation is suspended successfully
+  * \return \c true if operation is suspended successfully
 *
 * Verifies whether operation already started and suspends it in this case. Operations
 * ususlly are suspended to start other one above them.
@@ -390,7 +390,7 @@ bool SUIT_Study::suspend( SUIT_Operation* theOp )
 /*!
  * \brief Resumes operation
   * \param theOp - operation to be resumed
-  * \return TRUE if operation is aborted successfully
+  * \return \c true if operation is aborted successfully
 *
 * Verifies whether operation already started but suspended and resumesit in this case.
 */
@@ -523,7 +523,7 @@ bool SUIT_Study::commitTransaction( const QString& )
 }
 
 /*!
- * \brief Returns TRUE if transaction is opened.
+ * \brief Returns \c true if transaction is opened.
 */
 bool SUIT_Study::hasTransaction() const
 {
index fc2ebf2d9d4f991c533d48a27f211aeeb17664fc..0aaf645730e0bbfaafc8514a82bb047dbb0d4332 100755 (executable)
@@ -327,7 +327,7 @@ bool SUIT_ViewManager::isVisible() const
 void SUIT_ViewManager::setShown( const bool on )
 {
   for ( int i = 0; i < myViews.count(); i++ )
-    myViews.at( i )->setShown( on );
+    myViews.at( i )->setVisible( on );
 }
 
 /*!Emit on \a theEvent mouse pressed in \a theView.*/
index 9edcf4c232c5090f97ba7dfb6d08712ecc4f38d0..eed1244fd3f6e8c993e1f17478077d626ff95d11 100755 (executable)
@@ -403,7 +403,7 @@ void SUIT_ViewWindow::updateSyncViews()
     SUIT_Application* app = SUIT_Session::session()->activeApplication();
     if ( app ) {
       SUIT_Desktop* d = app->desktop();
-      QList<SUIT_ViewWindow*> allViews = qFindChildren<SUIT_ViewWindow*>( d );
+      QList<SUIT_ViewWindow*> allViews = d->findChildren<SUIT_ViewWindow*>();
       foreach( SUIT_ViewWindow* vw, allViews ) {
        if ( !vw || vw == this ) continue; // skip invalid views and this one
        SUIT_CameraProperties otherProps = vw->cameraProperties();
@@ -473,7 +473,7 @@ void SUIT_ViewWindow::synchronizeView( SUIT_ViewWindow* viewWindow, int id )
   SUIT_Desktop* d = app->desktop();
   if ( !d ) return;
 
-  QList<SUIT_ViewWindow*> allViews = qFindChildren<SUIT_ViewWindow*>( d );
+  QList<SUIT_ViewWindow*> allViews = d->findChildren<SUIT_ViewWindow*>();
   foreach( SUIT_ViewWindow* vw, allViews ) {
     if ( !vw->cameraProperties().isValid() )
       continue;                    // omit views not supporting camera properties
index 1403de1da632592488bc34af4c806ef0f658d73e..865469493edd350dd2cc799c6cdc56dabb365575 100644 (file)
@@ -99,7 +99,7 @@ void SVTK_ComboAction::update()
 {
   QList<QWidget*> aList = createdWidgets();
   for ( QList<QWidget*>::const_iterator it = aList.begin(); it != aList.end(); ++it )
-    updateCombo( qFindChild<QComboBox*>(*it) );
+    updateCombo( (*it)->findChild<QComboBox*>() );
 }
 
 void SVTK_ComboAction::updateCombo( QComboBox* combo )
index 196e55a4cc961e84250b43992de336efa7578426..75e2a6ef464de99122401782e0c9878cb7030143 100644 (file)
@@ -76,7 +76,7 @@ QVTK_GenericRenderWindowInteractor
   // Start a one-shot timer for <DELAY> ms. 
   //
   static int DELAY = 1;
-  myTimer->setSingleShot(TRUE);
+  myTimer->setSingleShot(true);
   myTimer->start(DELAY);
   return 1;
 }
index 009ba0c081aa869c2fb2fbab9b8f8e1fc00b43e2..a07a76bc1121f41b794ed24792a016f90d5e3841 100644 (file)
@@ -49,7 +49,7 @@ SVTK_NonIsometricDlg
   m_MainWindow(theParent)
 {
   setWindowTitle(tr("DLG_TITLE"));
-  setSizeGripEnabled(TRUE);
+  setSizeGripEnabled(true);
 
   // Create layout for this dialog
   QGridLayout* layoutDlg = new QGridLayout (this);
@@ -109,16 +109,16 @@ SVTK_NonIsometricDlg
   // Create <OK> button
   QPushButton* m_bOk = new QPushButton(tr("O&K"), aGroupBox2);
   m_bOk->setObjectName("m_bOk");
-  m_bOk->setDefault(TRUE);
-  m_bOk->setAutoDefault(TRUE);
+  m_bOk->setDefault(true);
+  m_bOk->setAutoDefault(true);
   // Create <Apply> button
   QPushButton* m_bApply = new QPushButton(tr("&Apply"), aGroupBox2);
   m_bApply->setObjectName("m_bApply");
-  m_bApply->setAutoDefault(TRUE);
+  m_bApply->setAutoDefault(true);
   // Create <Cancel> button
   QPushButton* m_bCancel = new QPushButton(tr("&Cancel"), aGroupBox2);
   m_bCancel->setObjectName("m_bCancel");
-  m_bCancel->setAutoDefault(TRUE);
+  m_bCancel->setAutoDefault(true);
 
   // Layout buttons
   aHBoxLayout2->addWidget(m_bOk);
index d8705969b87d6777bd2b2c2e2f19d91ae0b44368..f88de7fad8f43ce99ee2af4bb44af0589d26eb56 100755 (executable)
@@ -62,7 +62,7 @@ SVTK_SetRotationPointDlg
   myRWInteractor(theParent->GetInteractor())
 {
   setWindowTitle(tr("DLG_TITLE"));
-  setSizeGripEnabled(TRUE);
+  setSizeGripEnabled(true);
 
   // Create layout for this dialog
   QGridLayout* layoutDlg = new QGridLayout (this);
@@ -153,7 +153,7 @@ SVTK_SetRotationPointDlg
 
   QPushButton* m_bClose = new QPushButton(tr("&Close"), aGroupBox );
   m_bClose->setObjectName("m_bClose");
-  m_bClose->setAutoDefault(TRUE);
+  m_bClose->setAutoDefault(true);
   m_bClose->setFixedSize(m_bClose->sizeHint());
   connect(m_bClose, SIGNAL(clicked()), this, SLOT(onClickClose()));
 
index 15a8d0a24099f3a06040f7ecae4bede198cc30bb..80ad0e440e4a4d5b48aee1e2df59b6c98c0f880e 100644 (file)
@@ -232,7 +232,7 @@ SVTK_UpdateRateDlg
       aGridLayout->addWidget(aLabel, 0, 0);
 
       QLineEdit* aLineEdit = new QLineEdit( aGroupBox );
-      aLineEdit->setReadOnly( TRUE );
+      aLineEdit->setReadOnly( true );
       aGridLayout->addWidget(aLineEdit, 0, 1);
 
       myCurrentUpdateRateLineEdit = aLineEdit;
@@ -244,7 +244,7 @@ SVTK_UpdateRateDlg
       aGridLayout->addWidget(aLabel, 1, 0);
 
       QLineEdit* aLineEdit = new QLineEdit( aGroupBox );
-      aLineEdit->setReadOnly( TRUE );
+      aLineEdit->setReadOnly( true );
       aGridLayout->addWidget(aLineEdit, 1, 1);
 
       myNumberOfCellsLineEdit = aLineEdit;
@@ -259,23 +259,23 @@ SVTK_UpdateRateDlg
     aHBoxLayout->setSpacing(6);
     {
       QPushButton* aPushButton = new QPushButton(tr("OK"), aGroupBox);
-      aPushButton->setDefault(TRUE);
-      aPushButton->setAutoDefault(TRUE);
+      aPushButton->setDefault(true);
+      aPushButton->setAutoDefault(true);
       aHBoxLayout->addWidget(aPushButton);
       connect(aPushButton, SIGNAL(clicked()), this, SLOT(onClickOk()));
     }
     {
       QPushButton* aPushButton = new QPushButton(tr("Apply"), aGroupBox);
-      aPushButton->setDefault(TRUE);
-      aPushButton->setAutoDefault(TRUE);
+      aPushButton->setDefault(true);
+      aPushButton->setAutoDefault(true);
       aHBoxLayout->addWidget(aPushButton);
       connect(aPushButton, SIGNAL(clicked()), this, SLOT(onClickApply()));
     }
     aHBoxLayout->addStretch();
     {
       QPushButton* aPushButton = new QPushButton(tr("Close"), aGroupBox);
-      aPushButton->setDefault(TRUE);
-      aPushButton->setAutoDefault(TRUE);
+      aPushButton->setDefault(true);
+      aPushButton->setAutoDefault(true);
       aHBoxLayout->addWidget(aPushButton);
       connect(aPushButton, SIGNAL(clicked()), this, SLOT(onClickClose()));
     }
index eb3a754e939d50f3b9fd0fcb427af1c6265eca1c..7f1be47983f1aa3d8e298134170bf75786698184 100644 (file)
@@ -565,7 +565,7 @@ void SVTK_Viewer::contextMenuPopup( QMenu* thePopup )
 
   if(TViewWindow* aView = dynamic_cast<TViewWindow*>(myViewManager->getActiveView())){
     //Support of several toolbars in the popup menu
-    QList<QToolBar*> lst = qFindChildren<QToolBar*>( aView );
+    QList<QToolBar*> lst = aView->findChildren<QToolBar*>();
     QList<QToolBar*>::const_iterator it = lst.begin(), last = lst.end();
     for( ; it!=last; it++ )
       thePopup->addAction( (*it)->toggleViewAction() );
index 6db03e85446a4cc374b24623009551ebbf7e2bfd..eb1d0d6aac5d94046b29b076d8a7260f02d33f90 100755 (executable)
@@ -59,7 +59,7 @@ SVTK_ViewParameterDlg::SVTK_ViewParameterDlg(QtxAction* theAction,
   myRWInteractor(theParent->GetInteractor())
 {
   setWindowTitle(tr("DLG_TITLE"));
-  setSizeGripEnabled(TRUE);
+  setSizeGripEnabled(true);
 
   // Top layout
   QVBoxLayout* aTopLayout = new QVBoxLayout(this);
@@ -349,7 +349,7 @@ SVTK_ViewParameterDlg::SVTK_ViewParameterDlg(QtxAction* theAction,
 
   QPushButton* m_bClose = new QPushButton(tr("&Close"), aGroupBox );
   m_bClose->setObjectName("m_bClose");
-  m_bClose->setAutoDefault(TRUE);
+  m_bClose->setAutoDefault(true);
   m_bClose->setFixedSize(m_bClose->sizeHint());
   connect(m_bClose, SIGNAL(clicked()), this, SLOT(onClickClose()));
 
index 2d98877d6dc7bff2654dae5b3dfc1811f480f881..03f144750a36e0e5a43e3c7473dbab8fe1239e89 100755 (executable)
@@ -2125,7 +2125,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_DUMP" ) ),
                            tr( "MNU_DUMP_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_DUMP_VIEW"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(onDumpView()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(onDumpView()));
   mgr->registerAction( anAction, DumpId );
 
   // FitAll
@@ -2133,7 +2133,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITALL" ) ),
                            tr( "MNU_FITALL" ), 0, this);
   anAction->setStatusTip(tr("DSC_FITALL"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(onFitAll()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(onFitAll()));
   mgr->registerAction( anAction, FitAllId );
 
   // FitRect
@@ -2141,7 +2141,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITAREA" ) ),
                            tr( "MNU_FITRECT" ), 0, this);
   anAction->setStatusTip(tr("DSC_FITRECT"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(activateWindowFit()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(activateWindowFit()));
   mgr->registerAction( anAction, FitRectId );
 
   // FitSelection
@@ -2149,7 +2149,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITSELECTION" ) ),
                            tr( "MNU_FITSELECTION" ), 0, this);
   anAction->setStatusTip(tr("DSC_FITSELECTION"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(onFitSelection()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(onFitSelection()));
   mgr->registerAction( anAction, FitSelectionId );
 
   // Zoom
@@ -2157,7 +2157,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ZOOM" ) ),
                            tr( "MNU_ZOOM_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_ZOOM_VIEW"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(activateZoom()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(activateZoom()));
   mgr->registerAction( anAction, ZoomId );
 
   // Panning
@@ -2165,7 +2165,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_PAN" ) ),
                            tr( "MNU_PAN_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_PAN_VIEW"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(activatePanning()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(activatePanning()));
   mgr->registerAction( anAction, PanId );
 
   // Global Panning
@@ -2173,7 +2173,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_GLOBALPAN" ) ),
                            tr( "MNU_GLOBALPAN_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(activateGlobalPanning()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(activateGlobalPanning()));
   mgr->registerAction( anAction, GlobalPanId );
 
   // Change rotation point
@@ -2190,7 +2190,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ROTATE" ) ),
                            tr( "MNU_ROTATE_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_ROTATE_VIEW"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(activateRotation()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(activateRotation()));
   mgr->registerAction( anAction, RotationId );
 
   // Projections
@@ -2198,7 +2198,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FRONT" ) ),
                            tr( "MNU_FRONT_VIEW" ), 0, this, false, "Viewers:Front view");
   anAction->setStatusTip(tr("DSC_FRONT_VIEW"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(onFrontView()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(onFrontView()));
   this->addAction(anAction);
   mgr->registerAction( anAction, FrontId );
 
@@ -2206,7 +2206,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BACK" ) ),
                            tr( "MNU_BACK_VIEW" ), 0, this, false, "Viewers:Back view");
   anAction->setStatusTip(tr("DSC_BACK_VIEW"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(onBackView()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(onBackView()));
   this->addAction(anAction);
   mgr->registerAction( anAction, BackId );
 
@@ -2214,7 +2214,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TOP" ) ),
                            tr( "MNU_TOP_VIEW" ), 0, this, false, "Viewers:Top view");
   anAction->setStatusTip(tr("DSC_TOP_VIEW"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(onTopView()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(onTopView()));
   this->addAction(anAction);
   mgr->registerAction( anAction, TopId );
 
@@ -2222,7 +2222,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BOTTOM" ) ),
                            tr( "MNU_BOTTOM_VIEW" ), 0, this, false, "Viewers:Bottom view");
   anAction->setStatusTip(tr("DSC_BOTTOM_VIEW"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(onBottomView()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(onBottomView()));
   this->addAction(anAction);
   mgr->registerAction( anAction, BottomId );
 
@@ -2230,7 +2230,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_LEFT" ) ),
                            tr( "MNU_LEFT_VIEW" ), 0, this, false, "Viewers:Left view");
   anAction->setStatusTip(tr("DSC_LEFT_VIEW"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(onLeftView()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(onLeftView()));
   this->addAction(anAction);
   mgr->registerAction( anAction, LeftId );
 
@@ -2238,7 +2238,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RIGHT" ) ),
                            tr( "MNU_RIGHT_VIEW" ), 0, this, false, "Viewers:Right view");
   anAction->setStatusTip(tr("DSC_RIGHT_VIEW"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(onRightView()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(onRightView()));
   this->addAction(anAction);
   mgr->registerAction( anAction, RightId );
 
@@ -2265,7 +2265,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RESET" ) ),
                            tr( "MNU_RESET_VIEW" ), 0, this, false, "Viewers:Reset view");
   anAction->setStatusTip(tr("DSC_RESET_VIEW"));
-  connect(anAction, SIGNAL(activated()), this, SLOT(onResetView()));
+  connect(anAction, SIGNAL(triggered()), this, SLOT(onResetView()));
   this->addAction(anAction);
   mgr->registerAction( anAction, ResetId );
 
@@ -2374,7 +2374,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            tr( "MNU_SVTK_PRESELECTION_STANDARD" ), 0, this);
   anAction->setStatusTip(tr("DSC_SVTK_PRESELECTION_STANDARD"));
   anAction->setCheckable(true);
-  connect(anAction, SIGNAL(activated()), aSignalMapper, SLOT(map()));
+  connect(anAction, SIGNAL(triggered()), aSignalMapper, SLOT(map()));
   aSignalMapper->setMapping( anAction, Standard_Preselection );
   mgr->registerAction( anAction, StandardPreselectionId );
   
@@ -2383,7 +2383,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            tr( "MNU_SVTK_PRESELECTION_DYNAMIC" ), 0, this);
   anAction->setStatusTip(tr("DSC_SVTK_PRESELECTION_DYNAMIC"));
   anAction->setCheckable(true);
-  connect(anAction, SIGNAL(activated()), aSignalMapper, SLOT(map()));
+  connect(anAction, SIGNAL(triggered()), aSignalMapper, SLOT(map()));
   aSignalMapper->setMapping( anAction, Dynamic_Preselection );
   mgr->registerAction( anAction, DynamicPreselectionId );
 
@@ -2392,7 +2392,7 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr)
                            tr( "MNU_SVTK_PRESELECTION_DISABLED" ), 0, this);
   anAction->setStatusTip(tr("DSC_SVTK_PRESELECTION_DISABLED"));
   anAction->setCheckable(true);
-  connect(anAction, SIGNAL(activated()), aSignalMapper, SLOT(map()));
+  connect(anAction, SIGNAL(triggered()), aSignalMapper, SLOT(map()));
   aSignalMapper->setMapping( anAction, Preselection_Disabled );
   mgr->registerAction( anAction, DisablePreselectionId );
 
index 11d041cb7b1d981046b13b446671176f0af93d85..8927c1630cf14d4cf724dcadc81b72dc44988c7e 100644 (file)
@@ -84,6 +84,7 @@
 #include <SALOME_LifeCycleCORBA.hxx>
 
 #include <QApplication>
+#include <QWidget>
 #include <QAction>
 #include <QRegExp>
 #include <QCheckBox>
@@ -206,9 +207,9 @@ void SalomeApp_Application::start()
     QStringList pyfiles;
     QString loadStudy;
 
-    for (int i = 1; i < qApp->argc(); i++) {
+    for (int i = 1; i < qApp->arguments().size(); i++) {
       QRegExp rxs ("--study-hdf=(.+)");
-      if ( rxs.indexIn( QString(qApp->argv()[i]) ) >= 0 && rxs.capturedTexts().count() > 1 ) {
+      if ( rxs.indexIn( qApp->arguments()[i] ) >= 0 && rxs.capturedTexts().count() > 1 ) {
         QString file = rxs.capturedTexts()[1];
         QFileInfo fi ( file );
         QString extension = fi.suffix().toLower();
@@ -217,7 +218,7 @@ void SalomeApp_Application::start()
       }
       else {
         QRegExp rxp ("--pyscript=\\[(.+)\\]");
-        if ( rxp.indexIn( QString(qApp->argv()[i]) ) >= 0 && rxp.capturedTexts().count() > 1 ) {
+        if ( rxp.indexIn( qApp->arguments()[i] ) >= 0 && rxp.capturedTexts().count() > 1 ) {
           // pyscript
           QStringList dictList = rxp.capturedTexts()[1].split("},", QString::SkipEmptyParts);
           for (int k = 0; k < dictList.count(); ++k) {
@@ -895,7 +896,7 @@ void SalomeApp_Application::onDumpStudy( )
   DumpStudyFileDlg fd( desktop() );
   fd.setValidator( new DumpStudyFileValidator( &fd ) );
   fd.setWindowTitle( tr( "TOT_DESK_FILE_DUMP_STUDY" ) );
-  fd.setFilters( aFilters );
+  fd.setNameFilters( aFilters );
   fd.myPublishChk->setChecked( anIsPublish );
   fd.myMultiFileChk->setChecked( anIsMultiFile );
   fd.mySaveGUIChk->setChecked( anIsSaveGUI );
@@ -1314,8 +1315,24 @@ void SalomeApp_Application::moduleActionSelected( const int id )
 /*!Gets CORBA::ORB_var*/
 CORBA::ORB_var SalomeApp_Application::orb()
 {
-  ORB_INIT& init = *SINGLETON_<ORB_INIT>::Instance();
-  static CORBA::ORB_var _orb = init( qApp->argc(), qApp->argv() );
+  static CORBA::ORB_var _orb;
+
+  if ( CORBA::is_nil( _orb ) ) {
+    QStringList args = QApplication::arguments();
+    int argc = args.size();
+    std::vector<std::string> args1(argc);
+    char** argv = new char*[argc];
+    for ( int i = 0; i < argc; ++i ) {
+      args1[i] = args[i].toStdString();
+      argv[i]  = const_cast<char*>( args1[i].c_str() );
+    }
+
+    ORB_INIT& init = *SINGLETON_<ORB_INIT>::Instance();
+    _orb = init( argc, argv );
+
+    delete [] argv;
+  }
+
   return _orb;
 }
 
index 40563d9391e8ea8e8a644c281933e88f2f17c333..0d630cfeb9ca32915a54839b3b38106d858b113d 100644 (file)
@@ -302,10 +302,24 @@ char* SalomeApp_Engine_i::getVersion()
 */
 CORBA::ORB_var SalomeApp_Engine_i::orb()
 {
-  ORB_INIT& init = *SINGLETON_<ORB_INIT>::Instance();
-  // TODO: using QApplication here looks ugly, think how to
-  // obtain the ORB reference in a nicer way...
-  static CORBA::ORB_var _orb = init( qApp->argc(), qApp->argv() );
+ static CORBA::ORB_var _orb;
+
+  if ( CORBA::is_nil( _orb ) ) {
+    QStringList args = QApplication::arguments();
+    int argc = args.size();
+    std::vector<std::string> args1(argc);
+    char** argv = new char*[argc];
+    for ( int i = 0; i < argc; ++i ) {
+      args1[i] = args[i].toStdString();
+      argv[i]  = const_cast<char*>( args1[i].c_str() );
+    }
+
+    ORB_INIT& init = *SINGLETON_<ORB_INIT>::Instance();
+    _orb = init( argc, argv );
+
+    delete [] argv;
+  }
+
   return _orb;
 }
 
index 1e2f8252449a7d6f4676580069ec38686a1864e2..801faa6129e38b382441c082b7312121766d8d44 100644 (file)
@@ -62,7 +62,7 @@ SalomeApp_StudyPropertiesDlg::SalomeApp_StudyPropertiesDlg(QWidget* parent)
   : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
     myIsChanged(false)
 {
-  setModal( TRUE );
+  setModal( true );
 
   setWindowTitle(tr("TLT_STUDY_PROPERTIES"));
   setSizeGripEnabled( true );
index 463b601811e199fb8cab406ed5936ea3eb14dcd4..8ca931aa34556de571216267192277e34c0d6ceb 100755 (executable)
 # variable *_ROOT_DIR).  
 #
 
+INCLUDE(UsePyQt4)
+
+# --- resources ---
+
+# uic files / to be processed by pyuic 
+SET(_pyuic_files
+  minmax.ui
+)
+
+# scripts / pyuic wrappings
+PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+
 # --- scripts ---
 
 # scripts / static
 # TODO: process UIC files via PyQt4 pyuic tool, see UsePyQt4.cmake
 SET(_plugins_SCRIPTS
-  minmax_dialog.py
+  ${_pyuic_SCRIPTS}
   minmax_plugin.py
   trihedron.py
   tubedialog_ui.py
diff --git a/src/SalomeApp/pluginsdemo/minmax_dialog.py b/src/SalomeApp/pluginsdemo/minmax_dialog.py
deleted file mode 100644 (file)
index b5c5db6..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2015  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# 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, or (at your option) any later version.
-#
-# 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# Form implementation generated from reading ui file 'minmax.ui'
-#
-# Created: Thu Mar  1 15:23:57 2012
-#      by: PyQt4 UI code generator 4.8.1
-#
-# WARNING! All changes made in this file will be lost!
-
-from PyQt4 import QtCore, QtGui
-
-try:
-    _fromUtf8 = QtCore.QString.fromUtf8
-except AttributeError:
-    _fromUtf8 = lambda s: s
-
-class Ui_Dialog(object):
-    def setupUi(self, Dialog):
-        Dialog.setObjectName(_fromUtf8("Dialog"))
-        Dialog.resize(178, 156)
-        Dialog.setSizeGripEnabled(True)
-        self.gridLayout = QtGui.QGridLayout(Dialog)
-        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
-        self.label_2 = QtGui.QLabel(Dialog)
-        self.label_2.setObjectName(_fromUtf8("label_2"))
-        self.gridLayout.addWidget(self.label_2, 0, 0, 1, 1)
-        self.mesh = QtGui.QLineEdit(Dialog)
-        self.mesh.setReadOnly(True)
-        self.mesh.setObjectName(_fromUtf8("mesh"))
-        self.gridLayout.addWidget(self.mesh, 0, 1, 1, 2)
-        self.label_3 = QtGui.QLabel(Dialog)
-        self.label_3.setObjectName(_fromUtf8("label_3"))
-        self.gridLayout.addWidget(self.label_3, 1, 0, 1, 1)
-        self.control = QtGui.QComboBox(Dialog)
-        self.control.setObjectName(_fromUtf8("control"))
-        self.gridLayout.addWidget(self.control, 1, 1, 1, 2)
-        self.label = QtGui.QLabel(Dialog)
-        self.label.setObjectName(_fromUtf8("label"))
-        self.gridLayout.addWidget(self.label, 2, 0, 1, 1)
-        self.minvalue = QtGui.QLineEdit(Dialog)
-        self.minvalue.setReadOnly(True)
-        self.minvalue.setObjectName(_fromUtf8("minvalue"))
-        self.gridLayout.addWidget(self.minvalue, 2, 1, 1, 2)
-        self.label_4 = QtGui.QLabel(Dialog)
-        self.label_4.setObjectName(_fromUtf8("label_4"))
-        self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1)
-        self.maxvalue = QtGui.QLineEdit(Dialog)
-        self.maxvalue.setReadOnly(True)
-        self.maxvalue.setObjectName(_fromUtf8("maxvalue"))
-        self.gridLayout.addWidget(self.maxvalue, 3, 1, 1, 2)
-        self.buttonBox = QtGui.QDialogButtonBox(Dialog)
-        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
-        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close|QtGui.QDialogButtonBox.Help)
-        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
-        self.gridLayout.addWidget(self.buttonBox, 4, 0, 1, 3)
-
-        self.retranslateUi(Dialog)
-        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.OnCancel)
-        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("helpRequested()")), Dialog.helpMessage)
-        QtCore.QObject.connect(self.control, QtCore.SIGNAL(_fromUtf8("activated(QString)")), Dialog.compute_minmax)
-        QtCore.QMetaObject.connectSlotsByName(Dialog)
-        Dialog.setTabOrder(self.mesh, self.control)
-        Dialog.setTabOrder(self.control, self.minvalue)
-        Dialog.setTabOrder(self.minvalue, self.maxvalue)
-        Dialog.setTabOrder(self.maxvalue, self.buttonBox)
-
-    def retranslateUi(self, Dialog):
-        Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Get min and max value of control", None, QtGui.QApplication.UnicodeUTF8))
-        self.label_2.setText(QtGui.QApplication.translate("Dialog", "Mesh", None, QtGui.QApplication.UnicodeUTF8))
-        self.label_3.setText(QtGui.QApplication.translate("Dialog", "Control", None, QtGui.QApplication.UnicodeUTF8))
-        self.label.setText(QtGui.QApplication.translate("Dialog", "Min", None, QtGui.QApplication.UnicodeUTF8))
-        self.label_4.setText(QtGui.QApplication.translate("Dialog", "Max", None, QtGui.QApplication.UnicodeUTF8))
-
index adc7594261714fe04b48b66808d42c4a122a0236..f08ce6312e812fea671d09464591b7a801e2d390 100644 (file)
@@ -30,7 +30,7 @@ def minmax(context):
   from PyQt4.QtCore import Qt
   from PyQt4.QtCore import SIGNAL
 
-  from minmax_dialog import Ui_Dialog
+  from minmax_ui import Ui_Dialog
 
   import salome
   import SMESH
index 7e1fbe5f44136516d910becbff68af9472bdeaf8..5f514ae81a56da1e5040c9d632deea53cf99aa8c 100755 (executable)
@@ -103,13 +103,15 @@ void MessageOutput( QtMsgType type, const char* msg )
   switch ( type )
   {
   case QtDebugMsg:
-    //MESSAGE( "Debug: " << msg );
+#ifdef QT_DEBUG_MESSAGE
+    MESSAGE( "Debug: " << qPrintable( QString(msg) ) );
+#endif
     break;
   case QtWarningMsg:
-    MESSAGE( "Warning: " << msg );
+    MESSAGE( "Warning: " << qPrintable( QString(msg) ) );
     break;
   case QtFatalMsg:
-    MESSAGE( "Fatal: " << msg );
+    MESSAGE( "Fatal: " << qPrintable( QString(msg) ) );
     break;
   }
 }
@@ -377,7 +379,7 @@ int main( int argc, char **argv )
   _qappl.setApplicationVersion( salomeVersion() );
 
   // Add application library path (to search style plugin etc...)
-  QString path = QDir::convertSeparators( SUIT_Tools::addSlash( QString( ::getenv( "GUI_ROOT_DIR" ) ) ) + QString( "bin/salome" ) );
+  QString path = QDir::toNativeSeparators( SUIT_Tools::addSlash( QString( ::getenv( "GUI_ROOT_DIR" ) ) ) + QString( "bin/salome" ) );
   _qappl.addLibraryPath( path );
 
   bool isGUI    = isFound( "GUI",    argc, argv );
index 2789e23a8a47cba946b936fe163e35dbd0878289..3cb7fa8a55f377a0f7dd19ec48c33e952c365c3d 100644 (file)
@@ -261,17 +261,27 @@ void Session_ServerCheck::run()
   // start check servers
   int current = 0;
   QString error;
-  int    argc = QApplication::instance()->argc();
-  char** argv = QApplication::instance()->argv();
 
+  QStringList args = QApplication::arguments();
+  int argc = args.size();
+  std::vector<std::string> args1(argc);
+  char** argv = new char*[argc];
+  for ( int i = 0; i < argc; ++i ) {
+    args1[i] = args[i].toStdString();
+    argv[i]  = const_cast<char*>( args1[i].c_str() );
+  }
+
+  bool OK = true;
+  
   // 1. Check naming service
-  for ( int i = 0; i < myAttempts; i++ ) {
+  for ( int i = 0; (i < myAttempts) && OK; i++ ) {
     Locker locker( this );
 
     setStep( current * myAttempts + i );
 
     try {
-      CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
+      ORB_INIT& init = *SINGLETON_<ORB_INIT>::Instance();
+      CORBA::ORB_var orb = init( argc, argv );
       CORBA::Object_var obj = orb->resolve_initial_references( "NameService" );
       CosNaming::NamingContext_var _root_context = CosNaming::NamingContext::_narrow( obj );
       if ( !CORBA::is_nil( _root_context ) ) {
@@ -288,12 +298,13 @@ void Session_ServerCheck::run()
 
     if ( i == myAttempts-1 ) {
       setError( tr( "Unable to contact the naming service.\n" ) );
-      return;
+      OK = false;
+      //return;
     }
   }
 
   // 2. Check registry server
-  for ( int i = 0; i < myAttempts ; i++ ) {
+  for ( int i = 0; (i < myAttempts) && OK ; i++ ) {
     Locker locker( this );
 
     setStep( current * myAttempts + i );
@@ -336,12 +347,13 @@ void Session_ServerCheck::run()
 
     if ( i == myAttempts-1 ) {
       setError( tr( "Registry server is not found.\n%1" ).arg ( error ) );
-      return;
+      OK = false;
+      //return;
     }
   }
 
   // 3. Check data server
-  for ( int i = 0; i < myAttempts ; i++ ) {
+  for ( int i = 0; (i < myAttempts) && OK ; i++ ) {
     Locker locker( this );
 
     setStep( current * myAttempts + i );
@@ -384,12 +396,13 @@ void Session_ServerCheck::run()
 
     if ( i == myAttempts-1 ) {
       setError( tr( "Study server is not found.\n%1" ).arg ( error ) );
-      return;
+      OK = false;
+      //return;
     }
   }
   
   // 4. Check module catalogue server
-  for ( int i = 0; i < myAttempts ; i++ ) {
+  for ( int i = 0; (i < myAttempts) && OK ; i++ ) {
     Locker locker( this );
 
     setStep( current * myAttempts + i );
@@ -432,12 +445,13 @@ void Session_ServerCheck::run()
 
     if ( i == myAttempts-1 ) {
       setError( tr( "Module catalogue server is not found.\n%1" ).arg ( error ) );
-      return;
+      OK = false;
+      //return;
     }
   }
 
   // 5. Check data server
-  for ( int i = 0; i < myAttempts ; i++ ) {
+  for ( int i = 0; (i < myAttempts) && OK ; i++ ) {
     Locker locker( this );
 
     setStep( current * myAttempts + i );
@@ -480,13 +494,14 @@ void Session_ServerCheck::run()
 
     if ( i == myAttempts-1 ) {
       setError( tr( "Session server is not found.\n%1" ).arg ( error ) );
-      return;
+      OK = false;
+      //return;
     }
   }
 
   // 6. Check C++ container
   if ( myCheckCppContainer ) {
-    for ( int i = 0; i < myAttempts ; i++ ) {
+    for ( int i = 0; (i < myAttempts) && OK ; i++ ) {
       Locker locker( this );
       
       setStep( current * myAttempts + i );
@@ -530,14 +545,15 @@ void Session_ServerCheck::run()
       
       if ( i == myAttempts-1 ) {
         setError( tr( "C++ container is not found.\n%1" ).arg ( error ) );
-        return;
+        OK = false;
+        //return;
       }
     }
   }
 
   // 7. Check Python container
   if ( myCheckPyContainer ) {
-    for ( int i = 0; i < myAttempts ; i++ ) {
+    for ( int i = 0; (i < myAttempts) && OK ; i++ ) {
       Locker locker( this );
       
       setStep( current * myAttempts + i );
@@ -581,14 +597,15 @@ void Session_ServerCheck::run()
 
       if ( i == myAttempts-1 ) {
         setError( tr( "Python container is not found.\n%1" ).arg ( error ) );
-        return;
+        OK = false;
+        //return;
       }
     }
   }
 
   // 8. Check supervision container
   if ( myCheckSVContainer ) {
-    for ( int i = 0; i < myAttempts ; i++ ) {
+    for ( int i = 0; (i < myAttempts) && OK ; i++ ) {
       Locker locker( this );
       
       setStep( current * myAttempts + i );
@@ -632,8 +649,11 @@ void Session_ServerCheck::run()
     
       if ( i == myAttempts-1 ) {
         setError( tr( "Supervision container is not found.\n%1" ).arg ( error ) );
-        return;
+        OK = false;
+        //return;
       }
     }
   }
+
+  delete [] argv;
 }
index 663700542731e2053418b52eec0f9fd4c4f7cd90..005b5eea8c611fb6ab28c3af83cac3da455ae1db 100755 (executable)
@@ -64,7 +64,7 @@ SALOME_Session_i::SALOME_Session_i(int argc,
 {
   _argc = argc ;
   _argv = argv ;
-  _isGUI = FALSE ;
+  _isGUI = false ;
   _runningStudies= 0 ;
   _orb = CORBA::ORB::_duplicate(orb) ;
   _poa = PortableServer::POA::_duplicate(poa) ;
index d49af67d208af0e7af656c122c27ff6a2f193297..989153b44d96182a05960a01b22948c853e6778d 100644 (file)
@@ -59,8 +59,7 @@
 #include <QSlider>
 #include <QMainWindow>
 #include <QPixmapCache>
-
-#include <limits.h>
+#include <QTileRules>
 
 #define SHADOW          1
 #define LINE_GR_MARGIN  10
index 904d80b955a2112255a6e3c2a088704dec4ee272..0e07e7b955a18840c73417068ef8abfa2628e83e 100644 (file)
@@ -17,7 +17,8 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-#include <QtGui>
+#include <QInputDialog>
+#include <QContextMenuEvent>
 
 #include "mainwindow.hxx"
 #include "TreeModel.hxx"
index 073aa827993dee9fef1d79b4ccf8f99873f57aa2..5bb540c91161a2d7c46f7e7371bf7940f2d5daa9 100644 (file)
@@ -20,8 +20,6 @@
 // Author: Guillaume Boulant (EDF/R&D)
 
 
-#include <QtGui>
-
 #include "TreeItem.hxx"
 #include "TreeModel.hxx"
 
index 73abaf948da6edbc24b09706794656ea29e527d8..3543de328b5297b75eb963e8c6331b7171187d20 100755 (executable)
@@ -50,7 +50,7 @@ VTKViewer_Filter::~VTKViewer_Filter()
  * call virtual method IsValid( const int theId ).
  * \param theActor - actor
  * \param theCellId - cell id.
- * \retval TRUE - if cell id is valid, else false.
+ * \retval \c true - if cell id is valid, else \c false.
  */
 bool VTKViewer_Filter::IsValid( VTKViewer_Actor* theActor, const int theCellId )
 {
index 93b1da18364ef859de1016f43797483c0483356b..61762c5f7b2abc49554c9a9fea663fdd060ce811 100644 (file)
@@ -674,7 +674,7 @@ void VTKViewer_InteractorStyle::startGlobalPan()
 }
 
 
-/*!\retval TRUE if needs redrawing*/
+/*!\retval \c true if needs redrawing*/
 bool VTKViewer_InteractorStyle::needsRedrawing()
 {
   return State == VTK_INTERACTOR_STYLE_CAMERA_ZOOM   ||
@@ -1482,7 +1482,7 @@ void  VTKViewer_InteractorStyle::RemoveFilter( const int theId )
 /*!Checks: is valid cell(node) with id \a theId in actor \a theActor.
  *\param theActor - VTKViewer_Actor pointer.
  *\param theId    - cell id.
- *\param theIsNode - boolean flag, if true - node, else - cell.
+ *\param theIsNode - boolean flag, if \c true - node, else - cell.
  */
 bool VTKViewer_InteractorStyle::IsValid( VTKViewer_Actor* theActor,
                                                const int     theId,
index 8abd0fa018d63e436fbd9ebae43f5c3c2db8da7e..6179c167963d8c7660e3e816e66084fc50b79825 100755 (executable)
@@ -322,7 +322,7 @@ int VTKViewer_RenderWindowInteractor::CreateTimer(int vtkNotUsed(timertype))
   ///
   /// Start a one-shot timer for 10ms.
   ///
-  mTimer->setSingleShot(TRUE) ;
+  mTimer->setSingleShot(true) ;
   mTimer->start(10) ;
   return 1 ;
 }
index 084d961afa8a86162851eeabd226f1e62ddfe4b4..db3a5034168a6e06c4104e57d9424f9e836ee095 100755 (executable)
@@ -191,98 +191,98 @@ void VTKViewer_ViewWindow::createActions()
   aAction = new QtxAction(tr("MNU_DUMP_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_DUMP" ) ),
                            tr( "MNU_DUMP_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_DUMP_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onDumpView()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onDumpView()));
   myActionsMap[ DumpId ] = aAction;
 
   //! \li FitAll
   aAction = new QtxAction(tr("MNU_FITALL"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITALL" ) ),
                            tr( "MNU_FITALL" ), 0, this);
   aAction->setStatusTip(tr("DSC_FITALL"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onFitAll()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onFitAll()));
   myActionsMap[ FitAllId ] = aAction;
 
   //! \li FitRect
   aAction = new QtxAction(tr("MNU_FITRECT"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITAREA" ) ),
                            tr( "MNU_FITRECT" ), 0, this);
   aAction->setStatusTip(tr("DSC_FITRECT"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(activateWindowFit()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(activateWindowFit()));
   myActionsMap[ FitRectId ] = aAction;
 
   //! \li FitSelection
   aAction = new QtxAction(tr("MNU_FITSELECTION"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITSELECTION" ) ),
                            tr( "MNU_FITSELECTION" ), 0, this);
   aAction->setStatusTip(tr("DSC_FITSELECTION"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onFitSelection()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onFitSelection()));
   myActionsMap[ FitSelectionId ] = aAction;
 
   //! \li Zoom
   aAction = new QtxAction(tr("MNU_ZOOM_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ZOOM" ) ),
                            tr( "MNU_ZOOM_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_ZOOM_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(activateZoom()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(activateZoom()));
   myActionsMap[ ZoomId ] = aAction;
 
   //! \li Panning
   aAction = new QtxAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_PAN" ) ),
                            tr( "MNU_PAN_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_PAN_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(activatePanning()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(activatePanning()));
   myActionsMap[ PanId ] = aAction;
 
   //! \li Global Panning
   aAction = new QtxAction(tr("MNU_GLOBALPAN_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_GLOBALPAN" ) ),
                            tr( "MNU_GLOBALPAN_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(activateGlobalPanning()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(activateGlobalPanning()));
   myActionsMap[ GlobalPanId ] = aAction;
 
   //! \li Rotation
   aAction = new QtxAction(tr("MNU_ROTATE_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ROTATE" ) ),
                            tr( "MNU_ROTATE_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_ROTATE_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(activateRotation()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(activateRotation()));
   myActionsMap[ RotationId ] = aAction;
 
   //! \li Projections
   aAction = new QtxAction(tr("MNU_FRONT_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FRONT" ) ),
                            tr( "MNU_FRONT_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_FRONT_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onFrontView()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onFrontView()));
   myActionsMap[ FrontId ] = aAction;
 
   //! \li Back view
   aAction = new QtxAction(tr("MNU_BACK_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BACK" ) ),
                            tr( "MNU_BACK_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_BACK_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onBackView()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onBackView()));
   myActionsMap[ BackId ] = aAction;
 
   //! \li Top view
   aAction = new QtxAction(tr("MNU_TOP_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TOP" ) ),
                            tr( "MNU_TOP_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_TOP_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onTopView()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onTopView()));
   myActionsMap[ TopId ] = aAction;
 
   //! \li Bottom view
   aAction = new QtxAction(tr("MNU_BOTTOM_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BOTTOM" ) ),
                            tr( "MNU_BOTTOM_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_BOTTOM_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onBottomView()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onBottomView()));
   myActionsMap[ BottomId ] = aAction;
 
   //! \li Left view
   aAction = new QtxAction(tr("MNU_LEFT_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_LEFT" ) ),
                            tr( "MNU_LEFT_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_LEFT_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onLeftView()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onLeftView()));
   myActionsMap[ LeftId ] = aAction;
 
   //! \li Right view
   aAction = new QtxAction(tr("MNU_RIGHT_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RIGHT" ) ),
                            tr( "MNU_RIGHT_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_RIGHT_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onRightView()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onRightView()));
   myActionsMap[ RightId ] = aAction;
 
   // \li Rotate anticlockwise
@@ -303,14 +303,14 @@ void VTKViewer_ViewWindow::createActions()
   aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RESET" ) ),
                            tr( "MNU_RESET_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_RESET_VIEW"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onResetView()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onResetView()));
   myActionsMap[ ResetId ] = aAction;
 
   //! \li Trihedron shown
   aAction = new QtxAction(tr("MNU_SHOW_TRIHEDRON"), aResMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TRIHEDRON" ) ),
                            tr( "MNU_SHOW_TRIHEDRON" ), 0, this);
   aAction->setStatusTip(tr("DSC_SHOW_TRIHEDRON"));
-  connect(aAction, SIGNAL(activated()), this, SLOT(onTrihedronShow()));
+  connect(aAction, SIGNAL(triggered()), this, SLOT(onTrihedronShow()));
   myActionsMap[ TrihedronShowId ] = aAction;
 }
 
index 0aafe72d7fca3c3901f6b6db7ad7604ecfdecd02..b36e4366bdcbba67d29de0d0479f01ef28dca806 100644 (file)
@@ -37,7 +37,7 @@ public:
   ViewerTools_DialogBase(QtxAction* theAction,
                          QWidget* theParent,
                          const char* theName = "", 
-                         bool theModal = FALSE
+                         bool theModal = false
                          Qt::WindowFlags theWFalgs = 0);
 
   ~ViewerTools_DialogBase();
index 3c80f81a45418aae456d7fa2cd69f04d70cf7049..5866cd99ad65941993f4c088a724992447593e30 100755 (executable)
@@ -17,6 +17,8 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
+INCLUDE(UseQt4Ext)
+
 INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_BINARY_DIR}
   ${CMAKE_CURRENT_SOURCE_DIR}
index d0e935b06c4e3ee19d8d7c0f23ca9cc4dc98b840..67b9e7cb09845d1b91199ad199680248eeb93075 100644 (file)
@@ -18,8 +18,9 @@
 //
 
 #include "GenericDialog.h"
+#include <QDebug>
 
-GenericDialog::GenericDialog(QDialog *parent) : QDialog(parent)
+GenericDialog::GenericDialog(QDialogparent) : QDialog(parent)
 {
   ui.setupUi(this); // A faire en premier
   
@@ -32,16 +33,14 @@ GenericDialog::GenericDialog(QDialog *parent) : QDialog(parent)
   // buttonbox (inherited features) 
 }
 
-QFrame * GenericDialog::getPanel() {
+QFrame* GenericDialog::getPanel() {
   return ui.centralPanel;
 }
 
-QDialogButtonBox * GenericDialog::getButtonBox() {
+QDialogButtonBox* GenericDialog::getButtonBox() {
   return ui.buttonBox;
 }
 
-
-#include <QDebug>
 void GenericDialog::accept() {
   qDebug() << "accept() is not implemented yet";
   QDialog::accept();
index ab4f6224204015a8b4f661e871a1d3c34e178e1a..3e99e142cfb375c682b9698a7ba5f6ea64be77e8 100644 (file)
 #ifndef _GenericDialog_HXX
 #define _GenericDialog_HXX
 
-#include <QtGui>
+#include <QDialog>
+
 #include "ui_GenericDialog.h"
 
+class QFrame;
+class QDialogButtonBox;
+
 class GenericDialog : public QDialog
 {
   Q_OBJECT
-    
+
 public:
-  GenericDialog(QDialog *parent = 0);
+  GenericDialog(QDialogparent = 0);
 
- protected:
-  QFrame * getPanel();
+protected:
+  QFrame* getPanel();
   QDialogButtonBox * getButtonBox();
-  
- protected slots:    
-    void accept();
-  //void reject();
-  
- private:
+
+protected slots:    
+  void accept();
+
+private:
   Ui_GenericDialog ui; // instance of the class defined in ui_GenericDialog.h
 };
 
index 14dc63ac0a70c6fc6f626a7d203165aa1bdadbe2..9093dbb260a2651f23366494e769f9ee9e9dd207 100644 (file)
@@ -1,6 +1,6 @@
 #include "__CLASSNAME__.h"
 
-__CLASSNAME__::__CLASSNAME__(QDialog *parent) : GenericDialog(parent)
+__CLASSNAME__::__CLASSNAME__(QDialogparent) : GenericDialog(parent)
 {
   ui.setupUi(this->getPanel());
 }
index 03132d9ec8ee2d2679dbd32d15ebf679c74a172f..a37ddb4bc1b77749ab124b6599eb158ebca3ab67 100644 (file)
@@ -1,18 +1,17 @@
 #ifndef ___CLASSNAME___HXX
 #define ___CLASSNAME___HXX
 
-#include <QtGui>
 #include "ui___CLASSNAME__.h"
 #include "GenericDialog.h"
 
 class __CLASSNAME__ : public GenericDialog
 {
   Q_OBJECT
-    
- public:
-  __CLASSNAME__(QDialog *parent = 0);
-  
- private:
+
+public:
+  __CLASSNAME__(QDialogparent = 0);
+
+private:
   Ui___CLASSNAME__ ui; // instance of the class defined in ui___CLASSNAME__.hxx
 };
 
index 97f1fadd44831838f138f8d1118a839f4014064e..df9145685bccf92df5457df24400f02091093a98 100644 (file)
@@ -1,6 +1,7 @@
 #include "__CLASSNAME__.h"
+#include <QDebug>
 
-__CLASSNAME__::__CLASSNAME__(QDialog *parent) : QDialog(parent)
+__CLASSNAME__::__CLASSNAME__(QDialogparent) : QDialog(parent)
 {
   ui.setupUi(this); // A faire en premier
   
@@ -13,7 +14,6 @@ __CLASSNAME__::__CLASSNAME__(QDialog *parent) : QDialog(parent)
   // buttonbox (inherited features) 
 }
 
-#include <QDebug>
 void __CLASSNAME__::accept() {
   qDebug() << "accept() is not implemented yet";
   QDialog::accept();
index b2cfd4f7fef93f2ab4f0095c633a070d1aabce53..37ca4437523a083170f38e6b1827a05c68d46bb3 100644 (file)
@@ -1,21 +1,21 @@
 #ifndef ___CLASSNAME___HXX
 #define ___CLASSNAME___HXX
 
-#include <QtGui>
+#include <QDialog>
+
 #include "ui___CLASSNAME__.h"
 
 class __CLASSNAME__ : public QDialog
 {
   Q_OBJECT
-    
- public:
-  __CLASSNAME__(QDialog *parent = 0);
-
- protected slots:    
-    void accept();
-  //void reject();
-  
- private:
+
+public:
+  __CLASSNAME__(QDialog* parent = 0);
+
+protected slots:    
+  void accept();
+
+private:
   Ui___CLASSNAME__ ui; // instance of the class defined in ui___CLASSNAME__.hxx
 };
 
index fbc5baa5b499f79e33d15dd82042cae2305a38cc..6c650a58b8eccce17df1fac39570b31d424c78b3 100644 (file)
 // (gboulant - 12/10/2010)
 //
 #include <QApplication>
-#include <QtGui>
 #include "GDialogTest.h"
 
 void TEST_show() {
-  GDialogTest * dialog = new GDialogTest();
+  GDialogTest* dialog = new GDialogTest();
   dialog->show();
 }
 
-int main(int argc, char *argv[])
+int main(int argc, charargv[])
 {
   QApplication app(argc, argv);
   TEST_show();
index 67a875f1af716241a4629a433a406bf09dd20125..fd4df0a0f5e4d8f001b346f5c210526894e6e55c 100644 (file)
 // (gboulant - 12/10/2010)
 //
 #include <QApplication>
-#include <QtGui>
 #include "QDialogTest.h"
 
 void TEST_show() {
-  QDialogTest * dialog = new QDialogTest();
+  QDialogTest* dialog = new QDialogTest();
   dialog->show();
 }
 
-int main(int argc, char *argv[])
+int main(int argc, charargv[])
 {
   QApplication app(argc, argv);
   TEST_show();