VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
opdCanvas.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 
8 #include <vrvUtil/signalslib.h>
10 
11 #include <QtWidgets/QWidget>
12 #include <map>
13 #include <string>
14 
15 #include "sysObjParams.h"
16 
17 #include "descriptorCanvas.h"
18 #include <vlutil/vlString.h>
19 
24 
25 namespace makVrv
26 {
27  class DtDe;
28 }
29 
30 typedef std::map<DtString, DtDescriptorCanvasCreatorFcn> DtDescriptorCreators;
31 
33 {
34  Q_OBJECT
35 
36 public:
39 
42 
45 
47 
48  void resetBackup();
49 
50 public slots:
52 
53 protected:
55 
60 };
61 
62 class DtOpdCanvas : public QWidget
63 {
64  Q_OBJECT
65 
66 public:
67  DtOpdCanvas(makVrv::DtDe&, QWidget* parent = NULL, const Qt::WindowFlags& flags = 0);
68 
69  virtual ~DtOpdCanvas();
70 
71  // Registers default objects to map from descriptor types to
72  // display
73  virtual bool init();
74 
75  virtual void setupFrom(DtVrfObjectParameters* current, DtVrfObjectParameters* backup, const QString& filename);
77  virtual void setupFrom(const QList<DtVrfObjectParameters*>& current,
78  const QList<DtVrfObjectParameters*>& backup, const QList<QString>& filenames);
79 
80  static void addDescriptorCanvasCreator(const DtString& name,
83 
84  virtual void clear();
85  virtual void cleanupCanvases();
86 
87  virtual void savedOpdFile();
89 
90  // Passes down to current canvas which will then pass down to current page to see
91  // if the currently selcted item (if any) can be added to or deleted from
92  virtual bool canCreateParameterItem() const;
93  virtual bool canDeleteParameterItem() const;
94  virtual bool canRestoreParameterItem() const;
97  virtual void createParameterEntry();
98 
99  virtual QString currentTab(QString& tabPath) const;
100  virtual void setCurrentTab(const QString&, const QStringList&);
102  static void addParameterType(const char* baseParameterType, const char* matchingType);
103 
104 signals:
106  void rightButtonPressed(QTreeWidgetItem*, QMouseEvent*, int);
107  void selectOpdFile(const QString&);
108 
109 protected:
113 
114  QHash<DtVrfObjectParameters*, DtDescriptorCanvas*> myCanvases;
115  QHash<DtComponentSystemDescriptor*, DtComponentSystemInformation*> mySystems;
116 
118  static QHash<QString, QString> theParameterMatches;
119 
122 };

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)