| 1892 | } |
| 1893 | |
| 1894 | void MainWindow::StartTimer() |
| 1895 | { |
| 1896 | bool bStart = false; |
| 1897 | int nMinInterval = 1; |
| 1898 | foreach(auto o, m_Operates) { |
| 1899 | if(o && o->GetStats()) { |
| 1900 | nMinInterval = qMin(nMinInterval, o->GetStats()->GetInterval()); |
| 1901 | bStart = true; |
| 1902 | } |
| 1903 | } |
| 1904 | if(bStart) { |
| 1905 | m_Timer.start(nMinInterval * 1000); |
| 1906 | //qDebug(log) << "Time interval:" << nMinInterval; |
| 1907 | } else { |
| 1908 | m_Timer.stop(); |
| 1909 | SetStatsVisible(false); |
| 1910 | } |
| 1911 | } |
| 1912 | |
| 1913 | void MainWindow::slotTimeOut() |
| 1914 | { |