#include <QtGui/QListWidget>
#include <QtGui/QTextEdit>
#include <QtCore/QSocketNotifier>
+#include <QtCore/QDir>
#include "comm.h"
+#include "ui/kernelwindow.h"
+
#define GPATH "loggr"
#define IPATH "logi"
#define NPATH "logn"
class ConnectEntry {
public:
char addr[256];
-
+
ConnectEntry(char *s) {
strcpy(addr, s);
};
+
+ ConnectEntry(const char *s) {
+ strcpy(addr, s);
+ };
};
/**
* Kernel class
*/
-class QKernel : public QMainWindow {
+class QKernel : public QMainWindow, private Ui::KernelWindow {
Q_OBJECT
public:
- QTextEdit *desktop;
- QMenuBar *bar;
- QMenu *programMenu;
- QMenu *machineMenu;
QMenu *toolsMenu;
char progdir[256];
int NodeNumber;
int ConType;
- QKernel();
+ QKernel(int argc, char **argv);
- virtual void resizeEvent(QResizeEvent *ev);
-
- void WriteMessage(char* msg);
- void InitMessage();
+ void WriteMessage(const char * msg);
public slots:
- void n_impl();
- void Run_Prog();
- void Edit();
- void Help();
- void SetOptions();
- void AddAddress();
- void DelAddress();
- void LockConsole();
- void UnlockConsole();
- void MessageToNode();
- void QuitProc();
void NetMessage();
void IntMessage(int);
- void KillInterpreter();
- void Disconnect();
- void SetMessages();
- void Connect();
- void Info();
protected:
virtual void closeEvent (QCloseEvent * e);
private:
QList<InterpEntry*> Interpreters;
QList<ConnectEntry*> ConnectList;
- QListWidget *connections;
/**
* number of working interpreters
bool synchro;
bool wait_for_info;
char LockPasswd[25];
- QAction * toolsEditorAction;
- QAction * toolsOptionsAction;
- QAction * toolsInfoAction;
- QAction * programExecuteAction;
- QAction * programKillAction;
- QAction * machineMessageAction;
- QAction * machineConnectAction;
- QAction * machineDisconnectAction;
- QAction * machineInfoAction;
- QAction * toolsLockAction;
- QAction * toolsUnlockAction;
- QAction * quitAction;
int net_sock;
int freeINTid;
QSocketNotifier *Net_Notify;
- char HomeDir[255];
+ QDir homeDir;
+ char myargs[5][255];
bool info_messages;
- void LoadConfig(char *);
+ void loadConfig(const QString &fname);
+ void loadConfig(const char *);
+
void RunGraphModule(char*);
void RunNetModule();
InterpEntry *findINTbySocket(int);
* @param locked status which will be set on the menu entries.
*/
void setLocked(bool locked);
+
+ QString getConfigFilePath();
+ const char * getHomeDir();
+ const char * getRemoteDir();
+
+ const char * getNetModuleSocket();
+ const char * getGraphModuleSocket();
+
+private slots:
+ void on_actionExecute_triggered();
+ void on_actionKill_triggered();
+ void on_actionQuit_triggered();
+
+ void on_actionMessage_triggered();
+ void on_actionConnect_triggered();
+ void on_actionDisconnect_triggered();
+ void on_actionInfo_triggered();
+
+ void on_actionEditor_triggered();
+ void on_actionHelp_triggered();
+ void on_actionOptions_triggered();
+ void on_actionInfo_messages_triggered();
+ void on_actionLock_console_triggered();
+ void on_actionUnlock_console_triggered();
};
#endif /* VLP_KERNEL_H */