Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes | List of all members
CFrmViewerOpenGL Class Reference
Inheritance diagram for CFrmViewerOpenGL:

Public Types

enum  ADAPT_WINDOWS {
  Disable = 0 , Auto = 1 , Original = 2 , OriginalCenter = 3 ,
  Zoom = 4 , ZoomToWindow = 5 , KeepAspectRationToWindow = 6
}
 The ADAPT_WINDOWS enum. More...
 

Public Slots

void slotSetDesktopSize (int width, int height)
 Update desktop size.
 
void slotSetName (const QString &szName)
 Update desktop name.
 
void slotUpdateRect (const QRect &r, const QImage &image)
 Update image.
 
void slotUpdateRect (QSharedPointer< CImage > image)
 
void slotUpdateCursor (const QCursor &cursor)
 Update cursor.
 
void slotUpdateCursorPosition (const QPoint &pos)
 Update cursor position.
 
void slotSystemCombination ()
 

Signals

void sigMousePressEvent (Qt::MouseButtons, QPoint)
 
void sigMouseReleaseEvent (Qt::MouseButton, QPoint)
 
void sigMouseMoveEvent (Qt::MouseButtons buttons, QPoint pos)
 
void sigMouseMoveEvent (QMouseEvent *event)
 
void sigWheelEvent (Qt::MouseButtons buttons, QPoint pos, QPoint angleDelta)
 
void sigKeyPressEvent (int key, Qt::KeyboardModifiers modify)
 
void sigKeyReleaseEvent (int key, Qt::KeyboardModifiers modify)
 

Public Member Functions

 CFrmViewerOpenGL (QWidget *parent=nullptr)
 
void SetAdaptWindows (ADAPT_WINDOWS aw=Original)
 
ADAPT_WINDOWS GetAdaptWindows ()
 
double GetZoomFactor () const
 Adjust the zoom factor.
 
int SetZoomFactor (double newZoomFactor)
 
QSize GetDesktopSize ()
 
virtual int Load (QSettings &set)
 
virtual int Save (QSettings &set)
 
virtual QImage GrabImage (int x=0, int y=0, int w=-1, int h=-1)
 

Protected Member Functions

virtual void initializeGL () override
 
virtual void resizeGL (int w, int height) override
 
virtual void paintGL () override
 
virtual void mousePressEvent (QMouseEvent *event) override
 
virtual void mouseReleaseEvent (QMouseEvent *event) override
 
virtual void mouseMoveEvent (QMouseEvent *event) override
 
virtual void wheelEvent (QWheelEvent *event) override
 
virtual void keyPressEvent (QKeyEvent *event) override
 
virtual void keyReleaseEvent (QKeyEvent *event) override
 
void InitVertor ()
 

Properties

double ZoomFactor
 

Private Member Functions

int ReSize (int width, int height)
 
int TranslationMousePoint (QPointF inPos, QPointF &outPos)
 
QRectF GetAspectRationRect ()
 

Private Attributes

QImage m_Desktop
 
QOpenGLVertexArrayObject m_VaoQuad
 
QOpenGLBuffer m_VboQuad
 
QOpenGLShaderProgram m_ShaderProgram
 
QVector< GLfloat > m_VertexData
 
QOpenGLTexture * m_pTexture
 
ADAPT_WINDOWS m_AdaptWindows
 
double m_dbZoomFactor
 

Detailed Description

Definition at line 16 of file FrmViewerOpenGL.h.

Member Enumeration Documentation

◆ ADAPT_WINDOWS

The ADAPT_WINDOWS enum.

Enumerator
Disable 

Disable adapt windows.

Original 

Original desktop size, the left-top of the desktop is aligned with the left-top of the window.

OriginalCenter 

Original desktop size, the center of the desktop is aligned with the center of the window.

Zoom 

zoom windows = desktop size * factor

ZoomToWindow 

Desktop adapt to windows.

KeepAspectRationToWindow 

Keep desktop aspectration adapt to windows.

Definition at line 30 of file FrmViewerOpenGL.h.

Constructor & Destructor Documentation

