VR-Forces 4.10 Class Documentation
 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 
11 #include <vrvUtil/signalslib.h>
12 
17 #include <vlutil/vlString.h>
19 
20 #include <QtWidgets/QWidget>
21 #include <QtWidgets/QDialog>
22 
23 class QLabel;
24 class QPushButton;
25 class QSlider;
26 class QCheckBox;
27 class QGridLayout;
28 class QRadioButton;
29 class QComboBox;
30 class QHBoxLayout;
31 
37 
38 namespace makVrv
39 {
40  class DtGameControlInformation;
41  class DtGameControlProcessor;
42  class DtDe;
43 
45  {
46  Q_OBJECT
47 
48  public:
49 
51  DtAxisConfigurationSelectionDialog(DtDe&, QWidget* parent = NULL, const Qt::WindowFlags& flags = Qt::Tool );
52 
55 
56  virtual void setEditing(const std::string& fg, const std::string& function);
57  virtual void setDescription(const std::string& description);
58 
59  virtual void setupFromControlInformation(const DtGameControlInformation&);
60 
61  boost::signals2::signal<void (DtGameControlInformation*)> signal_accept;
62 
63  virtual DtGameControlInformation gameControlInformation() const;
64 
65  protected:
66  virtual void accept();
67  virtual void reject();
68  virtual void closeEvent(QCloseEvent*);
69 
70  virtual void controllerAdded(const DtJoystickManager::ControllerInformation& i);
71  virtual void controllerRemoved(int deviceIndex);
72 
74  virtual bool gameControllerEvent(DtGenericControllerEvent*);
75 
77  virtual bool filterGameControllerEvent(DtGenericControllerEvent*);
78 
79  virtual void setupFromEvent(DtGenericControllerEvent*);
80 
82  virtual QString translateString(const std::string& str) const;
83 
84  protected slots:
85  virtual void gameControllerSelected();
86  virtual void onAxisChanged();
87  virtual void onDetectTypeChanged();
88 
89  public:
94  QHBoxLayout* myBottomButtonLayout;
96  QSlider* mySlider;
97  QGridLayout* mySliderLayout;
100  QRadioButton* myDetect;
102  QRadioButton* mySelect;
105 
106  protected:
108  std::string myFunctionGroup;
109  std::string myFunction;
111 
114 
116 
118 
119  typedef std::map<int, std::map<int, int> > LastJoystickAxisValue;
121  };
122 
124 
126  {
127  public:
130 
133 
135  static void registerInstance(DtDe& de, DtAxisConfigurationSelectionDialogCreator* instance);
136 
137  virtual DtAxisConfigurationSelectionDialog* create(QWidget*);
138 
139  protected:
141  };
142 }
DtGameControlProcessor * myGameControlProcessor
Definition: axisConfigurationSelectionDialog.h:115
Virtual base class.
Definition: DtVirtualBaseClass.h:19
QSlider * mySlider
Definition: axisConfigurationSelectionDialog.h:96
QCheckBox * myReverse
Definition: axisConfigurationSelectionDialog.h:95
Handler that you insert into the manager to be made aware of game controller events.
Definition: joystickManager.h:42
LastJoystickAxisValue myLastJoystickAxisValue
Definition: axisConfigurationSelectionDialog.h:120
std::map< int, std::map< int, int > > LastJoystickAxisValue
Definition: axisConfigurationSelectionDialog.h:119
QComboBox * myControllers
Definition: axisConfigurationSelectionDialog.h:91
boost::signals2::signal< void(DtGameControlInformation *)> signal_accept
Definition: axisConfigurationSelectionDialog.h:61
bool mySignaled
Definition: axisConfigurationSelectionDialog.h:110
QLabel * myMaximumLabel
Definition: axisConfigurationSelectionDialog.h:99
DtSignalConnectionManager myConnections
Definition: axisConfigurationSelectionDialog.h:117
Definition: gameControllerEvents.h:33
QLabel * myControlLabel
Definition: axisConfigurationSelectionDialog.h:101
#define DT_DLL_JOYSTICKCOREQT
Contains DLL export macros.
Definition: joystickCoreQt.h:25
QRadioButton * myDetect
Definition: axisConfigurationSelectionDialog.h:100
Contains makVrv::DtVirtualBaseClass class.
DtGameControlInformation::GameControlEvent myAxisEvent
Definition: axisConfigurationSelectionDialog.h:113
QHBoxLayout * myBottomButtonLayout
Definition: axisConfigurationSelectionDialog.h:94
Definition: axisConfigurationSelectionDialog.h:44
QRadioButton * mySelect
Definition: axisConfigurationSelectionDialog.h:102
Definition: gameControlInformation.h:46
QComboBox * myAxisList
Definition: axisConfigurationSelectionDialog.h:103
DtDe & myDe
Definition: axisConfigurationSelectionDialog.h:107
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:140
Factory constructor for this dialog.
Definition: axisConfigurationSelectionDialog.h:125
std::string myFunctionGroup
Definition: axisConfigurationSelectionDialog.h:108
The DtGameControlInformation class contains information about how a function within a function group ...
Definition: gameControlInformation.h:32
QPushButton * myCancelButton
Definition: axisConfigurationSelectionDialog.h:93
Base class to provide boost signal/slot management.
QGridLayout * mySliderLayout
Definition: axisConfigurationSelectionDialog.h:97
Definition: joystickManager.h:99
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
QLabel * myControllerLabel
Definition: axisConfigurationSelectionDialog.h:90
QLabel * myDescription
Definition: axisConfigurationSelectionDialog.h:104
DtGameControlInformation::GameControlEvents myUnsupportedEvents
Definition: axisConfigurationSelectionDialog.h:112
QPushButton * myOKButton
Definition: axisConfigurationSelectionDialog.h:92
std::vector< GameControlEvent > GameControlEvents
Definition: gameControlInformation.h:192
QLabel * myMinimumLabel
Definition: axisConfigurationSelectionDialog.h:98
std::string myFunction
Definition: axisConfigurationSelectionDialog.h:109

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)