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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)