summaryrefslogtreecommitdiffstats
path: root/src/prefpreview.cpp
blob: cb2fad691f9d820e534de0afcea9d332611c84d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './prefpreview.ui'
**
** Created: dim. oct. 26 08:57:36 2008
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "prefpreview.h"

#include <tqvariant.h>
#include <tqpushbutton.h>
#include <tqbuttongroup.h>
#include <tqradiobutton.h>
#include <tqwidgetstack.h>
#include <tqlabel.h>
#include <tqcheckbox.h>
#include <tqcombobox.h>
#include <tqlayout.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>

/*
 *  Constructs a prefPreview as a child of 'tqparent', with the
 *  name 'name' and widget flags set to 'f'.
 */
prefPreview::prefPreview( TQWidget* tqparent, const char* name, WFlags fl )
    : TQWidget( tqparent, name, fl )
{
    if ( !name )
	setName( "prefPreview" );
    prefPreviewLayout = new TQGridLayout( this, 1, 1, 11, 6, "prefPreviewLayout"); 

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, buttonGroup1->sizePolicy().hasHeightForWidth() ) );
    buttonGroup1->setFrameShape( TQButtonGroup::NoFrame );
    buttonGroup1->setColumnLayout(0, Qt::Vertical );
    buttonGroup1->tqlayout()->setSpacing( 6 );
    buttonGroup1->tqlayout()->setMargin( 11 );
    buttonGroup1Layout = new TQGridLayout( buttonGroup1->tqlayout() );
    buttonGroup1Layout->tqsetAlignment( TQt::AlignTop );

    rbInternal = new TQRadioButton( buttonGroup1, "rbInternal" );

    buttonGroup1Layout->addWidget( rbInternal, 0, 0 );

    rbMplayer = new TQRadioButton( buttonGroup1, "rbMplayer" );

    buttonGroup1Layout->addWidget( rbMplayer, 1, 0 );

    prefPreviewLayout->addWidget( buttonGroup1, 0, 0 );
    spacer5 = new TQSpacerItem( 21, 210, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    prefPreviewLayout->addItem( spacer5, 2, 0 );

    wsOptions = new TQWidgetStack( this, "wsOptions" );
    wsOptions->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, wsOptions->sizePolicy().hasHeightForWidth() ) );
    wsOptions->setFrameShape( TQWidgetStack::NoFrame );
    wsOptions->setFrameShadow( TQWidgetStack::Sunken );
    wsOptions->setLineWidth( 1 );
    wsOptions->setMidLineWidth( 0 );

    wspInternal = new TQWidget( wsOptions, "wspInternal" );
    wspInternalLayout = new TQGridLayout( wspInternal, 1, 1, 11, 6, "wspInternalLayout"); 

    textLabel1 = new TQLabel( wspInternal, "textLabel1" );
    TQFont textLabel1_font(  textLabel1->font() );
    textLabel1_font.setBold( TRUE );
    textLabel1->setFont( textLabel1_font ); 

    wspInternalLayout->addWidget( textLabel1, 0, 0 );

    ckUseGL = new TQCheckBox( wspInternal, "ckUseGL" );

    wspInternalLayout->addWidget( ckUseGL, 1, 0 );
    spacer1 = new TQSpacerItem( 21, 30, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    wspInternalLayout->addItem( spacer1, 2, 0 );
    wsOptions->addWidget( wspInternal, 0 );

    wspMplayer = new TQWidget( wsOptions, "wspMplayer" );
    wspMplayerLayout = new TQGridLayout( wspMplayer, 1, 1, 11, 6, "wspMplayerLayout"); 

    textLabel3 = new TQLabel( wspMplayer, "textLabel3" );

    wspMplayerLayout->addWidget( textLabel3, 1, 0 );

    textLabel4 = new TQLabel( wspMplayer, "textLabel4" );
    textLabel4->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, textLabel4->sizePolicy().hasHeightForWidth() ) );

    wspMplayerLayout->addWidget( textLabel4, 2, 0 );

    cbVout = new TQComboBox( FALSE, wspMplayer, "cbVout" );

    wspMplayerLayout->addWidget( cbVout, 1, 1 );

    cbAout = new TQComboBox( FALSE, wspMplayer, "cbAout" );
    cbAout->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, cbAout->sizePolicy().hasHeightForWidth() ) );

    wspMplayerLayout->addWidget( cbAout, 2, 1 );
    spacer3 = new TQSpacerItem( 81, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    wspMplayerLayout->addItem( spacer3, 1, 2 );
    spacer6 = new TQSpacerItem( 20, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    wspMplayerLayout->addItem( spacer6, 3, 1 );

    textLabel2 = new TQLabel( wspMplayer, "textLabel2" );
    TQFont textLabel2_font(  textLabel2->font() );
    textLabel2_font.setBold( TRUE );
    textLabel2->setFont( textLabel2_font ); 

    wspMplayerLayout->addMultiCellWidget( textLabel2, 0, 0, 0, 2 );
    wsOptions->addWidget( wspMplayer, 1 );

    prefPreviewLayout->addWidget( wsOptions, 1, 0 );
    spacer4 = new TQSpacerItem( 230, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    prefPreviewLayout->addItem( spacer4, 0, 1 );
    languageChange();
    resize( TQSize(536, 470).expandedTo(tqminimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( rbInternal, TQT_SIGNAL( clicked() ), this, TQT_SLOT( rbInternalClick() ) );
    connect( rbMplayer, TQT_SIGNAL( clicked() ), this, TQT_SLOT( rbMplayerClick() ) );
}

/*
 *  Destroys the object and frees any allocated resources
 */
prefPreview::~prefPreview()
{
    // no need to delete child widgets, TQt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void prefPreview::languageChange()
{
    setCaption( tr2i18n( "Form1" ) );
    buttonGroup1->setTitle( TQString() );
    rbInternal->setText( tr2i18n( "&Internal Player" ) );
    rbInternal->setAccel( TQKeySequence( tr2i18n( "Alt+I" ) ) );
    rbMplayer->setText( tr2i18n( "MPlayer" ) );
    rbMplayer->setAccel( TQKeySequence( tr2i18n( "Alt+M" ) ) );
    textLabel1->setText( tr2i18n( "Internal viewer options" ) );
    ckUseGL->setText( tr2i18n( "use OpenGL" ) );
    textLabel3->setText( tr2i18n( "Video output" ) );
    textLabel4->setText( tr2i18n( "Audio output" ) );
    cbVout->clear();
    cbVout->insertItem( tr2i18n( "X11" ) );
    cbVout->insertItem( tr2i18n( "Xv" ) );
    cbVout->insertItem( tr2i18n( "OpenGL" ) );
    cbVout->insertItem( tr2i18n( "SDL" ) );
    cbAout->clear();
    cbAout->insertItem( tr2i18n( "ALSA" ) );
    cbAout->insertItem( tr2i18n( "OSS" ) );
    cbAout->insertItem( tr2i18n( "SDL" ) );
    textLabel2->setText( tr2i18n( "MPlayer options" ) );
}

void prefPreview::rbInternalClick()
{
    qWarning( "prefPreview::rbInternalClick(): Not implemented yet" );
}

void prefPreview::rbMplayerClick()
{
    qWarning( "prefPreview::rbMplayerClick(): Not implemented yet" );
}

#include "prefpreview.moc"