VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
extendedLabelsEntryWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
16 #include <vlutil/vlString.h>
17 #include <map>
18 #include <QWidget>
19 #include <QPixmap>
20 #include <boost/signals2.hpp>
21 
22 class QLabel;
23 class QLineEdit;
24 class QGridLayout;
25 class QScrollArea;
26 
27 namespace makVrf
28 {
31  {
32  Q_OBJECT
33 
34  public:
36  {
37  ExtendedLabel() : labelLabel(0), label(0), warningIcon(0), needsToPassValidator(false) {};
38  ExtendedLabel(const ExtendedLabel& orig) : labelLabel(orig.labelLabel), label(orig.label),
39  needsToPassValidator(orig.needsToPassValidator), warningIcon(orig.warningIcon) {};
40 
41  QLabel* labelLabel;
45  };
46 
47  DtExtendedLabelsEntryWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
48 
49  //DTOR
50  virtual ~DtExtendedLabelsEntryWidget();
51 
53  virtual void setLabel(const QString&);
54  virtual QString label() const;
55 
57  virtual void setExtendedLabels(const std::map<int, DtString>&);
58  virtual std::map<int, DtString> extendedLabels() const;
59 
60  virtual void setMinimumLabelWidth(int);
61 
64  virtual bool isValid() const;
65 
66  protected slots:
67  virtual void onLabelChanged();
68  virtual void onExtendedLabelsTextChanged();
69 
70  signals:
71  void labelChanged();
72  void extendedLabelsChanged();
73 
74  protected:
76  void setupGui();
77 
78  virtual void onExtendedLabelsChanged();
79 
82  virtual void createdExtendedLabel(int index, ExtendedLabel& label);
83 
84  public:
85  QScrollArea* myScrollView;
86  QWidget* myInsideWidget;
87  QGridLayout* myLayout;
89 
90  typedef std::map<int, ExtendedLabel> ExtendedLabels;
92 
93  protected:
97  };
98 
100  {
101  public:
104 
106  static void registerInstance(makVrv::DtDe&, DtExtendedLabelsEntryWidgetCreator*);
107 
108  virtual DtExtendedLabelsEntryWidget* create(QWidget*);
109 
110  protected:
112  };
113 
116  {
117  public:
119 
122  static void registerInstance(makVrv::DtDe& de, DtExtendedLabelsEntryWidgetSignaler* signaler);
123 
126  boost::signals2::signal<void (int, DtExtendedLabelsEntryWidget::ExtendedLabel&)> signal_extendedLabelCreated;
127  };
128 }
ExtendedLabels myExtendedLabels
Definition: extendedLabelsEntryWidget.h:91
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
makVrv::DtDe & myDe
Definition: extendedLabelsEntryWidget.h:111
bool needsToPassValidator
Definition: extendedLabelsEntryWidget.h:44
makVrv::DtSignalConnectionManager myConnectionManager
Definition: extendedLabelsEntryWidget.h:95
ExtendedLabel(const ExtendedLabel &orig)
Definition: extendedLabelsEntryWidget.h:38
makVrv::DtDe & myDe
Definition: extendedLabelsEntryWidget.h:94
QWidget * myInsideWidget
Definition: extendedLabelsEntryWidget.h:86
Contains makVrv::DtVirtualBaseClass class.
std::map< int, ExtendedLabel > ExtendedLabels
Definition: extendedLabelsEntryWidget.h:90
QGridLayout * myLayout
Definition: extendedLabelsEntryWidget.h:87
ExtendedLabel()
Definition: extendedLabelsEntryWidget.h:37
int myMinLabelWidth
Definition: extendedLabelsEntryWidget.h:96
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
#define DT_DLL_VRFGUIDATAENTRYWIDGETS
Definition: vrfGuiDataEntryWidgets.h:22
Definition: extendedLabelsEntryWidget.h:99
Base class to provide boost signal/slot management.
boost::signals2::signal< void(int, DtExtendedLabelsEntryWidget::ExtendedLabel &)> signal_extendedLabelCreated
Signal sent when an extended label is created. If the int (index) is -1 this is the creation of the d...
Definition: extendedLabelsEntryWidget.h:126
QScrollArea * myScrollView
Definition: extendedLabelsEntryWidget.h:85
Widget that will allow for entry of label and any extended labels.
Definition: extendedLabelsEntryWidget.h:30
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
Definition: extendedLabelsEntryWidget.h:35
Signaler use to signal the creation of an extended label.
Definition: extendedLabelsEntryWidget.h:115
QLineEdit * label
Definition: extendedLabelsEntryWidget.h:43
QLabel * warningIcon
Definition: extendedLabelsEntryWidget.h:42
ExtendedLabel myCommonLabel
Definition: extendedLabelsEntryWidget.h:88

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)