extended.cpp 2.67 KB
Newer Older
zorglub's avatar
zorglub committed
1
2
3
4
/*****************************************************************************
 * extended.cpp : Extended controls - Undocked
 ****************************************************************************
 * Copyright (C) 2006 the VideoLAN team
5
 * $Id$
zorglub's avatar
zorglub committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 *
 * Authors: Clément Stenac <zorglub@videolan.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
21
22
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/
zorglub's avatar
zorglub committed
23
24
25

#include "dialogs/extended.hpp"
#include "dialogs_provider.hpp"
zorglub's avatar
zorglub committed
26
#include "components/extended_panels.hpp"
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
27
28

#include <QTabWidget>
29
#include <QGridLayout>
zorglub's avatar
zorglub committed
30
31
32
33
34

ExtendedDialog *ExtendedDialog::instance = NULL;

ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
{
35
    setWindowFlags( Qt::Tool );
36
    setWindowOpacity( config_GetFloat( p_intf, "qt-opacity" ) );
37

38
    setWindowTitle( qtr( "Adjustments and Effects" ) );
zorglub's avatar
zorglub committed
39

40
41
    QGridLayout *layout = new QGridLayout( this );

42
43
44
    QTabWidget *mainTab = new QTabWidget( this );
    mainTab->setTabPosition( QTabWidget::West );

45
46
    QWidget *audioWidget = new QWidget( this );
    QHBoxLayout *audioLayout = new QHBoxLayout( audioWidget );
47
48
    QTabWidget *audioTab = new QTabWidget( mainTab );

49
    Equalizer *equal = new Equalizer( p_intf, this );
50
    audioTab->addTab( equal, qtr( "Graphic Equalizer" ) );
zorglub's avatar
zorglub committed
51

52
    Spatializer *spatial = new Spatializer( p_intf, this );
53
    audioTab->addTab( spatial, qtr( "Spatializer" ) );
54
55
56
    audioLayout->addWidget( audioTab );

    mainTab->addTab( audioWidget, qtr( "Audio effects" ) );
57
58

    ExtVideo *videoEffect = new ExtVideo( p_intf, this );
59
    mainTab->addTab( videoEffect, qtr( "Video Adjustments and Effects" ) );
60

61
    layout->addWidget( mainTab, 0, 0, 1, 5 );
62
63
64
65

    QPushButton *closeButton = new QPushButton( qtr( "Close" ) );
    layout->addWidget( closeButton, 1, 4, 1, 1);
    CONNECT( closeButton, clicked(), this, close() );
66
67
    
    readSettings( "EPanel", QSize( 400, 300 ), QPoint( 450, 0 ) );
zorglub's avatar
zorglub committed
68
69
}

70
void ExtendedDialog::savingSettings()
zorglub's avatar
zorglub committed
71
{
72
    writeSettings( "EPanel" );
zorglub's avatar
zorglub committed
73
74
}

75
76
77
ExtendedDialog::~ExtendedDialog()
{}