summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp2
-rw-r--r--noncore/settings/sound/soundsettingsbase.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index 226f058..d6128a6 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -557,78 +557,78 @@ bool VMemo::record() {
557 } 557 }
558 // printf("%d\r",length); 558 // printf("%d\r",length);
559 // fflush(stdout); 559 // fflush(stdout);
560 qApp->processEvents(); 560 qApp->processEvents();
561 } 561 }
562 // qDebug("file has length of %d lasting %d seconds", 562 // qDebug("file has length of %d lasting %d seconds",
563 // length, (( length / speed) / channels) / 2 ); 563 // length, (( length / speed) / channels) / 2 );
564 // } 564 // }
565 565
566 //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<// 566 //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<//
567 567
568 value = length+36; 568 value = length+36;
569 569
570 lseek(wav, 4, SEEK_SET); 570 lseek(wav, 4, SEEK_SET);
571 write(wav, &value, 4); 571 write(wav, &value, 4);
572 lseek(wav, 40, SEEK_SET); 572 lseek(wav, 40, SEEK_SET);
573 573
574 write(wav, &length, 4); 574 write(wav, &length, 4);
575 575
576 track.close(); 576 track.close();
577 qDebug("Track closed"); 577 qDebug("Track closed");
578 578
579 if( ioctl( dsp, SNDCTL_DSP_RESET,0) == -1) 579 if( ioctl( dsp, SNDCTL_DSP_RESET,0) == -1)
580 perror("ioctl(\"SNDCTL_DSP_RESET\")"); 580 perror("ioctl(\"SNDCTL_DSP_RESET\")");
581 581
582 ::close(dsp); 582 ::close(dsp);
583 583
584 qDebug("done recording "+fileName); 584 qDebug("done recording "+fileName);
585 585
586 Config cfg("qpe"); 586 Config cfg("qpe");
587 cfg.setGroup("Volume"); 587 cfg.setGroup("Volume");
588 QString foo = cfg.readEntry("Mute","TRUE"); 588 QString foo = cfg.readEntry("Mute","TRUE");
589 if(foo.find("TRUE",0,TRUE) != -1) 589 if(foo.find("TRUE",0,TRUE) != -1)
590 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; //mute 590 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; //mute
591return TRUE; 591return TRUE;
592} 592}
593 593
594int VMemo::setToggleButton(int tog) { 594int VMemo::setToggleButton(int tog) {
595 595
596 for( int i=0; i < 10;i++) { 596 for( int i=0; i < 10;i++) {
597 switch (tog) { 597 switch (tog) {
598 case 0: 598 case 0:
599 return -1; 599 return -1;
600 break; 600 break;
601 case 1: 601 case 1:
602 return 0; 602 return 0;
603 break; 603 break;
604 case 2: 604 case 2:
605 return Key_Escape; 605 return Key_F24; //was Escape
606 break; 606 break;
607 case 3: 607 case 3:
608 return Key_Space; 608 return Key_Space;
609 break; 609 break;
610 case 4: 610 case 4:
611 return Key_F12; 611 return Key_F12;
612 break; 612 break;
613 case 5: 613 case 5:
614 return Key_F9; 614 return Key_F9;
615 break; 615 break;
616 case 6: 616 case 6:
617 return Key_F10; 617 return Key_F10;
618 break; 618 break;
619 case 7: 619 case 7:
620 return Key_F11; 620 return Key_F11;
621 break; 621 break;
622 case 8: 622 case 8:
623 return Key_F13; 623 return Key_F13;
624 break; 624 break;
625 }; 625 };
626 } 626 }
627 return -1; 627 return -1;
628} 628}
629 629
630void VMemo::timerBreak() { 630void VMemo::timerBreak() {
631 //stop 631 //stop
632 stopRecording(); 632 stopRecording();
633 QMessageBox::message("Vmemo","Vmemo recording has ended"); 633 QMessageBox::message("Vmemo","Vmemo recording has ended");
634} 634}
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp
index 1a60109..5421bb4 100644
--- a/noncore/settings/sound/soundsettingsbase.cpp
+++ b/noncore/settings/sound/soundsettingsbase.cpp
@@ -93,93 +93,93 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
93 QHBoxLayout *Layout11; 93 QHBoxLayout *Layout11;
94 Layout11 = new QHBoxLayout; 94 Layout11 = new QHBoxLayout;
95 Layout11->setSpacing( 4 ); 95 Layout11->setSpacing( 4 );
96 Layout11->setMargin( 0 ); 96 Layout11->setMargin( 0 );
97 97
98 stereoCheckBox = new QCheckBox( this, "stereoCheckBox" ); 98 stereoCheckBox = new QCheckBox( this, "stereoCheckBox" );
99 stereoCheckBox->setText( tr( "Stereo" ) ); 99 stereoCheckBox->setText( tr( "Stereo" ) );
100 Layout11->addWidget( stereoCheckBox ); 100 Layout11->addWidget( stereoCheckBox );
101 101
102 sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" ); 102 sixteenBitCheckBox = new QCheckBox( this, "sixteenBitCheckBox" );
103 sixteenBitCheckBox->setText( tr( "16 bit" ) ); 103 sixteenBitCheckBox->setText( tr( "16 bit" ) );
104 Layout11->addWidget( sixteenBitCheckBox ); 104 Layout11->addWidget( sixteenBitCheckBox );
105 105
106 AlertCheckBox = new QCheckBox( this, "AlertCheckBox" ); 106 AlertCheckBox = new QCheckBox( this, "AlertCheckBox" );
107 AlertCheckBox->setText( tr( "Visual Alerts" ) ); 107 AlertCheckBox->setText( tr( "Visual Alerts" ) );
108 Layout11->addWidget( AlertCheckBox ); 108 Layout11->addWidget( AlertCheckBox );
109 109
110 SoundSettingsBaseLayout->addLayout( Layout11, 0, 0); 110 SoundSettingsBaseLayout->addLayout( Layout11, 0, 0);
111 111
112 sampleRateLabel = new QLabel(this, "sampleRateLabel" ); 112 sampleRateLabel = new QLabel(this, "sampleRateLabel" );
113 sampleRateLabel->setText( tr( "Sample Rate:" ) ); 113 sampleRateLabel->setText( tr( "Sample Rate:" ) );
114 SoundSettingsBaseLayout->addMultiCellWidget( sampleRateLabel , 1, 1, 0, 0, 1); 114 SoundSettingsBaseLayout->addMultiCellWidget( sampleRateLabel , 1, 1, 0, 0, 1);
115 115
116 sampleRate = new QComboBox( FALSE,this, "sampleRate" ); 116 sampleRate = new QComboBox( FALSE,this, "sampleRate" );
117 117
118 sampleRate->insertItem( tr( "8000" ) ); 118 sampleRate->insertItem( tr( "8000" ) );
119 sampleRate->insertItem( tr( "11025" ) ); 119 sampleRate->insertItem( tr( "11025" ) );
120 sampleRate->insertItem( tr( "22050" ) ); 120 sampleRate->insertItem( tr( "22050" ) );
121 sampleRate->insertItem( tr( "33075" ) ); 121 sampleRate->insertItem( tr( "33075" ) );
122 sampleRate->insertItem( tr( "44100" ) ); 122 sampleRate->insertItem( tr( "44100" ) );
123 SoundSettingsBaseLayout->addMultiCellWidget( sampleRate, 2, 2, 0, 0, 1 ); 123 SoundSettingsBaseLayout->addMultiCellWidget( sampleRate, 2, 2, 0, 0, 1 );
124 124
125 TextLabel1 = new QLabel( this, "TextLabel1" ); 125 TextLabel1 = new QLabel( this, "TextLabel1" );
126 TextLabel1->setText( tr( "Recording Directory:" ) ); 126 TextLabel1->setText( tr( "Recording Directory:" ) );
127 SoundSettingsBaseLayout->addMultiCellWidget( TextLabel1, 3, 3, 0, 0, 1); 127 SoundSettingsBaseLayout->addMultiCellWidget( TextLabel1, 3, 3, 0, 0, 1);
128 128
129 129
130 LocationComboBox = new QComboBox( FALSE, this, "LocationComboBox" ); 130 LocationComboBox = new QComboBox( FALSE, this, "LocationComboBox" );
131 SoundSettingsBaseLayout->addMultiCellWidget( LocationComboBox, 4, 4, 0, 8, 1); 131 SoundSettingsBaseLayout->addMultiCellWidget( LocationComboBox, 4, 4, 0, 8, 1);
132 132
133 QLabel *TextLabelKey; 133 QLabel *TextLabelKey;
134 TextLabelKey = new QLabel( this, "TextLabelKey" ); 134 TextLabelKey = new QLabel( this, "TextLabelKey" );
135 TextLabelKey->setText( tr( "Recording Key:" ) ); 135 TextLabelKey->setText( tr( "Recording Key:" ) );
136 SoundSettingsBaseLayout->addMultiCellWidget(TextLabelKey , 5, 5, 0, 0, 1); 136 SoundSettingsBaseLayout->addMultiCellWidget(TextLabelKey , 5, 5, 0, 0, 1);
137 137
138 keyComboBox = new QComboBox( FALSE, this, "keyComboBox" ); 138 keyComboBox = new QComboBox( FALSE, this, "keyComboBox" );
139 keyComboBox->insertItem( tr( "" ) ); 139 keyComboBox->insertItem( tr( "" ) );
140 keyComboBox->insertItem( tr( "Taskbar Icon" ) ); 140 keyComboBox->insertItem( tr( "Taskbar Icon" ) );
141 keyComboBox->insertItem( tr( "Key_Escape" ) ); 141 keyComboBox->insertItem( tr( "Key_Record" ) );
142 keyComboBox->insertItem( tr( "Key_Space" ) ); 142 keyComboBox->insertItem( tr( "Key_Space" ) );
143 keyComboBox->insertItem( tr( "Key_Home" ) ); 143 keyComboBox->insertItem( tr( "Key_Home" ) );
144 keyComboBox->insertItem( tr( "Key_Calender" ) ); 144 keyComboBox->insertItem( tr( "Key_Calender" ) );
145 keyComboBox->insertItem( tr( "Key_Contacts" ) ); 145 keyComboBox->insertItem( tr( "Key_Contacts" ) );
146 keyComboBox->insertItem( tr( "Key_Menu" ) ); 146 keyComboBox->insertItem( tr( "Key_Menu" ) );
147 keyComboBox->insertItem( tr( "Key_Mail" ) ); 147 keyComboBox->insertItem( tr( "Key_Mail" ) );
148 SoundSettingsBaseLayout->addMultiCellWidget( keyComboBox , 6, 6, 0, 0 ,1); 148 SoundSettingsBaseLayout->addMultiCellWidget( keyComboBox , 6, 6, 0, 0 ,1);
149 149
150 keyLabel= new QLabel( this, "keyLabel" ); 150 keyLabel= new QLabel( this, "keyLabel" );
151 SoundSettingsBaseLayout->addMultiCellWidget( keyLabel , 6, 6, 0, 2, 3); 151 SoundSettingsBaseLayout->addMultiCellWidget( keyLabel , 6, 6, 0, 2, 3);
152 152
153 QLabel *timeLimitLabel; 153 QLabel *timeLimitLabel;
154 timeLimitLabel= new QLabel( this, "timeLimitLabel" ); 154 timeLimitLabel= new QLabel( this, "timeLimitLabel" );
155 timeLimitLabel->setText( tr( "Recording Limit in seconds:" ) ); 155 timeLimitLabel->setText( tr( "Recording Limit in seconds:" ) );
156 SoundSettingsBaseLayout->addMultiCellWidget( timeLimitLabel , 7, 7, 0, 0, 1); 156 SoundSettingsBaseLayout->addMultiCellWidget( timeLimitLabel , 7, 7, 0, 0, 1);
157 157
158 timeLimitComboBox = new QComboBox( FALSE, this, "timeLimitComboBox" ); 158 timeLimitComboBox = new QComboBox( FALSE, this, "timeLimitComboBox" );
159 timeLimitComboBox->insertItem( tr( "30" ) ); 159 timeLimitComboBox->insertItem( tr( "30" ) );
160 timeLimitComboBox->insertItem( tr( "20" ) ); 160 timeLimitComboBox->insertItem( tr( "20" ) );
161 timeLimitComboBox->insertItem( tr( "15" ) ); 161 timeLimitComboBox->insertItem( tr( "15" ) );
162 timeLimitComboBox->insertItem( tr( "10" ) ); 162 timeLimitComboBox->insertItem( tr( "10" ) );
163 timeLimitComboBox->insertItem( tr( "5" ) ); 163 timeLimitComboBox->insertItem( tr( "5" ) );
164 timeLimitComboBox->insertItem( tr( "Unlimited" ) ); 164 timeLimitComboBox->insertItem( tr( "Unlimited" ) );
165 165
166 SoundSettingsBaseLayout->addMultiCellWidget(timeLimitComboBox , 8, 8, 0, 0, 1); 166 SoundSettingsBaseLayout->addMultiCellWidget(timeLimitComboBox , 8, 8, 0, 0, 1);
167 167
168 168
169 restartCheckBox= new QCheckBox( this, "restartCheck" ); 169 restartCheckBox= new QCheckBox( this, "restartCheck" );
170 restartCheckBox->setText( tr( "Restart Opie if needed" ) ); 170 restartCheckBox->setText( tr( "Restart Opie if needed" ) );
171 171
172 SoundSettingsBaseLayout->addMultiCellWidget( restartCheckBox , 9, 9, 0, 0, 1); 172 SoundSettingsBaseLayout->addMultiCellWidget( restartCheckBox , 9, 9, 0, 0, 1);
173 173
174 174
175 QSpacerItem* spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding ); 175 QSpacerItem* spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding );
176 SoundSettingsBaseLayout->addItem( spacer4, 9, 0 ); 176 SoundSettingsBaseLayout->addItem( spacer4, 9, 0 );
177} 177}
178 178
179/* 179/*
180 * Destroys the object and frees any allocated resources 180 * Destroys the object and frees any allocated resources
181 */ 181 */
182SoundSettingsBase::~SoundSettingsBase() 182SoundSettingsBase::~SoundSettingsBase()
183{ 183{
184 // no need to delete child widgets, Qt does it all for us 184 // no need to delete child widgets, Qt does it all for us
185} 185}