Save temporary changes experimental-qt4
authorRafał Długołęcki <rafal@dlugolecki.net.pl>
Tue, 19 Jan 2016 17:52:53 +0000 (18:52 +0100)
committerRafał Długołęcki <rafal@dlugolecki.net.pl>
Tue, 19 Jan 2016 17:52:53 +0000 (18:52 +0100)
12 files changed:
.gitignore
INSTALL
Makefile.am
configure.ac
src/edit/editor.cpp
src/edit/editor.h
src/graph/loggraph.cpp
src/help/help.cpp
src/kernel/kernel.cpp
src/lgconfig/lgconfig.cpp
src/net/lognet.cpp
src/preproc/prep.cpp

index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8c3cbf5b26c7dd6cfb2a92d8f1560a9ab2e2d647 100644 (file)
@@ -0,0 +1,6 @@
+.deps
+Doxyfile
+Makefile
+Makefile.in
+autom4te.cache
+*.o
diff --git a/INSTALL b/INSTALL
index 007e9396d0a2492cd2d6e17d42f359655dfe0b5e..2099840756e6302d837dcd51b5dcd6262f7adb16 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -12,8 +12,8 @@ without warranty of any kind.
 Basic Installation
 ==================
 
-   Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
+   Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package.  The following
 more-detailed instructions are generic; see the `README' file for
 instructions specific to this package.  Some packages provide this
 `INSTALL' file but do not implement all of the features documented
index 96d0cf998e950a776d6568a56c7ac32d7fed13a2..8d97cdb2be2fa36d2f1adec0790e926be25cfdc6 100644 (file)
@@ -5,12 +5,13 @@ MOC = ${MOCDIR}/${MOCNAME}
 
 #AM_CXXFLAGS= -Wall -pedantic -Wextra -fno-strength-reduce
 #AM_CXXFLAGS = -m32
-AM_CXXFLAGS = -I$(top_srcdir)/src/global
-AM_LDFLAGS= -fPIC
+AM_CXXFLAGS = -I$(top_srcdir)/src/global -I${QTDIR}/include/qt4
+AM_LDFLAGS= -fPIC -L$(QTDIR)/lib -lQtCore -lQtGui
 
 
+#   bin/loggraph 
+
 bin_PROGRAMS = \
-  bin/loggraph \
   bin/lognet \
   bin/logker \
   bin/logint \
@@ -19,8 +20,8 @@ bin_PROGRAMS = \
   bin/logcomp \
   bin/loghelp
 
+#   src/graph/loggraph.moc 
 BUILT_SOURCES = \
-  src/graph/loggraph.moc \
   src/net/lognet.moc.cpp \
   src/kernel/kernel.moc \
   src/edit/editor.moc.cpp \
@@ -41,7 +42,7 @@ clean-loggraph-extra:
 
 bin_lognet_SOURCES = src/net/lognet.cpp src/net/lognet.moc.cpp
 bin_lognet_CPPFLAGS = $(bin_lognet_CFLAGS)
-bin_lognet_LDADD = $(bin_lognet_LIBS)
+bin_lognet_LDADD = $(bin_lognet_LIBS) -lconfig++
 src/net/lognet.moc.cpp:
        $(MOC) -i src/net/lognet.cpp -o src/net/lognet.moc.cpp
 
index 65e94cf83f1fafff6910a6b625a41720e0e67895..0d76b6d72893937fe21ebc8c7cf40078b974230e 100644 (file)
@@ -7,20 +7,20 @@ AC_PROG_CXX
 AM_PROG_CC_C_O
 AC_CONFIG_FILES([Makefile])
 
-
 # libqt3-mt:i386
 #  libqt3-mt-dev:i386
 # qt3-dev-tools:i386
-PKG_CHECK_MODULES([bin_loggraph], [qt-mt < 4.0])
-PKG_CHECK_MODULES([bin_lognet], [qt-mt < 4.0 libconfig])
-PKG_CHECK_MODULES([bin_logker], [qt-mt < 4.0 libconfig])
-#PKG_CHECK_MODULES([bin_logint], [qt-mt < 4.0])
-PKG_CHECK_MODULES([bin_logedit], [qt-mt < 4.0])
-PKG_CHECK_MODULES([bin_lgconfig], [qt-mt < 4.0 libconfig])
-PKG_CHECK_MODULES([bin_logcomp], [qt-mt < 4.0])
-PKG_CHECK_MODULES([bin_loghelp], [qt-mt < 4.0])
-
-# Get Qt3 library and include locations
+
+#PKG_CHECK_MODULES([bin_loggraph], [qt-mt < 4.0])
+#PKG_CHECK_MODULES([bin_lognet], [qt-mt < 4.0 libconfig])
+#PKG_CHECK_MODULES([bin_logker], [qt-mt < 4.0 libconfig])
+##PKG_CHECK_MODULES([bin_logint], [qt-mt < 4.0])
+#PKG_CHECK_MODULES([bin_logedit], [qt-mt < 4.0])
+#PKG_CHECK_MODULES([bin_lgconfig], [qt-mt < 4.0 libconfig])
+#PKG_CHECK_MODULES([bin_logcomp], [qt-mt < 4.0])
+#PKG_CHECK_MODULES([bin_loghelp], [qt-mt < 4.0])
+
+## Get Qt3 library and include locations
 AC_ARG_WITH([moc-compiler-name],
   [AS_HELP_STRING([--with-moc-compiler-name=NAME],
     [filename of MOC compiler, defaults to: moc])],
@@ -35,6 +35,13 @@ AC_ARG_WITH([moc-compiler-dir],
   [MOCDIR='/usr/bin'])
 AC_SUBST([MOCDIR])
 
+AC_ARG_WITH([qt-dir],
+  [AS_HELP_STRING([--with-qt-dir=DIR],
+    [location of Qt library, defaults to: /usr])],
+  [QTDIR="$withval"],
+  [QTDIR='/usr'])
+AC_SUBST([QTDIR])
+
 AC_CHECK_PROGS([DOXYGEN], [doxygen])
 if test -z "$DOXYGEN";
    then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
index 381de48ad206d3a3b42708412ff7dde246e3896e..09505363c98c7a9a4c1ec7ba2cee677a6c93718a 100644 (file)
@@ -1,25 +1,25 @@
-#include <qapp.h>
-#include <qmenubar.h>
+#include <QtGui/qapplication.h>
+#include <QtGui/qmenubar.h>
 #include <qpopmenu.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qfile.h>
-#include <qfiledlg.h>
-#include <qfontmet.h>
+#include <QtGui/qlabel.h>
+#include <Qt3Support/q3listbox.h>
+#include <QtCore/qfile.h>
+#include <QtGui/qfiledialog.h>
+#include <QtGui/qfontmetrics.h>
 #include <qtooltip.h>
-#include <qfont.h>
-#include <qpixmap.h>
-#include <qmsgbox.h>
+#include <QtGui/qfont.h>
+#include <QtGui/qpixmap.h>
+#include <QtGui/qmessagebox.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <qscrbar.h>
-#include <qpainter.h>
-#include <qcolor.h>
+#include <QtGui/qscrollbar.h>
+#include <QtGui/qpainter.h>
+#include <QtGui/qcolor.h>
 #include <qpoint.h>
 #include <qtstream.h>
 #include <qchkbox.h>
-#include <qkeycode.h>
+#include <QtCore/qnamespace.h>
 
 #include "editor.h"
 
index 2a063ad55f1efa9955b5b58d129b085bfbbbd811..281ea81f673542ccb84676300c3747d42429fa87 100644 (file)
@@ -2,16 +2,16 @@
 #define QWERTY_H
 
 #include <qwidget.h>
-#include <qmenubar.h>
-#include <qmlined.h>
-#include <qlist.h>
+#include <QtGui/qmenubar.h>
+#include <Qt3Support/q3multilineedit.h>
+#include <QtCore/qlist.h>
 #include <qstrlist.h>
-#include <qframe.h>
-#include <qmlined.h>
-#include <qlined.h>
-#include <qpushbt.h>
-#include <qcombo.h>
-#include <qlabel.h>
+#include <QtGui/qframe.h>
+#include <Qt3Support/q3multilineedit.h>
+#include <Qt3Support/q3multilineedit.h>
+#include <QtGui/qpushbutton.h>
+#include <QtGui/qcombobox.h>
+#include <QtGui/qlabel.h>
 
 
 #define COMP_MODE      1
index 461669fe881fe64a388048a75a1662efb451d9c4..6053ebece6f720968791f82c4ccf82b2cdd05214 100644 (file)
@@ -7,20 +7,21 @@
 
 //#include <qwindow.h>
 */
-#include <qpainter.h>
-#include <qprinter.h>
-#include <qpushbt.h>
-#include <qradiobt.h>
-#include <qbttngrp.h>
-#include <qapp.h>
+#include <QtGui/qpainter.h>
+#include <QtGui/qprinter.h>
+#include <QtGui/qpushbutton.h>
+#include <QtGui/qradiobutton.h>
+#include <QtGui/qbuttongroup.h>
+#include <QtGui/qapplication.h>
+#include <QtGui/qframe.h>
 #include <math.h>
-#include <qpixmap.h>
-#include <qscrbar.h>
-#include <qcolor.h>
+#include <QtGui/qpixmap.h>
+#include <QtGui/qscrollbar.h>
+#include <QtGui/qcolor.h>
 #include <stdio.h>
-#include <qfont.h>
-#include <qfontmet.h>
-#include <qlist.h>
+#include <QtGui/qfont.h>
+#include <QtGui/qfontmetrics.h>
+#include <QtCore/qlist.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <netinet/in.h>
 #include "comm.h"
 #include "socu.h"
 #include <unistd.h>
-#include <qsocknot.h>
-#include <qobject.h>
+#include <QtCore/qsocketnotifier.h>
+#include <QtCore/qobject.h>
 #include <errno.h>
-#include <qqueue.h>
-#include <qmsgbox.h>
-#include <qmenubar.h>
-#include <qpopmenu.h>
-#include <qkeycode.h>
+#include <QtCore/qqueue.h>
+#include <QtGui/qmessagebox.h>
+#include <QtGui/qmenubar.h>
+//#include <qpopmenu.h>
+#include <QtCore/qnamespace.h>
 
 #define MAXWIDTH       640
 #define MAXHEIGHT      480
@@ -203,8 +204,8 @@ VGR::VGR(char *sockname)
        prv_font = normal_font;
 
        MakeColors();
-       setCaption("graphic resource");
-       setBackgroundColor(white);
+       setWindowTitle("graphic resource");
+       //setBackgroundColor(white);//@TODO Restore?
        canvas = new QPixmap(640, 480);
        canvas->fill(backgroundColor());
 
@@ -966,7 +967,7 @@ void VGR::Putmap(int map)
                                        m->map->width(), m->map->height());
                        break;
                }
