Commit 1cbc005b authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

* Qt4: Display open dialog. Not yet functionnable.

Sesame...
parent bd09462a
......@@ -13,7 +13,10 @@ AUTOMAKE_OPTIONS = subdir-objects
TOUI = \
ui/equalizer \
ui/file_open \
ui/open_file \
ui/open_disk \
ui/open_net \
ui/open \
ui/input_stats \
ui/main_interface \
ui/sprefs_audio \
......@@ -40,6 +43,7 @@ TOMOC = main_interface \
dialogs/extended \
dialogs/interaction \
dialogs/sout \
dialogs/open \
components/extended_panels \
components/infopanels \
components/preferences_widgets \
......@@ -67,6 +71,7 @@ nodist_SOURCES_qt4 = \
dialogs/prefs_dialog.moc.cpp \
dialogs/interaction.moc.cpp \
dialogs/sout.moc.cpp \
dialogs/open.moc.cpp \
components/extended_panels.moc.cpp \
components/infopanels.moc.cpp \
components/preferences_widgets.moc.cpp \
......@@ -114,6 +119,7 @@ SOURCES_qt4 = qt4.cpp \
dialogs/errors.cpp \
dialogs/interaction.cpp \
dialogs/sout.cpp \
dialogs/open.cpp \
components/extended_panels.cpp \
components/infopanels.cpp \
components/preferences_widgets.cpp \
......@@ -143,6 +149,7 @@ EXTRA_DIST += \
dialogs/prefs_dialog.hpp \
dialogs/interaction.hpp \
dialogs/sout.hpp \
dialogs/open.hpp \
components/extended_panels.hpp \
components/infopanels.hpp \
components/preferences_widgets.hpp \
......@@ -157,7 +164,10 @@ EXTRA_DIST += \
util/customwidgets.hpp \
util/qvlcframe.hpp \
ui/equalizer.ui \
ui/file_open.ui \
ui/open_file.ui \
ui/open_disk.ui \
ui/open_net.ui \
ui/open.ui \
ui/input_stats.ui \
ui/main_interface.ui \
ui/sprefs_audio.ui \
......
......@@ -5,6 +5,7 @@
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Baptiste Kempf <jb@videolan.org>
*
* 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
......
......@@ -5,6 +5,7 @@
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Baptiste Kempf <jb@videolan.org>
*
* 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
......@@ -27,7 +28,7 @@
#include <vlc/vlc.h>
#include <QWidget>
#include <QString>
#include "ui/file_open.h"
#include "ui/open_file.h"
class OpenPanel: public QWidget
{
......@@ -53,7 +54,7 @@ public:
virtual ~FileOpenPanel();
virtual QString getUpdatedMRL();
private:
Ui::FileOpen ui;
Ui::OpenFile ui;
public slots:
virtual void sendUpdate() ;
signals:
......
/*****************************************************************************
* open.cpp : Advanced open dialog
****************************************************************************
* Copyright (C) 2006 the VideoLAN team
* $Id: streaminfo.cpp 16816 2006-09-23 20:56:52Z jb $
*
* Authors: Jean-Baptiste Kempf <jb@videolan.org>
*
* 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 <QTabWidget>
#include <QGridLayout>
#include "dialogs/open.hpp"
#include "components/open.hpp"
#include "qt4.hpp"
#include "util/qvlcframe.hpp"
#include "input_manager.hpp"
#include "dialogs_provider.hpp"
OpenDialog *OpenDialog::instance = NULL;
OpenDialog::OpenDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
{
setWindowTitle( _("Open" ) );
ui.setupUi( this );
fileOpenPanel = new FileOpenPanel(this , _p_intf );
ui.Tab->addTab(fileOpenPanel, "Test");
}
OpenDialog::~OpenDialog()
{
}
void OpenDialog::cancel()
{
this->toggleVisible();
}
void OpenDialog::ok()
{
this->toggleVisible();
}
/*****************************************************************************
* open.hpp : advanced open dialog
****************************************************************************
* Copyright (C) 2006 the VideoLAN team
* $Id: streaminfo.hpp 16806 2006-09-23 13:37:50Z zorglub $
*
* Authors: Jean-Baptiste Kempf <jb@videolan.org>
*
* 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 _OPEN_DIALOG_H_
#define _OPEN_DIALOG_H_
#include <vlc/vlc.h>
#include "ui/open.h"
#include "util/qvlcframe.hpp"
#include "components/open.hpp"
#include <QTabWidget>
#include <QBoxLayout>
class InfoTab;
class OpenDialog : public QVLCFrame
{
Q_OBJECT;
public:
static OpenDialog * getInstance( intf_thread_t *p_intf )
{
if( !instance)
instance = new OpenDialog( p_intf);
return instance;
}
virtual ~OpenDialog();
private:
OpenDialog( intf_thread_t * );
static OpenDialog *instance;
input_thread_t *p_input;
Ui::Open ui;
FileOpenPanel *fileOpenPanel;
public slots:
void cancel();
void ok();
};
#endif
......@@ -37,6 +37,7 @@
#include "dialogs/messages.hpp"
#include "dialogs/extended.hpp"
#include "dialogs/sout.hpp"
#include "dialogs/open.hpp"
DialogsProvider* DialogsProvider::instance = NULL;
......@@ -117,6 +118,7 @@ void DialogsProvider::MLAppendDialog()
}
void DialogsProvider::openDialog( int i_dialog )
{
OpenDialog::getInstance( p_intf )->toggleVisible();
}
void DialogsProvider::doInteraction( intf_dialog_args_t *p_arg )
......
<ui version="4.0" >
<class>FileOpen</class>
<widget class="QWidget" name="FileOpen" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>624</width>
<height>579</height>
</rect>
</property>
<property name="windowTitle" >
<string>Dialog</string>
</property>
<widget class="QFrame" name="frame" >
<property name="geometry" >
<rect>
<x>10</x>
<y>410</y>
<width>601</width>
<height>121</height>
</rect>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="1" column="0" >
<widget class="QLabel" name="advancedLabel" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-style:italic;">_("Personnalize"):&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" >
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2" >
<widget class="QSpinBox" name="cacheSpinBox" />
</item>
<item row="0" column="4" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" >
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="cacheLabel" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-style:italic;">_("Caching"):&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="3" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>ms</string>
</property>
</widget>
</item>
<item row="1" column="2" colspan="3" >
<widget class="QLineEdit" name="advancedLineInput" />
</item>
</layout>
</widget>
<widget class="QPushButton" name="closeButton" >
<property name="geometry" >
<rect>
<x>520</x>
<y>540</y>
<width>91</width>
<height>29</height>
</rect>
</property>
<property name="text" >
<string>Close</string>
</property>
</widget>
<widget class="QPushButton" name="advancedButton" >
<property name="geometry" >
<rect>
<x>510</x>
<y>390</y>
<width>83</width>
<height>27</height>
</rect>
</property>
<property name="text" >
<string>More...</string>
</property>
</widget>
<widget class="QPushButton" name="cancelButton" >
<property name="geometry" >
<rect>
<x>400</x>
<y>540</y>
<width>101</width>
<height>29</height>
</rect>
</property>
<property name="text" >
<string>Cancel</string>
</property>
</widget>
<widget class="QTabWidget" name="Tab" >
<property name="geometry" >
<rect>
<x>10</x>
<y>10</y>
<width>601</width>
<height>371</height>
</rect>
</property>
<property name="currentIndex" >
<number>1</number>
</property>
<widget class="QWidget" name="fileTab" >
<attribute name="title" >
<string>_("File")</string>
</attribute>
<widget class="Line" name="line" >
<property name="geometry" >
<rect>
<x>140</x>
<y>100</y>
<width>320</width>
<height>16</height>
</rect>
</property>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
<widget class="QGroupBox" name="subGroupBox" >
<property name="geometry" >
<rect>
<x>10</x>
<y>110</y>
<width>581</width>
<height>111</height>
</rect>
</property>
<property name="title" >
<string>_("Subtitles")</string>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
<property name="checked" >
<bool>false</bool>
</property>
<widget class="QWidget" name="horizontalLayout_2" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>561</width>
<height>51</height>
</rect>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="subOpenLabel" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-style:italic;">_("Open") :&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" >
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QComboBox" name="subInput" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<size>
<width>15</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="subBrowseButton" >
<property name="text" >
<string>_("Browse")</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" native="1" name="horizontalLayout_4" >
<property name="geometry" >
<rect>
<x>20</x>
<y>60</y>
<width>571</width>
<height>41</height>
</rect>
</property>
<widget class="QWidget" name="layoutWidget" >
<property name="geometry" >
<rect>
<x>10</x>
<y>10</y>
<width>181</width>
<height>24</height>
</rect>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>0</number>
</property>
<item>
<widget class="QLabel" name="sizeSubLabel" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-style:italic;">_("Size") :&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QComboBox" name="sizeComboBox" >
<item>
<property name="text" >
<string>_("Very Small)</string>
</property>
</item>
<item>
<property name="text" >
<string>_("Small")</string>
</property>
</item>
<item>
<property name="text" >
<string>_("Normal")</string>
</property>
</item>
<item>
<property name="text" >
<string>_("Big")</string>
</property>
</item>
<item>
<property name="text" >
<string>_("Very Big")</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget" >
<property name="geometry" >
<rect>
<x>220</x>
<y>10</y>
<width>201</width>
<height>24</height>
</rect>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>0</number>
</property>
<item>
<widget class="QLabel" name="alignSubLabel" >
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-style:italic;">_("Alignment") :&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="buddy" >
<cstring>alignSubLabel</cstring>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>10</width>
<height>21</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QComboBox" name="alignSubComboBox" >
<item>
<property name="text" >
<string>_("Left")</string>
</property>
</item>
<item>
<property name="text" >
<string>_("Center")</string>
</property>
</item>
<item>
<property name="text" >
<string>_("Right)</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<widget class="QToolButton" name="optionsSubButton" >
<property name="geometry" >
<rect>
<x>470</x>
<y>10</y>
<width>81</width>
<height>26</height>
</rect>
</property>
<property name="text" >
<string>Options</string>
</property>
</widget>
</widget>
</widget>