diff options
author | dos-reis <gdr@axiomatics.org> | 2013-04-06 21:55:13 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2013-04-06 21:55:13 +0000 |
commit | ab3959c46b2eb277322d3be9536431d7d9597a73 (patch) | |
tree | f58d8bd2c70fac71b678bac96e1aeec72e2b50e6 /src/gui | |
parent | d33fc2c04f3832483ea136bbee11cec3beb0bbd0 (diff) | |
download | open-axiom-ab3959c46b2eb277322d3be9536431d7d9597a73.tar.gz |
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/debate.h | 1 | ||||
-rw-r--r-- | src/gui/main-window.cc | 2 | ||||
-rw-r--r-- | src/gui/main-window.h | 3 | ||||
-rw-r--r-- | src/gui/server.cc | 2 | ||||
-rw-r--r-- | src/gui/server.h | 3 |
5 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/debate.h b/src/gui/debate.h index fd69bfbf..7dca347c 100644 --- a/src/gui/debate.h +++ b/src/gui/debate.h @@ -52,6 +52,7 @@ namespace OpenAxiom { MainWindow* main_window() const { return qobject_cast<MainWindow*>(parent()->parent()); } + Server* server() const { return main_window()->server(); } protected: void resizeEvent(QResizeEvent*); diff --git a/src/gui/main-window.cc b/src/gui/main-window.cc index ea8b94f5..9912bf41 100644 --- a/src/gui/main-window.cc +++ b/src/gui/main-window.cc @@ -55,7 +55,7 @@ namespace OpenAxiom { w->resize(w->size() + diff); } - MainWindow::MainWindow(Command& cmd) : fs(cmd.root_dir), tabs(this) { + MainWindow::MainWindow(Command& cmd) : fs(cmd.root_dir), srv(cmd), tabs(this) { setCentralWidget(&tabs); Debate* debate = new Debate(&tabs, cmd); tabs.addTab(debate, "Main Frame"); diff --git a/src/gui/main-window.h b/src/gui/main-window.h index 1e6eeb20..74e5effd 100644 --- a/src/gui/main-window.h +++ b/src/gui/main-window.h @@ -35,6 +35,7 @@ #include <QMainWindow> #include <QTabWidget> #include "open-axiom.h" +#include "server.h" namespace OpenAxiom { // -- Main application window -- @@ -46,9 +47,11 @@ namespace OpenAxiom { // Pointer to the root file system of the OpenAxiom installation Filesystem* filesystem() { return &fs; } + Server* server() { return &srv; } private: Filesystem fs; + Server srv; QTabWidget tabs; }; } diff --git a/src/gui/server.cc b/src/gui/server.cc index 529eef4c..461c22b8 100644 --- a/src/gui/server.cc +++ b/src/gui/server.cc @@ -33,7 +33,7 @@ #include "server.h" namespace OpenAxiom { - Server::Server(const Command& c) : cmd(c) { + Server::Server(const Command& c) : cmd(c), fs(c.root_dir) { setProcessChannelMode(QProcess::MergedChannels); } diff --git a/src/gui/server.h b/src/gui/server.h index 2a353db4..e67b5291 100644 --- a/src/gui/server.h +++ b/src/gui/server.h @@ -41,11 +41,14 @@ namespace OpenAxiom { explicit Server(const Command&); ~Server(); + const Filesystem& system_root() const { return fs; } + void launch(); void input(const QString&); private: Command cmd; + Filesystem fs; }; } |