************************************************************/
-#include <qpixmap.h>
-//#include <qwindow.h>
#include <QtGui/QApplication>
#include <QtGui/QMainWindow>
-//#include <qframe.h>
-//#include <qmlined.h>
-//#include <qpainter.h>
#include <QtGui/QTextEdit>
-#include <qcolor.h>
-#include <qbrush.h>
#include <QtGui/QMenuBar>
-//#include <qmenubar.h>
-//#include <qpopmenu.h>
-#include <qfont.h>
#include <QtGui/QMessageBox>
-//#include <qmsgbox.h>
-//#include <qfiledlg.h>
#include <QtGui/QFileDialog>
#include <QtGui/QDialog>
-//#include <qtabdlg.h>
#include <qstring.h>
-#include <qrect.h>
-//#include <qdialog.h>
-//#include <qbttngrp.h>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QPushButton>
#include <QtGui/QRadioButton>
#include <QtGui/QGroupBox>
#include <QtGui/QVBoxLayout>
-//#include <qlined.h>
-//#include <qlistbox.h>
-//#include <qpushbt.h>
-//#include <qradiobt.h>
-//#include <qlist.h>
#include <QtCore/QList>
#include <QtGui/QListWidget>
#include <qfile.h>
#include <qcursor.h>
-//#include <qcombo.h>
-//#include <qsocknot.h>
#include <QtCore/QSocketNotifier>
#include <qdir.h>
-#include <qwindowsstyle.h>
#include <stdio.h>
#include <stdlib.h>
/**
* number of working interpreters
+ * @attention Currently not in use
*/
int Tasks;
*/
QKernel::QKernel()
{
-// QFont f("Helvetica", 10, QFont::Bold);
-// QFont f1("Helvetica", 10, QFont::Normal);
-// QFont f2("Times Roman", 10, QFont::Normal);
QDir q(REMOTE_PATH);
char ss[255];
wait_for_info = FALSE;
setWindowTitle(PACKAGE_NAME);
-// setBackgroundColor(white);
-// bar = new QMenuBar(this);
-// bar->setFont(f);
-// p = new QPopupMenu();
QMenu * programMenu = NULL;
-// p->setFont(f2);
programMenu = menuBar()->addMenu("&Program");
-// prid = bar->insertItem("&Program", p);
programMenu->addAction("Execute", this, SLOT(Run_Prog()));
programMenu->addAction("Kill", this, SLOT(KillInterpreter()));
-// mid = bar->insertItem("&Machine", p1);
machineMenu = menuBar()->addMenu("&Machine");
-// p1 = new QPopupMenu();
machineMenu->addAction("Message", this, SLOT(MessageToNode()));
machineMenu->addSeparator();
machineMenu->addAction("Connect", this, SLOT(Connect()));
machineMenu->addAction("Disconnect", this, SLOT(Disconnect()));
machineMenu->addAction("Info", this, SLOT(Info()));
-// machineMenu->setFont(f);
-// toolsid = bar->insertItem("&Tools", p2);
-
-// p2 = new QPopupMenu();
toolsMenu = menuBar()->addMenu("&Tools");
cwid = toolsMenu->addAction("Editor", this, SLOT(Edit()));
hid = toolsMenu->addAction("Help", this, SLOT(Help()));
msgid = toolsMenu->addAction("Info messages", this, SLOT(SetMessages()));
msgid->setCheckable(TRUE);
msgid->setChecked(TRUE);
-// toolsMenu->setItemChecked(msgid, TRUE);
toolsMenu->addSeparator();
lockid = toolsMenu->addAction("Lock console", this, SLOT(LockConsole()));
unlockid = toolsMenu->addAction("Unlock console", this,
SLOT(UnlockConsole()));
-// toolsMenu->setItemEnabled(unlockid, FALSE);
unlockid->setDisabled(TRUE);
LOCKED = FALSE;
-// p2->setFont(f);
qid = menuBar()->addAction("&Quit", this, SLOT(QuitProc()));
-// p->setFont(f);
desktop = new QTextEdit(this);
-// desktop->setAutoUpdate(TRUE);
desktop->setReadOnly(TRUE);
-// desktop->setFont(f1);
QVBoxLayout * layout = new QVBoxLayout();
layout->setContentsMargins (3, 0, 3, 0);
layout->addWidget(desktop);
-// layout->addWidget(msg);
QWidget *window = new QWidget();
window->setLayout(layout);
setCentralWidget(window);
QPushButton cb("", &d);
MESSAGE m;
-// d.setFont(QFont("Helvetica", 12, QFont::Bold));
ob.setGeometry(30, 60, 80, 30);
ob.setText("Ok");
ob.setDefault(TRUE);
cb->setGeometry(330, 10, 80, 30);
dlg->resize(430, 110);
connect(ob, SIGNAL(clicked()), dlg, SLOT(accept()));
- connect(cb, SIGNAL(clicked()), dlg, SLOT(reject()));
+ connect(cb, SIGNAL(clicked()), dlg, SLOT(reject()));
if (dlg->exec()) {
m.msg_type = MSG_NET;
case MSG_INT:
/* pom = find_link_by_ID(msg.param.pword[5]);
msg.msg_type = MSG_NET;
- msg.param.pword[0] = NET_PROPAGATE;
+ msg.param.pword[0] = NET_PROPAGATE;
send_int(pom, &msg);*/
break;
case MSG_VLP:
WriteMessage("Instance not found");
}
break;
- } /* VLP switch */
+ } /* VLP switch */
}/* switch */
break;
case NET_CONNECTIONS:
desktop->setReadOnly(FALSE);
desktop->append(msg);
desktop->setReadOnly(TRUE);
-// desktop->setCursorPosition(desktop->blockCount(), 1);
+
QTextCursor tmpCursor = desktop->textCursor();
tmpCursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor);
desktop->setTextCursor(tmpCursor);
lockid->setEnabled(FALSE);
cwid->setEnabled(FALSE);
optid->setEnabled(FALSE);
-// menuBar()->setItemEnabled(qid, FALSE);
-// bar->setItemEnabled(prid, FALSE);
-// bar->setItemEnabled(mid, FALSE);
-// p2->setItemEnabled(unlockid, TRUE);
-// p2->setItemEnabled(lockid, FALSE);
-// p2->setItemEnabled(cwid, FALSE);
-// p2->setItemEnabled(optid, FALSE);
- bar->repaint();
WriteMessage("CONSOLE LOCKED");
LOCKED = TRUE;
} else {
lockid->setEnabled(TRUE);
cwid->setEnabled(TRUE);
optid->setEnabled(TRUE);
-// bar->setItemEnabled(qid, TRUE);
-// bar->setItemEnabled(prid, TRUE);
-// bar->setItemEnabled(mid, TRUE);
-// p2->setItemEnabled(unlockid, FALSE);
-// p2->setItemEnabled(lockid, TRUE);
-// p2->setItemEnabled(cwid, TRUE);
-// p2->setItemEnabled(optid, TRUE);
-// bar->repaint();
WriteMessage("CONSOLE UNLOCKED");
LOCKED = FALSE;
} else {
}
app = new QApplication(argc, argv);
-// app->setStyle(new QWindowsStyle());
QKernel kernel;
-// app->setCentralWidget(&kernel);
kernel.show();
kernel.InitMessage();