VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
localWeatherManagerWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
8 #if !defined(Q_MOC_RUN)
9 
12 #include "DtLocalWeatherManagerWidgetUI.hpp"
15 #include <vrvCore/DtStateView.h>
19 #endif
20 
21 #include <QtWidgets/QDialog>
22 
23 class QTreeWidget;
24 class QTreeWidgetItem;
25 class QSpinBox;
26 
27 namespace makVrf
28 {
33  {
34  Q_OBJECT
35 
36  public:
37  //CTOR
38  DtLocalWeatherManagerWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
39 
40  //DTOR
41  virtual ~DtLocalWeatherManagerWidget();
42 
44  virtual void setDefaultWeatherTypeToCreate(const DtEntityType&);
45  const DtEntityType& defaultWeatherTypeToCreate() const { return myDefaultWeatherTypeToCreate; };
46 
47  protected:
49  void setupGui();
50  void initConnections();
51 
53  virtual makVrv::DtElementID idFromItem(QTreeWidgetItem*) const;
54 
55  virtual void selectionChanged(const makVrv::DtSelectionManager::IdSet& selected, const makVrv::DtSelectionManager::IdSet& deselected);
56 
57  virtual void editingOrCreateChanged();
58 
59  protected:
62  virtual void slot_weatherUpdated(const makVrv::DtStateView<DtVrlinkSimulatedWeatherState>* state);
63 
65  virtual void slot_removed(makVrv::DtElementID);
66 
67  virtual makVrv::DtUniqueID idWithPriority(int p) const;
68 
69  virtual void slot_applicationSettingsChanged();
70  virtual void updateWeatherConditionsIcon();
71 
72  protected slots:
74  virtual void itemClicked(QTreeWidgetItem*);
75 
77  virtual void itemDoubleClicked(QTreeWidgetItem*);
78 
80  virtual void createLocalWeather();
81 
83  virtual void deleteLocalWeather();
84 
86  virtual void editLocalWeather();
87  virtual void editLocalWeatherConditions();
88 
90  virtual void updateButtons(QTreeWidgetItem*);
91 
92  virtual void setPriorityFor(makVrv::DtUniqueID, int priority);
93 
94  virtual void increasePriority();
95  virtual void decreasePriority();
96 
97  protected:
101 
103  {
106  };
107 
108  typedef std::map<makVrv::DtElementID, WeatherState> LocalWeatherItemsMap;
111 
112  public:
113  Ui_DtLocalWeatherManagerWidgetUI myUiImpl;
114  };
115 
118  {
119  public:
122 
124  static void registerInstance(makVrv::DtDe&, DtLocalWeatherManagerWidgetCreator*);
125 
126  virtual DtLocalWeatherManagerWidget* create(makVrv::DtDe&, QWidget* parent, const Qt::WindowFlags& f = 0);
127 
128  protected:
131  };
132 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
Creator class. Register a subclass of this to return your own version of the DtLocalWeatherManagerWid...
Definition: localWeatherManagerWidget.h:117
#define DT_DLL_VRFGUICOREQT
Definition: vrfGuiCoreQt.h:26
const DtEntityType & defaultWeatherTypeToCreate() const
Definition: localWeatherManagerWidget.h:45
Contains makVrv:DtSelectionManager class.
Contains makVrv::DtStateView class.
DtEntityType myDefaultWeatherTypeToCreate
Definition: localWeatherManagerWidget.h:110
Ui_DtLocalWeatherManagerWidgetUI myUiImpl
Definition: localWeatherManagerWidget.h:113
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:23
Definition: localWeatherManagerWidget.h:102
DtLocalWeatherManagerWidget.
Definition: localWeatherManagerWidget.h:32
std::map< makVrv::DtElementID, WeatherState > LocalWeatherItemsMap
Definition: localWeatherManagerWidget.h:108
Contains makVrv::DtVirtualBaseClass class.
QTreeWidgetItem * item
Definition: localWeatherManagerWidget.h:104
The declaration of the makArchives::DtEnvironmentRecord class.
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
Record of environment/weather settings Includes precipitation, air, and clouds.
Definition: DtEnvironmentRecord.h:36
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
Base class to provide boost signal/slot management.
makVrv::DtDe & myDe
Definition: localWeatherManagerWidget.h:98
DtLocalWeatherManagerWidget * myDialog
Only create once.
Definition: localWeatherManagerWidget.h:130
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:72
makVrv::DtSignalConnectionManager myConnectionManager
Definition: localWeatherManagerWidget.h:99
std::set< DtUniqueID > IdSet
Definition: DtSelectionManager.h:32
LocalWeatherItemsMap myLocalWeather
Definition: localWeatherManagerWidget.h:109
makArchives::DtEnvironmentRecord weatherRecord
Definition: localWeatherManagerWidget.h:105
bool myInCreationMode
Definition: localWeatherManagerWidget.h:100

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)