VLP-28 Removed helper comments from old code.
authorRafał Długołęcki <kontakt@dlugolecki.net.pl>
Sat, 26 Oct 2013 23:30:34 +0000 (01:30 +0200)
committerRafał Długołęcki <kontakt@dlugolecki.net.pl>
Sat, 26 Oct 2013 23:30:34 +0000 (01:30 +0200)
src/kernel/kernel.cpp

index d05e12e949f200dc0e1bbea0a4adf921d825c065..8ab19f17dcbda4cd62500b724e63a2e62e15195a 100644 (file)
 ************************************************************/
 
 
-#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>
@@ -194,6 +170,7 @@ private:
        
        /**
         * number of working interpreters
+        * @attention Currently not in use
         */
        int Tasks;
        
@@ -247,9 +224,6 @@ void QKernel::closeEvent(QCloseEvent * e)
  */
 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];
 
@@ -262,32 +236,20 @@ QKernel::QKernel()
        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()));
@@ -296,27 +258,20 @@ QKernel::QKernel()
        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);
@@ -574,7 +529,6 @@ void QKernel::Connect()
        QPushButton cb("", &d);
        MESSAGE m;
 
-//     d.setFont(QFont("Helvetica", 12, QFont::Bold)); 
        ob.setGeometry(30, 60, 80, 30);
        ob.setText("Ok");
        ob.setDefault(TRUE);
@@ -720,7 +674,7 @@ void QKernel::MessageToNode()
        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;
@@ -806,7 +760,7 @@ void QKernel::NetMessage()
                        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:
@@ -855,7 +809,7 @@ void QKernel::NetMessage()
                                                WriteMessage("Instance not found"); 
                                        }
                                        break; 
-                               } /* VLP switch */        
+                               } /* VLP switch */
                        }/* switch */
                        break;
                case NET_CONNECTIONS:
@@ -984,7 +938,7 @@ void QKernel::WriteMessage(char *msg)
        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);
@@ -1195,14 +1149,6 @@ void QKernel::LockConsole()
                                        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 {
@@ -1255,14 +1201,6 @@ void QKernel::UnlockConsole()
                        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 {
@@ -1562,9 +1500,7 @@ int main(int argc, char **argv)
        }
 
        app = new QApplication(argc, argv);
-//     app->setStyle(new QWindowsStyle());
        QKernel kernel;
-//     app->setCentralWidget(&kernel);
        kernel.show();
        kernel.InitMessage();