-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.cpp
More file actions
90 lines (74 loc) · 1.46 KB
/
Copy pathmainwindow.cpp
File metadata and controls
90 lines (74 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <stdlib.h>
#include <iostream>
bool kernel = false;
bool cpu_tracing = false;
bool instructions = false;
bool cache = false;
bool page = false;
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
//Main Window:
MainWindow::~MainWindow()
{
delete ui;
}
//Push Bottoom
void MainWindow::on_pushButton_clicked()
{
int status = system("./DisplayImage ./obama.jpg");
std::cout << status;
}
void MainWindow::on_pushButton_2_clicked()
{
int status = system("./DisplayImage ./obama.jpg");
std::cout << status;
}
//Setting the tracing:
void MainWindow::on_pushButton_5_clicked()
{
int status;
if(kernel){
status = system("./TracingK.sh");
std::cout << status;
}
else{
status = system("./TracingU.sh");
std::cout << status;
}
QString string = QString::number(status);
ui->label_3->setText(string);
}
void MainWindow::on_radioButton_clicked()
{
kernel = true;
}
void MainWindow::on_radioButton_released()
{
kernel = false;
}
void MainWindow::on_radioButton_2_clicked()
{
on_radioButton_released();
}
void MainWindow::on_checkBox_cpu_clicked()
{
cpu_tracing = true;
}
void MainWindow::on_checkBox_inst_clicked()
{
instructions = true;
}
void MainWindow::on_checkBox_cm_clicked()
{
cache = true;
}
void MainWindow::on_checkBox_pf_clicked()
{
page = true;
}