DtkCore
DTK Core module
|
The DBaseFileWatcher class provides an interface for monitoring files and directories for modifications. 更多...
Public 类型 | |
using | SignalType1 = void(DBaseFileWatcher::*)(const QUrl &) |
using | SignalType2 = void(DBaseFileWatcher::*)(const QUrl &, const QUrl &) |
Public 成员函数 | |
QUrl | fileUrl () const |
bool | startWatcher () |
开始文件变动监视 更多... | |
bool | stopWatcher () |
停止文件变动监视. 更多... | |
bool | restartWatcher () |
重新开始文件变动监视. 更多... | |
virtual void | setEnabledSubfileWatcher (const QUrl &subfileUrl, bool enabled=true) |
设置是否对 subfileUrl 目录启用文件监视 更多... | |
静态 Public 成员函数 | |
static bool | ghostSignal (const QUrl &targetUrl, SignalType1 signal, const QUrl &arg1) |
发送一个信号表示目标目录 targetUrl 得到了一个 signal 信号,包含参数 arg1 。 更多... | |
static bool | ghostSignal (const QUrl &targetUrl, SignalType2 signal, const QUrl &arg1, const QUrl &arg2) |
发送一个信号表示目标目录 targetUrl 得到了一个 signal 信号,包含参数 arg1 和 arg2。 更多... | |
Protected 成员函数 | |
DBaseFileWatcher (DBaseFileWatcherPrivate &dd, const QUrl &url, QObject *parent=0) | |
![]() | |
DObject (DObject *parent=nullptr) | |
只有在不需要数据成员的派生类中才会使用 parent 父类指针 | |
DObject (DObjectPrivate &dd, DObject *parent=nullptr) | |
在派生类中比较常用的构造函数 dd 私有类对象 | |
额外继承的成员函数 | |
![]() | |
QScopedPointer< DObjectPrivate > | d_d_ptr |
The DBaseFileWatcher class provides an interface for monitoring files and directories for modifications.
\inmodule dtkcore
DBaseFileWatcher 类提供了一系列接口可供监视文件和目录的变动。
|
static |
发送一个信号表示目标目录 targetUrl 得到了一个 signal 信号,包含参数 arg1 。
Emit a signal about targetUrl got a signal with arg1
示例用法: Example usage:
|
static |
发送一个信号表示目标目录 targetUrl 得到了一个 signal 信号,包含参数 arg1 和 arg2。
Emit a signal about targetUrl got a signal with arg1 and arg2
示例用法: Example usage:
bool Dtk::Core::DBaseFileWatcher::restartWatcher | ( | ) |
重新开始文件变动监视.
Stop file watcher and then restart it to watching file changes.
|
virtual |
设置是否对 subfileUrl 目录启用文件监视
Set enable file watcher for subfileUrl or not
subfileUrl 设置所针对的 Url subfileUrl The given url
enabled 是否启用文件变动监视 enabled Enable file change watching or not.
bool Dtk::Core::DBaseFileWatcher::startWatcher | ( | ) |
开始文件变动监视
Let file watcher start watching file changes.
bool Dtk::Core::DBaseFileWatcher::stopWatcher | ( | ) |