Diffstat (limited to 'noncore/multimedia/opierec/qtrec.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opierec/qtrec.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/noncore/multimedia/opierec/qtrec.h b/noncore/multimedia/opierec/qtrec.h index ada3270..93b9b5f 100644 --- a/noncore/multimedia/opierec/qtrec.h +++ b/noncore/multimedia/opierec/qtrec.h | |||
@@ -1,31 +1,31 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** Created: Thu Jan 17 11:19:45 2002 | 2 | ** Created: Thu Jan 17 11:19:45 2002 |
3 | copyright 2002 by L.J. Potter ljp@llornkcor.com | 3 | copyright 2002 by L.J. Potter ljp@llornkcor.com |
4 | ****************************************************************************/ | 4 | ****************************************************************************/ |
5 | #ifndef QTREC_H | 5 | #ifndef QTREC_H |
6 | #define QTREC_H | 6 | #define QTREC_H |
7 | #define VERSION 1.0 | 7 | #define VERSION 20030920 |
8 | 8 | ||
9 | #include <qpe/ir.h> | 9 | #include <qpe/ir.h> |
10 | 10 | ||
11 | #include <qfile.h> | 11 | #include <qfile.h> |
12 | #include <qimage.h> | 12 | #include <qimage.h> |
13 | #include <qlineedit.h> | 13 | #include <qlineedit.h> |
14 | #include <qpixmap.h> | 14 | #include <qpixmap.h> |
15 | #include <qvariant.h> | 15 | #include <qvariant.h> |
16 | #include <qwidget.h> | 16 | #include <qwidget.h> |
17 | #include <stdio.h> | 17 | #include <stdio.h> |
18 | #include <stdlib.h> | 18 | #include <stdlib.h> |
19 | 19 | ||
20 | #include "device.h" | 20 | #include "device.h" |
21 | #include "wavFile.h" | 21 | #include "wavFile.h" |
22 | 22 | ||
23 | class QButtonGroup; | 23 | class QButtonGroup; |
24 | class QCheckBox; | 24 | class QCheckBox; |
25 | class QComboBox; | 25 | class QComboBox; |
26 | class QGridLayout; | 26 | class QGridLayout; |
27 | class QGroupBox; | 27 | class QGroupBox; |
28 | class QHBoxLayout; | 28 | class QHBoxLayout; |
29 | class QIconView; | 29 | class QIconView; |
30 | class QIconViewItem; | 30 | class QIconViewItem; |
31 | class QLabel; | 31 | class QLabel; |
@@ -34,152 +34,151 @@ class QListView; | |||
34 | class QListViewItem; | 34 | class QListViewItem; |
35 | class QPushButton; | 35 | class QPushButton; |
36 | class QSlider; | 36 | class QSlider; |
37 | class QTabWidget; | 37 | class QTabWidget; |
38 | class QTimer; | 38 | class QTimer; |
39 | class QVBoxLayout; | 39 | class QVBoxLayout; |
40 | class QLineEdit; | 40 | class QLineEdit; |
41 | 41 | ||
42 | #define MAX_TRACKS 2 | 42 | #define MAX_TRACKS 2 |
43 | //#define BUFSIZE 4096 | 43 | //#define BUFSIZE 4096 |
44 | // #define BUFSIZE 8182 //Z default buffer size | 44 | // #define BUFSIZE 8182 //Z default buffer size |
45 | #define BUFSIZE 1024 | 45 | #define BUFSIZE 1024 |
46 | //#define BUFSIZE 2048 | 46 | //#define BUFSIZE 2048 |
47 | #define FRAGSIZE 0x7fff000A; | 47 | #define FRAGSIZE 0x7fff000A; |
48 | 48 | ||
49 | #define WAVE_FORMAT_DVI_ADPCM (0x0011) | 49 | #define WAVE_FORMAT_DVI_ADPCM (0x0011) |
50 | #define WAVE_FORMAT_PCM (0x0001) | 50 | #define WAVE_FORMAT_PCM (0x0001) |
51 | //AFMT_IMA_ADPCM | 51 | //AFMT_IMA_ADPCM |
52 | 52 | ||
53 | class QtRec : public QWidget | 53 | class QtRec : public QWidget |
54 | { | 54 | { |
55 | Q_OBJECT | 55 | Q_OBJECT |
56 | 56 | ||
57 | public: | 57 | public: |
58 | static QString appName() { return QString::fromLatin1("opierec"); } | 58 | static QString appName() { return QString::fromLatin1("opierec"); } |
59 | QtRec( QWidget* parent=0, const char* name=0, WFlags fl=0 ); | 59 | QtRec( QWidget* parent=0, const char* name=0, WFlags fl=0 ); |
60 | ~QtRec(); | 60 | ~QtRec(); |
61 | QSlider *OutputSlider,*InputSlider; | 61 | QSlider *OutputSlider,*InputSlider; |
62 | 62 | ||
63 | public slots: | 63 | public slots: |
64 | private: | 64 | private: |
65 | // int fragment; | 65 | // int fragment; |
66 | int fd1; | 66 | int fd1; |
67 | int secCount; | 67 | int secCount; |
68 | QString timeString; | 68 | QString timeString; |
69 | 69 | ||
70 | QLineEdit *renameBox; | 70 | QLineEdit *renameBox; |
71 | QGroupBox* GroupBox1; | 71 | QGroupBox* GroupBox1; |
72 | QString currentFile; | 72 | QString currentFile; |
73 | QString date, currentFileName, tmpFileName; | 73 | QString date, currentFileName, tmpFileName; |
74 | QTimer *t_timer; | 74 | QTimer *t_timer; |
75 | bool needsStereoOut, paused, playing; | 75 | bool needsStereoOut, paused; |
76 | bool useTmpFile, autoMute; | 76 | bool useTmpFile, autoMute; |
77 | 77 | ||
78 | bool eventFilter( QObject * , QEvent * ); | 78 | bool eventFilter( QObject * , QEvent * ); |
79 | void okRename(); | 79 | void okRename(); |
80 | void cancelRename(); | 80 | void cancelRename(); |
81 | QString getStorage(const QString &); | 81 | QString getStorage(const QString &); |
82 | bool rec(); | 82 | bool rec(); |
83 | int getCurrentSizeLimit(); | 83 | int getCurrentSizeLimit(); |
84 | long checkDiskSpace(const QString &); | 84 | long checkDiskSpace(const QString &); |
85 | void doMute(bool); | 85 | void doMute(bool); |
86 | void errorStop(); | 86 | void errorStop(); |
87 | void fillDirectoryCombo(); | 87 | void fillDirectoryCombo(); |
88 | void getInVol(); | 88 | void getInVol(); |
89 | void getOutVol(); | 89 | void getOutVol(); |
90 | void init(); | 90 | void init(); |
91 | void initConfig(); | 91 | void initConfig(); |
92 | void initConnections(); | 92 | void initConnections(); |
93 | void selectItemByName(const QString &); | 93 | void selectItemByName(const QString &); |
94 | void setRecordButton(bool); | 94 | void setRecordButton(bool); |
95 | void start(); | 95 | void start(); |
96 | void stop(); | 96 | void stop(); |
97 | void timerEvent( QTimerEvent *e ); | 97 | void timerEvent( QTimerEvent *e ); |
98 | 98 | ||
99 | private slots: | 99 | private slots: |
100 | 100 | ||
101 | |||
102 | void FastforwardPressed(); | 101 | void FastforwardPressed(); |
103 | void FastforwardReleased(); | 102 | void FastforwardReleased(); |
104 | void changeDirCombo(int); | 103 | void changeDirCombo(int); |
105 | void changeSizeLimitCombo(int); | 104 | void changeSizeLimitCombo(int); |
106 | void changeTimeSlider(int); | 105 | void changeTimeSlider(int); |
107 | void changebitrateCombo(int); | 106 | void changebitrateCombo(int); |
107 | void changeStereoCheck( bool); | ||
108 | |||
108 | void changedInVolume(); | 109 | void changedInVolume(); |
109 | void changedOutVolume(); | 110 | void changedOutVolume(); |
110 | void changesamplerateCombo(int); | 111 | void changesamplerateCombo(int); |
111 | void cleanUp(); | 112 | void cleanUp(); |
112 | void compressionSelected(bool); | 113 | void compressionSelected(bool); |
113 | void deleteSound(); | 114 | void deleteSound(); |
114 | void doBeam(); | 115 | void doBeam(); |
115 | void doMenuPlay(); | 116 | void doMenuPlay(); |
116 | void doMicMuting(bool); | 117 | void doMicMuting(bool); |
117 | void doPlayBtn(); | 118 | void doPlayBtn(); |
118 | void doRename(); | 119 | void doRename(); |
119 | void doVolMuting(bool); | 120 | void doVolMuting(bool); |
120 | void forwardTimerTimeout(); | 121 | void forwardTimerTimeout(); |
121 | void itClick(QListViewItem *item); | 122 | void itClick(QListViewItem *item); |
122 | void listPressed(int, QListViewItem *, const QPoint&, int); | 123 | void listPressed(int, QListViewItem *, const QPoint&, int); |
123 | void newSound(); | 124 | void newSound(); |
124 | void rewindPressed(); | 125 | void rewindPressed(); |
125 | void rewindReleased(); | 126 | void rewindReleased(); |
126 | void rewindTimerTimeout(); | 127 | void rewindTimerTimeout(); |
127 | void slotAutoMute(bool); | 128 | void slotAutoMute(bool); |
128 | void thisTab(QWidget*); | 129 | void thisTab(QWidget*); |
129 | void timeSliderPressed(); | 130 | void timeSliderPressed(); |
130 | void timeSliderReleased(); | 131 | void timeSliderReleased(); |
131 | void timerBreak(); | 132 | void timerBreak(); |
132 | /* void changedOutVolume(int); */ | 133 | /* void changedOutVolume(int); */ |
133 | /* void changedInVolume(int); */ | 134 | /* void changedInVolume(int); */ |
134 | 135 | ||
135 | protected: | 136 | protected: |
136 | 137 | ||
137 | Device *soundDevice; | ||
138 | WavFile *wavFile; | 138 | WavFile *wavFile; |
139 | |||
140 | QButtonGroup *ButtonGroup1; | 139 | QButtonGroup *ButtonGroup1; |
141 | QCheckBox *outMuteCheckBox, *inMuteCheckBox, *compressionCheckBox, *autoMuteCheckBox; | 140 | QCheckBox *outMuteCheckBox, *inMuteCheckBox, *compressionCheckBox, *autoMuteCheckBox, *stereoCheckBox; |
142 | QComboBox* sampleRateComboBox, * bitRateComboBox, *directoryComboBox, *sizeLimitCombo; | 141 | QComboBox* sampleRateComboBox, * bitRateComboBox, *directoryComboBox, *sizeLimitCombo; |
143 | QHBoxLayout* Layout12; | 142 | QHBoxLayout* Layout12; |
144 | QHBoxLayout* Layout13; | 143 | QHBoxLayout* Layout13; |
145 | QHBoxLayout* Layout14; | 144 | QHBoxLayout* Layout14; |
146 | QHBoxLayout* Layout16; | 145 | QHBoxLayout* Layout16; |
147 | QHBoxLayout* Layout17; | 146 | QHBoxLayout* Layout17; |
148 | QHBoxLayout* Layout19; | 147 | QHBoxLayout* Layout19; |
149 | QIconView *IconView1; | 148 | QIconView *IconView1; |
150 | QLabel *NewSoundLabel,*playLabel2; | 149 | QLabel *NewSoundLabel,*playLabel2; |
151 | QLabel *TextLabel3, *TextLabel1, *TextLabel2; | 150 | QLabel *TextLabel3, *TextLabel1, *TextLabel2; |
152 | QListView *ListView1; | 151 | QListView *ListView1; |
153 | QPushButton *Stop_PushButton, *Play_PushButton, *Rec_PushButton, *NewSoundButton, *deleteSoundButton, *toBeginningButton, *toEndButton; | 152 | QPushButton *Stop_PushButton, *Play_PushButton, *Rec_PushButton, *NewSoundButton, *deleteSoundButton, *toBeginningButton, *toEndButton; |
154 | QString recDir; | 153 | QString recDir; |
155 | QTabWidget *TabWidget; | 154 | QTabWidget *TabWidget; |
156 | QTimer *t, *rewindTimer, *forwardTimer; | 155 | QTimer *t, *rewindTimer, *forwardTimer; |
157 | QVBoxLayout* Layout15; | 156 | QVBoxLayout* Layout15; |
158 | QVBoxLayout* Layout15b; | 157 | QVBoxLayout* Layout15b; |
159 | QVBoxLayout* Layout18; | 158 | QVBoxLayout* Layout18; |
160 | QWidget *tab, *tab_2, *tab_3, *tab_4, *tab_5; | 159 | QWidget *tab, *tab_2, *tab_3, *tab_4, *tab_5; |
161 | int sliderPos, total; | 160 | int sliderPos, total; |
162 | // short inbuffer[BUFSIZE], outbuffer[BUFSIZE]; | 161 | // short inbuffer[BUFSIZE], outbuffer[BUFSIZE]; |
163 | // unsigned short unsigned_inbuffer[BUFSIZE], unsigned_outbuffer[BUFSIZE]; | 162 | // unsigned short unsigned_inbuffer[BUFSIZE], unsigned_outbuffer[BUFSIZE]; |
164 | QGroupBox *sampleGroup, *bitGroup, *dirGroup, *sizeGroup; | 163 | QGroupBox *sampleGroup, *bitGroup, *dirGroup, *sizeGroup; |
165 | /* short inbuffer[65536], outbuffer[65536]; */ | 164 | /* short inbuffer[65536], outbuffer[65536]; */ |
166 | /* unsigned short unsigned_inbuffer[65536], unsigned_outbuffer[65536]; */ | 165 | /* unsigned short unsigned_inbuffer[65536], unsigned_outbuffer[65536]; */ |
167 | 166 | ||
168 | 167 | ||
169 | bool doPlay(); | 168 | bool doPlay(); |
170 | bool openPlayFile(); | 169 | bool openPlayFile(); |
171 | bool setUpFile(); | 170 | bool setUpFile(); |
172 | bool setupAudio( bool b); | 171 | bool setupAudio( bool b); |
173 | void endPlaying(); | 172 | void endPlaying(); |
174 | void endRecording(); | 173 | void endRecording(); |
175 | void fileBeamFinished( Ir *ir); | 174 | void fileBeamFinished( Ir *ir); |
176 | void initIconView(); | 175 | void initIconView(); |
177 | void keyPressEvent( QKeyEvent *e); | 176 | void keyPressEvent( QKeyEvent *e); |
178 | void keyReleaseEvent( QKeyEvent *e); | 177 | void keyReleaseEvent( QKeyEvent *e); |
179 | void receive( const QCString &, const QByteArray & ); | 178 | void receive( const QCString &, const QByteArray & ); |
180 | void showListMenu(QListViewItem * ); | 179 | void showListMenu(QListViewItem * ); |
181 | // void quickRec(); | 180 | // void quickRec(); |
182 | 181 | ||
183 | }; | 182 | }; |
184 | 183 | ||
185 | #endif // QTREC_H | 184 | #endif // QTREC_H |