Deskflow 1.26.0.0
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
FileTail.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2026 Deskflow Developers
4 * SPDX-FileCopyrightText: (C) 2025 Symless Ltd.
5 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
6 */
7
8#pragma once
9
10#include <QFile>
11#include <QObject>
12
13class QFileSystemWatcher;
14
15namespace deskflow::gui {
16
17class FileTail : public QObject
18{
19 Q_OBJECT
20
21public:
22 explicit FileTail(const QString &filePath, QObject *parent = nullptr);
23 void setWatchedFile(const QString &filePath);
24
25Q_SIGNALS:
26 void newLine(const QString &line);
27
28private Q_SLOTS:
29 void handleFileChanged(const QString &);
30
31private:
32 QFile m_file;
33 QFileSystemWatcher *m_watcher = nullptr;
34 qint64 m_lastPos;
35};
36
37} // namespace deskflow::gui
FileTail(const QString &filePath, QObject *parent=nullptr)
Definition FileTail.cpp:18
void newLine(const QString &line)
void setWatchedFile(const QString &filePath)
Definition FileTail.cpp:24
Definition IServerConfig.h:14