]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
New signal pathSelected() emited when user select path via browse file dialog
authorsan <san@opencascade.com>
Tue, 2 Nov 2010 07:31:37 +0000 (07:31 +0000)
committersan <san@opencascade.com>
Tue, 2 Nov 2010 07:31:37 +0000 (07:31 +0000)
src/Qtx/QtxPathEdit.cxx
src/Qtx/QtxPathEdit.h

index 8c3c7b18d1a09583deb2efea8de0c1447d42ff72..cdd9a24e80c7bbbaeee3cd3362434bcc6b778dfa 100644 (file)
@@ -221,8 +221,11 @@ void QtxPathEdit::onBrowse( bool /*on*/ )
     break;
   }
 
-  if ( !path.isEmpty() )
-    myPath->setText( QDir::convertSeparators( path ) );
+  if ( !path.isEmpty() ) {
+    QString txt = QDir::convertSeparators( path );
+    emit pathSelected( txt );
+    myPath->setText( txt );
+  }
 
   myPath->setFocus();
 }
@@ -254,6 +257,7 @@ void QtxPathEdit::initialize()
   base->addWidget( browse );
 
   connect( browse, SIGNAL( clicked( bool ) ), this, SLOT( onBrowse( bool ) ) );
+  connect( myPath, SIGNAL( textChanged( const QString& ) ), this, SIGNAL( pathChanged( const QString& ) ) );
 
   setFocusProxy( myPath );
 
index 018e2349d9042ffd4241a6d0e079adcf66ff1887..941be6c2e85b1c1b3b500cbc163674d46b0d23b1 100644 (file)
@@ -52,6 +52,10 @@ public:
   const QValidator* validator() const;
   void              setValidator( QValidator* );
 
+signals:
+  void              pathChanged( const QString& );
+  void              pathSelected( const QString& );
+
 private slots:
   void              onBrowse( bool = false );