| 120 | } |
| 121 | |
| 122 | void CMainWindow::on_actionStart_triggered() |
| 123 | { |
| 124 | foreach(auto plugin, m_Plugins.m_Plugins) |
| 125 | { |
| 126 | if(m_bStart) |
| 127 | plugin->Stop(); |
| 128 | else |
| 129 | plugin->Start(); |
| 130 | } |
| 131 | |
| 132 | #ifdef HAVE_ICE |
| 133 | if(m_bStart) |
| 134 | CICE::Instance()->slotStop(); |
| 135 | else |
| 136 | CICE::Instance()->slotStart(); |
| 137 | #endif |
| 138 | |
| 139 | if(m_bStart) |
| 140 | { |
| 141 | ui->actionStart->setIcon(QIcon::fromTheme("media-playback-start")); |
| 142 | ui->actionStart->setText(tr("Start")); |
| 143 | SetStatusText(tr("Start service")); |
| 144 | ui->actionStart->setChecked(false); |
| 145 | } |
| 146 | else |
| 147 | { |
| 148 | ui->actionStart->setIcon(QIcon::fromTheme("media-playback-stop")); |
| 149 | ui->actionStart->setText(tr("Stop")); |
| 150 | SetStatusText(tr("Stop service")); |
| 151 | ui->actionStart->setChecked(true); |
| 152 | } |
| 153 | m_bStart = !m_bStart; |
| 154 | } |
| 155 | |
| 156 | int CMainWindow::SetStatusText(QString szText) |
| 157 | { |