68 this, SLOT( changeRecentView(LogsServices::LogsView, bool) ) ); |
68 this, SLOT( changeRecentView(LogsServices::LogsView, bool) ) ); |
69 |
69 |
70 connect( &mServiceOld, SIGNAL( activateView(QString) ), |
70 connect( &mServiceOld, SIGNAL( activateView(QString) ), |
71 this, SLOT( changeMatchesView(QString) )); |
71 this, SLOT( changeMatchesView(QString) )); |
72 |
72 |
73 connect( &mMainWindow, SIGNAL(appFocusGained()), this, SLOT(appFocusGained()) ); |
|
74 connect( &mMainWindow, SIGNAL(appFocusLost()), this, SLOT(appFocusLost()) ); |
|
75 |
|
76 QObject::connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(saveActivity())); |
73 QObject::connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(saveActivity())); |
77 |
74 |
78 handleFirstActivation(); |
75 handleFirstActivation(); |
79 |
76 |
80 LOGS_QDEBUG( "logs [UI] <- LogsViewManager::LogsViewManager()" ); |
77 LOGS_QDEBUG( "logs [UI] <- LogsViewManager::LogsViewManager()" ); |
139 void LogsViewManager::changeMatchesView(QString dialpadText) |
136 void LogsViewManager::changeMatchesView(QString dialpadText) |
140 { |
137 { |
141 LOGS_QDEBUG( "logs [UI] -> LogsViewManager::changeMatchesView()" ); |
138 LOGS_QDEBUG( "logs [UI] -> LogsViewManager::changeMatchesView()" ); |
142 doActivateView(LogsMatchesViewId, true, QVariant(), dialpadText); |
139 doActivateView(LogsMatchesViewId, true, QVariant(), dialpadText); |
143 LOGS_QDEBUG( "logs [UI] <- LogsViewManager::changeMatchesView()" ); |
140 LOGS_QDEBUG( "logs [UI] <- LogsViewManager::changeMatchesView()" ); |
144 } |
|
145 |
|
146 // ----------------------------------------------------------------------------- |
|
147 // LogsViewManager::appFocusGained |
|
148 // Activate recent view if gaining focus first time and app was not started |
|
149 // via highway service. If app was started by using service request, |
|
150 // wait the request to appear before activating view. |
|
151 // ----------------------------------------------------------------------------- |
|
152 // |
|
153 void LogsViewManager::appFocusGained() |
|
154 { |
|
155 LOGS_QDEBUG( "logs [UI] -> LogsViewManager::appFocusGained()" ); |
|
156 |
|
157 foreach ( LogsBaseView* view, mViewStack ){ |
|
158 disconnect( view, SIGNAL(exitAllowed()), this, SLOT(proceedExit()) ); |
|
159 } |
|
160 |
|
161 LOGS_QDEBUG( "logs [UI] <- LogsViewManager::appFocusGained()" ); |
|
162 } |
|
163 |
|
164 // ----------------------------------------------------------------------------- |
|
165 // LogsViewManager::appFocusLost |
|
166 // ----------------------------------------------------------------------------- |
|
167 // |
|
168 void LogsViewManager::appFocusLost() |
|
169 { |
|
170 LOGS_QDEBUG( "logs [UI] -> LogsViewManager::appFocusLost()" ); |
|
171 |
|
172 LOGS_QDEBUG( "logs [UI] <- LogsViewManager::appFocusLost()" ); |
|
173 } |
141 } |
174 |
142 |
175 // ----------------------------------------------------------------------------- |
143 // ----------------------------------------------------------------------------- |
176 // LogsViewManager::proceedExit |
144 // LogsViewManager::proceedExit |
177 // ----------------------------------------------------------------------------- |
145 // ----------------------------------------------------------------------------- |