Qt4 - VLM: select input from the OpenDialog, using the existing OpenDialog and not...
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 21 Dec 2007 01:21:09 +0000 (01:21 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 21 Dec 2007 01:21:09 +0000 (01:21 +0000)
modules/gui/qt4/dialogs/vlm.cpp
modules/gui/qt4/dialogs/vlm.hpp

index db76bfa..d3f092a 100644 (file)
@@ -24,6 +24,7 @@
  *****************************************************************************/
 
 #include "dialogs/vlm.hpp"
+#include "dialogs/open.hpp"
 
 #include <QString>
 #include <QComboBox>
@@ -136,6 +137,7 @@ VLMDialog::VLMDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
     BUTTONACT( ui.addButton, addVLMItem() );
     BUTTONACT( ui.clearButton, clearWidgets() );
     BUTTONACT( ui.saveButton, saveModifications() );
+    BUTTONACT( ui.inputButton, selectInput() );
 }
 
 VLMDialog::~VLMDialog()
@@ -222,8 +224,6 @@ void VLMDialog::addVLMItem()
 
     vlmItemLayout->insertWidget( vlmItemCount, vlmAwidget );
     vlmItems.append( vlmAwidget );
-
-    /* HERE BE DRAGONS VLM REQUEST */
 }
 
 void VLMDialog::clearWidgets()
@@ -241,6 +241,13 @@ void VLMDialog::clearWidgets()
     ui.addButton->show();
 }
 
+void VLMDialog::selectInput()
+{
+    OpenDialog *o = OpenDialog::getInstance( this, p_intf, 0, true );
+    o->exec();
+    ui.inputLedit->setText( o->getMRL() );
+}
+
 /* Object Modification */
 void VLMDialog::removeVLMItem( VLMAWidget *vlmObj )
 {
index 59b658b..a4aad97 100644 (file)
@@ -99,6 +99,7 @@ private slots:
     void saveModifications();
     void showScheduleWidget( int );
     void selectVLMItem( int );
+    void selectInput();
 };
 
 class VLMWrapper