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:
53  DtDe& de,
54  QWidget* parent = NULL,
55  Qt::WindowFlags flags = Qt::Widget);
56 
58  virtual ~DtWindDirectionWidget();
59 
63 
66  int direction() const;
67 
70  double directionF() const;
71 
73 
77 
80  QHBoxLayout* mainLayout();
81 
84  DtWindDirectionDialWidget* compassDialWidget();
85 
89  QSpinBox* spinBoxWidget();
90 
92 
93  signals:
95  void directionChanged(int);
96 
98  void directionChanged(double);
99 
100  public slots:
104  void setDirection(int degrees);
105 
109  void setDirection(double degrees);
110 
111  protected slots:
115 
116  virtual void onDialDirectionChanged(double value);
117  virtual void onHeadingSpinboxChanged(int value);
118 
120 
121  protected:
122 
126 
129  virtual void changeEvent(QEvent* evt);
130 
134  virtual void showEvent(QShowEvent* evt);
135  virtual void hideEvent(QHideEvent* evt);
137 
139 
140  private:
143  void setupGui();
144 
147  void connectToSignals();
148 
149  protected:
151 
152  QHBoxLayout* myLayout;
155  };
156 
160  : public DtVirtualBaseClass
161  {
162  public:
163  static DtWindDirectionWidgetCreator& instance(DtDe& de);
164  static void registerInstance(DtDe& de, DtWindDirectionWidgetCreator* creator);
165  virtual DtWindDirectionWidget* create(DtDe& de, QWidget* parent) const;
166  };
167 
168 }
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:159
QHBoxLayout * myLayout
Definition: DtWindDirectionWidget.h:152
#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:154
DtDe & myDe
Definition: DtWindDirectionWidget.h:150
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:153
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 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)