85 LC_QDEBUG( "livecomms [UI] -> LcViewManagerPrivate::LcViewManagerPrivate()" ) |
85 LC_QDEBUG( "livecomms [UI] -> LcViewManagerPrivate::LcViewManagerPrivate()" ) |
86 |
86 |
87 mEngine = new LcUiEngine( engineName, applicationDisplayName ); |
87 mEngine = new LcUiEngine( engineName, applicationDisplayName ); |
88 mRepository = new LcUiComponentRepository( *mEngine ); |
88 mRepository = new LcUiComponentRepository( *mEngine ); |
89 setCurrentView( true ); |
89 setCurrentView( true ); |
90 |
|
91 // TODO: ignore orientation change at the moment, enable later |
|
92 /*connect( &mMainWindow, SIGNAL( orientationChanged(Qt::Orientation) ), |
|
93 this, SLOT( updateLayout() ) ); |
|
94 |
|
95 connect( &mMainWindow, SIGNAL( aboutToChangeOrientation() ), |
|
96 this, SLOT( prepareOrientationChange() ) ); |
|
97 */ |
|
98 |
90 |
99 connect(&mMainWindow, SIGNAL(appFocusGained()), mEngine, SLOT(maximize())); |
91 connect(&mMainWindow, SIGNAL(appFocusGained()), mEngine, SLOT(maximize())); |
100 connect(&mMainWindow, SIGNAL(appFocusLost()), mEngine, SLOT(minimize())); |
92 connect(&mMainWindow, SIGNAL(appFocusLost()), mEngine, SLOT(minimize())); |
101 |
93 |
102 LC_QDEBUG( "livecomms [UI] <- LcViewManagerPrivate::LcViewManagerPrivate()" ) |
94 LC_QDEBUG( "livecomms [UI] <- LcViewManagerPrivate::LcViewManagerPrivate()" ) |
129 LC_QDEBUG( "livecomms [UI] -> LcViewManagerPrivate::terminateSession" ) |
121 LC_QDEBUG( "livecomms [UI] -> LcViewManagerPrivate::terminateSession" ) |
130 mEngine->stop(); |
122 mEngine->stop(); |
131 LC_QDEBUG( "livecomms [UI] <- LcViewManagerPrivate::terminateSession" ) |
123 LC_QDEBUG( "livecomms [UI] <- LcViewManagerPrivate::terminateSession" ) |
132 } |
124 } |
133 |
125 |
134 // ----------------------------------------------------------------------------- |
|
135 // LcViewManagerPrivate::updateLayout |
|
136 // ----------------------------------------------------------------------------- |
|
137 // |
|
138 void LcViewManagerPrivate::updateLayout() |
|
139 { |
|
140 LC_QDEBUG( "livecomms [UI] -> LcViewManagerPrivate::updateLayout()" ) |
|
141 |
|
142 if ( mMainWindow.currentView() ) { |
|
143 LcView* currentView = static_cast<LcView*>( mMainWindow.currentView() ); |
|
144 QString layout = currentView->currentLayout(); |
|
145 mRepository->loadLayout( layout ); |
|
146 currentView->setContentFullScreen( true ); |
|
147 currentView->updateVideoRects(); |
|
148 } |
|
149 |
|
150 LC_QDEBUG( "livecomms [UI] <- LcViewManagerPrivate::updateLayout()" ) |
|
151 } |
|
152 |
126 |
153 // ----------------------------------------------------------------------------- |
127 // ----------------------------------------------------------------------------- |
154 // LcViewManagerPrivate::prepareOrientationChange |
128 // LcViewManagerPrivate::prepareOrientationChange |
155 // ----------------------------------------------------------------------------- |
129 // ----------------------------------------------------------------------------- |
156 // |
130 // |