]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
ILMAB: export GEOM fields to MED file
authoreap <eap@opencascade.com>
Wed, 5 Mar 2014 15:44:49 +0000 (19:44 +0400)
committereap <eap@opencascade.com>
Wed, 5 Mar 2014 15:44:49 +0000 (19:44 +0400)
  Enable addition of custom widgets

src/SalomeApp/SalomeApp_CheckFileDlg.cxx
src/SalomeApp/SalomeApp_CheckFileDlg.h

index 0b4562c9864ee6f95592f7c137fbda73682538d9..a742eb611b8033d07e14cb80c6b2003d19eec1c6 100644 (file)
@@ -51,31 +51,56 @@ SUIT_FileDlg( parent, open, showQuickDir, modal )
 }
 
 /*!
-Constructor
+  Constructor
 */
-SalomeApp_CheckFileDlg::SalomeApp_CheckFileDlg( QWidget* parent, bool open, const QStringList& theCheckBoxNames, bool showQuickDir, bool modal) :
-SUIT_FileDlg( parent, open, showQuickDir, modal )
+SalomeApp_CheckFileDlg::SalomeApp_CheckFileDlg( QWidget*                 parent,
+                                                bool                     open,
+                                                const QStringList&       theCheckBoxNames,
+                                                bool                     showQuickDir,
+                                                bool                     modal,
+                                                const QList< QWidget* >& wdgList,
+                                                const bool               wdgAfter) :
+  SUIT_FileDlg( parent, open, showQuickDir, modal )
 {
-  if ( theCheckBoxNames.count() > 0 )
+  if ( theCheckBoxNames.count() > 0 || wdgList.count() > 0 )
   {
-    
     QGridLayout* grid = ::qobject_cast<QGridLayout*>( layout() );
     if ( grid )
     {
+      if ( !wdgAfter )
+        for ( int i = 0; i < wdgList.count(); ++i )
+        {
+          if ( wdgList[i] )
+          {
+            int row = grid->rowCount();
+            grid->addWidget( wdgList[i], row, 1 );
+          }
+        }
+
       for ( int i = 0; i < theCheckBoxNames.count(); ++i )
       {
         QCheckBox* myCheckBox = new QCheckBox( theCheckBoxNames.at(i), this );
         myCheckBoxes.append( myCheckBox );
-    
+
         int row = grid->rowCount();
         grid->addWidget( myCheckBox, row, 1 );
       }
+
+      if ( wdgAfter )
+        for ( int i = 0; i < wdgList.count(); ++i )
+        {
+          if ( wdgList[i] )
+          {
+            int row = grid->rowCount();
+            grid->addWidget( wdgList[i], row, 1 );
+          }
+        }
     }
   }
 }
 
 /*!
-Destructor
+  Destructor
 */
 SalomeApp_CheckFileDlg::~SalomeApp_CheckFileDlg() 
 {
index 632991dd32cef358a8a371661bf58316f9efb31e..27e7b303776c806b4a096894368a2b0bd2c0218c 100644 (file)
@@ -35,7 +35,7 @@ class SALOMEAPP_EXPORT SalomeApp_CheckFileDlg : public SUIT_FileDlg
     
 public:
   SalomeApp_CheckFileDlg( QWidget*, bool open, const QString& theCheckBoxName, bool showQuickDir = true, bool modal = true );
-  SalomeApp_CheckFileDlg( QWidget*, bool open, const QStringList& theCheckBoxNames, bool showQuickDir = true, bool modal = true );
+  SalomeApp_CheckFileDlg( QWidget*, bool open, const QStringList& theCheckBoxNames, bool showQuickDir = true, bool modal = true, const QList< QWidget* >& = QList< QWidget* >(), const bool wdgAfter = false );
   virtual ~SalomeApp_CheckFileDlg();
 
 public: