VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtWindDirectionWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2021 MAK Technologies, Inc.
3  * All rights reserved.
4  ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCoreQt/vrvCoreQt.h>
13 
14 #include <QtCore/QList>
15 #include <QtCore/QString>
16 #include <QtCore/QStringList>
17 
18 #include <QtWidgets/QWidget>
19 #include <QtWidgets/QSpinBox>
20 
22 
23 class QComboBox;
24 class QEvent;
25 class QHBoxLayout;
26 class QHideEvent;
27 class QShowEvent;
28 
29 namespace makVrv
30 {
31 
32  class DtWindDirectionDialWidget;
33  class DtThreeDigitSpinBox;
34 
41  class DT_DLL_VRVCOREQT DtWindDirectionWidget : public QWidget
42  {
43  Q_OBJECT
44 
46 
47  public:
52  DtDe& de,
53  QWidget* parent = NULL,
54  Qt::WindowFlags flags = Qt::Widget);
55 
57  virtual ~DtWindDirectionWidget();
58 
62 
65  int direction() const;
66 
69  double directionF() const;
70 
72 
76 
79  QHBoxLayout* mainLayout();
80 
83  DtWindDirectionDialWidget* compassDialWidget();
84 
88  QSpinBox* spinBoxWidget();
89 
91 
92  signals:
94  void directionChanged(int);
95 
97  void directionChanged(double);
98 
99  public slots:
103  void setDirection(int degrees);
104 
108  void setDirection(double degrees);
109 
110  protected slots:
114 
115  virtual void onDialDirectionChanged(double value);
116  virtual void onHeadingSpinboxChanged(int value);
117 
119 
120  protected:
121 
125 
128  virtual void changeEvent(QEvent* evt);
129 
133  virtual void showEvent(QShowEvent* evt);
134  virtual void hideEvent(QHideEvent* evt);
136 
138 
139  private:
142  void setupGui();
143 
146  void connectToSignals();
147 
148  protected:
150 
151  QHBoxLayout* myLayout;
154  };
155 
159  : public DtVirtualBaseClass
160  {
161  public:
162  static DtWindDirectionWidgetCreator& instance(DtDe& de);
163  static void registerInstance(DtDe& de, DtWindDirectionWidgetCreator* creator);
164  virtual DtWindDirectionWidget* create(DtDe& de, QWidget* parent) const;
165  };
166 
167 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
Creator for the DtWindDirectionWidget.
Definition: DtWindDirectionWidget.h:158
QHBoxLayout * myLayout
Definition: DtWindDirectionWidget.h:151
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
Contains DLL export macros.
A widget for pairing a wind direction dial with a double spin box.
Definition: DtWindDirectionWidget.h:41
Contains makVrv::DtVirtualBaseClass class.
DtThreeDigitSpinBox * mySpinBox
Definition: DtWindDirectionWidget.h:153
DtDe & myDe
Definition: DtWindDirectionWidget.h:149
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
DtWindDirectionDialWidget * myDial
Definition: DtWindDirectionWidget.h:152
A compass rose with a wind-direction arrow.
Definition: DtWindDirectionDialWidget.h:27
A Spin Box widget that left-pads its integer value with zeros to ensure the value is displayed with a...
Definition: DtThreeDigitSpinBox.h:25

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)