Mercurial > hg > octave-terminal
changeset 13362:c3446170dbc3
Refactored code in QTerminalWidgetand made comments Doxygen-frienly.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Thu, 07 Apr 2011 12:40:49 +0200 |
parents | 67ffdb3264a6 |
children | d09eb4ace2c3 |
files | gui//QTerminalWidget.h |
diffstat | 1 files changed, 24 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/gui//QTerminalWidget.h +++ b/gui//QTerminalWidget.h @@ -15,7 +15,6 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #ifndef QTERMINALWIDGET_H #define QTERMINALWIDGET_H @@ -23,16 +22,28 @@ #include <QtGui> struct TermWidgetImpl; +/** + * \class QTerminalWidget + * This class forms a widget class that can be inserted into other widgets. + */ class QTerminalWidget : public QWidget { Q_OBJECT public: + /** + * \enum ColorScheme + * Different color schemes for the terminal. + */ enum ColorScheme { WhiteOnBlack, GreenOnBlack, BlackOnLightYellow }; + /** + * \enum ScrollBarPosition + * Defines the scrollbar position of the terminal. + */ enum ScrollBarPosition { NoScrollBar, @@ -45,35 +56,35 @@ void startShellProgram(); - // Terminal font - // Default is application font with family Monospace, size 10 + /** Default is application font with family Monospace, size 10. */ void setTerminalFont(QFont &font); - // Shell program, default is /bin/bash + /** Shell program, default is /bin/bash. */ void setShellProgram(QString &progname); - // Shell program args, default is none + /** Shell program args, default is none. */ void setArgs(QStringList &args); - //Text codec, default is UTF-8 + /** Text codec, default is UTF-8. */ void setTextCodec(QTextCodec *codec); - //Color scheme, default is white on black + /** Color scheme, default is white on black. */ void setColorScheme(ColorScheme scheme); - //set size + /** Resize terminal widget. */ void setSize(int h, int v); - // History size for scrolling - void setHistorySize(int lines); //infinite if lines < 0 + /** History size for scrolling, values below zero mean infinite. */ + void setHistorySize(int lines); - // Presence of scrollbar + /** Presence of scrollbar. By default, there is no scrollbar present. */ void setScrollBarPosition(ScrollBarPosition); - // Send some text to terminal + /** Send some text to the terminal. */ void sendText(QString &text); signals: + /** Emitted, when the current program has finished. */ void finished(); protected: @@ -83,6 +94,7 @@ void sessionFinished(); private: + /** Performs initial operations on this widget. */ void initialize(); TermWidgetImpl *m_impl; };