VR-Forces 4.10 Class Documentation
 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  QPixmap myWarningIcon;
98  };
99 
101  {
102  public:
105 
107  static void registerInstance(makVrv::DtDe&, DtExtendedLabelsEntryWidgetCreator*);
108 
109  virtual DtExtendedLabelsEntryWidget* create(QWidget*);
110 
111  protected:
113  };
114 
117  {
118  public:
120 
123  static void registerInstance(makVrv::DtDe& de, DtExtendedLabelsEntryWidgetSignaler* signaler);
124 
127  boost::signals2::signal<void (int, DtExtendedLabelsEntryWidget::ExtendedLabel&)> signal_extendedLabelCreated;
128  };
129 }
ExtendedLabels myExtendedLabels
Definition: extendedLabelsEntryWidget.h:91
QPixmap myWarningIcon
Definition: extendedLabelsEntryWidget.h:97
Virtual base class.
Definition: DtVirtualBaseClass.h:19
makVrv::DtDe & myDe
Definition: extendedLabelsEntryWidget.h:112
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:23
Definition: extendedLabelsEntryWidget.h:100
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.
Definition: extendedLabelsEntryWidget.h:127
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.
Definition: DtDe.h:69
Definition: extendedLabelsEntryWidget.h:35
Signaler use to signal the creation of an extended label.
Definition: extendedLabelsEntryWidget.h:116
QLineEdit * label
Definition: extendedLabelsEntryWidget.h:43
QLabel * warningIcon
Definition: extendedLabelsEntryWidget.h:42
ExtendedLabel myCommonLabel
Definition: extendedLabelsEntryWidget.h:88

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)