summaryrefslogtreecommitdiff
path: root/noncore
authorllornkcor <llornkcor>2005-02-18 21:17:14 (UTC)
committer llornkcor <llornkcor>2005-02-18 21:17:14 (UTC)
commitba4f5de7bdb25af779f34cf5da13c1003b9b2c12 (patch) (unidiff)
tree944fd4189140a52b4eab7e0eb392137ccd8fb78d /noncore
parentd8254f2f295b07bdadf6b4b25f0bd125d8121c28 (diff)
downloadopie-ba4f5de7bdb25af779f34cf5da13c1003b9b2c12.zip
opie-ba4f5de7bdb25af779f34cf5da13c1003b9b2c12.tar.gz
opie-ba4f5de7bdb25af779f34cf5da13c1003b9b2c12.tar.bz2
use timer to display initial fileview
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opierec/qtrec.cpp101
-rw-r--r--noncore/multimedia/opierec/qtrec.h2
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
@@ -466,14 +466,12 @@ QtRec::QtRec( QWidget* parent, const char* name, WFlags fl )
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
@@ -729,7 +727,7 @@ void QtRec::init() {
729} 727}
730 728
731void QtRec::initIconView() { 729void 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");
@@ -737,9 +735,9 @@ void QtRec::initIconView() {
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;
@@ -754,6 +752,7 @@ void QtRec::initIconView() {
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)
@@ -763,61 +762,39 @@ void QtRec::initIconView() {
763} 762}
764 763
765void QtRec::initConnections() { 764void 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
823void QtRec::initConfig() { 800void QtRec::initConfig() {
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
@@ -130,6 +130,7 @@ private slots:
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
@@ -172,7 +173,6 @@ protected:
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 & );