VR-Forces Developer's Guide
 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 #include <boost/signals2.hpp>
15 
16 namespace makVrv
17 {
18  class DtDe;
19 }
20 
21 // The DtRemoteControlConsole class will allow the user to type in remote control console commands
22 // to manipulate the simulation. For a list of commands, type "help" at the command prompt
23 
24 class QVBoxLayout;
25 class QTextEdit;
26 class QLineEdit;
28 class QToolButton;
29 
31 {
32  Q_OBJECT
33 
34 public:
35  DtRemoteControlConsole(makVrv::DtDe& de, QWidget* parent);
36 
37  virtual ~DtRemoteControlConsole() override;
38 
39 protected:
40  virtual void addCommand(const DtRemoteControlCommand&);
41 
42  //Prints a line of text to the console window. Will add CR/LF
43  virtual void print(const QString&);
44 
45  //Prints out all help for all commands
46  virtual void help();
47 
48  //Called when a command is complete, prints out command complete string
49  virtual void slot_onCommandComplete(const QString&, DtRemoteControlCommand*);
50 
51  //Called when the user clicks on the map to set the database location. Simply adds the point to the current command line
52  virtual void slot_onDatabaseLocationSet(const DtVector&);
53 
54 protected slots:
55  //Called when return is pressed in the command widget. Processes the command
56  virtual void processCommand();
57 
58  //Parse and execute the supplied command. Command will be the first item before the
59  //space
60  virtual void executeCommand(const QString& command);
61 
62  //Turn on/off adding database location on mouse click. If on, will turn off after click is made
63  virtual void onSetLocationSelectChanged();
64 
65  //Clear the command line
66  virtual void onClearCommand();
67 
68 public:
69  QVBoxLayout* myMainLayout;
70  QTextEdit* myConsole; //The output of the command
71  QLineEdit* myCommand; //Command input
74 
75 protected:
77 
78  typedef std::vector<DtRemoteControlCommand*> Commands;
79 
81  boost::signals2::connection myDatabaseLocationSelectedConnection;
82 };
virtual void addCommand(const DtRemoteControlCommand &)
virtual void slot_onCommandComplete(const QString &, DtRemoteControlCommand *)
virtual void processCommand()
std::vector< DtRemoteControlCommand * > Commands
Definition: remoteControlConsole.h:78
Commands myCommands
Definition: remoteControlConsole.h:80
virtual void slot_onDatabaseLocationSet(const DtVector &)
virtual void executeCommand(const QString &command)
virtual void onSetLocationSelectChanged()
Definition: remoteControlCommands.h:30
DtRemoteControlConsole(makVrv::DtDe &de, QWidget *parent)
boost::signals2::connection myDatabaseLocationSelectedConnection
Definition: remoteControlConsole.h:81
virtual ~DtRemoteControlConsole() override
QLineEdit * myCommand
Definition: remoteControlConsole.h:71
virtual void print(const QString &)
virtual void help()
QToolButton * mySetLocationButton
Definition: remoteControlConsole.h:72
QVBoxLayout * myMainLayout
Definition: remoteControlConsole.h:69
makVrv::DtDe & myDe
Definition: remoteControlConsole.h:76
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
Definition: remoteControlConsole.h:30
virtual void onClearCommand()
QTextEdit * myConsole
Definition: remoteControlConsole.h:70
QToolButton * myClearButton
Definition: remoteControlConsole.h:73

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)