VR-Forces 4.7 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::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 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)