Introduced a ScrcpyWindow to enable integration of the scrcpy tool for device screen mirroring within the application. Platform-specific embedding is supported for macOS and Windows, with structure adjustments made in MainWindow and the build system (CMakeLists.txt).
30 lines
619 B
C++
30 lines
619 B
C++
#pragma once
|
|
#include <QMainWindow>
|
|
#include <QVBoxLayout>
|
|
#include <QStackedWidget>
|
|
#include <QTimer>
|
|
#include "db/DeviceInfo.h"
|
|
#include "scrcpy/ScrcpyWindow.h"
|
|
#include "widget/FlowLayout.h"
|
|
|
|
class MainWindow final : public QMainWindow {
|
|
Q_OBJECT
|
|
public:
|
|
explicit MainWindow(QWidget *parent = nullptr);
|
|
void loadDevices();
|
|
|
|
private:
|
|
QWidget* central;
|
|
FlowLayout* flowLayout;
|
|
QTimer* timer;
|
|
QStackedWidget* stackedWidget;
|
|
|
|
QWidget* devicePage = nullptr;
|
|
QWidget* accountPage = nullptr;
|
|
|
|
ScrcpyWindow *scrcpyWindow;
|
|
|
|
void createDevicePage();
|
|
void deleteDevicePage();
|
|
};
|