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 @@
#include <QSpacerItem>
#include <QCursor>
#include <QPushButton>
#include <QToolButton>
#include <QHBoxLayout>
#include <QMenu>
#include <QPalette>
......@@ -419,7 +420,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
if( !b_advancedVisible ) advControls->hide();
/** Disc and Menus handling */
discFrame = new QFrame( this );
discFrame = new QWidget( this );
QHBoxLayout *discLayout = new QHBoxLayout( discFrame );
discLayout->setSpacing( 0 );
......@@ -455,11 +456,41 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
sectionNext() );
CONNECT( menuButton, clicked(), THEMIM->getIM(),
sectionMenu() );
/** TODO
* Telextext QFrame
* 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 **/
QSizePolicy sizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
......
......@@ -163,7 +163,8 @@ protected:
friend class VolumeClickHandler;
private:
intf_thread_t *p_intf;
QFrame *discFrame;
QWidget *discFrame;
QWidget *telexFrame;
QGridLayout *controlLayout;
InputSlider *slider;
QPushButton *prevSectionButton, *nextSectionButton, *menuButton;
......
......@@ -138,6 +138,11 @@ void InputManager::update()
emit navigationChanged( 0 );
}
/* Update teletext status*/
/* emit teletextEnabled( true|false ) */
/* Update text */
QString text;
char *psz_name = input_item_GetTitle( input_GetItem( p_input ) );
......@@ -231,6 +236,21 @@ void InputManager::sectionMenu()
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()
{
if( hasInput() )
......
......@@ -59,6 +59,9 @@ public slots:
void sectionNext();
void sectionPrev();
void sectionMenu();
void telexGotoPage( int );
void telexToggle( bool );
void telexSetTransparency( bool );
signals:
/// Send new position, new time and new length
void positionUpdated( float , int, int );
......@@ -66,6 +69,7 @@ signals:
void nameChanged( QString );
/// Used to signal whether we should show navigation buttons
void navigationChanged( int );
void teletextEnabled( bool );
/// Play/pause status
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