VR-Forces 4.6 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 
21 class QLabel;
22 class QLineEdit;
23 class QGridLayout;
24 class QScrollArea;
25 
26 namespace makVrf
27 {
30  {
31  Q_OBJECT
32 
33  public:
35  {
36  ExtendedLabel() : labelLabel(0), label(0), warningIcon(0), needsToPassValidator(false) {};
37  ExtendedLabel(const ExtendedLabel& orig) : labelLabel(orig.labelLabel), label(orig.label),
38  needsToPassValidator(orig.needsToPassValidator), warningIcon(orig.warningIcon) {};
39 
40  QLabel* labelLabel;
44  };
45 
46  DtExtendedLabelsEntryWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
47 
48  //DTOR
49  virtual ~DtExtendedLabelsEntryWidget();
50 
52  virtual void setLabel(const QString&);
53  virtual QString label() const;
54 
56  virtual void setExtendedLabels(const std::map<int, DtString>&);
57  virtual std::map<int, DtString> extendedLabels() const;
58 
59  virtual void setMinimumLabelWidth(int);
60 
63  virtual bool isValid() const;
64 
65  protected slots:
66  virtual void onLabelChanged();
67  virtual void onExtendedLabelsTextChanged();
68 
69  signals:
70  void labelChanged();
71  void extendedLabelsChanged();
72 
73  protected:
75  void setupGui();
76 
77  virtual void onExtendedLabelsChanged();
78 
81  virtual void createdExtendedLabel(int index, ExtendedLabel& label);
82 
83  public:
84  QScrollArea* myScrollView;
85  QWidget* myInsideWidget;
86  QGridLayout* myLayout;
88 
89  typedef std::map<int, ExtendedLabel> ExtendedLabels;
91 
92  protected:
96  QPixmap myWarningIcon;
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::signal<void (int, DtExtendedLabelsEntryWidget::ExtendedLabel&)> signal_extendedLabelCreated;
127  };
128 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)