VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
commandLevelsManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
11 #include <vlutil/vlFilename.h>
12 
13 #include <boost/signals2.hpp>
14 #include <map>
15 #include <string>
16 
17 namespace makVrv
18 {
19  class DtDe;
20 }
21 
22 namespace makVrf
23 {
25  {
26  public:
28  virtual ~DtCommandLevelsManager();
29 
31  static DtCommandLevelsManager& instance(makVrv::DtDe& de);
32  static void registerInstance(makVrv::DtDe& de, DtCommandLevelsManager*);
33 
36  virtual void getSplitRecord(std::vector<DtCommandLevelsRecord>& rec,
37  std::vector<std::string>& fileNames) {};
38 
41  virtual void addRecords(DtCommandLevelsRecord& recs,
42  DtCommandLevelsRecord& combinedRec) {};
43 
44  virtual void setFromRecord(const DtCommandLevelsRecord& rec);
45  virtual void loadDefaultCommandLevelsSettings(bool loadOnlyFactorySettings = false);
46  virtual void getRecord(DtCommandLevelsRecord& rec) const;
47 
49  virtual void setAutoSave(bool);
50  virtual bool autoSave() const;
51  virtual void saveSettingsAsDefault();
52 
63  virtual void addTaskSetCommandLevel(int level, const DtString& title, const DtString& toolTip, const DtString& icon);
64  virtual void addToTaskSetCommandLevel(int level, const DtString&, bool thisSessionOnly = false);
65 
67  virtual void setIsMagicCommand(const DtString&, bool flag);
68  virtual bool isMagicCommand(const DtString&) const;
69 
71  virtual void removeFromTaskSetCommandLevel(int level, const DtString&, bool thisSessionOnly = false);
72 
73  virtual DtString taskSetCommandLevelToolTip(int level) const;
74  virtual DtString taskSetCommandLevelTitle(int level) const;
75  virtual DtString taskSetCommandLevelIcon(int level) const;
76  virtual std::vector<int> taskSetCommandLevels(const DtString&) const;
77  virtual int numberOfTaskSetCommandLevels() const;
78  virtual std::vector<int> taskSetCommandLevels() const;
79  virtual bool isInTaskSetCommandLevel(int level, const DtString& taskSetType) const;
80  virtual void clearSessionCommandLevels();
82 
85  virtual void setExpandCollapsedState(const DtString& section, bool exp);
86  virtual bool expandCollapsedState(const DtString& section) const;
88 
91  virtual void setAlwaysPopOut(bool);
92  virtual bool alwaysPopOut() const;
94 
95  public:
97  boost::signals2::signal<void (const DtCommandLevelsRecord&)> signal_commandLevelsChanged;
98  boost::signals2::signal<void ()> signal_sessionCommandLevelsChanged;
99  boost::signals2::signal<void ()> signal_commandLevelCategoriesChanged;
100 
102  boost::signals2::signal<void (const DtString&, int level, bool)> signal_commandLevelChanged;
103 
105  boost::signals2::signal<void (const DtString&, bool)> signal_expandCollapsedStateChanged;
106 
108  boost::signals2::signal<void (bool)> signal_alwaysPopOutChanged;
109 
110  protected:
113 
114  std::map<int, std::set<DtString> > myTaskSetCommandLevels;
115  std::map<DtString, bool> myIsMagicCommand;
116 
118  {
122  };
123 
124  typedef std::map<int, CommandLevel> CommandLevels;
126  };
127 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
boost::signals2::signal< void()> signal_commandLevelCategoriesChanged
Definition: commandLevelsManager.h:99
DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem &cs, const DtVector &localOrigin, double topoHeading)
Returns a level orientation with the topographic heading.
boost::signals2::signal< void(bool)> signal_alwaysPopOutChanged
Signal sent when always pop out state changes.
Definition: commandLevelsManager.h:108
boost::signals2::signal< void()> signal_sessionCommandLevelsChanged
Definition: commandLevelsManager.h:98
virtual void addRecords(DtCommandLevelsRecord &recs, DtCommandLevelsRecord &combinedRec)
To support writing element definitions in folders as multiple files not implemented.
Definition: commandLevelsManager.h:41
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
boost::signals2::signal< void(const DtString &, int level, bool)> signal_commandLevelChanged
Signal sent when an item is added or removed from the particular command level.
Definition: commandLevelsManager.h:102
boost::signals2::signal< void(const DtCommandLevelsRecord &)> signal_commandLevelsChanged
Sent when gui settings have changed.
Definition: commandLevelsManager.h:97
std::map< int, CommandLevel > CommandLevels
Definition: commandLevelsManager.h:124
DtCommandLevelsRecord myCommandLevelsRecord
Definition: commandLevelsManager.h:112
DtString icon
Definition: commandLevelsManager.h:120
Contains makVrv::DtVirtualBaseClass class.
CommandLevels myCommandLevels
Definition: commandLevelsManager.h:125
DtString title
Definition: commandLevelsManager.h:119
std::map< int, std::set< DtString > > myTaskSetCommandLevels
Definition: commandLevelsManager.h:114
Definition: commandLevelsManager.h:117
boost::signals2::signal< void(const DtString &, bool)> signal_expandCollapsedStateChanged
Signal sent when expand/collapsed state changes.
Definition: commandLevelsManager.h:105
Definition: commandLevelsManager.h:24
DtString toolTip
Definition: commandLevelsManager.h:121
Definition: commandLevelsRecord.h:27
std::map< DtString, bool > myIsMagicCommand
Definition: commandLevelsManager.h:115
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:70
virtual void getSplitRecord(std::vector< DtCommandLevelsRecord > &rec, std::vector< std::string > &fileNames)
To support writing element definitions in folders as multiple files not implemented.
Definition: commandLevelsManager.h:36
makVrv::DtDe & myDe
Definition: commandLevelsManager.h:111

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)