-               m = maps.next();
+               m = maps.takeFirst();
        }
 }
 
@@ -1277,7 +1278,7 @@ void VGR::MagicGraph(G_MESSAGE *msg)
                                maps.remove(pmap);
                                break;
                        }
-                       pmap = maps.next();
+                       pmap = maps.takeFirst();
                }
                break;
        /* Line (x1,y1,x2,y2,col) */
index d2cf4f0de5ef139ad48c42c146848c884a83e940..f0b5e438108eadbc85b58c5d0f5fff606986afd4 100644 (file)
@@ -1,32 +1,32 @@
-#include <qapp.h>
-#include <qframe.h>
-#include <qmlined.h>
-#include <qmenubar.h>
+#include <QtGui/qapplication.h>
+#include <QtGui/qframe.h>
+#include <Qt3Support/q3multilineedit.h>
+#include <QtGui/qmenubar.h>
 #include <qpopmenu.h>
-#include <qdialog.h>
-#include <qbttngrp.h>
-#include <qlabel.h>
-#include <qlined.h>
-#include <qlistbox.h>
-#include <qpushbt.h>
-#include <qradiobt.h>
-#include <qlist.h>
-#include <qfile.h>
-#include <qcombo.h>
+#include <QtGui/qdialog.h>
+#include <QtGui/qbuttongroup.h>
+#include <QtGui/qlabel.h>
+#include <Qt3Support/q3multilineedit.h>
+#include <Qt3Support/q3listbox.h>
+#include <QtGui/qpushbutton.h>
+#include <QtGui/qradiobutton.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qfile.h>
+#include <QtGui/qcombobox.h>
 #include <qtooltip.h>
-#include <qfont.h>
-#include <qpixmap.h>
-#include <qmsgbox.h>
+#include <QtGui/qfont.h>
+#include <QtGui/qpixmap.h>
+#include <QtGui/qmessagebox.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <qfile.h>
+#include <QtCore/qfile.h>
 #include <qtstream.h>
-#include <qstring.h>
-#include <qfiledlg.h>
-#include <qfontmet.h>
-#include <qpainter.h>
-#include <qscrbar.h>
+#include <QtCore/qstring.h>
+#include <QtGui/qfiledialog.h>
+#include <QtGui/qfontmetrics.h>
+#include <QtGui/qpainter.h>
+#include <QtGui/qscrollbar.h>
 
 
 #define TAG_TEXT       0
index b5e1cd168c7f490955a39f0b21e5b83601f16483..d8320d36110a1b2baafd6d9de40e0ec652279895 100644 (file)
 ************************************************************/
 
 
-#include <qpixmap.h>
+#include <QtGui/qpixmap.h>
 //#include <qwindow.h>
