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();
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 
73  protected slots:
74  virtual void onLabelChanged();
75  virtual void onExtendedLabelsTextChanged();
76 
77  signals:
78  void labelChanged();
79  void extendedLabelsChanged();
80  void objectSpecificLabelChanged(int text, QString marker, QString value);
81 
82  protected:
84  void setupGui();
85 
86  virtual void onExtendedLabelsChanged();
87 
90  virtual void createdExtendedLabel(int index, ExtendedLabel& label);
91 
92  virtual ExtendedLabel createLabel(int index, const std::string& labelName);
93 
94  public:
95  QScrollArea* myScrollView;
96  QWidget* myInsideWidget;
97  QGridLayout* myLayout;
99 
101  typedef std::map<int, ExtendedLabel> ExtendedLabels;
103 
104  typedef std::vector<ExtendedLabel> ObjectSpecificLabels;
106 
107  protected:
111  };
112 
114  {
115  public:
118 
120  static void registerInstance(makVrv::DtDe&, DtExtendedLabelsEntryWidgetCreator*);
121 
122  virtual DtExtendedLabelsEntryWidget* create(QWidget*);
123 
124  protected:
126  };
127 
130  {
131  public:
133 
136  static void registerInstance(makVrv::DtDe& de, DtExtendedLabelsEntryWidgetSignaler* signaler);
137 
140  boost::signals2::signal<void (int, DtExtendedLabelsEntryWidget::ExtendedLabel&)> signal_extendedLabelCreated;
141  };
142 }
ExtendedLabels myExtendedLabels
Definition: extendedLabelsEntryWidget.h:102
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:125
bool needsToPassValidator
Definition: extendedLabelsEntryWidget.h:44
makVrv::DtSignalConnectionManager myConnectionManager
Definition: extendedLabelsEntryWidget.h:109
std::vector< ExtendedLabel > ObjectSpecificLabels
Definition: extendedLabelsEntryWidget.h:104
ExtendedLabel(const ExtendedLabel &orig)
Definition: extendedLabelsEntryWidget.h:38
makVrv::DtDe & myDe
Definition: extendedLabelsEntryWidget.h:108
QWidget * myInsideWidget
Definition: extendedLabelsEntryWidget.h:96
ObjectSpecificLabels myObjectSpecificLabels
Definition: extendedLabelsEntryWidget.h:105
Contains makVrv::DtVirtualBaseClass class.
std::map< int, ExtendedLabel > ExtendedLabels
Special extended labels will start at integer 10000.
Definition: extendedLabelsEntryWidget.h:101
QGridLayout * myLayout
Definition: extendedLabelsEntryWidget.h:97
ExtendedLabel()
Definition: extendedLabelsEntryWidget.h:37
int myMinLabelWidth
Definition: extendedLabelsEntryWidget.h:110
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
#define DT_DLL_VRFGUIDATAENTRYWIDGETS
Definition: vrfGuiDataEntryWidgets.h:22
Definition: extendedLabelsEntryWidget.h:113
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:140
QScrollArea * myScrollView
Definition: extendedLabelsEntryWidget.h:95
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:72
Definition: extendedLabelsEntryWidget.h:35
Signaler use to signal the creation of an extended label.
Definition: extendedLabelsEntryWidget.h:129
QLineEdit * label
Definition: extendedLabelsEntryWidget.h:43
QLabel * warningIcon
Definition: extendedLabelsEntryWidget.h:42
ExtendedLabel myCommonLabel
Definition: extendedLabelsEntryWidget.h:98

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)