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:
@@ -15,6 +15,7 @@
|
||||
#include <QFileDialog>
|
||||
#include <QApplication>
|
||||
#include <QWidget>
|
||||
#include <QStyleFactory>
|
||||
|
||||
#include <AIS_Shape.hxx>
|
||||
#include <AIS_InteractiveObject.hxx>
|
||||
@@ -89,7 +90,9 @@ private:
|
||||
TranslateDlg::TranslateDlg( QWidget* parent, Qt::WindowFlags flags, bool modal )
|
||||
: QFileDialog( parent, flags )
|
||||
{
|
||||
setOption( QFileDialog::DontUseNativeDialog );
|
||||
setModal( modal );
|
||||
|
||||
QGridLayout* grid = ::qobject_cast<QGridLayout*>( layout() );
|
||||
|
||||
if( grid )
|
||||
@@ -331,7 +334,7 @@ QString Translate::selectFileName( const int format, const bool import )
|
||||
|
||||
if ( !QFileInfo( file ).completeSuffix().length() )
|
||||
{
|
||||
QString selFilter = theDlg->selectedFilter();
|
||||
QString selFilter = theDlg->selectedNameFilter();
|
||||
int idx = selFilter.indexOf( "(*." );
|
||||
if ( idx != -1 )
|
||||
{
|
||||
@@ -371,7 +374,7 @@ TranslateDlg* Translate::getDialog( const int format, const bool import )
|
||||
|
||||
cout << filter.toLatin1().constData() << endl;
|
||||
QStringList filters = filter.split( "\t" );
|
||||
myDlg->setFilters( filters );
|
||||
myDlg->setNameFilters ( filters );
|
||||
|
||||
if ( import )
|
||||
{
|
||||
@@ -384,7 +387,7 @@ TranslateDlg* Translate::getDialog( const int format, const bool import )
|
||||
((QFileDialog*)myDlg)->setFileMode( QFileDialog::AnyFile );
|
||||
}
|
||||
|
||||
QString datadir = (QString(getenv("CASROOT")) + QObject::tr( QString("INF_PATH_%1").arg( format ).toLatin1().constData() ) );
|
||||
QString datadir = (QString (qgetenv ("CASROOT").constData()) + QObject::tr( QString("INF_PATH_%1").arg( format ).toLatin1().constData() ) );
|
||||
|
||||
myDlg->clear();
|
||||
|
||||
@@ -459,7 +462,7 @@ Handle(TopTools_HSequenceOfShape) Translate::importSTEP( const QString& file )
|
||||
{
|
||||
bool ok = aReader.TransferRoot( n );
|
||||
int nbs = aReader.NbShapes();
|
||||
if ( nbs > 0 )
|
||||
if ( ok == true && nbs > 0 )
|
||||
{
|
||||
aSequence = new TopTools_HSequenceOfShape();
|
||||
for ( int i = 1; i <= nbs; i++ )
|
||||
|
Reference in New Issue
Block a user