-#include <qapp.h>
-#include <qframe.h>
-#include <qmlined.h>
-#include <qpainter.h>
-#include <qcolor.h>
-#include <qbrush.h>
-#include <qmenubar.h>
-#include <qpopmenu.h>
-#include <qfont.h>
-#include <qmsgbox.h>
-#include <qfiledlg.h>
-#include <qtabdlg.h>
-#include <qstring.h>
-#include <qrect.h>
-#include <qdialog.h>
-#include <qbttngrp.h>
-#include <qlabel.h>
-#include <qlined.h>
-#include <qlistbox.h>
-#include <qpushbt.h>
-#include <qradiobt.h>
-#include <qlist.h>
-#include <qfile.h>
-#include <qcursor.h>
-#include <qcombo.h>
-#include <qsocknot.h>
-#include <qdir.h>
-#include <qwindowsstyle.h>
+#include <QtGui/qapplication.h>
+#include <QtGui/qframe.h>
+#include <Qt3Support/q3multilineedit.h>
+#include <QtGui/qpainter.h>
+#include <QtGui/qcolor.h>
+#include <QtGui/qbrush.h>
+#include <QtGui/qmenubar.h>
+#include <Qt3Support/q3popupmenu.h>
+#include <QtGui/qfont.h>
+#include <QtGui/qmessagebox.h>
+#include <QtGui/qfiledialog.h>
+// #include <qtabdlg.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qrect.h>
+#include <QtGui/qdialog.h>
+#include <QtGui/qbuttongroup.h>
+#include <QtGui/qlabel.h>
+#include <Qt3Support/q3multilineedit.h>
+#include <Qt3Support/q3listbox.h>
+#include <QtGui/qpushbutton.h>
+#include <QtGui/qradiobutton.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qfile.h>
+#include <QtGui/qcursor.h>
+#include <QtGui/qcombobox.h>
+#include <QtCore/qsocketnotifier.h>
+#include <QtCore/qdir.h>
+#include <QtGui/qwindowsstyle.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -131,11 +131,11 @@ QApplication *app;
 class QKernel : public QFrame {
        Q_OBJECT
 public:
-       QMultiLineEdit *desktop;
+       Q3MultiLineEdit *desktop;
        QMenuBar *bar;
-       QPopupMenu *p;
-       QPopupMenu *p1;
-       QPopupMenu *p2;
+       Q3PopupMenu *p;
+       Q3PopupMenu *p1;
+       Q3PopupMenu *p2;
        char progdir[256];
        int NodeNumber;
        int ConType;
@@ -171,9 +171,9 @@ protected:
        virtual void closeEvent (QCloseEvent * e);
 
 private:
-       QList<InterpEntry> Interpreters;         
-       QList<ConnectEntry> ConnectList;
-       QListBox *connections;
+       QList<InterpEntry*> Interpreters;         
+       QList<ConnectEntry*> ConnectList;
+       Q3ListBox *connections;
        
        /**
         * number of working interpreters
@@ -188,16 +188,16 @@ private:
        bool synchro;
        bool wait_for_info;
        char LockPasswd[25];
-       int lockid;
-       int unlockid;
-       int qid;
-       int cwid;
-       int optid;
-       int prid;
-       int mid;
-       int msgid;
-       int toolsid;
-       int hid;
+//     int lockid;
+//     int unlockid;
+//     int qid;
+//     int cwid;
+//     int optid;
+//     int prid;
+//     int mid;
+//     int msgid;
+//     int toolsid;
+//     int hid;
        
        int net_sock;
        int freeINTid;
@@ -244,17 +244,29 @@ QKernel::QKernel()
        info_messages = TRUE;
        wait_for_info = FALSE;
 
-       setCaption("Virtual LOGLAN Processor");
-       setBackgroundColor(white);
+//     setCaption("Virtual LOGLAN Processor");// @TODO: Restore?
+//     setBackgroundColor(white);
 
+       QAction *execute = new QAction("Execute", this);
+       connect(execute, SIGNAL(triggered()), this, SLOT(Run_Prog()));
+       QAction *kill = new QAction("Kill", this);
+       connect(kill, SIGNAL(triggered()), this, SLOT(KillInterpreter()));
+       
+       QMenu *program;
+       program = menuBar()->addMenu("&Program");
+       program->addAction(execute);
+       program->addAction(kill);
+       
        bar = new QMenuBar(this);
-       bar->setFont(f); 
-       p = new QPopupMenu();
-       p->setFont(f2);
-       p->insertItem("Execute", this, SLOT(Run_Prog()));
-       p->insertItem("Kill", this, SLOT(KillInterpreter()));
-       prid = bar->insertItem("&Program", p);
-       p1 = new QPopupMenu();
+//     bar->setFont(f);
+
+
+//     p = new Q3PopupMenu();
+//     p->setFont(f2);
+//     p->insertItem("Execute", this, SLOT(Run_Prog()));
+//     p->insertItem("Kill", this, SLOT(KillInterpreter()));
+//     prid = bar->insertItem("&Program", p);
+       p1 = new Q3PopupMenu();
        p1->insertItem("Message", this, SLOT(MessageToNode()));
        p1->insertSeparator();
        p1->insertItem("Connect", this, SLOT(Connect()));
@@ -263,7 +275,7 @@ QKernel::QKernel()
        p1->setFont(f);
        mid = bar->insertItem("&Machine", p1);
 
-       p2 = new QPopupMenu();
+       p2 = new Q3PopupMenu();
        cwid = p2->insertItem("Editor", this, SLOT(Edit()));
        hid = p2->insertItem("Help", this, SLOT(Help()));
        p2->insertSeparator(); 
@@ -282,7 +294,7 @@ QKernel::QKernel()
        qid = bar->insertItem("&Quit", this, SLOT(QuitProc()));
        p->setFont(f);
 
-       desktop = new QMultiLineEdit(this, "desktop");
+       desktop = new Q3MultiLineEdit(this, "desktop");
        desktop->setAutoUpdate(TRUE);
        desktop->setReadOnly(TRUE);
        desktop->setFont(f1);
@@ -533,11 +545,11 @@ void QKernel::RunNetModule()
  */
 void QKernel::Connect()
 {
-       QDialog d(this, "", TRUE);
-       QLabel lab(&d, "IP Address:");
+       QDialog d(this);
+       QLabel lab("IP Address:", &d);
        QLineEdit ed(&d, "");
-       QPushButton ob(&d, "");
-       QPushButton cb(&d, "");
+       QPushButton ob(&d);
+       QPushButton cb(&d);
        MESSAGE m;
 
        d.setFont(QFont("Helvetica", 12, QFont::Bold)); 
@@ -609,11 +621,11 @@ void QKernel::QuitProc()
  */
 void QKernel::AddAddress()
 {
-       QDialog d(this, "", TRUE);
-       QLabel lab(&d, "IP Address:");
+       QDialog d(this);
+       QLabel lab("IP Address:", &d);
        QLineEdit ed(&d, "");
-       QPushButton ob(&d, "");
-       QPushButton cb(&d, "");
+       QPushButton ob(&d);
+       QPushButton cb(&d);
 
        if (connections) {
                ob.setGeometry(30, 60, 80, 30);
@@ -656,34 +668,34 @@ void QKernel::MessageToNode()
        QLineEdit *nodenr;
        MESSAGE m;
 
-       dlg = new QDialog(this, "Message", TRUE);
+       dlg = new QDialog(this);
 
-       nodenr = new QLineEdit(dlg, "number");
+       nodenr = new QLineEdit(dlg);
        nodenr->setGeometry(90, 10, 50, 30);
        nodenr->setText("");
 
        QLabel *tmpQLabel;
-       tmpQLabel = new QLabel(dlg, "Label_1");
+       tmpQLabel = new QLabel(dlg);
        tmpQLabel->setGeometry(10, 10, 77, 30);
        tmpQLabel->setText("Node number:");
 
-       tmpQLabel = new QLabel(dlg, "Label_2");
+       tmpQLabel = new QLabel(dlg);
        tmpQLabel->setGeometry(10, 50, 70, 30);
        tmpQLabel->setText("Message:");
 
        QLineEdit *msg;
-       msg = new QLineEdit(dlg, "LineEdit_1");
+       msg = new QLineEdit(dlg);
        msg->setGeometry(80, 60, 330, 30);
        msg->setText("");
 
        QPushButton *ob;
-       ob = new QPushButton(dlg, "PushButton_1");
+       ob = new QPushButton(dlg);
        ob->setGeometry(230, 10, 80, 30);
        ob->setText("Send");
        ob->setDefault(TRUE);
        
        QPushButton *cb;
-       cb = new QPushButton(dlg, "PushButton_2");
+       cb = new QPushButton(dlg);
        cb->setGeometry(330, 10, 80, 30);
        cb->setText("Cancel");
        dlg->resize(430, 110);
@@ -715,22 +727,22 @@ void QKernel::KillInterpreter()
        MESSAGE m;
        InterpEntry *pom;
 
-       dlg = new QDialog(this, "Message", TRUE);
+       dlg = new QDialog(this);
 
-       nodenr = new QLineEdit(dlg, "number"); 
+       nodenr = new QLineEdit(dlg); 
        nodenr->setGeometry(90, 10, 50, 30);
        nodenr->setText("");
 
        QLabel* tmpQLabel;
-       tmpQLabel = new QLabel(dlg, "Label_1");
+       tmpQLabel = new QLabel(dlg);
        tmpQLabel->setGeometry(10, 10, 77, 30);
        tmpQLabel->setText("Interp. ID:");
        QPushButton* ob, *cb;
-       ob = new QPushButton(dlg, "PushButton_1");
+       ob = new QPushButton(dlg);
        ob->setGeometry( 160, 10, 80, 30);
        ob->setText("Kill");
        ob->setDefault(TRUE);
-       cb = new QPushButton(dlg, "PushButton_2");
+       cb = new QPushButton(dlg);
        cb->setGeometry(260, 10, 80, 30);
        cb->setText("Cancel");
        dlg->resize(360, 50);
@@ -986,7 +998,7 @@ void QKernel::SetMessages()
  */
 void QKernel::SetOptions()
 {
-       QDialog dlg(this, "Options", TRUE);
+       QDialog dlg(this);
        ConnectEntry *e;
        unsigned int i;
 
@@ -996,16 +1008,16 @@ void QKernel::SetOptions()
        progs->setText(progdir);
 
        QLabel* tmpQLabel;
-       tmpQLabel = new QLabel(&dlg, "Label_1");
+       tmpQLabel = new QLabel(&dlg);
        tmpQLabel->setGeometry(30, 20, 120, 30);
        tmpQLabel->setText("Programs directory");
 
        QFrame* tmpQFrame;
-       tmpQFrame = new QFrame(&dlg, "Frame_2");
+       tmpQFrame = new QFrame(&dlg);
        tmpQFrame->setGeometry(10, 60, 380, 30);
        tmpQFrame->setFrameStyle(52);
 
-       tmpQLabel = new QLabel(&dlg, "Label_2");
+       tmpQLabel = new QLabel(&dlg);
        tmpQLabel->setGeometry(10, 80, 340, 30);
        tmpQLabel->setText("Virtual Processor properties (activated after "
                                                        "restarting VLP):");
@@ -1017,30 +1029,30 @@ void QKernel::SetOptions()
        sprintf(nns, "%d", NodeNumber);
        nn->setText(nns);
 
-       tmpQLabel = new QLabel(&dlg, "Label_3");
+       tmpQLabel = new QLabel(&dlg);
        tmpQLabel->setGeometry(20, 110, 90, 30);
        tmpQLabel->setText("Node number:");
 
        QRadioButton *exp, *reg;
-       exp = new QRadioButton(&dlg, "RadioButton_3");
+       exp = new QRadioButton(&dlg);
        exp->setGeometry(30, 170, 100, 30);
        exp->setText("Explicit");
        exp->setChecked(TRUE);
 
-       reg = new QRadioButton(&dlg, "RadioButton_4");
+       reg = new QRadioButton(&dlg);
        reg->setGeometry(30, 200, 100, 30);
        reg->setText("Registration");
        reg->setEnabled(FALSE);
 
-       connections = new QListBox(&dlg, "ListBox_1");
+       connections = new Q3ListBox(&dlg);
        connections->setGeometry(170, 140, 130, 100);
        e = ConnectList.first();
        while(e != NULL) {
                connections->insertItem(e->addr);
-               e = ConnectList.next();
+               e = ConnectList.takeFirst();
        }
 
-       tmpQLabel = new QLabel(&dlg, "Label_5");
+       tmpQLabel = new QLabel(&dlg);
        tmpQLabel->setGeometry(170, 110, 100, 30);
        tmpQLabel->setText("Connection list:");
 
@@ -1048,25 +1060,25 @@ void QKernel::SetOptions()
        QPushButton *delbtn;
        QPushButton *okbtn;
        QPushButton *cancelbtn;
-       addbtn = new QPushButton(&dlg, "PushButton_1");
+       addbtn = new QPushButton(&dlg);
        addbtn->setGeometry(310, 150, 60, 30);
        addbtn->setText("Add");
-       delbtn = new QPushButton(&dlg, "PushButton_2");
+       delbtn = new QPushButton(&dlg);
        delbtn->setGeometry(310, 200, 60, 30);
        delbtn->setText("Del");
        connect(addbtn, SIGNAL(clicked()), this, SLOT(AddAddress()));
        connect(delbtn, SIGNAL(clicked()), this, SLOT(DelAddress()));
-       okbtn = new QPushButton(&dlg, "PushButton_3");
+       okbtn = new QPushButton(&dlg);
        okbtn->setGeometry(80, 260, 100, 30);
        okbtn->setText("Ok");
        okbtn->setDefault(TRUE);
-       cancelbtn = new QPushButton(&dlg, "PushButton_4");
+       cancelbtn = new QPushButton(&dlg);
        cancelbtn->setGeometry(210, 260, 100, 30);
        cancelbtn->setText("Cancel");
        connect(okbtn, SIGNAL(clicked()), &dlg, SLOT(accept()));
        connect(cancelbtn, SIGNAL(clicked()), &dlg, SLOT(reject()));        
        QButtonGroup* group;
-       group = new QButtonGroup(&dlg, "ButtonGroup_1");
+       group = new QButtonGroup(&dlg);
        group->setGeometry(20, 150, 120, 90);
        group->setTitle("Connection type");
        group->setAlignment(1);
@@ -1129,11 +1141,11 @@ void QKernel::SetOptions()
  */
 void QKernel::LockConsole()
 {
-       QDialog d(this, "Enter password", TRUE);
-       QLabel lab(&d, "Password");
+       QDialog d(this);
+       QLabel lab("Password", &d);
        QLineEdit ed(&d, "");
-       QPushButton ob(&d, "");
-       QPushButton cb(&d, "");
+       QPushButton ob(&d);
+       QPushButton cb(&d);
 
        d.setCaption("Lock console"); 
        ob.setGeometry(30, 60, 80, 30);
@@ -1156,13 +1168,13 @@ void QKernel::LockConsole()
                        ed.setText("");
                        if (d.exec()) {
                                if (strcmp(ed.text(), LockPasswd)==0) {
-                                       bar->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->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;
@@ -1186,11 +1198,11 @@ void QKernel::LockConsole()
  */
 void QKernel::UnlockConsole()
 {
-       QDialog d(this, "Enter password", TRUE);
-       QLabel lab(&d, "Password");
+       QDialog d(this);
+       QLabel lab("Password", &d);
        QLineEdit ed(&d, "");
-       QPushButton ob(&d, "");
-       QPushButton cb(&d, "");
+       QPushButton ob(&d);
+       QPushButton cb(&d);
 
        ob.setGeometry(30, 60, 80, 30);
        ob.setText("Ok");
@@ -1207,13 +1219,13 @@ void QKernel::UnlockConsole()
 
        if (d.exec()) {
                if (strcmp(ed.text(), LockPasswd) == 0) {
-                       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->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;         
@@ -1248,7 +1260,7 @@ InterpEntry *QKernel::findINTbySocket(int _id)
                if (pom->sock == _id)
                        break;
 
-               pom = Interpreters.next();
+               pom = Interpreters.takeFirst();
        }
        return pom;
 }
@@ -1265,7 +1277,7 @@ InterpEntry *QKernel::findINTbyID(int _id)
        while (pom != NULL) {
                if (pom->ID == _id)
                        break;
-               pom = Interpreters.next();
+               pom = Interpreters.takeFirst();
        }
        return pom;
 }
index b130153b47e11ceef37ac4d923de6f27a6c4c48b..64e2ada0c46eb33009ebfb310a85fc9a5e2e4f8e 100644 (file)
@@ -1,22 +1,22 @@
-#include <qapp.h>
-#include <qframe.h>
-#include <qmlined.h>
-#include <qmenubar.h>
+#include <QtGui/qapplication.h>
+#include <QtGui/qframe.h>
+#include <Qt3Support/q3multilineedit.h>
+#include <QtGui/qmenubar.h>
 #include <qpopmenu.h>
-#include <qdialog.h>
-#include <qbttngrp.h>
-#include <qlabel.h>
-#include <qlined.h>
-#include <qlistbox.h>
-#include <qpushbt.h>
-#include <qradiobt.h>
-#include <qlist.h>
-#include <qfile.h>
-#include <qcombo.h>
+#include <QtGui/qdialog.h>
+#include <QtGui/qbuttongroup.h>
+#include <QtGui/qlabel.h>
+#include <Qt3Support/q3multilineedit.h>
+#include <Qt3Support/q3listbox.h>
+#include <QtGui/qpushbutton.h>
+#include <QtGui/qradiobutton.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qfile.h>
+#include <QtGui/qcombobox.h>
 #include <qtooltip.h>
-#include <qfont.h>
-#include <qpixmap.h>
-#include <qmsgbox.h>
+#include <QtGui/qfont.h>
+#include <QtGui/qpixmap.h>
+#include <QtGui/qmessagebox.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index 7a93bc0661b919dd188ef21523117900918aaadd..4c00e276ad149d01af2146a63ce18e7cbffb00b0 100644 (file)
 #include <signal.h>
 #include <sys/stat.h>
 #include <string.h>
-#include <qlist.h>
-#include <qfile.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qstringlist.h>
 #include <unistd.h>
 
 #include <libconfig.h>
@@ -91,9 +91,9 @@ public:
        char kername[256];
 
        /* List of the Interpeter slots */
-       QList<INTlink> Interpreters;
+       QList<INTlink*> Interpreters;
        /* List of the Network slots */ 
-       QList<NETlink> Links;
+       QList<NETlink*> Links;
 
        NETMOD(char*);
 
@@ -385,7 +385,7 @@ void NETMOD::check_node(int n, int sc)
                        strcpy(m.param.pstr, pomlink->addr);
                        break;
                }
-               pomlink = Links.next();
+               pomlink = Links.takeFirst();
        }
        write(sc, &m, sizeof(MESSAGE));
 }
@@ -418,7 +418,7 @@ void NETMOD::get_internal()
                if (nrset < pomlink->sock) {
                        nrset = pomlink->sock;
                }
-               pomlink = Interpreters.next();
+               pomlink = Interpreters.takeFirst();
        }
 
        if (select(nrset + 1, &readset, &writeset, 0, (struct timeval *)&tout) >
@@ -450,7 +450,7 @@ void NETMOD::get_internal()
                                        }
                                }
                        } /* ISSET */
-                       pomlink=Interpreters.next();
+                       pomlink=Interpreters.takeFirst();
                } // while
 
                /* Check internal socket */
@@ -508,7 +508,7 @@ void NETMOD::get_internal()
                                                pomlink = findINTlink(msg.param.pword[1]);
                                                if (pomlink != NULL) {
                                                        close(pomlink->sock);
-                                                       Interpreters.remove(pomlink);
+                                                       Interpreters.removeOne(pomlink);
                                                }
                                                };
                                                break;
