summaryrefslogtreecommitdiff
path: root/noncore/settings/sound/soundsettingsbase.cpp
blob: 2d894c6110d940ac72ab1bf48d2f1641d44b616e (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
172
173
174
175
176
177
178
179
180
181
/****************************************************************************
** Form implementation generated from reading ui file 'soundsettingsbase.ui'
**
** Created: Sun May 19 12:11:35 2002
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "soundsettingsbase.h"

#include <qcheckbox.h>
#include <qcombobox.h>

#include <qlabel.h>
#include <qlayout.h>
#include <qpixmap.h>

static const char* const image0_data[] = { 
"16 16 3 1",
". c None",
"a c #000000",
"# c #ff0000",
"............#...",
"............##..",
"..........#..#..",
".....a..#..#.#..",
"....aa..##.#..#.",
"...aaa...#.##.#.",
"aaaaaa.#.#..#.##",
"aaaaaa.#.##.#.##",
"aaaaaa.#.##.#.##",
"aaaaaa.#.##.#.##",
"aaaaaa.#.#..#.##",
"...aaa...#.##.#.",
"....aa..#..#..#.",
".....a.....#.##.",
"..........#..#..",
"............##.."};

static const char* const image1_data[] = { 
"16 16 3 1",
". c None",
"# c #000000",
"a c #ff0000",
"................",
"................",
"................",
".....#..........",
"....##..........",
"...###...a...a..",
"######..aaa.aaa.",
"######...aaaaa..",
"######....aaa...",
"######...aaaaa..",
"######..aaa.aaa.",
"...###...a...a..",
"....##..........",
".....#..........",
"................",
"................"};


/* 
 *  Constructs a SoundSettingsBase which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
SoundSettingsBase::SoundSettingsBase( QWidget* parent,  const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, fl )
//    : QMainWindow( parent, name, fl )
{
    QPixmap image0( ( const char** ) image0_data );
    QPixmap image1( ( const char** ) image1_data );
    if ( !name )
  setName( "SoundSettingsBase" );
    //    resize(255,301);
    setCaption( tr( "Vmemo Settings" ) );

    SoundSettingsBaseLayout = new QGridLayout( this ); 
    SoundSettingsBaseLayout->setSpacing( 4 );
    SoundSettingsBaseLayout->setMargin( 4 );

    QHBoxLayout *Layout11;
    Layout11 = new QHBoxLayout; 
    Layout11->setSpacing( 4 );
    Layout11->setMargin( 0 );

    stereoCheckBox = new QCheckBox( this, "stereoCheckBox" );
    stereoCheckBox->setText( tr( "Stereo" ) );
    Layout11->addWidget( stereoCheckBox );

    sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" );
    sixteenBitCheckBox->setText( tr( "16 bit" ) );
    Layout11->addWidget( sixteenBitCheckBox );

    AlertCheckBox = new QCheckBox( this, "AlertCheckBox" );
    AlertCheckBox->setText( tr( "Visual Alerts" ) );
    Layout11->addWidget( AlertCheckBox );

    SoundSettingsBaseLayout->addLayout( Layout11, 0, 0);
    
    sampleRateLabel = new QLabel(this, "sampleRateLabel" );
    sampleRateLabel->setText( tr( "Sample Rate:" ) );
    SoundSettingsBaseLayout->addMultiCellWidget(  sampleRateLabel  , 1, 1, 0, 0, 1);

    sampleRate = new QComboBox( FALSE,this, "sampleRate" );
    
    sampleRate->insertItem( tr( "8000" ) );
    sampleRate->insertItem( tr( "11025" ) );
    sampleRate->insertItem( tr( "22050" ) );
    sampleRate->insertItem( tr( "33075" ) );
    sampleRate->insertItem( tr( "44100" ) );
    SoundSettingsBaseLayout->addMultiCellWidget(  sampleRate, 2, 2, 0, 0, 1 );

    TextLabel1 = new QLabel( this, "TextLabel1" );
    TextLabel1->setText( tr( "Recording Directory:" ) );
    SoundSettingsBaseLayout->addMultiCellWidget( TextLabel1, 3, 3, 0, 0, 1);


    LocationComboBox = new QComboBox( FALSE, this, "LocationComboBox" );
    SoundSettingsBaseLayout->addMultiCellWidget(  LocationComboBox, 4, 4, 0, 8, 1);

    QLabel *TextLabelKey;
    TextLabelKey = new QLabel( this, "TextLabelKey" );
    TextLabelKey->setText( tr( "Recording Key:" ) );
    SoundSettingsBaseLayout->addMultiCellWidget(TextLabelKey , 5, 5, 0, 0, 1);

    keyComboBox = new QComboBox( FALSE, this, "keyComboBox" );
    keyComboBox->insertItem( "" );
    keyComboBox->insertItem( tr( "Taskbar Icon" ) );
    keyComboBox->insertItem( tr( "Key_Record" ) );
    keyComboBox->insertItem( tr( "Key_Space" ) );
    keyComboBox->insertItem( tr( "Key_Home" ) );
    keyComboBox->insertItem( tr( "Key_Calender" ) );
    keyComboBox->insertItem( tr( "Key_Contacts" ) );
    keyComboBox->insertItem( tr( "Key_Menu" ) );
    keyComboBox->insertItem( tr( "Key_Mail" ) );
    SoundSettingsBaseLayout->addMultiCellWidget( keyComboBox , 6, 6, 0, 0 ,1);

    keyLabel=  new QLabel( this, "keyLabel" );
    SoundSettingsBaseLayout->addMultiCellWidget( keyLabel , 6, 6, 0, 2, 3);

    QLabel *timeLimitLabel;
    timeLimitLabel= new QLabel( this, "timeLimitLabel" );
    timeLimitLabel->setText( tr( "Recording Limit in seconds:" ) );
    SoundSettingsBaseLayout->addMultiCellWidget(  timeLimitLabel  , 7, 7, 0, 0, 1);

    timeLimitComboBox = new QComboBox( FALSE, this, "timeLimitComboBox" );
    timeLimitComboBox->insertItem( tr( "30" ) );
    timeLimitComboBox->insertItem( tr( "20" ) );
    timeLimitComboBox->insertItem( tr( "15" ) );
    timeLimitComboBox->insertItem( tr( "10" ) );
    timeLimitComboBox->insertItem( tr( "5" ) );
    timeLimitComboBox->insertItem( tr( "Unlimited" ) );

    SoundSettingsBaseLayout->addMultiCellWidget(timeLimitComboBox  , 8, 8, 0, 0, 1);


    restartCheckBox= new QCheckBox( this, "restartCheck" );
    restartCheckBox->setText( tr( "Restart Opie if needed" ) );

    SoundSettingsBaseLayout->addMultiCellWidget( restartCheckBox , 9, 9, 0, 0, 1);

    adpcmCheckBox = new QCheckBox( this, "adpcmCheck" );
    adpcmCheckBox->setText( tr( "Use ADPCM compression" ) );

    SoundSettingsBaseLayout->addMultiCellWidget( adpcmCheckBox , 10, 10, 0, 0, 1);
    
    QSpacerItem* spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding );
    SoundSettingsBaseLayout->addItem( spacer4, 10, 0 );
}

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