VR-Forces Developer's Guide
 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>
14 #include <vrfutil/enumDictionary.h>
17 
18 class QLabel;
19 class QPushButton;
20 class QCheckBox;
21 class QHBoxLayout;
22 class QToolButton;
23 
25 {
26  Q_OBJECT
27 
28 public:
29  enum Flags
30  {
31  ShowNone = 0,
32  ShowSubordinateTypes = 0x00000001,
33  ShowMatchTypes = 0x00000002,
34  DoNotAllowWildcards = 0x00000004,
35  ShowAll = (ShowSubordinateTypes | ShowMatchTypes)
36  };
37 
39  DtEnumerationWidget(makVrv::DtDe&, QWidget* parent = NULL, const Qt::WindowFlags& flags = 0);
40 
42  virtual ~DtEnumerationWidget();
43 
45  virtual void init(Flags flags);
46  virtual void setObjectType(const makVrf::DtEntityMapperKey&);
47  virtual void clearContents();
48  virtual const makVrf::DtEntityMapperKey& objectType() const;
49 
50  virtual void setKindEnabled(bool);
51  virtual bool kindEnabled() const;
52 
53  virtual void setMatchingTypeEnabled(bool);
54  virtual bool matchingTypeEnabled() const;
55  virtual void setMatchingType(const makVrf::DtEntityMapperKey&);
56  virtual const makVrf::DtEntityMapperKey& matchingType() const;
57 
58  virtual std::list<DtObjectType> additionalMatchTypes() const;
59  virtual void setAdditionalMatchTypes(std::list<DtObjectType> types);
60 
62  virtual bool changeEnumeration(const QString& title, bool okEnabled, Flags, int kindsLessThanOnlyValue = -1);
63 
64 public slots:
65  virtual bool changeEnumeration(const QString& title = "", bool okEnabled = false, int kindsLessThanOnlyValue = -1);
66  virtual void canSetEnumerationWithMatchingType(const DtObjectType&, const DtObjectType&);
67  virtual void canSetEnumeration(const DtObjectType&);
68  virtual void addRow();
69  virtual void removeRow();
70  virtual void itemSelectionChanged();
71 
72 signals:
73  void typeChanged(const makVrf::DtEntityMapperKey&, bool);
74  void typeChangedWithMatchingType(const makVrf::DtEntityMapperKey&, const makVrf::DtEntityMapperKey&, std::list<makVrf::DtEntityMapperKey>, bool);
75 
76 
77 public:
82 
83 protected:
86  std::list<makVrf::DtEntityMapperKey> myAdditionalMatchTypes;
92 
95 };
96 
98 {
99  return myMatchingTypeEnabled;
100 }
101 
103 {
104  return myObjectType;
105 }
106 
108 {
109  return myMatchingType;
110 }
111 
114 {
115 public:
118 
120  virtual ~DtEnumerationWidgetCreator();
121 
123  static DtEnumerationWidgetCreator& instance(makVrv::DtDe&);
124 
126  static void registerInstance(makVrv::DtDe&, DtEnumerationWidgetCreator*);
127 
129  virtual DtEnumerationWidget* create(QWidget* parent);
130 
131 protected:
133 };
QHBoxLayout * myAdditionalMatchTypesButtonLayout
Definition: enumerationWidget.h:93
Definition: entityMapperKey.h:23
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
makVrf::DtEntityMapperKey myObjectType
Definition: enumerationWidget.h:84
virtual const makVrf::DtEntityMapperKey & objectType() const
Definition: enumerationWidget.h:102
bool myMatchingTypesModified
Definition: enumerationWidget.h:89
bool myKindEnabled
Definition: enumerationWidget.h:90
Definition: objectType.h:27
Flags myFlags
Definition: enumerationWidget.h:94
Contains makVrv::DtVirtualBaseClass class.
makVrv::DtDe & myDe
Definition: enumerationWidget.h:132
QToolButton * myAddMatchTypeButton
Definition: enumerationWidget.h:80
Flags
Definition: enumerationWidget.h:29
bool myMatchingTypeEnabled
Definition: enumerationWidget.h:88
makVrf::DtEntityMapperKey myMatchingType
Definition: enumerationWidget.h:85
virtual const makVrf::DtEntityMapperKey & matchingType() const
Definition: enumerationWidget.h:107
QLabel * myEnumeration
Definition: enumerationWidget.h:78
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
makVrv::DtDe & myDe
Definition: enumerationWidget.h:87
Definition: enumerationWidget.h:24
std::list< makVrf::DtEntityMapperKey > myAdditionalMatchTypes
Definition: enumerationWidget.h:86
QToolButton * myRemoveMatchTypeButton
Definition: enumerationWidget.h:81
QListWidget * myAdditionalMatchTypesWidget
Definition: enumerationWidget.h:91
Creator for the dialog.
Definition: enumerationWidget.h:113
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
QPushButton * myOK
Definition: enumerationWidget.h:79
#define DT_DLL_simulationObjectEditorimpl
This file is used to determine how to build.
Definition: simulationObjectEditorImplDefines.h:33
virtual bool matchingTypeEnabled() const
Definition: enumerationWidget.h:97

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)