Commit 7b4315f4 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Open Disc Dialog, finish the disc/track-sub/audio handling. Hide,...

Qt4 - Open Disc Dialog, finish the disc/track-sub/audio handling. Hide, rename, show correctly the buttons. Some other ui fixes.
parent ba517150
......@@ -240,14 +240,16 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
{
ui.setupUi( this );
CONNECT( ui.deviceCombo, editTextChanged(QString ), this, updateMRL());
BUTTONACT( ui.dvdRadioButton, updateMRL());
BUTTONACT( ui.vcdRadioButton, updateMRL());
BUTTONACT( ui.audioCDRadioButton, updateMRL());
BUTTONACT( ui.dvdsimple, updateMRL());
BUTTONACT( ui.dvdRadioButton, updateButtons());
BUTTONACT( ui.vcdRadioButton, updateButtons());
BUTTONACT( ui.audioCDRadioButton, updateButtons());
BUTTONACT( ui.dvdsimple, updateButtons());
CONNECT( ui.deviceCombo, editTextChanged(QString ), this, updateMRL());
CONNECT( ui.titleSpin, valueChanged(int), this, updateMRL());
CONNECT( ui.chapterSpin, valueChanged(int), this, updateMRL());
CONNECT( ui.audioSpin, valueChanged(int), this, updateMRL());
CONNECT( ui.subtitlesSpin, valueChanged(int), this, updateMRL());
}
DiscOpenPanel::~DiscOpenPanel()
......@@ -259,6 +261,34 @@ void DiscOpenPanel::clear()
ui.chapterSpin->setValue(0);
}
void DiscOpenPanel::updateButtons()
{
if ( ui.dvdRadioButton->isChecked() )
{
ui.titleLabel->setText( qtr("Title") );
ui.chapterLabel->show();
ui.chapterSpin->show();
ui.diskOptionBox_2->show();
}
else if ( ui.vcdRadioButton->isChecked() )
{
ui.titleLabel->setText( qtr("Entry") );
ui.chapterLabel->hide();
ui.chapterSpin->hide();
ui.diskOptionBox_2->show();
}
else
{
ui.titleLabel->setText( qtr("Track") );
ui.chapterLabel->hide();
ui.chapterSpin->hide();
ui.diskOptionBox_2->hide();
}
updateMRL();
}
void DiscOpenPanel::updateMRL()
{
QString mrl = "";
......@@ -290,6 +320,20 @@ void DiscOpenPanel::updateMRL()
/* CDDA */
} else {
mrl = "cdda://" + ui.deviceCombo->currentText();
if( ui.titleSpin->value() > 0 ) {
QString("@%1").arg(ui.titleSpin->value());
}
}
if ( ui.dvdRadioButton->isChecked() || ui.vcdRadioButton->isChecked() )
{
if ( ui.audioSpin->value() >= 0 ) {
mrl += " :audio-track=" + QString("%1").arg(ui.audioSpin->value());
}
if ( ui.subtitlesSpin->value() >= 0 ) {
mrl += " :sub-track=" +
QString("%1").arg(ui.subtitlesSpin->value());
}
}
emit mrlUpdated(mrl);
......
......@@ -115,6 +115,7 @@ private:
Ui::OpenDisk ui;
public slots:
virtual void updateMRL() ;
virtual void updateButtons() ;
};
......
......@@ -9,7 +9,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<width>448</width>
<height>300</height>
</rect>
</property>
......@@ -114,7 +114,7 @@
</widget>
</item>
<item row="4" column="1" colspan="5" >
<widget class="Line" name="line" >
<widget class="Line" name="" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
......@@ -155,7 +155,7 @@
</widget>
</item>
<item row="1" column="1" colspan="5" >
<widget class="Line" name="line_2" >
<widget class="Line" name="" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>165</height>
<width>314</width>
<height>140</height>
</rect>
</property>
<property name="windowTitle" >
......@@ -20,45 +20,40 @@
<property name="spacing" >
<number>6</number>
</property>
<item row="3" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" >
<widget class="QComboBox" name="protocolCombo" />
</item>
<item row="0" column="1" >
<widget class="QLabel" name="label_2" >
<item row="1" column="0" colspan="2" >
<widget class="QGroupBox" name="groupBox" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
<hsizetype>3</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="title" >
<string>Card Selection</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Capture Mode</string>
<widget class="QWidget" name="gridLayout" >
<property name="geometry" >
<rect>
<x>10</x>
<y>10</y>
<width>531</width>
<height>41</height>
</rect>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
</layout>
</widget>
</widget>
</item>
<item row="2" column="0" colspan="3" >
<item row="2" column="0" colspan="2" >
<widget class="QGroupBox" name="Options" >
<property name="sizePolicy" >
<sizepolicy>
......@@ -81,6 +76,41 @@
</layout>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Capture Mode</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QComboBox" name="protocolCombo" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>287</height>
<width>462</width>
<height>407</height>
</rect>
</property>
<property name="windowTitle" >
......@@ -73,7 +73,7 @@
</widget>
</item>
<item row="3" column="0" colspan="2" >
<widget class="QLabel" name="label" >
<widget class="QLabel" name="deviceLabel" >
<property name="text" >
<string>Disk device</string>
</property>
......@@ -153,7 +153,7 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="diskOptionGroupBox" >
<widget class="QGroupBox" name="diskOptionBox" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>5</hsizetype>
......@@ -173,7 +173,7 @@
<number>6</number>
</property>
<item row="1" column="0" >
<widget class="QLabel" name="label_3" >
<widget class="QLabel" name="chapterLabel" >
<property name="text" >
<string>Chapter</string>
</property>
......@@ -191,15 +191,15 @@
<string/>
</property>
<property name="minimum" >
<number>-1</number>
<number>0</number>
</property>
<property name="value" >
<number>-1</number>
<number>0</number>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_2" >
<widget class="QLabel" name="titleLabel" >
<property name="text" >
<string>Title</string>
</property>
......@@ -216,6 +216,87 @@
<property name="suffix" >
<string/>
</property>
<property name="minimum" >
<number>0</number>
</property>
<property name="value" >
<number>0</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="diskOptionBox_2" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title" >
<string>Audio and Subtitles</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="1" column="0" >
<widget class="QLabel" name="audioLabel" >
<property name="text" >
<string>Audio track</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QSpinBox" name="audioSpin" >
<property name="alignment" >
<set>Qt::AlignRight</set>
</property>
<property name="suffix" >
<string/>
</property>
<property name="prefix" >
<string/>
</property>
<property name="maximum" >
<number>7</number>
</property>
<property name="minimum" >
<number>-1</number>
</property>
<property name="value" >
<number>-1</number>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="subtitlesLabel" >
<property name="text" >
<string>Subtitles track</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QSpinBox" name="subtitlesSpin" >
<property name="autoFillBackground" >
<bool>false</bool>
</property>
<property name="alignment" >
<set>Qt::AlignRight</set>
</property>
<property name="suffix" >
<string/>
</property>
<property name="maximum" >
<number>31</number>
</property>
<property name="minimum" >
<number>-1</number>
</property>
......@@ -232,10 +313,13 @@
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>420</width>
<height>16</height>
<width>444</width>
<height>10</height>
</size>
</property>
</spacer>
......
......@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>420</width>
<height>205</height>
<height>195</height>
</rect>
</property>
<property name="windowTitle" >
......@@ -130,10 +130,13 @@
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
<height>10</height>
</size>
</property>
</spacer>
......
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