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>
41 #include "ui/main-window.h"
46 #define REMOTE_PATH "REMOTE"
48 #define MAXINSTANCES 256
61 /** Interpreter identifier */
63 /** Defines if interpreter is remote or not */
71 QSocketNotifier *notify;
72 /* IDs of my remote INT modules */
73 int RInstances[MAXINSTANCES];
74 /* Parent interpreter info */
85 ConnectEntry(char *s) {
94 class QKernel : public QMainWindow, private Ui::MainWindow {
101 QKernel(QWidget *parent = 0);
103 void WriteMessage(char* msg);
108 void on_actionExecute_triggered();
109 void on_actionEditor_triggered();
110 void on_actionHelp_triggered();
111 void on_actionOptions_triggered();
114 void on_actionLock_Console_triggered();
115 void on_actionUnlock_console_triggered();
116 void on_actionMessage_triggered();
119 void IntMessage(int);
120 void on_actionKill_triggered();
121 void on_actionDisconnect_triggered();
122 void on_actionInfo_messages_triggered();
123 void on_actionConnect_triggered();
124 void on_actionInfo_triggered();
127 virtual void closeEvent (QCloseEvent * e);
130 QList<InterpEntry*> Interpreters;
131 QList<ConnectEntry*> ConnectList;
132 QListWidget *connections;
135 * number of working interpreters
136 * @attention Currently not in use
141 * number of connected VLPs
143 int ActiveConnections;
145 * Indicates state of the Kernel Program. Is it locked or not.
154 QSocketNotifier *Net_Notify;
158 void LoadConfig(char *);
159 void RunGraphModule(char*);
161 InterpEntry *findINTbySocket(int);
162 InterpEntry *findINTbyID(int);
163 InterpEntry *RunIntModule(char *ss, int r);
164 void RemoteInstance(InterpEntry*, int);
165 void CloseInstances(InterpEntry*);
168 * Sets QKernel menu entries to the given status
169 * @param locked status which will be set on the menu entries.
171 void setLocked(bool locked);
174 #endif /* VLP_KERNEL_H */