VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
enumerationWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
12 #include <QtWidgets/QWidget>
13 #include <QtWidgets/QListWidget>
17 
18 class QLabel;
19 class QPushButton;
20 class QCheckBox;
21 class QHBoxLayout;
22 
24 {
25  Q_OBJECT
26 
27 public:
28  enum Flags
29  {
30  ShowNone = 0,
31  ShowSubordinateTypes = 0x00000001,
32  ShowMatchTypes = 0x00000002,
33  ShowAll = (ShowSubordinateTypes | ShowMatchTypes)
34  };
35 
37  DtEnumerationWidget(makVrv::DtDe&, QWidget* parent = NULL, const Qt::WindowFlags& flags = 0);
38 
40  virtual ~DtEnumerationWidget();
41 
43  virtual void init(Flags flags);
44  virtual void setObjectType(const makVrf::DtEntityMapperKey&);
45  virtual void clearContents();
46  virtual const makVrf::DtEntityMapperKey& objectType() const;
47 
48  virtual void setMatchingTypeEnabled(bool);
49  virtual bool matchingTypeEnabled() const;
50  virtual void setMatchingType(const makVrf::DtEntityMapperKey&);
51  virtual const makVrf::DtEntityMapperKey& matchingType() const;
52 
53  virtual std::list<DtObjectType> additionalMatchTypes() const;
54  virtual void setAdditionalMatchTypes(std::list<DtObjectType> types);
55 
57  virtual bool changeEnumeration(const QString& title, bool okEnabled, Flags);
58 
59 public slots:
60  virtual bool changeEnumeration(const QString& title = "", bool okEnabled = false);
61  virtual void canSetEnumerationWithMatchingType(const DtObjectType&, const DtObjectType&);
62  virtual void canSetEnumeration(const DtObjectType&);
63  virtual void addRow();
64  virtual void removeRow();
65  virtual void itemSelectionChanged();
66 
67 signals:
68  void typeChanged(const makVrf::DtEntityMapperKey&, bool);
69  void typeChangedWithMatchingType(const makVrf::DtEntityMapperKey&, const makVrf::DtEntityMapperKey&, std::list<makVrf::DtEntityMapperKey>, bool);
70 
71 
72 public:
77 
78 protected:
81  std::list<makVrf::DtEntityMapperKey> myAdditionalMatchTypes;
86 
89 };
90 
92 {
93  return myMatchingTypeEnabled;
94 }
95 
97 {
98  return myObjectType;
99 }
100 
102 {
103  return myMatchingType;
104 }
105 
108 {
109 public:
112 
114  virtual ~DtEnumerationWidgetCreator();
115 
117  static DtEnumerationWidgetCreator& instance(makVrv::DtDe&);
118 
120  static void registerInstance(makVrv::DtDe&, DtEnumerationWidgetCreator*);
121 
123  virtual DtEnumerationWidget* create(QWidget* parent);
124 
125 protected:
127 };

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)