VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fltLoaderDialog.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
11 #include <QtWidgets/QDialog>
12 #include <QtWidgets/QTreeWidget>
13 
14 #include <map>
15 
16 class QPushButton;
17 class DtFilename;
18 class QHBoxLayout;
19 
20 typedef struct _DtFltInformation
21 {
22  QString myNodeType;
23  QColor myNodeColor;
25 
26 typedef std::map<int, DtFltInformation> DtFltInformationMap;
27 
28 class DtFltLoaderDialog;
29 
31 {
32 public:
34  MgInfoStruct(const MgInfoStruct& orig) :
35  myParentNode(orig.myParentNode), myName(orig.myName),
36  myChildren(orig.myChildren), myNodeType(orig.myNodeType) {};
37 
38  virtual ~MgInfoStruct() { int iLimit = myChildren.count(); for (int i = 0; i < iLimit; i++) delete myChildren[i]; };
39  QString myParentNode;
40  QString myName;
43 };
44 
46 {
47  Q_OBJECT
48 
49 public:
50  DtFltLoaderDialog(QWidget* parent=0, const Qt::WindowFlags& flags = 0);
51 
52  virtual ~DtFltLoaderDialog();
53 
54  virtual bool init(const DtFilename&);
55 
56  int exec();
57 
58  const QString& selectionTree() const;
59 
60 public slots:
61  virtual void fltSelectionChanged();
62  virtual void stateChanged(QTreeWidgetItem*, int column);
63 
64 protected:
65  virtual void stateChanged(QTreeWidgetItem*, bool b, bool changeChildState = false);
66 
67 protected:
68  virtual void addLayers(const MgInfoStruct*, QTreeWidgetItem* parent);
69  virtual void addControls();
70  virtual void initConnections();
71  virtual void addFltNodes();
72 
73  virtual void addFltInformation(int, const QString&, const QColor&);
74  virtual DtFltInformation fltInfoFor(int) const;
75 
76  virtual void initMappings();
77  virtual QString createSelectionTree(QTreeWidgetItem*) const;
78 
79 protected:
83  QHBoxLayout* myHLayout;
84 
87  QString mySelectionTree;
88 };
89 
90 inline const QString& DtFltLoaderDialog::selectionTree() const
91 {
92  return mySelectionTree;
93 }
struct _DtFltInformation DtFltInformation
QString myName
Definition: fltLoaderDialog.h:40
QTreeWidget * myListView
Definition: fltLoaderDialog.h:82
MgInfoStruct myMGInfo
Definition: fltLoaderDialog.h:85
virtual ~MgInfoStruct()
Definition: fltLoaderDialog.h:38
int myNodeType
Definition: fltLoaderDialog.h:42
QHBoxLayout * myHLayout
Definition: fltLoaderDialog.h:83
Definition: fltLoaderDialog.h:30
QString mySelectionTree
Definition: fltLoaderDialog.h:87
QPushButton * myCancelButton
Definition: fltLoaderDialog.h:81
DtFltInformationMap myFltInformation
Definition: fltLoaderDialog.h:86
std::map< int, DtFltInformation > DtFltInformationMap
Definition: fltLoaderDialog.h:26
Definition: fltLoaderDialog.h:20
QColor myNodeColor
Definition: fltLoaderDialog.h:23
QPushButton * myOKButton
Definition: fltLoaderDialog.h:80
QString myNodeType
Definition: fltLoaderDialog.h:22
Definition: fltLoaderDialog.h:45
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
const QString & selectionTree() const
Definition: fltLoaderDialog.h:90
MgInfoStruct(const MgInfoStruct &orig)
Definition: fltLoaderDialog.h:34
MgInfoStruct()
Definition: fltLoaderDialog.h:33
#define DT_DLL_simulationObjectEditorimpl
This file is used to determine how to build.
Definition: simulationObjectEditorImplDefines.h:33
QList< MgInfoStruct * > myChildren
Definition: fltLoaderDialog.h:41

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)