@@ -614,7 +614,7 @@ void NETMOD::get_message(NETlink *lnk)
                                                msg.param.pword[1]);
                                        write_at_console(pomstr);
                                        ::close(lnk->sock);
-                                       Links.remove(lnk);
+                                       Links.removeOne(lnk);
                                        delete lnk;
                                        break;
                                case NET_PROPAGATE:
@@ -652,7 +652,7 @@ void NETMOD::remote_messages()
                                max = pomlink->sock;
                        }
                }
-               pomlink=Links.next();
+               pomlink=Links.takeFirst();
        }
 
        if (select(max + 1, &rset, &wset, 0, (struct timeval *)&tout) > 0) {
@@ -661,7 +661,7 @@ void NETMOD::remote_messages()
                        if (FD_ISSET(pomlink->sock,&rset)) {
                                get_message(pomlink);
                        }
-                       pomlink=Links.next();
+                       pomlink=Links.takeFirst();
                }
        }
 }
@@ -690,7 +690,7 @@ void NETMOD::doitall() {
                if (max < pomlink2->sock) {
                        max=pomlink2->sock;
                }
-               pomlink2 = Interpreters.next();
+               pomlink2 = Interpreters.takeFirst();
        }
        pomlink = Links.first();
        while (pomlink != NULL) {
@@ -700,7 +700,7 @@ void NETMOD::doitall() {
                                max = pomlink->sock;
                        }
                }
