#include "MainWindow.h" #include "ui_MainWindow.h" #include MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent) , ui(new Ui::MainWindow) , openCLManager(new OpenCLManager()) { ui->setupUi(this); } MainWindow::~MainWindow() { delete ui; delete openCLManager; } void MainWindow::keyPressEvent(QKeyEvent* event) { if(event->key() == Qt::Key_1) { std::cout << "Simulating system suspend..." << std::endl; openCLManager->handleSuspendResume(true); //Simulate suspend } else if(event->key() == Qt::Key_2) { std::cout << "Simulating system resume..." << std::endl; openCLManager->handleSuspendResume(false); //Simulate resume } }