◆ CFrmViewerOpenGL()

CFrmViewerOpenGL::CFrmViewerOpenGL ( QWidget *  parent = nullptr)
explicit

Definition at line 45 of file FrmViewerOpenGL.cpp.

◆ ~CFrmViewerOpenGL()

CFrmViewerOpenGL::~CFrmViewerOpenGL ( )
overridevirtual

Definition at line 64 of file FrmViewerOpenGL.cpp.

Member Function Documentation

◆ GetAdaptWindows()

CFrmViewerOpenGL::ADAPT_WINDOWS CFrmViewerOpenGL::GetAdaptWindows ( )

Definition at line 232 of file FrmViewerOpenGL.cpp.

◆ GetAspectRationRect()

QRectF CFrmViewerOpenGL::GetAspectRationRect ( )
private

Definition at line 317 of file FrmViewerOpenGL.cpp.

◆ GetDesktopSize()

QSize CFrmViewerOpenGL::GetDesktopSize ( )

Definition at line 175 of file FrmViewerOpenGL.cpp.

◆ GetZoomFactor()

double CFrmViewerOpenGL::GetZoomFactor ( ) const

Adjust the zoom factor.

After the adjustment is completed, you need to call SetAdaptWindows(FrmViewer::Zoom) to zoom the window size.

Returns

Definition at line 161 of file FrmViewerOpenGL.cpp.

◆ GrabImage()

QImage CFrmViewerOpenGL::GrabImage ( int  x = 0,
int  y = 0,
int  w = -1,
int  h = -1 
)
virtual

Definition at line 251 of file FrmViewerOpenGL.cpp.

◆ initializeGL()

void CFrmViewerOpenGL::initializeGL ( )
overrideprotectedvirtual

Definition at line 111 of file FrmViewerOpenGL.cpp.

◆ InitVertor()

void CFrmViewerOpenGL::InitVertor ( )
protected

Definition at line 74 of file FrmViewerOpenGL.cpp.

◆ keyPressEvent()

void CFrmViewerOpenGL::keyPressEvent ( QKeyEvent *  event)
overrideprotectedvirtual

Definition at line 422 of file FrmViewerOpenGL.cpp.

◆ keyReleaseEvent()

void CFrmViewerOpenGL::keyReleaseEvent ( QKeyEvent *  event)
overrideprotectedvirtual

Definition at line 429 of file FrmViewerOpenGL.cpp.

◆ Load()

int CFrmViewerOpenGL::Load ( QSettings &  set)
virtual

Definition at line 237 of file FrmViewerOpenGL.cpp.

◆ mouseMoveEvent()

void CFrmViewerOpenGL::mouseMoveEvent ( QMouseEvent *  event)
overrideprotectedvirtual

Definition at line 400 of file FrmViewerOpenGL.cpp.

◆ mousePressEvent()

void CFrmViewerOpenGL::mousePressEvent ( QMouseEvent *  event)
overrideprotectedvirtual

Definition at line 382 of file FrmViewerOpenGL.cpp.

◆ mouseReleaseEvent()

void CFrmViewerOpenGL::mouseReleaseEvent ( QMouseEvent *  event)
overrideprotectedvirtual

Definition at line 391 of file FrmViewerOpenGL.cpp.

◆ paintGL()

void CFrmViewerOpenGL::paintGL ( )
overrideprotectedvirtual

Definition at line 139 of file FrmViewerOpenGL.cpp.

◆ ReSize()

int CFrmViewerOpenGL::ReSize ( int  width,
int  height 
)
private

Definition at line 180 of file FrmViewerOpenGL.cpp.

◆ resizeGL()

void CFrmViewerOpenGL::resizeGL ( int  w,
int  height 
)
overrideprotectedvirtual

Definition at line 133 of file FrmViewerOpenGL.cpp.

◆ Save()

int CFrmViewerOpenGL::Save ( QSettings &  set)
virtual

Definition at line 244 of file FrmViewerOpenGL.cpp.

◆ SetAdaptWindows()

