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

Qt4 - teletext Panel. Not any function behind it. Not my job anymore :)

parent 23916ae4
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <QSpacerItem> #include <QSpacerItem>
#include <QCursor> #include <QCursor>
#include <QPushButton> #include <QPushButton>
#include <QToolButton>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QMenu> #include <QMenu>
#include <QPalette> #include <QPalette>
...@@ -419,7 +420,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i, ...@@ -419,7 +420,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
if( !b_advancedVisible ) advControls->hide(); if( !b_advancedVisible ) advControls->hide();
/** Disc and Menus handling */ /** Disc and Menus handling */
discFrame = new QFrame( this ); discFrame = new QWidget( this );
QHBoxLayout *discLayout = new QHBoxLayout( discFrame ); QHBoxLayout *discLayout = new QHBoxLayout( discFrame );
discLayout->setSpacing( 0 ); discLayout->setSpacing( 0 );
...@@ -455,11 +456,41 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i, ...@@ -455,11 +456,41 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
sectionNext() ); sectionNext() );
CONNECT( menuButton, clicked(), THEMIM->getIM(), CONNECT( menuButton, clicked(), THEMIM->getIM(),
sectionMenu() ); sectionMenu() );
/** TODO /** TODO
* Telextext QFrame * Telextext QFrame
* Merge with upper menu in a StackLayout * Merge with upper menu in a StackLayout
**/ **/
telexFrame = new QWidget( this );
QHBoxLayout *telexLayout = new QHBoxLayout( telexFrame );
telexLayout->setSpacing( 0 );
telexLayout->setMargin( 0 );
QToolButton *telexOn = new QToolButton;
telexOn->setText( qtr( "On" ) );
setupSmallButton( telexOn );
telexLayout->addWidget( telexOn );
QToolButton *telexTransparent = new QToolButton;
telexTransparent->setText( qtr( "Transparent" ) );
setupSmallButton( telexTransparent );
telexLayout->addWidget( telexTransparent );
QSpinBox *telexPage = new QSpinBox;
telexPage->setRange( 0, 999 );
telexPage->setAlignment( Qt::AlignRight );
telexLayout->addWidget( telexPage );
controlLayout->addWidget( telexFrame, 1, 10, 2, 3, Qt::AlignBottom );
telexFrame->hide();
CONNECT( telexPage, valueChanged( int ), THEMIM->getIM(),
telexGotoPage( int ) );
CONNECT( telexOn, clicked( bool ), THEMIM->getIM(),
telexToggle( bool ) );
CONNECT( telexTransparent, clicked( bool ),
THEMIM->getIM(), telexSetTransparency( bool ) );
CONNECT( THEMIM->getIM(), teletextEnabled( bool ),
telexFrame, setVisible( bool ) );
/** Play Buttons **/ /** Play Buttons **/
QSizePolicy sizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); QSizePolicy sizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
......
...@@ -163,7 +163,8 @@ protected: ...@@ -163,7 +163,8 @@ protected:
friend class VolumeClickHandler; friend class VolumeClickHandler;
private: private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
QFrame *discFrame; QWidget *discFrame;
QWidget *telexFrame;
QGridLayout *controlLayout; QGridLayout *controlLayout;
InputSlider *slider; InputSlider *slider;
QPushButton *prevSectionButton, *nextSectionButton, *menuButton; QPushButton *prevSectionButton, *nextSectionButton, *menuButton;
......
...@@ -138,6 +138,11 @@ void InputManager::update() ...@@ -138,6 +138,11 @@ void InputManager::update()
emit navigationChanged( 0 ); emit navigationChanged( 0 );
} }
/* Update teletext status*/
/* emit teletextEnabled( true|false ) */
/* Update text */ /* Update text */
QString text; QString text;
char *psz_name = input_item_GetTitle( input_GetItem( p_input ) ); char *psz_name = input_item_GetTitle( input_GetItem( p_input ) );
...@@ -231,6 +236,21 @@ void InputManager::sectionMenu() ...@@ -231,6 +236,21 @@ void InputManager::sectionMenu()
var_SetInteger( p_input, "title 0", 2 ); var_SetInteger( p_input, "title 0", 2 );
} }
void InputManager::telexGotoPage( int page )
{
//TODO
}
void InputManager::telexToggle( bool b_enabled )
{
//TODO
}
void InputManager::telexSetTransparency( bool b_transp )
{
//TODO
}
void InputManager::slower() void InputManager::slower()
{ {
if( hasInput() ) if( hasInput() )
......
...@@ -59,6 +59,9 @@ public slots: ...@@ -59,6 +59,9 @@ public slots:
void sectionNext(); void sectionNext();
void sectionPrev(); void sectionPrev();
void sectionMenu(); void sectionMenu();
void telexGotoPage( int );
void telexToggle( bool );
void telexSetTransparency( bool );
signals: signals:
/// Send new position, new time and new length /// Send new position, new time and new length
void positionUpdated( float , int, int ); void positionUpdated( float , int, int );
...@@ -66,6 +69,7 @@ signals: ...@@ -66,6 +69,7 @@ signals:
void nameChanged( QString ); void nameChanged( QString );
/// Used to signal whether we should show navigation buttons /// Used to signal whether we should show navigation buttons
void navigationChanged( int ); void navigationChanged( int );
void teletextEnabled( bool );
/// Play/pause status /// Play/pause status
void statusChanged( int ); void statusChanged( int );
}; };
......
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