]> git.sesse.net Git - kdenlive/blob - src/recmonitor.cpp
Rewrote the handling of timeline in QGraphicsView. Now we use the built in zoom featu...
[kdenlive] / src / recmonitor.cpp
1 /***************************************************************************
2  *   Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
3  *                                                                         *
4  *   This program is free software; you can redistribute it and/or modify  *
5  *   it under the terms of the GNU General Public License as published by  *
6  *   the Free Software Foundation; either version 2 of the License, or     *
7  *   (at your option) any later version.                                   *
8  *                                                                         *
9  *   This program is distributed in the hope that it will be useful,       *
10  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12  *   GNU General Public License for more details.                          *
13  *                                                                         *
14  *   You should have received a copy of the GNU General Public License     *
15  *   along with this program; if not, write to the                         *
16  *   Free Software Foundation, Inc.,                                       *
17  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
18  ***************************************************************************/
19
20
21 #include <QMouseEvent>
22 #include <QStylePainter>
23 #include <QMenu>
24 #include <QToolButton>
25 #include <QFile>
26 #include <QDir>
27 #include <QDesktopWidget>
28
29 #include <KDebug>
30 #include <KLocale>
31 #include <KStandardDirs>
32 #include <KComboBox>
33 #include <KIO/NetAccess>
34 #include <KFileItem>
35
36 #include "gentime.h"
37 #include "kdenlivesettings.h"
38 #include "managecapturesdialog.h"
39 #include "recmonitor.h"
40
41 RecMonitor::RecMonitor(QString name, QWidget *parent)
42         : QWidget(parent), m_name(name), m_isActive(false), m_isCapturing(false), m_isPlaying(false), m_didCapture(false) {
43     ui.setupUi(this);
44
45     ui.video_frame->setAttribute(Qt::WA_PaintOnScreen);
46     ui.device_selector->setCurrentIndex(KdenliveSettings::defaultcapture());
47     connect(ui.device_selector, SIGNAL(currentIndexChanged(int)), this, SLOT(slotVideoDeviceChanged(int)));
48
49
50
51     QToolBar *toolbar = new QToolBar(name, this);
52     QHBoxLayout *layout = new QHBoxLayout;
53     layout->setContentsMargins(0, 0, 0, 0);
54     m_playIcon = KIcon("media-playback-start");
55     m_pauseIcon = KIcon("media-playback-pause");
56
57     m_discAction = toolbar->addAction(KIcon("network-connect"), i18n("Connect"));
58     connect(m_discAction, SIGNAL(triggered()), this, SLOT(slotDisconnect()));
59
60     m_rewAction = toolbar->addAction(KIcon("media-seek-backward"), i18n("Rewind"));
61     connect(m_rewAction, SIGNAL(triggered()), this, SLOT(slotRewind()));
62
63     m_playAction = toolbar->addAction(m_playIcon, i18n("Play"));
64     connect(m_playAction, SIGNAL(triggered()), this, SLOT(slotStartCapture()));
65
66     m_stopAction = toolbar->addAction(KIcon("media-playback-stop"), i18n("Stop"));
67     connect(m_stopAction, SIGNAL(triggered()), this, SLOT(slotStopCapture()));
68     m_stopAction->setEnabled(false);
69     m_fwdAction = toolbar->addAction(KIcon("media-seek-forward"), i18n("Forward"));
70     connect(m_fwdAction, SIGNAL(triggered()), this, SLOT(slotForward()));
71
72     m_recAction = toolbar->addAction(KIcon("media-record"), i18n("Record"));
73     connect(m_recAction, SIGNAL(triggered()), this, SLOT(slotRecord()));
74     m_recAction->setCheckable(true);
75
76     toolbar->addSeparator();
77
78     QAction *configAction = toolbar->addAction(KIcon("configure"), i18n("Configure"));
79     connect(configAction, SIGNAL(triggered()), this, SLOT(slotConfigure()));
80     configAction->setCheckable(false);
81
82     layout->addWidget(toolbar);
83     ui.control_frame_firewire->setLayout(layout);
84
85     slotVideoDeviceChanged(ui.device_selector->currentIndex());
86     displayProcess = new QProcess;
87     captureProcess = new QProcess;
88
89     connect(captureProcess, SIGNAL(stateChanged(QProcess::ProcessState)), this, SLOT(slotProcessStatus(QProcess::ProcessState)));
90
91     QStringList env = QProcess::systemEnvironment();
92     env << "SDL_WINDOWID=" + QString::number(ui.video_frame->winId());
93     displayProcess->setEnvironment(env);
94
95     if (KdenliveSettings::video4capture().isEmpty()) {
96         QString captureCommand;
97         if (!KdenliveSettings::video4adevice().isEmpty()) captureCommand = "-f " + KdenliveSettings::video4aformat() + " -i " + KdenliveSettings::video4adevice();
98
99         captureCommand +=  " -f " + KdenliveSettings::video4vformat() + " -s " + KdenliveSettings::video4size() + " -r " + QString::number(KdenliveSettings::video4rate()) + " -i " + KdenliveSettings::video4vdevice() + " -f " + KdenliveSettings::video4vencoding();
100         KdenliveSettings::setVideo4capture(captureCommand);
101     }
102
103     if (KdenliveSettings::video4playback().isEmpty()) {
104         QString playbackCommand;
105         playbackCommand =  "-f " + KdenliveSettings::video4vencoding();
106         KdenliveSettings::setVideo4playback(playbackCommand);
107     }
108     kDebug() << "/////// BUILDING MONITOR, ID: " << ui.video_frame->winId();
109 }
110
111 QString RecMonitor::name() const {
112     return m_name;
113 }
114
115 void RecMonitor::slotConfigure() {
116     emit showConfigDialog(4, ui.device_selector->currentIndex());
117 }
118
119 void RecMonitor::slotVideoDeviceChanged(int ix) {
120     switch (ix) {
121     case SCREENGRAB:
122         m_discAction->setEnabled(false);
123         m_rewAction->setEnabled(false);
124         m_fwdAction->setEnabled(false);
125         m_recAction->setEnabled(true);
126         m_stopAction->setEnabled(false);
127         m_playAction->setEnabled(false);
128         ui.video_frame->setPixmap(mergeSideBySide(KIcon("video-display").pixmap(QSize(50, 50)), i18n("Press record button\nto start screen capture\nFiles will be saved in:\n%1", KdenliveSettings::capturefolder())));
129         //ui.video_frame->setText(i18n("Press record button\nto start screen capture"));
130         break;
131     case VIDEO4LINUX:
132         m_discAction->setEnabled(false);
133         m_rewAction->setEnabled(false);
134         m_fwdAction->setEnabled(false);
135         m_recAction->setEnabled(true);
136         m_stopAction->setEnabled(false);
137         m_playAction->setEnabled(true);
138         checkDeviceAvailability();
139         break;
140     default: // FIREWIRE
141         m_discAction->setEnabled(true);
142         m_recAction->setEnabled(false);
143         m_stopAction->setEnabled(false);
144         m_playAction->setEnabled(false);
145         m_rewAction->setEnabled(false);
146         m_fwdAction->setEnabled(false);
147         //ui.video_frame->setText(i18n("Plug your camcorder and\npress connect button\nto initialize connection"));
148         ui.video_frame->setPixmap(mergeSideBySide(KIcon("network-connect").pixmap(QSize(50, 50)), i18n("Plug your camcorder and\npress connect button\nto initialize connection\nFiles will be saved in:\n%1", KdenliveSettings::capturefolder())));
149         break;
150     }
151 }
152
153 QPixmap RecMonitor::mergeSideBySide(const QPixmap& pix, const QString txt) {
154     QPainter p;
155     QRect r = p.fontMetrics().boundingRect(QRect(0, 0, ui.video_frame->width(), ui.video_frame->height()), Qt::AlignLeft, txt);
156     int strWidth = r.width();
157     int strHeight = r.height();
158     int pixWidth = pix.width();
159     int pixHeight = pix.height();
160     QPixmap res(strWidth + 8 + pixWidth, qMax(strHeight, pixHeight));
161     res.fill(Qt::transparent);
162     p.begin(&res);
163     p.drawPixmap(0, 0, pix);
164     p.drawText(QRect(pixWidth + 8, 0, strWidth, strHeight), 0, txt);
165     p.end();
166     return res;
167 }
168
169
170 void RecMonitor::checkDeviceAvailability() {
171     if (!KIO::NetAccess::exists(KUrl(KdenliveSettings::video4vdevice()), KIO::NetAccess::SourceSide , this)) {
172         m_playAction->setEnabled(false);
173         m_recAction->setEnabled(false);
174         ui.video_frame->setPixmap(mergeSideBySide(KIcon("camera-web").pixmap(QSize(50, 50)), i18n("Cannot read from device %1\nPlease check drivers and access rights.", KdenliveSettings::video4vdevice())));
175         //ui.video_frame->setText(i18n("Cannot read from device %1\nPlease check drivers and access rights.", KdenliveSettings::video4vdevice()));
176     } else //ui.video_frame->setText(i18n("Press play or record button\nto start video capture"));
177         ui.video_frame->setPixmap(mergeSideBySide(KIcon("camera-web").pixmap(QSize(50, 50)), i18n("Press play or record button\nto start video capture\nFiles will be saved in:\n%1", KdenliveSettings::capturefolder())));
178 }
179
180 void RecMonitor::slotDisconnect() {
181     if (captureProcess->state() == QProcess::NotRunning) {
182         m_captureTime = KDateTime::currentLocalDateTime();
183         kDebug() << "CURRENT TIME: " << m_captureTime.toString();
184         m_didCapture = false;
185         slotStartCapture(false);
186         m_discAction->setIcon(KIcon("network-disconnect"));
187         m_discAction->setText(i18n("Disonnect"));
188         m_recAction->setEnabled(true);
189         m_stopAction->setEnabled(true);
190         m_playAction->setEnabled(true);
191         m_rewAction->setEnabled(true);
192         m_fwdAction->setEnabled(true);
193     } else {
194         captureProcess->write("q", 1);
195         QTimer::singleShot(1000, captureProcess, SLOT(kill()));
196         if (m_didCapture) manageCapturedFiles();
197         m_didCapture = false;
198     }
199 }
200
201 void RecMonitor::slotRewind() {
202     captureProcess->write("a", 1);
203 }
204
205 void RecMonitor::slotForward() {
206     captureProcess->write("z", 1);
207 }
208
209 void RecMonitor::slotStopCapture() {
210     // stop capture
211     switch (ui.device_selector->currentIndex()) {
212     case FIREWIRE:
213         captureProcess->write("\e", 2);
214         m_playAction->setIcon(m_playIcon);
215         m_isPlaying = false;
216         break;
217     case VIDEO4LINUX:
218         captureProcess->write("q\n", 3);
219         QTimer::singleShot(1000, captureProcess, SLOT(kill()));
220
221         break;
222     case SCREENGRAB:
223         captureProcess->write("q\n", 3);
224         QTimer::singleShot(1000, captureProcess, SLOT(kill()));
225         break;
226     default:
227         break;
228     }
229 }
230
231 void RecMonitor::slotStartCapture(bool play) {
232
233     /*
234     *captureProcess<<"dvgrab";
235
236     bool isHdv = false;
237
238     switch (m_recPanel->capture_format->currentItem()){
239         case 0:
240       *captureProcess<<"--format"<<"dv1";
241      break;
242         case 1:
243       *captureProcess<<"--format"<<"dv2";
244      break;
245         case 3:
246       *captureProcess<<"--format"<<"hdv";
247      isHdv = true;
248      break;
249         default:
250             *captureProcess<<"--format"<<"raw";
251      break;
252     }
253
254     if (KdenliveSettings::autosplit()) *captureProcess<<"--autosplit";
255     if (KdenliveSettings::timestamp()) *captureProcess<<"--timestamp";
256     *captureProcess<<"-i"<<"capture"<<"-";*/
257
258     /*
259         QStringList captureArgs;
260         captureArgs<<"--format"<<"hdv"<<"-i"<<"capture"<<"-";
261         QStringList displayArgs;
262
263         displayArgs<<"-f"<<"mpegts"<<"-x"<<QString::number(ui.video_frame->width())<<"-y"<<QString::number(ui.video_frame->height())<<"-";
264
265         captureProcess->setStandardOutputProcess(displayProcess);
266         ui.video_frame->setScaledContents(false);
267         captureProcess->start("dvgrab",captureArgs);
268         displayProcess->start("ffplay",  displayArgs);*/
269
270
271     if (captureProcess->state() != QProcess::NotRunning) {
272         if (ui.device_selector->currentIndex() == FIREWIRE) {
273             if (m_isPlaying) {
274                 captureProcess->write("k", 1);
275                 //captureProcess->write("\e", 2);
276                 m_playAction->setIcon(m_playIcon);
277                 m_isPlaying = false;
278             } else {
279                 captureProcess->write("p", 1);
280                 m_playAction->setIcon(m_pauseIcon);
281                 m_isPlaying = true;
282             }
283         }
284         return;
285     }
286     m_captureArgs.clear();
287     m_displayArgs.clear();
288     m_isPlaying = false;
289
290     switch (ui.device_selector->currentIndex()) {
291     case FIREWIRE:
292         switch (KdenliveSettings::firewireformat()) {
293         case 0:
294             // RAW DV CAPTURE
295             m_captureArgs << "--format" << "raw";
296             m_displayArgs << "-f" << "dv";
297             break;
298         case 1:
299             // DV type 1
300             m_captureArgs << "--format" << "dv1";
301             m_displayArgs << "-f" << "dv";
302             break;
303         case 2:
304             // DV type 2
305             m_captureArgs << "--format" << "dv2";
306             m_displayArgs << "-f" << "dv";
307             break;
308         case 3:
309             // HDV CAPTURE
310             m_captureArgs << "--format" << "hdv";
311             m_displayArgs << "-f" << "mpegts";
312             break;
313         }
314         if (KdenliveSettings::firewireautosplit()) m_captureArgs << "--autosplit";
315         if (KdenliveSettings::firewiretimestamp()) m_captureArgs << "--timestamp";
316         m_captureArgs << "-i" << "capture" << "-";
317         m_displayArgs << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
318
319         captureProcess->setStandardOutputProcess(displayProcess);
320         captureProcess->setWorkingDirectory(KdenliveSettings::capturefolder());
321         captureProcess->start("dvgrab", m_captureArgs);
322         if (play) captureProcess->write(" ", 1);
323         m_discAction->setEnabled(true);
324         break;
325     case VIDEO4LINUX:
326         m_captureArgs << KdenliveSettings::video4capture().simplified().split(' ') << "-";
327         m_displayArgs << KdenliveSettings::video4playback().simplified().split(' ') << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
328         captureProcess->setStandardOutputProcess(displayProcess);
329         captureProcess->start("ffmpeg", m_captureArgs);
330         break;
331     default:
332         break;
333     }
334
335     if (ui.device_selector->currentIndex() != SCREENGRAB) {
336         displayProcess->start("ffplay", m_displayArgs);
337         ui.video_frame->setText(i18n("Initialising..."));
338     } else {
339         // do something when starting screen grab
340     }
341 }
342
343 void RecMonitor::slotRecord() {
344     if (captureProcess->state() == QProcess::NotRunning && ui.device_selector->currentIndex() == FIREWIRE) {
345         slotStartCapture();
346     }
347     if (m_isCapturing) {
348         switch (ui.device_selector->currentIndex()) {
349         case FIREWIRE:
350             captureProcess->write("\e", 2);
351             m_playAction->setIcon(m_playIcon);
352             m_isCapturing = false;
353             m_isPlaying = false;
354             m_recAction->setChecked(false);
355             break;
356         case VIDEO4LINUX:
357             slotStopCapture();
358             //m_isCapturing = false;
359             QTimer::singleShot(1000, this, SLOT(slotStartCapture()));
360             break;
361         case SCREENGRAB:
362             captureProcess->write("q\n", 3);
363             // in case ffmpeg doesn't exit with the 'q' command, kill it one second later
364             QTimer::singleShot(1000, captureProcess, SLOT(kill()));
365             break;
366         }
367         return;
368     } else if (ui.device_selector->currentIndex() == FIREWIRE) {
369         m_isCapturing = true;
370         m_didCapture = true;
371         captureProcess->write("c\n", 3);
372         return;
373     }
374     if (captureProcess->state() == QProcess::NotRunning) {
375         m_recAction->setChecked(true);
376         QString extension = "mpg";
377         if (ui.device_selector->currentIndex() == SCREENGRAB) extension = KdenliveSettings::screengrabextension();
378         QString path = KdenliveSettings::capturefolder() + "/capture0000." + extension;
379         int i = 1;
380         while (QFile::exists(path)) {
381             QString num = QString::number(i).rightJustified(4, '0', false);
382             path = KdenliveSettings::capturefolder() + "/capture" + num + "." + extension;
383             i++;
384         }
385
386         m_captureFile = KUrl(path);
387
388         m_captureArgs.clear();
389         m_displayArgs.clear();
390         QString args;
391
392         switch (ui.device_selector->currentIndex()) {
393         case FIREWIRE:
394             m_captureArgs << "--format" << "hdv" << "-i" << "capture" << "-";
395             m_displayArgs << "-f" << "mpegts" << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
396             captureProcess->setStandardOutputProcess(displayProcess);
397             captureProcess->start("dvgrab", m_captureArgs);
398             break;
399         case VIDEO4LINUX:
400             m_captureArgs << KdenliveSettings::video4capture().simplified().split(' ') << "-y" << m_captureFile.path() << "-f" << KdenliveSettings::video4vencoding() << "-";
401             m_displayArgs << KdenliveSettings::video4playback().simplified().split(' ') << "-x" << QString::number(ui.video_frame->width()) << "-y" << QString::number(ui.video_frame->height()) << "-";
402             captureProcess->setStandardOutputProcess(displayProcess);
403             captureProcess->start("ffmpeg", m_captureArgs);
404             break;
405         case SCREENGRAB:
406             if (KdenliveSettings::fullscreengrab()) {
407                 const QRect rect = QApplication::desktop()->screenGeometry();
408                 args = KdenliveSettings::screengrabcapture().replace("%size", QString::number(rect.width()) + "x" + QString::number(rect.height())).replace("%offset", QString());
409                 kDebug() << "// capture params: " << args;
410                 if (KdenliveSettings::screengrabenableaudio()) {
411                     // also capture audio
412                     m_captureArgs << KdenliveSettings::screengrabaudiocapture().simplified().split(' ');
413                 }
414                 m_captureArgs << args.simplified().split(' ') << KdenliveSettings::screengrabencoding().simplified().split(' ') << m_captureFile.path();
415                 ui.video_frame->setText(i18n("Capturing..."));
416                 m_isCapturing = true;
417                 captureProcess->start("ffmpeg", m_captureArgs);
418             } else {
419                 ui.video_frame->setText(i18n("Select region..."));
420                 rgnGrab = new RegionGrabber();
421                 connect(rgnGrab, SIGNAL(regionGrabbed(const QRect&)), SLOT(slotStartGrab(const QRect &)));
422             }
423             break;
424         default:
425             break;
426         }
427
428         //ui.video_frame->setScaledContents(false);
429         if (ui.device_selector->currentIndex() != SCREENGRAB) {
430             m_isCapturing = true;
431             displayProcess->start("ffplay", m_displayArgs);
432             ui.video_frame->setText(i18n("Initialising..."));
433         }
434     } else {
435         // stop capture
436         displayProcess->kill();
437         captureProcess->kill();
438         QTimer::singleShot(1000, this, SLOT(slotRecord()));
439     }
440 }
441
442 void RecMonitor::slotStartGrab(const QRect &rect) {
443     rgnGrab->deleteLater();
444     QApplication::restoreOverrideCursor();
445     show();
446     if (rect.isNull()) return;
447     int width = rect.width();
448     int height = rect.height();
449     if (width % 2 != 0) width--;
450     if (height % 2 != 0) height--;
451     QString args = KdenliveSettings::screengrabcapture().replace("%size", QString::number(width) + "x" + QString::number(height)).replace("%offset", "+" + QString::number(rect.x()) + "," + QString::number(rect.y()));
452     kDebug() << "// capture params: " << args;
453     if (KdenliveSettings::screengrabenableaudio()) {
454         // also capture audio
455         m_captureArgs << KdenliveSettings::screengrabaudiocapture().simplified().split(' ');
456     }
457     m_captureArgs << args.simplified().split(' ') << KdenliveSettings::screengrabencoding().simplified().split(' ') << m_captureFile.path();
458     m_isCapturing = true;
459     ui.video_frame->setText(i18n("Capturing..."));
460     captureProcess->start("ffmpeg", m_captureArgs);
461 }
462
463 void RecMonitor::slotProcessStatus(QProcess::ProcessState status) {
464     if (status == QProcess::NotRunning) {
465         displayProcess->kill();
466         if (m_isCapturing && ui.device_selector->currentIndex() != FIREWIRE)
467             if (ui.autoaddbox->isChecked() && QFile::exists(m_captureFile.path())) emit addProjectClip(m_captureFile);
468         if (ui.device_selector->currentIndex() == FIREWIRE) {
469             m_discAction->setIcon(KIcon("network-connect"));
470             m_discAction->setText(i18n("Connect"));
471             m_playAction->setEnabled(false);
472             m_rewAction->setEnabled(false);
473             m_fwdAction->setEnabled(false);
474             m_recAction->setEnabled(false);
475         }
476         m_isPlaying = false;
477         m_playAction->setIcon(m_playIcon);
478         m_recAction->setChecked(false);
479         m_stopAction->setEnabled(false);
480         ui.device_selector->setEnabled(true);
481         if (captureProcess && captureProcess->exitStatus() == QProcess::CrashExit) {
482             ui.video_frame->setText(i18n("Capture crashed, please check your parameters"));
483         } else {
484             ui.video_frame->setText(i18n("Not connected"));
485         }
486         m_isCapturing = false;
487     } else {
488         if (ui.device_selector->currentIndex() != SCREENGRAB) m_stopAction->setEnabled(true);
489         ui.device_selector->setEnabled(false);
490     }
491 }
492
493 void RecMonitor::manageCapturedFiles() {
494     QString extension;
495     switch (KdenliveSettings::firewireformat()) {
496     case 0:
497         extension = ".dv";
498         break;
499     case 1:
500     case 2:
501         extension = ".avi";
502         break;
503     case 3:
504         extension = ".m2t";
505         break;
506     }
507     QDir dir(KdenliveSettings::capturefolder());
508     QStringList filters;
509     filters << "capture*" + extension;
510     const QStringList result = dir.entryList(filters, QDir::Files, QDir::Time);
511     KUrl::List capturedFiles;
512     foreach(QString name, result) {
513         KUrl url = KUrl(dir.filePath(name));
514         if (KIO::NetAccess::exists(url, KIO::NetAccess::SourceSide, this)) {
515             KFileItem file(KFileItem::Unknown, KFileItem::Unknown, url, true);
516             if (file.time(KFileItem::ModificationTime) > m_captureTime) capturedFiles.append(url);
517         }
518     }
519     kDebug() << "Found : " << capturedFiles.count() << " new capture files";
520     kDebug() << capturedFiles;
521
522     if (capturedFiles.count() > 0) {
523         ManageCapturesDialog *d = new ManageCapturesDialog(capturedFiles, this);
524         if (d->exec() == QDialog::Accepted) {
525             capturedFiles = d->importFiles();
526             foreach(KUrl url, capturedFiles) {
527                 emit addProjectClip(url);
528             }
529         }
530         delete d;
531     }
532 }
533
534 // virtual
535 void RecMonitor::mousePressEvent(QMouseEvent * event) {
536     slotPlay();
537 }
538
539 void RecMonitor::activateRecMonitor() {
540     //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
541 }
542
543 void RecMonitor::stop() {
544     m_isActive = false;
545
546 }
547
548 void RecMonitor::start() {
549     m_isActive = true;
550
551 }
552
553 void RecMonitor::refreshRecMonitor(bool visible) {
554     if (visible) {
555         //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
556
557     }
558 }
559
560 void RecMonitor::slotPlay() {
561
562     //if (!m_isActive) m_monitorManager->activateRecMonitor(m_name);
563
564 }
565
566
567 #include "recmonitor.moc"