VR-Forces 4.0.4 Class Documentation
examples/guiThreadVrfRemoteController/remoteControlConsole.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2012 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: remoteControlConsole.h,v $ $Revision: 1.2 $ $State: Exp $
00007 ******************************************************************************/
00008 //\file remoteControlConsole.h
00009 
00010 #pragma once
00011 
00012 #include <vrvUtil/signalslib.h>
00013 #include <QtGui/QDialog>
00014 
00015 namespace makVrv
00016 {
00017    class DtDe;
00018 }
00019 
00020 // The DtRemoteControlConsole class will allow the user to type in remote control console commands
00021 // to manipulate the simulation.  For a list of commands, type "help" at the command prompt
00022 
00023 class DtVector;
00024 class QVBoxLayout;
00025 class QTextEdit;
00026 class QLineEdit;
00027 class DtRemoteControlCommand;
00028 
00029 class DtRemoteControlConsole : public QDialog
00030 {
00031    Q_OBJECT
00032 
00033 public:
00034    DtRemoteControlConsole(makVrv::DtDe& de, QWidget* parent);
00035 
00036    virtual ~DtRemoteControlConsole();
00037 
00038 protected:
00039    virtual void addCommand(const DtRemoteControlCommand&);
00040 
00041    //Prints a line of text to the console window.  Will add CR/LF
00042    virtual void print(const QString&);
00043    
00044    //Prints out all help for all commands
00045    virtual void help();
00046 
00047    //Called when a command is complete, prints out command complete string
00048    virtual void slot_onCommandComplete(const QString&, DtRemoteControlCommand*);
00049 
00050    //Called when the user clicks on the map to set the database location.  Simply adds the point to the current command line
00051    virtual void slot_onDatabaseLocationSet(const DtVector&);
00052 
00053 protected slots:
00054    //Called when return is pressed in the command widget.  Processes the command
00055    virtual void processCommand();
00056 
00057    //Parse and execute the supplied command.  Command will be the first item before the
00058    //space
00059    virtual void executeCommand(const QString& command);
00060 
00061 protected:
00062    makVrv::DtDe&  myDe;
00063    QVBoxLayout*   myMainLayout;
00064    QTextEdit*     myConsole;           //The output of the command
00065    QLineEdit*     myCommand;           //Command input
00066 
00067    typedef std::vector<DtRemoteControlCommand*> Commands;
00068 
00069    Commands myCommands;
00070 };

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)