aboutsummaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/debate.h1
-rw-r--r--src/gui/main-window.cc2
-rw-r--r--src/gui/main-window.h3
-rw-r--r--src/gui/server.cc2
-rw-r--r--src/gui/server.h3
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;
};
}