aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2013-06-23 04:29:12 +0000
committerdos-reis <gdr@axiomatics.org>2013-06-23 04:29:12 +0000
commitd918d0a1f78696fec489c0ad7d581f9707b13df2 (patch)
tree31dd7bd8fff52651664aab568fb616dd6f9405fa /src
parentf18f51d6c959ee88a43166d5e5898ae2e84a49fd (diff)
downloadopen-axiom-d918d0a1f78696fec489c0ad7d581f9707b13df2.tar.gz
Rename the gui interface to open-axiom.
Diffstat (limited to 'src')
-rw-r--r--src/gui/conversation.cc1
-rw-r--r--src/gui/gui.pro.in2
-rw-r--r--src/gui/main-window.cc14
-rw-r--r--src/gui/main-window.h3
-rw-r--r--src/utils/command.cc2
5 files changed, 13 insertions, 9 deletions
diff --git a/src/gui/conversation.cc b/src/gui/conversation.cc
index 4fedfa52..64308665 100644
--- a/src/gui/conversation.cc
+++ b/src/gui/conversation.cc
@@ -237,6 +237,7 @@ namespace OpenAxiom {
QString input = question()->text().trimmed();
if (empty_string(input))
return;
+ question()->setReadOnly(true); // Make query area read only.
server()->input(input);
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
}
diff --git a/src/gui/gui.pro.in b/src/gui/gui.pro.in
index 30e70349..5dbc49bf 100644
--- a/src/gui/gui.pro.in
+++ b/src/gui/gui.pro.in
@@ -21,7 +21,7 @@ TEMPLATE = app
## Put the executable directly in the staged bin directory.
DESTDIR = @top_builddir@/@target@/bin
-TARGET = gui
+TARGET = open-axiom
## Tell QT that sources are not in the build directory
VPATH += @srcdir@
diff --git a/src/gui/main-window.cc b/src/gui/main-window.cc
index 442841b7..caa6771c 100644
--- a/src/gui/main-window.cc
+++ b/src/gui/main-window.cc
@@ -48,12 +48,14 @@ namespace OpenAxiom {
MainWindow::MainWindow(int argc, char* argv[])
- : srv(argc, argv), debate(this) {
- setCentralWidget(&debate);
+ : srv(argc, argv), tabs(this) {
+ setCentralWidget(&tabs);
setWindowTitle("OpenAxiom");
- auto s = debate.widget()->frameSize();
- s.rwidth() += debate.verticalScrollBar()->width();
- s.rheight() += debate.horizontalScrollBar()->width();
+ auto debate = new Debate(this);
+ tabs.addTab(debate, "Interpreter");
+ auto s = debate->widget()->frameSize();
+ s.rwidth() += debate->verticalScrollBar()->width();
+ s.rheight() += debate->horizontalScrollBar()->width();
resize(s);
QMenu* file = menuBar()->addMenu(tr("&File"));
QAction* action = new QAction(tr("Quit"), this);
@@ -61,7 +63,7 @@ namespace OpenAxiom {
action->setShortcut(tr("Ctrl+Q"));
connect(action, SIGNAL(triggered()), this, SLOT(close()));
- connect_server_io(this, &debate);
+ connect_server_io(this, debate);
server()->launch();
// When invoked in a --role=server mode, OpenAxiom would
// wait to be pinged before displaying a prompt. This is
diff --git a/src/gui/main-window.h b/src/gui/main-window.h
index 6eee627e..4b74828f 100644
--- a/src/gui/main-window.h
+++ b/src/gui/main-window.h
@@ -33,6 +33,7 @@
#define OPENAXIOM_GUI_MAIN_WINDOW_INCLUDED
#include <QMainWindow>
+#include <QTabWidget>
#include "open-axiom.h"
#include "server.h"
#include "debate.h"
@@ -53,7 +54,7 @@ namespace OpenAxiom {
private:
Server srv;
- Debate debate;
+ QTabWidget tabs;
};
}
diff --git a/src/utils/command.cc b/src/utils/command.cc
index 58ff52ab..f560f169 100644
--- a/src/utils/command.cc
+++ b/src/utils/command.cc
@@ -57,7 +57,7 @@ namespace OpenAxiom {
"/bin/" OPENAXIOM_GUI_EXECUTABLE
#define OPENAXIOM_GUI_EXECUTABLE \
- "gui" OPENAXIOM_EXEEXT
+ "open-axiom" OPENAXIOM_EXEEXT
/* Path to the session manager, relative to OPENAXIOM_ROOT_DIRECTORY,
or to the system root directory as specified on command line. */