Brief description of class still missing. More...
#include <DrawConsole.h>
Public Member Functions | |
void | addCommand (const QString &cmd) |
MapProject * | currentProject () const |
DrawConsole (QWidget *parent=0, Qt::WindowFlags f=0) | |
QString | script () const |
void | setCurrentProject (MapProject *p) |
~DrawConsole () |
Brief description of class still missing.
Full description of class still missing
DrawConsole::DrawConsole | ( | QWidget * | parent = 0 , |
Qt::WindowFlags | f = 0 |
||
) |
void DrawConsole::addCommand | ( | const QString & | cmd | ) |
References DrawScene::parse(), MapProject::scene(), and TRACE.
Referenced by MainWindow::addCommand().
MapProject* DrawConsole::currentProject | ( | ) | const [inline] |
Referenced by MainWindow::addCommand(), MainWindow::exportImage(), MainWindow::newView(), MainWindow::printDocument(), MainWindow::refreshScene(), MainWindow::rotateView(), MainWindow::saveDocument(), MainWindow::saveDocumentAs(), MainWindow::setDimensionMode(), MainWindow::setEllipseMode(), MainWindow::setLineMode(), MainWindow::setMoveMode(), MainWindow::setRectMode(), MainWindow::setSnapContours(), MainWindow::setSnapGrid(), MainWindow::setSnapNodes(), MainWindow::setSnapX(), MainWindow::setSnapY(), and MainWindow::setTextMode().
{return _currentProject;}
QString DrawConsole::script | ( | ) | const |
References TRACE.
Referenced by MainWindow::refreshScene().
{ TRACE; return commandHistory->toPlainText(); }
void DrawConsole::setCurrentProject | ( | MapProject * | p | ) |
References MapProject::script, MapProject::setScript(), and TRACE.
Referenced by MainWindow::projectClosed(), and MainWindow::setActiveProject().
{ TRACE; if(p==_currentProject) return; if(_currentProject) { _currentProject->setScript(commandHistory->toPlainText()); disconnect(_currentProject, SIGNAL(destroyed()), this, SLOT(currentProjectDestroyed())); } if(p) { _currentProject=p; connect(_currentProject, SIGNAL(destroyed()), this, SLOT(currentProjectDestroyed())); commandHistory->setPlainText(_currentProject->script()); setEnabled(true); } else { setEnabled(false); _currentProject=0; commandHistory->clear(); } }