-               pomlink=Links.next();
+               pomlink=Links.takeFirst();
        }
 
        /* odczyt */
@@ -751,7 +751,7 @@ void NETMOD::doitall() {
                                        }
                                }
                        }/* ISSET */
-                       pomlink2 = Interpreters.next();
+                       pomlink2 = Interpreters.takeFirst();
                }/* while */
 
                /* Check internal socket */
@@ -806,7 +806,7 @@ void NETMOD::doitall() {
                                                pomlink2 = findINTlink(msg.param.pword[1]);
                                                if (pomlink2 != NULL) {
                                                        close(pomlink2->sock);
-                                                       Interpreters.remove(pomlink2);
+                                                       Interpreters.removeOne(pomlink2);
                                                }
                                                };
                                                break;
@@ -821,7 +821,7 @@ void NETMOD::doitall() {
                while (pomlink != NULL) {
                        if (FD_ISSET(pomlink->sock, &rset))
                                get_message(pomlink);
-                       pomlink=Links.next();
+                       pomlink=Links.takeFirst();
                }
        } // select 
 }
@@ -858,7 +858,7 @@ void NETMOD::connect_seq(char *a)
        while (pom != NULL) {
                if (strcmp(pom->addr, a) == 0)
                        return;
-               pom = Links.next();
+               pom = Links.takeFirst();
        }
        pom = new NETlink;
        strcpy(pom->addr, a);