void CFrmViewerOpenGL::SetAdaptWindows ( ADAPT_WINDOWS  aw = Original)

Definition at line 188 of file FrmViewerOpenGL.cpp.

◆ SetZoomFactor()

int CFrmViewerOpenGL::SetZoomFactor ( double  newZoomFactor)

Definition at line 166 of file FrmViewerOpenGL.cpp.

◆ slotSetDesktopSize

void CFrmViewerOpenGL::slotSetDesktopSize ( int  width,
int  height 
)
slot

Update desktop size.

Parameters
width
height

Definition at line 261 of file FrmViewerOpenGL.cpp.

◆ slotSetName

void CFrmViewerOpenGL::slotSetName ( const QString &  szName)
slot

Update desktop name.

Parameters
szName

Definition at line 273 of file FrmViewerOpenGL.cpp.

◆ slotSystemCombination

void CFrmViewerOpenGL::slotSystemCombination ( )
slot

Definition at line 306 of file FrmViewerOpenGL.cpp.

◆ slotUpdateCursor

void CFrmViewerOpenGL::slotUpdateCursor ( const QCursor &  cursor)
slot

Update cursor.

Parameters
cursor

Definition at line 296 of file FrmViewerOpenGL.cpp.

◆ slotUpdateCursorPosition

void CFrmViewerOpenGL::slotUpdateCursorPosition ( const QPoint &  pos)
slot

Update cursor position.

Parameters
pos

Definition at line 301 of file FrmViewerOpenGL.cpp.

◆ slotUpdateRect [1/2]

void CFrmViewerOpenGL::slotUpdateRect ( const QRect &  r,
const QImage &  image 
)
slot

Update image.

Parameters
rimage rect
imageimage

Definition at line 278 of file FrmViewerOpenGL.cpp.

◆ slotUpdateRect [2/2]

void CFrmViewerOpenGL::slotUpdateRect ( QSharedPointer< CImage >  image)
slot

Definition at line 293 of file FrmViewerOpenGL.cpp.

◆ TranslationMousePoint()

int CFrmViewerOpenGL::TranslationMousePoint ( QPointF  inPos,
QPointF &  outPos 
)
private

Definition at line 345 of file FrmViewerOpenGL.cpp.

◆ wheelEvent()

void CFrmViewerOpenGL::wheelEvent ( QWheelEvent *  event)
overrideprotectedvirtual

Definition at line 409 of file FrmViewerOpenGL.cpp.

Member Data Documentation

◆ m_AdaptWindows

ADAPT_WINDOWS CFrmViewerOpenGL::m_AdaptWindows
private

Definition at line 129 of file FrmViewerOpenGL.h.

◆ m_dbZoomFactor

double CFrmViewerOpenGL::m_dbZoomFactor
private

Definition at line 130 of file FrmViewerOpenGL.h.

◆ m_Desktop

QImage CFrmViewerOpenGL::m_Desktop
private

Definition at line 120 of file FrmViewerOpenGL.h.

◆ m_pTexture

QOpenGLTexture* CFrmViewerOpenGL::m_pTexture
private

Definition at line 127 of file FrmViewerOpenGL.h.

◆ m_ShaderProgram

QOpenGLShaderProgram CFrmViewerOpenGL::m_ShaderProgram
private

Definition at line 124 of file FrmViewerOpenGL.h.

◆ m_VaoQuad

QOpenGLVertexArrayObject CFrmViewerOpenGL::m_VaoQuad
private

Definition at line 122 of file FrmViewerOpenGL.h.

◆ m_VboQuad

QOpenGLBuffer CFrmViewerOpenGL::m_VboQuad
private

Definition at line 123 of file FrmViewerOpenGL.h.

◆ m_VertexData

QVector<GLfloat> CFrmViewerOpenGL::m_VertexData
private

Definition at line 125 of file FrmViewerOpenGL.h.

Property Documentation

◆ ZoomFactor

double CFrmViewerOpenGL::ZoomFactor
readwrite

Definition at line 20 of file FrmViewerOpenGL.h.


The documentation for this class was generated from the following files: