2025-02-10 12:58:23 +00:00
|
|
|
/*
|
|
|
|
|
* Deskflow -- mouse and keyboard sharing utility
|
|
|
|
|
* SPDX-FileCopyrightText: (C) 2025 Symless Ltd.
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QFile>
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
|
|
class QFileSystemWatcher;
|
|
|
|
|
|
|
|
|
|
namespace deskflow::gui {
|
|
|
|
|
|
|
|
|
|
class FileTail : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
refactor: explicit constructor for PlatformScreen, FileTail, FunctionJob, FunctionEventJob, ServerConfig, ScreenSettingsDialog, KeySequenceWidget, NetworkAddress, AddClientDialog, ConfigReadContext, LockCursorToScreenAction, RestartServer And KeyboardBroadcastAction
2025-08-01 19:18:33 +00:00
|
|
|
explicit FileTail(const QString &filePath, QObject *parent = nullptr);
|
2025-02-10 12:58:23 +00:00
|
|
|
|
2025-05-31 15:35:37 +00:00
|
|
|
Q_SIGNALS:
|
2025-02-10 12:58:23 +00:00
|
|
|
void newLine(const QString &line);
|
|
|
|
|
|
2025-05-31 15:35:37 +00:00
|
|
|
private Q_SLOTS:
|
2025-02-10 12:58:23 +00:00
|
|
|
void handleFileChanged(const QString &);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
QFile m_file;
|
|
|
|
|
QFileSystemWatcher *m_watcher = nullptr;
|
|
|
|
|
qint64 m_lastPos;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace deskflow::gui
|