Mercurial > octave-nkf
changeset 13349:a88e98b714d9
Terminal relaunches on exit.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Thu, 07 Apr 2011 10:44:04 +0200 |
parents | 0a5619ea17a6 |
children | 5a13d25ce389 |
files | gui//qtermwidget/lib/Makefile gui//qtermwidget/lib/Makefile.Debug gui//qtermwidget/lib/Makefile.Release gui//terminal.cpp gui//terminal.h |
diffstat | 5 files changed, 22 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/gui//qtermwidget/lib/Makefile Thu Apr 07 10:28:41 2011 +0200 +++ b/gui//qtermwidget/lib/Makefile Thu Apr 07 10:44:04 2011 +0200 @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: libqtermwidget.a -# Generated by qmake (2.01a) (Qt 4.7.2) on: Do. Apr 7 10:08:11 2011 +# Generated by qmake (2.01a) (Qt 4.7.2) on: Do. Apr 7 10:32:32 2011 # Project: lib.pro # Template: lib # Command: /usr/bin/qmake -o Makefile lib.pro
--- a/gui//qtermwidget/lib/Makefile.Debug Thu Apr 07 10:28:41 2011 +0200 +++ b/gui//qtermwidget/lib/Makefile.Debug Thu Apr 07 10:44:04 2011 +0200 @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: libqtermwidget_d.a -# Generated by qmake (2.01a) (Qt 4.7.2) on: Do. Apr 7 10:08:11 2011 +# Generated by qmake (2.01a) (Qt 4.7.2) on: Do. Apr 7 10:32:32 2011 # Project: lib.pro # Template: lib #############################################################################
--- a/gui//qtermwidget/lib/Makefile.Release Thu Apr 07 10:28:41 2011 +0200 +++ b/gui//qtermwidget/lib/Makefile.Release Thu Apr 07 10:44:04 2011 +0200 @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: libqtermwidget.a -# Generated by qmake (2.01a) (Qt 4.7.2) on: Do. Apr 7 10:08:11 2011 +# Generated by qmake (2.01a) (Qt 4.7.2) on: Do. Apr 7 10:32:32 2011 # Project: lib.pro # Template: lib #############################################################################
--- a/gui//terminal.cpp Thu Apr 07 10:28:41 2011 +0200 +++ b/gui//terminal.cpp Thu Apr 07 10:44:04 2011 +0200 @@ -1,6 +1,16 @@ #include "terminal.h" Terminal::Terminal() - : QMdiSubWindow() { - setWidget(new QTermWidget(1, this)); + : QMdiSubWindow(), + m_terminalWidget(0) { + launchTerminal(); } + +void Terminal::launchTerminal() { + delete m_terminalWidget; + m_terminalWidget = new QTermWidget(1, this); + m_terminalWidget->setScrollBarPosition(QTermWidget::ScrollBarRight); + setWidget(m_terminalWidget); + + connect(m_terminalWidget, SIGNAL(finished()), this, SLOT(launchTerminal())); +}
--- a/gui//terminal.h Thu Apr 07 10:28:41 2011 +0200 +++ b/gui//terminal.h Thu Apr 07 10:44:04 2011 +0200 @@ -5,8 +5,15 @@ #include "qtermwidget.h" class Terminal : public QMdiSubWindow { + Q_OBJECT public: Terminal(); + +private slots: + void launchTerminal(); + +private: + QTermWidget *m_terminalWidget; }; #endif // TERMINAL_H