[vlc-devel] [PATCH 1/4] VLC qt gui: cloud storage stubs.

Jean-Baptiste Kempf jb at videolan.org
Wed Oct 26 21:17:00 CEST 2016


Why is that inside the UI?

On Wed, 19 Oct 2016, at 19:50, Paweł Wegner wrote:
> ---
>  include/vlc_interface.h                   |   1 +
>  modules/gui/qt/Makefile.am                |   2 ++
>  modules/gui/qt/components/open_panels.cpp |  14 ++++++++
>  modules/gui/qt/components/open_panels.hpp |  14 ++++++++
>  modules/gui/qt/dialogs/open.cpp           |   3 ++
>  modules/gui/qt/dialogs/open.hpp           |   2 ++
>  modules/gui/qt/dialogs_provider.cpp       |   7 ++++
>  modules/gui/qt/dialogs_provider.hpp       |   1 +
>  modules/gui/qt/menus.cpp                  |   2 ++
>  modules/gui/qt/pixmaps/types/cloud.png    | Bin 0 -> 1358 bytes
>  modules/gui/qt/ui/open_cloud.ui           |  58
>  ++++++++++++++++++++++++++++++
>  modules/gui/qt/vlc.qrc                    |   1 +
>  12 files changed, 105 insertions(+)
>  create mode 100644 modules/gui/qt/pixmaps/types/cloud.png
>  create mode 100644 modules/gui/qt/ui/open_cloud.ui
> 
> diff --git a/include/vlc_interface.h b/include/vlc_interface.h
> index a4006f0..d42a19a 100644
> --- a/include/vlc_interface.h
> +++ b/include/vlc_interface.h
> @@ -118,6 +118,7 @@ typedef enum vlc_intf_dialog {
>      INTF_DIALOG_NET,
>      INTF_DIALOG_CAPTURE,
>      INTF_DIALOG_SAT,
> +    INTF_DIALOG_CLOUD,
>      INTF_DIALOG_DIRECTORY,
>  
>      INTF_DIALOG_STREAMWIZARD,
> diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
> index 8546529..0d3bea4 100644
> --- a/modules/gui/qt/Makefile.am
> +++ b/modules/gui/qt/Makefile.am
> @@ -209,6 +209,7 @@ nodist_libqt_plugin_la_SOURCES += \
>  	ui/open_disk.h \
>  	ui/open_net.h \
>  	ui/open_capture.h \
> +       ui/open_cloud.h \
>  	ui/open.h \
>  	ui/vlm.h \
>  	ui/podcast_configuration.h \
> @@ -249,6 +250,7 @@ libqt_plugin_la_UI = \
>  	ui/open_disk.ui \
>  	ui/open_net.ui \
>  	ui/open_capture.ui \
> +       ui/open_cloud.ui \
>  	ui/open.ui \
>  	ui/podcast_configuration.ui \
>  	ui/profiles.ui \
> diff --git a/modules/gui/qt/components/open_panels.cpp
> b/modules/gui/qt/components/open_panels.cpp
> index 9f05548..3d0f6d9 100644
> --- a/modules/gui/qt/components/open_panels.cpp
> +++ b/modules/gui/qt/components/open_panels.cpp
> @@ -1403,3 +1403,17 @@ void CaptureOpenPanel::advancedDialog()
>      module_config_free( p_config );
>  }
>  
> +
> +CloudOpenPanel::CloudOpenPanel( QWidget *parent, intf_thread_t *t ) :
> +                                  OpenPanel( parent, t )
> +{
> +    ui.setupUi(this);
> +}
> +
> +void CloudOpenPanel::clear()
> +{
> +}
> +
> +void CloudOpenPanel::updateMRL()
> +{
> +}
> diff --git a/modules/gui/qt/components/open_panels.hpp
> b/modules/gui/qt/components/open_panels.hpp
> index d124a25..af61c6b 100644
> --- a/modules/gui/qt/components/open_panels.hpp
> +++ b/modules/gui/qt/components/open_panels.hpp
> @@ -38,6 +38,7 @@
>  #include "ui/open_disk.h"
>  #include "ui/open_net.h"
>  #include "ui/open_capture.h"
> +#include "ui/open_cloud.h"
>  
>  #include <QFileDialog>
>  
> @@ -230,4 +231,17 @@ private slots:
>      void advancedDialog();
>  };
>  
> +class CloudOpenPanel : public OpenPanel
> +{
> +    Q_OBJECT
> +public:
> +    CloudOpenPanel( QWidget *, intf_thread_t * );
> +    void clear();
> +private:
> +    Ui::OpenCloud ui;
> +
> +public slots:
> +    void updateMRL();
> +};
> +
>  #endif
> diff --git a/modules/gui/qt/dialogs/open.cpp
> b/modules/gui/qt/dialogs/open.cpp
> index 224cfa5..3856099 100644
> --- a/modules/gui/qt/dialogs/open.cpp
> +++ b/modules/gui/qt/dialogs/open.cpp
> @@ -84,6 +84,7 @@ OpenDialog::OpenDialog( QWidget *parent,
>      discOpenPanel    = new DiscOpenPanel( this, p_intf );
>      netOpenPanel     = new NetOpenPanel( this, p_intf );
>      captureOpenPanel = new CaptureOpenPanel( this, p_intf );
> +    cloudOpenPanel   = new CloudOpenPanel( this, p_intf );
>  
>      /* Insert the tabs */
>      ui.Tab->insertTab( OPEN_FILE_TAB, fileOpenPanel, QIcon(
>      ":/type/file-asym" ),
> @@ -94,6 +95,8 @@ OpenDialog::OpenDialog( QWidget *parent,
>                         qtr( "&Network" ) );
>      ui.Tab->insertTab( OPEN_CAPTURE_TAB, captureOpenPanel,
>                         QIcon( ":/type/capture-card" ), qtr( "Capture
>                         &Device" ) );
> +    ui.Tab->insertTab( OPEN_CLOUD_TAB, cloudOpenPanel, QIcon(
> ":/type/cloud" ),
> +                       qtr( "&Cloud" ) );
>  
>      /* Hide the Slave input widgets */
>      ui.slaveLabel->hide();
> diff --git a/modules/gui/qt/dialogs/open.hpp
> b/modules/gui/qt/dialogs/open.hpp
> index 0ce6f81..6932851 100644
> --- a/modules/gui/qt/dialogs/open.hpp
> +++ b/modules/gui/qt/dialogs/open.hpp
> @@ -40,6 +40,7 @@ enum {
>      OPEN_DISC_TAB,
>      OPEN_NETWORK_TAB,
>      OPEN_CAPTURE_TAB,
> +    OPEN_CLOUD_TAB,
>      OPEN_TAB_MAX
>  };
>  
> @@ -98,6 +99,7 @@ private:
>      NetOpenPanel *netOpenPanel;
>      DiscOpenPanel *discOpenPanel;
>      CaptureOpenPanel *captureOpenPanel;
> +    CloudOpenPanel *cloudOpenPanel;
>  
>      int i_action_flag;
>      bool b_pl;
> diff --git a/modules/gui/qt/dialogs_provider.cpp
> b/modules/gui/qt/dialogs_provider.cpp
> index 5951b65..8796d56 100644
> --- a/modules/gui/qt/dialogs_provider.cpp
> +++ b/modules/gui/qt/dialogs_provider.cpp
> @@ -139,6 +139,8 @@ void DialogsProvider::customEvent( QEvent *event )
>          case INTF_DIALOG_SAT:
>          case INTF_DIALOG_CAPTURE:
>              openCaptureDialog(); break;
> +        case INTF_DIALOG_CLOUD:
> +            openCloudDialog(); break;
>          case INTF_DIALOG_DIRECTORY:
>              PLAppendDir(); break;
>          case INTF_DIALOG_PLAYLIST:
> @@ -426,6 +428,11 @@ void DialogsProvider::openCaptureDialog()
>      openDialog( OPEN_CAPTURE_TAB );
>  }
>  
> +void DialogsProvider::openCloudDialog()
> +{
> +    openDialog(OPEN_CLOUD_TAB);
> +}
> +
>  /* Same as the open one, but force the enqueue */
>  void DialogsProvider::PLAppendDialog( int tab )
>  {
> diff --git a/modules/gui/qt/dialogs_provider.hpp
> b/modules/gui/qt/dialogs_provider.hpp
> index 01faa11..46bc89f 100644
> --- a/modules/gui/qt/dialogs_provider.hpp
> +++ b/modules/gui/qt/dialogs_provider.hpp
> @@ -153,6 +153,7 @@ public slots:
>      void openUrlDialog();
>      void openNetDialog();
>      void openCaptureDialog();
> +    void openCloudDialog();
>  
>      void PLAppendDialog( int tab = OPEN_FILE_TAB );
>      void MLAppendDialog( int tab = OPEN_FILE_TAB );
> diff --git a/modules/gui/qt/menus.cpp b/modules/gui/qt/menus.cpp
> index 8af0317..c70a315 100644
> --- a/modules/gui/qt/menus.cpp
> +++ b/modules/gui/qt/menus.cpp
> @@ -370,6 +370,8 @@ QMenu *VLCMenuBar::FileMenu( intf_thread_t *p_intf,
> QWidget *parent, MainInterfa
>          ":/type/network", SLOT( openNetDialog() ), "Ctrl+N" );
>      addDPStaticEntry( menu, qtr( "Open &Capture Device..." ),
>          ":/type/capture-card", SLOT( openCaptureDialog() ), "Ctrl+C" );
> +    addDPStaticEntry( menu, qtr( "Open Cloud File..."),
> +        ":/type/cloud", SLOT( openCloudDialog() ) );
>  
>      addDPStaticEntry( menu, qtr( "Open &Location from clipboard" ),
>                        NULL, SLOT( openUrlDialog() ), "Ctrl+V" );
> diff --git a/modules/gui/qt/pixmaps/types/cloud.png
> b/modules/gui/qt/pixmaps/types/cloud.png
> new file mode 100644
> index
> 0000000000000000000000000000000000000000..8796aa07d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WJeGI=YcR?UI at RAQ5dX8KFitDFId$pp^ixt<KYVL^-YOkrXrj2
> z5frwnmPhT#lNYqQVKhpnv$CgTbw7*xlnAdBzxhR^C%+c&D+rTY^ZR*D*{Q8 at aSPh~
> zCs?8XN9w_v*SPv$3BIhnw5$-cJGsoPimdPqoI8KhTWTgfYlY&xg$vle-1->BQ)Q&k
> z%3-}4(ySCuiN4-K8D-MI(Tnbwhow$tN at MP%?b9?^uH}qhOmFEA&?#4C&=_d0a~w+s
> za*PvQrUD>y at 7uujayi?BvJWb#EQL|RyLL`nuSA_Ig^3$p&$Q#4eEdM`syjB<qAJI?
> z-UeK|n;y>0x*>KjYK%`4^WJt9*xd#&kz)PDGOsR6t<qdKQliW+X5)OItU?yLktAfF
> zgM9<VkKmSCiYP5JeT&JZEd at ppe!=j>a{^bLN3<mrzQwduHwi=IiD6k9SjRCO>A&bC
> zc&55~0FNT>dR>{Yw=60o9Co$v+V;YJM3(B3mhabVHNL9q^X3s=1(jIWeGzcd5Ao0C
> zFZbup)W^+dr4K#h5_gAi at Icp}|J))zZo_f4jPg`Gt}uH6OzEAe3dp|<%e<<XnM!Ox
> zJj%>Q=CTLPUiKOf=zV^|$b?Op4luly;dZ>?d#TDS+v=iwoQl9n`9PPZb0M8PVIT)h
> zF6adNvl-*ef0eeik at 5Cu<=or-v5xNCK`&~j-T+fqppx0=?+Pyz2BKlRsa3?yecrdu
> zn19Ao^NDfQVG>vV8^-U at 3N$NWTbwz$z+rux7k%B&RuSVNy10!$36Ks16Z!jN&;Ad)
> C2XwIj
> 
> literal 0
> HcmV?d00001
> 
> diff --git a/modules/gui/qt/ui/open_cloud.ui
> b/modules/gui/qt/ui/open_cloud.ui
> new file mode 100644
> index 0000000..1401402
> --- /dev/null
> +++ b/modules/gui/qt/ui/open_cloud.ui
> @@ -0,0 +1,58 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<ui version="4.0">
> + <class>OpenCloud</class>
> + <widget class="QWidget" name="OpenCloud">
> +  <property name="geometry">
> +   <rect>
> +    <x>0</x>
> +    <y>0</y>
> +    <width>400</width>
> +    <height>300</height>
> +   </rect>
> +  </property>
> +  <property name="windowTitle">
> +   <string>Form</string>
> +  </property>
> +  <widget class="QPushButton" name="pushButton">
> +   <property name="geometry">
> +    <rect>
> +     <x>20</x>
> +     <y>20</y>
> +     <width>99</width>
> +     <height>27</height>
> +    </rect>
> +   </property>
> +   <property name="text">
> +    <string>GoogleDrive</string>
> +   </property>
> +  </widget>
> +  <widget class="QPushButton" name="pushButton_2">
> +   <property name="geometry">
> +    <rect>
> +     <x>20</x>
> +     <y>50</y>
> +     <width>99</width>
> +     <height>27</height>
> +    </rect>
> +   </property>
> +   <property name="text">
> +    <string>OneDrive</string>
> +   </property>
> +  </widget>
> +  <widget class="QPushButton" name="pushButton_3">
> +   <property name="geometry">
> +    <rect>
> +     <x>20</x>
> +     <y>80</y>
> +     <width>99</width>
> +     <height>27</height>
> +    </rect>
> +   </property>
> +   <property name="text">
> +    <string>Dropbox</string>
> +   </property>
> +  </widget>
> + </widget>
> + <resources/>
> + <connections/>
> +</ui>
> diff --git a/modules/gui/qt/vlc.qrc b/modules/gui/qt/vlc.qrc
> index fbf5bfd..7cc3d47 100644
> --- a/modules/gui/qt/vlc.qrc
> +++ b/modules/gui/qt/vlc.qrc
> @@ -90,6 +90,7 @@
>          <file alias="stream">pixmaps/types/type_stream.png</file>
>          <file alias="node">pixmaps/types/type_node.png</file>
>          <file alias="playlist">pixmaps/types/type_playlist.png</file>
> +        <file alias="cloud">pixmaps/types/cloud.png</file>
>      </qresource>
>      <qresource prefix="/">
>          <file alias="down_arrow">pixmaps/arrow_down_dark.png</file>
> -- 
> 2.9.3
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


-- 
  Jean-Baptiste Kempf
  jb at videolan.org


More information about the vlc-devel mailing list