mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0024479: Ray Tracing mode does not work in Qt IE sample
Implementation of Ray Tracing mode in standard Qt sample Fix compile warnings in Qt samples. Fix tabs in Common-string.ts. Update Code style. 0024415: Update QT samples Code which was based on QT3 was removed. Some bugs and warnings has been also fixed. Porting from QT4 to QT5 sample files.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial", "Tutorial.vcxproj", "{59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tutorial", "Tutorial.vcxproj", "{E417B143-8CB4-3EF0-8247-DA6F67FA3FCE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -8,10 +8,10 @@ Global
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{59DEDC8A-A5ED-31E8-8F2B-8D996E3A41D6}.Release|Win32.Build.0 = Release|Win32
|
||||
{E417B143-8CB4-3EF0-8247-DA6F67FA3FCE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E417B143-8CB4-3EF0-8247-DA6F67FA3FCE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E417B143-8CB4-3EF0-8247-DA6F67FA3FCE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E417B143-8CB4-3EF0-8247-DA6F67FA3FCE}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@@ -3,7 +3,7 @@ CONFIG += debug_and_release qt
|
||||
|
||||
TARGET = Tutorial
|
||||
|
||||
SAMPLESROOT = $$(CASROOT)/samples/qt
|
||||
SAMPLESROOT = $$(SAMPLESROOT)
|
||||
|
||||
HEADERS = src/*.h \
|
||||
$${SAMPLESROOT}/Common/src/*.h \
|
||||
@@ -26,7 +26,9 @@ RES_DIR = $$quote($$(RES_DIR))
|
||||
INCLUDEPATH += $$quote($${SAMPLESROOT}/Common/src)
|
||||
INCLUDEPATH += $$quote($${SAMPLESROOT}/Interface/src)
|
||||
|
||||
DEFINES = CSFDB
|
||||
OCCT_DEFINES = $$(CSF_DEFINES)
|
||||
|
||||
DEFINES = CSFDB $$split(OCCT_DEFINES, ;)
|
||||
|
||||
unix {
|
||||
UNAME = $$system(uname -s)
|
||||
@@ -40,11 +42,11 @@ unix {
|
||||
CONFIG(debug, debug|release) {
|
||||
DESTDIR = ./$$UNAME/bind
|
||||
OBJECTS_DIR = ./$$UNAME/objd
|
||||
MOC_DIR = ./$$UNAME/srcd
|
||||
MOC_DIR = ./$$UNAME/mocd
|
||||
} else {
|
||||
DESTDIR = ./$$UNAME/bin
|
||||
OBJECTS_DIR = ./$$UNAME/obj
|
||||
MOC_DIR = ./$$UNAME/src
|
||||
MOC_DIR = ./$$UNAME/moc
|
||||
}
|
||||
|
||||
MACOSX_USE_GLX = $$(MACOSX_USE_GLX)
|
||||
@@ -65,107 +67,23 @@ win32 {
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
DEFINES += _DEBUG
|
||||
DESTDIR = ./win$(ARCH)/$(VCVER)/bind
|
||||
OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/objd
|
||||
MOC_DIR = ./win$(ARCH)/$(VCVER)/mocd
|
||||
!contains(QMAKE_HOST.arch, x86_64) {
|
||||
LIBS = -L$(CSF_OPT_LIB32D)
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1310) {
|
||||
DESTDIR = ./win32/vc7/bind
|
||||
OBJECTS_DIR = ./win32/vc7/objd
|
||||
MOC_DIR = ./win32/vc7/srcd
|
||||
}
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1400) {
|
||||
DESTDIR = ./win32/vc8/bind
|
||||
OBJECTS_DIR = ./win32/vc8/objd
|
||||
MOC_DIR = ./win32/vc8/srcd
|
||||
}
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1500) {
|
||||
DESTDIR = ./win32/vc9/bind
|
||||
OBJECTS_DIR = ./win32/vc9/objd
|
||||
MOC_DIR = ./win32/vc9/srcd
|
||||
}
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1600) {
|
||||
DESTDIR = ./win32/vc10/bind
|
||||
OBJECTS_DIR = ./win32/vc10/objd
|
||||
MOC_DIR = ./win32/vc10/srcd
|
||||
}
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1700) {
|
||||
DESTDIR = ./win32/vc11/bind
|
||||
OBJECTS_DIR = ./win32/vc11/objd
|
||||
MOC_DIR = ./win32/vc11/srcd
|
||||
}
|
||||
LIBS = -L$(CSF_OPT_LIB32D)
|
||||
} else {
|
||||
LIBS = -L$(CSF_OPT_LIB64D)
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1400) {
|
||||
DESTDIR = ./win64/vc8/bind
|
||||
OBJECTS_DIR = ./win64/vc8/objd
|
||||
MOC_DIR = ./win64/vc8/srcd
|
||||
}
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1500) {
|
||||
DESTDIR = ./win64/vc9/bind
|
||||
OBJECTS_DIR = ./win64/vc9/objd
|
||||
MOC_DIR = ./win64/vc9/srcd
|
||||
}
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1600) {
|
||||
DESTDIR = ./win64/vc10/bind
|
||||
OBJECTS_DIR = ./win64/vc10/objd
|
||||
MOC_DIR = ./win64/vc10/srcd
|
||||
}
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1700) {
|
||||
DESTDIR = ./win64/vc11/bind
|
||||
OBJECTS_DIR = ./win64/vc11/objd
|
||||
MOC_DIR = ./win64/vc11/srcd
|
||||
}
|
||||
LIBS = -L$(CSF_OPT_LIB64D)
|
||||
}
|
||||
} else {
|
||||
DEFINES += NDEBUG
|
||||
DESTDIR = ./win$(ARCH)/$(VCVER)/bin
|
||||
OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/obj
|
||||
MOC_DIR = ./win$(ARCH)/$(VCVER)/moc
|
||||
!contains(QMAKE_HOST.arch, x86_64) {
|
||||
LIBS = -L$(CSF_OPT_LIB32)
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1310) {
|
||||
DESTDIR = ./win32/vc7/bin
|
||||
OBJECTS_DIR = ./win32/vc7/obj
|
||||
MOC_DIR = ./win32/vc7/src
|
||||
}
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1400) {
|
||||
DESTDIR = ./win32/vc8/bin
|
||||
OBJECTS_DIR = ./win32/vc8/obj
|
||||
MOC_DIR = ./win32/vc8/src
|
||||
}
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1500) {
|
||||
DESTDIR = ./win32/vc9/bin
|
||||
OBJECTS_DIR = ./win32/vc9/obj
|
||||
MOC_DIR = ./win32/vc9/src
|
||||
}
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1600) {
|
||||
DESTDIR = ./win32/vc10/bin
|
||||
OBJECTS_DIR = ./win32/vc10/obj
|
||||
MOC_DIR = ./win32/vc10/src
|
||||
}
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1700) {
|
||||
DESTDIR = ./win32/vc11/bin
|
||||
OBJECTS_DIR = ./win32/vc11/obj
|
||||
MOC_DIR = ./win32/vc11/src
|
||||
}
|
||||
LIBS = -L$(CSF_OPT_LIB32)
|
||||
} else {
|
||||
LIBS = -L$(CSF_OPT_LIB64)
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1400) {
|
||||
DESTDIR = ./win64/vc8/bin
|
||||
OBJECTS_DIR = ./win64/vc8/obj
|
||||
MOC_DIR = ./win64/vc8/src
|
||||
}
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1500) {
|
||||
DESTDIR = ./win64/vc9/bin
|
||||
OBJECTS_DIR = ./win64/vc9/obj
|
||||
MOC_DIR = ./win64/vc9/src
|
||||
}
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1600) {
|
||||
DESTDIR = ./win64/vc10/bin
|
||||
OBJECTS_DIR = ./win64/vc10/obj
|
||||
MOC_DIR = ./win64/vc10/src
|
||||
}
|
||||
contains(QMAKE_COMPILER_DEFINES, _MSC_VER=1700) {
|
||||
DESTDIR = ./win64/vc11/bin
|
||||
OBJECTS_DIR = ./win64/vc11/obj
|
||||
MOC_DIR = ./win64/vc11/src
|
||||
}
|
||||
LIBS = -L$(CSF_OPT_LIB64)
|
||||
}
|
||||
}
|
||||
DEFINES +=WNT WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS
|
||||
@@ -201,4 +119,8 @@ copy_res.CONFIG += no_link target_predeps
|
||||
win32: copy_res.commands = type ${QMAKE_FILE_IN} > $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
|
||||
unix: copy_res.commands = cp -f ${QMAKE_FILE_IN} $${RES_DIR}
|
||||
QMAKE_EXTRA_COMPILERS += copy_res
|
||||
#QMAKE_CXXFLAGS += /wd4996
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
QT += widgets
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
call "%~dp0..\..\..\env.bat" %1 %2 %3
|
||||
|
||||
SET "SAMPLESROOT=%~dp0.."
|
||||
SET "RES_DIR=%~dp0win%ARCH%\%VCVER%\res"
|
||||
SET "CSF_ResourcesDefaults=%RES_DIR%"
|
||||
SET "CSF_TutorialResourcesDefaults=%RES_DIR%"
|
||||
|
||||
|
@@ -7,6 +7,8 @@ REM third argument specifies Debug or Release mode
|
||||
|
||||
call "%~dp0env.bat" %1 %2 %3
|
||||
|
||||
set EXT=vcproj
|
||||
|
||||
if not "%1" == "" (
|
||||
if /I "%1" == "vc8" (
|
||||
set VCVER=vc8
|
||||
@@ -16,9 +18,11 @@ if not "%1" == "" (
|
||||
set "VCVARS=%VS90COMNTOOLS%..\..\VC\vcvarsall.bat"
|
||||
) else if /I "%1" == "vc10" (
|
||||
set VCVER=vc10
|
||||
set EXT=vcxproj
|
||||
set "VCVARS=%VS100COMNTOOLS%..\..\VC\vcvarsall.bat"
|
||||
) else if /I "%1" == "vc11" (
|
||||
set VCVER=vc11
|
||||
set EXT=vcxproj
|
||||
set "VCVARS=%VS110COMNTOOLS%..\..\VC\vcvarsall.bat"
|
||||
) else (
|
||||
echo Error: first argument ^(%1^) should specify supported version of Visual C++,
|
||||
@@ -32,4 +36,4 @@ if ["%ARCH%"] == ["64"] set VCARCH=amd64
|
||||
|
||||
call "%VCVARS%" %VCARCH%
|
||||
|
||||
qmake -tp vc -r Tutorial.pro
|
||||
qmake -tp vc -o Tutorial.%EXT% Tutorial.pro
|
||||
|
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QStatusBar>
|
||||
#include <QMdiSubWindow>
|
||||
|
||||
ApplicationTut::ApplicationTut()
|
||||
: ApplicationCommonWindow( )
|
||||
@@ -33,7 +34,7 @@ void ApplicationTut::createMakeBottleOperation(){
|
||||
|
||||
void ApplicationTut::updateFileActions()
|
||||
{
|
||||
if ( getWorkspace()->windowList().isEmpty() )
|
||||
if ( getWorkspace()->subWindowList().isEmpty() )
|
||||
{
|
||||
if ( !isDocument() )
|
||||
{
|
||||
@@ -49,8 +50,8 @@ void ApplicationTut::updateFileActions()
|
||||
|
||||
void ApplicationTut::onMakeBottleAction()
|
||||
{
|
||||
QWorkspace* ws = ApplicationCommonWindow::getWorkspace();
|
||||
DocumentTut* doc = (DocumentTut*)((MDIWindow*)ws->activeWindow())->getDocument();
|
||||
QMdiArea* ws = ApplicationCommonWindow::getWorkspace();
|
||||
DocumentTut* doc = (DocumentTut*)( qobject_cast<MDIWindow*>( ws->activeSubWindow()->widget() )->getDocument() );
|
||||
statusBar()->showMessage( QObject::tr("INF_MAKE_BOTTLE"), 5000 );
|
||||
doc->onMakeBottle();
|
||||
statusBar()->showMessage(QObject::tr("INF_DONE"));
|
||||
@@ -58,7 +59,7 @@ void ApplicationTut::onMakeBottleAction()
|
||||
|
||||
QString ApplicationTut::getTutResourceDir()
|
||||
{
|
||||
static QString resDir( ::getenv( "CSF_TutorialResourcesDefaults" ) );
|
||||
return resDir;
|
||||
static QString resDir (qgetenv ("CSF_TutorialResourcesDefaults").constData());
|
||||
return resDir;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user