summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opierec/qtrec.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opierec/qtrec.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opierec/qtrec.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/noncore/multimedia/opierec/qtrec.cpp b/noncore/multimedia/opierec/qtrec.cpp
index 0a6e5ae..f2035ef 100644
--- a/noncore/multimedia/opierec/qtrec.cpp
+++ b/noncore/multimedia/opierec/qtrec.cpp
@@ -740,82 +740,82 @@ void QtRec::initIconView() {
740 item->setPixmap( 0, image0); 740 item->setPixmap( 0, image0);
741 if( currentFileName == filePath) 741 if( currentFileName == filePath)
742 ListView1->setSelected( item, true); 742 ListView1->setSelected( item, true);
743 } 743 }
744 } 744 }
745} 745}
746 746
747void QtRec::initConnections() { 747void QtRec::initConnections() {
748 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 748 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
749 749
750 connect( toBeginningButton, SIGNAL( pressed()), 750 connect( toBeginningButton, SIGNAL( pressed()),
751 this, SLOT( rewindPressed() )); 751 this, SLOT( rewindPressed() ));
752 connect( toBeginningButton, SIGNAL( released()), 752 connect( toBeginningButton, SIGNAL( released()),
753 this, SLOT( rewindReleased() )); 753 this, SLOT( rewindReleased() ));
754 connect( toEndButton, SIGNAL( pressed()), 754 connect( toEndButton, SIGNAL( pressed()),
755 this, SLOT( FastforwardPressed() )); 755 this, SLOT( FastforwardPressed() ));
756 connect( toEndButton, SIGNAL( released()), 756 connect( toEndButton, SIGNAL( released()),
757 this, SLOT( FastforwardReleased() )); 757 this, SLOT( FastforwardReleased() ));
758 connect( deleteSoundButton, SIGNAL(released()), 758 connect( deleteSoundButton, SIGNAL(released()),
759 this, SLOT( deleteSound() )); 759 this, SLOT( deleteSound() ));
760 connect( Stop_PushButton, SIGNAL(released()), 760 connect( Stop_PushButton, SIGNAL(released()),
761 this, SLOT( doPlayBtn() )); 761 this, SLOT( doPlayBtn() ));
762 connect( Rec_PushButton, SIGNAL(released()), 762 connect( Rec_PushButton, SIGNAL(released()),
763 this, SLOT( newSound() ) ); 763 this, SLOT( newSound() ) );
764 connect( TabWidget, SIGNAL( currentChanged( QWidget*)), 764 connect( TabWidget, SIGNAL( currentChanged(QWidget*)),
765 this, SLOT(thisTab(QWidget*) )); 765 this, SLOT(thisTab(QWidget*) ));
766 connect( OutputSlider, SIGNAL(sliderReleased()), 766 connect( OutputSlider, SIGNAL(sliderReleased()),
767 this, SLOT( changedOutVolume()) ); 767 this, SLOT( changedOutVolume()) );
768 connect( InputSlider, SIGNAL(sliderReleased()), 768 connect( InputSlider, SIGNAL(sliderReleased()),
769 this, SLOT( changedInVolume()) ); 769 this, SLOT( changedInVolume()) );
770 770
771 connect( sampleRateComboBox, SIGNAL(activated( int)), 771 connect( sampleRateComboBox, SIGNAL(activated(int)),
772 this, SLOT( changesamplerateCombo(int)) ); 772 this, SLOT( changesamplerateCombo(int)) );
773 connect( bitRateComboBox, SIGNAL(activated( int)), 773 connect( bitRateComboBox, SIGNAL(activated(int)),
774 this, SLOT( changebitrateCombo(int)) ); 774 this, SLOT( changebitrateCombo(int)) );
775 775
776 connect( directoryComboBox, SIGNAL(activated( int)), 776 connect( directoryComboBox, SIGNAL(activated(int)),
777 this, SLOT( changeDirCombo(int)) ); 777 this, SLOT( changeDirCombo(int)) );
778 connect( sizeLimitCombo, SIGNAL(activated( int)), 778 connect( sizeLimitCombo, SIGNAL(activated(int)),
779 this, SLOT( changeSizeLimitCombo(int)) ); 779 this, SLOT( changeSizeLimitCombo(int)) );
780 780
781 connect( stereoCheckBox, SIGNAL(toggled( bool)), 781 connect( stereoCheckBox, SIGNAL(toggled(bool)),
782 this, SLOT( changeStereoCheck(bool)) ); 782 this, SLOT( changeStereoCheck(bool)) );
783 783
784 connect( outMuteCheckBox, SIGNAL(toggled( bool)), 784 connect( outMuteCheckBox, SIGNAL(toggled(bool)),
785 this, SLOT( doVolMuting(bool)) ); 785 this, SLOT( doVolMuting(bool)) );
786 connect( inMuteCheckBox , SIGNAL(toggled( bool)), 786 connect( inMuteCheckBox , SIGNAL(toggled(bool)),
787 this, SLOT( doMicMuting(bool)) ); 787 this, SLOT( doMicMuting(bool)) );
788 788
789 connect( ListView1,SIGNAL(doubleClicked( QListViewItem*)), 789 connect( ListView1,SIGNAL(doubleClicked(QListViewItem*)),
790 this,SLOT( itClick(QListViewItem*))); 790 this,SLOT( itClick(QListViewItem*)));
791 connect( ListView1, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), 791 connect( ListView1, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),
792 this,SLOT( listPressed(int, QListViewItem *, const QPoint&, int)) ); 792 this,SLOT( listPressed(int,QListViewItem*,const QPoint&,int)) );
793 connect( timeSlider, SIGNAL( sliderMoved( int)), 793 connect( timeSlider, SIGNAL( sliderMoved(int)),
794 this, SLOT( changeTimeSlider(int) )); 794 this, SLOT( changeTimeSlider(int) ));
795 connect( timeSlider, SIGNAL( sliderPressed( )), 795 connect( timeSlider, SIGNAL( sliderPressed()),
796 this, SLOT( timeSliderPressed() )); 796 this, SLOT( timeSliderPressed() ));
797 connect( timeSlider, SIGNAL( sliderReleased( )), 797 connect( timeSlider, SIGNAL( sliderReleased()),
798 this, SLOT( timeSliderReleased() )); 798 this, SLOT( timeSliderReleased() ));
799 connect( compressionCheckBox, SIGNAL( toggled(bool)), 799 connect( compressionCheckBox, SIGNAL( toggled(bool)),
800 this, SLOT( compressionSelected(bool))); 800 this, SLOT( compressionSelected(bool)));
801 connect( autoMuteCheckBox, SIGNAL( toggled(bool)), 801 connect( autoMuteCheckBox, SIGNAL( toggled(bool)),
802 this, SLOT( slotAutoMute(bool))); 802 this, SLOT( slotAutoMute(bool)));
803} 803}
804 804
805void QtRec::initConfig() { 805void QtRec::initConfig() {
806 int index, fred, i; 806 int index, fred, i;
807 Config cfg("OpieRec"); 807 Config cfg("OpieRec");
808 cfg.setGroup("Settings"); 808 cfg.setGroup("Settings");
809 809
810 index = cfg.readNumEntry("samplerate",22050); 810 index = cfg.readNumEntry("samplerate",22050);
811 bool ok; 811 bool ok;
812 812
813 for(int ws=0;ws<sampleRateComboBox->count();ws++) { 813 for(int ws=0;ws<sampleRateComboBox->count();ws++) {
814 fred = sampleRateComboBox->text(ws).toInt(&ok, 10); 814 fred = sampleRateComboBox->text(ws).toInt(&ok, 10);
815 if( index == fred) { 815 if( index == fred) {
816 filePara.sampleRate = fred; 816 filePara.sampleRate = fred;
817 sampleRateComboBox->setCurrentItem(ws); 817 sampleRateComboBox->setCurrentItem(ws);
818 } 818 }
819 } 819 }
820 820
821 i = cfg.readNumEntry("bitrate",16); 821 i = cfg.readNumEntry("bitrate",16);
@@ -1635,49 +1635,49 @@ void QtRec::showListMenu(QListViewItem * item) {
1635 1635
1636void QtRec::fileBeamFinished( Ir *ir) { 1636void QtRec::fileBeamFinished( Ir *ir) {
1637 if(ir) 1637 if(ir)
1638 QMessageBox::message( tr("Ir Beam out"), tr("Ir sent.") ,tr("Ok") ); 1638 QMessageBox::message( tr("Ir Beam out"), tr("Ir sent.") ,tr("Ok") );
1639 1639
1640} 1640}
1641 1641
1642void QtRec::doBeam() { 1642void QtRec::doBeam() {
1643 qApp->processEvents(); 1643 qApp->processEvents();
1644 if( ListView1->currentItem() == NULL) 1644 if( ListView1->currentItem() == NULL)
1645 return; 1645 return;
1646 Ir ir; 1646 Ir ir;
1647 if( ir.supported()) { 1647 if( ir.supported()) {
1648 QString file = ListView1->currentItem()->text(0); 1648 QString file = ListView1->currentItem()->text(0);
1649 Config cfg("OpieRec"); 1649 Config cfg("OpieRec");
1650 cfg.setGroup("Sounds"); 1650 cfg.setGroup("Sounds");
1651 1651
1652 int nFiles = cfg.readNumEntry("NumberofFiles",0); 1652 int nFiles = cfg.readNumEntry("NumberofFiles",0);
1653 1653
1654 for(int i=0;i<nFiles+1;i++) { 1654 for(int i=0;i<nFiles+1;i++) {
1655 if( cfg.readEntry( QString::number( i),"").find( file, 0, true) != -1) { 1655 if( cfg.readEntry( QString::number( i),"").find( file, 0, true) != -1) {
1656 QString filePath = cfg.readEntry(file,""); 1656 QString filePath = cfg.readEntry(file,"");
1657 Ir *file = new Ir(this, "IR"); 1657 Ir *file = new Ir(this, "IR");
1658 connect( file, SIGNAL( done(Ir*)), 1658 connect( file, SIGNAL( done(Ir*)),
1659 this, SLOT( fileBeamFinished( Ir * ))); 1659 this, SLOT( fileBeamFinished(Ir*)));
1660 file->send( filePath, "OPieRec audio file\n" + filePath ); 1660 file->send( filePath, "OPieRec audio file\n" + filePath );
1661 } 1661 }
1662 } 1662 }
1663 } 1663 }
1664} 1664}
1665 1665
1666void QtRec::doMenuPlay() { 1666void QtRec::doMenuPlay() {
1667 qApp->processEvents(); 1667 qApp->processEvents();
1668 currentFile = ListView1->currentItem()->text(0); 1668 currentFile = ListView1->currentItem()->text(0);
1669} 1669}
1670 1670
1671void QtRec::doRename() { 1671void QtRec::doRename() {
1672 QRect r = ListView1->itemRect( ListView1->currentItem( )); 1672 QRect r = ListView1->itemRect( ListView1->currentItem( ));
1673 r = QRect( ListView1->viewportToContents( r.topLeft() ), r.size() ); 1673 r = QRect( ListView1->viewportToContents( r.topLeft() ), r.size() );
1674 r.setX( ListView1->contentsX() ); 1674 r.setX( ListView1->contentsX() );
1675 if ( r.width() > ListView1->visibleWidth() ) 1675 if ( r.width() > ListView1->visibleWidth() )
1676 r.setWidth( ListView1->visibleWidth() ); 1676 r.setWidth( ListView1->visibleWidth() );
1677 1677
1678 renameBox = new QLineEdit( ListView1->viewport(), "qt_renamebox" ); 1678 renameBox = new QLineEdit( ListView1->viewport(), "qt_renamebox" );
1679 renameBox->setFrame(true); 1679 renameBox->setFrame(true);
1680 1680
1681 renameBox->setText( ListView1->currentItem()->text(0) ); 1681 renameBox->setText( ListView1->currentItem()->text(0) );
1682 1682
1683 renameBox->selectAll(); 1683 renameBox->selectAll();