VR-Forces 4.7 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 setKindEnabled(bool);
49  virtual bool kindEnabled() const;
50 
51  virtual void setMatchingTypeEnabled(bool);
52  virtual bool matchingTypeEnabled() const;
53  virtual void setMatchingType(const makVrf::DtEntityMapperKey&);
54  virtual const makVrf::DtEntityMapperKey& matchingType() const;
55 
56  virtual std::list<DtObjectType> additionalMatchTypes() const;
57  virtual void setAdditionalMatchTypes(std::list<DtObjectType> types);
58 
60  virtual bool changeEnumeration(const QString& title, bool okEnabled, Flags, int kindsLessThanOnlyValue = -1);
61 
62 public slots:
63  virtual bool changeEnumeration(const QString& title = "", bool okEnabled = false, int kindsLessThanOnlyValue = -1);
64  virtual void canSetEnumerationWithMatchingType(const DtObjectType&, const DtObjectType&);
65  virtual void canSetEnumeration(const DtObjectType&);
66  virtual void addRow();
67  virtual void removeRow();
68  virtual void itemSelectionChanged();
69 
70 signals:
71  void typeChanged(const makVrf::DtEntityMapperKey&, bool);
72  void typeChangedWithMatchingType(const makVrf::DtEntityMapperKey&, const makVrf::DtEntityMapperKey&, std::list<makVrf::DtEntityMapperKey>, bool);
73 
74 
75 public:
80 
81 protected:
84  std::list<makVrf::DtEntityMapperKey> myAdditionalMatchTypes;
90 
93 };
94 
96 {
97  return myMatchingTypeEnabled;
98 }
99 
101 {
102  return myObjectType;
103 }
104 
106 {
107  return myMatchingType;
108 }
109 
112 {
113 public:
116 
118  virtual ~DtEnumerationWidgetCreator();
119 
121  static DtEnumerationWidgetCreator& instance(makVrv::DtDe&);
122 
124  static void registerInstance(makVrv::DtDe&, DtEnumerationWidgetCreator*);
125 
127  virtual DtEnumerationWidget* create(QWidget* parent);
128 
129 protected:
131 };

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)