#include <iostream>
#include <QString>
#include <QFileDialog>
+#include <QComboBox>
+#include <QVBoxLayout>
+#include <QStackedWidget>
+#include <QLabel>
+#include <QWidget>
+#include <QGridLayout>
+#include <QLineEdit>
+#include <QCheckBox>
+#include <QToolButton>
+#include <QGroupBox>
+#include <QPushButton>
+#include <QHBoxLayout>
VLMDialog *VLMDialog::instance = NULL;
{
setWindowTitle( qtr( "VLM front-end" ) );
- /* UI stuff */
+ // UI stuff
ui.setupUi( this );
+ mediatype = new QComboBox(ui.groupBox);
+ layout = new QVBoxLayout(ui.groupBox);
+ layout->addWidget(mediatype);
+
+#define ADDMEDIATYPES(type) mediatype->addItem(type);
+
+ ADDMEDIATYPES("Broadcast");
+ ADDMEDIATYPES("Video On Demand (VOD)");
+ ADDMEDIATYPES("Schedule");
+
+ makeBcastPage();
+ makeVODPage();
+ makeSchedulePage();
+
+ slayout = new QStackedWidget(ui.groupBox);
+ slayout->addWidget(pBcast);
+ slayout->addWidget(pVod);
+ slayout->addWidget(pSchedule);
+
+ layout->addWidget(slayout);
+
+ connect(mediatype,SIGNAL(currentIndexChanged(int)),slayout,SLOT(setCurrentIndex(int)));
+
}
VLMDialog::~VLMDialog(){}
-void VLMDialog::close(){
+void VLMDialog::close()
+{
close();
}
+
+void VLMDialog::makeBcastPage()
+{
+ pBcast = new QWidget(ui.groupBox);
+ bcastlayout = new QGridLayout(pBcast);
+ bcastname = new QLabel(tr("Name :"),pBcast);
+ bcastnameledit = new QLineEdit(pBcast);
+ bcastenable = new QCheckBox(tr("Enable"),pBcast);
+ bcastinput = new QLabel(tr("Input :"),pBcast);
+ bcastinputledit = new QLineEdit(pBcast);
+ bcastinputtbutton = new QToolButton(pBcast);
+ bcastoutput = new QLabel(tr("Output :"),pBcast);
+ bcastoutputledit = new QLineEdit(pBcast);
+ bcastoutputtbutton = new QToolButton(pBcast);
+ bcastcontrol = new QGroupBox(tr("Controls"),pBcast);
+ bcastgbox = new QHBoxLayout(bcastcontrol);
+ bcastplay = new QPushButton(tr("Play"),bcastcontrol);
+ bcastpause = new QPushButton(tr("Pause"),bcastcontrol);
+ bcaststop = new QPushButton(tr("Stop"),bcastcontrol);
+ bcastadd = new QPushButton(tr("Add"),pBcast);
+ bcastremove = new QPushButton(tr("Remove"),pBcast);
+
+// Adding all widgets in the QGridLayout
+ bcastgbox->addWidget(bcastplay);
+ bcastgbox->addWidget(bcastpause);
+ bcastgbox->addWidget(bcaststop);
+ bcastlayout->addWidget(bcastname,0,0);
+ bcastlayout->addWidget(bcastnameledit,0,1);
+ bcastlayout->addWidget(bcastenable,0,2);
+ bcastlayout->addWidget(bcastinput,1,0);
+ bcastlayout->addWidget(bcastinputledit,1,1);
+ bcastlayout->addWidget(bcastinputtbutton,1,2);
+ bcastlayout->addWidget(bcastoutput,2,0);
+ bcastlayout->addWidget(bcastoutputledit,2,1);
+ bcastlayout->addWidget(bcastoutputtbutton,2,2);
+ bcastlayout->addWidget(bcastcontrol,3,0,1,3);
+ bcastlayout->addWidget(bcastadd,4,1);
+ bcastlayout->addWidget(bcastremove,4,2);
+}
+
+void VLMDialog::makeVODPage()
+{
+ pVod = new QWidget(ui.groupBox);
+ vodlayout = new QGridLayout(pVod);
+ vodname = new QLabel(tr("Name :"),pVod);
+ vodnameledit = new QLineEdit(pVod);
+ vodenable = new QCheckBox(tr("Enable"),pVod);
+ vodinput = new QLabel(tr("Input :"),pVod);
+ vodinputledit = new QLineEdit(pVod);
+ vodinputtbutton = new QToolButton(pVod);
+ vodoutput = new QLabel(tr("Output :"),pVod);
+ vodoutputledit = new QLineEdit(pVod);
+ vodoutputtbutton = new QToolButton(pVod);
+ vodadd = new QPushButton(tr("Add"),pVod);
+ vodremove = new QPushButton(tr("Remove"),pVod);
+
+// Adding all widgets in the QGridLayout
+ vodlayout->addWidget(vodname,0,0);
+ vodlayout->addWidget(vodnameledit,0,1);
+ vodlayout->addWidget(vodenable,0,2);
+ vodlayout->addWidget(vodinput,1,0);
+ vodlayout->addWidget(vodinputledit,1,1);
+ vodlayout->addWidget(vodinputtbutton,1,2);
+ vodlayout->addWidget(vodoutput,2,0);
+ vodlayout->addWidget(vodoutputledit,2,1);
+ vodlayout->addWidget(vodoutputtbutton,2,2);
+ vodlayout->addWidget(vodadd,3,1);
+ vodlayout->addWidget(vodremove,3,2);
+}
+
+void VLMDialog::makeSchedulePage()
+{
+ pSchedule = new QWidget(ui.groupBox);
+ schelayout = new QGridLayout(pSchedule);
+ schename = new QLabel(tr("Name :"),pSchedule);
+ schenameledit = new QLineEdit(pSchedule);
+ scheenable = new QCheckBox(tr("Enable"),pSchedule);
+ scheinput = new QLabel(tr("Input :"),pSchedule);
+ scheinputledit = new QLineEdit(pSchedule);
+ scheinputtbutton = new QToolButton(pSchedule);
+ scheoutput = new QLabel(tr("Output :"),pSchedule);
+ scheoutputledit = new QLineEdit(pSchedule);
+ scheoutputtbutton = new QToolButton(pSchedule);
+ schecontrol = new QGroupBox(tr("Time Control"),pSchedule);
+ scheadd = new QPushButton(tr("Add"),pSchedule);
+ scheremove = new QPushButton(tr("Remove"),pSchedule);
+
+ //scheadd->setMaximumWidth(30);
+
+// Adding all widgets in the QGridLayout
+ schelayout->addWidget(schename,0,0);
+ schelayout->addWidget(schenameledit,0,1);
+ schelayout->addWidget(scheenable,0,2);
+ schelayout->addWidget(scheinput,1,0);
+ schelayout->addWidget(scheinputledit,1,1);
+ schelayout->addWidget(scheinputtbutton,1,2);
+ schelayout->addWidget(scheoutput,2,0);
+ schelayout->addWidget(scheoutputledit,2,1);
+ schelayout->addWidget(scheoutputtbutton,2,2);
+ schelayout->addWidget(schecontrol,3,0,1,3);
+ schelayout->addWidget(scheadd,4,1);
+ schelayout->addWidget(scheremove,4,2);
+}
<property name="title" >
<string>Media configuration</string>
</property>
- <widget class="QStackedWidget" name="typeVLM" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>20</y>
- <width>601</width>
- <height>331</height>
- </rect>
- </property>
- <property name="currentIndex" >
- <number>1</number>
- </property>
- <widget class="QWidget" name="page" >
- <property name="windowTitle" >
- <string>Broadcast</string>
- </property>
- <widget class="QWidget" name="gridLayout_3" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>581</width>
- <height>271</height>
- </rect>
- </property>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>4</number>
- </property>
- <item row="5" column="4" >
- <widget class="QPushButton" name="pushButton_6" >
- <property name="text" >
- <string>Cancel</string>
- </property>
- </widget>
- </item>
- <item row="2" column="4" >
- <widget class="QToolButton" name="BcastOutputQToolButton" >
- <property name="text" >
- <string>...</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2" >
- <widget class="QLineEdit" name="BcastNameLEdit" />
- </item>
- <item row="2" column="5" >
- <widget class="QCheckBox" name="BcastspecOut" >
- <property name="text" >
- <string>specify</string>
- </property>
- </widget>
- </item>
- <item row="1" column="3" >
- <widget class="QLineEdit" name="BcastInputLEdit" />
- </item>
- <item row="1" column="1" >
- <widget class="QLabel" name="BcastInputLabel" >
- <property name="text" >
- <string>Input :</string>
- </property>
- </widget>
- </item>
- <item row="5" column="3" >
- <widget class="QPushButton" name="pushButton_5" >
- <property name="text" >
- <string>Add</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QLabel" name="BcastOutputLabel" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>Output :</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3" >
- <widget class="QCheckBox" name="BcastEnable" >
- <property name="text" >
- <string>Enable</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QLabel" name="BcastNameLabel" >
- <property name="text" >
- <string>Name :</string>
- </property>
- </widget>
- </item>
- <item row="2" column="3" >
- <widget class="QLineEdit" name="BcastOutputLEdit" />
- </item>
- <item row="1" column="4" >
- <widget class="QToolButton" name="BcastInputQToolButton" >
- <property name="text" >
- <string>...</string>
- </property>
- </widget>
- </item>
- <item row="3" column="3" >
- <widget class="QGroupBox" name="groupBox_2" >
- <property name="title" >
- <string>Controls</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- <widget class="QWidget" name="page_2" >
- <property name="windowTitle" >
- <string>Video On Demand</string>
- </property>
- <widget class="QWidget" name="gridLayout_2" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>581</width>
- <height>271</height>
- </rect>
- </property>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>4</number>
- </property>
- <item row="1" column="1" >
- <widget class="QLabel" name="VODInputLabel" >
- <property name="text" >
- <string>Input :</string>
- </property>
- </widget>
- </item>
- <item row="4" column="3" >
- <widget class="QPushButton" name="pushButton_3" >
- <property name="text" >
- <string>Add</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QLabel" name="VODOutputLabel" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>Output :</string>
- </property>
- </widget>
- </item>
- <item row="2" column="4" >
- <widget class="QToolButton" name="VODOutputQToolButton" >
- <property name="text" >
- <string>...</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QLabel" name="VODNameLabel" >
- <property name="text" >
- <string>Name :</string>
- </property>
- </widget>
- </item>
- <item row="2" column="3" >
- <widget class="QLineEdit" name="VODOutputLEdit" />
- </item>
- <item row="4" column="4" >
- <widget class="QPushButton" name="pushButton_4" >
- <property name="text" >
- <string>Cancel</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2" >
- <widget class="QLineEdit" name="VODNameLEdit" />
- </item>
- <item row="1" column="4" >
- <widget class="QToolButton" name="VODInputQToolButton" >
- <property name="text" >
- <string>...</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3" >
- <widget class="QCheckBox" name="VODenable" >
- <property name="text" >
- <string>Enable</string>
- </property>
- </widget>
- </item>
- <item row="1" column="3" >
- <widget class="QLineEdit" name="VODInputLEdit" />
- </item>
- <item row="2" column="5" >
- <widget class="QCheckBox" name="VODspecOut" >
- <property name="text" >
- <string>specify</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- <widget class="QWidget" name="page_3" >
- <property name="windowTitle" >
- <string>Schedule</string>
- </property>
- <widget class="QWidget" name="gridLayout" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>581</width>
- <height>271</height>
- </rect>
- </property>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>4</number>
- </property>
- <item row="2" column="4" >
- <widget class="QToolButton" name="toolButton_2" >
- <property name="text" >
- <string>...</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QLabel" name="label_2" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>Output :</string>
- </property>
- </widget>
- </item>
- <item row="1" column="4" >
- <widget class="QToolButton" name="toolButton" >
- <property name="text" >
- <string>...</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2" >
- <widget class="QLineEdit" name="lineEdit_3" />
- </item>
- <item row="4" column="3" >
- <widget class="QPushButton" name="pushButton" >
- <property name="text" >
- <string>Add</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QLabel" name="label_3" >
- <property name="text" >
- <string>Name :</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>Input :</string>
- </property>
- </widget>
- </item>
- <item row="2" column="3" >
- <widget class="QLineEdit" name="lineEdit_2" />
- </item>
- <item row="4" column="4" >
- <widget class="QPushButton" name="pushButton_2" >
- <property name="text" >
- <string>Cancel</string>
- </property>
- </widget>
- </item>
- <item row="1" column="3" >
- <widget class="QLineEdit" name="lineEdit" />
- </item>
- <item row="0" column="3" >
- <widget class="QCheckBox" name="checkBox" >
- <property name="text" >
- <string>Enable</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- </widget>
</widget>
<widget class="QTableWidget" name="mediasDB" >
<property name="windowModality" >
<property name="horizontalScrollBarPolicy" >
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
+ <property name="selectionMode" >
+ <enum>QAbstractItemView::MultiSelection</enum>
+ </property>
<property name="showGrid" >
<bool>true</bool>
</property>
</widget>
</widget>
<resources/>
- <connections>
- <connection>
- <sender>BcastspecOut</sender>
- <signal>clicked(bool)</signal>
- <receiver>BcastOutputLabel</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>565</x>
- <y>139</y>
- </hint>
- <hint type="destinationlabel" >
- <x>65</x>
- <y>139</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>BcastspecOut</sender>
- <signal>clicked(bool)</signal>
- <receiver>BcastOutputLEdit</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>565</x>
- <y>139</y>
- </hint>
- <hint type="destinationlabel" >
- <x>362</x>
- <y>139</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>BcastspecOut</sender>
- <signal>clicked(bool)</signal>
- <receiver>BcastOutputQToolButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>565</x>
- <y>139</y>
- </hint>
- <hint type="destinationlabel" >
- <x>468</x>
- <y>139</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>VODspecOut</sender>
- <signal>clicked(bool)</signal>
- <receiver>VODOutputLabel</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>565</x>
- <y>217</y>
- </hint>
- <hint type="destinationlabel" >
- <x>65</x>
- <y>217</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>VODspecOut</sender>
- <signal>clicked(bool)</signal>
- <receiver>VODOutputQToolButton</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>565</x>
- <y>217</y>
- </hint>
- <hint type="destinationlabel" >
- <x>468</x>
- <y>217</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>VODspecOut</sender>
- <signal>clicked(bool)</signal>
- <receiver>VODOutputLEdit</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>565</x>
- <y>217</y>
- </hint>
- <hint type="destinationlabel" >
- <x>362</x>
- <y>217</y>
- </hint>
- </hints>
- </connection>
- </connections>
+ <connections/>
</ui>