Public Member Functions
DrawConsole Class Reference

Brief description of class still missing. More...

#include <DrawConsole.h>

List of all members.

Public Member Functions

void addCommand (const QString &cmd)
MapProjectcurrentProject () const
 DrawConsole (QWidget *parent=0, Qt::WindowFlags f=0)
QString script () const
void setCurrentProject (MapProject *p)
 ~DrawConsole ()

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

DrawConsole::DrawConsole ( QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)

Description of constructor still missing

References TRACE.

    : QWidget(parent, f)
{
  TRACE;
  setupUi(this);
  _currentProject=0;
  setEnabled(false);
  commandHistory->setAcceptRichText (false);
  commandHistory->setFontFamily( "Bitstream Vera Sans Mono" );
  commandHistory->setLineWrapMode(QTextEdit::NoWrap);
}

Description of destructor still missing

References TRACE.

{
  TRACE;
}

Member Function Documentation

void DrawConsole::addCommand ( const QString &  cmd)

References DrawScene::parse(), MapProject::scene(), and TRACE.

Referenced by MainWindow::addCommand().

{
  TRACE;
  if(!cmd.isEmpty() && cmd.right(1)==";") {
    commandHistory->append(cmd);
    _currentProject->scene()->parse(cmd);
    directCommand->clear();
  }
}
QString DrawConsole::script ( ) const

References TRACE.

Referenced by MainWindow::refreshScene().

{
  TRACE;
  return commandHistory->toPlainText();
}

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();
  }
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines