Rabbit Remote Control 0.1.0-bate16
Loading...
Searching...
No Matches
View.cpp
1// Author: Kang Lin <kl222@126.com>
2#include <QLoggingCategory>
3
4#include "View.h"
5
6static Q_LOGGING_CATEGORY(log, "App.View")
7CView::CView(CParameterApp *pPara, QWidget *parent) : QWidget(parent)
8 , m_pParameterApp(pPara)
9{
10 qDebug(log) << Q_FUNC_INFO;
11 Q_ASSERT(m_pParameterApp);
12 //setFocusPolicy(Qt::NoFocus);
13 //setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
14 //setMinimumSize(200, 100);
15}
16
17CView::~CView()
18{
19 qDebug(log) << Q_FUNC_INFO;
20}
21
22int CView::SetFullScreen(bool bFull)
23{
24 int nRet = 0;
25 nRet = OnFullScreen(bFull);
29 auto pWin = GetCurrentView();
30 if(pWin) {
31 if(-1 < pWin->metaObject()->indexOfMethod("OnFullScreen(bool)")) {
32 int nRet = 0;
33 bool bRet = QMetaObject::invokeMethod(
34 pWin, "OnFullScreen",
35 Qt::DirectConnection,
36 Q_RETURN_ARG(int, nRet),
37 Q_ARG(bool, bFull));
38 if(!bRet || nRet) {
39 qCritical(log) << QString("Call %1:OnFullScreen(bool) fail")
40 .arg(pWin->metaObject()->className());
41 }
42 }
43 }
44 return nRet;
45}
The CView class.
Definition View.h:25
virtual int SetFullScreen(bool bFull)
Definition View.cpp:22
virtual QWidget * GetCurrentView()=0