Commit 240dc04a authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Rewrite of the VLM Dialog. It features a list on the left of the VLM...

Qt4 - Rewrite of the VLM Dialog. It features a list on the left of the VLM object, and a right pane to see them in details. Creation and modification is doable. This is not yet a VCR, but it could be :D
The code is way not finished and uncleaned, but feel free to improve.
Only Brodcast elements have a start of code.


parent accc4e29
This diff is collapsed.
/*****************************************************************************
* vlm.hpp : Stream output dialog ( old-style, ala WX )
* vlm.hpp : VLM Management
****************************************************************************
* Copyright ( C ) 2006 the VideoLAN team
* $Id: vlm.hpp 21875 2007-09-08 16:01:33Z jb $
......@@ -32,8 +32,8 @@
enum{
QVLM_Broadcast,
QVLM_VOD,
QVLM_Schedule
QVLM_Schedule,
QVLM_VOD
};
class QComboBox;
......@@ -50,6 +50,7 @@ class QHBoxLayout;
class QDateEdit;
class QTimeEdit;
class QSpinBox;
class VLMObject;
class VLMDialog : public QVLCFrame
{
......@@ -68,27 +69,49 @@ private:
static VLMDialog *instance;
Ui::Vlm ui;
QGridLayout *vlmItemLayout;
QList<VLMObject *> vlmItems;
int currentIndex;
QVBoxLayout *vlmItemLayout;
QWidget *vlmItemWidget;
QComboBox *mediatype;
QCheckBox *bcastenable, *vodenable, *scheenable;
QLineEdit *bcastnameledit, *vodnameledit, *schenameledit, *bcastinputledit, *vodinputledit, *scheinputledit;
QLineEdit *bcastoutputledit, *vodoutputledit, *scheoutputledit;
QTimeEdit *time;
QDateEdit *date;
QSpinBox *scherepeatnumber;
QToolButton *bcastinputtbutton, *vodinputtbutton, *scheinputtbutton;
QToolButton *bcastoutputtbutton, *vodoutputtbutton, *scheoutputtbutton;
QPushButton *bcastplay, *bcastpause, *bcaststop;
QPushButton *bcastadd, *vodadd, *scheadd, *bcastremove, *vodremove, *scheremove;
bool isNameGenuine( QString );
public slots:
void removeVLMItem( VLMObject * );
void startModifyVLMItem( VLMObject * );
private slots:
void finish();
void cancel();
void addVLMItem();
void removeVLMItem();
void clearVLMItem();
void clearWidgets();
void saveModifications();
void showScheduleWidget( int );
void selectVLMItem( int );
};
class VLMObject : public QGroupBox
{
Q_OBJECT
friend class VLMDialog;
public:
VLMObject( int type, QString name, QString input, QString output, bool _enable, VLMDialog *parent );
private:
QString name;
QString input;
QString output;
bool b_looped;
bool b_enabled;
VLMDialog *parent;
protected:
virtual void enterEvent( QEvent * );
private slots:
void modify();
void stop();
void del();
void togglePlayPause();
void toggleLoop();
};
#endif
......@@ -8,8 +8,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>588</width>
<height>393</height>
<width>738</width>
<height>598</height>
</rect>
</property>
<property name="sizePolicy" >
......@@ -22,7 +22,7 @@
<string>_("VLM configurator")</string>
</property>
<layout class="QGridLayout" >
<item rowspan="3" row="0" column="0" >
<item rowspan="5" row="0" column="0" >
<widget class="QGroupBox" name="mediaConfBox" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
......@@ -31,10 +31,10 @@
</sizepolicy>
</property>
<property name="title" >
<string>_("Media Creation")</string>
<string>_("Media Manager Edition")</string>
</property>
<layout class="QVBoxLayout" >
<item>
<layout class="QGridLayout" >
<item row="0" column="0" colspan="3" >
<widget class="QComboBox" name="mediaType" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
......@@ -44,41 +44,115 @@
</property>
</widget>
</item>
<item>
<item row="1" column="0" colspan="3" >
<widget class="Line" name="line" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QStackedWidget" name="mediaStacked" >
<property name="currentIndex" >
<number>2</number>
<item row="2" column="0" >
<widget class="QLabel" name="nameLabel" >
<property name="text" >
<string>_("Name:")</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="nameLedit" />
</item>
<item row="2" column="2" >
<widget class="QCheckBox" name="enableCheck" >
<property name="text" >
<string>_("Enable")</string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="inputLabel" >
<property name="text" >
<string>_("Input:")</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLineEdit" name="inputLedit" />
</item>
<item row="3" column="2" >
<widget class="QPushButton" name="inputButton" >
<property name="text" >
<string>_("Select Input")</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="outputLabel" >
<property name="text" >
<string>_("Output:")</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QLineEdit" name="outputLedit" />
</item>
<item row="4" column="2" >
<widget class="QPushButton" name="outputButton" >
<property name="text" >
<string>_("Select Output")</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="3" >
<widget class="QGroupBox" name="schedBox" >
<property name="title" >
<string>_("Time Control")</string>
</property>
<widget class="QWidget" name="pBcast" />
<widget class="QWidget" name="pVod" />
<widget class="QWidget" name="pSched" />
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1" >
<widget class="QPushButton" name="addButton" >
<property name="text" >
<string>_("Add")</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<item row="2" column="1" >
<widget class="QPushButton" name="clearButton" >
<property name="text" >
<string>_("Clear")</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<item row="3" column="1" >
<widget class="QPushButton" name="saveButton" >
<property name="text" >
<string>_("Save")</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
......@@ -86,12 +160,12 @@
<property name="sizeHint" >
<size>
<width>80</width>
<height>20</height>
<height>81</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0" colspan="2" >
<item row="5" column="0" colspan="2" >
<widget class="QGroupBox" name="mediaBox" >
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
......@@ -100,12 +174,52 @@
</sizepolicy>
</property>
<property name="title" >
<string>_("Media Configuration")</string>
<string>_("Media Manager List")</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QListWidget" name="vlmListItem" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="Line" name="line_2" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QScrollArea" native="1" name="vlmItemScroll" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>300</width>
<height>0</height>
</size>
</property>
<layout class="QHBoxLayout" />
</widget>
</item>
<item row="4" column="0" colspan="2" >
</layout>
</widget>
</item>
<item row="6" column="0" colspan="2" >
<widget class="QDialogButtonBox" name="buttonBox" >
<property name="standardButtons" >
<set>QDialogButtonBox::NoButton</set>
......@@ -114,6 +228,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QScrollArea</class>
<extends>QWidget</extends>
<header>qscrollarea.h</header>
</customwidget>
</customwidgets>
<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