| 242 | } |
| 243 | |
| 244 | void CaptureContext::Begin(QString paramFilename, QString remoteHost, uint32_t remoteIdent, |
| 245 | bool temp, QString scriptFilename) |
| 246 | { |
| 247 | m_MainWindow->show(); |
| 248 | |
| 249 | if(remoteIdent != 0) |
| 250 | { |
| 251 | m_MainWindow->ShowLiveCapture( |
| 252 | new LiveCapture(*this, remoteHost, remoteHost, remoteIdent, m_MainWindow, m_MainWindow)); |
| 253 | } |
| 254 | |
| 255 | if(!paramFilename.isEmpty()) |
| 256 | { |
| 257 | QFileInfo checkFile(paramFilename); |
| 258 | |
| 259 | if(checkFile.exists() && checkFile.isFile()) |
| 260 | { |
| 261 | m_MainWindow->LoadFromFilename(paramFilename, temp); |
| 262 | if(temp) |
| 263 | m_MainWindow->takeCaptureOwnership(); |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | if(!scriptFilename.isEmpty()) |
| 268 | { |
| 269 | ShowPythonShell(); |
| 270 | |
| 271 | if(GetPythonShell()->LoadScriptFromFilename(scriptFilename)) |
| 272 | GetPythonShell()->RunScript(); |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | bool CaptureContext::isRunning() |
| 277 | { |
no test coverage detected