1 /**************************************************************
3 Copyright (C) 1997 Oskar Swida
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 NOTE: This software is using the free software license of
23 the QT library v.1.30 from Troll Tech AS.
24 See the file LICENSE.QT.
27 To contact the author, write:
28 e-mail: swida@aragorn.pb.bialystok.pl
30 ************************************************************/
35 #include <QtGui/QMainWindow>
36 #include <QtGui/QListWidget>
37 #include <QtGui/QTextEdit>
38 #include <QtCore/QSocketNotifier>
42 #include "kernelwindow.h"
47 #define REMOTE_PATH "REMOTE"
49 #define MAXINSTANCES 256
62 /** Interpreter identifier */
64 /** Defines if interpreter is remote or not */
72 QSocketNotifier *notify;
73 /* IDs of my remote INT modules */
74 int RInstances[MAXINSTANCES];
75 /* Parent interpreter info */
86 ConnectEntry(char *s) {
95 class QKernel : public QMainWindow, private Ui::KernelWindow {
105 void WriteMessage(char* msg);
111 void IntMessage(int);
114 virtual void closeEvent (QCloseEvent * e);
117 QList<InterpEntry*> Interpreters;
118 QList<ConnectEntry*> ConnectList;
121 * number of working interpreters
122 * @attention Currently not in use
127 * number of connected VLPs
129 int ActiveConnections;
131 * Indicates state of the Kernel Program. Is it locked or not.
140 QSocketNotifier *Net_Notify;
144 void LoadConfig(char *);
145 void RunGraphModule(char*);
147 InterpEntry *findINTbySocket(int);
148 InterpEntry *findINTbyID(int);
149 InterpEntry *RunIntModule(char *ss, int r);
150 void RemoteInstance(InterpEntry*, int);
151 void CloseInstances(InterpEntry*);
154 * Sets QKernel menu entries to the given status
155 * @param locked status which will be set on the menu entries.
157 void setLocked(bool locked);
160 void on_actionExecute_triggered();
161 void on_actionKill_triggered();
162 void on_actionQuit_triggered();
164 void on_actionMessage_triggered();
165 void on_actionConnect_triggered();
166 void on_actionDisconnect_triggered();
167 void on_actionInfo_triggered();
169 void on_actionEditor_triggered();
170 void on_actionHelp_triggered();
171 void on_actionOptions_triggered();
172 void on_actionInfo_messages_triggered();
173 void on_actionLock_console_triggered();
174 void on_actionUnlock_console_triggered();
177 #endif /* VLP_KERNEL_H */