Commit f681b223 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: implement previous button and make an introduction text to the sout...

Good ideas to improve the layout and the text are MORE than needed.
parent 2b00e2dd
...@@ -97,6 +97,11 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, QString inputMR ...@@ -97,6 +97,11 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, QString inputMR
/* UI stuff */ /* UI stuff */
ui.setupUi( this ); ui.setupUi( this );
ui.inputBox->setMRL( inputMRL ); ui.inputBox->setMRL( inputMRL );
ui.helpEdit->setPlainText( "This dialog will allow you to stream or convert "
"your media, locally, on your private network or on the "
"Internet.\n"
"You should start by checking that your input matches what you "
"want and go on with the \"Next\" button.\n" );
changeUDPandRTPmess( false ); changeUDPandRTPmess( false );
...@@ -154,6 +159,8 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, QString inputMR ...@@ -154,6 +159,8 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, QString inputMR
BUTTONACT( ui.nextButton, next() ); BUTTONACT( ui.nextButton, next() );
BUTTONACT( ui.nextButton2, next() ); BUTTONACT( ui.nextButton2, next() );
BUTTONACT( ui.prevButton, prev() );
BUTTONACT( ui.prevButton2, prev() );
} }
void SoutDialog::next() void SoutDialog::next()
...@@ -161,6 +168,12 @@ void SoutDialog::next() ...@@ -161,6 +168,12 @@ void SoutDialog::next()
ui.toolBox->setCurrentIndex( ui.toolBox->currentIndex() + 1 ); ui.toolBox->setCurrentIndex( ui.toolBox->currentIndex() + 1 );
} }
void SoutDialog::prev()
{
ui.toolBox->setCurrentIndex( ui.toolBox->currentIndex() - 1 );
}
void SoutDialog::fileBrowse() void SoutDialog::fileBrowse()
{ {
QString fileName = QFileDialog::getSaveFileName( this, qtr( "Save file..." ), QString fileName = QFileDialog::getSaveFileName( this, qtr( "Save file..." ),
......
...@@ -148,6 +148,7 @@ private slots: ...@@ -148,6 +148,7 @@ private slots:
void changeUDPandRTPmess( bool ); void changeUDPandRTPmess( bool );
void RTPtoggled( bool ); void RTPtoggled( bool );
void next(); void next();
void prev();
}; };
#endif #endif
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>715</width> <width>651</width>
<height>507</height> <height>532</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
...@@ -25,15 +25,74 @@ ...@@ -25,15 +25,74 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>697</width> <width>633</width>
<height>381</height> <height>414</height>
</rect> </rect>
</property> </property>
<attribute name="label"> <attribute name="label">
<string>_(&quot;Source&quot;)</string> <string>_(&quot;Source&quot;)</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0"> <item row="0" column="0" colspan="2">
<widget class="QPlainTextEdit" name="helpEdit">
<property name="enabled">
<bool>true</bool>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>150</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>220</red>
<green>220</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>220</red>
<green>220</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="SoutInputBox" name="inputBox"/>
</item>
<item row="2" column="0" colspan="2">
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
...@@ -41,12 +100,12 @@ ...@@ -41,12 +100,12 @@
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>581</width> <width>581</width>
<height>321</height> <height>10</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="2" column="0"> <item row="3" column="0">
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
...@@ -59,20 +118,13 @@ ...@@ -59,20 +118,13 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="2" column="1"> <item row="3" column="1">
<widget class="QPushButton" name="nextButton"> <widget class="QPushButton" name="nextButton">
<property name="text"> <property name="text">
<string>_(&quot;Next&quot;)</string> <string>_(&quot;Next&quot;)</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0" colspan="2">
<widget class="SoutInputBox" name="inputBox">
<property name="title">
<string>GroupBox</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="page_3"> <widget class="QWidget" name="page_3">
...@@ -80,15 +132,15 @@ ...@@ -80,15 +132,15 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>653</width> <width>649</width>
<height>367</height> <height>399</height>
</rect> </rect>
</property> </property>
<attribute name="label"> <attribute name="label">
<string>_(&quot;Destination&quot;)</string> <string>_(&quot;Destination&quot;)</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2"> <item row="0" column="0" colspan="3">
<layout class="QGridLayout" name="_3"> <layout class="QGridLayout" name="_3">
<item row="0" column="1" colspan="2"> <item row="0" column="1" colspan="2">
<widget class="QCheckBox" name="localOutput"> <widget class="QCheckBox" name="localOutput">
...@@ -486,6 +538,13 @@ ...@@ -486,6 +538,13 @@
</layout> </layout>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QPushButton" name="prevButton">
<property name="text">
<string>_(&quot;Previous&quot;)</string>
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="horizontalSpacer_2"> <spacer name="horizontalSpacer_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
...@@ -498,7 +557,7 @@ ...@@ -498,7 +557,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="1" column="1"> <item row="1" column="2">
<widget class="QPushButton" name="nextButton2"> <widget class="QPushButton" name="nextButton2">
<property name="text"> <property name="text">
<string>_(&quot;Next&quot;)</string> <string>_(&quot;Next&quot;)</string>
...@@ -512,99 +571,95 @@ ...@@ -512,99 +571,95 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>604</width> <width>633</width>
<height>310</height> <height>414</height>
</rect> </rect>
</property> </property>
<attribute name="label"> <attribute name="label">
<string>_(&quot;Transcoding&quot;)</string> <string>_(&quot;Transcoding&quot;)</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0"> <item row="0" column="0" colspan="2">
<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 row="1" column="0"> <item row="1" column="0" colspan="2">
<widget class="VLCProfileSelector" name="profileSelect" native="true"/> <widget class="VLCProfileSelector" name="profileSelect" native="true"/>
</item> </item>
<item row="2" column="0"> <item row="2" column="0" colspan="2">
<widget class="Line" name="line_2"> <widget class="Line" name="line_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_3"> <widget class="QGroupBox" name="groupBox_3">
<property name="title"> <property name="title">
<string>_(&quot;Miscellaneous&quot;)</string> <string>_(&quot;Miscellaneous&quot;)</string>
</property> </property>
<layout class="QHBoxLayout" name="_5"> <layout class="QGridLayout" name="gridLayout_4">
<item> <item row="0" column="0" colspan="3">
<layout class="QGridLayout" name="_6"> <widget class="QCheckBox" name="soutAll">
<item row="0" column="0"> <property name="text">
<widget class="QCheckBox" name="sap"> <string>_(&quot;Stream all elementary streams&quot;)</string>
<property name="text"> </property>
<string>_(&quot;SAP announce&quot;)</string> </widget>
</property> </item>
</widget> <item row="0" column="3" rowspan="2" colspan="2">
</item> <widget class="QCheckBox" name="soutKeep">
<item row="0" column="3"> <property name="text">
<widget class="QLabel" name="sapGroupLabel"> <string>_(&quot;Keep stream output open&quot;)</string>
<property name="text"> </property>
<string>_(&quot;Group name&quot;)</string> </widget>
</property> </item>
</widget> <item row="1" column="0" rowspan="2">
</item> <widget class="QCheckBox" name="sap">
<item row="0" column="4"> <property name="text">
<widget class="QLineEdit" name="sapGroup"/> <string>_(&quot;SAP announce&quot;)</string>
</item> </property>
<item row="1" column="4"> </widget>
<widget class="QSpinBox" name="ttl"> </item>
<property name="alignment"> <item row="1" column="1" rowspan="2" colspan="2">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <widget class="QLineEdit" name="sapName"/>
</property> </item>
<property name="minimum"> <item row="2" column="3">
<number>1</number> <widget class="QLabel" name="sapGroupLabel">
</property> <property name="text">
<property name="maximum"> <string>_(&quot;Group name&quot;)</string>
<number>255</number> </property>
</property> </widget>
</widget> </item>
</item> <item row="2" column="4">
<item row="0" column="1" colspan="2"> <widget class="QLineEdit" name="sapGroup"/>
<widget class="QLineEdit" name="sapName"/> </item>
</item> <item row="3" column="0" colspan="2">
<item row="1" column="0" colspan="2"> <widget class="QLabel" name="ttlLabel">
<widget class="QCheckBox" name="soutAll"> <property name="text">
<property name="text"> <string>_(&quot;Time-To-Live (TTL)&quot;)</string>
<string>_(&quot;Stream all elementary streams&quot;)</string> </property>
</property> </widget>
</widget> </item>
</item> <item row="3" column="2">
<item row="1" column="3"> <widget class="QSpinBox" name="ttl">
<widget class="QLabel" name="ttlLabel"> <property name="alignment">
<property name="text"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<string>_(&quot;Time-To-Live (TTL)&quot;)</string> </property>
</property> <property name="minimum">
</widget> <number>1</number>
</item> </property>
<item row="2" column="0" colspan="2"> <property name="maximum">
<widget class="QCheckBox" name="soutKeep"> <number>255</number>
<property name="text"> </property>
<string>_(&quot;Keep stream output open&quot;)</string> </widget>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="4" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_4"> <widget class="QGroupBox" name="groupBox_4">
<property name="title"> <property name="title">
<string>_(&quot;Generated stream output string&quot;)</string> <string>_(&quot;Generated stream output string&quot;)</string>
...@@ -620,6 +675,26 @@ ...@@ -620,6 +675,26 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="5" column="0">
<widget class="QPushButton" name="prevButton2">
<property name="text">
<string>_(&quot;Previous&quot;)</string>
</property>
</widget>
</item>
<item row="5" column="1">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>507</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
......
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