[brlcad-commits] SF.net SVN: brlcad:[35333]
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <ra...@us...> - 2009-07-28 02:46:14
|
Revision: 35333 http://brlcad.svn.sourceforge.net/brlcad/?rev=35333&view=rev Author: ralith Date: 2009-07-28 02:46:03 +0000 (Tue, 28 Jul 2009) Log Message: ----------- Added support for displaying command output to the console. Modified Paths: -------------- rt^3/trunk/src/g3d/Console.cxx rt^3/trunk/src/g3d/Console.h rt^3/trunk/src/g3d/MainWindow.cxx Modified: rt^3/trunk/src/g3d/Console.cxx =================================================================== --- rt^3/trunk/src/g3d/Console.cxx 2009-07-28 02:42:22 UTC (rev 35332) +++ rt^3/trunk/src/g3d/Console.cxx 2009-07-28 02:46:03 UTC (rev 35333) @@ -134,8 +134,12 @@ } -void Console::pushOutput(const QString &str) +void Console::pushOutput(QString str) { + if(str.length() == 0) { + return; + } + outputLines.push_back(str); if(outputLines.size() > CONSOLE_OUTPUT_LINES) { Modified: rt^3/trunk/src/g3d/Console.h =================================================================== --- rt^3/trunk/src/g3d/Console.h 2009-07-28 02:42:22 UTC (rev 35332) +++ rt^3/trunk/src/g3d/Console.h 2009-07-28 02:46:03 UTC (rev 35333) @@ -48,12 +48,14 @@ void update(const ObserverEvent &event); +public slots: + void pushOutput(QString str); + signals: void commandRan(QString command); protected: bool eventFilter(QObject *obj, QEvent *event); - void pushOutput(const QString &str); protected slots: void evalCmd(); Modified: rt^3/trunk/src/g3d/MainWindow.cxx =================================================================== --- rt^3/trunk/src/g3d/MainWindow.cxx 2009-07-28 02:42:22 UTC (rev 35332) +++ rt^3/trunk/src/g3d/MainWindow.cxx 2009-07-28 02:46:03 UTC (rev 35333) @@ -49,6 +49,8 @@ QObject::connect(console, SIGNAL(commandRan(QString)), cmdInterp, SLOT(execute(QString))); + QObject::connect(cmdInterp, SIGNAL(commandDone(QString)), + console, SLOT(pushOutput(QString))); // Give focus to the render area, and thus camera control. ogreView->setFocus(Qt::OtherFocusReason); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |