2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
16 #include <boost/shared_ptr.hpp>
17 #include "histlineedit.h"
18 #include "console_p.h"
24 class Console
: public QWidget
{
29 static QRegExp promptRegexp
;
30 boost::shared_ptr
<TextNotifier
> m_notifier
;
31 LuaConsoleHighlighter m_highlighter
;
33 Console(QWidget
* parent
, const QString
& caption
);
34 inline QLineEdit
* commandLine() const { return edit
; }
36 void setNotifier(const boost::shared_ptr
<TextNotifier
>& notifier
) { m_notifier
= notifier
; }
38 void displayText(QString
, int offset
);
39 void echo(const QString
&);
41 void input(const QString
&);
43 void receivedInput(const QString
&);
49 virtual ~TextNotifier() { }
50 virtual void textNotify(const QString
& text
) = 0;