VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
informationSectionedDialog.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 #include <boost/signals2.hpp>
14 
15 class QDialogButtonBox;
16 class QScrollArea;
17 class QVBoxLayout;
18 class QGridLayout;
19 class QHBoxLayout;
20 class QFrame;
21 class QPushButton;
22 class QToolButton;
23 class QLabel;
24 class QCloseEvent;
25 
26 namespace makVrf
27 {
28  namespace makVrfGuiObjectInformationQt
29  {
30  class DtInformationDialogHandler;
31  class DtInformationDialogSectionLine;
32  class DtInformationDialogWidgetSection;
33  class DtInformationDialogPageSection;
34 
36  {
37  Q_OBJECT
38 
39  public:
40  enum TabType
41  {
44  TabSmall
45  };
46 
48  DtInformationSectionedDialog(makVrv::DtDe& de,const std::string& pageName,QWidget* parent);
49 
52 
54  virtual void removeSection(DtInformationSectionDisplayHandler*);
55 
57  virtual void addSection(DtInformationDialogWidgetSection*, const QString& title = "", bool collapsible = true,
58  bool collapsed = false, bool maximumHeightIsMinimumHeight = false);
59 
61  virtual void addSection(DtInformationDialogPageSection*, const QString& title = "", bool collapsible = true,
62  bool collapsed = false);
63 
65  virtual DtInformationDialogHandler* detachSection(int);
66 
69  virtual DtInformationDialogHandler* addSection(const std::string& name, bool collapsible, TabType tabbed,
70  bool collapsed = false, const QString& title = "", bool maximumHeightIsMinimumHeight = false);
71 
72  virtual void deactivate();
73  virtual void activate(makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* state);
74  virtual void setupWindowTitle(makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* state);
75  virtual bool stateViewRemoved(const makVrv::DtUniqueID&);
76  virtual void slot_onStateViewUpdated();
77 
79  virtual void setSectionSeparatorHidden(int i, bool b);
80  virtual bool sectionSeparatorHidden(int i) const;
81 
83  virtual void setSectionHidden(int i, bool b);
84  virtual bool sectionHidden(int i) const;
85 
86  virtual void showEvent(QShowEvent *);
87 
88  virtual void close()
89  {
90  QDialog::close();
91  }
92 
93  virtual void raise()
94  {
95  QDialog::raise();
96  }
97 
98  virtual void show()
99  {
100  QDialog::show();
101  }
102 
103  virtual void hide()
104  {
105  QDialog::hide();
106  }
107 
108  virtual void setParent(QWidget* p)
109  {
110  QDialog::setParent(p);
111  }
112 
113  virtual void setMinimumHeight(int i)
114  {
115  QDialog::setMinimumHeight(i);
116  }
117 
118  virtual void setMinimumWidth(int i)
119  {
120  QDialog::setMinimumWidth(i);
121  }
122 
123  virtual void setMaximumHeight(int i)
124  {
125  QDialog::setMaximumHeight(i);
126  }
127 
128  virtual void setMaximumWidth(int i)
129  {
130  QDialog::setMaximumWidth(i);
131  }
132 
133  virtual void setMaximumSize(const QSize& size)
134  {
135  QDialog::setMaximumSize(size);
136  }
137 
138  virtual QRect geometry() const
139  {
140  return QDialog::geometry();
141  }
142 
143  virtual void setMinimumSize(const QSize& size)
144  {
145  QDialog::setMinimumSize(size);
146  }
147 
148  virtual QSize minimumSizeHint() const
149  {
150  return QDialog::minimumSizeHint();
151  }
152 
155  virtual bool showInformationPage(std::string, DtInformationSectionDisplayHandler*);
156  virtual bool expandSection(std::string, bool b, DtInformationSectionDisplayHandler*);
157 
159  virtual void expandCollapseSection(std::string);
160 
161  virtual void selectPage(const std::string&, DtInformationSectionDisplayHandler* s = 0);
162 
163  boost::signals2::signal<void (makVrv::DtUniqueID, const std::string&)> signal_showInformationFor;
164 
165  protected:
166  virtual void sectionTitleSet(const QString&, DtInformationDialogHandler*);
167  virtual void sectionCollapsed(bool, DtInformationDialogSectionLine*);
168 
169  virtual void addPage(makVrv::DtPage*, const makVrv::DtPagePath&) {};
172  virtual void closeEvent(QCloseEvent* e);
173 
174  virtual void resizeDialog(int currentWidth = 0, int currentHeight = 0);
175  virtual void updateShowState(const std::string&, bool);
176 
177  public:
178  QScrollArea* myScrollArea;
179  QWidget* myScrollWidget;
180  QVBoxLayout* myScrollLayout;
181  QDialogButtonBox* myCloseButton;
182  QHBoxLayout* myBottomLayout;
183 
184  protected:
185  struct Section
186  {
187  Section() : canvas(0), page(0), section(0), sectionHidden(false), sectionLineHidden(false), rowStart(0), rowEnd(0) {};
188  Section(const Section& orig)
189  : canvas(orig.canvas), page(orig.page), section(orig.section), sectionName(orig.sectionName),
190  sectionHidden(orig.sectionHidden), sectionLineHidden(orig.sectionLineHidden), minimumSizeHint(orig.minimumSizeHint),
191  rowStart(orig.rowStart), rowEnd(orig.rowEnd) {};
192 
193  QWidget* canvas;
196  std::string sectionName;
200  int rowStart, rowEnd;
201  };
202 
203  typedef std::vector<Section> Sections;
205 
207  std::string myName;
208  };
209 
212  {
213  public:
215  DtInformationSummarySectionedDialog(makVrv::DtDe& de,const std::string& pageName,QWidget* parent);
216 
219 
221  virtual void addSection(DtInformationDialogWidgetSection*, const QString& title = "", bool collapsible = true,
222  bool collapsed = false, bool maximumHeightIsMinimumHeight = false);
223 
225  virtual void addSection(DtInformationDialogPageSection*, const QString& title = "", bool collapsible = true,
226  bool collapsed = false);
227 
229  virtual void removeSection(DtInformationSectionDisplayHandler*);
230 
231  virtual void resizeDialog(int currentWidth = 0, int currentHeight = 0);
232 
233  protected:
234  virtual void closeButtonPressed(DtInformationDialogSectionLine*);
235 
236  public:
237  QWidget* myCanvas;
238  QGridLayout* myGridLayout;
239  };
240 
242  {
243  Q_OBJECT
244 
245  public:
248 
251 
252  virtual void setCollapsed(bool);
253  virtual bool collapsed() const;
254 
255  virtual void setCollapsible(bool);
256  virtual bool collapsible() const;
257 
258  virtual void setTitle(const QString&);
259 
260  virtual void hideSectionLine(bool b);
261  virtual void setShowCloseButton(bool b);
262 
263  boost::signals2::signal<void (bool)> signal_sectionCollapsed;
264  boost::signals2::signal<void (DtInformationDialogSectionLine*)> signal_closeButtonPressed;
265 
266  protected slots:
267  virtual void expandButtonPressed();
268  virtual void closeButtonPressed();
269 
270  protected:
271  virtual bool eventFilter(QObject*, QEvent*);
272 
273  public:
275  QFrame* myLine;
278 
279  protected:
282  };
283  }
284 }
QVBoxLayout * myScrollLayout
Definition: informationSectionedDialog.h:180
virtual void setMinimumHeight(int i)
Definition: informationSectionedDialog.h:113
boost::signals2::signal< void(bool)> signal_sectionCollapsed
Definition: informationSectionedDialog.h:263
QSize minimumSizeHint
Definition: informationSectionedDialog.h:199
voidpf void uLong size
Definition: ioapi.h:39
makVrv::DtDe & myDe
Definition: informationSectionedDialog.h:280
QDialogButtonBox * myCloseButton
Definition: informationSectionedDialog.h:181
bool sectionHidden
Definition: informationSectionedDialog.h:197
Dialog page without the buttons.
Definition: informationDialog.h:163
virtual void setMaximumSize(const QSize &size)
Definition: informationSectionedDialog.h:133
virtual void hide()
Definition: informationSectionedDialog.h:103
QToolButton * myCloseButton
Definition: informationSectionedDialog.h:277
boost::signals2::signal< void(makVrv::DtUniqueID, const std::string &)> signal_showInformationFor
Definition: informationSectionedDialog.h:163
Summary section dialogs only allow the addition of widget sections and will add them to one big maste...
Definition: informationSectionedDialog.h:211
virtual void setParent(QWidget *p)
Definition: informationSectionedDialog.h:108
QToolButton * myExpanded
Definition: informationSectionedDialog.h:276
Sections that are added in an information dialog section dialog need to be subclasses of this...
Definition: informationDialogHandler.h:109
QFrame * myLine
Definition: informationSectionedDialog.h:275
std::string sectionName
Definition: informationSectionedDialog.h:196
virtual void setMaximumHeight(int i)
Definition: informationSectionedDialog.h:123
makVrv::DtDe & myDe
Definition: informationSectionedDialog.h:206
boost::signals2::signal< void(DtInformationDialogSectionLine *)> signal_closeButtonPressed
Definition: informationSectionedDialog.h:264
The page is a single widget component which is viewed in a page collection.
Definition: DtPage.h:30
virtual void addConditionalPage(makVrv::DtPage *, const makVrv::DtPagePath &, const makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *state)
Adds a page that is not added to the toolbar, but would be added at the given index if if can be show...
Definition: informationSectionedDialog.h:170
bool sectionLineHidden
Definition: informationSectionedDialog.h:198
bool myIsCollapsible
Definition: informationSectionedDialog.h:281
!!!!!
Definition: informationDialogHandler.h:147
Sections mySections
Definition: informationSectionedDialog.h:204
A page path is the location of a page based upon its parents. A page path usually only consists of a ...
Definition: DtPagePath.h:21
virtual QSize minimumSizeHint() const
Definition: informationSectionedDialog.h:148
QWidget * myScrollWidget
Definition: informationSectionedDialog.h:179
std::vector< Section > Sections
Definition: informationSectionedDialog.h:203
virtual void close()
Definition: informationSectionedDialog.h:88
virtual void setMinimumWidth(int i)
Definition: informationSectionedDialog.h:118
#define DT_DLL_VRFGUIOBJECTINFORMATIONQT
Contains DLL export macros.
Definition: vrfGuiObjectInformationQt.h:24
Definition: informationDialogWidgetSection.h:52
TabType
Definition: informationSectionedDialog.h:40
virtual void show()
Definition: informationSectionedDialog.h:98
virtual void setMinimumSize(const QSize &size)
Definition: informationSectionedDialog.h:143
DtInformationDialogHandler * page
Definition: informationSectionedDialog.h:194
virtual void addPage(makVrv::DtPage *, const makVrv::DtPagePath &)
Definition: informationSectionedDialog.h:169
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:70
QGridLayout * myGridLayout
Definition: informationSectionedDialog.h:238
virtual void setMaximumWidth(int i)
Definition: informationSectionedDialog.h:128
DtInformationDialogSectionLine * section
Definition: informationSectionedDialog.h:195
virtual QRect geometry() const
Definition: informationSectionedDialog.h:138
QLabel * myLabel
Definition: informationSectionedDialog.h:274
QScrollArea * myScrollArea
Definition: informationSectionedDialog.h:178
QHBoxLayout * myBottomLayout
Definition: informationSectionedDialog.h:182
Contains makVrv::DtInformationDialog class.
Section(const Section &orig)
Definition: informationSectionedDialog.h:188
std::string myName
Definition: informationSectionedDialog.h:207
QWidget * myCanvas
Definition: informationSectionedDialog.h:237

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)