--- /dev/null
+TEMPLATE = lib
+TARGET = LightApp
+DESTDIR = ../../lib
+MOC_DIR = ../../moc
+OBJECTS_DIR = ../../obj/$$TARGET
+
+PYTHON_INCLUDES = $$(PYTHONHOME)/include/python2.4
+
+QT_INCLUDES = $$(QTDIR)/include $$(QTDIR)/include/QtCore $$(QTDIR)/include/QtGui $$(QTDIR)/include/QtOpenGL $$(QTDIR)/include/QtXml
+
+CASROOT = $$(CASROOT)
+CAS_CPPFLAGS = $${CASROOT}/inc
+
+HDF5_INCLUDES = $$(HDF5HOME)/include
+
+KERNEL_CXXFLAGS = $$(KERNEL_ROOT_DIR)/include/salome
+
+VTK_INCLUDES = $$(VTKHOME)/include/vtk
+
+QWT_INCLUDES = $$(QWTHOME)/include
+
+PYTHON_INCLUDES = $$(PYTHONHOME)/include/python2.4
+
+INCLUDEPATH += $${PYTHON_INCLUDES} $${QT_INCLUDES} $${CAS_CPPFLAGS} $${HDF5_INCLUDES} $${KERNEL_CXXFLAGS} ../SUIT ../STD ../CAM ../LogWindow ../Prs ../Qtx ../Event #../ObjBrowser
+
+#if ENABLE_VTKVIEWER
+ INCLUDEPATH += $${VTK_INCLUDES} ../VTKViewer
+#else
+# DEFINES += DISABLE_VTKVIEWER
+#endif
+
+#if ENABLE_PLOT2DVIEWER
+ INCLUDEPATH += $${QWT_INCLUDES} ../Plot2d
+#else
+# DEFINES += DISABLE_PLOT2DVIEWER
+#endif
+
+#if ENABLE_OCCVIEWER
+ INCLUDEPATH += ../OCCViewer
+#else !ENABLE_OCCVIEWER
+# DEFINES += DISABLE_OCCVIEWER
+#endif
+
+#if ENABLE_PYCONSOLE
+ INCLUDEPATH += $${PYTHON_INCLUDES} ../PyConsole ../PyInterp
+#else !ENABLE_PYCONSOLE
+# DEFINES += DISABLE_PYCONSOLE
+#endif
+
+#if ENABLE_GLVIEWER
+ INCLUDEPATH += ../GLViewer
+#else !ENABLE_GLVIEWER
+# DEFINES += DISABLE_GLVIEWER
+#endif
+
+#if ENABLE_SUPERVGRAPHVIEWER
+# INCLUDEPATH += ../SUPERVGraph
+#else !ENABLE_SUPERVGRAPHVIEWER
+# DEFINES += DISABLE_SUPERVGRAPHVIEWER
+#endif
+
+#if ENABLE_SALOMEOBJECT
+
+ INCLUDEPATH += ../OBJECT
+#if ENABLE_PLOT2DVIEWER
+ INCLUDEPATH += ../SPlot2d
+#endif
+
+#if ENABLE_OCCVIEWER
+ INCLUDEPATH += ../SOCC
+#endif
+
+#if ENABLE_VTKVIEWER
+ INCLUDEPATH += ../SVTK
+#endif
+
+#else !ENABLE_SALOMEOBJECT
+# DEFINES += DISABLE_SALOMEOBJECT
+
+#endif
+
+QT_MT_LIBS = -L$$(QTDIR)/lib -lQtCore -lQtXml -lQtGui -lQtOpenGL
+
+CAS_KERNEL = -L$${CASROOT}/Linux/lib -lTKernel
+
+HDF5_LIBS = -L$$(HDF5HOME)/lib -lhdf5
+
+KERNEL_LDFLAGS = -L$$(KERNEL_ROOT_DIR)/lib/salome
+
+PYTHON_LIBS = -L$$(PYTHONHOME)/lib/python2.4/config -lpython2.4 -ldl -lutil
+
+LIBS += $${QT_MT_LIBS} -L../../lib -lsuit -lstd -lCAM -lLogWindow $${CAS_KERNEL} -lSalomePrs $${HDF5_LIBS} $${KERNEL_LDFLAGS} -lSalomeHDFPersist #-lObjBrowser
+
+#if ENABLE_PYCONSOLE
+ LIBS += $${PYTHON_LIBS}
+#endif
+
+#if ENABLE_SALOMEOBJECT
+ LIBS += -lSalomeObject
+#endif
+
+#if ENABLE_VTKVIEWER
+ LIBS += -lVTKViewer
+#if ENABLE_SALOMEOBJECT
+ LIBS += -lSVTK
+#endif
+#endif
+
+#if ENABLE_OCCVIEWER
+ LIBS += -lOCCViewer
+#if ENABLE_SALOMEOBJECT
+ LIBS += -lSOCC
+#endif
+#endif
+
+#if ENABLE_GLVIEWER
+ LIBS += -lGLViewer
+#endif
+
+#if ENABLE_PLOT2DVIEWER
+ LIBS += -lPlot2d
+#if ENABLE_SALOMEOBJECT
+ LIBS += -lSPlot2d
+#endif
+#endif
+
+#if ENABLE_PYCONSOLE
+ LIBS += -lPyInterp -lPyConsole
+#endif
+
+#if ENABLE_SUPERVGRAPHVIEWER
+# LIBS += -lSUPERVGraph
+#endif
+
+CONFIG -= debug release debug_and_release
+CONFIG += qt thread debug dll shared
+
+win32:DEFINES += WIN32
+DEFINES += LIGHTAPP_EXPORTS OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS
+
+HEADERS = LightApp.h
+HEADERS += LightApp_AboutDlg.h
+HEADERS += LightApp_Application.h
+HEADERS += LightApp_DataModel.h
+HEADERS += LightApp_DataObject.h
+HEADERS += LightApp_DataOwner.h
+HEADERS += LightApp_DataSubOwner.h
+HEADERS += LightApp_Dialog.h
+HEADERS += LightApp_Displayer.h
+HEADERS += LightApp_Driver.h
+HEADERS += LightApp_EventFilter.h
+HEADERS += LightApp_HDFDriver.h
+HEADERS += LightApp_Module.h
+HEADERS += LightApp_ModuleAction.h
+HEADERS += LightApp_ModuleDlg.h
+HEADERS += LightApp_NameDlg.h
+#HEADERS += LightApp_OBFilter.h
+HEADERS += LightApp_OBSelector.h
+HEADERS += LightApp_Operation.h
+HEADERS += LightApp_Selection.h
+HEADERS += LightApp_SelectionMgr.h
+HEADERS += LightApp_ShowHideOp.h
+HEADERS += LightApp_Study.h
+HEADERS += LightApp_SwitchOp.h
+HEADERS += LightApp_Preferences.h
+HEADERS += LightApp_PreferencesDlg.h
+HEADERS += LightApp_RootObject.h
+HEADERS += LightApp_UpdateFlags.h
+HEADERS += LightApp_WidgetContainer.h
+
+#if ENABLE_VTKVIEWER
+#if ENABLE_SALOMEOBJECT
+ HEADERS += LightApp_VTKSelector.h
+#endif
+#endif
+#if ENABLE_OCCVIEWER
+ HEADERS += LightApp_OCCSelector.h
+#endif
+#if ENABLE_GLVIEWER
+ HEADERS += LightApp_GLSelector.h
+#endif
+
+SOURCES = LightApp_AboutDlg.cxx
+SOURCES += LightApp_Application.cxx
+SOURCES += LightApp_DataModel.cxx
+SOURCES += LightApp_DataObject.cxx
+SOURCES += LightApp_DataOwner.cxx
+SOURCES += LightApp_DataSubOwner.cxx
+SOURCES += LightApp_Dialog.cxx
+SOURCES += LightApp_Displayer.cxx
+SOURCES += LightApp_Driver.cxx
+SOURCES += LightApp_EventFilter.cxx
+SOURCES += LightApp_HDFDriver.cxx
+SOURCES += LightApp_Module.cxx
+SOURCES += LightApp_ModuleAction.cxx
+SOURCES += LightApp_ModuleDlg.cxx
+SOURCES += LightApp_NameDlg.cxx
+#SOURCES += LightApp_OBFilter.cxx
+SOURCES += LightApp_OBSelector.cxx
+SOURCES += LightApp_Operation.cxx
+SOURCES += LightApp_Selection.cxx
+SOURCES += LightApp_SelectionMgr.cxx
+SOURCES += LightApp_ShowHideOp.cxx
+SOURCES += LightApp_Study.cxx
+SOURCES += LightApp_SwitchOp.cxx
+SOURCES += LightApp_Preferences.cxx
+SOURCES += LightApp_PreferencesDlg.cxx
+SOURCES += LightApp_WidgetContainer.cxx
+
+#if ENABLE_VTKVIEWER
+#if ENABLE_SALOMEOBJECT
+ SOURCES += LightApp_VTKSelector.cxx
+#endif
+#endif
+#if ENABLE_OCCVIEWER
+ SOURCES += LightApp_OCCSelector.cxx
+#endif
+#if ENABLE_GLVIEWER
+ SOURCES += LightApp_GLSelector.cxx
+#endif
+
+TRANSLATIONS = resources/LightApp_images.ts \
+ resources/LightApp_msg_en.ts
+
+ICONS = resources/*.png
+
+includes.files = $$HEADERS
+includes.path = ../../include
+
+resources.files = $$ICONS resources/*.qm
+resources.path = ../../resources
+
+INSTALLS += includes resources
#include "LightApp_PreferencesDlg.h"
#include "LightApp_ModuleDlg.h"
#include "LightApp_AboutDlg.h"
+#include "LightApp_ModuleAction.h"
-#include "LightApp_OBFilter.h"
+// temporary commented
+//#include "LightApp_OBFilter.h"
#include "LightApp_EventFilter.h"
if( modList.count()>1 )
{
- QToolBar* modTBar = new QtxToolBar( true, desk );
- modTBar->setObjectName( "ModuleToolBar" );
- modTBar->setWindowTitle( tr( "INF_TOOLBAR_MODULES" ) );
-
- QActionGroup* modGroup = new QActionGroup( this );
- modGroup->setExclusive( true );
- //modGroup->setUsesDropDown( true ); // to use a new class for this purpose
-
- a = createAction( -1, tr( "APP_NAME" ), defIcon, tr( "APP_NAME" ),
- tr( "PRP_APP_MODULE" ), 0, desk, true );
- modGroup->addAction( a );
- myActions.insert( QString(), a );
+ myModuleAction = new LightApp_ModuleAction( tr( "APP_NAME" ), defIcon, desk );
QMap<QString, QString> iconMap;
moduleIconNames( iconMap );
const int iconSize = 20;
- modTBar->addActions(modGroup->actions());
- QList<QComboBox*> l = modTBar->findChildren<QComboBox*>();
- QListIterator<QComboBox*> oit( l );
- while ( oit.hasNext() ) {
- QComboBox* cb = oit.next();
- if ( cb ) cb->setFocusPolicy( Qt::NoFocus );
- }
-
- modTBar->addSeparator();
-
for ( it = modList.begin(); it != modList.end(); ++it )
{
if ( !isLibExists( *it ) )
}
icon.fromImage( icon.toImage().scaled( iconSize, iconSize, Qt::KeepAspectRatio, Qt::SmoothTransformation ) );
-
- QAction* a = createAction( -1, *it, icon, *it, tr( "PRP_MODULE" ).arg( *it ), 0, desk, true );
- modTBar->addAction( a );
- modGroup->addAction( a );
-
- myActions.insert( *it, a );
+
+ myModuleAction->insertModule( *it, icon );
}
- SUIT_Tools::simplifySeparators( modTBar );
- connect( modGroup, SIGNAL( selected( QAction* ) ), this, SLOT( onModuleActivation( QAction* ) ) );
+ connect( myModuleAction, SIGNAL( moduleActivated( const QString& ) ), this, SLOT( onModuleActivation( const QString& ) ) );
}
// New window
}
/*!On module activation action.*/
-void LightApp_Application::onModuleActivation( QAction* a )
+void LightApp_Application::onModuleActivation( const QString& modName )
{
- if ( !a )
- return;
-
- QString modName = a->text();
- if ( modName == tr( "APP_NAME" ) )
- modName = QString::null;
-
// Force user to create/open a study before module activation
QMap<QString, QString> iconMap;
moduleIconNames( iconMap );
case 0:
default:
putInfo( tr("INF_CANCELLED") );
- myActions[QString()]->setChecked( true );
+ myModuleAction->setActiveModule( QString() );
cancelled = true;
}
}
bool res = false;
if ( myWindows.contains( type ) )
{
- SUIT_Desktop* desk = ((LightApp_Application*)this)->desktop();
+ //SUIT_Desktop* desk = ((LightApp_Application*)this)->desktop();
//res = desk && desk->appropriate( myWindows[type] );
+ res = myWindows[type]->isVisible();
}
return res;
}
if ( activeModule() )
modName = activeModule()->moduleName();
- if ( myActions.contains( modName ) )
- myActions[modName]->setChecked( true );
+ myModuleAction->setActiveModule( modName );
}
/*!