VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
axisConfigurationSelectionDialog.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
15 #include <vlutil/vlString.h>
17 
18 #include <QtWidgets/QWidget>
19 #include <QtWidgets/QDialog>
20 
21 class QLabel;
22 class QPushButton;
23 class QSlider;
24 class QCheckBox;
25 class QGridLayout;
26 class QRadioButton;
27 class QComboBox;
28 class QHBoxLayout;
29 
35 
36 namespace makVrv
37 {
38  class DtGameControlInformation;
39  class DtGameControlProcessor;
40  class DtDe;
41 
43  {
44  Q_OBJECT
45 
46  public:
47 
49  DtAxisConfigurationSelectionDialog(DtDe&, QWidget* parent = NULL, const Qt::WindowFlags& flags = Qt::Tool );
50 
53 
54  virtual void setEditing(const std::string& fg, const std::string& function);
55  virtual void setDescription(const std::string& description);
56 
57  virtual void setupFromControlInformation(const DtGameControlInformation&);
58 
59  boost::signals2::signal<void (DtGameControlInformation*)> signal_accept;
60 
61  virtual DtGameControlInformation gameControlInformation() const;
62 
63  protected:
64  virtual void accept();
65  virtual void reject();
66  virtual void closeEvent(QCloseEvent*);
67 
68  virtual void controllerAdded(const DtJoystickManager::ControllerInformation& i);
69  virtual void controllerRemoved(int deviceIndex);
70 
72  virtual bool gameControllerEvent(DtGenericControllerEvent*);
73 
75  virtual bool filterGameControllerEvent(DtGenericControllerEvent*);
76 
77  virtual void setupFromEvent(DtGenericControllerEvent*);
78 
80  virtual QString translateString(const std::string& str) const;
81 
82  protected slots:
83  virtual void gameControllerSelected();
84  virtual void onAxisChanged();
85  virtual void onDetectTypeChanged();
86 
87  public:
92  QHBoxLayout* myBottomButtonLayout;
94  QSlider* mySlider;
95  QGridLayout* mySliderLayout;
98  QRadioButton* myDetect;
100  QRadioButton* mySelect;
103 
104  protected:
106  std::string myFunctionGroup;
107  std::string myFunction;
109 
112 
114 
116 
117  typedef std::map<int, std::map<int, int> > LastJoystickAxisValue;
119  };
120 
122 
124  {
125  public:
128 
131 
133  static void registerInstance(DtDe& de, DtAxisConfigurationSelectionDialogCreator* instance);
134 
135  virtual DtAxisConfigurationSelectionDialog* create(QWidget*);
136 
137  protected:
139  };
140 }
DtGameControlProcessor * myGameControlProcessor
Definition: axisConfigurationSelectionDialog.h:113
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
QSlider * mySlider
Definition: axisConfigurationSelectionDialog.h:94
QCheckBox * myReverse
Definition: axisConfigurationSelectionDialog.h:93
Handler that you insert into the manager to be made aware of game controller events. A subclass of this handler can be added to the joystick manager to be made aware of any joystick/keyboard event.
Definition: joystickManager.h:42
LastJoystickAxisValue myLastJoystickAxisValue
Definition: axisConfigurationSelectionDialog.h:118
std::map< int, std::map< int, int > > LastJoystickAxisValue
Definition: axisConfigurationSelectionDialog.h:117
QComboBox * myControllers
Definition: axisConfigurationSelectionDialog.h:89
boost::signals2::signal< void(DtGameControlInformation *)> signal_accept
Definition: axisConfigurationSelectionDialog.h:59
bool mySignaled
Definition: axisConfigurationSelectionDialog.h:108
QLabel * myMaximumLabel
Definition: axisConfigurationSelectionDialog.h:97
DtSignalConnectionManager myConnections
Definition: axisConfigurationSelectionDialog.h:115
Definition: gameControllerEvents.h:33
QLabel * myControlLabel
Definition: axisConfigurationSelectionDialog.h:99
#define DT_DLL_JOYSTICKCOREQT
Contains DLL export macros.
Definition: joystickCoreQt.h:27
QRadioButton * myDetect
Definition: axisConfigurationSelectionDialog.h:98
Contains makVrv::DtVirtualBaseClass class.
DtGameControlInformation::GameControlEvent myAxisEvent
Definition: axisConfigurationSelectionDialog.h:111
QHBoxLayout * myBottomButtonLayout
Definition: axisConfigurationSelectionDialog.h:92
Definition: axisConfigurationSelectionDialog.h:42
QRadioButton * mySelect
Definition: axisConfigurationSelectionDialog.h:100
Definition: gameControlInformation.h:46
QComboBox * myAxisList
Definition: axisConfigurationSelectionDialog.h:101
DtDe & myDe
Definition: axisConfigurationSelectionDialog.h:105
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
This class will keep control of a particular game control function given the events it can control...
Definition: gameControlProcessor.h:31
DtDe & myDe
Definition: axisConfigurationSelectionDialog.h:138
Factory constructor for this dialog.
Definition: axisConfigurationSelectionDialog.h:123
std::string myFunctionGroup
Definition: axisConfigurationSelectionDialog.h:106
The DtGameControlInformation class contains information about how a function within a function group ...
Definition: gameControlInformation.h:32
QPushButton * myCancelButton
Definition: axisConfigurationSelectionDialog.h:91
Base class to provide boost signal/slot management.
QGridLayout * mySliderLayout
Definition: axisConfigurationSelectionDialog.h:95
Definition: joystickManager.h:99
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:70
QLabel * myControllerLabel
Definition: axisConfigurationSelectionDialog.h:88
QLabel * myDescription
Definition: axisConfigurationSelectionDialog.h:102
DtGameControlInformation::GameControlEvents myUnsupportedEvents
Definition: axisConfigurationSelectionDialog.h:110
QPushButton * myOKButton
Definition: axisConfigurationSelectionDialog.h:90
std::vector< GameControlEvent > GameControlEvents
Definition: gameControlInformation.h:192
QLabel * myMinimumLabel
Definition: axisConfigurationSelectionDialog.h:96
std::string myFunction
Definition: axisConfigurationSelectionDialog.h:107

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)