From: vsr Date: Thu, 24 Mar 2016 12:55:14 +0000 (+0300) Subject: Merge branch 'V7_dev' X-Git-Tag: V8_1_0a1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bd2042b4d19d69deaf182edda40bbff83e53490a;p=modules%2Fgeom.git Merge branch 'V7_dev' --- bd2042b4d19d69deaf182edda40bbff83e53490a diff --cc src/STEPPlugin/STEPPlugin_ImportDlg.cxx index 000000000,b6a64e316..668050f90 mode 000000,100644..100644 --- a/src/STEPPlugin/STEPPlugin_ImportDlg.cxx +++ b/src/STEPPlugin/STEPPlugin_ImportDlg.cxx @@@ -1,0 -1,94 +1,94 @@@ + // Copyright (C) 2014-2016 CEA/DEN, EDF R&D, OPEN CASCADE + // + // This library is free software; you can redistribute it and/or + // modify it under the terms of the GNU Lesser General Public + // License as published by the Free Software Foundation; either + // version 2.1 of the License, or (at your option) any later version. + // + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + // Lesser General Public License for more details. + // + // You should have received a copy of the GNU Lesser General Public + // License along with this library; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + // + // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + // + + #include "STEPPlugin_ImportDlg.h" + + #include + #include + #include + + //============================================================================= + // Constructor + //============================================================================= + STEPPlugin_ImportDlg::STEPPlugin_ImportDlg(QWidget *parent) + : SUIT_FileDlg (parent, true, true, true), + myCheckBox (0) + { + myCheckBox = new QCheckBox(tr("STEP_CREATE_ASSEMBLIES"), this); + + myCheckBox->setChecked(true); + + layout()->addWidget(myCheckBox); + } + + //============================================================================= + // Destructor + //============================================================================= + STEPPlugin_ImportDlg::~STEPPlugin_ImportDlg() + { + } + + //============================================================================= + // IsCreateAssemblies + //============================================================================= + bool STEPPlugin_ImportDlg::IsCreateAssemblies() const + { + return myCheckBox->isChecked(); + } + + //============================================================================= + // getOpenFileNames + //============================================================================= + QStringList STEPPlugin_ImportDlg::getOpenFileNames + (const QString &theInitial, + const QString &theFilters, + const QString &theCaption, + QWidget *theParent, + bool &IsCreateAssemblies) + { + STEPPlugin_ImportDlg anImpDlg(theParent); + QStringList aFilters = theFilters.split(";;", QString::SkipEmptyParts); + + anImpDlg.setFileMode(ExistingFiles); + + if (aFilters.isEmpty()) { - anImpDlg.setFilter(tr("ALL_FILES_FILTER")); // All files (*) ++ anImpDlg.setNameFilter(tr("ALL_FILES_FILTER")); // All files (*) + } else { - anImpDlg.setFilters(aFilters); ++ anImpDlg.setNameFilters(aFilters); + } + + if (!theCaption.isEmpty()) { + anImpDlg.setWindowTitle(theCaption); + } + + if (!theInitial.isEmpty()) { + anImpDlg.processPath(theInitial); + } + + QStringList aFileNames; + + if (anImpDlg.exec() == QDialog::Accepted) { + aFileNames = anImpDlg.selectedFiles(); + IsCreateAssemblies = anImpDlg.IsCreateAssemblies(); + } + + QApplication::processEvents(); + + return aFileNames; + } diff --cc src/Tools/t_shape/CMakeLists.txt index e4332a5e7,7d803f88a..7f9ffdaf0 --- a/src/Tools/t_shape/CMakeLists.txt +++ b/src/Tools/t_shape/CMakeLists.txt @@@ -16,8 -16,9 +16,9 @@@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + IF(SALOME_BUILD_GUI) - INCLUDE(UsePyQt4) + INCLUDE(UsePyQt) ENDIF() # --- scripts ---