Commit b3340433 authored by Clément Stenac's avatar Clément Stenac

Skeleton for open

parent 5bd77e4b
......@@ -11,7 +11,7 @@
AUTOMAKE_OPTIONS = subdir-objects
TOUI = ui/input_stats ui/main_interface
TOUI = ui/input_stats ui/main_interface ui/file_open
UIH = $(TOUI:%=%.h)
TOMOC = main_interface \
......@@ -23,6 +23,7 @@ TOMOC = main_interface \
components/infopanels \
components/preferences_widgets \
components/preferences \
components/open \
util/input_slider
MOCCPP = $(TOMOC:%=%.moc.cpp)
......@@ -36,6 +37,7 @@ nodist_SOURCES_qt4 = \
components/infopanels.moc.cpp \
components/preferences_widgets.moc.cpp \
components/preferences.moc.cpp \
components/open.moc.cpp \
util/input_slider.moc.cpp
if ENABLE_QT4
......@@ -65,6 +67,7 @@ SOURCES_qt4 = qt4.cpp \
components/infopanels.cpp \
components/preferences_widgets.cpp \
components/preferences.cpp \
components/open.cpp \
util/input_slider.cpp
$(NULL)
......@@ -79,6 +82,7 @@ EXTRA_DIST += \
components/infopanels.hpp \
components/preferences_widgets.hpp \
components/preferences.hpp \
components/open.hpp \
util/input_slider.hpp \
ui/input_stats.ui \
pixmaps/advanced.xpm \
......
/*****************************************************************************
* open.cpp : Panels for the open dialogs
****************************************************************************
* Copyright (C) 2000-2005 the VideoLAN team
* $Id: wxwidgets.cpp 15731 2006-05-25 14:43:53Z zorglub $
*
* Authors: Clément Stenac <zorglub@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 "components/open.hpp"
/**************************************************************************
* File open
**************************************************************************/
FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
OpenPanel( _parent, _p_intf )
{
ui.setupUi( this );
}
FileOpenPanel::~FileOpenPanel()
{}
QString FileOpenPanel::getUpdatedMRL()
{
return ui.fileInput->text();
}
/**************************************************************************
* Net open
**************************************************************************/
#if 0
NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
OpenPanel( _parent, _p_intf )
{
ui.setupUi( this );
}
NetOpenPanel::~NetOpenPanel()
{}
QString NetOpenPanel::getUpdatedMRL( )
{
}
void NetOpenPanel::sendUpdate()
{
QString *mrl = new QString();
QString *cache = new QString();
getUpdatedMRL( mrl, cache );,
emit dataUpdated( mrl, cache );
}
#endif
/*****************************************************************************
* open.hpp : Panels for the open dialogs
****************************************************************************
* Copyright (C) 2000-2005 the VideoLAN team
* $Id: wxwidgets.cpp 15731 2006-05-25 14:43:53Z zorglub $
*
* Authors: Clément Stenac <zorglub@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 _OPENPANELS_H_
#define _OPENPANELS_H_
#include <vlc/vlc.h>
#include <QWidget>
#include <QString>
#include "ui/file_open.h"
class OpenPanel: public QWidget
{
Q_OBJECT;
public:
OpenPanel( QWidget *p, intf_thread_t *_p_intf ) : QWidget( p )
{
p_intf = _p_intf;
}
virtual ~OpenPanel();
virtual QString getUpdatedMRL() = 0;
private:
intf_thread_t *p_intf;
public slots:
virtual void sendUpdate() = 0;
signals:
virtual void dataUpdated( QString, QString ) = 0;
};
class FileOpenPanel: public OpenPanel
{
Q_OBJECT;
public:
FileOpenPanel( QWidget *, intf_thread_t * );
virtual ~FileOpenPanel();
virtual QString getUpdatedMRL();
private:
Ui::FileOpen ui;
public slots:
virtual void sendUpdate() ;
signals:
virtual void dataUpdated( QString, QString ) ;
};
#endif
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>FileOpen</class>
<widget class="QWidget" name="FileOpen" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>501</width>
<height>298</height>
</rect>
</property>
<property name="windowTitle" >
<string>Form</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label" >
<property name="text" >
<string>File</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="fileInput" />
</item>
<item>
<widget class="QPushButton" name="browseButton" >
<property name="text" >
<string>Browse</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Subtitles file</string>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>File</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="subFileInput" />
</item>
<item>
<widget class="QPushButton" name="subbrowseButon" >
<property name="text" >
<string>Browse</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>Advanced options</string>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QGridLayout" >
<property name="margin" >
<number>5</number>
</property>
<property name="spacing" >
<number>8</number>
</property>
<item row="1" column="0" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<string>FPS</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QComboBox" name="sizeCombo" />
</item>
<item row="0" column="3" >
<widget class="QComboBox" name="justCombo" />
</item>
<item row="1" column="2" >
<widget class="QLabel" name="label_6" >
<property name="text" >
<string>Delay</string>
</property>
</widget>
</item>
<item row="1" column="3" >
<widget class="QDoubleSpinBox" name="delaySpin" />
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Font size</string>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Justification</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QDoubleSpinBox" name="fpsSpin" />
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_7" >
<property name="text" >
<string>Encoding</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2" >
<widget class="QComboBox" name="comboBox" />
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<resources/>
<connections/>
</ui>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment