From d918d0a1f78696fec489c0ad7d581f9707b13df2 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 23 Jun 2013 04:29:12 +0000 Subject: Rename the gui interface to open-axiom. --- src/gui/conversation.cc | 1 + src/gui/gui.pro.in | 2 +- src/gui/main-window.cc | 14 ++++++++------ src/gui/main-window.h | 3 ++- 4 files changed, 12 insertions(+), 8 deletions(-) (limited to 'src/gui') 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 +#include #include "open-axiom.h" #include "server.h" #include "debate.h" @@ -53,7 +54,7 @@ namespace OpenAxiom { private: Server srv; - Debate debate; + QTabWidget tabs; }; } -- cgit v1.2.3