summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opierec
Unidiff
Diffstat (limited to 'noncore/multimedia/opierec') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opierec/opierec.control6
-rw-r--r--noncore/multimedia/opierec/qtrec.cpp30
2 files changed, 18 insertions, 18 deletions
diff --git a/noncore/multimedia/opierec/opierec.control b/noncore/multimedia/opierec/opierec.control
index 96c1b69..a1a2b7e 100644
--- a/noncore/multimedia/opierec/opierec.control
+++ b/noncore/multimedia/opierec/opierec.control
@@ -1,10 +1,10 @@
1Package: opie-rec 1Package: opierec
2Files: bin/opierec pics/opierec apps/Applications/opierec.desktop 2Files: bin/opierec pics/opierec apps/Applications/opierec.desktop
3Priority: optional 3Priority: optional
4Section: multimedia/applications 4Section: multimedia/applications
5Maintainer: L.J. Potter <ljp@llornkcor.com> 5Maintainer: L.J. Potter <ljp@llornkcor.com>
6Architecture: arm 6Architecture: arm
7Version: 1.5-2 7Depends: opie ($QPE_VERSION)
8Depends: task-opie-minimal
9Description: audio sampling recorder 8Description: audio sampling recorder
10 A simple audio recording/playing application. 9 A simple audio recording/playing application.
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/multimedia/opierec/qtrec.cpp b/noncore/multimedia/opierec/qtrec.cpp
index 0307d99..147f63d 100644
--- a/noncore/multimedia/opierec/qtrec.cpp
+++ b/noncore/multimedia/opierec/qtrec.cpp
@@ -440,46 +440,46 @@ void QtRec::init() {
440 layout1->setSpacing( 2); 440 layout1->setSpacing( 2);
441 layout1->setMargin( 2); 441 layout1->setMargin( 2);
442 442
443 timeSlider = new QSlider( 0,100,10,0, QSlider::Horizontal, tab, (const char *) "timeSlider" ); 443 timeSlider = new QSlider( 0,100,10,0, QSlider::Horizontal, tab, (const char *) "timeSlider" );
444 // timeSlider->setFixedWidth(150); 444 // timeSlider->setFixedWidth(150);
445 layout1->addMultiCellWidget( timeSlider, 1, 1, 0, 3); 445 layout1->addMultiCellWidget( timeSlider, 1, 1, 0, 3);
446// timeSlider->setTickmarks(QSlider::Above); 446// timeSlider->setTickmarks(QSlider::Above);
447 447
448 timeLabel = new QLabel( tab, "TimeLabel" ); 448 timeLabel = new QLabel( tab, "TimeLabel" );
449 layout1->addMultiCellWidget( timeLabel, 0, 0, 0, 3); 449 layout1->addMultiCellWidget( timeLabel, 0, 0, 0, 3);
450 450
451 playLabel2 = new QLabel(tab, "PlayLabel2" ); 451 playLabel2 = new QLabel(tab, "PlayLabel2" );
452 playLabel2->setText("Play"); 452 playLabel2->setText(tr("Play") );
453 playLabel2->setFixedHeight(18); 453 playLabel2->setFixedHeight(18);
454 layout1->addMultiCellWidget( playLabel2, 0, 0, 4, 4); 454 layout1->addMultiCellWidget( playLabel2, 0, 0, 4, 4);
455 455
456 Stop_PushButton = new QPushButton( tab, "Stop_PushButton" ); 456 Stop_PushButton = new QPushButton( tab, "Stop_PushButton" );
457 layout1->addMultiCellWidget( Stop_PushButton, 1, 1, 4, 4); 457 layout1->addMultiCellWidget( Stop_PushButton, 1, 1, 4, 4);
458 Stop_PushButton->setFixedSize(22,22); 458 Stop_PushButton->setFixedSize(22,22);
459 Stop_PushButton->setPixmap( image4 ); 459 Stop_PushButton->setPixmap( image4 );
460 460
461 toBeginningButton = new QPushButton( tab, "Beginning_PushButton" ); 461 toBeginningButton = new QPushButton( tab, "Beginning_PushButton" );
462 layout1->addMultiCellWidget(toBeginningButton, 1, 1, 5, 5); 462 layout1->addMultiCellWidget(toBeginningButton, 1, 1, 5, 5);
463 toBeginningButton->setFixedSize(22,22); 463 toBeginningButton->setFixedSize(22,22);
464 toBeginningButton->setPixmap( Resource::loadPixmap("fastback") ); 464 toBeginningButton->setPixmap( Resource::loadPixmap("fastback") );
465 465
466 toEndButton = new QPushButton( tab, "End_PushButton" ); 466 toEndButton = new QPushButton( tab, "End_PushButton" );
467 layout1->addMultiCellWidget( toEndButton, 1, 1, 6, 6); 467 layout1->addMultiCellWidget( toEndButton, 1, 1, 6, 6);
468 toEndButton->setFixedSize(22,22); 468 toEndButton->setFixedSize(22,22);
469 toEndButton->setPixmap( Resource::loadPixmap( "fastforward" ) ); 469 toEndButton->setPixmap( Resource::loadPixmap( "fastforward" ) );
470 470
471 QLabel *recLabel2; 471 QLabel *recLabel2;
472 recLabel2 = new QLabel( tab, "recLabel2" ); 472 recLabel2 = new QLabel( tab, "recLabel2" );
473 recLabel2->setText("Rec"); 473 recLabel2->setText(tr("Rec"));
474 recLabel2->setFixedHeight(18); 474 recLabel2->setFixedHeight(18);
475 layout1->addMultiCellWidget( recLabel2, 0, 0, 7, 7); 475 layout1->addMultiCellWidget( recLabel2, 0, 0, 7, 7);
476 476
477 Rec_PushButton = new QPushButton( tab, "Rec_PushButton" ); 477 Rec_PushButton = new QPushButton( tab, "Rec_PushButton" );
478 layout1->addMultiCellWidget( Rec_PushButton, 1, 1, 7, 7); 478 layout1->addMultiCellWidget( Rec_PushButton, 1, 1, 7, 7);
479 Rec_PushButton->setFixedSize(22,22); 479 Rec_PushButton->setFixedSize(22,22);
480 Rec_PushButton->setPixmap( image6 ); 480 Rec_PushButton->setPixmap( image6 );
481 481
482 t = new QTimer( this ); 482 t = new QTimer( this );
483 connect( t, SIGNAL( timeout() ), SLOT( timerBreak() ) ); 483 connect( t, SIGNAL( timeout() ), SLOT( timerBreak() ) );
484 484
485 rewindTimer = new QTimer( this ); 485 rewindTimer = new QTimer( this );
@@ -491,27 +491,27 @@ void QtRec::init() {
491 deleteSoundButton = new QPushButton( tab, "deleteSoundButton" ); 491 deleteSoundButton = new QPushButton( tab, "deleteSoundButton" );
492 layout1->addMultiCellWidget( deleteSoundButton, 1, 1, 8, 8); 492 layout1->addMultiCellWidget( deleteSoundButton, 1, 1, 8, 8);
493 deleteSoundButton->setText( tr( "Delete" ) ); 493 deleteSoundButton->setText( tr( "Delete" ) );
494 494
495 ListView1 = new QListView( tab, "IconView1" ); 495 ListView1 = new QListView( tab, "IconView1" );
496 layout1->addMultiCellWidget( ListView1, 2, 2, 0, 8); 496 layout1->addMultiCellWidget( ListView1, 2, 2, 0, 8);
497 497
498 ListView1->addColumn( tr( "Name" ) ); 498 ListView1->addColumn( tr( "Name" ) );
499 ListView1->setColumnWidth(0,140); 499 ListView1->setColumnWidth(0,140);
500 ListView1->setSorting( 1, false); 500 ListView1->setSorting( 1, false);
501 ListView1->addColumn( tr( "Time" ) ); //in seconds 501 ListView1->addColumn( tr( "Time" ) ); //in seconds
502 ListView1->setColumnWidth(1,50); 502 ListView1->setColumnWidth(1,50);
503 ListView1->addColumn( "Location"); 503 ListView1->addColumn( tr("Location") );
504 ListView1->setColumnWidth(2,50); 504 ListView1->setColumnWidth(2,50);
505 ListView1->addColumn( "Date"); 505 ListView1->addColumn( tr("Date") );
506 ListView1->setColumnWidth(3,63); 506 ListView1->setColumnWidth(3,63);
507 507
508 ListView1->setColumnWidthMode(0,QListView::Manual); 508 ListView1->setColumnWidthMode(0,QListView::Manual);
509 ListView1->setColumnAlignment(1,QListView::AlignCenter); 509 ListView1->setColumnAlignment(1,QListView::AlignCenter);
510 ListView1->setColumnAlignment(2,QListView::AlignRight); 510 ListView1->setColumnAlignment(2,QListView::AlignRight);
511 ListView1->setColumnAlignment(3,QListView::AlignLeft); 511 ListView1->setColumnAlignment(3,QListView::AlignLeft);
512 ListView1->setAllColumnsShowFocus( true ); 512 ListView1->setAllColumnsShowFocus( true );
513 QPEApplication::setStylusOperation( ListView1->viewport(),QPEApplication::RightOnHold); 513 QPEApplication::setStylusOperation( ListView1->viewport(),QPEApplication::RightOnHold);
514 514
515 TabWidget->insertTab( tab, tr( "Files" ) ); 515 TabWidget->insertTab( tab, tr( "Files" ) );
516 516
517 ///**********<<<<<<<<<<<<>>>>>>>>>>>>*************** 517 ///**********<<<<<<<<<<<<>>>>>>>>>>>>***************
@@ -585,28 +585,28 @@ void QtRec::init() {
585 585
586 bitGroup = new QGroupBox( tab_3, "bitGroup" ); 586 bitGroup = new QGroupBox( tab_3, "bitGroup" );
587 bitGroup->setTitle( tr( "Bit Depth" ) ); 587 bitGroup->setTitle( tr( "Bit Depth" ) );
588 bitGroup->setFixedSize(65,50); 588 bitGroup->setFixedSize(65,50);
589 589
590 bitRateComboBox = new QComboBox( false, bitGroup, "BitRateComboBox" ); 590 bitRateComboBox = new QComboBox( false, bitGroup, "BitRateComboBox" );
591 bitRateComboBox->insertItem( tr( "16" ) ); 591 bitRateComboBox->insertItem( tr( "16" ) );
592 bitRateComboBox->insertItem( tr( "8" ) ); 592 bitRateComboBox->insertItem( tr( "8" ) );
593 bitRateComboBox->setGeometry( QRect( 5, 20, 50, 25 ) ); 593 bitRateComboBox->setGeometry( QRect( 5, 20, 50, 25 ) );
594 594
595 Layout18->addWidget( bitGroup ); 595 Layout18->addWidget( bitGroup );
596 596
597 compressionCheckBox = new QCheckBox ( "Wave Compression (smaller files)", tab_3 ); 597 compressionCheckBox = new QCheckBox ( tr("Wave Compression (smaller files)"), tab_3 );
598 Layout18->addWidget( compressionCheckBox ); 598 Layout18->addWidget( compressionCheckBox );
599 599
600 autoMuteCheckBox= new QCheckBox ( "auto Mute", tab_3 ); 600 autoMuteCheckBox= new QCheckBox ( tr("auto Mute"), tab_3 );
601 Layout18->addWidget( autoMuteCheckBox ); 601 Layout18->addWidget( autoMuteCheckBox );
602 602
603 Layout19->addLayout( Layout18 ); 603 Layout19->addLayout( Layout18 );
604 604
605 QWidget *d = QApplication::desktop(); 605 QWidget *d = QApplication::desktop();
606 int width=d->width(); 606 int width=d->width();
607 int height=d->height(); 607 int height=d->height();
608 608
609 609
610 610
611 if( width < height) { 611 if( width < height) {
612 612
@@ -635,28 +635,28 @@ void QtRec::init() {
635 TextLabel3->setText( tr( "Out" ) ); 635 TextLabel3->setText( tr( "Out" ) );
636 Layout15b->addWidget( TextLabel3 ); 636 Layout15b->addWidget( TextLabel3 );
637 637
638 InputSlider = new QSlider( -100, 0, 10, 0, QSlider::Vertical, tab_5, (const char *) "InputSlider" ); 638 InputSlider = new QSlider( -100, 0, 10, 0, QSlider::Vertical, tab_5, (const char *) "InputSlider" );
639 InputSlider->setTickmarks(QSlider::Both); 639 InputSlider->setTickmarks(QSlider::Both);
640 Layout15->addWidget( InputSlider); 640 Layout15->addWidget( InputSlider);
641 641
642 OutputSlider = new QSlider( -100,0,10,0, QSlider::Vertical,tab_5,(const char *) "OutputSlider" ); 642 OutputSlider = new QSlider( -100,0,10,0, QSlider::Vertical,tab_5,(const char *) "OutputSlider" );
643 OutputSlider->setTickmarks(QSlider::Both); 643 OutputSlider->setTickmarks(QSlider::Both);
644 644
645 Layout15b->addWidget( OutputSlider ); 645 Layout15b->addWidget( OutputSlider );
646 646
647 outMuteCheckBox = new QCheckBox ( "mute", tab_5 ); 647 outMuteCheckBox = new QCheckBox ( tr("mute"), tab_5 );
648 Layout15->addWidget( outMuteCheckBox ); 648 Layout15->addWidget( outMuteCheckBox );
649 649
650 inMuteCheckBox = new QCheckBox ( "mute", tab_5 ); 650 inMuteCheckBox = new QCheckBox ( tr("mute"), tab_5 );
651 inMuteCheckBox-> setFocusPolicy ( QWidget::NoFocus ); 651 inMuteCheckBox-> setFocusPolicy ( QWidget::NoFocus );
652 Layout15b->addWidget( inMuteCheckBox ); 652 Layout15b->addWidget( inMuteCheckBox );
653 653
654 654
655 Layout19a->addLayout( Layout15 ); 655 Layout19a->addLayout( Layout15 );
656 Layout19a->addLayout( Layout15b ); 656 Layout19a->addLayout( Layout15b );
657 657
658 fillDirectoryCombo(); 658 fillDirectoryCombo();
659 659
660 TabWidget->insertTab( tab_3, tr( "Options" ) ); 660 TabWidget->insertTab( tab_3, tr( "Options" ) );
661 661
662 TabWidget->insertTab( tab_5, tr( "Volume" ) ); 662 TabWidget->insertTab( tab_5, tr( "Volume" ) );
@@ -682,28 +682,28 @@ void QtRec::init() {
682 TextLabel3->setText( tr( "Out" ) ); 682 TextLabel3->setText( tr( "Out" ) );
683 Layout15b->addWidget( TextLabel3 ); 683 Layout15b->addWidget( TextLabel3 );
684 684
685 InputSlider = new QSlider( -100, 0, 10, 0, QSlider::Vertical, tab_3, (const char *) "InputSlider" ); 685 InputSlider = new QSlider( -100, 0, 10, 0, QSlider::Vertical, tab_3, (const char *) "InputSlider" );
686 // InputSlider->setTickmarks(QSlider::Both); 686 // InputSlider->setTickmarks(QSlider::Both);
687 Layout15->addWidget( InputSlider); 687 Layout15->addWidget( InputSlider);
688 688
689 OutputSlider = new QSlider( -100,0,10,0, QSlider::Vertical,tab_3,(const char *) "OutputSlider" ); 689 OutputSlider = new QSlider( -100,0,10,0, QSlider::Vertical,tab_3,(const char *) "OutputSlider" );
690 // OutputSlider->setTickmarks(QSlider::Both); 690 // OutputSlider->setTickmarks(QSlider::Both);
691 691
692 Layout15b->addWidget( OutputSlider ); 692 Layout15b->addWidget( OutputSlider );
693 693
694 outMuteCheckBox = new QCheckBox ( "mute", tab_3 ); 694 outMuteCheckBox = new QCheckBox ( tr("mute"), tab_3 );
695 Layout15->addWidget( outMuteCheckBox ); 695 Layout15->addWidget( outMuteCheckBox );
696 696
697 inMuteCheckBox = new QCheckBox ( "mute", tab_3 ); 697 inMuteCheckBox = new QCheckBox ( tr("mute"), tab_3 );
698 inMuteCheckBox-> setFocusPolicy ( QWidget::NoFocus ); 698 inMuteCheckBox-> setFocusPolicy ( QWidget::NoFocus );
699 Layout15b->addWidget( inMuteCheckBox ); 699 Layout15b->addWidget( inMuteCheckBox );
700 700
701 701
702 Layout19->addLayout( Layout15 ); 702 Layout19->addLayout( Layout15 );
703 Layout19->addLayout( Layout15b ); 703 Layout19->addLayout( Layout15b );
704 704
705 fillDirectoryCombo(); 705 fillDirectoryCombo();
706 706
707 TabWidget->insertTab( tab_3, tr( "Options" ) ); 707 TabWidget->insertTab( tab_3, tr( "Options" ) );
708 708
709 } 709 }
@@ -866,29 +866,29 @@ void QtRec::stop() {
866 866
867 if( !recording) 867 if( !recording)
868 endPlaying(); 868 endPlaying();
869 else 869 else
870 endRecording(); 870 endRecording();
871 timeSlider->setValue(0); 871 timeSlider->setValue(0);
872 // QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << true; // mute device 872 // QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << true; // mute device
873} 873}
874 874
875void QtRec::doPlayBtn() { 875void QtRec::doPlayBtn() {
876 876
877 if(!stopped) { 877 if(!stopped) {
878 playLabel2->setText("Play"); 878 playLabel2->setText(tr("Play"));
879 stop(); 879 stop();
880 } else { 880 } else {
881 if(ListView1->currentItem() == 0) return; 881 if(ListView1->currentItem() == 0) return;
882 playLabel2->setText("Stop"); 882 playLabel2->setText(tr("Stop"));
883 currentFile = ListView1->currentItem()->text(0); 883 currentFile = ListView1->currentItem()->text(0);
884 start(); 884 start();
885 } 885 }
886} 886}
887 887
888void QtRec::start() { //play 888void QtRec::start() { //play
889 if(stopped) { 889 if(stopped) {
890 qDebug("start::"); 890 qDebug("start::");
891 QPixmap image3( ( const char** ) image3_data ); 891 QPixmap image3( ( const char** ) image3_data );
892 Stop_PushButton->setPixmap( image3 ); 892 Stop_PushButton->setPixmap( image3 );
893 Stop_PushButton->setDown(true); 893 Stop_PushButton->setDown(true);
894 stopped=false; 894 stopped=false;
@@ -901,25 +901,25 @@ void QtRec::start() { //play
901 } 901 }
902} 902}
903 903
904bool QtRec::rec() { //record 904bool QtRec::rec() { //record
905 qDebug("rec()"); 905 qDebug("rec()");
906 if(!stopped) { 906 if(!stopped) {
907 qDebug("rec:: !stopped"); 907 qDebug("rec:: !stopped");
908 monitoring=true; 908 monitoring=true;
909 return false; 909 return false;
910 } else { 910 } else {
911 qDebug("go ahead and record"); 911 qDebug("go ahead and record");
912 secCount=1; 912 secCount=1;
913 playLabel2->setText("Stop"); 913 playLabel2->setText(tr("Stop"));
914 monitoring=false; 914 monitoring=false;
915 setRecordButton(true); 915 setRecordButton(true);
916 stopped=false; 916 stopped=false;
917 917
918 if( setupAudio( true)) 918 if( setupAudio( true))
919 if(setUpFile()) { 919 if(setUpFile()) {
920 qDebug("Ok to start recording"); 920 qDebug("Ok to start recording");
921 int fileSize=0; 921 int fileSize=0;
922 Config cfg("OpieRec"); 922 Config cfg("OpieRec");
923 cfg.setGroup("Settings"); 923 cfg.setGroup("Settings");
924 qDebug( "<<<<<<<Device bits %d, device rate %d, device channels %d", 924 qDebug( "<<<<<<<Device bits %d, device rate %d, device channels %d",
925 soundDevice->getDeviceBits(), 925 soundDevice->getDeviceBits(),
@@ -2150,33 +2150,33 @@ QString QtRec::getStorage(const QString &fileName) {
2150 // endmntent( mntfp ); 2150 // endmntent( mntfp );
2151} 2151}
2152 2152
2153void QtRec::setRecordButton(bool b) { 2153void QtRec::setRecordButton(bool b) {
2154 2154
2155 if(b) { //about to record or play 2155 if(b) { //about to record or play
2156 2156
2157 Rec_PushButton->setDown(true); 2157 Rec_PushButton->setDown(true);
2158 QPixmap image3( ( const char** ) image3_data ); 2158 QPixmap image3( ( const char** ) image3_data );
2159 Stop_PushButton->setPixmap( image3 ); 2159 Stop_PushButton->setPixmap( image3 );
2160 if(Stop_PushButton->isDown()) 2160 if(Stop_PushButton->isDown())
2161 Stop_PushButton->setDown(true); 2161 Stop_PushButton->setDown(true);
2162 playLabel2->setText("Stop"); 2162 playLabel2->setText(tr("Stop") );
2163 2163
2164 } else { //about to stop 2164 } else { //about to stop
2165 2165
2166 QPixmap image4( ( const char** ) image4_data ); 2166 QPixmap image4( ( const char** ) image4_data );
2167 Stop_PushButton->setPixmap( image4); 2167 Stop_PushButton->setPixmap( image4);
2168 if(Stop_PushButton->isDown()) 2168 if(Stop_PushButton->isDown())
2169 Stop_PushButton->setDown(false); 2169 Stop_PushButton->setDown(false);
2170 playLabel2->setText("Play"); 2170 playLabel2->setText(tr("Play") );
2171 if(Rec_PushButton->isDown()) 2171 if(Rec_PushButton->isDown())
2172 Rec_PushButton->setDown( false); 2172 Rec_PushButton->setDown( false);
2173 } 2173 }
2174} 2174}
2175 2175
2176void QtRec::fillDirectoryCombo() { 2176void QtRec::fillDirectoryCombo() {
2177 if( directoryComboBox->count() > 0) 2177 if( directoryComboBox->count() > 0)
2178 directoryComboBox->clear(); 2178 directoryComboBox->clear();
2179 int index=0; 2179 int index=0;
2180 Config cfg("OpieRec"); 2180 Config cfg("OpieRec");
2181 cfg.setGroup("Settings"); 2181 cfg.setGroup("Settings");
2182 QString dir= cfg.readEntry("directory", "/"); 2182 QString dir= cfg.readEntry("directory", "/");