add rotation and mirror controls to LiveScreenWidget

This commit is contained in:
uncor3
2026-03-20 02:40:42 +00:00
parent dbe520e437
commit ddcaab6f4d
2 changed files with 80 additions and 3 deletions
+13
View File
@@ -24,6 +24,7 @@
#include "iDescriptor.h"
#include "servicemanager.h"
#include <QLabel>
#include <QPushButton>
#include <QThread>
#include <QTimer>
#include <QWidget>
@@ -85,6 +86,7 @@ private:
bool initializeScreenshotService(bool notify);
void updateScreenshot();
void startCapturing();
void applyTransformAndDisplay();
iDescriptorDevice *m_device;
QLabel *m_imageLabel;
@@ -92,6 +94,17 @@ private:
ScreenshotrClientHandle *m_screenshotrClient = nullptr;
ScreenshotrThread *m_thread = nullptr;
// controls for rotation / mirroring
QWidget *m_controlsWidget = nullptr;
QPushButton *m_rotateCwButton = nullptr;
QPushButton *m_rotateCcwButton = nullptr;
QPushButton *m_mirrorButton = nullptr;
// transformation state
QPixmap m_lastPixmap;
int m_rotationDegrees = 0; // 0, 90, 180, 270
bool m_mirrorHorizontal = false;
private:
void startInitialization();
};