Mercurial > octave
diff gui/src/MainWindow.cpp @ 14255:5dcfb705ce12 gui
GUI: Bundled the new qterminal.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Mon, 23 Jan 2012 22:35:00 +0100 |
parents | d80086a9880e |
children | 2254d7c14f41 |
line wrap: on
line diff
--- a/gui/src/MainWindow.cpp Sun Jan 22 15:13:22 2012 -0500 +++ b/gui/src/MainWindow.cpp Mon Jan 23 22:35:00 2012 +0100 @@ -98,7 +98,7 @@ } m_lexerAPI->prepare(); // prepare API info ... this make take some time } - subWindow->initEditor(m_terminalView, m_lexer, this); // init necessary informations for editor + //subWindow->initEditor(m_terminalView, m_lexer, this); // init necessary informations for editor if ( fileName.isEmpty() ) subWindow->newFile (); @@ -125,8 +125,8 @@ QString selectedFile = QFileDialog::getSaveFileName (this, tr ("Save Workspace"), ResourceManager::instance ()->homePath ()); - m_terminalView->sendText (QString ("save \'%1\'\n").arg (selectedFile)); - m_terminalView->widget ()->setFocus (); + //m_terminalView->sendText (QString ("save \'%1\'\n").arg (selectedFile)); + m_terminalView->setFocus (); } void @@ -135,22 +135,22 @@ QString selectedFile = QFileDialog::getOpenFileName (this, tr ("Load Workspace"), ResourceManager::instance ()->homePath ()); - m_terminalView->sendText (QString ("load \'%1\'\n").arg (selectedFile)); - m_terminalView->widget ()->setFocus (); + //m_terminalView->sendText (QString ("load \'%1\'\n").arg (selectedFile)); + m_terminalView->setFocus (); } void MainWindow::handleClearWorkspaceRequest () { - m_terminalView->sendText ("clear\n"); - m_terminalView->widget ()->setFocus (); + //m_terminalView->sendText ("clear\n"); + m_terminalView->setFocus (); } void MainWindow::handleCommandDoubleClicked (QString command) { - m_terminalView->sendText (command); - m_terminalView->widget ()->setFocus (); + //m_terminalView->sendText (command); + m_terminalView->setFocus (); } void @@ -286,20 +286,20 @@ m_statusBar = new QStatusBar (this); // Setup essential MDI Windows. - m_terminalView = AbstractTerminalView::create (this); + m_terminalView = new QTerminal(this); m_documentationWidget = new BrowserWidget (this); m_ircWidget = new IRCWidget (this); // Octave Terminal subwindow. m_terminalViewSubWindow = new NonClosableMdiSubWindow (this); - m_terminalViewSubWindow->setWidget (m_terminalView->widget ()); + m_terminalViewSubWindow->setWidget (m_terminalView); m_centralMdiArea->addSubWindow (m_terminalViewSubWindow, Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint); m_terminalViewSubWindow->setObjectName ("OctaveTerminalSubWindow"); m_terminalViewSubWindow->setWindowTitle (tr ("Terminal")); m_terminalViewSubWindow ->setWindowIcon (ResourceManager::instance ()->icon (ResourceManager::Terminal)); - m_terminalViewSubWindow->setFocusProxy (m_terminalView->widget ()); + m_terminalViewSubWindow->setFocusProxy (m_terminalView); m_terminalViewSubWindow->setStatusTip (tr ("Enter your commands into the Octave terminal.")); m_terminalViewSubWindow->setMinimumSize (300, 300);