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

Qt4 - Remove the enqueue button and regroup it under the play button, since it...

Qt4 - Remove the enqueue button and regroup it under the play button, since it is far less used. KEEP IT SIMPLE :D
xtophe, is that what you wanted ?
Stream() does not do anything yet.

parent 5021c9c9
......@@ -25,7 +25,7 @@
#include <QGridLayout>
#include <QFileDialog>
#include <QRegExp>
#include <QMenu>
#include "dialogs/open.hpp"
#include "components/open.hpp"
......@@ -57,6 +57,13 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal ) :
ui.advancedFrame->hide();
QMenu * openButtonMenu = new QMenu( "Open" );
openButtonMenu->addAction( qtr("&Enqueue"), this, SLOT( enqueue() ),
QKeySequence( "Alt+E") );
openButtonMenu->addAction( qtr("&Stream"), this, SLOT( stream() ) ,
QKeySequence( "Alt+T" ) );
ui.playButton->setMenu( openButtonMenu );
/* Force MRL update on tab change */
CONNECT( ui.Tab, currentChanged(int), this, signalCurrent());
......@@ -77,9 +84,8 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal ) :
CONNECT( ui.slaveText, textChanged(QString), this, updateMRL());
CONNECT( ui.cacheSpinBox, valueChanged(int), this, updateMRL());
BUTTONACT( ui.closeButton, play());
BUTTONACT( ui.playButton, play());
BUTTONACT( ui.cancelButton, cancel());
BUTTONACT( ui.enqueueButton, enqueue());
BUTTONACT( ui.advancedCheckBox , toggleAdvancedPanel() );
/* Initialize caching */
......@@ -165,6 +171,11 @@ void OpenDialog::playOrEnqueue( bool b_enqueue = false )
accept();
}
void OpenDialog::stream()
{
//TODO. Policy not yet defined
}
void OpenDialog::toggleAdvancedPanel()
{
//FIXME does not work under Windows
......
......@@ -53,6 +53,7 @@ public:
QString mainMRL;
public slots:
void play();
void stream();
private:
static OpenDialog *instance;
input_thread_t *p_input;
......
......@@ -174,35 +174,56 @@
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" >
<size>
<width>241</width>
<width>240</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="cancelButton" >
<widget class="QToolButton" name="cancelButton" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>&amp;Cancel</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="enqueueButton" >
<property name="text" >
<string>&amp;Enqueue</string>
<widget class="QToolButton" name="playButton" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>90</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="closeButton" >
<property name="text" >
<string>&amp;Play</string>
</property>
<property name="default" >
<bool>true</bool>
<property name="popupMode" >
<enum>QToolButton::MenuButtonPopup</enum>
</property>
<property name="toolButtonStyle" >
<enum>Qt::ToolButtonTextOnly</enum>
</property>
</widget>
</item>
......@@ -214,7 +235,7 @@
<tabstop>cacheSpinBox</tabstop>
<tabstop>advancedLineInput</tabstop>
<tabstop>Tab</tabstop>
<tabstop>closeButton</tabstop>
<tabstop>playButton</tabstop>
<tabstop>cancelButton</tabstop>
</tabstops>
<resources/>
......
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