Salome HOME
Merge branch 'V7_dev'
[modules/gui.git] / src / LightApp / LightApp_Application.cxx
index 4bf97d8ca2e815371ad2ad487afc1f9bd555de95..b9ec2df18862eca635d6850ef4aa2598fcb71148 100644 (file)
 
 #include <SALOME_Event.h>
 
+#ifdef USE_SALOME_STYLE
 #include <Style_Salome.h>
 #include <Style_PrefDlg.h>
+#endif // USE_SALOME_STYLE
 
 #include <CAM_Module.h>
 #include <CAM_DataModel.h>
@@ -780,8 +782,10 @@ void LightApp_Application::createActions()
   createMenu( MRUId, fileMenu, 100, -1 );
   createMenu( separator(), fileMenu, -1, 100, -1 );
 
+#ifdef USE_SALOME_STYLE
   createAction( StyleId, tr( "TOT_THEME" ), QIcon(), tr( "MEN_DESK_THEME" ), tr( "PRP_THEME" ),
                 0, desk, false, this, SLOT( onStylePreferences() ) );
+#endif // USE_SALOME_STYLE
 
   createAction( FullScreenId, tr( "TOT_FULLSCREEN" ), QIcon(), tr( "MEN_DESK_FULLSCREEN" ), tr( "PRP_FULLSCREEN" ),
                 Qt::Key_F11, desk, false, this, SLOT( onFullScreen() ) );
@@ -789,7 +793,9 @@ void LightApp_Application::createActions()
 
   int viewMenu = createMenu( tr( "MEN_DESK_VIEW" ), -1 );
   createMenu( separator(), viewMenu, -1, 20, -1 );
+#ifdef USE_SALOME_STYLE
   createMenu( StyleId, viewMenu, 20, -1 );
+#endif // USE_SALOME_STYLE
   createMenu( FullScreenId, viewMenu, 20, -1 );
 
   int modTBar = createTool( tr( "INF_TOOLBAR_MODULES" ),    // title (language-dependant)
@@ -2016,8 +2022,11 @@ QWidget* LightApp_Application::createWindow( const int flag )
 
     // Create OBSelector
     new LightApp_OBSelector( ob, mySelMgr );
-
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     ob->treeView()->header()->setResizeMode(SUIT_DataObject::VisibilityId, QHeaderView::Fixed);
+#else
+    ob->treeView()->header()->setSectionResizeMode(SUIT_DataObject::VisibilityId, QHeaderView::Fixed);
+#endif
     ob->treeView()->header()->moveSection(SUIT_DataObject::NameId,SUIT_DataObject::VisibilityId);
     ob->treeView()->setColumnWidth(SUIT_DataObject::VisibilityId, VISIBILITY_COLUMN_WIDTH);
     ob->setProperty( "shortcut", QKeySequence( "Alt+Shift+O" ) );
@@ -4310,10 +4319,12 @@ void LightApp_Application::onMRUActivated( const QString& name )
 
 void LightApp_Application::onStylePreferences()
 {
+#ifdef USE_SALOME_STYLE
   Style_PrefDlg dlg( desktop() );
   dlg.exec();
 
   resourceMgr()->setValue( "Style", "use_salome_style", Style_Salome::isActive() );
+#endif // USE_SALOME_STYLE
 }
 
 void LightApp_Application::onFullScreen(){