@@ -912,7 +912,7 @@ void NETMOD::check_links()
                                        sock_reopen(pomlink);
                                }
                        } /* not connected */
-                       pomlink = Links.next();
+                       pomlink = Links.takeFirst();
                } /* while */
        } /* if */
        all_connected = TRUE;
@@ -922,7 +922,7 @@ void NETMOD::check_links()
                        all_connected = FALSE;
                        break;
                }
-               pomlink = Links.next();
+               pomlink = Links.takeFirst();
        }
 }
 
@@ -979,7 +979,7 @@ void NETMOD::send_to_all(MESSAGE *msg)
        pomlink = Links.first();
        while (pomlink != NULL) {
                write(pomlink->sock, msg, sizeof(MESSAGE));
-               pomlink = Links.next();
+               pomlink = Links.takeFirst();
        }
 }
 
@@ -1006,7 +1006,7 @@ void NETMOD::exit_sequence()
        pomlink = Links.first();
        while (pomlink != NULL) {
                ::close(pomlink->sock);
-               pomlink = Links.next();
+               pomlink = Links.takeFirst();
        }
        exit(0);
 }
@@ -1024,12 +1024,12 @@ void NETMOD::disconnect_seq()
        p = Links.first();
        while(p != NULL) {
                send_to_node(p, &m);
-               p=Links.next();
+               p=Links.takeFirst();
        }
        p = Links.first();
        while(p != NULL) {
                ::close(p->sock);
-               p = Links.next();
+               p = Links.takeFirst();
        }
        Links.clear();
 }
