Skip to content
Extraits de code Groupes Projets
Valider a9197b19 rédigé par Jordan Aurey's avatar Jordan Aurey
Parcourir les fichiers

Ajout signaux + statusBar en cours

parent f23ca6f9
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -9,11 +9,7 @@ MainWindow::MainWindow(QWidget *parent) :
{
ui->setupUi(this);
// on affiche d'abord la TreeView
//ui->treeWidget->show();
//ui->listWidget->hide();
ui->comboBox->hide();
//Task t(1);
//ElementsTableModel * model = new ElementsTableModel();
......@@ -92,6 +88,35 @@ void MainWindow::on_tableView_clicked(const QModelIndex &index)
ui->tableView->selectRow(index.row());
rowSelectedIndex = index.row();
PIDselected = ui->tableView->model()->index(index.row(), 0).data().toInt();
ui->statusBar->showMessage("PID currently selected : " + PIDselected);
}
void MainWindow::on_commandLinkButton_6_clicked()
{
ui->comboBox->show();
}
void MainWindow::on_comboBox_currentTextChanged(const QString &arg1)
{
if (arg1 == "Interrupt"){
kill(PIDselected, SIGINT);
}
if (arg1 == "Continue"){
kill(PIDselected, SIGCONT);
}
if (arg1 == "Quit"){
kill(PIDselected, SIGQUIT);
}
if (arg1 == "Kill"){
kill(PIDselected, SIGKILL);
}
ui->comboBox->hide();
}
......@@ -34,6 +34,10 @@ private slots:
void on_tableView_clicked(const QModelIndex &index);
void on_commandLinkButton_6_clicked();
void on_comboBox_currentTextChanged(const QString &arg1);
private:
Ui::MainWindow *ui;
int PIDselected;
......
......@@ -224,6 +224,30 @@
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox">
<item>
<property name="text">
<string>Interrupt</string>
</property>
</item>
<item>
<property name="text">
<string>Continue</string>
</property>
</item>
<item>
<property name="text">
<string>Quit</string>
</property>
</item>
<item>
<property name="text">
<string>Kill</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter