Changeset View
Changeset View
Standalone View
Standalone View
app/session.cpp
Context not available. | |||||
43 | 43 | | |||
---|---|---|---|---|---|
44 | Session::~Session() | 44 | Session::~Session() | ||
45 | { | 45 | { | ||
46 | if (m_baseSplitter) delete m_baseSplitter; | 46 | if(m_baseSplitter) delete m_baseSplitter; | ||
47 | 47 | | |||
48 | emit destroyed(m_sessionId); | 48 | emit destroyed(m_sessionId); | ||
49 | } | 49 | } | ||
Context not available. | |||||
73 | 73 | | |||
74 | QWidget* terminalWidget = terminal->terminalWidget(); | 74 | QWidget* terminalWidget = terminal->terminalWidget(); | ||
75 | 75 | | |||
76 | if (terminalWidget) | 76 | if(terminalWidget) | ||
77 | { | 77 | { | ||
78 | terminalWidget->setFocus(); | 78 | terminalWidget->setFocus(); | ||
79 | setActiveTerminal(terminal->id()); | 79 | setActiveTerminal(terminal->id()); | ||
Context not available. | |||||
97 | 97 | | |||
98 | QWidget* terminalWidget = terminal->terminalWidget(); | 98 | QWidget* terminalWidget = terminal->terminalWidget(); | ||
99 | 99 | | |||
100 | if (terminalWidget) | 100 | if(terminalWidget) | ||
101 | { | 101 | { | ||
102 | terminalWidget->setFocus(); | 102 | terminalWidget->setFocus(); | ||
103 | setActiveTerminal(terminal->id()); | 103 | setActiveTerminal(terminal->id()); | ||
Context not available. | |||||
136 | 136 | | |||
137 | QWidget* terminalWidget = terminal->terminalWidget(); | 137 | QWidget* terminalWidget = terminal->terminalWidget(); | ||
138 | 138 | | |||
139 | if (terminalWidget) | 139 | if(terminalWidget) | ||
140 | { | 140 | { | ||
141 | terminalWidget->setFocus(); | 141 | terminalWidget->setFocus(); | ||
142 | setActiveTerminal(terminal->id()); | 142 | setActiveTerminal(terminal->id()); | ||
Context not available. | |||||
167 | m_terminals.insert(terminal->id(), terminal); | 167 | m_terminals.insert(terminal->id(), terminal); | ||
168 | 168 | | |||
169 | QWidget* terminalWidget = terminal->terminalWidget(); | 169 | QWidget* terminalWidget = terminal->terminalWidget(); | ||
170 | if (terminalWidget) terminalWidget->setFocus(); | 170 | if(terminalWidget) terminalWidget->setFocus(); | ||
171 | 171 | | |||
172 | return terminal; | 172 | return terminal; | ||
173 | } | 173 | } | ||
174 | 174 | | |||
175 | void Session::closeTerminal(int terminalId) | 175 | void Session::closeTerminal(int terminalId) | ||
176 | { | 176 | { | ||
177 | if (terminalId == -1) terminalId = m_activeTerminalId; | 177 | if(terminalId == -1) terminalId = m_activeTerminalId; | ||
178 | if (terminalId == -1) return; | 178 | if(terminalId == -1) return; | ||
179 | if (!m_terminals.contains(terminalId)) return; | 179 | if(!m_terminals.contains(terminalId)) return; | ||
180 | 180 | | |||
181 | m_terminals.value(terminalId)->deletePart(); | 181 | m_terminals.value(terminalId)->deletePart(); | ||
182 | } | 182 | } | ||
183 | 183 | | |||
184 | void Session::focusPreviousTerminal() | 184 | void Session::focusPreviousTerminal() | ||
185 | { | 185 | { | ||
186 | if (m_activeTerminalId == -1) return; | 186 | if(m_activeTerminalId == -1) return; | ||
187 | if (!m_terminals.contains(m_activeTerminalId)) return; | 187 | if(!m_terminals.contains(m_activeTerminalId)) return; | ||
188 | 188 | | |||
189 | QMapIterator<int, Terminal*> it(m_terminals); | 189 | QMapIterator<int, Terminal*> it(m_terminals); | ||
190 | 190 | | |||
Context not available. | |||||
194 | { | 194 | { | ||
195 | it.previous(); | 195 | it.previous(); | ||
196 | 196 | | |||
197 | if (it.key() == m_activeTerminalId) | 197 | if(it.key() == m_activeTerminalId) | ||
198 | { | 198 | { | ||
199 | if (it.hasPrevious()) | 199 | if(it.hasPrevious()) | ||
200 | { | 200 | { | ||
201 | QWidget* terminalWidget = it.peekPrevious().value()->terminalWidget(); | 201 | QWidget* terminalWidget = it.peekPrevious().value()->terminalWidget(); | ||
202 | if (terminalWidget) terminalWidget->setFocus(); | 202 | if(terminalWidget) terminalWidget->setFocus(); | ||
203 | } | 203 | } | ||
204 | else | 204 | else | ||
205 | { | 205 | { | ||
206 | it.toBack(); | 206 | it.toBack(); | ||
207 | 207 | | |||
208 | QWidget* terminalWidget = it.peekPrevious().value()->terminalWidget(); | 208 | QWidget* terminalWidget = it.peekPrevious().value()->terminalWidget(); | ||
209 | if (terminalWidget) terminalWidget->setFocus(); | 209 | if(terminalWidget) terminalWidget->setFocus(); | ||
210 | } | 210 | } | ||
211 | 211 | | |||
212 | break; | 212 | break; | ||
Context not available. | |||||
216 | 216 | | |||
217 | void Session::focusNextTerminal() | 217 | void Session::focusNextTerminal() | ||
218 | { | 218 | { | ||
219 | if (m_activeTerminalId == -1) return; | 219 | if(m_activeTerminalId == -1) return; | ||
220 | if (!m_terminals.contains(m_activeTerminalId)) return; | 220 | if(!m_terminals.contains(m_activeTerminalId)) return; | ||
221 | 221 | | |||
222 | QMapIterator<int, Terminal*> it(m_terminals); | 222 | QMapIterator<int, Terminal*> it(m_terminals); | ||
223 | 223 | | |||
Context not available. | |||||
225 | { | 225 | { | ||
226 | it.next(); | 226 | it.next(); | ||
227 | 227 | | |||
228 | if (it.key() == m_activeTerminalId) | 228 | if(it.key() == m_activeTerminalId) | ||
229 | { | 229 | { | ||
230 | if (it.hasNext()) | 230 | if(it.hasNext()) | ||
231 | { | 231 | { | ||
232 | QWidget* terminalWidget = it.peekNext().value()->terminalWidget(); | 232 | QWidget* terminalWidget = it.peekNext().value()->terminalWidget(); | ||
233 | if (terminalWidget) terminalWidget->setFocus(); | 233 | if(terminalWidget) terminalWidget->setFocus(); | ||
234 | } | 234 | } | ||
235 | else | 235 | else | ||
236 | { | 236 | { | ||
237 | it.toFront(); | 237 | it.toFront(); | ||
238 | 238 | | |||
239 | QWidget* terminalWidget = it.peekNext().value()->terminalWidget(); | 239 | QWidget* terminalWidget = it.peekNext().value()->terminalWidget(); | ||
240 | if (terminalWidget) terminalWidget->setFocus(); | 240 | if(terminalWidget) terminalWidget->setFocus(); | ||
241 | } | 241 | } | ||
242 | 242 | | |||
243 | break; | 243 | break; | ||
Context not available. | |||||
247 | 247 | | |||
248 | int Session::splitLeftRight(int terminalId) | 248 | int Session::splitLeftRight(int terminalId) | ||
249 | { | 249 | { | ||
250 | if (terminalId == -1) terminalId = m_activeTerminalId; | 250 | if(terminalId == -1) terminalId = m_activeTerminalId; | ||
251 | if (terminalId == -1) return -1; | 251 | if(terminalId == -1) return -1; | ||
252 | if (!m_terminals.contains(terminalId)) return -1; | 252 | if(!m_terminals.contains(terminalId)) return -1; | ||
253 | 253 | | |||
254 | Terminal* terminal = m_terminals.value(terminalId); | 254 | Terminal* terminal = m_terminals.value(terminalId); | ||
255 | 255 | | |||
256 | if (terminal) | 256 | if(terminal) | ||
257 | return split(terminal, Qt::Horizontal); | 257 | return split(terminal, Qt::Horizontal); | ||
258 | else | 258 | else | ||
259 | return -1; | 259 | return -1; | ||
Context not available. | |||||
261 | 261 | | |||
262 | int Session::splitTopBottom(int terminalId) | 262 | int Session::splitTopBottom(int terminalId) | ||
263 | { | 263 | { | ||
264 | if (terminalId == -1) terminalId = m_activeTerminalId; | 264 | if(terminalId == -1) terminalId = m_activeTerminalId; | ||
265 | if (terminalId == -1) return -1; | 265 | if(terminalId == -1) return -1; | ||
266 | if (!m_terminals.contains(terminalId)) return -1; | 266 | if(!m_terminals.contains(terminalId)) return -1; | ||
267 | 267 | | |||
268 | Terminal* terminal = m_terminals.value(terminalId); | 268 | Terminal* terminal = m_terminals.value(terminalId); | ||
269 | 269 | | |||
270 | if (terminal) | 270 | if(terminal) | ||
271 | return split(terminal, Qt::Vertical); | 271 | return split(terminal, Qt::Vertical); | ||
272 | else | 272 | else | ||
273 | return -1; | 273 | return -1; | ||
Context not available. | |||||
277 | { | 277 | { | ||
278 | Splitter* splitter = static_cast<Splitter*>(terminal->splitter()); | 278 | Splitter* splitter = static_cast<Splitter*>(terminal->splitter()); | ||
279 | 279 | | |||
280 | if (splitter->count() == 1) | 280 | if(splitter->count() == 1) | ||
281 | { | 281 | { | ||
282 | int splitterWidth = splitter->width(); | 282 | int splitterWidth = splitter->width(); | ||
283 | 283 | | |||
284 | if (splitter->orientation() != orientation) | 284 | if(splitter->orientation() != orientation) | ||
285 | splitter->setOrientation(orientation); | 285 | splitter->setOrientation(orientation); | ||
286 | 286 | | |||
287 | terminal = addTerminal(splitter); | 287 | terminal = addTerminal(splitter); | ||
Context not available. | |||||
291 | splitter->setSizes(newSplitterSizes); | 291 | splitter->setSizes(newSplitterSizes); | ||
292 | 292 | | |||
293 | QWidget* partWidget = terminal->partWidget(); | 293 | QWidget* partWidget = terminal->partWidget(); | ||
294 | if (partWidget) partWidget->show(); | 294 | if(partWidget) partWidget->show(); | ||
295 | 295 | | |||
296 | m_activeTerminalId = terminal->id(); | 296 | m_activeTerminalId = terminal->id(); | ||
297 | } | 297 | } | ||
Context not available. | |||||
302 | Splitter* newSplitter = new Splitter(orientation, splitter); | 302 | Splitter* newSplitter = new Splitter(orientation, splitter); | ||
303 | connect(newSplitter, SIGNAL(destroyed()), this, SLOT(cleanup())); | 303 | connect(newSplitter, SIGNAL(destroyed()), this, SLOT(cleanup())); | ||
304 | 304 | | |||
305 | if (splitter->indexOf(terminal->partWidget()) == 0) | 305 | if(splitter->indexOf(terminal->partWidget()) == 0) | ||
306 | splitter->insertWidget(0, newSplitter); | 306 | splitter->insertWidget(0, newSplitter); | ||
307 | 307 | | |||
308 | QWidget* partWidget = terminal->partWidget(); | 308 | QWidget* partWidget = terminal->partWidget(); | ||
309 | if (partWidget) partWidget->setParent(newSplitter); | 309 | if(partWidget) partWidget->setParent(newSplitter); | ||
310 | 310 | | |||
311 | terminal->setSplitter(newSplitter); | 311 | terminal->setSplitter(newSplitter); | ||
312 | 312 | | |||
Context not available. | |||||
320 | newSplitter->show(); | 320 | newSplitter->show(); | ||
321 | 321 | | |||
322 | partWidget = terminal->partWidget(); | 322 | partWidget = terminal->partWidget(); | ||
323 | if (partWidget) partWidget->show(); | 323 | if(partWidget) partWidget->show(); | ||
324 | 324 | | |||
325 | m_activeTerminalId = terminal->id(); | 325 | m_activeTerminalId = terminal->id(); | ||
326 | } | 326 | } | ||
Context not available. | |||||
340 | bool isForward = (direction == Down || direction == Right); | 340 | bool isForward = (direction == Down || direction == Right); | ||
341 | 341 | | |||
342 | // Detecting correct orientation. | 342 | // Detecting correct orientation. | ||
343 | if ((splitter->orientation() == Qt::Horizontal && isHorizontal) | 343 | if((splitter->orientation() == Qt::Horizontal && isHorizontal) | ||
344 | || (splitter->orientation() == Qt::Vertical && !isHorizontal)) | 344 | || (splitter->orientation() == Qt::Vertical && !isHorizontal)) | ||
345 | { | 345 | { | ||
346 | 346 | | |||
347 | int currentPos = splitter->indexOf(child); | 347 | int currentPos = splitter->indexOf(child); | ||
348 | 348 | | |||
349 | if (currentPos != -1 // Next/Prev movable element detection. | 349 | if(currentPos != -1 // Next/Prev movable element detection. | ||
350 | && (currentPos != 0 || isForward) | 350 | && (currentPos != 0 || isForward) | ||
351 | && (currentPos != splitter->count() - 1 || !isForward)) | 351 | && (currentPos != splitter->count() - 1 || !isForward)) | ||
352 | { | 352 | { | ||
Context not available. | |||||
378 | 378 | | |||
379 | void Session::setTitle(int terminalId, const QString& title) | 379 | void Session::setTitle(int terminalId, const QString& title) | ||
380 | { | 380 | { | ||
381 | if (terminalId == m_activeTerminalId) | 381 | if(terminalId == m_activeTerminalId) | ||
382 | { | 382 | { | ||
383 | m_title = title; | 383 | m_title = title; | ||
384 | 384 | | |||
Context not available. | |||||
389 | 389 | | |||
390 | void Session::cleanup(int terminalId) | 390 | void Session::cleanup(int terminalId) | ||
391 | { | 391 | { | ||
392 | if (m_activeTerminalId == terminalId && m_terminals.count() > 1) | 392 | if(m_activeTerminalId == terminalId && m_terminals.count() > 1) | ||
393 | focusPreviousTerminal(); | 393 | focusPreviousTerminal(); | ||
394 | 394 | | |||
395 | m_terminals.remove(terminalId); | 395 | m_terminals.remove(terminalId); | ||
Context not available. | |||||
399 | 399 | | |||
400 | void Session::cleanup() | 400 | void Session::cleanup() | ||
401 | { | 401 | { | ||
402 | if (!m_baseSplitter) return; | 402 | if(!m_baseSplitter) return; | ||
403 | 403 | | |||
404 | m_baseSplitter->recursiveCleanup(); | 404 | m_baseSplitter->recursiveCleanup(); | ||
405 | 405 | | |||
406 | if (m_terminals.isEmpty()) | 406 | if(m_terminals.isEmpty()) | ||
407 | m_baseSplitter->deleteLater(); | 407 | m_baseSplitter->deleteLater(); | ||
408 | } | 408 | } | ||
409 | 409 | | |||
Context not available. | |||||
434 | 434 | | |||
435 | Terminal* Session::getTerminal(int terminalId) | 435 | Terminal* Session::getTerminal(int terminalId) | ||
436 | { | 436 | { | ||
437 | if (!m_terminals.contains(terminalId)) return 0; | 437 | if(!m_terminals.contains(terminalId)) return 0; | ||
438 | 438 | | |||
439 | return m_terminals.value(terminalId); | 439 | return m_terminals.value(terminalId); | ||
440 | } | 440 | } | ||
441 | 441 | | |||
442 | void Session::runCommand(const QString& command, int terminalId) | 442 | void Session::runCommand(const QString& command, int terminalId) | ||
443 | { | 443 | { | ||
444 | if (terminalId == -1) terminalId = m_activeTerminalId; | 444 | if(terminalId == -1) terminalId = m_activeTerminalId; | ||
445 | if (terminalId == -1) return; | 445 | if(terminalId == -1) return; | ||
446 | if (!m_terminals.contains(terminalId)) return; | 446 | if(!m_terminals.contains(terminalId)) return; | ||
447 | 447 | | |||
448 | m_terminals.value(terminalId)->runCommand(command); | 448 | m_terminals.value(terminalId)->runCommand(command); | ||
449 | } | 449 | } | ||
450 | 450 | | |||
451 | void Session::manageProfiles() | 451 | void Session::manageProfiles() | ||
452 | { | 452 | { | ||
453 | if ( m_activeTerminalId == -1) return; | 453 | if( m_activeTerminalId == -1) return; | ||
454 | if (!m_terminals.contains(m_activeTerminalId)) return; | 454 | if(!m_terminals.contains(m_activeTerminalId)) return; | ||
455 | 455 | | |||
456 | m_terminals.value(m_activeTerminalId)->manageProfiles(); | 456 | m_terminals.value(m_activeTerminalId)->manageProfiles(); | ||
457 | } | 457 | } | ||
458 | 458 | | |||
459 | void Session::editProfile() | 459 | void Session::editProfile() | ||
460 | { | 460 | { | ||
461 | if ( m_activeTerminalId == -1) return; | 461 | if( m_activeTerminalId == -1) return; | ||
462 | if (!m_terminals.contains(m_activeTerminalId)) return; | 462 | if(!m_terminals.contains(m_activeTerminalId)) return; | ||
463 | 463 | | |||
464 | m_terminals.value(m_activeTerminalId)->editProfile(); | 464 | m_terminals.value(m_activeTerminalId)->editProfile(); | ||
465 | } | 465 | } | ||
Context not available. | |||||
471 | QMapIterator<int, Terminal*> i(m_terminals); | 471 | QMapIterator<int, Terminal*> i(m_terminals); | ||
472 | 472 | | |||
473 | while (i.hasNext()) | 473 | while (i.hasNext()) | ||
474 | if (i.next().value()->keyboardInputEnabled()) | 474 | if(i.next().value()->keyboardInputEnabled()) | ||
475 | ++keyboardInputEnabledCount; | 475 | ++keyboardInputEnabledCount; | ||
476 | 476 | | |||
477 | return m_terminals.count() == keyboardInputEnabledCount; | 477 | return m_terminals.count() == keyboardInputEnabledCount; | ||
Context not available. | |||||
487 | 487 | | |||
488 | bool Session::keyboardInputEnabled(int terminalId) | 488 | bool Session::keyboardInputEnabled(int terminalId) | ||
489 | { | 489 | { | ||
490 | if (!m_terminals.contains(terminalId)) return false; | 490 | if(!m_terminals.contains(terminalId)) return false; | ||
491 | 491 | | |||
492 | return m_terminals.value(terminalId)->keyboardInputEnabled(); | 492 | return m_terminals.value(terminalId)->keyboardInputEnabled(); | ||
493 | } | 493 | } | ||
494 | 494 | | |||
495 | void Session::setKeyboardInputEnabled(int terminalId, bool enabled) | 495 | void Session::setKeyboardInputEnabled(int terminalId, bool enabled) | ||
496 | { | 496 | { | ||
497 | if (!m_terminals.contains(terminalId)) return; | 497 | if(!m_terminals.contains(terminalId)) return; | ||
498 | 498 | | |||
499 | m_terminals.value(terminalId)->setKeyboardInputEnabled(enabled); | 499 | m_terminals.value(terminalId)->setKeyboardInputEnabled(enabled); | ||
500 | } | 500 | } | ||
Context not available. | |||||
504 | QMapIterator<int, Terminal*> i(m_terminals); | 504 | QMapIterator<int, Terminal*> i(m_terminals); | ||
505 | 505 | | |||
506 | while (i.hasNext()) | 506 | while (i.hasNext()) | ||
507 | if (i.next().value()->keyboardInputEnabled()) | 507 | if(i.next().value()->keyboardInputEnabled()) | ||
508 | return true; | 508 | return true; | ||
509 | 509 | | |||
510 | return false; | 510 | return false; | ||
Context not available. | |||||
515 | QMapIterator<int, Terminal*> i(m_terminals); | 515 | QMapIterator<int, Terminal*> i(m_terminals); | ||
516 | 516 | | |||
517 | while (i.hasNext()) | 517 | while (i.hasNext()) | ||
518 | if (!i.next().value()->keyboardInputEnabled()) | 518 | if(!i.next().value()->keyboardInputEnabled()) | ||
519 | return true; | 519 | return true; | ||
520 | 520 | | |||
521 | return false; | 521 | return false; | ||
Context not available. | |||||
528 | QMapIterator<int, Terminal*> i(m_terminals); | 528 | QMapIterator<int, Terminal*> i(m_terminals); | ||
529 | 529 | | |||
530 | while (i.hasNext()) | 530 | while (i.hasNext()) | ||
531 | if (i.next().value()->monitorActivityEnabled()) | 531 | if(i.next().value()->monitorActivityEnabled()) | ||
532 | ++monitorActivityEnabledCount; | 532 | ++monitorActivityEnabledCount; | ||
533 | 533 | | |||
534 | return m_terminals.count() == monitorActivityEnabledCount; | 534 | return m_terminals.count() == monitorActivityEnabledCount; | ||
Context not available. | |||||
544 | 544 | | |||
545 | bool Session::monitorActivityEnabled(int terminalId) | 545 | bool Session::monitorActivityEnabled(int terminalId) | ||
546 | { | 546 | { | ||
547 | if (!m_terminals.contains(terminalId)) return false; | 547 | if(!m_terminals.contains(terminalId)) return false; | ||
548 | 548 | | |||
549 | return m_terminals.value(terminalId)->monitorActivityEnabled(); | 549 | return m_terminals.value(terminalId)->monitorActivityEnabled(); | ||
550 | } | 550 | } | ||
551 | 551 | | |||
552 | void Session::setMonitorActivityEnabled(int terminalId, bool enabled) | 552 | void Session::setMonitorActivityEnabled(int terminalId, bool enabled) | ||
553 | { | 553 | { | ||
554 | if (!m_terminals.contains(terminalId)) return; | 554 | if(!m_terminals.contains(terminalId)) return; | ||
555 | 555 | | |||
556 | Terminal* terminal = m_terminals.value(terminalId); | 556 | Terminal* terminal = m_terminals.value(terminalId); | ||
557 | 557 | | |||
Context not available. | |||||
566 | QMapIterator<int, Terminal*> i(m_terminals); | 566 | QMapIterator<int, Terminal*> i(m_terminals); | ||
567 | 567 | | |||
568 | while (i.hasNext()) | 568 | while (i.hasNext()) | ||
569 | if (i.next().value()->monitorActivityEnabled()) | 569 | if(i.next().value()->monitorActivityEnabled()) | ||
570 | return true; | 570 | return true; | ||
571 | 571 | | |||
572 | return false; | 572 | return false; | ||
Context not available. | |||||
577 | QMapIterator<int, Terminal*> i(m_terminals); | 577 | QMapIterator<int, Terminal*> i(m_terminals); | ||
578 | 578 | | |||
579 | while (i.hasNext()) | 579 | while (i.hasNext()) | ||
580 | if (!i.next().value()->monitorActivityEnabled()) | 580 | if(!i.next().value()->monitorActivityEnabled()) | ||
581 | return true; | 581 | return true; | ||
582 | 582 | | |||
583 | return false; | 583 | return false; | ||
Context not available. | |||||
603 | QMapIterator<int, Terminal*> i(m_terminals); | 603 | QMapIterator<int, Terminal*> i(m_terminals); | ||
604 | 604 | | |||
605 | while (i.hasNext()) | 605 | while (i.hasNext()) | ||
606 | if (i.next().value()->monitorSilenceEnabled()) | 606 | if(i.next().value()->monitorSilenceEnabled()) | ||
607 | ++monitorSilenceEnabledCount; | 607 | ++monitorSilenceEnabledCount; | ||
608 | 608 | | |||
609 | return m_terminals.count() == monitorSilenceEnabledCount; | 609 | return m_terminals.count() == monitorSilenceEnabledCount; | ||
Context not available. | |||||
619 | 619 | | |||
620 | bool Session::monitorSilenceEnabled(int terminalId) | 620 | bool Session::monitorSilenceEnabled(int terminalId) | ||
621 | { | 621 | { | ||
622 | if (!m_terminals.contains(terminalId)) return false; | 622 | if(!m_terminals.contains(terminalId)) return false; | ||
623 | 623 | | |||
624 | return m_terminals.value(terminalId)->monitorSilenceEnabled(); | 624 | return m_terminals.value(terminalId)->monitorSilenceEnabled(); | ||
625 | } | 625 | } | ||
626 | 626 | | |||
627 | void Session::setMonitorSilenceEnabled(int terminalId, bool enabled) | 627 | void Session::setMonitorSilenceEnabled(int terminalId, bool enabled) | ||
628 | { | 628 | { | ||
629 | if (!m_terminals.contains(terminalId)) return; | 629 | if(!m_terminals.contains(terminalId)) return; | ||
630 | 630 | | |||
631 | m_terminals.value(terminalId)->setMonitorSilenceEnabled(enabled); | 631 | m_terminals.value(terminalId)->setMonitorSilenceEnabled(enabled); | ||
632 | } | 632 | } | ||
Context not available. | |||||
636 | QMapIterator<int, Terminal*> i(m_terminals); | 636 | QMapIterator<int, Terminal*> i(m_terminals); | ||
637 | 637 | | |||
638 | while (i.hasNext()) | 638 | while (i.hasNext()) | ||
639 | if (!i.next().value()->monitorSilenceEnabled()) | 639 | if(!i.next().value()->monitorSilenceEnabled()) | ||
640 | return true; | 640 | return true; | ||
641 | 641 | | |||
642 | return false; | 642 | return false; | ||
Context not available. | |||||
647 | QMapIterator<int, Terminal*> i(m_terminals); | 647 | QMapIterator<int, Terminal*> i(m_terminals); | ||
648 | 648 | | |||
649 | while (i.hasNext()) | 649 | while (i.hasNext()) | ||
650 | if (i.next().value()->monitorSilenceEnabled()) | 650 | if(i.next().value()->monitorSilenceEnabled()) | ||
651 | return true; | 651 | return true; | ||
652 | 652 | | |||
653 | return false; | 653 | return false; | ||
Context not available. |