mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0029571: Samples: build qt samples together with OCCT
Extending CMake procedure by 'BUILD_MODULE_QtSamples' variable to switch on qt samples build. Implementation required: - union of occt_toolkit_tool.cmake and occt_toolkit.cmake files; - correction of qt samples sources by adding path to Qt 'plugins' folder. It helps to avoid definition of additional variable (QT_QPA_PLATFORM_PLUGIN_PATH) when staring sample.bat for qt samples; - executable processing is extended in cmake procedure by providing 'EXECUTABLE_PROJECT' variable. Now we need not specify custom processing for DRAWEXE in occt_toolkit.cmake
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
|
||||
#include <Graphic3d_GraphicDriver.hxx>
|
||||
#include <OpenGl_GraphicDriver.hxx>
|
||||
#include <OSD_Environment.hxx>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -583,8 +584,10 @@ void ApplicationCommonWindow::onSetMaterial( int theMaterial )
|
||||
QString ApplicationCommonWindow::getResourceDir()
|
||||
{
|
||||
static QString aResourceDir =
|
||||
QString::fromUtf8 (qgetenv ("CSF_ResourcesDefaults").constData());
|
||||
|
||||
QString (OSD_Environment ("CSF_ResourcesDefaults").Value().ToCString());
|
||||
if (aResourceDir.isEmpty())
|
||||
aResourceDir = QString (OSD_Environment ("CSF_OCCTResourcePath").Value().ToCString()) + "/samples";
|
||||
|
||||
return aResourceDir;
|
||||
}
|
||||
|
||||
|
@@ -13,6 +13,9 @@
|
||||
#include <AIS_InteractiveObject.hxx>
|
||||
#include <Graphic3d_NameOfMaterial.hxx>
|
||||
#include <OpenGl_GraphicDriver.hxx>
|
||||
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
|
||||
#include <OSD_Environment.hxx>
|
||||
#endif
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
// =======================================================================
|
||||
@@ -32,7 +35,7 @@ Handle(V3d_Viewer) DocumentCommon::Viewer (const Standard_ExtString ,
|
||||
{
|
||||
Handle(Aspect_DisplayConnection) aDisplayConnection;
|
||||
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
|
||||
aDisplayConnection = new Aspect_DisplayConnection (qgetenv ("DISPLAY").constData());
|
||||
aDisplayConnection = new Aspect_DisplayConnection (OSD_Environment ("DISPLAY").Value());
|
||||
#endif
|
||||
aGraphicDriver = new OpenGl_GraphicDriver (aDisplayConnection);
|
||||
}
|
||||
|
17
samples/qt/Common/src/FILES
Normal file
17
samples/qt/Common/src/FILES
Normal file
@@ -0,0 +1,17 @@
|
||||
ApplicationCommon.cxx
|
||||
ApplicationCommon.h
|
||||
Common-icon.ts
|
||||
Common-string.ts
|
||||
CommonSample.h
|
||||
DocumentCommon.cxx
|
||||
DocumentCommon.h
|
||||
Material.cxx
|
||||
Material.h
|
||||
MDIWindow.cxx
|
||||
MDIWindow.h
|
||||
OcctWindow.cxx
|
||||
OcctWindow.h
|
||||
Transparency.cxx
|
||||
Transparency.h
|
||||
View.cxx
|
||||
View.h
|
@@ -105,7 +105,6 @@ void MDIWindow::onWindowActivated ()
|
||||
|
||||
void MDIWindow::dump()
|
||||
{
|
||||
QString datadir = (QString(qgetenv ("CSF_OCCTDataPath").constData()) + "/images");
|
||||
QString filter = "Images Files (*.bmp *.ppm *.png *.jpg *.tiff *.tga *.gif *.exr)";
|
||||
QFileDialog fd ( 0 );
|
||||
fd.setModal( true );
|
||||
|
Reference in New Issue
Block a user