OpendTect  6.6
qfilesystemcomm.h
Go to the documentation of this file.
1 #ifndef qfilesystemcomm_h
2 #define qfilesystemcomm_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: March 2009
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include <QFileSystemWatcher>
16 #include "filesystemwatcher.h"
17 
18 QT_BEGIN_NAMESPACE
19 
26 class QFileSystemWComm : public QObject
27 {
28  Q_OBJECT
29  friend class ::FileSystemWatcher;
30 
31 protected:
32 
33 QFileSystemWComm( QFileSystemWatcher* qfswatcher, FileSystemWatcher* fswatcher )
34  : qfswatcher_(qfswatcher)
35  , fswatcher_(fswatcher)
36 {
37  connect( qfswatcher, SIGNAL(directoryChanged(const QString&)),
38  this, SLOT(directoryChanged(const QString&)) );
39  connect( qfswatcher, SIGNAL(fileChanged(const QString&)),
40  this, SLOT(fileChanged(const QString&)) );
41 }
42 
43 private slots:
44 
45 void directoryChanged( const QString& path )
46 {
47  fswatcher_->chgddir_ = path.toLatin1().constData();
49 }
50 
51 void fileChanged( const QString& fnm )
52 {
53  fswatcher_->chgdfile_ = fnm.toLatin1().constData();
55 }
56 
57 private:
58 
59  QFileSystemWatcher* qfswatcher_;
61 
62 };
63 
64 QT_END_NAMESPACE
65 
66 #endif
QFileSystemWComm::fswatcher_
FileSystemWatcher * fswatcher_
Definition: qfilesystemcomm.h:60
FileSystemWatcher::chgdfile_
BufferString chgdfile_
Definition: filesystemwatcher.h:48
Notifier::trigger
void trigger()
Definition: notify.h:132
FileSystemWatcher::directoryChanged
Notifier< FileSystemWatcher > directoryChanged
Definition: filesystemwatcher.h:42
QFileSystemWComm::qfswatcher_
QFileSystemWatcher * qfswatcher_
Definition: qfilesystemcomm.h:59
QFileSystemWComm::directoryChanged
void directoryChanged(const QString &path)
Definition: qfilesystemcomm.h:45
filesystemwatcher.h
QFileSystemWComm
QFileSystemWatcher communication class.
Definition: qfilesystemcomm.h:27
FileSystemWatcher
Class for monitoring a file system.
Definition: filesystemwatcher.h:27
FileSystemWatcher::fileChanged
Notifier< FileSystemWatcher > fileChanged
Definition: filesystemwatcher.h:43
FileSystemWatcher::chgddir_
BufferString chgddir_
Definition: filesystemwatcher.h:47
QFileSystemWComm::fileChanged
void fileChanged(const QString &fnm)
Definition: qfilesystemcomm.h:51
QFileSystemWComm::QFileSystemWComm
QFileSystemWComm(QFileSystemWatcher *qfswatcher, FileSystemWatcher *fswatcher)
Definition: qfilesystemcomm.h:33

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2021