Separate the SDK and Qt sample build projects
Compared with f612cfd:
- Move the capture SDK, private IOCTL wrapper, and optional preview helper under GVFG_SDK with an independent top-level CMake project and version source.
- Move the Qt preview application into GVFG_Qt_Sample and consume prebuilt SDK DLLs and compiler-specific import libraries through imported CMake targets instead of compiling SDK sources as subdirectories.
- Resolve Qt Creator configuration-specific SDK build directories automatically, copy the three runtime DLLs beside the sample executable, and keep missing MSVC or MinGW artifacts as explicit configure errors.
- Update Release and Debug packaging scripts to read SDK and sample outputs separately, and update the repository build instructions for the two-project workflow.
- Preserve the pre-existing uncommitted device display-name suffix change outside this commit.
Validation: independent MSVC SDK configure/build and independent Qt MSVC sample configure/build passed; the sample build graph contains no SDK implementation sources; git diff --check passed. No MinGW link, runtime launch, capture, audio playback, or hardware validation was run.
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class QKeyEvent;
|
||||
class QMouseEvent;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui
|
||||
{
|
||||
class PreviewWindow;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class PreviewWindow final : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PreviewWindow(QWidget *parent = nullptr);
|
||||
~PreviewWindow() override;
|
||||
|
||||
void *nativePreviewHandle() const;
|
||||
void setSourceSize(int sourceWidth, int sourceHeight);
|
||||
void closePreview();
|
||||
|
||||
public slots:
|
||||
void showPreview(int sourceWidth = 0, int sourceHeight = 0);
|
||||
void showFullscreenPreview(int sourceWidth = 0, int sourceHeight = 0);
|
||||
|
||||
signals:
|
||||
void previewVisibilityChanged(bool visible);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
void enterFullscreen();
|
||||
void exitFullscreen();
|
||||
|
||||
Ui::PreviewWindow *ui_ = nullptr;
|
||||
bool closeAllowed_ = false;
|
||||
int sourceWidth_ = 0;
|
||||
int sourceHeight_ = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user