+
+bool RenderMonitoredPreview::monitoring() const
+{
+ return (bool) monitor_;
+}
+
+
+void RenderMonitoredPreview::startMonitoring() const
+{
+ if (!monitoring()) {
+ monitor_ = FileSystemWatcher::activeMonitor(filename_);
+ monitor_->connect([this](bool /* exists */){ changed_(); });
+ }
+}
+
+
+void RenderMonitoredPreview::stopMonitoring() const
+{
+ monitor_ = nullptr;
+}
+
+
+
+