summaryrefslogtreecommitdiff
path: root/noncore/settings
authorllornkcor <llornkcor>2002-05-23 17:32:43 (UTC)
committer llornkcor <llornkcor>2002-05-23 17:32:43 (UTC)
commit486ad124967306e4a65a63f9d4bf60ea1ba38544 (patch) (unidiff)
tree49077ef16f1abd0658beb6cfa06aa070e53fc21d /noncore/settings
parent68e6e7801c5540dda00bda44222dce3e69075cc9 (diff)
downloadopie-486ad124967306e4a65a63f9d4bf60ea1ba38544.zip
opie-486ad124967306e4a65a63f9d4bf60ea1ba38544.tar.gz
opie-486ad124967306e4a65a63f9d4bf60ea1ba38544.tar.bz2
changed from QDialog, with its crappy way of closing in qpe to QMainWindow
Diffstat (limited to 'noncore/settings') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp8
-rw-r--r--noncore/settings/sound/soundsettingsbase.cpp56
-rw-r--r--noncore/settings/sound/soundsettingsbase.h6
3 files changed, 35 insertions, 35 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index cdee87c..ed601cf 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -67,12 +67,13 @@ SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl )
67 connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &))); 67 connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &)));
68// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 68// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
69} 69}
70 70
71void SoundSettings::reject() 71void SoundSettings::reject()
72{ 72{
73 qDebug("here");
73 Config config( "qpe"); 74 Config config( "qpe");
74 config.setGroup( "Volume"); 75 config.setGroup( "Volume");
75 76
76 setVolume(100-config.readNumEntry("VolumePercent")); 77 setVolume(100-config.readNumEntry("VolumePercent"));
77 setMic(100-config.readNumEntry("Mic")); 78 setMic(100-config.readNumEntry("Mic"));
78 79
@@ -85,14 +86,14 @@ void SoundSettings::reject()
85// else if(rate == 32000) 86// else if(rate == 32000)
86// sampleRate->setCurrentItem(2); 87// sampleRate->setCurrentItem(2);
87// else if(rate==44100) 88// else if(rate==44100)
88// sampleRate->setCurrentItem(3); 89// sampleRate->setCurrentItem(3);
89// stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0)); 90// stereoCheckBox->setChecked(config.readNumEntry("Stereo", 0));
90// sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0)); 91// sixteenBitCheckBox->setChecked(config.readNumEntry("SixteenBit", 0));
91 92 ::exit(-1);
92 QDialog::reject(); 93// QDialog::reject();
93} 94}
94 95
95void SoundSettings::accept() 96void SoundSettings::accept()
96{ 97{
97 Config config( "qpe" ); 98 Config config( "qpe" );
98 config.setGroup( "Volume" ); 99 config.setGroup( "Volume" );
@@ -110,13 +111,14 @@ void SoundSettings::accept()
110 cfg.writeEntry("SampleRate",sampleRate->currentText()); 111 cfg.writeEntry("SampleRate",sampleRate->currentText());
111 cfg.writeEntry("Stereo",stereoCheckBox->isChecked()); 112 cfg.writeEntry("Stereo",stereoCheckBox->isChecked());
112 cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked()); 113 cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked());
113// Config cfg( "VMemo" ); 114// Config cfg( "VMemo" );
114// cfg.setGroup( "Defaults" ); 115// cfg.setGroup( "Defaults" );
115// cfg.writeEntry( "hideIcon", HideIcon_CheckBox->isChecked()); 116// cfg.writeEntry( "hideIcon", HideIcon_CheckBox->isChecked());
116 QDialog::accept(); 117// QDialog::accept();
118 ::exit(0);
117} 119}
118 120
119void SoundSettings::setVolume(int v) 121void SoundSettings::setVolume(int v)
120{ 122{
121 Config config( "qpe" ); 123 Config config( "qpe" );
122 config.setGroup( "Volume" ); 124 config.setGroup( "Volume" );
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp
index 937b068..563b438 100644
--- a/noncore/settings/sound/soundsettingsbase.cpp
+++ b/noncore/settings/sound/soundsettingsbase.cpp
@@ -1,10 +1,10 @@
1/**************************************************************************** 1/****************************************************************************
2** Form implementation generated from reading ui file 'soundsettingsbase.ui' 2** Form implementation generated from reading ui file 'soundsettingsbase.ui'
3** 3**
4** Created: Sun May 19 12:11:35 2002 4** Created: Thu May 23 11:23:54 2002
5** by: The User Interface Compiler (uic) 5** by: The User Interface Compiler (uic)
6** 6**
7** WARNING! All changes made in this file will be lost! 7** WARNING! All changes made in this file will be lost!
8****************************************************************************/ 8****************************************************************************/
9#include "soundsettingsbase.h" 9#include "soundsettingsbase.h"
10 10
@@ -76,15 +76,15 @@ static const char* const image1_data[] = {
76SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl ) 76SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl )
77 : QDialog( parent, name, modal, fl ) 77 : QDialog( parent, name, modal, fl )
78{ 78{
79 QPixmap image0( ( const char** ) image0_data ); 79 QPixmap image0( ( const char** ) image0_data );
80 QPixmap image1( ( const char** ) image1_data ); 80 QPixmap image1( ( const char** ) image1_data );
81 if ( !name ) 81 if ( !name )
82 setName( "SoundSettingsBase" ); 82 setName( "SoundSettingsBase" );
83 resize( 255, 301 ); 83 resize( 255, 301 );
84 setCaption( tr( "Vmemo Settings" ) ); 84 setCaption( tr( "Sound Settings" ) );
85 SoundSettingsBaseLayout = new QGridLayout( this ); 85 SoundSettingsBaseLayout = new QGridLayout( this );
86 SoundSettingsBaseLayout->setSpacing( 6 ); 86 SoundSettingsBaseLayout->setSpacing( 6 );
87 SoundSettingsBaseLayout->setMargin( 11 ); 87 SoundSettingsBaseLayout->setMargin( 11 );
88 88
89 GroupBox3 = new QGroupBox( this, "GroupBox3" ); 89 GroupBox3 = new QGroupBox( this, "GroupBox3" );
90 GroupBox3->setFrameShape( QGroupBox::Box ); 90 GroupBox3->setFrameShape( QGroupBox::Box );
@@ -92,22 +92,22 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
92 GroupBox3->setTitle( tr( "Levels" ) ); 92 GroupBox3->setTitle( tr( "Levels" ) );
93 GroupBox3->setColumnLayout(0, Qt::Vertical ); 93 GroupBox3->setColumnLayout(0, Qt::Vertical );
94 GroupBox3->layout()->setSpacing( 0 ); 94 GroupBox3->layout()->setSpacing( 0 );
95 GroupBox3->layout()->setMargin( 0 ); 95 GroupBox3->layout()->setMargin( 0 );
96 GroupBox3Layout = new QVBoxLayout( GroupBox3->layout() ); 96 GroupBox3Layout = new QVBoxLayout( GroupBox3->layout() );
97 GroupBox3Layout->setAlignment( Qt::AlignTop ); 97 GroupBox3Layout->setAlignment( Qt::AlignTop );
98 GroupBox3Layout->setSpacing( 2 ); 98 GroupBox3Layout->setSpacing( 6 );
99 GroupBox3Layout->setMargin( 2 ); 99 GroupBox3Layout->setMargin( 11 );
100 100
101 Layout10 = new QVBoxLayout; 101 Layout10 = new QVBoxLayout;
102 Layout10->setSpacing( 2 ); 102 Layout10->setSpacing( 6 );
103 Layout10->setMargin( 2 ); 103 Layout10->setMargin( 0 );
104 104
105 Layout16 = new QHBoxLayout; 105 Layout16 = new QHBoxLayout;
106 Layout16->setSpacing( 2 ); 106 Layout16->setSpacing( 6 );
107 Layout16->setMargin( 2 ); 107 Layout16->setMargin( 0 );
108 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 108 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
109 Layout16->addItem( spacer ); 109 Layout16->addItem( spacer );
110 110
111 PixmapLabel1_2 = new QLabel( GroupBox3, "PixmapLabel1_2" ); 111 PixmapLabel1_2 = new QLabel( GroupBox3, "PixmapLabel1_2" );
112 PixmapLabel1_2->setPixmap( image0 ); 112 PixmapLabel1_2->setPixmap( image0 );
113 PixmapLabel1_2->setScaledContents( FALSE ); 113 PixmapLabel1_2->setScaledContents( FALSE );
@@ -118,14 +118,14 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
118 Layout16->addWidget( TextLabel1_2 ); 118 Layout16->addWidget( TextLabel1_2 );
119 QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 119 QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
120 Layout16->addItem( spacer_2 ); 120 Layout16->addItem( spacer_2 );
121 Layout10->addLayout( Layout16 ); 121 Layout10->addLayout( Layout16 );
122 122
123 Layout13 = new QHBoxLayout; 123 Layout13 = new QHBoxLayout;
124 Layout13->setSpacing( 2 ); 124 Layout13->setSpacing( 6 );
125 Layout13->setMargin( 2 ); 125 Layout13->setMargin( 0 );
126 126
127 volLabel = new QLabel( GroupBox3, "volLabel" ); 127 volLabel = new QLabel( GroupBox3, "volLabel" );
128 volLabel->setText( tr( "Output" ) ); 128 volLabel->setText( tr( "Output" ) );
129 Layout13->addWidget( volLabel ); 129 Layout13->addWidget( volLabel );
130 QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 130 QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
131 Layout13->addItem( spacer_3 ); 131 Layout13->addItem( spacer_3 );
@@ -135,14 +135,14 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
135 Layout13->addWidget( micLabel ); 135 Layout13->addWidget( micLabel );
136 QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 136 QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
137 Layout13->addItem( spacer_4 ); 137 Layout13->addItem( spacer_4 );
138 Layout10->addLayout( Layout13 ); 138 Layout10->addLayout( Layout13 );
139 139
140 Layout12 = new QHBoxLayout; 140 Layout12 = new QHBoxLayout;
141 Layout12->setSpacing( 2 ); 141 Layout12->setSpacing( 6 );
142 Layout12->setMargin( 2 ); 142 Layout12->setMargin( 0 );
143 143
144 volume = new QSlider( GroupBox3, "volume" ); 144 volume = new QSlider( GroupBox3, "volume" );
145 volume->setMaxValue( 100 ); 145 volume->setMaxValue( 100 );
146 volume->setValue( 50 ); 146 volume->setValue( 50 );
147 volume->setOrientation( QSlider::Vertical ); 147 volume->setOrientation( QSlider::Vertical );
148 volume->setTickmarks( QSlider::Right ); 148 volume->setTickmarks( QSlider::Right );
@@ -160,14 +160,14 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
160 Layout12->addWidget( mic ); 160 Layout12->addWidget( mic );
161 QSpacerItem* spacer_6 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 161 QSpacerItem* spacer_6 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
162 Layout12->addItem( spacer_6 ); 162 Layout12->addItem( spacer_6 );
163 Layout10->addLayout( Layout12 ); 163 Layout10->addLayout( Layout12 );
164 164
165 Layout17 = new QHBoxLayout; 165 Layout17 = new QHBoxLayout;
166 Layout17->setSpacing( 2 ); 166 Layout17->setSpacing( 6 );
167 Layout17->setMargin( 2 ); 167 Layout17->setMargin( 0 );
168 QSpacerItem* spacer_7 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 168 QSpacerItem* spacer_7 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
169 Layout17->addItem( spacer_7 ); 169 Layout17->addItem( spacer_7 );
170 170
171 PixmapLabel2_2 = new QLabel( GroupBox3, "PixmapLabel2_2" ); 171 PixmapLabel2_2 = new QLabel( GroupBox3, "PixmapLabel2_2" );
172 PixmapLabel2_2->setPixmap( image1 ); 172 PixmapLabel2_2->setPixmap( image1 );
173 PixmapLabel2_2->setScaledContents( FALSE ); 173 PixmapLabel2_2->setScaledContents( FALSE );
@@ -181,35 +181,33 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
181 Layout10->addLayout( Layout17 ); 181 Layout10->addLayout( Layout17 );
182 GroupBox3Layout->addLayout( Layout10 ); 182 GroupBox3Layout->addLayout( Layout10 );
183 183
184 SoundSettingsBaseLayout->addWidget( GroupBox3, 0, 0 ); 184 SoundSettingsBaseLayout->addWidget( GroupBox3, 0, 0 );
185 185
186 Layout12_2 = new QVBoxLayout; 186 Layout12_2 = new QVBoxLayout;
187 Layout12_2->setSpacing( 2 ); 187 Layout12_2->setSpacing( 6 );
188 Layout12_2->setMargin( 2 ); 188 Layout12_2->setMargin( 0 );
189 189
190 GroupBox1 = new QGroupBox( this, "GroupBox1" ); 190 GroupBox1 = new QGroupBox( this, "GroupBox1" );
191 GroupBox1->setTitle( tr( "Vmemo" ) ); 191 GroupBox1->setTitle( tr( "Vmemo" ) );
192 192
193 QWidget* privateLayoutWidget = new QWidget( GroupBox1, "Layout11" ); 193 QWidget* privateLayoutWidget = new QWidget( GroupBox1, "Layout11" );
194 privateLayoutWidget->setGeometry( QRect( 5, 16, 96, 169 ) ); 194 privateLayoutWidget->setGeometry( QRect( 5, 16, 96, 169 ) );
195 Layout11 = new QVBoxLayout( privateLayoutWidget ); 195 Layout11 = new QVBoxLayout( privateLayoutWidget );
196 Layout11->setSpacing( 2 ); 196 Layout11->setSpacing( 6 );
197 Layout11->setMargin( 0 ); 197 Layout11->setMargin( 0 );
198 198
199 sampleRateLabel = new QLabel( privateLayoutWidget, "sampleRateLabel" ); 199 sampleRateLabel = new QLabel( privateLayoutWidget, "sampleRateLabel" );
200 sampleRateLabel->setText( tr( "Sample Rate" ) ); 200 sampleRateLabel->setText( tr( "Sample Rate" ) );
201 Layout11->addWidget( sampleRateLabel ); 201 Layout11->addWidget( sampleRateLabel );
202 202
203 sampleRate = new QComboBox( FALSE, privateLayoutWidget, "sampleRate" ); 203 sampleRate = new QComboBox( FALSE, privateLayoutWidget, "sampleRate" );
204 sampleRate->insertItem( tr( "8000" ) );
205 sampleRate->insertItem( tr( "11025" ) ); 204 sampleRate->insertItem( tr( "11025" ) );
206 sampleRate->insertItem( tr( "22050" ) ); 205 sampleRate->insertItem( tr( "22050" ) );
207 sampleRate->insertItem( tr( "33075" ) ); 206 sampleRate->insertItem( tr( "32000" ) );
208 sampleRate->insertItem( tr( "44100" ) ); 207 sampleRate->insertItem( tr( "44100" ) );
209 sampleRate->setFixedWidth(90);
210 Layout11->addWidget( sampleRate ); 208 Layout11->addWidget( sampleRate );
211 209
212 stereoCheckBox = new QCheckBox( privateLayoutWidget, "stereoCheckBox" ); 210 stereoCheckBox = new QCheckBox( privateLayoutWidget, "stereoCheckBox" );
213 stereoCheckBox->setText( tr( "Stereo" ) ); 211 stereoCheckBox->setText( tr( "Stereo" ) );
214 Layout11->addWidget( stereoCheckBox ); 212 Layout11->addWidget( stereoCheckBox );
215 213
@@ -226,21 +224,21 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
226 Layout11->addWidget( TextLabel1 ); 224 Layout11->addWidget( TextLabel1 );
227 225
228 LocationComboBox = new QComboBox( FALSE, privateLayoutWidget, "LocationComboBox" ); 226 LocationComboBox = new QComboBox( FALSE, privateLayoutWidget, "LocationComboBox" );
229 Layout11->addWidget( LocationComboBox ); 227 Layout11->addWidget( LocationComboBox );
230 Layout12_2->addWidget( GroupBox1 ); 228 Layout12_2->addWidget( GroupBox1 );
231 229
232// // touchsound = new QCheckBox( this, "touchsound" ); 230 touchsound = new QCheckBox( this, "touchsound" );
233// // touchsound->setText( tr( "Screen sounds" ) ); 231 touchsound->setText( tr( "Screen sounds" ) );
234// // Layout12_2->addWidget( touchsound ); 232 Layout12_2->addWidget( touchsound );
235 233
236// // keysound = new QCheckBox( this, "keysound" ); 234 keysound = new QCheckBox( this, "keysound" );
237// // keysound->setText( tr( "Keyboard sounds" ) ); 235 keysound->setText( tr( "Keyboard sounds" ) );
238// // Layout12_2->addWidget( keysound ); 236 Layout12_2->addWidget( keysound );
239 QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); 237 QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
240 Layout12_2->addItem( spacer_9 ); 238 Layout12_2->addItem( spacer_9 );
241 239
242 SoundSettingsBaseLayout->addLayout( Layout12_2, 0, 1 ); 240 SoundSettingsBaseLayout->addLayout( Layout12_2, 0, 1 );
243} 241}
244 242
245/* 243/*
246 * Destroys the object and frees any allocated resources 244 * Destroys the object and frees any allocated resources
diff --git a/noncore/settings/sound/soundsettingsbase.h b/noncore/settings/sound/soundsettingsbase.h
index 8ad80f6..66ba34a 100644
--- a/noncore/settings/sound/soundsettingsbase.h
+++ b/noncore/settings/sound/soundsettingsbase.h
@@ -1,10 +1,10 @@
1/**************************************************************************** 1/****************************************************************************
2** Form interface generated from reading ui file 'soundsettingsbase.ui' 2** Form interface generated from reading ui file 'soundsettingsbase.ui'
3** 3**
4** Created: Sun May 19 12:11:23 2002 4** Created: Thu May 23 11:23:38 2002
5** by: The User Interface Compiler (uic) 5** by: The User Interface Compiler (uic)
6** 6**
7** WARNING! All changes made in this file will be lost! 7** WARNING! All changes made in this file will be lost!
8****************************************************************************/ 8****************************************************************************/
9#ifndef SOUNDSETTINGSBASE_H 9#ifndef SOUNDSETTINGSBASE_H
10#define SOUNDSETTINGSBASE_H 10#define SOUNDSETTINGSBASE_H
@@ -42,14 +42,14 @@ public:
42 QComboBox* sampleRate; 42 QComboBox* sampleRate;
43 QCheckBox* stereoCheckBox; 43 QCheckBox* stereoCheckBox;
44 QCheckBox* sixteenBitCheckBox; 44 QCheckBox* sixteenBitCheckBox;
45 QCheckBox* AlertCheckBox; 45 QCheckBox* AlertCheckBox;
46 QLabel* TextLabel1; 46 QLabel* TextLabel1;
47 QComboBox* LocationComboBox; 47 QComboBox* LocationComboBox;
48/* QCheckBox* touchsound; */ 48 QCheckBox* touchsound;
49/* QCheckBox* keysound; */ 49 QCheckBox* keysound;
50 50
51protected: 51protected:
52 QGridLayout* SoundSettingsBaseLayout; 52 QGridLayout* SoundSettingsBaseLayout;
53 QVBoxLayout* GroupBox3Layout; 53 QVBoxLayout* GroupBox3Layout;
54 QVBoxLayout* Layout10; 54 QVBoxLayout* Layout10;
55 QHBoxLayout* Layout16; 55 QHBoxLayout* Layout16;