X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=src%2Fkernel%2Fkernel.h;h=fdb76061d33232aba19ed9ba6fcfc9725e66bb9c;hb=refs%2Ftags%2F3.4-b1;hp=168777c1631efb92c7b7132affc23f2c8151936b;hpb=3490d8d1eee73348bc8ed4938d27d19d8f41660b;p=vlp.git diff --git a/src/kernel/kernel.h b/src/kernel/kernel.h index 168777c..fdb7606 100644 --- a/src/kernel/kernel.h +++ b/src/kernel/kernel.h @@ -36,9 +36,12 @@ #include #include #include +#include #include "comm.h" +#include "ui/KernelWindow.h" + #define GPATH "loggr" #define IPATH "logi" #define NPATH "logn" @@ -51,6 +54,12 @@ #define WARN_COL 1 #define NORM_COL 2 +/** + * @file + */ + +namespace loglan { +namespace vlp { /** * Interpreter slot @@ -80,54 +89,35 @@ public: 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(); - - virtual void resizeEvent(QResizeEvent *ev); + QKernel(int argc, char **argv); - 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); @@ -135,7 +125,6 @@ protected: private: QList Interpreters; QList ConnectList; - QListWidget *connections; /** * number of working interpreters @@ -154,26 +143,17 @@ private: 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); @@ -187,6 +167,33 @@ private: * @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 */