VR-Forces 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), labelIdentifier(0) {};
38  ExtendedLabel(const ExtendedLabel& orig) : labelLabel(orig.labelLabel), label(orig.label),
39  needsToPassValidator(orig.needsToPassValidator), warningIcon(orig.warningIcon), labelIdentifier(orig.labelIdentifier) {};
40 
41  QLabel* labelLabel;
46  };
47 
48  DtExtendedLabelsEntryWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
49 
50  //DTOR
51  virtual ~DtExtendedLabelsEntryWidget() override;
52 
54  virtual void setLabel(const QString&);
55  virtual QString label() const;
56 
58  virtual void setExtendedLabels(const std::map<int, DtString>&);
59  virtual std::map<int, DtString> extendedLabels() const;
60 
61  virtual void setMinimumLabelWidth(int);
62 
66  virtual void manageObjectSpecificLabels(const std::vector<std::string>&, const std::map<std::string, std::string>&);
67 
70  virtual bool isValid() const;
71 
72  virtual void setFocusPolicy(Qt::FocusPolicy);
73 
75  protected slots:
76  virtual void onLabelChanged();
77  virtual void onExtendedLabelsTextChanged();
78 
79  signals:
80  void labelChanged();
81  void extendedLabelsChanged();
82  void objectSpecificLabelChanged(int text, QString marker, QString value);
83 
84  protected:
86  void setupGui();
87 
88  virtual void onExtendedLabelsChanged();
89 
92  virtual void createdExtendedLabel(int index, ExtendedLabel& label);
93 
94  virtual ExtendedLabel createLabel(int index, const std::string& labelName);
95 
96  public:
98  QWidget* myInsideWidget;
99  QGridLayout* myLayout;
101 
103  typedef std::map<int, ExtendedLabel> ExtendedLabels;
105 
106  typedef std::vector<ExtendedLabel> ObjectSpecificLabels;
108 
109  protected:
113  };
114 
116  {
117  public:
119  virtual ~DtExtendedLabelsEntryWidgetCreator() override;
120 
122  static void registerInstance(makVrv::DtDe&, DtExtendedLabelsEntryWidgetCreator*);
123 
124  virtual DtExtendedLabelsEntryWidget* create(QWidget*);
125 
126  protected:
128  };
129 
132  {
133  public:
135 
138  static void registerInstance(makVrv::DtDe& de, DtExtendedLabelsEntryWidgetSignaler* signaler);
139 
142  boost::signals2::signal<void (int, DtExtendedLabelsEntryWidget::ExtendedLabel&)> signal_extendedLabelCreated;
143  };
144 }
ExtendedLabels myExtendedLabels
Definition: extendedLabelsEntryWidget.h:104
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:127
bool needsToPassValidator
Definition: extendedLabelsEntryWidget.h:44
makVrv::DtSignalConnectionManager myConnectionManager
Definition: extendedLabelsEntryWidget.h:111
std::vector< ExtendedLabel > ObjectSpecificLabels
Definition: extendedLabelsEntryWidget.h:106
ExtendedLabel(const ExtendedLabel &orig)
Definition: extendedLabelsEntryWidget.h:38
makVrv::DtDe & myDe
Definition: extendedLabelsEntryWidget.h:110
QWidget * myInsideWidget
Definition: extendedLabelsEntryWidget.h:98
ObjectSpecificLabels myObjectSpecificLabels
Definition: extendedLabelsEntryWidget.h:107
Contains makVrv::DtVirtualBaseClass class.
std::map< int, ExtendedLabel > ExtendedLabels
Special extended labels will start at integer 10000.
Definition: extendedLabelsEntryWidget.h:103
QGridLayout * myLayout
Definition: extendedLabelsEntryWidget.h:99
ExtendedLabel()
Definition: extendedLabelsEntryWidget.h:37
int myMinLabelWidth
Definition: extendedLabelsEntryWidget.h:112
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
#define DT_DLL_VRFGUIDATAENTRYWIDGETS
Definition: vrfGuiDataEntryWidgets.h:22
Definition: extendedLabelsEntryWidget.h:115
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:142
QScrollArea * myScrollView
Definition: extendedLabelsEntryWidget.h:97
int labelIdentifier
Definition: extendedLabelsEntryWidget.h:45
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:76
Definition: extendedLabelsEntryWidget.h:35
Signaler use to signal the creation of an extended label.
Definition: extendedLabelsEntryWidget.h:131
QLineEdit * label
Definition: extendedLabelsEntryWidget.h:43
QLabel * warningIcon
Definition: extendedLabelsEntryWidget.h:42
ExtendedLabel myCommonLabel
Definition: extendedLabelsEntryWidget.h:100

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)