@@ -1042,7 +1042,7 @@ NETlink * NETMOD::findNETlink(int node)
                if (pomlink->node_number == node)
                        return pomlink;
 
-               pomlink = Links.next();
+               pomlink = Links.takeFirst();
        } 
        return pomlink;
 }
@@ -1054,7 +1054,7 @@ INTlink * NETMOD::findINTlink(int id)
        while(pomlink != NULL) {
                if (pomlink->ID == id)
                        return pomlink;
-               pomlink = Interpreters.next();
+               pomlink = Interpreters.takeFirst();
        }
        return pomlink;
 }
@@ -1215,7 +1215,7 @@ void NETMOD::conn_info(int sk)
                        write(sk, &m, sizeof(MESSAGE));
                        k = 0;
                }
-               pom = Links.next();
+               pom = Links.takeFirst();
        }
        if (k > 0) {
                m.param.pword[1] = k;
index 285b2c899d69502b0dea048527afa23de6a7a9d3..8332a1aabe3c9705cec87180a1d7d856af1eb2c9 100644 (file)
@@ -1,10 +1,10 @@
-#include <qlist.h>
-#include <qstring.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qstring.h>
 #include <stdio.h>
-#include <qfile.h>
+#include <QtCore/qfile.h>
 #include <qtstream.h>
 #include <string.h>
-#include <qdir.h>
+#include <QtCore/qdir.h>
 #include <unistd.h>
 #include <stdlib.h>