#include "kernel.h"
#include "send-message.h"
+#include "kill-interpreter.h"
/* File resides in top directory (where are Makefiles)*/
#include "../../config.h"
{
MESSAGE m;
SendMessageDialog *dlg;
- dlg = new SendMessageDialog(this);
+ dlg = new SendMessageDialog(this, Qt::Dialog);
if (dlg->exec()) {
m.msg_type = MSG_NET;
*/
void QKernel::on_actionKill_triggered()
{
- QDialog *dlg;
- QLineEdit *nodenr;
MESSAGE m;
InterpEntry *pom;
+ KillInterpreterDialog *dlg;
- dlg = new QDialog(this, Qt::Dialog);
- dlg->setWindowTitle("Kill interpreter");
-
- nodenr = new QLineEdit("", dlg);
- nodenr->setGeometry(90, 10, 50, 30);
-
- QLabel * tmpQLabel = new QLabel("Interp. ID:", dlg);
- tmpQLabel->setGeometry(10, 10, 77, 30);
-
- QPushButton * ob = new QPushButton("Kill", dlg);
- ob->setGeometry( 160, 10, 80, 30);
- ob->setDefault(TRUE);
-
- QPushButton * cb = new QPushButton("Cancel", dlg);
- cb->setGeometry(260, 10, 80, 30);
- dlg->resize(360, 50);
-
- connect(ob, SIGNAL(clicked()), dlg, SLOT(accept()));
- connect(cb, SIGNAL(clicked()), dlg, SLOT(reject()));
+ dlg = new KillInterpreterDialog(this, Qt::Dialog);
if (dlg->exec()) {
m.msg_type = MSG_INT;
m.param.pword[0] = INT_KILL;
- pom = findINTbyID(atoi(nodenr->text().toAscii().data()));
+ pom = findINTbyID(dlg->getNodeNumber());
if (pom != NULL) {
if (!(pom->remote))
write(pom->sock, &m, sizeof(MESSAGE));