Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Common/LtsProjectionWorkstation/vnc_server_manager.h
T
torstenandCopilot d6b6ffce7c Apply clang-format to Lts/Common and DTC/enum headers
- Formatted all CodeGen module files (9 files)
- Formatted LtsAppDescriptor module files
- Formatted LtsAppManager/AppChooser files
- Applied clang-format to all DTC and enum headers across modules
- Removed coordTransTests from CommonUnitTestsPlaceholder (moved to tests/)

Cosmetic changes only, no functional modifications.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-19 14:46:29 +02:00

68 lines
1.1 KiB
C++

#pragma once
#include "logger.h"
#include <QObject>
#include <QProcess>
#include <QRect>
#include <QString>
#include <QVector>
class QScreen;
namespace LtsProjectionWorkstation
{
class SingleShotProcess
{
public:
explicit SingleShotProcess(const QString& cmd, bool startImmediatly = false);
bool execute();
private:
QProcess m_process;
QString m_cmd;
};
struct VncScreen
{
QString name;
QProcess* proc = nullptr;
QRect geometry;
quint16 port = 0;
};
class VncServerManager : public QObject
{
Q_OBJECT
public:
explicit VncServerManager(LOGGER_T& logger, QObject* parent = nullptr);
~VncServerManager();
bool init(const QList<QScreen*>& screens);
const QVector<VncScreen>& screens() const
{
return m_vncScreens;
}
void startScreens();
void stopScreens();
void killScreens();
void createPwdFile();
private slots:
void slotReadStandardOutput();
void slotErrorOccured();
private:
QVector<VncScreen> m_vncScreens;
LOGGER_T& m_logger;
};
} // namespace LtsProjectionWorkstation