MCPcopy Create free account
hub / github.com/D4stiny/PeaceMaker / AddProcessSummary

Method AddProcessSummary

PeaceMakerGUI/mainwindow.cpp:455–483  ·  view source on GitHub ↗

* @brief MainWindow::AddProcessSummary - Add a process to the processes table. * @param ProcessSummary - The process to add. */

Source from the content-addressed store, hash-verified

453 * @param ProcessSummary - The process to add.
454 */
455void MainWindow::AddProcessSummary(PROCESS_SUMMARY_ENTRY ProcessSummary)
456{
457 std::time_t processExecutionDate;
458 std::string dateString;
459 QTableWidgetItem* pathItem;
460
461 //
462 // First, we need to convert the epoch time to a date.
463 //
464 processExecutionDate = ProcessSummary.EpochExecutionTime;
465 dateString = std::ctime(&processExecutionDate);
466 dateString[dateString.length()-1] = '\0'; // Remove the newline.
467
468 //
469 // Next, add the appropriate information to the table.
470 //
471 this->ui->ProcessesTable->setRowCount(this->ProcessesTableSize + 1);
472 this->ui->ProcessesTable->insertRow(0);
473 this->ui->ProcessesTable->setItem(0, 0, new QTableWidgetItem(QString::number(RCAST<ULONG64>(ProcessSummary.ProcessId))));
474 this->ui->ProcessesTable->setItem(0, 1, new QTableWidgetItem(QString::fromStdString(dateString)));
475
476 pathItem = new QTableWidgetItem(QString::fromWCharArray(ProcessSummary.ImageFileName));
477 pathItem->setToolTip(QString::fromWCharArray(ProcessSummary.ImageFileName));
478 this->ui->ProcessesTable->setItem(0, 2, pathItem);
479 //this->ui->ProcessesTable->resizeRowsToContents();
480 this->ProcessesTableSize++;
481
482 processes.push_back(ProcessSummary);
483}
484
485/**
486 * @brief MainWindow::AddFilterSummary - Add a filter to the filters table.

Callers 1

ThreadUpdateTablesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected