-rw-r--r-- | noncore/multimedia/opierec/qtrec.cpp | 101 | ||||
-rw-r--r-- | noncore/multimedia/opierec/qtrec.h | 2 |
2 files changed, 40 insertions, 63 deletions
diff --git a/noncore/multimedia/opierec/qtrec.cpp b/noncore/multimedia/opierec/qtrec.cpp index c237726..6793b4e 100644 --- a/noncore/multimedia/opierec/qtrec.cpp +++ b/noncore/multimedia/opierec/qtrec.cpp | |||
@@ -465,16 +465,14 @@ QtRec::QtRec( QWidget* parent, const char* name, WFlags fl ) | |||
465 | soundDevice->closeDevice( true); | 465 | soundDevice->closeDevice( true); |
466 | soundDevice->sd = -1; | 466 | soundDevice->sd = -1; |
467 | soundDevice = 0; | 467 | soundDevice = 0; |
468 | wavFile = 0; | 468 | wavFile = 0; |
469 | |||
470 | // if( soundDevice) delete soundDevice; | 469 | // if( soundDevice) delete soundDevice; |
471 | 470 | QTimer::singleShot(100,this, SLOT(initIconView())); | |
472 | initIconView(); | ||
473 | 471 | ||
474 | if( autoMute) | 472 | if( autoMute) |
475 | doMute( true); | 473 | doMute( true); |
476 | ListView1->setFocus(); | 474 | // ListView1->setFocus(); |
477 | playing = false; | 475 | playing = false; |
478 | } | 476 | } |
479 | 477 | ||
480 | QtRec::~QtRec() { | 478 | QtRec::~QtRec() { |
@@ -728,19 +726,19 @@ void QtRec::init() { | |||
728 | waveform->setBackgroundColor ( black ); | 726 | waveform->setBackgroundColor ( black ); |
729 | } | 727 | } |
730 | 728 | ||
731 | void QtRec::initIconView() { | 729 | void QtRec::initIconView() { |
732 | 730 | owarn << "initIconView" << oendl; | |
733 | ListView1->clear(); | 731 | ListView1->clear(); |
734 | Config cfg("OpieRec"); | 732 | Config cfg("OpieRec"); |
735 | cfg.setGroup("Sounds"); | 733 | cfg.setGroup("Sounds"); |
736 | QString temp; | 734 | QString temp; |
737 | QPixmap image0( ( const char** ) image0_data ); | 735 | QPixmap image0( ( const char** ) image0_data ); |
738 | 736 | ||
739 | int nFiles = cfg.readNumEntry("NumberofFiles",0); | 737 | int nFiles = cfg.readNumEntry("NumberofFiles",0); |
740 | // odebug << "init number of files " << nFiles << "" << oendl; | 738 | owarn << "init number of files " << nFiles << "" << oendl; |
741 | 739 | ||
742 | for(int i=1;i<= nFiles;i++) { | 740 | for(int i = 1; i <= nFiles; i++) { |
743 | 741 | ||
744 | QListViewItem * item; | 742 | QListViewItem * item; |
745 | QString fileS, mediaLocation, fileDate, filePath; | 743 | QString fileS, mediaLocation, fileDate, filePath; |
746 | 744 | ||
@@ -753,8 +751,9 @@ void QtRec::initIconView() { | |||
753 | 751 | ||
754 | fileS = cfg.readEntry( filePath, "0" );// file length in seconds | 752 | fileS = cfg.readEntry( filePath, "0" );// file length in seconds |
755 | mediaLocation = getStorage( filePath); | 753 | mediaLocation = getStorage( filePath); |
756 | if( info.exists()) { | 754 | if( info.exists()) { |
755 | owarn << "new item " << temp << oendl; | ||
757 | item = new QListViewItem( ListView1, temp, fileS /*, mediaLocation, fileDate*/); | 756 | item = new QListViewItem( ListView1, temp, fileS /*, mediaLocation, fileDate*/); |
758 | item->setPixmap( 0, image0); | 757 | item->setPixmap( 0, image0); |
759 | if( currentFileName == filePath) | 758 | if( currentFileName == filePath) |
760 | ListView1->setSelected( item, true); | 759 | ListView1->setSelected( item, true); |
@@ -762,63 +761,41 @@ void QtRec::initIconView() { | |||
762 | } | 761 | } |
763 | } | 762 | } |
764 | 763 | ||
765 | void QtRec::initConnections() { | 764 | void QtRec::initConnections() { |
766 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 765 | connect(qApp,SIGNAL(aboutToQuit()),SLOT(cleanUp())); |
767 | 766 | ||
768 | connect( toBeginningButton, SIGNAL( pressed()), | 767 | connect(toBeginningButton,SIGNAL(pressed()),this,SLOT(rewindPressed())); |
769 | this, SLOT( rewindPressed() )); | 768 | connect(toBeginningButton,SIGNAL(released()),this,SLOT(rewindReleased())); |
770 | connect( toBeginningButton, SIGNAL( released()), | 769 | connect(toEndButton,SIGNAL(pressed()),this,SLOT(FastforwardPressed())); |
771 | this, SLOT( rewindReleased() )); | 770 | connect(toEndButton,SIGNAL(released()),this,SLOT(FastforwardReleased())); |
772 | connect( toEndButton, SIGNAL( pressed()), | 771 | connect(deleteSoundButton,SIGNAL(released()),this,SLOT(deleteSound())); |
773 | this, SLOT( FastforwardPressed() )); | 772 | connect(Stop_PushButton,SIGNAL(released()),this,SLOT(doPlayBtn())); |
774 | connect( toEndButton, SIGNAL( released()), | 773 | connect(Rec_PushButton,SIGNAL(released()),this,SLOT(newSound())); |
775 | this, SLOT( FastforwardReleased() )); | 774 | |
776 | connect( deleteSoundButton, SIGNAL(released()), | 775 | connect(TabWidget,SIGNAL(currentChanged(QWidget*)),this,SLOT(thisTab(QWidget*))); |
777 | this, SLOT( deleteSound() )); | 776 | |
778 | connect( Stop_PushButton, SIGNAL(released()), | 777 | connect(OutputSlider,SIGNAL(sliderReleased()),this,SLOT(changedOutVolume())); |
779 | this, SLOT( doPlayBtn() )); | 778 | connect(InputSlider,SIGNAL(sliderReleased()),this,SLOT(changedInVolume())); |
780 | connect( Rec_PushButton, SIGNAL(released()), | 779 | |
781 | this, SLOT( newSound() ) ); | 780 | connect(sampleRateComboBox,SIGNAL(activated(int)),this,SLOT(changesamplerateCombo(int))); |
782 | connect( TabWidget, SIGNAL( currentChanged(QWidget*)), | 781 | connect(bitRateComboBox,SIGNAL(activated(int)),this,SLOT(changebitrateCombo(int))); |
783 | this, SLOT(thisTab(QWidget*) )); | 782 | connect(directoryComboBox,SIGNAL(activated(int)),this,SLOT(changeDirCombo(int))); |
784 | connect( OutputSlider, SIGNAL(sliderReleased()), | 783 | connect(sizeLimitCombo,SIGNAL(activated(int)),this,SLOT(changeSizeLimitCombo(int))); |
785 | this, SLOT( changedOutVolume()) ); | 784 | |
786 | connect( InputSlider, SIGNAL(sliderReleased()), | 785 | connect(stereoCheckBox,SIGNAL(toggled(bool)),this,SLOT(changeStereoCheck(bool))); |
787 | this, SLOT( changedInVolume()) ); | 786 | connect(outMuteCheckBox,SIGNAL(toggled(bool)),this,SLOT(doVolMuting(bool))); |
788 | 787 | connect(inMuteCheckBox,SIGNAL(toggled(bool)),this,SLOT(doMicMuting(bool))); | |
789 | connect( sampleRateComboBox, SIGNAL(activated(int)), | 788 | |
790 | this, SLOT( changesamplerateCombo(int)) ); | 789 | connect(ListView1,SIGNAL(doubleClicked(QListViewItem*)),this,SLOT(itClick(QListViewItem*))); |
791 | connect( bitRateComboBox, SIGNAL(activated(int)), | 790 | connect(ListView1,SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),this,SLOT(listPressed(int,QListViewItem*,const QPoint&,int))); |
792 | this, SLOT( changebitrateCombo(int)) ); | 791 | |
793 | 792 | connect(timeSlider,SIGNAL(sliderMoved(int)),this,SLOT(changeTimeSlider(int))); | |
794 | connect( directoryComboBox, SIGNAL(activated(int)), | 793 | connect(timeSlider,SIGNAL(sliderPressed()),this,SLOT(timeSliderPressed())); |
795 | this, SLOT( changeDirCombo(int)) ); | 794 | connect(timeSlider,SIGNAL(sliderReleased()),this,SLOT(timeSliderReleased())); |
796 | connect( sizeLimitCombo, SIGNAL(activated(int)), | 795 | |
797 | this, SLOT( changeSizeLimitCombo(int)) ); | 796 | connect(compressionCheckBox,SIGNAL(toggled(bool)),this,SLOT(compressionSelected(bool))); |
798 | 797 | connect(autoMuteCheckBox,SIGNAL(toggled(bool)),this,SLOT(slotAutoMute(bool))); | |
799 | connect( stereoCheckBox, SIGNAL(toggled(bool)), | ||
800 | this, SLOT( changeStereoCheck(bool)) ); | ||
801 | |||
802 | connect( outMuteCheckBox, SIGNAL(toggled(bool)), | ||
803 | this, SLOT( doVolMuting(bool)) ); | ||
804 | connect( inMuteCheckBox , SIGNAL(toggled(bool)), | ||
805 | this, SLOT( doMicMuting(bool)) ); | ||
806 | |||
807 | connect( ListView1,SIGNAL(doubleClicked(QListViewItem*)), | ||
808 | this,SLOT( itClick(QListViewItem*))); | ||
809 | connect( ListView1, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), | ||
810 | this,SLOT( listPressed(int,QListViewItem*,const QPoint&,int)) ); | ||
811 | connect( timeSlider, SIGNAL( sliderMoved(int)), | ||
812 | this, SLOT( changeTimeSlider(int) )); | ||
813 | connect( timeSlider, SIGNAL( sliderPressed()), | ||
814 | this, SLOT( timeSliderPressed() )); | ||
815 | connect( timeSlider, SIGNAL( sliderReleased()), | ||
816 | this, SLOT( timeSliderReleased() )); | ||
817 | connect( compressionCheckBox, SIGNAL( toggled(bool)), | ||
818 | this, SLOT( compressionSelected(bool))); | ||
819 | connect( autoMuteCheckBox, SIGNAL( toggled(bool)), | ||
820 | this, SLOT( slotAutoMute(bool))); | ||
821 | } | 798 | } |
822 | 799 | ||
823 | void QtRec::initConfig() { | 800 | void QtRec::initConfig() { |
824 | int index, fred, i; | 801 | int index, fred, i; |
diff --git a/noncore/multimedia/opierec/qtrec.h b/noncore/multimedia/opierec/qtrec.h index 3808d99..642048a 100644 --- a/noncore/multimedia/opierec/qtrec.h +++ b/noncore/multimedia/opierec/qtrec.h | |||
@@ -129,8 +129,9 @@ private slots: | |||
129 | void thisTab(QWidget*); | 129 | void thisTab(QWidget*); |
130 | void timeSliderPressed(); | 130 | void timeSliderPressed(); |
131 | void timeSliderReleased(); | 131 | void timeSliderReleased(); |
132 | void timerBreak(); | 132 | void timerBreak(); |
133 | void initIconView(); | ||
133 | /* void changedOutVolume(int); */ | 134 | /* void changedOutVolume(int); */ |
134 | /* void changedInVolume(int); */ | 135 | /* void changedInVolume(int); */ |
135 | 136 | ||
136 | protected: | 137 | protected: |
@@ -171,9 +172,8 @@ protected: | |||
171 | bool setupAudio( bool b); | 172 | bool setupAudio( bool b); |
172 | void endPlaying(); | 173 | void endPlaying(); |
173 | void endRecording(); | 174 | void endRecording(); |
174 | void fileBeamFinished( Ir *ir); | 175 | void fileBeamFinished( Ir *ir); |
175 | void initIconView(); | ||
176 | void keyPressEvent( QKeyEvent *e); | 176 | void keyPressEvent( QKeyEvent *e); |
177 | void keyReleaseEvent( QKeyEvent *e); | 177 | void keyReleaseEvent( QKeyEvent *e); |
178 | void receive( const QCString &, const QByteArray & ); | 178 | void receive( const QCString &, const QByteArray & ); |
179 | void showListMenu(QListViewItem * ); | 179 | void showListMenu(QListViewItem * ); |