VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtAggregateSettingsWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (c) 2025 MAK Technologies, Inc.
3  * All rights reserved.
4  ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvVrlQt/vrvVrlQt.h>
13 
14 #if !defined(Q_MOC_RUN)
16 #endif
17 
18 #include <QtWidgets/QSpinBox>
19 #include <QtGui/qvalidator.h>
20 
21 #include <map>
22 
23 class QGroupBox;
24 class QRadioButton;
25 class QCheckBox;
26 class QLabel;
27 class QSpinBox;
28 class QVBoxLayout;
29 class QSizePolicy;
30 class QTreeWidget;
31 class QTreeWidgetItem;
32 class QHBoxLayout;
33 class QFrame;
34 class QToolButton;
35 class QLineEdit;
36 
37 namespace makVrv
38 {
39  enum class DtColorizedModelColorType;
40 
42  {
43  Q_OBJECT
44 
45  public:
46  DtEchelonLevelSpinBox(QWidget* parent = nullptr) : QSpinBox(parent) {}
47 
48  protected:
49  virtual QString textFromValue(int value) const override
50  {
51  if (value == maximum())
52  {
53  return tr("All");
54  }
55  return QSpinBox::textFromValue(value);
56  }
57 
58  virtual int valueFromText(const QString& text) const override
59  {
60  if (text == tr("All"))
61  {
62  return maximum();
63  }
64  return QSpinBox::valueFromText(text);
65  }
66 
67  virtual QValidator::State validate(QString& input, int& pos) const override
68  {
69  if (input == tr("All"))
70  {
71  return QValidator::Acceptable;
72  }
73  return QSpinBox::validate(input, pos);
74  }
75  };
76 
78  {
79  Q_OBJECT
80 
81  public:
83 
84  virtual ~DtAutoCollapseAggregateSettingsWidget() override;
85 
86  void setupGui();
87 
88  virtual void updateRowStates(std::map<int, double> levels);
89  protected:
90  virtual void reorder();
91 
92  protected slots:
93  virtual void addRowFromButton();
94  virtual QTreeWidgetItem* addRow();
95  virtual void deleteRow();
96  virtual void changeMapScaleValue();
97  virtual void reset();
98  virtual void enabledChanged();
99 
100  public:
101  QHBoxLayout* mySeparatorLayout;
104  QVBoxLayout* myMainLayout;
108  QVBoxLayout* myContentsLayout;
109  QDoubleValidator myValidator;
110 
111  protected:
113 
115  {
116  QHBoxLayout* valueLayout;
117  QWidget* valueWidget;
120  int level = 0;
121  double value = 0.;
122  };
123 
124  using ItemWidgets = std::map<QTreeWidgetItem*, WidgetStruct>;
126  };
127 
131  : public QWidget, public DtAggregateSettingsInterface
132  { Q_OBJECT;
133  public:
134 
136  DtAggregateSettingsWidget( DtDe& de, QWidget* parent,
137  Qt::WindowFlags f = Qt::Widget );
138 
140  virtual ~DtAggregateSettingsWidget();
141 
142  public:
143 
147 
148  virtual void setGhostEchelonLevelItems( bool enabled ) override;
149  virtual void setGhostEchelonLevelItemLabels(bool enabled) override;
150  virtual void setEchelonLevel(int, int maxLevel = -1) override;
151  virtual void setDisplayBoundingBoxes( bool enabled ) override;
152  virtual void setDisplayAggregates( bool enabled ) override;
153  virtual void setDisplayLeafLevelItems( bool enabled ) override;
154  virtual void setDisplayBoundingBoxesForSelected( bool enabled ) override;
155  virtual void setAllowSelectingOfGhostedItems( bool enabled ) override;
156  virtual void setDisplayMainIcon( bool enabled ) override;
157  virtual void setColorizedModelColorType(
158  DtColorizedModelColorType type ) override;
159 
160  virtual void setAutoCollapseExpandEnabled(bool enabled) override;
161  virtual void resetAutoCollapseExpand() override;
162  virtual void setCollapseLevelsAboveMapScale(std::map<int, double> levels) override;
164 
168 
169  virtual int echelonLevel() const;
170  virtual bool displayAggregates() const;
171  virtual bool ghostEchelonLevelItems() const;
172  virtual bool ghostEchelonLevelItemLabels() const;
173  virtual bool displayBoundingBoxes() const;
174  virtual bool displayBoundingBoxesForSelected() const;
175  virtual bool displayMainIcon() const;
176  virtual bool displayLeafLevelItems() const;
177  virtual bool allowSelectingOfGhostedItems() const;
179  colorizedModelColorType() const;
181 
182  protected slots:
183 
187 
188  virtual void on_setDisplayAggregatesChanged();
189  virtual void on_setShowLeafNodesChanged();
190  virtual void on_displayBoundingBoxesForSelectedChanged();
191  virtual void on_displayBoundingBoxesChanged();
192  virtual void on_displayMainIconChanged();
193  virtual void on_ghostEchelonLevelItemsChanged();
194  virtual void on_ghostEchelonLevelItemLabelsChanged();
195  virtual void on_allowSelectionOfGhostedItemsChanged();
196  virtual void on_echelonLevelChanged();
197  virtual void on_colorizedModelColorTypeChanged();
198  public:
199  virtual void on_autoCollapseExpandEnabled(bool enabled);
200  virtual void on_resetAutoCollapseExpand();
201  virtual void on_collapseLevelsAboveMapScale(std::map<int, double> levels);
203 
204  protected:
205 
208  void setupGui();
209 
212  void connectToSignals();
213 
215  virtual void updateEnabledStates();
216 
217  public:
218 
222 
228 
229  QCheckBox* myShowMainIcon; // Valid for 3D only
230  QCheckBox* myShowLeafNodes; // Valid for 3D only
231 
234  QRadioButton* myIconColorsRadioButton;
235 
237  protected:
238 
240 
241  };
242 
243 }
DtAutoCollapseAggregateSettingsWidget(makVrv::DtDe &, QWidget *parent)
QLineEdit * valueEdit
Definition: DtAggregateSettingsWidget.h:118
QToolButton * deleteButton
Definition: DtAggregateSettingsWidget.h:119
double value
Definition: DtAggregateSettingsWidget.h:121
DtEchelonLevelSpinBox * myToEchelonLevel
Definition: DtAggregateSettingsWidget.h:226
Definition: DtAggregateSettingsWidget.h:114
QVBoxLayout * myMainLayout
Definition: DtAggregateSettingsWidget.h:104
QCheckBox * myShowBoundingVolumes
Definition: DtAggregateSettingsWidget.h:220
QCheckBox * myAllowSelectionOfGhosted
Definition: DtAggregateSettingsWidget.h:227
virtual QString textFromValue(int value) const override
Definition: DtAggregateSettingsWidget.h:49
Interface for the aggregate settings GUI.
Definition: DtAggregateSettingsInterface.h:25
QCheckBox * myGhostEchelonSettingsBox
Definition: DtAggregateSettingsWidget.h:223
QRadioButton * myPrimaryColorsRadioButton
Definition: DtAggregateSettingsWidget.h:233
#define DT_DLL_VRVVRLQT
Definition: vrvVrlQt.h:19
DtAutoCollapseAggregateSettingsWidget * myAutoCollapseWidget
Definition: DtAggregateSettingsWidget.h:236
DtColorizedModelColorType
Enumeration for the model coloring mode.
Definition: DtSharedEntityDisplaySettings.h:38
std::map< QTreeWidgetItem *, WidgetStruct > ItemWidgets
Definition: DtAggregateSettingsWidget.h:124
QDoubleValidator myValidator
Definition: DtAggregateSettingsWidget.h:109
Contains DLL export macros.
QCheckBox * myGhostEchelonLabelsSettingsBox
Definition: DtAggregateSettingsWidget.h:224
QTreeWidget * myCollapseLevelAtMapScale
Definition: DtAggregateSettingsWidget.h:107
Definition: DtAggregateSettingsWidget.h:41
makVrv::DtDe & myDe
Definition: DtAggregateSettingsWidget.h:112
ItemWidgets myItemWidgets
Definition: DtAggregateSettingsWidget.h:125
DtDe & myDe
Definition: DtAggregateSettingsWidget.h:239
virtual ~DtAutoCollapseAggregateSettingsWidget() override
QCheckBox * myShowAggregates
Definition: DtAggregateSettingsWidget.h:219
Definition: DtAggregateSettingsWidget.h:77
QVBoxLayout * myContentsLayout
Definition: DtAggregateSettingsWidget.h:108
QToolButton * myAdd
Definition: DtAggregateSettingsWidget.h:105
QCheckBox * myShowMainIcon
Definition: DtAggregateSettingsWidget.h:229
QFrame * myExpandCollapseSeparatorLine
Definition: DtAggregateSettingsWidget.h:103
Qt GUI to control the display of aggregate settings.
Definition: DtAggregateSettingsWidget.h:130
QHBoxLayout * valueLayout
Definition: DtAggregateSettingsWidget.h:116
QRadioButton * myIconColorsRadioButton
Definition: DtAggregateSettingsWidget.h:234
QCheckBox * myShowLeafNodes
Definition: DtAggregateSettingsWidget.h:230
virtual QValidator::State validate(QString &input, int &pos) const override
Definition: DtAggregateSettingsWidget.h:67
QCheckBox * myShowBoundingVolumesOnlyForSelected
Definition: DtAggregateSettingsWidget.h:221
virtual void updateRowStates(std::map< int, double > levels)
QCheckBox * myExpandCollapseLabel
Definition: DtAggregateSettingsWidget.h:102
virtual int valueFromText(const QString &text) const override
Definition: DtAggregateSettingsWidget.h:58
int level
Definition: DtAggregateSettingsWidget.h:120
QToolButton * myReset
Definition: DtAggregateSettingsWidget.h:106
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
QLabel * myToEchelonLabel
Definition: DtAggregateSettingsWidget.h:225
QHBoxLayout * mySeparatorLayout
Definition: DtAggregateSettingsWidget.h:101
QWidget * valueWidget
Definition: DtAggregateSettingsWidget.h:117
DtEchelonLevelSpinBox(QWidget *parent=nullptr)
Definition: DtAggregateSettingsWidget.h:46
QLabel * myForceColoringLabel
Definition: DtAggregateSettingsWidget.h:232

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)