MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / SetFullScreen

Method SetFullScreen

App/Client/ViewSplitter.cpp:249–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249int CViewSplitter::SetFullScreen(bool bFull)
250{
251 int nRet = 0;
252 if(0 >= m_nCount) return 0;
253
254 if(m_pParameterApp && m_pParameterApp->GetKeepSplitViewWhenFullScreen())
255 return 0;
256
257 QWidget* p = GetCurrentView();
258 qDebug(log) << "CurrentView:" << p;
259 if(!p) return 0;
260 if(bFull) {
261 m_szStyleSheet = styleSheet();
262 //qDebug(log) << "Style:" << m_szStyleSheet;
263 setStyleSheet("QWidget::pane{top:0px;left:0px;border:none;}");
264 m_HandleWidth = m_pMain->handleWidth();
265 m_pMain->setHandleWidth(0);
266 for(int i = 0; i < m_nRow; i++) {
267 auto sp = m_Row[i];
268 if(!sp) {
269 qCritical(log) << "Row" << i << "is null";
270 continue;
271 }
272 sp->setHandleWidth(0);
273 for(int j = 0; j < m_nRow; j++) {
274 if(m_nIdxRow == i && m_nIdxCol == j) {
275 ActiveContainer(nullptr);
276 SetVisibleTab(false);
277 continue;
278 }
279 auto p = sp->widget(j);
280 if(p) {
281 p->hide();
282 } else {
283 qCritical(log) << "Widget: Row" << i << "Col" << j << "is null";
284 }
285 }
286 }
287 }
288 else {
289 setStyleSheet(m_szStyleSheet);
290 m_pMain->setHandleWidth(m_HandleWidth);
291 for(int i = 0; i < m_nRow; i++) {
292 auto sp = m_Row[i];
293 sp->setHandleWidth(m_HandleWidth);
294 if(!sp) continue;
295 for(int j = 0; j < m_nRow; j++) {
296 auto p = sp->widget(j);
297 if(p) {
298 SetVisibleTab(m_pParameterApp->GetTabBar());
299 p->show();
300 if(m_nIdxRow == i && m_nIdxCol == j) {
301 CViewSplitterContainer* pView = qobject_cast<CViewSplitterContainer*>(p);
302 if(pView)
303 ActiveContainer(pView->GetView());
304 }
305 }
306 }

Callers

nothing calls this directly

Calls 3

GetTabBarMethod · 0.80
GetViewMethod · 0.45

Tested by

no test coverage detected