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

Qt: moving Random to the normal toolbars

parent d41b6e26
......@@ -89,6 +89,9 @@ void ActionsManager::doAction( int id_action )
break;
case QUIT_ACTION:
THEDP->quit(); break;
case RANDOM_ACTION:
// FIXME
break;
default:
msg_Dbg( p_intf, "Action: %i", id_action );
break;
......
......@@ -51,6 +51,7 @@ typedef enum actionType_e
SKIP_BACK_ACTION,
SKIP_FW_ACTION,
QUIT_ACTION,
RANDOM_ACTION,
} actionType_e;
class ActionsManager : public QObject
......
......@@ -172,7 +172,6 @@ void AbstractController::createAndAddWidget( QBoxLayout *controlLayout,
button->setToolTip( tooltip ); \
button->setIcon( QIcon( ":/"#image ) );
#define ENABLE_ON_VIDEO( a ) \
CONNECT( THEMIM->getIM(), voutChanged( bool ), a, setEnabled( bool ) ); \
a->setEnabled( THEMIM->getIM()->hasVideo() ); /* TODO: is this necessary? when input is started before the interface? */
......@@ -180,18 +179,19 @@ void AbstractController::createAndAddWidget( QBoxLayout *controlLayout,
#define ENABLE_ON_INPUT( a ) \
CONNECT( this, inputExists( bool ), a, setEnabled( bool ) ); \
a->setEnabled( THEMIM->getIM()->hasInput() ); /* TODO: is this necessary? when input is started before the interface? */
#define NORMAL_BUTTON( name ) \
QToolButton * name ## Button = new QToolButton; \
setupButton( name ## Button ); \
#define NORMAL_BUTTON( name ) \
QToolButton * name ## Button = new QToolButton; \
setupButton( name ## Button ); \
CONNECT_MAP_SET( name ## Button, name ## _ACTION ); \
BUTTON_SET_BAR( name ## Button ); \
BUTTON_SET_BAR( name ## Button ); \
widget = name ## Button;
QWidget *AbstractController::createWidget( buttonType_e button, int options )
{
bool b_flat = options & WIDGET_FLAT;
bool b_big = options & WIDGET_BIG;
bool b_flat = options & WIDGET_FLAT;
bool b_big = options & WIDGET_BIG;
bool b_shiny = options & WIDGET_SHINY;
bool b_special = false;
......@@ -239,8 +239,9 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
ENABLE_ON_VIDEO( FRAMEButton );
}
break;
case FULLSCREEN_BUTTON:{
case DEFULLSCREEN_BUTTON:{
case FULLSCREEN_BUTTON:
case DEFULLSCREEN_BUTTON:
{
NORMAL_BUTTON( FULLSCREEN );
ENABLE_ON_VIDEO( FULLSCREENButton );
}
......@@ -361,6 +362,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
break;
case RANDOM_BUTTON: {
NORMAL_BUTTON( RANDOM );
RANDOMButton->setCheckable( true );
}
break;
default:
......
......@@ -80,6 +80,7 @@ typedef enum buttonType_e
SKIP_BACK_BUTTON,
SKIP_FW_BUTTON,
QUIT_BUTTON,
RANDOM_BUTTON,
BUTTON_MAX,
SPLITTER = 0x20,
......@@ -102,7 +103,7 @@ static const char* const nameL[BUTTON_MAX] = { N_("Play"), N_("Stop"), N_("Open"
N_("Previous"), N_("Next"), N_("Slower"), N_("Faster"), N_("Fullscreen"),
N_("De-Fullscreen"), N_("Extended panel"), N_("Playlist"), N_("Snapshot"),
N_("Record"), N_("A->B Loop"), N_("Frame By Frame"), N_("Trickplay Reverse"),
N_("Step backward" ), N_("Step forward"), N_("Quit") };
N_("Step backward" ), N_("Step forward"), N_("Quit"), N_("Random") };
static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
N_("Stop playback"), N_("Open a medium"),
N_("Previous media in the playlist"),
......@@ -111,14 +112,15 @@ static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
N_("Show extended settings" ), N_( "Show playlist" ),
N_( "Take a snapshot" ), N_( "Record" ),
N_( "Loop from point A to point B continuously." ), N_("Frame by frame"),
N_("Reverse"), N_("Step backward"), N_("Step forward"), N_("Quit") };
N_("Reverse"), N_("Step backward"), N_("Step forward"), N_("Quit"),
N_("Random") };
static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b", ":/toolbar/stop_b",
":/toolbar/eject", ":/toolbar/previous_b", ":/toolbar/next_b",
":/toolbar/slower", ":/toolbar/faster", ":/toolbar/fullscreen",
":/toolbar/defullscreen", ":/toolbar/extended", ":/toolbar/playlist",
":/toolbar/snapshot", ":/toolbar/record", ":/toolbar/atob_nob",
":/toolbar/frame", ":/toolbar/reverse", ":/toolbar/skip_back",
":/toolbar/skip_fw", ":/toolbar/clear" };
":/toolbar/skip_fw", ":/toolbar/clear", ":/buttons/playlist/shuffle_on" };
enum
{
......
......@@ -235,4 +235,3 @@ void AtoB_Button::setIcons( bool timeA, bool timeB )
}
}
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