mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
add rotation and mirror controls to LiveScreenWidget
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user