VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
remoteControlConsole.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 //\file remoteControlConsole.h
7 
8 #pragma once
9 
10 #include <vrvUtil/signalslib.h>
11 #include <matrix/vlVector.h>
12 #include <QtWidgets/QDialog>
13 
14 namespace makVrv
15 {
16  class DtDe;
17 }
18 
19 // The DtRemoteControlConsole class will allow the user to type in remote control console commands
20 // to manipulate the simulation. For a list of commands, type "help" at the command prompt
21 
22 class QVBoxLayout;
23 class QTextEdit;
24 class QLineEdit;
26 
28 {
29  Q_OBJECT
30 
31 public:
32  DtRemoteControlConsole(makVrv::DtDe& de, QWidget* parent);
33 
34  virtual ~DtRemoteControlConsole();
35 
36 protected:
37  virtual void addCommand(const DtRemoteControlCommand&);
38 
39  //Prints a line of text to the console window. Will add CR/LF
40  virtual void print(const QString&);
41 
42  //Prints out all help for all commands
43  virtual void help();
44 
45  //Called when a command is complete, prints out command complete string
46  virtual void slot_onCommandComplete(const QString&, DtRemoteControlCommand*);
47 
48  //Called when the user clicks on the map to set the database location. Simply adds the point to the current command line
49  virtual void slot_onDatabaseLocationSet(const DtVector&);
50 
51 protected slots:
52  //Called when return is pressed in the command widget. Processes the command
53  virtual void processCommand();
54 
55  //Parse and execute the supplied command. Command will be the first item before the
56  //space
57  virtual void executeCommand(const QString& command);
58 
59 public:
60  QVBoxLayout* myMainLayout;
61  QTextEdit* myConsole; //The output of the command
62  QLineEdit* myCommand; //Command input
63 
64 protected:
66 
67  typedef std::vector<DtRemoteControlCommand*> Commands;
68 
70 };
virtual void addCommand(const DtRemoteControlCommand &)
virtual void slot_onCommandComplete(const QString &, DtRemoteControlCommand *)
virtual void processCommand()
std::vector< DtRemoteControlCommand * > Commands
Definition: remoteControlConsole.h:67
Commands myCommands
Definition: remoteControlConsole.h:69
virtual void slot_onDatabaseLocationSet(const DtVector &)
virtual void executeCommand(const QString &command)
Definition: remoteControlCommands.h:28
DtRemoteControlConsole(makVrv::DtDe &de, QWidget *parent)
QLineEdit * myCommand
Definition: remoteControlConsole.h:62
virtual void print(const QString &)
virtual void help()
virtual ~DtRemoteControlConsole()
QVBoxLayout * myMainLayout
Definition: remoteControlConsole.h:60
makVrv::DtDe & myDe
Definition: remoteControlConsole.h:65
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Definition: remoteControlConsole.h:27
QTextEdit * myConsole
Definition: remoteControlConsole.h:61

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)