- 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>
68 lines
1.1 KiB
C++
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
|