aboutsummaryrefslogtreecommitdiff
path: root/src/gui/conversation.h
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-07-01 17:26:12 +0000
committerdos-reis <gdr@axiomatics.org>2011-07-01 17:26:12 +0000
commit5e63328f3bcd8b1d1cc7d59350f92cc4185df7c0 (patch)
treea67350d9021f77f9de394c9f35bd776189241957 /src/gui/conversation.h
parent8816646796401df89afdd12daf749ca99400c949 (diff)
downloadopen-axiom-5e63328f3bcd8b1d1cc7d59350f92cc4185df7c0.tar.gz
* gui/conversation.h (OutputTextArea): Now inherit from
QTextEditor, for the nth time. (OutputTextArea::sizeHint): Declare as override. * gui/conversation.cc (OutputTextArea::OutputTextArea): Make the output text editor read only. Disallow vertical scroll bars. (OutputTextArea::sizeHint): Give a tight estimate. (OutputTextArea::add_paragraph): Tidy. (OutputTextArea::add_text): Likewise. (Exchange::reply_to_query): Toggle the mouse in busy state after submitting query. (Conversation::read_reply): Untoggle mouse' busy state if last output text was read.
Diffstat (limited to 'src/gui/conversation.h')
-rw-r--r--src/gui/conversation.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/conversation.h b/src/gui/conversation.h
index 85220122..8f379f8d 100644
--- a/src/gui/conversation.h
+++ b/src/gui/conversation.h
@@ -35,7 +35,7 @@
#include <vector>
#include <QFrame>
#include <QLineEdit>
-#include <QLabel>
+#include <QTextEdit>
#include <QFont>
#include <QEvent>
#include <QResizeEvent>
@@ -57,10 +57,12 @@ namespace OpenAxiom {
// --------------------
// An output text area is a widget where we output text.
// The texts are accumulated, as opposed to overwritten.
- class OutputTextArea : public QLabel {
- typedef QLabel Base;
+ class OutputTextArea : public QTextEdit {
+ typedef QTextEdit Base;
public:
explicit OutputTextArea(QWidget*);
+ // the metrics of this output area
+ QSize sizeHint() const;
// Add a new paragraph to existing texts. Paragraghs are
// separated by the newline character.
void add_paragraph(const QString&);
@@ -123,7 +125,7 @@ namespace OpenAxiom {
// Conversion number
int number() const { return no; }
- // Reimplement positiion management.
+ // Reimplement position management.
QSize sizeHint() const;
protected: