Qt4 - VLM. Patch by Jean-François Massol, reworked by /me
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 9 Sep 2007 22:19:48 +0000 (22:19 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 9 Sep 2007 22:19:48 +0000 (22:19 +0000)
modules/gui/qt4/Modules.am
modules/gui/qt4/dialogs/help.hpp
modules/gui/qt4/dialogs/vlm.cpp [new file with mode: 0644]
modules/gui/qt4/dialogs/vlm.hpp [new file with mode: 0644]
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/menus.cpp
modules/gui/qt4/ui/vlm.ui

index 1704e2e..c31344b 100644 (file)
@@ -31,6 +31,7 @@ nodist_SOURCES_qt4 = \
                dialogs/gototime.moc.cpp \
                dialogs/open.moc.cpp \
                dialogs/podcast_configuration.moc.cpp \
+        dialogs/vlm.moc.cpp \
                components/extended_panels.moc.cpp \
                components/infopanels.moc.cpp \
                components/preferences_widgets.moc.cpp \
@@ -51,6 +52,7 @@ nodist_SOURCES_qt4 = \
                ui/open_net.h \
                ui/open_capture.h \
                ui/open.h \
+               ui/vlm.h \
                ui/podcast_configuration.h \
                ui/sprefs_audio.h \
                ui/sprefs_input.h \
@@ -59,7 +61,6 @@ nodist_SOURCES_qt4 = \
                ui/sprefs_video.h \
                ui/sprefs_hotkeys.h \
                ui/streampanel.h \
-               ui/vlm.h \
                ui/sout.h
 
 if ENABLE_QT4
@@ -113,6 +114,7 @@ SOURCES_qt4 =       qt4.cpp \
                dialogs/help.cpp \
                dialogs/gototime.cpp \
                dialogs/open.cpp \
+        dialogs/vlm.cpp \
                dialogs/podcast_configuration.cpp \
                components/extended_panels.cpp \
                components/infopanels.cpp \
@@ -145,6 +147,7 @@ noinst_HEADERS = \
        dialogs/help.hpp \
        dialogs/gototime.hpp \
        dialogs/open.hpp \
+    dialogs/vlm.hpp \
        dialogs/podcast_configuration.hpp \
        components/extended_panels.hpp \
        components/infopanels.hpp \
index 050cc9b..293b419 100644 (file)
@@ -32,7 +32,7 @@ public:
     static HelpDialog * getInstance( intf_thread_t *p_intf )
     {
         if( !instance)
-            instance = new HelpDialog( p_intf);
+            instance = new HelpDialog( p_intf );
         return instance;
     }
     virtual ~HelpDialog();
diff --git a/modules/gui/qt4/dialogs/vlm.cpp b/modules/gui/qt4/dialogs/vlm.cpp
new file mode 100644 (file)
index 0000000..7df0bdb
--- /dev/null
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * sout.cpp : Stream output dialog ( old-style )
+ ****************************************************************************
+ * Copyright ( C ) 2006 the VideoLAN team
+ * $Id: sout.cpp 21875 2007-09-08 16:01:33Z jb $
+ *
+ * Authors: Clément Stenac <zorglub@videolan.org>
+ *          Jean-Baptiste Kempf <jb@videolan.org>
+ *          Jean-François Massol <jf.massol -at- gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * ( at your option ) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#include "dialogs/vlm.hpp"
+#include "qt4.hpp"
+#include <vlc_streaming.h>
+
+#include <iostream>
+#include <QString>
+#include <QFileDialog>
+
+VLMDialog *VLMDialog::instance = NULL;
+
+
+VLMDialog::VLMDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
+{
+    setWindowTitle( qtr( "VLM front-end" ) );
+
+    /* UI stuff */
+    ui.setupUi( this );
+}
+
+VLMDialog::~VLMDialog(){}
+
+void VLMDialog::close(){
+    close();
+}
+    
diff --git a/modules/gui/qt4/dialogs/vlm.hpp b/modules/gui/qt4/dialogs/vlm.hpp
new file mode 100644 (file)
index 0000000..f998c79
--- /dev/null
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * vlm.hpp : Stream output dialog ( old-style, ala WX )
+ ****************************************************************************
+ * Copyright ( C ) 2006 the VideoLAN team
+ * $Id: vlm.hpp 21875 2007-09-08 16:01:33Z jb $
+ *
+ * Authors: Jean-François Massol <jf.massol@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * ( at your option ) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef _VLM_DIALOG_H_
+#define _VLM_DIALOG_H_
+
+#include <vlc/vlc.h>
+
+#include "ui/vlm.h"
+#include "util/qvlcframe.hpp"
+
+
+class VLMDialog : public QVLCFrame
+{
+    Q_OBJECT;
+public:
+    static VLMDialog * getInstance( intf_thread_t *p_intf )
+    {
+        if( !instance)
+             instance = new VLMDialog( p_intf );
+        return instance;
+    };
+    virtual ~VLMDialog();
+    
+private:
+    VLMDialog( intf_thread_t *);
+    static VLMDialog *instance;
+    Ui::Vlm ui;
+
+private slots:
+    void close();
+};
+
+#endif
index f244eb7..64fad33 100644 (file)
 #include "dialogs/extended.hpp"
 #include "dialogs/sout.hpp"
 #include "dialogs/open.hpp"
+#include "dialogs/vlm.hpp"
 #include "dialogs/help.hpp"
 #include "dialogs/gototime.hpp"
 #include "dialogs/podcast_configuration.hpp"
 
+
 DialogsProvider* DialogsProvider::instance = NULL;
 
 DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) :
@@ -156,8 +158,7 @@ void DialogsProvider::gotoTimeDialog()
 
 void DialogsProvider::vlmDialog()
 {
-    /* FIXME - Implement me */
-    /*  VLMDialog::getInstance( p_intf )->toggleVisible(); */
+    VLMDialog::getInstance( p_intf )->toggleVisible();
 }
 
 void DialogsProvider::helpDialog()
index 027e6ba..de63a4d 100644 (file)
@@ -257,8 +257,9 @@ QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf, MainInterface *mi,
 
 #if 0 /* Not Implemented yet */
     DP_SADD( menu, qtr( I_MENU_BOOKMARK ), "","", bookmarksDialog(), "Ctrl+B" );
-    DP_SADD( menu, qtr( I_MENU_VLM ), "","", vlmDialog(), "Ctrl+V" );
 #endif
+    DP_SADD( menu, qtr( I_MENU_VLM ), "","", vlmDialog(), "Ctrl+V" );
+
 
     menu->addSeparator();
     if( mi )
index 8a18301..d0e7692 100644 (file)
@@ -35,7 +35,7 @@
    <property name="title" >
     <string>Media configuration</string>
    </property>
-   <widget class="MultiPageWidget" name="typeVLM" >
+   <widget class="QStackedWidget" name="typeVLM" >
     <property name="geometry" >
      <rect>
       <x>0</x>
    </column>
   </widget>
  </widget>
- <customwidgets>
-  <customwidget>
-   <class>MultiPageWidget</class>
-   <extends>QWidget</extends>
-   <header>multipagewidget.h</header>
-   <container>1</container>
-  </customwidget>
- </customwidgets>
  <resources/>
  <connections>
   <connection>