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 * Copyright ( C ) 2006 the VideoLAN team
* $Id: vlm.hpp 21875 2007-09-08 16:01:33Z jb $ * $Id: vlm.hpp 21875 2007-09-08 16:01:33Z jb $
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
enum{ enum{
QVLM_Broadcast, QVLM_Broadcast,
QVLM_VOD, QVLM_Schedule,
QVLM_Schedule QVLM_VOD
}; };
class QComboBox; class QComboBox;
...@@ -50,6 +50,7 @@ class QHBoxLayout; ...@@ -50,6 +50,7 @@ class QHBoxLayout;
class QDateEdit; class QDateEdit;
class QTimeEdit; class QTimeEdit;
class QSpinBox; class QSpinBox;
class VLMObject;
class VLMDialog : public QVLCFrame class VLMDialog : public QVLCFrame
{ {
...@@ -67,28 +68,50 @@ private: ...@@ -67,28 +68,50 @@ private:
VLMDialog( intf_thread_t * ); VLMDialog( intf_thread_t * );
static VLMDialog *instance; static VLMDialog *instance;
Ui::Vlm ui; Ui::Vlm ui;
QGridLayout *vlmItemLayout;
QList<VLMObject *> vlmItems;
int currentIndex;
QVBoxLayout *vlmItemLayout;
QWidget *vlmItemWidget;
QComboBox *mediatype; QComboBox *mediatype;
QCheckBox *bcastenable, *vodenable, *scheenable;
QLineEdit *bcastnameledit, *vodnameledit, *schenameledit, *bcastinputledit, *vodinputledit, *scheinputledit;
QLineEdit *bcastoutputledit, *vodoutputledit, *scheoutputledit;
QTimeEdit *time; QTimeEdit *time;
QDateEdit *date; QDateEdit *date;
QSpinBox *scherepeatnumber; QSpinBox *scherepeatnumber;
bool isNameGenuine( QString );
QToolButton *bcastinputtbutton, *vodinputtbutton, *scheinputtbutton; public slots:
QToolButton *bcastoutputtbutton, *vodoutputtbutton, *scheoutputtbutton; void removeVLMItem( VLMObject * );
QPushButton *bcastplay, *bcastpause, *bcaststop; void startModifyVLMItem( VLMObject * );
QPushButton *bcastadd, *vodadd, *scheadd, *bcastremove, *vodremove, *scheremove;
private slots: private slots:
void finish();
void cancel();
void addVLMItem(); void addVLMItem();
void removeVLMItem(); void clearWidgets();
void clearVLMItem(); 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 #endif
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>588</width> <width>738</width>
<height>393</height> <height>598</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy" > <property name="sizePolicy" >
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<string>_("VLM configurator")</string> <string>_("VLM configurator")</string>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout" >
<item rowspan="3" row="0" column="0" > <item rowspan="5" row="0" column="0" >
<widget class="QGroupBox" name="mediaConfBox" > <widget class="QGroupBox" name="mediaConfBox" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" > <sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="title" > <property name="title" >
<string>_("Media Creation")</string> <string>_("Media Manager Edition")</string>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QGridLayout" >
<item> <item row="0" column="0" colspan="3" >
<widget class="QComboBox" name="mediaType" > <widget class="QComboBox" name="mediaType" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" > <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
...@@ -44,41 +44,115 @@ ...@@ -44,41 +44,115 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="0" colspan="3" >
<widget class="Line" name="line" > <widget class="Line" name="line" >
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="0" >
<widget class="QStackedWidget" name="mediaStacked" > <widget class="QLabel" name="nameLabel" >
<property name="currentIndex" > <property name="text" >
<number>2</number> <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> </property>
<widget class="QWidget" name="pBcast" />
<widget class="QWidget" name="pVod" />
<widget class="QWidget" name="pSched" />
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="0" column="1" > <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" > <widget class="QPushButton" name="addButton" >
<property name="text" > <property name="text" >
<string>_("Add")</string> <string>_("Add")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" > <item row="2" column="1" >
<widget class="QPushButton" name="clearButton" > <widget class="QPushButton" name="clearButton" >
<property name="text" > <property name="text" >
<string>_("Clear")</string> <string>_("Clear")</string>
</property> </property>
</widget> </widget>
</item> </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> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
...@@ -86,12 +160,12 @@ ...@@ -86,12 +160,12 @@
<property name="sizeHint" > <property name="sizeHint" >
<size> <size>
<width>80</width> <width>80</width>
<height>20</height> <height>81</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="3" column="0" colspan="2" > <item row="5" column="0" colspan="2" >
<widget class="QGroupBox" name="mediaBox" > <widget class="QGroupBox" name="mediaBox" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" > <sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
...@@ -100,12 +174,52 @@ ...@@ -100,12 +174,52 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="title" > <property name="title" >
<string>_("Media Configuration")</string> <string>_("Media Manager List")</string>
</property> </property>
<layout class="QHBoxLayout" /> <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>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item row="4" column="0" colspan="2" > <item row="6" column="0" colspan="2" >
<widget class="QDialogButtonBox" name="buttonBox" > <widget class="QDialogButtonBox" name="buttonBox" >
<property name="standardButtons" > <property name="standardButtons" >
<set>QDialogButtonBox::NoButton</set> <set>QDialogButtonBox::NoButton</set>
...@@ -114,6 +228,13 @@ ...@@ -114,6 +228,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>QScrollArea</class>
<extends>QWidget</extends>
<header>qscrollarea.h</header>
</customwidget>
</customwidgets>
<resources/> <resources/>
<connections/> <connections/>
</ui> </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